ua_securechannel_manager.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef UA_CHANNEL_MANAGER_H_
  2. #define UA_CHANNEL_MANAGER_H_
  3. #include "ua_server.h"
  4. #include "ua_securechannel.h"
  5. #include "ua_util.h"
  6. typedef struct UA_SecureChannelManager {
  7. LIST_HEAD(channel_list, channel_list_entry) channels; // doubly-linked list of channels
  8. UA_Int32 maxChannelCount;
  9. UA_DateTime maxChannelLifetime;
  10. UA_MessageSecurityMode securityMode;
  11. UA_String endpointUrl;
  12. UA_DateTime channelLifeTime;
  13. UA_Int32 lastChannelId;
  14. UA_UInt32 lastTokenId;
  15. } UA_SecureChannelManager;
  16. UA_StatusCode UA_SecureChannelManager_init(UA_SecureChannelManager *cm, UA_UInt32 maxChannelCount,
  17. UA_UInt32 tokenLifetime, UA_UInt32 startChannelId,
  18. UA_UInt32 startTokenId, UA_String *endpointUrl);
  19. void UA_SecureChannelManager_deleteMembers(UA_SecureChannelManager *cm);
  20. UA_StatusCode UA_SecureChannelManager_open(UA_SecureChannelManager *cm, UA_Connection *conn,
  21. const UA_OpenSecureChannelRequest *request,
  22. UA_OpenSecureChannelResponse *response);
  23. UA_StatusCode UA_SecureChannelManager_renew(UA_SecureChannelManager *cm, UA_Connection *conn,
  24. const UA_OpenSecureChannelRequest *request,
  25. UA_OpenSecureChannelResponse *response);
  26. UA_StatusCode UA_SecureChannelManager_get(UA_SecureChannelManager *cm, UA_UInt32 channelId,
  27. UA_SecureChannel **channel);
  28. UA_StatusCode UA_SecureChannelManager_close(UA_SecureChannelManager *cm, UA_UInt32 channelId);
  29. #endif /* UA_CHANNEL_MANAGER_H_ */