ua_session_manager.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef UA_SESSION_MANAGER_H_
  2. #define UA_SESSION_MANAGER_H_
  3. #include "ua_server.h"
  4. #include "ua_session.h"
  5. UA_StatusCode UA_SessionManager_new(UA_SessionManager **sessionManager, UA_UInt32 maxSessionCount,
  6. UA_UInt32 sessionLifetime, UA_UInt32 startSessionId);
  7. void UA_SessionManager_delete(UA_SessionManager *sessionManager);
  8. UA_StatusCode UA_SessionManager_createSession(UA_SessionManager *sessionManager,
  9. UA_SecureChannel *channel, UA_Session **session);
  10. UA_StatusCode UA_SessionManager_removeSession(UA_SessionManager *sessionManager,
  11. UA_NodeId *sessionId);
  12. /**
  13. * @brief finds the session which is identified by the sessionId
  14. * @param sessionId the session id is used to identify the unknown session
  15. * @param session the session object is returned if no error occurs
  16. * @return error code
  17. */
  18. UA_StatusCode UA_SessionManager_getSessionById(UA_SessionManager *sessionManager,
  19. UA_NodeId *sessionId, UA_Session **session);
  20. /**
  21. * @param token authentication token which is used to get the session object
  22. * @param session output, session object which is identified by the authentication token
  23. * @return error code
  24. */
  25. UA_StatusCode UA_SessionManager_getSessionByToken(UA_SessionManager *sessionManager,
  26. UA_NodeId *token, UA_Session **session);
  27. //UA_Int32 UA_SessionManager_updateSessions();
  28. //UA_Int32 UA_SessionManager_generateToken(UA_Session session, UA_Int32 requestedLifeTime, SecurityTokenRequestType requestType, UA_ChannelSecurityToken* newToken);
  29. #endif /* UA_SESSION_MANAGER_H_ */