7#ifndef Glacier2_Router_h_
8#define Glacier2_Router_h_
12#include <Ice/Router.h>
13#include "PermissionsVerifier.h"
15#include <Glacier2/Config.h>
17#ifndef ICE_DISABLE_VERSION
18# if ICE_INT_VERSION != 30850
19# error Ice version mismatch: an exact match is required for beta generated code
24# if defined(GLACIER2_API_EXPORTS)
25# define GLACIER2_API ICE_DECLSPEC_EXPORT
27# define GLACIER2_API ICE_DECLSPEC_IMPORT
46#if defined(__GNUC__) && !defined(__clang__)
47# pragma GCC diagnostic push
48# pragma GCC diagnostic ignored "-Wextra"
64 ~RouterPrx()
override;
114 void _iceI_getCategoryForClient(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&,
const Ice::Context&)
const;
170 std::function<void()>
createSessionAsync(std::string_view userId, std::string_view password, std::function<
void(std::optional<::Glacier2::SessionPrx>)> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
173 void _iceI_createSession(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, std::string_view, std::string_view,
const Ice::Context&)
const;
229 void _iceI_createSessionFromSecureConnection(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&,
const Ice::Context&)
const;
248 [[deprecated(
"As of Ice 3.8, this operation does nothing.")]] std::function<void()>
refreshSessionAsync(std::function<
void()> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
251 void _iceI_refreshSession(
const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&,
const Ice::Context&)
const;
273 void _iceI_destroySession(
const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&,
const Ice::Context&)
const;
297 void _iceI_getSessionTimeout(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int64_t>>&,
const Ice::Context&)
const;
321 void _iceI_getACMTimeout(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int32_t>>&,
const Ice::Context&)
const;
328 static
RouterPrx _fromReference(IceInternal::ReferencePtr ref) {
return RouterPrx{std::move(ref)}; }
335 explicit RouterPrx(IceInternal::ReferencePtr&& ref) :
Ice::ObjectPrx{std::move(ref)}
339#if defined(__GNUC__) && !defined(__clang__)
340# pragma GCC diagnostic pop
358 [[nodiscard]] const
char*
ice_id() const noexcept override;
364 void _writeImpl(
Ice::OutputStream*) const override;
367 void _readImpl(
Ice::InputStream*) override;
386 [[nodiscard]] std::vector<std::string> ice_ids(
const Ice::Current& current)
const override;
394 [[nodiscard]]
virtual std::string getCategoryForClient(
const Ice::Current& current)
const = 0;
415 virtual std::optional<SessionPrx> createSession(std::string userId, std::string password,
const Ice::Current& current) = 0;
435 virtual std::optional<SessionPrx> createSessionFromSecureConnection(
const Ice::Current& current) = 0;
443 virtual void refreshSession(
const Ice::Current& current) = 0;
451 virtual void destroySession(
const Ice::Current& current) = 0;
459 [[nodiscard]]
virtual std::int64_t getSessionTimeout(
const Ice::Current& current)
const = 0;
467 [[nodiscard]]
virtual std::int32_t getACMTimeout(
const Ice::Current& current)
const = 0;
529 virtual void createSessionAsync(std::string userId, std::string password, std::function<
void(
const std::optional<SessionPrx>& returnValue)> response, std::function<
void(std::exception_ptr)> exception,
const Ice::Current& current) = 0;
581 virtual void getSessionTimeoutAsync(std::function<
void(std::int64_t returnValue)> response, std::function<
void(std::exception_ptr)> exception,
const Ice::Current& current)
const = 0;
591 virtual void getACMTimeoutAsync(std::function<
void(std::int32_t returnValue)> response, std::function<
void(std::exception_ptr)> exception,
const Ice::Current& current)
const = 0;
607#include <Ice/PopDisableWarnings.h>
RouterPrx ProxyType
The associated proxy type.
std::vector< std::string > ice_ids(const Ice::Current ¤t) const override
Gets the Slice interfaces supported by this object as a list of type IDs.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual void createSessionFromSecureConnectionAsync(std::function< void(const std::optional< SessionPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t)=0
Creates a per-client session with the router.
virtual void getSessionTimeoutAsync(std::function< void(std::int64_t returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t) const =0
Gets the idle timeout used by the server-side of the connection.
virtual void refreshSessionAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t)=0
Keeps the session with this router alive.
std::string ice_id(const Ice::Current ¤t) const override
Gets the type ID of the most-derived Slice interface supported by this object.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void createSessionAsync(std::string userId, std::string password, std::function< void(const std::optional< SessionPrx > &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t)=0
Creates a session for the client (caller) with the router.
virtual void getCategoryForClientAsync(std::function< void(std::string_view returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t) const =0
Gets a unique category that identifies the client (caller) in the router.
virtual void destroySessionAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t)=0
Destroys the session of the caller with this router.
virtual void getACMTimeoutAsync(std::function< void(std::int32_t returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current ¤t) const =0
Gets the idle timeout used by the server-side of the connection.
The Glacier2 specialization of the Ice::RouterPrx interface.
std::optional< SessionPrx > createSessionFromSecureConnection(const Ice::Context &context=Ice::noExplicitContext) const
Creates a per-client session with the router.
std::future< std::int64_t > getSessionTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::int32_t getACMTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::function< void()> getACMTimeoutAsync(std::function< void(std::int32_t)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::int64_t getSessionTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
std::future< void > destroySessionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Destroys the session of the caller with this router.
std::future< std::optional< SessionPrx > > createSessionFromSecureConnectionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Creates a per-client session with the router.
void destroySession(const Ice::Context &context=Ice::noExplicitContext) const
Destroys the session of the caller with this router.
RouterPrx(const RouterPrx &other) noexcept
Copy constructor.
std::optional< SessionPrx > createSession(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a session for the client (caller) with the router.
std::future< void > refreshSessionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session with this router alive.
RouterPrx & operator=(RouterPrx &&rhs) noexcept
Move assignment operator.
std::function< void()> getSessionTimeoutAsync(std::function< void(std::int64_t)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
void refreshSession(const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session with this router alive.
std::string getCategoryForClient(const Ice::Context &context=Ice::noExplicitContext) const
Gets a unique category that identifies the client (caller) in the router.
RouterPrx & operator=(const RouterPrx &rhs) noexcept
Copy assignment operator.
std::future< std::string > getCategoryForClientAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a unique category that identifies the client (caller) in the router.
RouterPrx(RouterPrx &&other) noexcept
Move constructor.
std::function< void()> createSessionAsync(std::string_view userId, std::string_view password, std::function< void(std::optional<::Glacier2::SessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a session for the client (caller) with the router.
std::function< void()> refreshSessionAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Keeps the session with this router alive.
RouterPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
std::function< void()> destroySessionAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Destroys the session of the caller with this router.
std::future< std::optional< SessionPrx > > createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a session for the client (caller) with the router.
std::function< void()> getCategoryForClientAsync(std::function< void(std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a unique category that identifies the client (caller) in the router.
std::function< void()> createSessionFromSecureConnectionAsync(std::function< void(std::optional<::Glacier2::SessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a per-client session with the router.
std::future< std::int32_t > getACMTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the idle timeout used by the server-side of the connection.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
The Glacier2 specialization of the Ice::RouterPrx interface.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
The exception that is thrown when a client tries to destroy a session with a router,...
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Represents the response to an incoming request.
Provides typed proxy functions.
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Abstract base class for all Ice exceptions defined in Slice.
std::shared_ptr< AsyncRouter > AsyncRouterPtr
A shared pointer to an AsyncRouter.
std::shared_ptr< Router > RouterPtr
A shared pointer to a Router.
Communicate through firewalls and across NATs.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Provides information about an incoming request being dispatched.