Top | ![]() |
![]() |
![]() |
![]() |
Result of an asynchronous requestResult of an asynchronous request — Request results for the infinote requests |
These functions allow to create InfRequestResult objects and to extract the resulting values from them. In general, all objects in a InfRequestResult are not referenced and must point to an existing reference which is guaranteed to live as long as the InfRequestResult object stays alive. This is typically the case for the primary use case of InfRequestResult, which is to serve as a common parameter for the “finished” signal.
InfRequestResult * inf_request_result_new (gpointer data
,gsize len
);
This function creates a new InfRequestResult with the given data. The
function takes ownership of the data which must have been allocated with
g_malloc()
. The memory segment at data
must not hold any object references
or require deinitialization in a way other than with g_free()
.
Under normal circumstances, this function should not be used, and instead one of the inf_request_result_make_*() functions should be used.
[constructor]
InfRequestResult *
inf_request_result_copy (const InfRequestResult *result
);
Creates a copy of result
.
void
inf_request_result_free (InfRequestResult *result
);
Releases all resources associated with result
.
gconstpointer inf_request_result_get (const InfRequestResult *result
,gsize *length
);
Returns the data of result
, as given to inf_request_result_new()
. The
length of the data is stored in length
. Normally this function does not
need to be used and one of the inf_request_result_get_*() functions
should be used instead.
InfRequestResult * inf_request_result_make_add_node (InfBrowser *browser
,const InfBrowserIter *iter
,const InfBrowserIter *new_node
);
Creates a new InfRequestResult for an "add-node" request, see
inf_browser_add_note()
or inf_browser_add_subdirectory()
. The
InfRequestResult object is only valid as long as the caller maintains
a reference to browser
.
browser |
A InfBrowser. |
|
iter |
An iterator pointing to the node to which a node has been added. |
|
new_node |
An iterator pointing to the new node. |
void inf_request_result_get_add_node (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
,const InfBrowserIter **new_node
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_add_node()
.
result |
||
browser |
Output value of the browser
that made the request, or |
[out][allow-none][transfer none] |
iter |
Output value for the node to
which a node has been added, or |
[out][allow-none][transfer none] |
new_node |
Output value for the
new node, or |
[out][allow-none][transfer none] |
InfRequestResult * inf_request_result_make_remove_node (InfBrowser *browser
,const InfBrowserIter *iter
);
Creates a new InfRequestResult for an "remove-node" request, see
inf_browser_remove_node()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
.
void inf_request_result_get_remove_node (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_remove_node()
.
InfRequestResult * inf_request_result_make_explore_node (InfBrowser *browser
,const InfBrowserIter *iter
);
Creates a new InfRequestResult for an "explore-node" request, see
inf_browser_explore()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
.
void inf_request_result_get_explore_node (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_explore_node()
.
InfRequestResult * inf_request_result_make_save_session (InfBrowser *browser
,const InfBrowserIter *iter
);
Creates a new InfRequestResult for a "save-session" request, see
infc_browser_iter_save_session()
. The InfRequestResult object is only
valid as long as the caller maintains a reference to browser
.
void inf_request_result_get_save_session (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_save_session()
.
InfRequestResult * inf_request_result_make_subscribe_session (InfBrowser *browser
,const InfBrowserIter *iter
,InfSessionProxy *proxy
);
Creates a new InfRequestResult for a "subscribe-session" request, see
inf_browser_subscribe()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
and proxy
.
browser |
A InfBrowser. |
|
iter |
An iterator pointing to the node to which a subscription was made. |
|
proxy |
The InfSessionProxy for the subscription. |
void inf_request_result_get_subscribe_session (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
,InfSessionProxy **proxy
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_subscribe_session()
.
result |
||
browser |
Output value of the browser
that made the request, or |
[out][allow-none][transfer none] |
iter |
Output value for the node that
has been subscribed to, or |
[out][allow-none][transfer none] |
proxy |
Output value for the subscribed
session's proxy, or |
[out][allow-none][transfer none] |
InfRequestResult * inf_request_result_make_subscribe_chat (InfBrowser *browser
,InfSessionProxy *proxy
);
Creates a new InfRequestResult for a "subscribe-chat" request, see
infc_browser_subscribe_chat()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
and proxy
.
void inf_request_result_get_subscribe_chat (const InfRequestResult *result
,InfBrowser **browser
,InfSessionProxy **proxy
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_subscribe_chat()
.
InfRequestResult * inf_request_result_make_query_acl_account_list (InfBrowser *browser
,const InfAclAccount *accounts
,guint n_accounts
,gboolean does_notifications
);
Creates a new InfRequestResult for a "query-acl-account-list" request, see
inf_browser_query_acl_account_list()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
.
browser |
A InfBrowser. |
|
accounts |
The list of accounts. |
[array length=n_accounts] |
n_accounts |
The number of items in the account list. |
|
does_notifications |
Whether the server notifies the clients about added or removed accounts. |
void inf_request_result_get_query_acl_account_list (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **accounts
,guint *n_accounts
,gboolean *does_notifications
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_query_acl_account_list()
.
result |
||
browser |
Output value of the browser
that made the request, or |
[out][transfer none][allow-none] |
accounts |
Output value for the list of accounts, or |
[out][array length=n_accounts][transfer none][allow-none] |
n_accounts |
Output value for the size
of the account list, or |
[out][transfer none][allow-none] |
does_notifications |
Output value for the flag whether the server notifies
the client about added or removed accounts, or |
InfRequestResult * inf_request_result_make_lookup_acl_accounts (InfBrowser *browser
,const InfAclAccount *accounts
,guint n_accounts
);
Creates a new InfRequestResult for a "lookup-acl-accounts" request, see
inf_browser_lookup_acl_accounts()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
.
browser |
A InfBrowser. |
|
accounts |
The list of accounts. |
[array length=n_accounts] |
n_accounts |
The number of entries in the account list. |
void inf_request_result_get_lookup_acl_accounts (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **accounts
,guint *n_accounts
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_lookup_acl_accounts()
.
result |
||
browser |
Output value of the browser
that made the request, or |
[out][transfer none][allow-none] |
accounts |
Output value for the list of accounts, or |
[out][transfer none][allow-none][array length=n_accounts] |
n_accounts |
Output value for the size
of the account list, or |
[out][transfer none][allow-none] |
InfRequestResult * inf_request_result_make_create_acl_account (InfBrowser *browser
,const InfAclAccount *account
,InfCertificateChain *certificate
);
Creates a new InfRequestResult for a "create-acl-account" request, see
inf_browser_create_acl_account()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
.
browser |
A InfBrowser. |
|
account |
The created InfAclAccount. |
|
certificate |
The certificate which can be used to log into |
[transfer none] |
void inf_request_result_get_create_acl_account (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **account
,InfCertificateChain **certificate
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_create_acl_account()
.
result |
||
browser |
Output value of the browser
that made the request, or |
[out][transfer none][allow-none] |
account |
Output value for the created
InfAclAccount, or |
[out][transfer none][allow-none] |
certificate |
Output value for the
certificate which can be used to log into the account, or |
[out][transfer none][allow-none] |
InfRequestResult * inf_request_result_make_remove_acl_account (InfBrowser *browser
,const InfAclAccount *account
);
Creates a new InfRequestResult for a "remove-acl-account" request, see
inf_browser_remove_acl_account()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
.
void inf_request_result_get_remove_acl_account (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **account
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_remove_acl_account()
.
result |
||
browser |
Output value of the browser
that made the request, or |
[out][transfer none][allow-none] |
account |
Output value for the removed
InfAclAccount, or |
[out][transfer none][allow-none] |
InfRequestResult * inf_request_result_make_query_acl (InfBrowser *browser
,const InfBrowserIter *iter
,const InfAclSheetSet *sheet_set
);
Creates a new InfRequestResult for a "query-acl" request, see
inf_browser_query_acl()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
and proxy
.
browser |
A InfBrowser. |
|
iter |
An iterator pointing to the node whose ACL was queried. |
|
sheet_set |
The sheet set for the queried node. |
void inf_request_result_get_query_acl (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
,const InfAclSheetSet **sheet_set
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_query_acl()
.
InfRequestResult * inf_request_result_make_set_acl (InfBrowser *browser
,const InfBrowserIter *iter
);
Creates a new InfRequestResult for a "set-acl" request, see
inf_browser_set_acl()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to browser
and proxy
.
void inf_request_result_get_set_acl (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_set_acl()
.
InfRequestResult * inf_request_result_make_join_user (InfSessionProxy *proxy
,InfUser *user
);
Creates a new InfRequestResult for a "join-user" request, see
inf_session_proxy_join_user()
. The InfRequestResult object is only valid
as long as the caller maintains a reference to proxy
.
void inf_request_result_get_join_user (const InfRequestResult *result
,InfSessionProxy **proxy
,InfUser **user
);
Decomposes result
into its components. The object must have been created
with inf_request_result_make_join_user()
.
typedef struct _InfRequestResult InfRequestResult;
InfRequestResult is an opaque data type. You should only access it via the public API functions.