StreamBase C++ API  7.7.8.2
StreamBaseConstants.hpp
1 // Copyright (c) 2004-2019 TIBCO Software Inc. All rights reserved.
2 
3 #ifndef STREAMBASE_CONSTANTS_H
4 #define STREAMBASE_CONSTANTS_H
5 
6 #include <string>
7 #include "StreamBase.hpp"
8 
9 SB_NAMESPACE_BEGIN
10 
11 // constants for the Control Stream
12 namespace Control {
13  extern const std::string STREAM_NAME;
14  extern const std::string SCHEMA_NAME;
15  extern const int PARAM_LEN;
16  extern const int SUBSYS_LEN;
17 };
18 
19 enum LeadershipStatus {
20  NON_LEADER = 0,
21  LEADER = 1
22 };
23 
24 /// convert string version of leadership status into a
25 /// valid enum value
26 /// @param stringStatus a string containing LEADER or NON_LEADER
27 /// @throws StreamBaseException if invalid
28 LeadershipStatus leadershipStatusDecode(const std::string &stringStatus);
29 
30 /// convert integer version of leadership status into a
31 /// valid enum value
32 /// @param intStatus a integer containing a valid enumeration value
33 /// @throws StreamBaseException if invalid
34 LeadershipStatus leadershipStatusDecode(int intStatus);
35 
36 #ifndef SWIG
37 // constants for the system.error stream
38 namespace Error {
39  extern const std::string STREAM_NAME;
40  extern const std::string SCHEMA_NAME;
41 };
42 
43 // constants for the system.stat stream
44 namespace Stat {
45  extern const std::string STREAM_NAME;
46  extern const std::string SCHEMA_NAME;
47 };
48 
49 // constants for the system.connections stream
50 namespace Connections {
51  extern const std::string STREAM_NAME;
52  extern const std::string SCHEMA_NAME;
53 };
54 
55 // constants for the system.subscriptions stream
56 namespace Subscriptions{
57  extern const std::string STREAM_NAME;
58  extern const std::string SCHEMA_NAME;
59 };
60 #endif // SWIG
61 
62 SB_NAMESPACE_END;
63 
64 #endif