Class CServiceClient

Class Documentation

class eCAL::CServiceClient

Service client wrapper class.

Public Functions

CServiceClient()

Constructor.

CServiceClient(const std::string &service_name_)

Constructor.

Parameters
  • service_name_: Unique service name.

~CServiceClient()

Destructor.

CServiceClient(const CServiceClient&) = delete

CServiceClients are non-copyable.

CServiceClient &operator=(const CServiceClient&) = delete

CServiceClients are non-copyable.

bool Create(const std::string &service_name_)

Creates this object.

Return

True if successful.

Parameters
  • service_name_: Unique service name.

bool Destroy()

Destroys this object.

Return

True if successful.

bool SetHostName(const std::string &host_name_)

Change the host name filter for that client instance.

Return

True if successful.

Parameters
  • host_name_: Host name filter (empty or “*” == all hosts)

bool Call(const std::string &method_name_, const std::string &request_)

Call method of this service (none blocking variant with callback).

Return

True if successful.

Parameters
  • method_name_: Method name.

  • request_: Request string.

bool Call(const std::string &host_name_, const std::string &method_name_, const std::string &request_, struct SServiceInfo &service_info_, std::string &response_)

Call method of this service (blocking variant).

Return

True if successful.

Parameters
  • host_name_: Host name.

  • method_name_: Method name.

  • request_: Request string.

  • [out] service_info_: Service info struct for detailed informations.

  • [out] response_: Response string.

bool AddResponseCallback(const ResponseCallbackT &callback_)

Add server response callback.

Return

True if successful.

Parameters
  • callback_: Callback function for server response.

bool RemResponseCallback()

Remove server response callback.

Return

True if successful.