![]() |
![]() |
![]() |
libinfinity-0.6 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
Result of an asynchronous requestResult of an asynchronous request — Request results for the infinote requests |
#include <libinfinity/common/inf-request-result.h> InfRequestResult; InfRequestResult * inf_request_result_new (gpointer data
,gsize len
); InfRequestResult * inf_request_result_copy (const InfRequestResult *result
); void inf_request_result_free (InfRequestResult *result
); gconstpointer inf_request_result_get (const InfRequestResult *result
,gsize *length
); InfRequestResult * inf_request_result_make_add_node (InfBrowser *browser
,const InfBrowserIter *iter
,const InfBrowserIter *new_node
); void inf_request_result_get_add_node (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
,const InfBrowserIter **new_node
); InfRequestResult * inf_request_result_make_remove_node (InfBrowser *browser
,const InfBrowserIter *iter
); void inf_request_result_get_remove_node (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
); InfRequestResult * inf_request_result_make_explore_node (InfBrowser *browser
,const InfBrowserIter *iter
); void inf_request_result_get_explore_node (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
); InfRequestResult * inf_request_result_make_save_session (InfBrowser *browser
,const InfBrowserIter *iter
); void inf_request_result_get_save_session (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
); InfRequestResult * inf_request_result_make_subscribe_session (InfBrowser *browser
,const InfBrowserIter *iter
,InfSessionProxy *proxy
); void inf_request_result_get_subscribe_session (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
,InfSessionProxy **proxy
); InfRequestResult * inf_request_result_make_subscribe_chat (InfBrowser *browser
,InfSessionProxy *proxy
); void inf_request_result_get_subscribe_chat (const InfRequestResult *result
,InfBrowser **browser
,InfSessionProxy **proxy
); InfRequestResult * inf_request_result_make_query_acl_account_list (InfBrowser *browser
,const InfAclAccount *accounts
,guint n_accounts
,gboolean does_notifications
); void inf_request_result_get_query_acl_account_list (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **accounts
,guint *n_accounts
,gboolean *does_notifications
); InfRequestResult * inf_request_result_make_lookup_acl_accounts (InfBrowser *browser
,const InfAclAccount *accounts
,guint n_accounts
); void inf_request_result_get_lookup_acl_accounts (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **accounts
,guint *n_accounts
); InfRequestResult * inf_request_result_make_create_acl_account (InfBrowser *browser
,const InfAclAccount *account
,InfCertificateChain *certificate
); void inf_request_result_get_create_acl_account (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **account
,InfCertificateChain **certificate
); InfRequestResult * inf_request_result_make_remove_acl_account (InfBrowser *browser
,const InfAclAccount *account
); void inf_request_result_get_remove_acl_account (const InfRequestResult *result
,InfBrowser **browser
,const InfAclAccount **account
); InfRequestResult * inf_request_result_make_query_acl (InfBrowser *browser
,const InfBrowserIter *iter
,const InfAclSheetSet *sheet_set
); void inf_request_result_get_query_acl (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
,const InfAclSheetSet **sheet_set
); InfRequestResult * inf_request_result_make_set_acl (InfBrowser *browser
,const InfBrowserIter *iter
); void inf_request_result_get_set_acl (const InfRequestResult *result
,InfBrowser **browser
,const InfBrowserIter **iter
); InfRequestResult * inf_request_result_make_join_user (InfSessionProxy *proxy
,InfUser *user
); void inf_request_result_get_join_user (const InfRequestResult *result
,InfSessionProxy **proxy
,InfUser **user
);
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.
typedef struct _InfRequestResult InfRequestResult;
InfRequestResult is an opaque data type. You should only access it via the public API functions.
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.
|
The data representing the result of the request. |
|
The length of the data. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
InfRequestResult * inf_request_result_copy (const InfRequestResult *result
);
Creates a copy of result
.
|
A InfRequestResult. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
void inf_request_result_free (InfRequestResult *result
);
Releases all resources associated with result
.
|
A InfRequestResult. |
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.
|
A InfRequestResult. |
|
An output parameter for the length of the result data, or NULL . |
Returns : |
A pointer to the request data. |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node to which a node has been added. |
|
An iterator pointing to the new node. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node to which a node has been added, or NULL . |
|
Output value for the new node, or NULL . |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node to which was removed. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node that has been removed, or NULL . |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node to which was explored. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node that has been explored, or NULL . |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node to which was saved. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node that has been saved, or NULL . |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node to which a subscription was made. |
|
The InfSessionProxy for the subscription. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node that has been subscribed to, or NULL . |
|
Output value for the subscribed session's proxy, or NULL . |
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
.
|
A InfBrowser. |
|
The InfSessionProxy for the subscribed session. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the subscribed session's proxy, or NULL . |
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
.
|
A InfBrowser. |
|
The list of accounts. |
|
The number of items in the account list. |
|
Whether the server notifies the clients about added or removed accounts. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the list of accounts, or NULL . |
|
Output value for the size of the account list, or NULL . |
|
Output value for the flag whether the server notifies
the client about added or removed accounts, or NULL . |
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
.
|
A InfBrowser. |
|
The list of accounts. |
|
The number of entries in the account list. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the list of accounts, or NULL . |
|
Output value for the size of the account list, or NULL . |
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
.
|
A InfBrowser. |
|
The created InfAclAccount. |
|
The certificate which can be used to log into account . |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the created InfAclAccount, or NULL . |
|
Output value for the certificate which can be used to log
into the account, or NULL . |
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
.
|
A InfBrowser. |
|
The removed InfAclAccount. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the removed InfAclAccount, or NULL . |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node whose ACL was queried. |
|
The sheet set for the queried node. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node whose ACL was queried. |
|
Output value for the node's ACL sheets. |
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
.
|
A InfBrowser. |
|
An iterator pointing to the node whose ACL was set. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the browser that made the request, or NULL . |
|
Output value for the node whose ACL was set. |
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
.
|
A InfSessionProxy. |
|
The joined user. |
Returns : |
A new InfRequestResult. Free with inf_request_result_free() . |
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()
.
|
A InfRequestResult: |
|
Output value of the session proxy that made the request, or NULL . |
|
Output value for the joined user. |