Callbacks¶
| AdoptedStateVectorForeachFunc(id, value, *user_data) | |
| AsyncOperationDoneFunc(run_data, *user_data) | |
| AsyncOperationRunFunc(run_data, run_notify, *user_data) | |
| DiscoveryResolvCompleteFunc(info, connection, error, *user_data) | |
| FileListFunc(name, path, type, *user_data) | |
| IoDispatchFunc(*user_data) | |
| IoTimeoutFunc(*user_data) | |
| IoWatchFunc(socket, event, *user_data) | |
| RequestFunc(request, result, error, *user_data) | |
| SaslContextCallbackFunc(session, property, session_data, *user_data) | |
| SaslContextSessionFeedFunc(session, data, needs_more, error, *user_data) | |
| UserTableForeachUserFunc(user, *user_data) | 
Details¶
- 
Infinity.AdoptedStateVectorForeachFunc(id, value, *user_data)¶
- Parameters: - id (int) – The ID of the entry.
- value (int) – The value of the entry.
- user_data (objectorNone) – The user data passed toInfinity.AdoptedStateVector.foreach().
 - This function is called for every component in the state vector during the invocation of - Infinity.AdoptedStateVector.foreach().
- id (
- 
Infinity.AsyncOperationDoneFunc(run_data, *user_data)¶
- Parameters: - run_data (objectorNone) – The result of the asynchronous operation.
- user_data (objectorNone) – Data passed inInfinity.AsyncOperation.new().
 - This function is called in the main thread once the asynchronous operation has finished. 
- run_data (
- 
Infinity.AsyncOperationRunFunc(run_data, run_notify, *user_data)¶
- Parameters: - run_data (objectorNone) – Location where to write the result of the asynchronous operation.
- run_notify (GLib.DestroyNotify) – Function to be used to free run_data, orNone.
- user_data (objectorNone) – Data passed inInfinity.AsyncOperation.new().
 - This function performs the asynchronous task and is executed in a separate thread. The pointer written into run_data is passed back to the main thread after the function has finished executing. 
- run_data (
- 
Infinity.DiscoveryResolvCompleteFunc(info, connection, error, *user_data)¶
- Parameters: - info (Infinity.DiscoveryInfo) – The resolvedInfinity.DiscoveryInfo.
- connection (Infinity.XmlConnection) – The resultingInfinity.XmlConnection.
- error (GLib.Error) – Reason in case of failure.
- user_data (objectorNone) – The user_data passed toInfinity.Discovery.resolve().
 - This callback is called when a call to - Infinity.Discovery.resolve() finished.
- info (
- 
Infinity.FileListFunc(name, path, type, *user_data)¶
- Parameters: - name (str) – The name of the current file.
- path (str) – The full path to the current file.
- type (Infinity.FileType) – The type of the current file.
- user_data (objectorNone) – User data specified at the time of the call.
 - Returns: - Trueif the iteration should be continued or- Falseotherwise.- Return type: - This is the prototype of the callback function passed to - Infinity.file_util_list_directory(). If the function returns- Falsethen directory traversal is stopped immediately. In addition error can be set and it is propagated to the caller of- Infinity.file_util_list_directory().
- name (
- 
Infinity.IoDispatchFunc(*user_data)¶
- Parameters: - user_data ( - objector- None) – User-defined data specified in- Infinity.Io.add_dispatch().- Callback function that is called when a dispatch is executed by the thread that runs - Infinity.Io.
- 
Infinity.IoTimeoutFunc(*user_data)¶
- Parameters: - user_data ( - objector- None) – User-defined data specified in- Infinity.Io.add_timeout().- Callback function that is called when a timeout has elapsed. 
- 
Infinity.IoWatchFunc(socket, event, *user_data)¶
- Parameters: - socket ([int]) – The socket on which an event occurred.
- event (Infinity.IoEvent) – A bitmask of the events that occurred.
- user_data (objectorNone) – User-defined data specified inInfinity.Io.add_watch().
 - Callback function that is called when an event occurs on a watched socket. 
- socket ([
- 
Infinity.RequestFunc(request, result, error, *user_data)¶
- Parameters: - request (Infinity.Request) – TheInfinity.Requestthat emits the signal.
- result (Infinity.RequestResult) – AInfinity.RequestResultwhich contains the result of the request.
- error (GLib.Error) – Error information in case the request failed, orNoneotherwise.
- user_data (objectorNone) – Additional data set when the signal handler was connected.
 - Signature of a signal handler for the - Infinity.Request- ::finishedsignal.
- request (
- 
Infinity.SaslContextCallbackFunc(session, property, session_data, *user_data)¶
- Parameters: - session (Infinity.SaslContextSession) – AInfinity.SaslContextSession.
- property (int) – The property requested.
- session_data (objectorNone) – The session data for session specified inInfinity.SaslContext.server_start_session() orInfinity.SaslContext.client_start_session().
- user_data (objectorNone) – The user data specified inInfinity.SaslContext.set_callback().
 - This callback is called whenever a property is required to proceed with authentication. For example, when a password is required, the callback is called with property set to %GSASL_PASSCODE. - The function is then expected to set that property using - Infinity.SaslContextSession.set_property() and, once it is done, call- Infinity.SaslContextSession.continue_(). This can happen fully asynchronously, that is it does not need to take place directly within the callback but the callback can, for example, open a dialog for the user to enter a password and then once the user closes the dialog call the two functions mentioned above.
- session (
- 
Infinity.SaslContextSessionFeedFunc(session, data, needs_more, error, *user_data)¶
- Parameters: - session (Infinity.SaslContextSession) – AInfinity.SaslContextSession.
- data (str) – The response to the fed data, base64 encoded and null-terminated.
- needs_more (bool) – IfTruethenInfinity.SaslContextSession.feed() needs to be called again with more data, otherwise the authentication has finished.
- error (GLib.Error) – This is nonzero if an error occurred while processing the input data.
- user_data (objectorNone) – The user data specified inInfinity.SaslContextSession.feed().
 - This function is called in response to - Infinity.SaslContextSession.feed(). When all required properties (if any) have been provided by the callback function then this function is called with the response to send to the remote site.- If an error occurred then error will be set and data will be - None.
- session (
- 
Infinity.UserTableForeachUserFunc(user, *user_data)¶
- Parameters: - user (Infinity.User) – TheInfinity.Userfor the current iteration.
- user_data (objectorNone) – The user_data passed toInfinity.UserTable.foreach_user() orInfinity.UserTable.foreach_local_user().
 - This callback is called for every user iterated by - Infinity.UserTable.foreach_user() or- Infinity.UserTable.foreach_local_user().
- user (