123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef UA_SESSION_H_
- #define UA_SESSION_H_
- #include "ua_types.h"
- #include "ua_securechannel.h"
- #include "queue.h"
- /**
- * @ingroup communication
- *
- * @{
- */
- struct ContinuationPointEntry {
- LIST_ENTRY(ContinuationPointEntry) pointers;
- UA_ByteString identifier;
- UA_BrowseDescription browseDescription;
- UA_Int32 continuationIndex;
- UA_UInt32 maxReferences;
- };
- struct UA_Session {
- UA_ApplicationDescription clientDescription;
- UA_Boolean activated;
- UA_String sessionName;
- UA_NodeId authenticationToken;
- UA_NodeId sessionId;
- UA_UInt32 maxRequestMessageSize;
- UA_UInt32 maxResponseMessageSize;
- UA_Int64 timeout;
- UA_DateTime validTill;
- UA_SecureChannel *channel;
- LIST_HEAD(ContinuationPointList, ContinuationPointEntry) continuationPoints;
- };
- extern UA_Session anonymousSession; ///< If anonymous access is allowed, this session is used internally (Session ID: 0)
- extern UA_Session adminSession; ///< Local access to the services (for startup and maintenance) uses this Session with all possible access rights (Session ID: 1)
- void UA_Session_init(UA_Session *session);
- void UA_Session_deleteMembers(UA_Session *session);
- /** If any activity on a session happens, the timeout must be extended */
- UA_StatusCode UA_Session_updateLifetime(UA_Session *session);
- /** Set up the point in time till the session is valid */
- UA_StatusCode UA_Session_setExpirationDate(UA_Session *session);
- /** Gets the sessions pending lifetime (calculated from the timeout which was set) */
- UA_StatusCode UA_Session_getPendingLifetime(UA_Session *session, UA_Double *pendingLifetime);
- void UA_Session_detachSecureChannel(UA_Session *session);
- /** @} */
- #endif /* UA_SESSION_H_ */
|