Go to the source code of this file.
|
#define | RPCD_SOCKET_ENV "RPCD_SOCKET_LOCATION" |
|
#define | RPCD_SOCKET_LOCATION "unix:///var/run/rpcd.sock" |
|
#define | RPCD_MANAGER_INTERFACE "com.twoporeguys.rpcd.ServiceManager" |
|
#define | RPCD_SERVICE_INTERFACE "com.twoporeguys.rpcd.Service" |
|
|
typedef void(^ | rpcd_service_applier_t) (const char *_Nonnull name, const char *_Nullable description) |
|
◆ rpcd_connect_to()
_Nullable rpc_client_t rpcd_connect_to |
( |
const char *_Nullable |
rpcd_uri, |
|
|
const char *_Nonnull |
service_name |
|
) |
| |
Looks up a service with given name and connects to it.
- Parameters
-
rpcd_uri | URI of the rpcd server |
service_name | FQDN name of the service |
- Returns
- RPC client handle or NULL in case of an error
◆ rpcd_register()
int rpcd_register |
( |
const char *_Nonnull |
uri, |
|
|
const char *_Nonnull |
name, |
|
|
const char *_Nullable |
description |
|
) |
| |
◆ rpcd_services_apply()
int rpcd_services_apply |
( |
const char *_Nullable |
rpcd_uri, |
|
|
_Nonnull rpcd_service_applier_t |
applier |
|
) |
| |
Iterates through services found on a rpcd server at rpcd_uri
.
- Parameters
-
rpcd_uri | URI of the rpcd server |
applier | Callback block called for every service count |
- Returns
- 0 on success, -1 on error
◆ rpcd_unregister()
int rpcd_unregister |
( |
const char *_Nonnull |
name | ) |
|