CppWAMP
C++11 client library for the WAMP protocol
wampdefs.hpp
Go to the documentation of this file.
1 /*------------------------------------------------------------------------------
2  Copyright Butterfly Energy Systems 2014-2015, 2018, 2022.
3  Distributed under the Boost Software License, Version 1.0.
4  http://www.boost.org/LICENSE_1_0.txt
5 ------------------------------------------------------------------------------*/
6 
7 #ifndef CPPWAMP_WAMPDEFS_HPP
8 #define CPPWAMP_WAMPDEFS_HPP
9 
10 #include "config.hpp"
11 
12 //------------------------------------------------------------------------------
15 //------------------------------------------------------------------------------
16 
17 #include <cstdint>
18 
19 namespace wamp
20 {
21 
22 using SessionId = int64_t;
23 using RequestId = int64_t;
24 using SubscriptionId = int64_t;
25 using PublicationId = int64_t;
26 using RegistrationId = int64_t;
27 
29 constexpr RequestId nullRequestId() {return 0;}
30 
31 //------------------------------------------------------------------------------
33 //------------------------------------------------------------------------------
34 enum class SessionState
35 {
36  disconnected,
37  connecting,
38  closed,
39  establishing,
41  established,
42  shuttingDown,
43  failed
44 };
45 
46 //------------------------------------------------------------------------------
48 //------------------------------------------------------------------------------
49 enum class CallCancelMode
50 {
51  kill,
52  killNoWait,
53  skip
54 };
55 
56 //------------------------------------------------------------------------------
59 //------------------------------------------------------------------------------
60 using CancelMode CPPWAMP_DEPRECATED = CallCancelMode;
61 
62 } // namespace wamp
63 
64 #endif // CPPWAMP_WAMPDEFS_HPP
wamp::RequestId
int64_t RequestId
Ephemeral ID associated with a WAMP request.
Definition: wampdefs.hpp:23
wamp::CallCancelMode::skip
@ skip
No INTERRUPT sent to callee; router immediately returns ERROR.
wamp::RegistrationId
int64_t RegistrationId
Obtains the value representing a blank RequestId.
Definition: wampdefs.hpp:28
wamp::SessionId
int64_t SessionId
Ephemeral ID associated with a WAMP session.
Definition: wampdefs.hpp:22
wamp::SessionState::closed
@ closed
Transport connected, but WAMP session is closed.
wamp::SessionState::shuttingDown
@ shuttingDown
WAMP session is closing.
wamp::CallCancelMode::killNoWait
@ killNoWait
INTERRUPT sent to callee; router immediately returns ERROR.
wamp::SessionState::disconnected
@ disconnected
The transport connection is not yet established.
wamp::SessionState::connecting
@ connecting
Transport connection is in progress.
wamp::SessionState::establishing
@ establishing
WAMP session establishment is in progress.
wamp::SubscriptionId
int64_t SubscriptionId
Ephemeral ID associated with an topic subscription.
Definition: wampdefs.hpp:24
wamp
Definition: anyhandler.hpp:36
wamp::SessionState::authenticating
@ authenticating
WAMP authentication is in progress.
wamp::PublicationId
int64_t PublicationId
Ephemeral ID associated with an event publication.
Definition: wampdefs.hpp:25
wamp::SessionState::failed
@ failed
WAMP session or transport connection has failed.
wamp::SessionState::established
@ established
WAMP session is established.
wamp::SessionState
SessionState
Enumerates the possible states that a client or router session can be in.
Definition: wampdefs.hpp:34
wamp::CallCancelMode::kill
@ kill
INTERRUPT sent to callee; RESULT or ERROR returned, depending on callee.
wamp::CallCancelMode
CallCancelMode
Enumerates the possible call cancelling modes.
Definition: wampdefs.hpp:49