![]() |
![]() |
![]() |
libinfinity-0.5 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
void (*InfcRequestManagerForeachFunc) (InfcRequest *Param1
,gpointer Param2
); InfcRequestManager; InfcRequestManagerClass; InfcRequestManager * infc_request_manager_new (guint seq_id
); InfcRequest * infc_request_manager_add_request (InfcRequestManager *manager
,GType request_type
,const gchar *request_name
,const gchar *first_property_name
,...
); InfcRequest * infc_request_manager_add_request_valist (InfcRequestManager *manager
,GType request_type
,const gchar *request_name
,const gchar *first_property_name
,va_list arglist
); void infc_request_manager_remove_request (InfcRequestManager *manager
,InfcRequest *request
); void infc_request_manager_fail_request (InfcRequestManager *manager
,InfcRequest *request
,GError *error
); void infc_request_manager_clear (InfcRequestManager *manager
); InfcRequest * infc_request_manager_get_request_by_seq (InfcRequestManager *manager
,guint seq
); InfcRequest * infc_request_manager_get_request_by_xml (InfcRequestManager *manager
,const gchar *name
,xmlNodePtr xml
,GError **error
); InfcRequest * infc_request_manager_get_request_by_xml_required (InfcRequestManager *manager
,const gchar *name
,xmlNodePtr xml
,GError **error
); void infc_request_manager_foreach_request (InfcRequestManager *manager
,InfcRequestManagerForeachFunc func
,gpointer user_data
); void infc_request_manager_foreach_named_request (InfcRequestManager *manager
,const gchar *name
,InfcRequestManagerForeachFunc func
,gpointer user_data
);
void (*InfcRequestManagerForeachFunc) (InfcRequest *Param1
,gpointer Param2
);
|
|
|
typedef struct { GObjectClass parent_class; void (*request_add)(InfcRequestManager* manager, InfcRequest* request); void (*request_remove)(InfcRequestManager* manager, InfcRequest* request); } InfcRequestManagerClass;
InfcRequestManager * infc_request_manager_new (guint seq_id
);
Creates a new InfcRequestManager.
|
The local sequence ID. |
Returns : |
A newly allocated InfcRequestManager. |
InfcRequest * infc_request_manager_add_request (InfcRequestManager *manager
,GType request_type
,const gchar *request_name
,const gchar *first_property_name
,...
);
Adds a request to the request manager.
|
A InfcRequestManager. |
|
The type of request to add, such as INFC_TYPE_NODE_REQUEST .
|
|
The name of the request, such as "explore-node" or "subscribe-session". |
|
The first property name apart from name and seq to set for the new request. |
|
The value of the first property, followed optionally by more
name/value pairs, followed by NULL .
|
Returns : |
The generated InfcRequest (actually of type request_type ).
|
InfcRequest * infc_request_manager_add_request_valist (InfcRequestManager *manager
,GType request_type
,const gchar *request_name
,const gchar *first_property_name
,va_list arglist
);
Adds a request to the request manager.
|
A InfcRequestManager. |
|
The type of request to add, such as INFC_TYPE_NODE_REQUEST .
|
|
The name of the request, such as "explore-node" or "subscribe-session" |
|
The first property name apart from name and seq to set for the new request. |
|
The value of the first property, followed optionally by more
name/value pairs, followed by NULL .
|
Returns : |
The generated InfcRequest (actually of type request_type ).
|
void infc_request_manager_remove_request (InfcRequestManager *manager
,InfcRequest *request
);
Removes a request from the request manager.
|
A InfcRequestManager. |
|
A InfcRequest that has previously been added to manager .
|
void infc_request_manager_fail_request (InfcRequestManager *manager
,InfcRequest *request
,GError *error
);
Emits the "failed" signal on request
and then removes the request from
the manager.
|
A InfcRequestManager. |
|
A InfcRequest that has previously been added to manager .
|
|
Error information why the request failed. |
void infc_request_manager_clear (InfcRequestManager *manager
);
Removes all the requests in manager
.
|
A InfcRequestManager. |
InfcRequest * infc_request_manager_get_request_by_seq (InfcRequestManager *manager
,guint seq
);
Returns a previously-added request that has the given seq.
|
A InfcRequestManager. |
|
The sequence number to which the request should be retrieved. |
Returns : |
The request with the given seq, or NULL if there is no such
request.
|
InfcRequest * infc_request_manager_get_request_by_xml (InfcRequestManager *manager
,const gchar *name
,xmlNodePtr xml
,GError **error
);
Looks whether there is a "seq" attribute in xml
. If not, the function
returns NULL
(without setting error
). Otherwise, it returns the request
with the given seq and name, if the sequence ID matches. If the "seq"
attribute is set but the actual request is not present (or has another
name), the function returns NULL
and error
is set.
|
A InfcRequestManager. |
|
Name of the expected request. May be NULL to allow all requests.
|
|
XML node that is supposed to contain a "seq" attribute. |
|
Location to store error information. |
Returns : |
The resulting request, or NULL if the "seq" attribute was
not present or an error occured.
|
InfcRequest * infc_request_manager_get_request_by_xml_required (InfcRequestManager *manager
,const gchar *name
,xmlNodePtr xml
,GError **error
);
Looks whether there is a "seq" attribute in xml
. If so, it returns the
request with the given seq and name, if the sequence ID matches. If the
"seq" attribute is not set or the actual request is not present (or has
another name), the function returns NULL
and error
is set.
|
A InfcRequestManager. |
|
Name of the expected request. May be NULL to allow all requests.
|
|
XML node that is supposed to contain a "seq" attribute. |
|
Location to store error information. |
Returns : |
The resulting request, or NULL if an error occured.
|
void infc_request_manager_foreach_request (InfcRequestManager *manager
,InfcRequestManagerForeachFunc func
,gpointer user_data
);
Calls the given function for each request that has been added to the request manager.
|
A InfcRequestManager. |
|
The function to be called. |
|
Arbitrary data to be passed to func .
|
void infc_request_manager_foreach_named_request (InfcRequestManager *manager
,const gchar *name
,InfcRequestManagerForeachFunc func
,gpointer user_data
);
Calls the given function for each request that has been added to the
request manager that has the name name
.
|
A InfcRequestManager. |
|
The name of the request to look for. |
|
The function to be called. |
|
Arbitrary data to be passed to func .
|
"request-add"
signalvoid user_function (InfcRequestManager *infcrequestmanager, InfcRequest *arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"request-remove"
signalvoid user_function (InfcRequestManager *infcrequestmanager, InfcRequest *arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |