![]() |
![]() |
![]() |
Spread RPC - Reference Manual | ![]() |
---|---|---|---|---|
typedef SPRpc; SPRpc* sp_rpc_new (void); void sp_rpc_ref (SPRpc *rpc); void sp_rpc_unref (SPRpc *rpc); mailbox sp_rpc_get_mailbox (SPRpc *rpc); void sp_rpc_set_mailbox (SPRpc *rpc, mailbox mailbox); const gchar* sp_rpc_get_id (SPRpc *rpc); void sp_rpc_set_id (SPRpc *rpc, gchar *id); gboolean sp_rpc_id_exists (SPRpc *rpc); const gchar* sp_rpc_get_group (SPRpc *rpc); void sp_rpc_set_group (SPRpc *rpc, gchar *group); gboolean sp_rpc_group_exists (SPRpc *rpc);
SPRpc* sp_rpc_new (void);
Creates a new SPRpc that must be initialized before using though the
sp_rpc_set_mailbox()
and the spread functions (SP_connect()
,
SP_join()
, ...).
Use sp_rpc_unref()
to free this data.
Returns : |
a new SPRpc with a reference count of 1. |
void sp_rpc_unref (SPRpc *rpc);
Decreases the reference count of a SPRpc. When its reference count drops to 0, the SPRpc is finalized.
|
a SPRpc |
mailbox sp_rpc_get_mailbox (SPRpc *rpc);
Returns the internal mailbox element of a SPRpc. This mailbox can be used
for the initialization of spread through (SP_connect()
, SP_join()
, ...) or
for the disconnect procedure (SP_disconnect()
, ...).
|
a SPRpc |
Returns : |
the mailbox of the SPRpc object |
void sp_rpc_set_mailbox (SPRpc *rpc, mailbox mailbox);
Sets a new mailbox for a SPRpc. Normally, this function is used with a new mailbox could be connected to the spread ring.
|
a SPRpc |
|
a Spread mailbox, or 0 |
const gchar* sp_rpc_get_id (SPRpc *rpc);
Returns the id string of a SPRpc.
|
a SPRpc |
Returns : |
The id of a SPRpc. This string is owned by the SPRpc and must not be modified or freed. |
void sp_rpc_set_id (SPRpc *rpc, gchar *id);
Sets a new id for a SPRpc.
|
a SPRpc |
|
the id |
gboolean sp_rpc_id_exists (SPRpc *rpc);
Returns TRUE if the id exists into the SPRpc object
|
a SPRpc |
Returns : |
TRUE/FALSE |
const gchar* sp_rpc_get_group (SPRpc *rpc);
Returns the group string of a SPRpc.
|
a SPRpc |
Returns : |
The group of a SPRpc. This string is owned by the SPRpc and must not be modified or freed. |
void sp_rpc_set_group (SPRpc *rpc, gchar *group);
Sets a new group for a SPRpc.
|
a SPRpc |
|
the group |
gboolean sp_rpc_group_exists (SPRpc *rpc);
Returns TRUE if the group exists into the SPRpc object
|
a SPRpc |
Returns : |
TRUE/FALSE |