HTTPSSessionInstantiator.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // HTTPSSessionInstantiator.h
  3. //
  4. // Library: NetSSL_OpenSSL
  5. // Package: HTTPSClient
  6. // Module: HTTPSSessionInstantiator
  7. //
  8. // Definition of the HTTPSSessionInstantiator class.
  9. //
  10. // Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef Net_HTTPSSessionInstantiator_INCLUDED
  16. #define Net_HTTPSSessionInstantiator_INCLUDED
  17. #include "Poco/Net/NetSSL.h"
  18. #include "Poco/Net/Context.h"
  19. #include "Poco/Net/Utility.h"
  20. #include "Poco/Net/HTTPSessionInstantiator.h"
  21. #include "Poco/URI.h"
  22. namespace Poco {
  23. namespace Net {
  24. class NetSSL_API HTTPSSessionInstantiator: public HTTPSessionInstantiator
  25. /// The HTTPSessionInstantiator for HTTPSClientSession.
  26. {
  27. public:
  28. HTTPSSessionInstantiator();
  29. /// Creates the HTTPSSessionInstantiator.
  30. HTTPSSessionInstantiator(Context::Ptr pContext);
  31. /// Creates the HTTPSSessionInstantiator using the given SSL context.
  32. ~HTTPSSessionInstantiator();
  33. /// Destroys the HTTPSSessionInstantiator.
  34. HTTPClientSession* createClientSession(const Poco::URI& uri);
  35. /// Creates a HTTPSClientSession for the given URI.
  36. static void registerInstantiator();
  37. /// Registers the instantiator with the global HTTPSessionFactory.
  38. static void registerInstantiator(Context::Ptr pContext);
  39. /// Registers the instantiator with the global HTTPSessionFactory using the given SSL context.
  40. static void unregisterInstantiator();
  41. /// Unregisters the factory with the global HTTPSessionFactory.
  42. private:
  43. Context::Ptr _pContext;
  44. };
  45. } } // namespace Poco::Net
  46. #endif // Net_HTTPSSessionInstantiator_INCLUDED