|
libqi-api
release-2.5.3-2016-11-18
|
#include <session.hpp>
Public Types | |
| enum | ServiceLocality { ServiceLocality_All = 0, ServiceLocality_Local = 1, ServiceLocality_Remote = 2 } |
Public Member Functions | |
| Session (bool enforceAuthentication=false) | |
| virtual | ~Session () |
| qi::FutureSync< void > | connect (const char *serviceDirectoryURL) |
| qi::FutureSync< void > | connect (const std::string &serviceDirectoryURL) |
| qi::FutureSync< void > | connect (const qi::Url &serviceDirectoryURL) |
| bool | isConnected () const |
| qi::Url | url () const |
| qi::FutureSync< std::vector < ServiceInfo > > | services (ServiceLocality locality=ServiceLocality_All) |
| qi::FutureSync< qi::AnyObject > | service (const std::string &aservice) |
| qi::FutureSync< qi::AnyObject > | service (const std::string &service, const std::string &protocol) |
| qi::FutureSync< void > | listen (const qi::Url &address) |
| std::vector< qi::Url > | endpoints () const |
| bool | setIdentity (const std::string &key, const std::string &crt) |
| qi::FutureSync< void > | close () |
| qi::FutureSync< void > | listenStandalone (const qi::Url &address) |
| qi::FutureSync< unsigned int > | registerService (const std::string &name, AnyObject object) |
| qi::FutureSync< void > | unregisterService (unsigned int serviceId) |
| void | setAuthProviderFactory (AuthProviderFactoryPtr) |
| void | setClientAuthenticatorFactory (ClientAuthenticatorFactoryPtr) |
| void | loadService (const std::string &moduleName, const std::string &renameModule="", const AnyReferenceVector &args=AnyReferenceVector()) |
| template<typename T > | |
| qi::FutureSync< T > | callModule (const std::string &moduleName, const AnyReferenceVector &args=AnyReferenceVector()) |
| qi::FutureSync< void > | waitForService (const std::string &service) |
Public Attributes | |
| qi::Signal< unsigned int, std::string > | serviceRegistered |
| qi::Signal< unsigned int, std::string > | serviceUnregistered |
| qi::Signal | connected |
| qi::Signal< std::string > | disconnected |
Protected Attributes | |
| boost::shared_ptr< SessionPrivate > | _p |
Friends | |
| class | SessionPrivate |
A Session allows you to interconnect services on the same machine or over the network.
Definition at line 37 of file session.hpp.
| Enumerator | |
|---|---|
| ServiceLocality_All | |
| ServiceLocality_Local | |
| ServiceLocality_Remote | |
Definition at line 42 of file session.hpp.
| qi::Session::Session | ( | bool | enforceAuthentication = false | ) |
|
virtual |
|
inline |
Load a module and call the specified function asynchronously
Tries to call the function with (this, args...) if possible, otherwise it calls it with (args...) only.
Definition at line 97 of file session.hpp.
| qi::FutureSync<void> qi::Session::close | ( | ) |
| qi::FutureSync<void> qi::Session::connect | ( | const char * | serviceDirectoryURL | ) |
| qi::FutureSync<void> qi::Session::connect | ( | const std::string & | serviceDirectoryURL | ) |
| qi::FutureSync<void> qi::Session::connect | ( | const qi::Url & | serviceDirectoryURL | ) |
| std::vector<qi::Url> qi::Session::endpoints | ( | ) | const |
| bool qi::Session::isConnected | ( | ) | const |
| qi::FutureSync<void> qi::Session::listen | ( | const qi::Url & | address | ) |
| qi::FutureSync<void> qi::Session::listenStandalone | ( | const qi::Url & | address | ) |
| void qi::Session::loadService | ( | const std::string & | moduleName, |
| const std::string & | renameModule = "", |
||
| const AnyReferenceVector & | args = AnyReferenceVector() |
||
| ) |
Load a module and register the specified object on the session
Tries to call the factory with (this, args...) if possible, otherwise it calls it with (args...) only.
| qi::FutureSync<unsigned int> qi::Session::registerService | ( | const std::string & | name, |
| AnyObject | object | ||
| ) |
|
inline |
Definition at line 57 of file session.hpp.
| qi::FutureSync< qi::AnyObject > qi::Session::service | ( | const std::string & | service, |
| const std::string & | protocol | ||
| ) |
| qi::FutureSync< std::vector<ServiceInfo> > qi::Session::services | ( | ServiceLocality | locality = ServiceLocality_All | ) |
| void qi::Session::setAuthProviderFactory | ( | AuthProviderFactoryPtr | ) |
| void qi::Session::setClientAuthenticatorFactory | ( | ClientAuthenticatorFactoryPtr | ) |
| bool qi::Session::setIdentity | ( | const std::string & | key, |
| const std::string & | crt | ||
| ) |
| qi::FutureSync<void> qi::Session::unregisterService | ( | unsigned int | serviceId | ) |
| qi::Url qi::Session::url | ( | ) | const |
| qi::FutureSync<void> qi::Session::waitForService | ( | const std::string & | service | ) |
Waits for a service to become available. The future is set immediately if the service is already available.
|
friend |
Definition at line 149 of file session.hpp.
|
protected |
Definition at line 150 of file session.hpp.
| qi::Signal qi::Session::connected |
Definition at line 144 of file session.hpp.
| qi::Signal<std::string> qi::Session::disconnected |
Definition at line 146 of file session.hpp.
| qi::Signal<unsigned int, std::string> qi::Session::serviceRegistered |
Definition at line 141 of file session.hpp.
| qi::Signal<unsigned int, std::string> qi::Session::serviceUnregistered |
Definition at line 142 of file session.hpp.