ua_session.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef UA_SESSION_H_
  2. #define UA_SESSION_H_
  3. #include "ua_types.h"
  4. #include "ua_securechannel.h"
  5. #include "queue.h"
  6. /**
  7. * @ingroup communication
  8. *
  9. * @{
  10. */
  11. struct ContinuationPointEntry {
  12. LIST_ENTRY(ContinuationPointEntry) pointers;
  13. UA_ByteString identifier;
  14. UA_BrowseDescription browseDescription;
  15. UA_Int32 continuationIndex;
  16. UA_UInt32 maxReferences;
  17. };
  18. struct UA_Session {
  19. UA_ApplicationDescription clientDescription;
  20. UA_Boolean activated;
  21. UA_String sessionName;
  22. UA_NodeId authenticationToken;
  23. UA_NodeId sessionId;
  24. UA_UInt32 maxRequestMessageSize;
  25. UA_UInt32 maxResponseMessageSize;
  26. UA_Int64 timeout;
  27. UA_DateTime validTill;
  28. UA_SecureChannel *channel;
  29. LIST_HEAD(ContinuationPointList, ContinuationPointEntry) continuationPoints;
  30. };
  31. extern UA_Session anonymousSession; ///< If anonymous access is allowed, this session is used internally (Session ID: 0)
  32. extern UA_Session adminSession; ///< Local access to the services (for startup and maintenance) uses this Session with all possible access rights (Session ID: 1)
  33. void UA_Session_init(UA_Session *session);
  34. void UA_Session_deleteMembers(UA_Session *session);
  35. /** If any activity on a session happens, the timeout is extended */
  36. void UA_Session_updateLifetime(UA_Session *session);
  37. void UA_Session_detachSecureChannel(UA_Session *session);
  38. /** @} */
  39. #endif /* UA_SESSION_H_ */