Back to Seed Clases

Gio


Classes

Interfaces

Structs

Unions

Enums

Interface Gio.AsyncResult

Import line: Gio = imports.gi.Gio;
GIR File: Gio-2.0.gir
C documentation: GAsyncResult
Interface : AsyncResult
Implementations: Gio.SimpleAsyncResult
Provides a base class for implementing asynchronous function results.
Asynchronous operations are broken up into two separate operations
which are chained together by a GAsyncReadyCallback. To begin
an asynchronous operation, provide a GAsyncReadyCallback to the
asynchronous function. This callback will be triggered when the
operation has completed, and will be passed a GAsyncResult instance
filled with the details of the operation's success or failure, the
object the asynchronous function was started for and any error codes
returned. The asynchronous callback function is then expected to call
the corresponding "_finish()" function, passing the object the
function was called for, the GAsyncResult instance, and (optionally)
an error to grab any error conditions that may have occurred.
The "_finish()" function for an operation takes the generic result
(of type GAsyncResult) and returns the specific result that the
operation in question yields (e.g. a GFileEnumerator for a
"enumerate children" operation). If the result or error status of the
operation is not needed, there is no need to call the "_finish()"
function; GIO will take care of cleaning up the result and error
information after the GAsyncReadyCallback returns. Applications may
also take a reference to the GAsyncResult and call "_finish()"
later; however, the "_finish()" function may be called at most once.
Example of a typical asynchronous operation flow:
|[
void _theoretical_frobnitz_async (Theoretical *t,
GCancellable *c,
GAsyncReadyCallback *cb,
gpointer u);
gboolean _theoretical_frobnitz_finish (Theoretical *t,
GAsyncResult *res,
GError **e);
static void
frobnitz_result_func (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
gboolean success = FALSE;
success = _theoretical_frobnitz_finish (source_object, res, NULL);
if (success)
g_printf ("Hurray!\n");
else
g_printf ("Uh oh!\n");
/* ... */
}
int main (int argc, void *argv[])
{
/* ... */
_theoretical_frobnitz_async (theoretical_data,
NULL,
frobnitz_result_func,
NULL);
/* ... */
}
]|
The callback for an asynchronous operation is called only once, and is
always called, even in the case of a cancelled operation. On cancellation
the result is a G_IO_ERROR_CANCELLED error.
Some asynchronous operations are implemented using synchronous calls.
These are run in a separate thread, if GThread has been initialized, but
otherwise they are sent to the Main Event Loop and processed in an idle
function. So, if you truly need asynchronous operations, make sure to
initialize GThread.
Properties
None
Methods / Constructors
Method / Constructor Defined By
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
GdkPixbuf.Pixbuf
Method
new GdkPixbuf.Pixbuf.from_stream_finish (AsyncResult async_result) : GdkPixbuf.Pixbuf
Create a new GdkPixbuf.Pixbuf
GdkPixbuf.Pixbuf
Method
GdkPixbuf.Pixbuf.save_to_stream_finish (AsyncResult async_result) : gboolean
Finishes an asynchronous pixbuf save operation started with
gdk_pixbuf_save_to_stream_async().
Gio
Method
Gio.bus_get_finish (AsyncResult res) : Gio.DBusConnection
Finishes an operation started with g_bus_get().
Gio
Method
Gio.dbus_address_get_stream_finish (AsyncResult res, String out_guid) : Gio.IOStream
Finishes an operation started with g_dbus_address_get_stream().
Gio.AsyncInitable
Method
init_finish (AsyncResult res) : gboolean
Finishes asynchronous initialization and returns the result.
Gio.AsyncInitable
Method
new_finish (AsyncResult res) : GObject.Object
Finishes the async construction for the various g_async_initable_new calls,
returning the created object or NULL on error.
Gio.BufferedInputStream
Method
fill_finish (AsyncResult result) : gint32
Finishes an asynchronous read.
Gio.DBusConnection
Method
new Gio.DBusConnection.finish (AsyncResult res) : Gio.DBusConnection
Create a new Gio.DBusConnection
Gio.DBusConnection
Method
new Gio.DBusConnection.for_address_finish (AsyncResult res) : Gio.DBusConnection
Create a new Gio.DBusConnection
Gio.DBusConnection
Method
call_finish (AsyncResult res) : GLib.Variant
Finishes an operation started with g_dbus_connection_call().
Gio.DBusConnection
Method
close_finish (AsyncResult res) : gboolean
Finishes an operation started with g_dbus_connection_close().
Gio.DBusConnection
Method
flush_finish (AsyncResult res) : gboolean
Finishes an operation started with g_dbus_connection_flush().
Gio.DBusConnection
Method
send_message_with_reply_finish (AsyncResult res) : Gio.DBusMessage
Finishes an operation started with g_dbus_connection_send_message_with_reply().
Gio.DBusProxy
Method
new Gio.DBusProxy.finish (AsyncResult res) : Gio.DBusProxy
Create a new Gio.DBusProxy
Gio.DBusProxy
Method
new Gio.DBusProxy.for_bus_finish (AsyncResult res) : Gio.DBusProxy
Create a new Gio.DBusProxy
Gio.DBusProxy
Method
call_finish (AsyncResult res) : GLib.Variant
Finishes an operation started with g_dbus_proxy_call().
Gio.DataInputStream
Method
read_line_finish (AsyncResult result, Object out_values) : String
Finish an asynchronous call started by
g_data_input_stream_read_line_async().
Gio.DataInputStream
Method
read_until_finish (AsyncResult result, Object out_values) : String
Finish an asynchronous call started by
g_data_input_stream_read_until_async().
Gio.DataInputStream
Method
read_upto_finish (AsyncResult result, Object out_values) : String
Finish an asynchronous call started by
g_data_input_stream_read_upto_async().
Gio.Drive
Method
eject_finish (AsyncResult result) : gboolean
Finishes ejecting a drive.
Gio.Drive
Method
eject_with_operation_finish (AsyncResult result) : gboolean
Finishes ejecting a drive.
Gio.Drive
Method
poll_for_media_finish (AsyncResult result) : gboolean
Finishes an operation started with g_drive_poll_for_media() on a drive.
Gio.Drive
Method
start_finish (AsyncResult result) : gboolean
Finishes starting a drive.
Gio.Drive
Method
stop_finish (AsyncResult result) : gboolean
Finishes stopping a drive.
Gio.File
Method
append_to_finish (AsyncResult res) : Gio.FileOutputStream
Finishes an asynchronous file append operation started with
g_file_append_to_async().
Gio.File
Method
copy_finish (AsyncResult res) : gboolean
Finishes copying the file started with
g_file_copy_async().
Gio.File
Method
create_finish (AsyncResult res) : Gio.FileOutputStream
Finishes an asynchronous file create operation started with
g_file_create_async().
Gio.File
Method
create_readwrite_finish (AsyncResult res) : Gio.FileIOStream
Finishes an asynchronous file create operation started with
g_file_create_readwrite_async().
Gio.File
Method
eject_mountable_finish (AsyncResult result) : gboolean
Finishes an asynchronous eject operation started by
g_file_eject_mountable().
Gio.File
Method
eject_mountable_with_operation_finish (AsyncResult result) : gboolean
Finishes an asynchronous eject operation started by
g_file_eject_mountable_with_operation().
Gio.File
Method
enumerate_children_finish (AsyncResult res) : Gio.FileEnumerator
Finishes an async enumerate children operation.
Gio.File
Method
find_enclosing_mount_finish (AsyncResult res) : Gio.Mount
Finishes an asynchronous find mount request.
Gio.File
Method
load_contents_finish (AsyncResult res, Object out_values) : gboolean
Finishes an asynchronous load of the file's contents.
Gio.File
Method
load_partial_contents_finish (AsyncResult res, Object out_values) : gboolean
Finishes an asynchronous partial load operation that was started
with g_file_load_partial_contents_async().
Gio.File
Method
mount_enclosing_volume_finish (AsyncResult result) : gboolean
Finishes a mount operation started by g_file_mount_enclosing_volume().
Gio.File
Method
mount_mountable_finish (AsyncResult result) : Gio.File
Finishes a mount operation.
Gio.File
Method
open_readwrite_finish (AsyncResult res) : Gio.FileIOStream
Finishes an asynchronous file read operation started with
g_file_open_readwrite_async().
Gio.File
Method
poll_mountable_finish (AsyncResult result) : gboolean
Finishes a poll operation.
Gio.File
Method
query_filesystem_info_finish (AsyncResult res) : Gio.FileInfo
Finishes an asynchronous filesystem info query.
Gio.File
Method
query_info_finish (AsyncResult res) : Gio.FileInfo
Finishes an asynchronous file info query.
Gio.File
Method
read_finish (AsyncResult res) : Gio.FileInputStream
Finishes an asynchronous file read operation started with
g_file_read_async().
Gio.File
Method
replace_contents_finish (AsyncResult res, Object out_values) : gboolean
Finishes an asynchronous replace of the given file.
Gio.File
Method
replace_finish (AsyncResult res) : Gio.FileOutputStream
Finishes an asynchronous file replace operation started with
g_file_replace_async().
Gio.File
Method
replace_readwrite_finish (AsyncResult res) : Gio.FileIOStream
Finishes an asynchronous file replace operation started with
g_file_replace_readwrite_async().
Gio.File
Method
set_attributes_finish (AsyncResult result, Object out_values) : gboolean
Finishes setting an attribute started in g_file_set_attributes_async().
Gio.File
Method
set_display_name_finish (AsyncResult res) : Gio.File
Finishes setting a display name started with
g_file_set_display_name_async().
Gio.File
Method
start_mountable_finish (AsyncResult result) : gboolean
Finishes a start operation.
Gio.File
Method
stop_mountable_finish (AsyncResult result) : gboolean
Finishes an stop operation, see g_file_stop_mountable() for details.
Gio.File
Method
unmount_mountable_finish (AsyncResult result) : gboolean
Finishes an unmount operation, see g_file_unmount_mountable() for details.
Gio.File
Method
unmount_mountable_with_operation_finish (AsyncResult result) : gboolean
Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
Gio.FileEnumerator
Method
close_finish (AsyncResult result) : gboolean
Finishes closing a file enumerator, started from g_file_enumerator_close_async().
Gio.FileEnumerator
Method
next_files_finish (AsyncResult result) : Array
Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
Gio.FileIOStream
Method
query_info_finish (AsyncResult result) : Gio.FileInfo
Finalizes the asynchronous query started
by g_file_io_stream_query_info_async().
Gio.FileInputStream
Method
query_info_finish (AsyncResult result) : Gio.FileInfo
Finishes an asynchronous info query operation.
Gio.FileOutputStream
Method
query_info_finish (AsyncResult result) : Gio.FileInfo
Finalizes the asynchronous query started
by g_file_output_stream_query_info_async().
Gio.IOStream
Method
Gio.IOStream.splice_finish (AsyncResult result) : gboolean
Finishes an asynchronous io stream splice operation.
Gio.IOStream
Method
close_finish (AsyncResult result) : gboolean
Closes a stream.
Gio.InputStream
Method
close_finish (AsyncResult result) : gboolean
Finishes closing a stream asynchronously, started from g_input_stream_close_async().
Gio.InputStream
Method
read_finish (AsyncResult result) : gint32
Finishes an asynchronous stream read operation.
Gio.InputStream
Method
skip_finish (AsyncResult result) : gint32
Finishes a stream skip operation.
Gio.LoadableIcon
Method
load_finish (AsyncResult res, String type) : Gio.InputStream
Finishes an asynchronous icon load started in g_loadable_icon_load_async().
Gio.Mount
Method
eject_finish (AsyncResult result) : gboolean
Finishes ejecting a mount.
Gio.Mount
Method
eject_with_operation_finish (AsyncResult result) : gboolean
Finishes ejecting a mount.
Gio.Mount
Method
guess_content_type_finish (AsyncResult result) : Array
Finishes guessing content types of mount.
Gio.Mount
Method
remount_finish (AsyncResult result) : gboolean
Finishes remounting a mount.
Gio.Mount
Method
unmount_finish (AsyncResult result) : gboolean
Finishes unmounting a mount.
Gio.Mount
Method
unmount_with_operation_finish (AsyncResult result) : gboolean
Finishes unmounting a mount.
Gio.OutputStream
Method
close_finish (AsyncResult result) : gboolean
Closes an output stream.
Gio.OutputStream
Method
flush_finish (AsyncResult result) : gboolean
Finishes flushing an output stream.
Gio.OutputStream
Method
splice_finish (AsyncResult result) : gint32
Finishes an asynchronous stream splice operation.
Gio.OutputStream
Method
write_finish (AsyncResult result) : gint32
Finishes a stream write operation.
Gio.Permission
Method
acquire_finish (AsyncResult result) : gboolean
Collects the result of attempting to acquire the permission
represented by permission.
Gio.Permission
Method
release_finish (AsyncResult result) : gboolean
Collects the result of attempting to release the permission
represented by permission.
Gio.Proxy
Method
connect_finish (AsyncResult result) : Gio.IOStream
See g_proxy_connect().
Gio.ProxyResolver
Method
lookup_finish (AsyncResult result) : Array
Call this function to obtain the array of proxy URIs when
g_proxy_resolver_lookup_async() is complete.
Gio.Resolver
Method
lookup_by_address_finish (AsyncResult result) : String
Retrieves the result of a previous call to
g_resolver_lookup_by_address_async().
Gio.Resolver
Method
lookup_by_name_finish (AsyncResult result) : Array
Retrieves the result of a call to
g_resolver_lookup_by_name_async().
Gio.Resolver
Method
lookup_service_finish (AsyncResult result) : Array
Retrieves the result of a previous call to
g_resolver_lookup_service_async().
Gio.SimpleAsyncResult
Method
Gio.SimpleAsyncResult.is_valid (AsyncResult result, Object source, void* source_tag) : gboolean
Ensures that the data passed to the _finish function of an async
operation is consistent.
Gio.SocketAddressEnumerator
Method
next_finish (AsyncResult result) : Gio.SocketAddress
Retrieves the result of a completed call to
g_socket_address_enumerator_next_async().
Gio.SocketClient
Method
connect_finish (AsyncResult result) : Gio.SocketConnection
Finishes an async connect operation.
Gio.SocketClient
Method
connect_to_host_finish (AsyncResult result) : Gio.SocketConnection
Finishes an async connect operation.
Gio.SocketClient
Method
connect_to_service_finish (AsyncResult result) : Gio.SocketConnection
Finishes an async connect operation.
Gio.SocketClient
Method
connect_to_uri_finish (AsyncResult result) : Gio.SocketConnection
Finishes an async connect operation.
Gio.SocketListener
Method
accept_finish (AsyncResult result, Object out_values) : Gio.SocketConnection
Finishes an async accept operation.
Gio.SocketListener
Method
accept_socket_finish (AsyncResult result, Object out_values) : Gio.Socket
Finishes an async accept operation.
Gio.TlsConnection
Method
handshake_finish (AsyncResult result) : gboolean
Finish an asynchronous TLS handshake operation.
Gio.Volume
Method
eject_finish (AsyncResult result) : gboolean
Finishes ejecting a volume.
Gio.Volume
Method
eject_with_operation_finish (AsyncResult result) : gboolean
Finishes ejecting a volume.
Gio.Volume
Method
mount_finish (AsyncResult result) : gboolean
Finishes mounting a volume.
Json.Parser
Method
load_from_stream_finish (AsyncResult result) : gboolean
Polkit.Authority
Method
Polkit.Authority.get_finish (AsyncResult res) : Polkit.Authority
Polkit.Authority
Method
authentication_agent_response_finish (AsyncResult res) : gboolean
Polkit.Authority
Method
check_authorization_finish (AsyncResult res) : Polkit.AuthorizationResult
Polkit.Authority
Method
enumerate_actions_finish (AsyncResult res) : Array
Polkit.Authority
Method
enumerate_temporary_authorizations_finish (AsyncResult res) : Array
Polkit.Authority
Method
register_authentication_agent_finish (AsyncResult res) : gboolean
Polkit.Authority
Method
revoke_temporary_authorization_by_id_finish (AsyncResult res) : gboolean
Polkit.Authority
Method
revoke_temporary_authorizations_finish (AsyncResult res) : gboolean
Polkit.Authority
Method
unregister_authentication_agent_finish (AsyncResult res) : gboolean
Polkit.Permission
Method
new Polkit.Permission.finish (AsyncResult res) : Gio.Permission
Create a new Polkit.Permission
Polkit.Subject
Method
exists_finish (AsyncResult res) : gboolean
Polkit.UnixSession
Method
Polkit.UnixSession.new_for_process_finish (AsyncResult res) : Polkit.Subject
PolkitAgent.Listener
Method
initiate_authentication_finish (AsyncResult res) : gboolean
TelepathyGLib.Account
Method
get_avatar_finish (AsyncResult result) : String
TelepathyGLib.Account
Method
get_storage_specific_information_finish (AsyncResult result) : Object
TelepathyGLib.Account
Method
reconnect_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
remove_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
request_presence_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_automatic_presence_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_avatar_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_connect_automatically_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_display_name_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_enabled_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_icon_name_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_nickname_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_service_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
set_uri_scheme_association_finish (AsyncResult result) : gboolean
TelepathyGLib.Account
Method
update_parameters_finish (AsyncResult result, Object out_values) : gboolean
TelepathyGLib.AccountChannelRequest
Method
create_and_handle_channel_finish (AsyncResult result, Object out_values) : TelepathyGLib.Channel
TelepathyGLib.AccountChannelRequest
Method
create_and_observe_channel_finish (AsyncResult result) : TelepathyGLib.Channel
TelepathyGLib.AccountChannelRequest
Method
create_channel_finish (AsyncResult result) : gboolean
TelepathyGLib.AccountChannelRequest
Method
ensure_and_handle_channel_finish (AsyncResult result, Object out_values) : TelepathyGLib.Channel
TelepathyGLib.AccountChannelRequest
Method
ensure_and_observe_channel_finish (AsyncResult result) : TelepathyGLib.Channel
TelepathyGLib.AccountChannelRequest
Method
ensure_channel_finish (AsyncResult result) : gboolean
TelepathyGLib.AccountManager
Method
create_account_finish (AsyncResult result) : TelepathyGLib.Account
TelepathyGLib.Channel
Method
close_finish (AsyncResult result) : gboolean
TelepathyGLib.Channel
Method
leave_finish (AsyncResult result) : gboolean
TelepathyGLib.ChannelDispatchOperation
Method
claim_finish (AsyncResult result) : gboolean
TelepathyGLib.ChannelDispatchOperation
Method
handle_with_finish (AsyncResult result) : gboolean
TelepathyGLib.ChannelDispatchOperation
Method
handle_with_time_finish (AsyncResult result) : gboolean
TelepathyGLib.Connection
Method
set_contact_info_finish (AsyncResult result) : gboolean
TelepathyGLib.Contact
Method
request_contact_info_finish (AsyncResult result) : gboolean
TelepathyGLib.Contact
Method
set_contact_groups_finish (AsyncResult result) : gboolean
TelepathyGLib.ContactSearch
Method
new TelepathyGLib.ContactSearch.finish (AsyncResult result) : TelepathyGLib.ContactSearch
Create a new TelepathyGLib.ContactSearch
TelepathyGLib.ContactSearch
Method
reset_finish (AsyncResult result) : Array
TelepathyGLib.Proxy
Method
prepare_finish (AsyncResult result) : gboolean
TelepathyGLib.StreamTubeChannel
Method
TelepathyGLib.StreamTubeChannel
Method
offer_finish (AsyncResult result) : gboolean
TelepathyGLib.TextChannel
Method
ack_message_finish (AsyncResult result) : gboolean
TelepathyGLib.TextChannel
Method
ack_messages_finish (AsyncResult result) : gboolean
TelepathyGLib.TextChannel
Method
send_message_finish (AsyncResult result, Object out_values) : gboolean
TelepathyGLib.TextChannel
Method
set_chat_state_finish (AsyncResult result) : gboolean
TelepathyLogger.LogManager
Method
get_dates_finish (AsyncResult result, Array dates) : gboolean
TelepathyLogger.LogManager
Method
get_entities_finish (AsyncResult result, Array entities) : gboolean
TelepathyLogger.LogManager
Method
get_events_for_date_finish (AsyncResult result, Array events) : gboolean
TelepathyLogger.LogManager
Method
get_filtered_events_finish (AsyncResult result, Object out_values) : gboolean
TelepathyLogger.LogManager
Method
search_finish (AsyncResult result, Array hits) : gboolean
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:11:20 GMT+0800 (HKT)