AudioManager
7.6.6
Native Application Runtime Environment
|
#include <CAmCommonAPIWrapper.h>
Public Member Functions | |
virtual | ~CAmCommonAPIWrapper () |
CAmSocketHandler * | getSocketHandler () const |
Getter for the socket handler. More... | |
template<class TStubImp > | |
bool | registerService (const std::shared_ptr< TStubImp > &shStub, const std::string &domain, const std::string &instance) |
Register stub objects. More... | |
bool | unregisterService (const std::string &domain, const std::string &interface, const std::string &instance) |
Unregister stub objects. More... | |
template<class TStubImp > | |
bool | __attribute__ ((deprecated)) registerStub(const std |
Deprecated method. More... | |
bool | __attribute__ ((deprecated)) unregisterStub(const std |
Deprecated method. More... | |
template<template< typename... > class ProxyClass, typename... AttributeExtensions> | |
std::shared_ptr< ProxyClass< AttributeExtensions... > > | buildProxy (const std::string &domain, const std::string &instance) |
Build proxy objects. More... | |
template<template< typename... > class ProxyClass, typename... AttributeExtensions> | |
std::shared_ptr< ProxyClass< AttributeExtensions... > > | __attribute__ ((deprecated)) buildProxy(const std |
Deprecated method. More... | |
Static Public Member Functions | |
static CAmCommonAPIWrapper * | getInstance () |
Returns an already instantiated object. More... | |
static void | deleteInstance () |
Deletes the instanciated object. More... | |
static CAmCommonAPIWrapper * | instantiateOnce (CAmSocketHandler *socketHandler, const std::string &applicationName="") |
Creates a singleton instance attached to the provided socket handler object. More... | |
Protected Member Functions | |
CAmCommonAPIWrapper (CAmSocketHandler *socketHandler, const std::string &applicationName="") | |
Definition at line 49 of file CAmCommonAPIWrapper.h.
|
protected |
Definition at line 39 of file CAmCommonAPIWrapper.cpp.
|
virtual |
Definition at line 73 of file CAmCommonAPIWrapper.cpp.
|
inline |
Deprecated method.
Instead you should use bool registerService(const std::shared_ptr<TStubImp> & shStub, const std::string & domain, const std::string & instance).
Register stub objects.
Example: std::shared_ptr<ConcreteStubClass> aStub; registerService( aStub, "local:com.your_company.interface_name:com.your_company.instance_name");
shStub | Shared pointer to a stub instance |
address | Complete common-api address as example "local:com.your_company.interface_name:com.your_company.instance_name" |
Definition at line 195 of file CAmCommonAPIWrapper.h.
|
inline |
Deprecated method.
Instead you should use bool unregisterService(const std::string &domain, const std::string &interface, const std::string &instance).
Unregister stub objects.
address | Complete common-api address as example "local:com.your_company.interface_name:com.your_company.instance_name" |
Definition at line 211 of file CAmCommonAPIWrapper.h.
|
inline |
Deprecated method.
Instead you should use buildProxy(const std::string &domain, const std::string &instance).
Build proxy objects. Example: std::shared_ptr<AProxyClass<>> aProxy = buildProxy<AProxyClass>("local:com.your_company.interface_name:com.your_company.instance_name");
address | Complete common-api address as example "local:com.your_company.interface_name:com.your_company.instance_name" |
Definition at line 266 of file CAmCommonAPIWrapper.h.
|
inline |
Build proxy objects.
Example: std::shared_ptr<AProxyClass<>> aProxy = buildProxy<AProxyClass>("local", "com.your_company.instance_name");
domain | A string with the domain name, usually "local" |
instance | Common-api instance string as example "com.your_company.instance_name" |
Definition at line 249 of file CAmCommonAPIWrapper.h.
|
static |
Deletes the instanciated object.
Definition at line 97 of file CAmCommonAPIWrapper.cpp.
|
static |
Returns an already instantiated object.
This method should be called after the instantiateOnce(...) has been called with non null socket handler parameter.
Definition at line 112 of file CAmCommonAPIWrapper.cpp.
|
inline |
Getter for the socket handler.
Definition at line 135 of file CAmCommonAPIWrapper.h.
|
static |
Creates a singleton instance attached to the provided socket handler object.
This method should be called only once because it instantiates a single object. Otherwise it will throw an exception. The first call of this method with non null parameter loads the common-api and attaches it to the main loop.
socketHandler | A pointer to socket handler or NULL |
Definition at line 83 of file CAmCommonAPIWrapper.cpp.
|
inline |
Register stub objects.
Example: std::shared_ptr<ConcreteStubClass> aStub; registerService( aStub, "local", "com.your_company.instance_name");
shStub | Shared pointer to a stub instance |
domain | A string with the domain name, usually "local" |
instance | Common-api instance string as example "com.your_company.instance_name" |
Definition at line 165 of file CAmCommonAPIWrapper.h.
|
inline |
Unregister stub objects.
domain | A string with the domain name, usually "local" |
interface | Common-api interface string as example "com.your_company.interface_name" |
instance | Common-api instance string as example "com.your_company.instance_name" |
Definition at line 178 of file CAmCommonAPIWrapper.h.