ua_session.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef UA_SESSION_H_
  2. #define UA_SESSION_H_
  3. #include "ua_types.h"
  4. #include "ua_securechannel.h"
  5. /**
  6. * @ingroup internal
  7. *
  8. * @defgroup session Session
  9. */
  10. struct UA_Session {
  11. UA_ApplicationDescription clientDescription;
  12. UA_String sessionName;
  13. UA_NodeId authenticationToken;
  14. UA_NodeId sessionId;
  15. UA_UInt32 maxRequestMessageSize;
  16. UA_UInt32 maxResponseMessageSize;
  17. UA_Int64 timeout;
  18. UA_DateTime validTill;
  19. UA_SecureChannel *channel;
  20. };
  21. UA_Int32 UA_Session_new(UA_Session **session);
  22. UA_Int32 UA_Session_init(UA_Session *session);
  23. UA_Int32 UA_Session_delete(UA_Session *session);
  24. UA_Int32 UA_Session_deleteMembers(UA_Session *session);
  25. /** Compares two session objects */
  26. UA_Boolean UA_Session_compare(UA_Session *session1, UA_Session *session2);
  27. /** If any activity on a session happens, the timeout must be extended */
  28. UA_Int32 UA_Session_updateLifetime(UA_Session *session);
  29. /** Gets the sessions pending lifetime (calculated from the timeout which was set) */
  30. UA_Int32 UA_Session_getPendingLifetime(UA_Session *session, UA_Double *pendingLifetime);
  31. #endif /* UA_SESSION_H_ */