1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Asynchronous File Operations</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
8
<link rel="up" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
9
<link rel="prev" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
10
<link rel="next" href="gnome-vfs-2.0-gnome-vfs-cancellation.html" title="Cancellation">
11
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
14
<link rel="chapter" href="data-types.html" title="Basic Data Types">
15
<link rel="chapter" href="gnome-vfs-basic-file-ops.html" title="File Operations">
16
<link rel="chapter" href="gnome-vfs-directory-ops.html" title="Directory-Specific Operations">
17
<link rel="chapter" href="gnome-vfs-file-and-dirs-ops.html" title="Advanced File/Directory Operations">
18
<link rel="chapter" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
19
<link rel="chapter" href="volumes.html" title="Volumes and Drives Handling">
20
<link rel="chapter" href="networking.html" title="Networking">
21
<link rel="chapter" href="mime-registry.html" title="MIME Registry">
22
<link rel="chapter" href="modules.html" title="Filesystem Modules">
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
27
<td><a accesskey="p" href="gnome-vfs-file-async-ops.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
<td><a accesskey="u" href="gnome-vfs-file-async-ops.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
31
<td><a accesskey="n" href="gnome-vfs-2.0-gnome-vfs-cancellation.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
33
<tr><td colspan="5" class="shortcuts">
34
<a href="#gnome-vfs-2.0-gnome-vfs-async-ops.synopsis" class="shortcut">Top</a>
36
<a href="#gnome-vfs-2.0-gnome-vfs-async-ops.description" class="shortcut">Description</a>
39
<div class="refentry" lang="en">
40
<a name="gnome-vfs-2.0-gnome-vfs-async-ops"></a><div class="titlepage"></div>
41
<div class="refnamediv"><table width="100%"><tr>
43
<h2><span class="refentrytitle"><a name="gnome-vfs-2.0-gnome-vfs-async-ops.top_of_page"></a>Asynchronous File Operations</span></h2>
44
<p>Asynchronous File Operations — POSIX-style file operations that run outside your main loop</p>
46
<td valign="top" align="right"></td>
48
<div class="refsynopsisdiv">
49
<a name="gnome-vfs-2.0-gnome-vfs-async-ops.synopsis"></a><h2>Synopsis</h2>
50
<pre class="synopsis">
51
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN">GNOME_VFS_PRIORITY_MIN</a>
52
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX">GNOME_VFS_PRIORITY_MAX</a>
53
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT">GNOME_VFS_PRIORITY_DEFAULT</a>
54
typedef <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a>;
55
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCallback" title="GnomeVFSAsyncCallback ()">*GnomeVFSAsyncCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
56
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
57
gpointer callback_data);
58
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">*GnomeVFSAsyncOpenCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
59
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
60
gpointer callback_data);
61
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenAsChannelCallback" title="GnomeVFSAsyncOpenAsChannelCallback ()">*GnomeVFSAsyncOpenAsChannelCallback</a>)
62
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
64
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
65
gpointer callback_data);
66
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCreateCallback" title="GnomeVFSAsyncCreateCallback ()">*GnomeVFSAsyncCreateCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
67
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
68
gpointer callback_data);
69
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCreateAsChannelCallback" title="GnomeVFSAsyncCreateAsChannelCallback ()">*GnomeVFSAsyncCreateAsChannelCallback</a>)
70
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
72
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
73
gpointer callback_data);
74
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCloseCallback" title="GnomeVFSAsyncCloseCallback ()">*GnomeVFSAsyncCloseCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
75
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
76
gpointer callback_data);
77
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncReadCallback" title="GnomeVFSAsyncReadCallback ()">*GnomeVFSAsyncReadCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
78
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
80
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_requested,
81
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_read,
82
gpointer callback_data);
83
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncWriteCallback" title="GnomeVFSAsyncWriteCallback ()">*GnomeVFSAsyncWriteCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
84
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
86
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_requested,
87
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_written,
88
gpointer callback_data);
89
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncSeekCallback" title="GnomeVFSAsyncSeekCallback ()">*GnomeVFSAsyncSeekCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
90
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
91
gpointer callback_data);
92
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncGetFileInfoCallback" title="GnomeVFSAsyncGetFileInfoCallback ()">*GnomeVFSAsyncGetFileInfoCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
94
gpointer callback_data);
95
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncSetFileInfoCallback" title="GnomeVFSAsyncSetFileInfoCallback ()">*GnomeVFSAsyncSetFileInfoCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
96
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
97
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo">GnomeVFSFileInfo</a> *file_info,
98
gpointer callback_data);
99
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFileControlCallback" title="GnomeVFSAsyncFileControlCallback ()">*GnomeVFSAsyncFileControlCallback</a>) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
100
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
101
gpointer operation_data,
102
gpointer callback_data);
103
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncDirectoryLoadCallback" title="GnomeVFSAsyncDirectoryLoadCallback ()">*GnomeVFSAsyncDirectoryLoadCallback</a>)
104
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
105
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
108
gpointer callback_data);
109
void (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFindDirectoryCallback" title="GnomeVFSAsyncFindDirectoryCallback ()">*GnomeVFSAsyncFindDirectoryCallback</a>)
110
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
113
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a>;
114
gint (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncXferProgressCallback" title="GnomeVFSAsyncXferProgressCallback ()">*GnomeVFSAsyncXferProgressCallback</a>)
115
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
116
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressInfo" title="GnomeVFSXferProgressInfo">GnomeVFSXferProgressInfo</a> *info,
118
typedef <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a>;
119
typedef <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSContext" title="GnomeVFSContext">GnomeVFSContext</a>;
120
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-set-job-limit" title="gnome_vfs_async_set_job_limit ()">gnome_vfs_async_set_job_limit</a> (int limit);
121
int <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-get-job-limit" title="gnome_vfs_async_get_job_limit ()">gnome_vfs_async_get_job_limit</a> (void);
122
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-cancel" title="gnome_vfs_async_cancel ()">gnome_vfs_async_cancel</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle);
123
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open" title="gnome_vfs_async_open ()">gnome_vfs_async_open</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
124
const gchar *text_uri,
125
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
127
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
128
gpointer callback_data);
129
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open-uri" title="gnome_vfs_async_open_uri ()">gnome_vfs_async_open_uri</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
130
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
131
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
133
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
134
gpointer callback_data);
135
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open-as-channel" title="gnome_vfs_async_open_as_channel ()">gnome_vfs_async_open_as_channel</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
136
const gchar *text_uri,
137
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
138
guint advised_block_size,
140
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenAsChannelCallback" title="GnomeVFSAsyncOpenAsChannelCallback ()">GnomeVFSAsyncOpenAsChannelCallback</a> callback,
141
gpointer callback_data);
142
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open-uri-as-channel" title="gnome_vfs_async_open_uri_as_channel ()">gnome_vfs_async_open_uri_as_channel</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
143
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
144
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
145
guint advised_block_size,
147
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenAsChannelCallback" title="GnomeVFSAsyncOpenAsChannelCallback ()">GnomeVFSAsyncOpenAsChannelCallback</a> callback,
148
gpointer callback_data);
149
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create" title="gnome_vfs_async_create ()">gnome_vfs_async_create</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
150
const gchar *text_uri,
151
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
155
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
156
gpointer callback_data);
157
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create-uri" title="gnome_vfs_async_create_uri ()">gnome_vfs_async_create_uri</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
158
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
159
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
163
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
164
gpointer callback_data);
165
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create-symbolic-link" title="gnome_vfs_async_create_symbolic_link ()">gnome_vfs_async_create_symbolic_link</a>
166
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
167
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
168
const gchar *uri_reference,
170
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
171
gpointer callback_data);
172
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create-as-channel" title="gnome_vfs_async_create_as_channel ()">gnome_vfs_async_create_as_channel</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
173
const gchar *text_uri,
174
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
178
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCreateAsChannelCallback" title="GnomeVFSAsyncCreateAsChannelCallback ()">GnomeVFSAsyncCreateAsChannelCallback</a> callback,
179
gpointer callback_data);
180
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create-uri-as-channel" title="gnome_vfs_async_create_uri_as_channel ()">gnome_vfs_async_create_uri_as_channel</a>
181
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
182
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
183
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
187
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCreateAsChannelCallback" title="GnomeVFSAsyncCreateAsChannelCallback ()">GnomeVFSAsyncCreateAsChannelCallback</a> callback,
188
gpointer callback_data);
189
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-close" title="gnome_vfs_async_close ()">gnome_vfs_async_close</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
190
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCloseCallback" title="GnomeVFSAsyncCloseCallback ()">GnomeVFSAsyncCloseCallback</a> callback,
191
gpointer callback_data);
192
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-read" title="gnome_vfs_async_read ()">gnome_vfs_async_read</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
195
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncReadCallback" title="GnomeVFSAsyncReadCallback ()">GnomeVFSAsyncReadCallback</a> callback,
196
gpointer callback_data);
197
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-write" title="gnome_vfs_async_write ()">gnome_vfs_async_write</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
198
gconstpointer buffer,
200
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncWriteCallback" title="GnomeVFSAsyncWriteCallback ()">GnomeVFSAsyncWriteCallback</a> callback,
201
gpointer callback_data);
202
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-seek" title="gnome_vfs_async_seek ()">gnome_vfs_async_seek</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
203
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-rw-ops.html#GnomeVFSSeekPosition" title="enum GnomeVFSSeekPosition">GnomeVFSSeekPosition</a> whence,
204
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileOffset" title="GnomeVFSFileOffset">GnomeVFSFileOffset</a> offset,
205
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncSeekCallback" title="GnomeVFSAsyncSeekCallback ()">GnomeVFSAsyncSeekCallback</a> callback,
206
gpointer callback_data);
207
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-get-file-info" title="gnome_vfs_async_get_file_info ()">gnome_vfs_async_get_file_info</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
209
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
211
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncGetFileInfoCallback" title="GnomeVFSAsyncGetFileInfoCallback ()">GnomeVFSAsyncGetFileInfoCallback</a> callback,
212
gpointer callback_data);
213
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-set-file-info" title="gnome_vfs_async_set_file_info ()">gnome_vfs_async_set_file_info</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
214
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
215
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo">GnomeVFSFileInfo</a> *info,
216
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSSetFileInfoMask" title="enum GnomeVFSSetFileInfoMask">GnomeVFSSetFileInfoMask</a> mask,
217
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
219
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncSetFileInfoCallback" title="GnomeVFSAsyncSetFileInfoCallback ()">GnomeVFSAsyncSetFileInfoCallback</a> callback,
220
gpointer callback_data);
221
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-load-directory" title="gnome_vfs_async_load_directory ()">gnome_vfs_async_load_directory</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
222
const gchar *text_uri,
223
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
224
guint items_per_notification,
226
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncDirectoryLoadCallback" title="GnomeVFSAsyncDirectoryLoadCallback ()">GnomeVFSAsyncDirectoryLoadCallback</a> callback,
227
gpointer callback_data);
228
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-load-directory-uri" title="gnome_vfs_async_load_directory_uri ()">gnome_vfs_async_load_directory_uri</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
229
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
230
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
231
guint items_per_notification,
233
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncDirectoryLoadCallback" title="GnomeVFSAsyncDirectoryLoadCallback ()">GnomeVFSAsyncDirectoryLoadCallback</a> callback,
234
gpointer callback_data);
235
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-xfer" title="gnome_vfs_async_xfer ()">gnome_vfs_async_xfer</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
236
GList *source_uri_list,
237
GList *target_uri_list,
238
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferOptions" title="enum GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
239
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferErrorMode" title="enum GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
240
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode" title="enum GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a> overwrite_mode,
242
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncXferProgressCallback" title="GnomeVFSAsyncXferProgressCallback ()">GnomeVFSAsyncXferProgressCallback</a> progress_update_callback,
243
gpointer update_callback_data,
244
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback" title="GnomeVFSXferProgressCallback ()">GnomeVFSXferProgressCallback</a> progress_sync_callback,
245
gpointer sync_callback_data);
246
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-find-directory" title="gnome_vfs_async_find_directory ()">gnome_vfs_async_find_directory</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
247
GList *near_uri_list,
248
<a class="link" href="gnome-vfs-2.0-gnome-vfs-directory-find-ops.html#GnomeVFSFindDirectoryKind" title="enum GnomeVFSFindDirectoryKind">GnomeVFSFindDirectoryKind</a> kind,
249
gboolean create_if_needed,
250
gboolean find_if_needed,
253
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFindDirectoryCallback" title="GnomeVFSAsyncFindDirectoryCallback ()">GnomeVFSAsyncFindDirectoryCallback</a> callback,
255
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-file-control" title="gnome_vfs_async_file_control ()">gnome_vfs_async_file_control</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
256
const char *operation,
257
gpointer operation_data,
258
GDestroyNotify operation_data_destroy_func,
259
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFileControlCallback" title="GnomeVFSAsyncFileControlCallback ()">GnomeVFSAsyncFileControlCallback</a> callback,
260
gpointer callback_data);
261
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a>* <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-find-directory-result-dup" title="gnome_vfs_find_directory_result_dup ()">gnome_vfs_find_directory_result_dup</a>
262
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a> *result);
263
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-find-directory-result-free" title="gnome_vfs_find_directory_result_free ()">gnome_vfs_find_directory_result_free</a>
264
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a> *result);
267
<div class="refsect1" lang="en">
268
<a name="gnome-vfs-2.0-gnome-vfs-async-ops.description"></a><h2>Description</h2>
270
When executing an asynchornous operation on a file the program does not
271
block waiting for the operation to finish, instead it keeps on running,
272
which means that the process and the I/O operation can be both running
273
concurrently. Once the I/O operation has been completed the process is
274
notified using a callback.
277
Asynchronous operations are particularly good when long I/O operations
278
are expected, in this case the program can continue normaly, the I/O
279
will be performed in the background. On the other hand when operations
280
are expected to be short (creating a file, writing/reading small amounts
281
of data, etc.) synchronous operations are prefered.
284
Within a graphical desktop asynchornous I/O operations can be used to
285
avoid blocking the UI (User Interface) during a long operation, and
286
to be able to provide some kind of feedback to the user.
289
<div class="refsect1" lang="en">
290
<a name="gnome-vfs-2.0-gnome-vfs-async-ops.details"></a><h2>Details</h2>
291
<div class="refsect2" lang="en">
292
<a name="GNOME-VFS-PRIORITY-MIN:CAPS"></a><h3>GNOME_VFS_PRIORITY_MIN</h3>
293
<pre class="programlisting">#define GNOME_VFS_PRIORITY_MIN -10
296
The minimuum priority a job can have.</p>
301
<div class="refsect2" lang="en">
302
<a name="GNOME-VFS-PRIORITY-MAX:CAPS"></a><h3>GNOME_VFS_PRIORITY_MAX</h3>
303
<pre class="programlisting">#define GNOME_VFS_PRIORITY_MAX 10
306
The maximuum priority a job can have.</p>
311
<div class="refsect2" lang="en">
312
<a name="GNOME-VFS-PRIORITY-DEFAULT:CAPS"></a><h3>GNOME_VFS_PRIORITY_DEFAULT</h3>
313
<pre class="programlisting">#define GNOME_VFS_PRIORITY_DEFAULT 0
316
The default job priority. Its best to use this
317
unless you have a reason to do otherwise.</p>
322
<div class="refsect2" lang="en">
323
<a name="GnomeVFSAsyncHandle"></a><h3>GnomeVFSAsyncHandle</h3>
324
<pre class="programlisting">typedef struct GnomeVFSAsyncHandle GnomeVFSAsyncHandle;
330
<div class="refsect2" lang="en">
331
<a name="GnomeVFSAsyncCallback"></a><h3>GnomeVFSAsyncCallback ()</h3>
332
<pre class="programlisting">void (*GnomeVFSAsyncCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
333
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
334
gpointer callback_data);</pre>
336
Basic callback from an async operation that passes no data back,
337
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
340
<div class="variablelist"><table border="0">
341
<col align="left" valign="top">
344
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
345
<td> handle of the operation generating the callback
349
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
350
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
355
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
356
<td> user data defined when the callback was established
363
<div class="refsect2" lang="en">
364
<a name="GnomeVFSAsyncOpenCallback"></a><h3>GnomeVFSAsyncOpenCallback ()</h3>
365
<pre class="programlisting">void (*GnomeVFSAsyncOpenCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
366
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
367
gpointer callback_data);</pre>
369
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open" title="gnome_vfs_async_open ()"><code class="function">gnome_vfs_async_open()</code></a> function,
370
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
373
<div class="variablelist"><table border="0">
374
<col align="left" valign="top">
377
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
378
<td> handle of the operation generating the callback
382
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
383
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
388
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
389
<td> user data defined when the callback was established
396
<div class="refsect2" lang="en">
397
<a name="GnomeVFSAsyncOpenAsChannelCallback"></a><h3>GnomeVFSAsyncOpenAsChannelCallback ()</h3>
398
<pre class="programlisting">void (*GnomeVFSAsyncOpenAsChannelCallback)
399
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
401
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
402
gpointer callback_data);</pre>
403
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
404
<h3 class="title">Warning</h3>
405
<p><code class="literal">GnomeVFSAsyncOpenAsChannelCallback</code> is deprecated and should not be used in newly-written code.</p>
408
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open-as-channel" title="gnome_vfs_async_open_as_channel ()"><code class="function">gnome_vfs_async_open_as_channel()</code></a> function,
409
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
412
<div class="variablelist"><table border="0">
413
<col align="left" valign="top">
416
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
417
<td> handle of the operation generating the callback.
421
<td><p><span class="term"><em class="parameter"><code>channel</code></em> :</span></p></td>
422
<td> a <span class="type">GIOChannel</span> corresponding to the file opened
426
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
427
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
432
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
433
<td> user data defined when the callback was established.
440
<div class="refsect2" lang="en">
441
<a name="GnomeVFSAsyncCreateCallback"></a><h3>GnomeVFSAsyncCreateCallback ()</h3>
442
<pre class="programlisting">void (*GnomeVFSAsyncCreateCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
443
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
444
gpointer callback_data);</pre>
446
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create" title="gnome_vfs_async_create ()"><code class="function">gnome_vfs_async_create()</code></a> function,
447
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
450
<div class="variablelist"><table border="0">
451
<col align="left" valign="top">
454
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
455
<td> handle of the operation generating the callback
459
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
460
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
465
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
466
<td> user data defined when the callback was established
473
<div class="refsect2" lang="en">
474
<a name="GnomeVFSAsyncCreateAsChannelCallback"></a><h3>GnomeVFSAsyncCreateAsChannelCallback ()</h3>
475
<pre class="programlisting">void (*GnomeVFSAsyncCreateAsChannelCallback)
476
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
478
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
479
gpointer callback_data);</pre>
480
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
481
<h3 class="title">Warning</h3>
482
<p><code class="literal">GnomeVFSAsyncCreateAsChannelCallback</code> is deprecated and should not be used in newly-written code.</p>
485
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-create-as-channel" title="gnome_vfs_async_create_as_channel ()"><code class="function">gnome_vfs_async_create_as_channel()</code></a> function,
486
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
489
<div class="variablelist"><table border="0">
490
<col align="left" valign="top">
493
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
494
<td> handle of the operation generating the callback.
498
<td><p><span class="term"><em class="parameter"><code>channel</code></em> :</span></p></td>
499
<td> a <span class="type">GIOChannel</span> corresponding to the file created
503
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
504
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
509
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
510
<td> user data defined when the callback was established.
517
<div class="refsect2" lang="en">
518
<a name="GnomeVFSAsyncCloseCallback"></a><h3>GnomeVFSAsyncCloseCallback ()</h3>
519
<pre class="programlisting">void (*GnomeVFSAsyncCloseCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
520
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
521
gpointer callback_data);</pre>
523
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-close" title="gnome_vfs_async_close ()"><code class="function">gnome_vfs_async_close()</code></a> function,
524
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
527
<div class="variablelist"><table border="0">
528
<col align="left" valign="top">
531
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
532
<td> handle of the operation generating the callback
536
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
537
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
542
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
543
<td> user data defined when the callback was established
550
<div class="refsect2" lang="en">
551
<a name="GnomeVFSAsyncReadCallback"></a><h3>GnomeVFSAsyncReadCallback ()</h3>
552
<pre class="programlisting">void (*GnomeVFSAsyncReadCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
553
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
555
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_requested,
556
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_read,
557
gpointer callback_data);</pre>
559
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-read" title="gnome_vfs_async_read ()"><code class="function">gnome_vfs_async_read()</code></a> function,
560
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
563
<div class="variablelist"><table border="0">
564
<col align="left" valign="top">
567
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
568
<td> handle of the operation generating the callback
572
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
573
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
578
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
579
<td> buffer containing data read from <em class="parameter"><code>handle</code></em>.
583
<td><p><span class="term"><em class="parameter"><code>bytes_requested</code></em> :</span></p></td>
584
<td> the number of bytes asked for in the call to
585
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-read" title="gnome_vfs_async_read ()"><code class="function">gnome_vfs_async_read()</code></a>.
589
<td><p><span class="term"><em class="parameter"><code>bytes_read</code></em> :</span></p></td>
590
<td> the number of bytes actually read from <em class="parameter"><code>handle</code></em> into <em class="parameter"><code>buffer</code></em>.
594
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
595
<td> user data defined when the callback was established
602
<div class="refsect2" lang="en">
603
<a name="GnomeVFSAsyncWriteCallback"></a><h3>GnomeVFSAsyncWriteCallback ()</h3>
604
<pre class="programlisting">void (*GnomeVFSAsyncWriteCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
605
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
606
gconstpointer buffer,
607
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_requested,
608
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes_written,
609
gpointer callback_data);</pre>
611
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-write" title="gnome_vfs_async_write ()"><code class="function">gnome_vfs_async_write()</code></a> function,
612
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
615
<div class="variablelist"><table border="0">
616
<col align="left" valign="top">
619
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
620
<td> handle of the operation generating the callback
624
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
625
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
630
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
631
<td> buffer containing data written to <em class="parameter"><code>handle</code></em>.
635
<td><p><span class="term"><em class="parameter"><code>bytes_requested</code></em> :</span></p></td>
636
<td> the number of bytes asked to write in the call to
637
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-write" title="gnome_vfs_async_write ()"><code class="function">gnome_vfs_async_write()</code></a>.
641
<td><p><span class="term"><em class="parameter"><code>bytes_written</code></em> :</span></p></td>
642
<td> the number of bytes actually written to <em class="parameter"><code>handle</code></em> from <em class="parameter"><code>buffer</code></em>.
646
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
647
<td> user data defined when the callback was established.
654
<div class="refsect2" lang="en">
655
<a name="GnomeVFSAsyncSeekCallback"></a><h3>GnomeVFSAsyncSeekCallback ()</h3>
656
<pre class="programlisting">void (*GnomeVFSAsyncSeekCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
657
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
658
gpointer callback_data);</pre>
660
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-seek" title="gnome_vfs_async_seek ()"><code class="function">gnome_vfs_async_seek()</code></a> function,
661
informing the user of the <em class="parameter"><code>result</code></em> of the operation.</p>
664
<div class="variablelist"><table border="0">
665
<col align="left" valign="top">
668
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
669
<td> handle of the operation generating the callback
673
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
674
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise
679
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
680
<td> user data defined when the callback was established.
687
<div class="refsect2" lang="en">
688
<a name="GnomeVFSAsyncGetFileInfoCallback"></a><h3>GnomeVFSAsyncGetFileInfoCallback ()</h3>
689
<pre class="programlisting">void (*GnomeVFSAsyncGetFileInfoCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
691
gpointer callback_data);</pre>
693
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-get-file-info" title="gnome_vfs_async_get_file_info ()"><code class="function">gnome_vfs_async_get_file_info()</code></a> function,
694
informing the user of the <em class="parameter"><code>results</code></em> of the operation.</p>
697
<div class="variablelist"><table border="0">
698
<col align="left" valign="top">
701
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
702
<td> handle of the operation generating the callback
706
<td><p><span class="term"><em class="parameter"><code>results</code></em> :</span></p></td>
707
<td> <span class="type">GList</span> of <span class="type">GnomeVFSFileInfoResult</span> * items representing
708
the success of each <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info-ops.html#gnome-vfs-get-file-info" title="gnome_vfs_get_file_info ()"><code class="function">gnome_vfs_get_file_info()</code></a> and the data retrieved.
712
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
713
<td> user data defined when the callback was established.
720
<div class="refsect2" lang="en">
721
<a name="GnomeVFSAsyncSetFileInfoCallback"></a><h3>GnomeVFSAsyncSetFileInfoCallback ()</h3>
722
<pre class="programlisting">void (*GnomeVFSAsyncSetFileInfoCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
723
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
724
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo">GnomeVFSFileInfo</a> *file_info,
725
gpointer callback_data);</pre>
727
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-set-file-info" title="gnome_vfs_async_set_file_info ()"><code class="function">gnome_vfs_async_set_file_info()</code></a> function,
728
informing the user of the <em class="parameter"><code>result</code></em> of the operation and
729
returning the new <em class="parameter"><code>file_info</code></em>.
733
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
734
<h3 class="title">Note</h3>
736
Setting the file info sometimes changes more information than the
737
caller specified; for example, if the name changes the MIME type might
738
change, and if the owner changes the SUID & SGID bits might change.
739
Therefore the callback returns the new <em class="parameter"><code>file_info</code></em> for the caller's
740
convenience. The GnomeVFSFileInfoOptions passed here are those used
741
for the returned file info; they are not used when setting.
746
<div class="variablelist"><table border="0">
747
<col align="left" valign="top">
750
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
751
<td> handle of the operation generating the callback
755
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
756
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise a
757
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> error code.
761
<td><p><span class="term"><em class="parameter"><code>file_info</code></em> :</span></p></td>
762
<td> if <em class="parameter"><code>result</code></em> is <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>, a <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo"><span class="type">GnomeVFSFileInfo</span></a> struct containing
763
information about the file.
767
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
768
<td> user data defined when the callback was established
775
<div class="refsect2" lang="en">
776
<a name="GnomeVFSAsyncFileControlCallback"></a><h3>GnomeVFSAsyncFileControlCallback ()</h3>
777
<pre class="programlisting">void (*GnomeVFSAsyncFileControlCallback) (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
778
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
779
gpointer operation_data,
780
gpointer callback_data);</pre>
782
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-find-directory" title="gnome_vfs_async_find_directory ()"><code class="function">gnome_vfs_async_find_directory()</code></a> function.
783
informing the user of the <em class="parameter"><code>result</code></em> of the operation, and
784
providing the requested <em class="parameter"><code>operation_data</code></em>.</p>
787
<div class="variablelist"><table border="0">
788
<col align="left" valign="top">
791
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
792
<td> handle of the operation generating the callback
796
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
797
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was successful, otherwise a
798
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> error code.
802
<td><p><span class="term"><em class="parameter"><code>operation_data</code></em> :</span></p></td>
803
<td> The data requested from the module if <em class="parameter"><code>result</code></em>
804
is <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>.
808
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
809
<td> User data defined when the operation was established.
816
<div class="refsect2" lang="en">
817
<a name="GnomeVFSAsyncDirectoryLoadCallback"></a><h3>GnomeVFSAsyncDirectoryLoadCallback ()</h3>
818
<pre class="programlisting">void (*GnomeVFSAsyncDirectoryLoadCallback)
819
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
820
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> result,
823
gpointer callback_data);</pre>
825
Callback for the <code class="function">gnome_vfs_async_directory_load()</code> function.
826
informing the user of the <em class="parameter"><code>result</code></em> of the operation and
827
providing a file <em class="parameter"><code>list</code></em> if the <em class="parameter"><code>result</code></em> is <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>.</p>
830
<div class="variablelist"><table border="0">
831
<col align="left" valign="top">
834
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
835
<td> handle of the operation generating the callback.
839
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
840
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the operation was sucessful,
841
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-EOF:CAPS"><code class="literal">GNOME_VFS_ERROR_EOF</code></a> if the last file in the directory
842
has been read, otherwise a <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> error code
846
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
847
<td> a <span class="type">GList</span> of <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo"><span class="type">GnomeVFSFileInfo</span></a> structs representing
848
information about the files just loaded.
852
<td><p><span class="term"><em class="parameter"><code>entries_read</code></em> :</span></p></td>
853
<td> number of entries read from <em class="parameter"><code>handle</code></em> for this instance of
858
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
859
<td> user data defined when the callback was established.
866
<div class="refsect2" lang="en">
867
<a name="GnomeVFSAsyncFindDirectoryCallback"></a><h3>GnomeVFSAsyncFindDirectoryCallback ()</h3>
868
<pre class="programlisting">void (*GnomeVFSAsyncFindDirectoryCallback)
869
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
871
gpointer data);</pre>
873
Callback for the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-find-directory" title="gnome_vfs_async_find_directory ()"><code class="function">gnome_vfs_async_find_directory()</code></a> function,
874
informing the user of the <em class="parameter"><code>results</code></em> of the operation.</p>
877
<div class="variablelist"><table border="0">
878
<col align="left" valign="top">
881
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
882
<td> handle of the operation generating the callback
886
<td><p><span class="term"><em class="parameter"><code>results</code></em> :</span></p></td>
887
<td> <span class="type">GList</span> of <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult"><span class="type">GnomeVFSFindDirectoryResult</span></a> *s containing
888
special directories matching the find criteria.
892
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
893
<td> user data defined when the operation was established
900
<div class="refsect2" lang="en">
901
<a name="GnomeVFSFindDirectoryResult"></a><h3>GnomeVFSFindDirectoryResult</h3>
902
<pre class="programlisting">typedef struct {
904
GnomeVFSResult result;
905
} GnomeVFSFindDirectoryResult;
908
This structure is passed to a <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFindDirectoryCallback" title="GnomeVFSAsyncFindDirectoryCallback ()"><span class="type">GnomeVFSAsyncFindDirectoryCallback</span></a>
909
by <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-find-directory" title="gnome_vfs_async_find_directory ()"><code class="function">gnome_vfs_async_find_directory()</code></a> and contains the information
910
associated with a single <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI"><span class="type">GnomeVFSURI</span></a> matching the specified
914
<div class="variablelist"><table border="0">
915
<col align="left" valign="top">
918
<td><p><span class="term"><a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *<em class="structfield"><code><a name="GnomeVFSFindDirectoryResult.uri"></a>uri</code></em>;</span></p></td>
919
<td> The <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI"><span class="type">GnomeVFSURI</span></a> that was found.
923
<td><p><span class="term"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> <em class="structfield"><code><a name="GnomeVFSFindDirectoryResult.result"></a>result</code></em>;</span></p></td>
924
<td> The <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> that was obtained when finding <em class="parameter"><code>uri</code></em>.
931
<div class="refsect2" lang="en">
932
<a name="GnomeVFSAsyncXferProgressCallback"></a><h3>GnomeVFSAsyncXferProgressCallback ()</h3>
933
<pre class="programlisting">gint (*GnomeVFSAsyncXferProgressCallback)
934
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
935
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressInfo" title="GnomeVFSXferProgressInfo">GnomeVFSXferProgressInfo</a> *info,
936
gpointer user_data);</pre>
938
This callback is passed to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-xfer" title="gnome_vfs_async_xfer ()"><code class="function">gnome_vfs_async_xfer()</code></a> and should
939
be used for user interaction. That said, it serves two purposes:
940
Informing the user about the progress of the operation, and
944
On the one hand, when the transfer progresses normally,
945
i.e. when the <em class="parameter"><code>info</code></em>'s status is <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GNOME-VFS-XFER-PROGRESS-STATUS-OK:CAPS"><code class="literal">GNOME_VFS_XFER_PROGRESS_STATUS_OK</code></a>
946
it is called periodically whenever new progress information
947
is available, and it wasn't called already within the last
951
On the other hand, it is called whenever a decision is
952
requested from the user, i.e. whenever the <em class="parameter"><code>info</code></em>'s <code class="literal">status</code>
953
is not <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GNOME-VFS-XFER-PROGRESS-STATUS-OK:CAPS"><code class="literal">GNOME_VFS_XFER_PROGRESS_STATUS_OK</code></a>.
956
Either way, it acts like <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback" title="GnomeVFSXferProgressCallback ()"><span class="type">GnomeVFSXferProgressCallback</span></a>
957
would act in non-asynchronous mode. The differences in
958
invocation are explained in the <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-xfer" title="gnome_vfs_async_xfer ()"><code class="function">gnome_vfs_async_xfer()</code></a>
962
<div class="variablelist"><table border="0">
963
<col align="left" valign="top">
966
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
967
<td> Handle of the Xfer operation generating the callback.
971
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
972
<td> Information on the current progress in the transfer.
976
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
977
<td> The user data that was passed to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-xfer" title="gnome_vfs_async_xfer ()"><code class="function">gnome_vfs_async_xfer()</code></a>.
981
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
982
<td> <code class="literal">gint</code> depending on the <span class="type">GnomeVFSXferProgressInfo.</span>
983
Please consult <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback" title="GnomeVFSXferProgressCallback ()"><span class="type">GnomeVFSXferProgressCallback</span></a> for details.
991
<div class="refsect2" lang="en">
992
<a name="GnomeVFSCancellation"></a><h3>GnomeVFSCancellation</h3>
993
<pre class="programlisting">typedef struct GnomeVFSCancellation GnomeVFSCancellation;
999
<div class="refsect2" lang="en">
1000
<a name="GnomeVFSContext"></a><h3>GnomeVFSContext</h3>
1001
<pre class="programlisting">typedef struct GnomeVFSContext GnomeVFSContext;
1007
<div class="refsect2" lang="en">
1008
<a name="gnome-vfs-async-set-job-limit"></a><h3>gnome_vfs_async_set_job_limit ()</h3>
1009
<pre class="programlisting">void gnome_vfs_async_set_job_limit (int limit);</pre>
1011
Restrict the number of worker threads used by async operations
1012
to <em class="parameter"><code>limit</code></em>.</p>
1015
<div class="variablelist"><table border="0">
1016
<col align="left" valign="top">
1018
<td><p><span class="term"><em class="parameter"><code>limit</code></em> :</span></p></td>
1019
<td> maximum number of allowable threads.
1025
<div class="refsect2" lang="en">
1026
<a name="gnome-vfs-async-get-job-limit"></a><h3>gnome_vfs_async_get_job_limit ()</h3>
1027
<pre class="programlisting">int gnome_vfs_async_get_job_limit (void);</pre>
1029
Get the current maximum allowable number of
1030
worker threads for async operations.</p>
1033
<div class="variablelist"><table border="0">
1034
<col align="left" valign="top">
1036
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1037
<td> current maximum number of threads.
1043
<div class="refsect2" lang="en">
1044
<a name="gnome-vfs-async-cancel"></a><h3>gnome_vfs_async_cancel ()</h3>
1045
<pre class="programlisting">void gnome_vfs_async_cancel (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle);</pre>
1047
Cancel an asynchronous operation and close all its callbacks.
1050
In a single-threaded application, its guaranteed that if you
1051
call this before the operation finished callback has been called
1052
the callback will never be called.
1055
However, in a multithreaded application, or to be more specific, if
1056
you call gnome_vfs_async_cancel from another thread than the thread
1057
handling the glib mainloop, there is a race condition where if
1058
the operation finished callback was just dispatched, you might
1059
still cancel the operation. So, in this case you need to handle the
1060
fact that the operation callback might still run even though another
1061
thread has cancelled the operation.
1064
One way to avoid problems from this is to mark the data structure you're
1065
using as callback_data as destroyed, and then queue an idle and do the
1066
actual freeing in an idle handler. The idle handler is guaranteed to run
1067
after the callback has been exectuted, so by then it is safe to destroy
1068
the callback_data. The callback handler must handle the case where the
1069
callback_data is marked destroyed by doing nothing.
1072
This is clearly not ideal for multithreaded applications, but as good as
1073
we can with the current API. Eventually we'll have to change the API to
1074
make this work better.</p>
1077
<div class="variablelist"><table border="0">
1078
<col align="left" valign="top">
1080
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
1081
<td> handle of the async operation to be cancelled.
1087
<div class="refsect2" lang="en">
1088
<a name="gnome-vfs-async-open"></a><h3>gnome_vfs_async_open ()</h3>
1089
<pre class="programlisting">void gnome_vfs_async_open (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1090
const gchar *text_uri,
1091
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1093
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
1094
gpointer callback_data);</pre>
1096
Open <em class="parameter"><code>text_uri</code></em> according to mode <em class="parameter"><code>open_mode</code></em>. On return, <em class="parameter"><code>handle_return</code></em> will
1097
contain a pointer to the operation. Once the file has been successfully opened,
1098
<em class="parameter"><code>callback</code></em> will be called with the <span class="type">GnomeVFSResult.</span></p>
1101
<div class="variablelist"><table border="0">
1102
<col align="left" valign="top">
1105
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1106
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1110
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
1111
<td> string of the uri to open.
1115
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1120
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1121
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1122
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign to this job
1123
in allocating threads from the thread pool.
1127
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1128
<td> function to be called when the operation is complete.
1132
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1133
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1140
<div class="refsect2" lang="en">
1141
<a name="gnome-vfs-async-open-uri"></a><h3>gnome_vfs_async_open_uri ()</h3>
1142
<pre class="programlisting">void gnome_vfs_async_open_uri (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1143
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
1144
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1146
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
1147
gpointer callback_data);</pre>
1149
Open <em class="parameter"><code>uri</code></em> according to mode <em class="parameter"><code>open_mode</code></em>. On return, <em class="parameter"><code>handle_return</code></em> will
1150
contain a pointer to the operation. Once the file has been successfully opened,
1151
<em class="parameter"><code>callback</code></em> will be called with the <span class="type">GnomeVFSResult.</span></p>
1154
<div class="variablelist"><table border="0">
1155
<col align="left" valign="top">
1158
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1159
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1163
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1168
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1173
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1174
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1175
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign to this job
1176
in allocating threads from the thread pool.
1180
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1181
<td> function to be called when the operation is complete.
1185
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1186
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1193
<div class="refsect2" lang="en">
1194
<a name="gnome-vfs-async-open-as-channel"></a><h3>gnome_vfs_async_open_as_channel ()</h3>
1195
<pre class="programlisting">void gnome_vfs_async_open_as_channel (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1196
const gchar *text_uri,
1197
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1198
guint advised_block_size,
1200
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenAsChannelCallback" title="GnomeVFSAsyncOpenAsChannelCallback ()">GnomeVFSAsyncOpenAsChannelCallback</a> callback,
1201
gpointer callback_data);</pre>
1202
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1203
<h3 class="title">Warning</h3>
1204
<p><code class="literal">gnome_vfs_async_open_as_channel</code> is deprecated and should not be used in newly-written code.</p>
1207
Open <em class="parameter"><code>text_uri</code></em> as a <span class="type">GIOChannel.</span> Once the channel has been established
1208
<em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em>, the result of the operation,
1209
and if the result was <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>, a reference to a <span class="type">GIOChannel</span> pointing
1210
at <em class="parameter"><code>text_uri</code></em> in <em class="parameter"><code>open_mode</code></em>.
1213
This function has been deprecated due to behaving weirdly which suggests
1214
that it hasn't been used. See bugs <span class="type">157266</span>, <span class="type">157265</span>, <span class="type">157261</span>, <span class="type">138398</span> in
1215
the GNOME Bugzilla. If the *_as_channel functions are needed they should be
1216
fixed and undeprecated.</p>
1219
<div class="variablelist"><table border="0">
1220
<col align="left" valign="top">
1223
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1224
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1228
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
1229
<td> string of the uri to open as a <span class="type">GIOChannel.</span>
1233
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1234
<td> open mode i.e. for reading, writing, random, etc.
1238
<td><p><span class="term"><em class="parameter"><code>advised_block_size</code></em> :</span></p></td>
1239
<td> the preferred block size for <span class="type">GIOChannel</span> to read.
1243
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1244
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1245
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1246
in allocating threads from the thread pool.
1250
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1251
<td> function to be called when the operation is complete.
1255
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1256
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1263
<div class="refsect2" lang="en">
1264
<a name="gnome-vfs-async-open-uri-as-channel"></a><h3>gnome_vfs_async_open_uri_as_channel ()</h3>
1265
<pre class="programlisting">void gnome_vfs_async_open_uri_as_channel (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1266
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
1267
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1268
guint advised_block_size,
1270
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenAsChannelCallback" title="GnomeVFSAsyncOpenAsChannelCallback ()">GnomeVFSAsyncOpenAsChannelCallback</a> callback,
1271
gpointer callback_data);</pre>
1272
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1273
<h3 class="title">Warning</h3>
1274
<p><code class="literal">gnome_vfs_async_open_uri_as_channel</code> is deprecated and should not be used in newly-written code. This function has been deprecated due to behaving weirdly which suggests
1275
that it shouldn't be used. See bugs <span class="type">157266</span>, <span class="type">157265</span>, <span class="type">157261</span>, <span class="type">138398</span> in
1276
the GNOME Bugzilla. If the *_as_channel functions are needed they should be
1277
fixed and undeprecated.</p>
1280
Open <em class="parameter"><code>uri</code></em> as a <span class="type">GIOChannel.</span> Once the channel has been established
1281
<em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em>, the result of the operation,
1282
and if the result was <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>, a reference to a <span class="type">GIOChannel</span> pointing
1283
at <em class="parameter"><code>uri</code></em> in <em class="parameter"><code>open_mode</code></em>.</p>
1286
<div class="variablelist"><table border="0">
1287
<col align="left" valign="top">
1290
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1291
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1295
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1296
<td> uri to open as a <span class="type">GIOChannel.</span>
1300
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1301
<td> open mode i.e. for reading, writing, random, etc.
1305
<td><p><span class="term"><em class="parameter"><code>advised_block_size</code></em> :</span></p></td>
1306
<td> the preferred block size for <span class="type">GIOChannel</span> to read.
1310
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1311
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1312
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1313
in allocating threads from the thread pool.
1317
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1318
<td> function to be called when the operation is complete.
1322
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1323
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1330
<div class="refsect2" lang="en">
1331
<a name="gnome-vfs-async-create"></a><h3>gnome_vfs_async_create ()</h3>
1332
<pre class="programlisting">void gnome_vfs_async_create (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1333
const gchar *text_uri,
1334
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1338
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
1339
gpointer callback_data);</pre>
1341
Create a file at <em class="parameter"><code>uri</code></em> according to mode <em class="parameter"><code>open_mode</code></em>, with permissions <em class="parameter"><code>perm</code></em> (in
1342
the standard UNIX packed bit permissions format). When the create has been completed
1343
<em class="parameter"><code>callback</code></em> will be called with the result code and <em class="parameter"><code>callback_data</code></em>.</p>
1346
<div class="variablelist"><table border="0">
1347
<col align="left" valign="top">
1350
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1351
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1355
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
1356
<td> string representing the uri to create.
1360
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1361
<td> mode to leave the file opened in after creation (or <code class="literal">GNOME_VFS_OPEN_MODE_NONE</code>
1362
to leave the file closed after creation).
1366
<td><p><span class="term"><em class="parameter"><code>exclusive</code></em> :</span></p></td>
1367
<td> whether the file should be created in "exclusive" mode:
1368
i.e. if this flag is nonzero, operation will fail if a file with the
1369
same name already exists.
1373
<td><p><span class="term"><em class="parameter"><code>perm</code></em> :</span></p></td>
1374
<td> bitmap representing the permissions for the newly created file
1379
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1380
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1381
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1382
in allocating threads from the thread pool.
1386
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1387
<td> function to be called when the operation is complete.
1391
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1392
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1399
<div class="refsect2" lang="en">
1400
<a name="gnome-vfs-async-create-uri"></a><h3>gnome_vfs_async_create_uri ()</h3>
1401
<pre class="programlisting">void gnome_vfs_async_create_uri (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1402
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
1403
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1407
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
1408
gpointer callback_data);</pre>
1410
Create a file at <em class="parameter"><code>uri</code></em> according to mode <em class="parameter"><code>open_mode</code></em>, with permissions <em class="parameter"><code>perm</code></em> (in
1411
the standard UNIX packed bit permissions format). When the create has been completed
1412
<em class="parameter"><code>callback</code></em> will be called with the result code and <em class="parameter"><code>callback_data</code></em>.</p>
1415
<div class="variablelist"><table border="0">
1416
<col align="left" valign="top">
1419
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1420
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1424
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1425
<td> uri to create a file at.
1429
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1430
<td> mode to leave the file opened in after creation (or <code class="literal">GNOME_VFS_OPEN_MODE_NONE</code>
1431
to leave the file closed after creation).
1435
<td><p><span class="term"><em class="parameter"><code>exclusive</code></em> :</span></p></td>
1436
<td> Whether the file should be created in "exclusive" mode:
1437
i.e. if this flag is nonzero, operation will fail if a file with the
1438
same name already exists.
1442
<td><p><span class="term"><em class="parameter"><code>perm</code></em> :</span></p></td>
1443
<td> bitmap representing the permissions for the newly created file
1448
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1449
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1450
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1451
in allocating threads from the thread pool.
1455
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1456
<td> function to be called when the operation is complete.
1460
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1461
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1468
<div class="refsect2" lang="en">
1469
<a name="gnome-vfs-async-create-symbolic-link"></a><h3>gnome_vfs_async_create_symbolic_link ()</h3>
1470
<pre class="programlisting">void gnome_vfs_async_create_symbolic_link
1471
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1472
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
1473
const gchar *uri_reference,
1475
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncOpenCallback" title="GnomeVFSAsyncOpenCallback ()">GnomeVFSAsyncOpenCallback</a> callback,
1476
gpointer callback_data);</pre>
1478
Create a symbolic link at <em class="parameter"><code>uri</code></em> pointing to <em class="parameter"><code>uri_reference</code></em>. When the operation
1479
has completed <em class="parameter"><code>callback</code></em> will be called with the result of the operation and
1480
<em class="parameter"><code>callback_data</code></em>.</p>
1483
<div class="variablelist"><table border="0">
1484
<col align="left" valign="top">
1487
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1488
<td> when the function returns, will point to a handle for
1489
the async operation.
1493
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1494
<td> location to create the link at.
1498
<td><p><span class="term"><em class="parameter"><code>uri_reference</code></em> :</span></p></td>
1499
<td> location to point <em class="parameter"><code>uri</code></em> to (can be a uri fragment, i.e. relative).
1503
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1504
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1505
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign to this job
1506
in allocating threads from the thread pool.
1510
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1511
<td> function to be called when the operation is complete.
1515
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1516
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1523
<div class="refsect2" lang="en">
1524
<a name="gnome-vfs-async-create-as-channel"></a><h3>gnome_vfs_async_create_as_channel ()</h3>
1525
<pre class="programlisting">void gnome_vfs_async_create_as_channel (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1526
const gchar *text_uri,
1527
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1531
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCreateAsChannelCallback" title="GnomeVFSAsyncCreateAsChannelCallback ()">GnomeVFSAsyncCreateAsChannelCallback</a> callback,
1532
gpointer callback_data);</pre>
1533
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1534
<h3 class="title">Warning</h3>
1535
<p><code class="literal">gnome_vfs_async_create_as_channel</code> is deprecated and should not be used in newly-written code.</p>
1538
Open <em class="parameter"><code>text_uri</code></em> as a <span class="type">GIOChannel</span>, creating it as necessary. Once the channel has
1539
been established <em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em>, the result of the
1540
operation, and if the result was <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>, a reference to a <span class="type">GIOChannel</span> pointing
1541
at <em class="parameter"><code>text_uri</code></em> in <em class="parameter"><code>open_mode</code></em>.
1544
This function has been deprecated due to behaving weirdly which suggests
1545
that it hasn't been used. See bugs <span class="type">157266</span>, <span class="type">157265</span>, <span class="type">157261</span>, <span class="type">138398</span> in
1546
the GNOME Bugzilla. If the *_as_channel functions are needed they should be
1547
fixed and undeprecated.</p>
1550
<div class="variablelist"><table border="0">
1551
<col align="left" valign="top">
1554
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1555
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1559
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
1560
<td> string of the uri to open as a <span class="type">GIOChannel</span>, creating it as necessary.
1564
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1565
<td> open mode i.e. for reading, writing, random, etc.
1569
<td><p><span class="term"><em class="parameter"><code>exclusive</code></em> :</span></p></td>
1570
<td> replace the file if it already exists.
1574
<td><p><span class="term"><em class="parameter"><code>perm</code></em> :</span></p></td>
1575
<td> standard POSIX-style permissions bitmask, permissions of created file.
1579
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1580
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1581
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1582
in allocating threads from the thread pool.
1586
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1587
<td> function to be called when the operation is complete.
1591
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1592
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1599
<div class="refsect2" lang="en">
1600
<a name="gnome-vfs-async-create-uri-as-channel"></a><h3>gnome_vfs_async_create_uri_as_channel ()</h3>
1601
<pre class="programlisting">void gnome_vfs_async_create_uri_as_channel
1602
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1603
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
1604
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-basic-ops.html#GnomeVFSOpenMode" title="enum GnomeVFSOpenMode">GnomeVFSOpenMode</a> open_mode,
1608
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCreateAsChannelCallback" title="GnomeVFSAsyncCreateAsChannelCallback ()">GnomeVFSAsyncCreateAsChannelCallback</a> callback,
1609
gpointer callback_data);</pre>
1610
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1611
<h3 class="title">Warning</h3>
1612
<p><code class="literal">gnome_vfs_async_create_uri_as_channel</code> is deprecated and should not be used in newly-written code.</p>
1615
Open <em class="parameter"><code>uri</code></em> as a <span class="type">GIOChannel</span>, creating it as necessary. Once the channel has
1616
been established <em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em>, the result of the
1617
operation, and if the result was <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a>, a reference to a <span class="type">GIOChannel</span> pointing
1618
at <em class="parameter"><code>text_uri</code></em> in <em class="parameter"><code>open_mode</code></em>.</p>
1621
<div class="variablelist"><table border="0">
1622
<col align="left" valign="top">
1625
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1626
<td> pointer to a pointer to a <span class="type">GnomeVFSHandle</span> object.
1630
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1631
<td> uri to open as a <span class="type">GIOChannel</span>, creating it as necessary.
1635
<td><p><span class="term"><em class="parameter"><code>open_mode</code></em> :</span></p></td>
1636
<td> open mode i.e. for reading, writing, random, etc.
1640
<td><p><span class="term"><em class="parameter"><code>exclusive</code></em> :</span></p></td>
1641
<td> replace the file if it already exists.
1645
<td><p><span class="term"><em class="parameter"><code>perm</code></em> :</span></p></td>
1646
<td> standard POSIX-style permissions bitmask, permissions of created file.
1650
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1651
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1652
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1653
in allocating threads from the thread pool.
1657
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1658
<td> function to be called when the operation is complete.
1662
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1663
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1668
<p class="since">Since 2.12</p>
1671
<div class="refsect2" lang="en">
1672
<a name="gnome-vfs-async-close"></a><h3>gnome_vfs_async_close ()</h3>
1673
<pre class="programlisting">void gnome_vfs_async_close (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
1674
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncCloseCallback" title="GnomeVFSAsyncCloseCallback ()">GnomeVFSAsyncCloseCallback</a> callback,
1675
gpointer callback_data);</pre>
1677
Close <em class="parameter"><code>handle</code></em> opened with <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#gnome-vfs-async-open" title="gnome_vfs_async_open ()"><code class="function">gnome_vfs_async_open()</code></a>. When the close
1678
has completed, <em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em> and
1679
the result of the operation.</p>
1682
<div class="variablelist"><table border="0">
1683
<col align="left" valign="top">
1686
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
1687
<td> async handle to close.
1691
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1692
<td> function to be called when the operation is complete.
1696
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1697
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1704
<div class="refsect2" lang="en">
1705
<a name="gnome-vfs-async-read"></a><h3>gnome_vfs_async_read ()</h3>
1706
<pre class="programlisting">void gnome_vfs_async_read (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
1709
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncReadCallback" title="GnomeVFSAsyncReadCallback ()">GnomeVFSAsyncReadCallback</a> callback,
1710
gpointer callback_data);</pre>
1712
Read <em class="parameter"><code>bytes</code></em> bytes from the file pointed to be <em class="parameter"><code>handle</code></em> into <em class="parameter"><code>buffer</code></em>.
1713
When the operation is complete, <em class="parameter"><code>callback</code></em> will be called with the
1714
result of the operation and <em class="parameter"><code>callback_data</code></em>.</p>
1717
<div class="variablelist"><table border="0">
1718
<col align="left" valign="top">
1721
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
1722
<td> handle for the file to be read.
1726
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
1727
<td> allocated block of memory to read into.
1731
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
1732
<td> number of bytes to read.
1736
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1737
<td> function to be called when the operation is complete.
1741
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1742
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1749
<div class="refsect2" lang="en">
1750
<a name="gnome-vfs-async-write"></a><h3>gnome_vfs_async_write ()</h3>
1751
<pre class="programlisting">void gnome_vfs_async_write (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
1752
gconstpointer buffer,
1754
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncWriteCallback" title="GnomeVFSAsyncWriteCallback ()">GnomeVFSAsyncWriteCallback</a> callback,
1755
gpointer callback_data);</pre>
1757
Write <em class="parameter"><code>bytes</code></em> bytes from <em class="parameter"><code>buffer</code></em> into the file pointed to be <em class="parameter"><code>handle</code></em>.
1758
When the operation is complete, <em class="parameter"><code>callback</code></em> will be called with the
1759
result of the operation and <em class="parameter"><code>callback_data</code></em>.</p>
1762
<div class="variablelist"><table border="0">
1763
<col align="left" valign="top">
1766
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
1767
<td> handle for the file to be written.
1771
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
1772
<td> block of memory containing data to be written.
1776
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
1777
<td> number of bytes to write.
1781
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1782
<td> function to be called when the operation is complete.
1786
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1787
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1794
<div class="refsect2" lang="en">
1795
<a name="gnome-vfs-async-seek"></a><h3>gnome_vfs_async_seek ()</h3>
1796
<pre class="programlisting">void gnome_vfs_async_seek (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
1797
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-rw-ops.html#GnomeVFSSeekPosition" title="enum GnomeVFSSeekPosition">GnomeVFSSeekPosition</a> whence,
1798
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileOffset" title="GnomeVFSFileOffset">GnomeVFSFileOffset</a> offset,
1799
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncSeekCallback" title="GnomeVFSAsyncSeekCallback ()">GnomeVFSAsyncSeekCallback</a> callback,
1800
gpointer callback_data);</pre>
1802
Set the current position for reading/writing through <em class="parameter"><code>handle</code></em>.
1803
When the operation is complete, <em class="parameter"><code>callback</code></em> will be called with the
1804
result of the operation and <em class="parameter"><code>callback_data</code></em>.</p>
1807
<div class="variablelist"><table border="0">
1808
<col align="left" valign="top">
1811
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
1812
<td> handle for which the current position must be changed.
1816
<td><p><span class="term"><em class="parameter"><code>whence</code></em> :</span></p></td>
1817
<td> integer value representing the starting position.
1821
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
1822
<td> number of bytes to skip from the position specified by <em class="parameter"><code>whence</code></em>.
1823
(a positive value means to move forward; a negative one to move backwards).
1827
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1828
<td> function to be called when the operation is complete.
1832
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1833
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1840
<div class="refsect2" lang="en">
1841
<a name="gnome-vfs-async-get-file-info"></a><h3>gnome_vfs_async_get_file_info ()</h3>
1842
<pre class="programlisting">void gnome_vfs_async_get_file_info (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1844
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
1846
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncGetFileInfoCallback" title="GnomeVFSAsyncGetFileInfoCallback ()">GnomeVFSAsyncGetFileInfoCallback</a> callback,
1847
gpointer callback_data);</pre>
1849
Fetch information about the files indicated in <em class="parameter"><code>uri_list</code></em> and return the
1850
information progressively to <em class="parameter"><code>callback</code></em>.</p>
1853
<div class="variablelist"><table border="0">
1854
<col align="left" valign="top">
1857
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1858
<td> when the function returns, will point to a handle for
1859
the async operation.
1863
<td><p><span class="term"><em class="parameter"><code>uri_list</code></em> :</span></p></td>
1864
<td> a <span class="type">GList</span> of <span class="type">GnomeVFSURIs</span> to fetch information about.
1868
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
1869
<td> packed boolean type providing control over various details
1870
of the get_file_info operation.
1874
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1875
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1876
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1877
in allocating threads from the thread pool.
1881
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1882
<td> function to be called when the operation is complete.
1886
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1887
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1894
<div class="refsect2" lang="en">
1895
<a name="gnome-vfs-async-set-file-info"></a><h3>gnome_vfs_async_set_file_info ()</h3>
1896
<pre class="programlisting">void gnome_vfs_async_set_file_info (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1897
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
1898
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo">GnomeVFSFileInfo</a> *info,
1899
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSSetFileInfoMask" title="enum GnomeVFSSetFileInfoMask">GnomeVFSSetFileInfoMask</a> mask,
1900
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
1902
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncSetFileInfoCallback" title="GnomeVFSAsyncSetFileInfoCallback ()">GnomeVFSAsyncSetFileInfoCallback</a> callback,
1903
gpointer callback_data);</pre>
1905
Set file info details about the file at <em class="parameter"><code>uri</code></em>, such as permissions, name,
1906
owner, and modification time.</p>
1909
<div class="variablelist"><table border="0">
1910
<col align="left" valign="top">
1913
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1914
<td> when the function returns, will point to a handle for
1915
the async operation.
1919
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1920
<td> uri to set the file info of.
1924
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
1925
<td> the struct containing new information about the file.
1929
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
1930
<td> control which fields of <em class="parameter"><code>info</code></em> are to be changed about the file at <em class="parameter"><code>uri</code></em>.
1934
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
1935
<td> packed boolean type providing control over various details
1936
of the set_file_info operation.
1940
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
1941
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
1942
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
1943
in allocating threads from the thread pool.
1947
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1948
<td> function to be called when the operation is complete.
1952
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1953
<td> data to pass to <em class="parameter"><code>callback</code></em>.
1960
<div class="refsect2" lang="en">
1961
<a name="gnome-vfs-async-load-directory"></a><h3>gnome_vfs_async_load_directory ()</h3>
1962
<pre class="programlisting">void gnome_vfs_async_load_directory (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
1963
const gchar *text_uri,
1964
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
1965
guint items_per_notification,
1967
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncDirectoryLoadCallback" title="GnomeVFSAsyncDirectoryLoadCallback ()">GnomeVFSAsyncDirectoryLoadCallback</a> callback,
1968
gpointer callback_data);</pre>
1970
Read the contents of the directory at <em class="parameter"><code>text_uri</code></em>, passing back <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo"><span class="type">GnomeVFSFileInfo</span></a>
1971
structs about each file in the directory to <em class="parameter"><code>callback</code></em>. <em class="parameter"><code>items_per_notification</code></em>
1972
files will be processed between each call to <em class="parameter"><code>callback</code></em>.</p>
1975
<div class="variablelist"><table border="0">
1976
<col align="left" valign="top">
1979
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
1980
<td> when the function returns, will point to a handle for
1981
the async operation.
1985
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
1986
<td> string representing the uri of the directory to be loaded.
1990
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
1991
<td> packed boolean type providing control over various details
1992
of the get_file_info operation.
1996
<td><p><span class="term"><em class="parameter"><code>items_per_notification</code></em> :</span></p></td>
1997
<td> number of files to process in a row before calling <em class="parameter"><code>callback</code></em>
2001
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
2002
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
2003
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign to this job
2004
in allocating threads from the thread pool.
2008
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
2009
<td> function to be called when the operation is complete.
2013
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
2014
<td> data to pass to <em class="parameter"><code>callback</code></em>.
2021
<div class="refsect2" lang="en">
2022
<a name="gnome-vfs-async-load-directory-uri"></a><h3>gnome_vfs_async_load_directory_uri ()</h3>
2023
<pre class="programlisting">void gnome_vfs_async_load_directory_uri (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
2024
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *uri,
2025
<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfoOptions" title="enum GnomeVFSFileInfoOptions">GnomeVFSFileInfoOptions</a> options,
2026
guint items_per_notification,
2028
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncDirectoryLoadCallback" title="GnomeVFSAsyncDirectoryLoadCallback ()">GnomeVFSAsyncDirectoryLoadCallback</a> callback,
2029
gpointer callback_data);</pre>
2031
Read the contents of the directory at <em class="parameter"><code>uri</code></em>, passing back <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-info.html#GnomeVFSFileInfo" title="GnomeVFSFileInfo"><span class="type">GnomeVFSFileInfo</span></a> structs
2032
about each file in the directory to <em class="parameter"><code>callback</code></em>. <em class="parameter"><code>items_per_notification</code></em>
2033
files will be processed between each call to <em class="parameter"><code>callback</code></em>.</p>
2036
<div class="variablelist"><table border="0">
2037
<col align="left" valign="top">
2040
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
2041
<td> when the function returns, will point to a handle for
2042
the async operation.
2046
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
2047
<td> uri of the directory to be loaded.
2051
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
2052
<td> packed boolean type providing control over various details
2053
of the get_file_info operation.
2057
<td><p><span class="term"><em class="parameter"><code>items_per_notification</code></em> :</span></p></td>
2058
<td> number of files to process in a row before calling <em class="parameter"><code>callback</code></em>
2062
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
2063
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
2064
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
2065
in allocating threads from the thread pool.
2069
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
2070
<td> function to be called when the operation is complete.
2074
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
2075
<td> data to pass to <em class="parameter"><code>callback</code></em>.
2082
<div class="refsect2" lang="en">
2083
<a name="gnome-vfs-async-xfer"></a><h3>gnome_vfs_async_xfer ()</h3>
2084
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_async_xfer (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
2085
GList *source_uri_list,
2086
GList *target_uri_list,
2087
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferOptions" title="enum GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
2088
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferErrorMode" title="enum GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
2089
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode" title="enum GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a> overwrite_mode,
2091
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncXferProgressCallback" title="GnomeVFSAsyncXferProgressCallback ()">GnomeVFSAsyncXferProgressCallback</a> progress_update_callback,
2092
gpointer update_callback_data,
2093
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback" title="GnomeVFSXferProgressCallback ()">GnomeVFSXferProgressCallback</a> progress_sync_callback,
2094
gpointer sync_callback_data);</pre>
2096
Performs an Xfer operation in a seperate thread, otherwise like
2097
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#gnome-vfs-xfer-uri-list" title="gnome_vfs_xfer_uri_list ()"><code class="function">gnome_vfs_xfer_uri_list()</code></a>.
2100
See <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncXferProgressCallback" title="GnomeVFSAsyncXferProgressCallback ()"><span class="type">GnomeVFSAsyncXferProgressCallback</span></a> and <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback" title="GnomeVFSXferProgressCallback ()"><span class="type">GnomeVFSXferProgressCallback</span></a> for details on how the
2101
callback mechanism works.
2105
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
2106
<h3 class="title">Note</h3>
2108
<em class="parameter"><code>progress_sync_callback</code></em> should only be used if you want to execute additional
2109
actions that may not wait until after the transfer, for instance because
2110
you have to do them for each transferred file/directory, and that require
2111
a very specific action to be taken. For instance, the Nautilus application
2112
schedules metadata removal/moving/copying at specific phases.
2115
Do not use <em class="parameter"><code>progress_sync_callback</code></em> if you just need user feedback, because
2116
each invocation is expensive, and requires a context switch.
2119
If you use both <em class="parameter"><code>progress_update_callback</code></em> and <em class="parameter"><code>progress_sync_callback</code></em>,
2120
the <em class="parameter"><code>progress_sync_callback</code></em> will always be invoked before the
2121
<em class="parameter"><code>progress_update_callback</code></em>. It is recommended to do conflict
2122
handling in <em class="parameter"><code>progress_update_callback</code></em>, and always return <code class="literal">TRUE</code>
2123
in <em class="parameter"><code>progress_sync_callback</code></em>, because if the Xfer's
2124
<a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferProgressStatus" title="enum GnomeVFSXferProgressStatus"><span class="type">GnomeVFSXferProgressStatus</span></a> is <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GNOME-VFS-XFER-PROGRESS-STATUS-OK:CAPS"><code class="literal">GNOME_VFS_XFER_PROGRESS_STATUS_OK</code></a>,
2125
<em class="parameter"><code>progress_update_callback</code></em> will only be invoked if it hasn't
2126
been invoked within the last 100 milliseconds, and if
2127
<em class="parameter"><code>progress_update_callback</code></em> is not invoked, only
2128
<em class="parameter"><code>progress_sync_callback</code></em> is authoritative for the
2129
further processing, causing abortion if it is <code class="literal">FALSE</code>.
2134
<div class="variablelist"><table border="0">
2135
<col align="left" valign="top">
2138
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
2139
<td> when the function returns, will point to a handle for the operation.
2143
<td><p><span class="term"><em class="parameter"><code>source_uri_list</code></em> :</span></p></td>
2144
<td> A <span class="type">GList</span> of source <span class="type">GnomeVFSURIs.</span>
2148
<td><p><span class="term"><em class="parameter"><code>target_uri_list</code></em> :</span></p></td>
2149
<td> A <span class="type">GList</span> of target <span class="type">GnomeVFSURIs</span>, each corresponding to one URI in
2150
<em class="parameter"><code>source_uri_list</code></em>.
2154
<td><p><span class="term"><em class="parameter"><code>xfer_options</code></em> :</span></p></td>
2155
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-xfer.html#GnomeVFSXferOptions" title="enum GnomeVFSXferOptions"><span class="type">GnomeVFSXferOptions</span></a> defining the desired operation and parameters.
2159
<td><p><span class="term"><em class="parameter"><code>error_mode</code></em> :</span></p></td>
2160
<td> A <span class="type">GnomeVFSErrorMode</span> specifying how to proceed if a VFS error occurs.
2164
<td><p><span class="term"><em class="parameter"><code>overwrite_mode</code></em> :</span></p></td>
2165
<td> A <span class="type">GnomeVFSOverwriteMode</span> specifying how to proceed if a file is being overwritten.
2169
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
2170
<td> A value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
2171
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign this job
2172
in allocating threads from the thread pool.
2176
<td><p><span class="term"><em class="parameter"><code>progress_update_callback</code></em> :</span></p></td>
2177
<td> A <span class="type">GnomeVFSAsyncXferCallback</span> called periodically for
2178
informing the program about progress, and when the program requires responses to
2179
interactive queries (e.g. overwriting files, handling errors, etc).
2183
<td><p><span class="term"><em class="parameter"><code>update_callback_data</code></em> :</span></p></td>
2184
<td> User data to pass to <em class="parameter"><code>progress_update_callback</code></em>.
2188
<td><p><span class="term"><em class="parameter"><code>progress_sync_callback</code></em> :</span></p></td>
2189
<td> An optional <span class="type">GnomeVFSXferCallback</span> called whenever some state changed.
2193
<td><p><span class="term"><em class="parameter"><code>sync_callback_data</code></em> :</span></p></td>
2194
<td> User data to pass to <em class="parameter"><code>progress_sync_callback</code></em>.
2198
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2199
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the paramaters were in order,
2200
or <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-BAD-PARAMETERS:CAPS"><code class="literal">GNOME_VFS_ERROR_BAD_PARAMETERS</code></a> if something was wrong in the passed in arguments.
2207
<div class="refsect2" lang="en">
2208
<a name="gnome-vfs-async-find-directory"></a><h3>gnome_vfs_async_find_directory ()</h3>
2209
<pre class="programlisting">void gnome_vfs_async_find_directory (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> **handle_return,
2210
GList *near_uri_list,
2211
<a class="link" href="gnome-vfs-2.0-gnome-vfs-directory-find-ops.html#GnomeVFSFindDirectoryKind" title="enum GnomeVFSFindDirectoryKind">GnomeVFSFindDirectoryKind</a> kind,
2212
gboolean create_if_needed,
2213
gboolean find_if_needed,
2216
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFindDirectoryCallback" title="GnomeVFSAsyncFindDirectoryCallback ()">GnomeVFSAsyncFindDirectoryCallback</a> callback,
2217
gpointer user_data);</pre>
2219
Used to return special directories such as Trash and Desktop from different
2223
There is quite a complicated logic behind finding/creating a Trash directory
2224
and you need to be aware of some implications:
2225
Finding the Trash the first time when using the file method may be pretty
2226
expensive. A cache file is used to store the location of that Trash file
2228
If <em class="parameter"><code>create_if_needed</code></em> is specified without <em class="parameter"><code>find_if_needed</code></em>, you may end up
2229
creating a Trash file when there already is one. Your app should start out
2230
by doing a gnome_vfs_find_directory with the <em class="parameter"><code>find_if_needed</code></em> to avoid this
2231
and then use the <em class="parameter"><code>create_if_needed</code></em> flag to create Trash lazily when it is
2232
needed for throwing away an item on a given disk.
2235
When the operation has completed, <em class="parameter"><code>callback</code></em> will be called with the result
2236
of the operation and <em class="parameter"><code>user_data</code></em>.</p>
2239
<div class="variablelist"><table border="0">
2240
<col align="left" valign="top">
2243
<td><p><span class="term"><em class="parameter"><code>handle_return</code></em> :</span></p></td>
2244
<td> when the function returns, will point to a handle for the operation.
2248
<td><p><span class="term"><em class="parameter"><code>near_uri_list</code></em> :</span></p></td>
2249
<td> a <span class="type">GList</span> of <span class="type">GnomeVFSURIs</span>, find a special directory on the same
2250
volume as <em class="parameter"><code>near_uri_list</code></em>.
2254
<td><p><span class="term"><em class="parameter"><code>kind</code></em> :</span></p></td>
2255
<td> kind of special directory.
2259
<td><p><span class="term"><em class="parameter"><code>create_if_needed</code></em> :</span></p></td>
2260
<td> if directory we are looking for does not exist, try to create it.
2264
<td><p><span class="term"><em class="parameter"><code>find_if_needed</code></em> :</span></p></td>
2265
<td> if we don't know where the directory is yet, look for it.
2269
<td><p><span class="term"><em class="parameter"><code>permissions</code></em> :</span></p></td>
2270
<td> if creating, use these permissions.
2274
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
2275
<td> a value from <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MIN:CAPS" title="GNOME_VFS_PRIORITY_MIN"><code class="literal">GNOME_VFS_PRIORITY_MIN</code></a> to <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-MAX:CAPS" title="GNOME_VFS_PRIORITY_MAX"><code class="literal">GNOME_VFS_PRIORITY_MAX</code></a> (normally
2276
should be <a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GNOME-VFS-PRIORITY-DEFAULT:CAPS" title="GNOME_VFS_PRIORITY_DEFAULT"><code class="literal">GNOME_VFS_PRIORITY_DEFAULT</code></a>) indicating the priority to assign to this job
2277
in allocating threads from the thread pool.
2281
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
2282
<td> function to be called when the operation is complete.
2286
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
2287
<td> data to pass to <em class="parameter"><code>callback</code></em>.
2294
<div class="refsect2" lang="en">
2295
<a name="gnome-vfs-async-file-control"></a><h3>gnome_vfs_async_file_control ()</h3>
2296
<pre class="programlisting">void gnome_vfs_async_file_control (<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncHandle" title="GnomeVFSAsyncHandle">GnomeVFSAsyncHandle</a> *handle,
2297
const char *operation,
2298
gpointer operation_data,
2299
GDestroyNotify operation_data_destroy_func,
2300
<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSAsyncFileControlCallback" title="GnomeVFSAsyncFileControlCallback ()">GnomeVFSAsyncFileControlCallback</a> callback,
2301
gpointer callback_data);</pre>
2303
Execute a backend dependent operation specified by the string <em class="parameter"><code>operation</code></em>.
2304
This is typically used for specialized vfs backends that need additional
2305
operations that gnome-vfs doesn't have. Compare it to the unix call <code class="function">ioctl()</code>.
2306
The format of <em class="parameter"><code>operation_data</code></em> depends on the operation. Operation that are
2307
backend specific are normally namespaced by their module name.
2310
When the operation is complete, <em class="parameter"><code>callback</code></em> will be called with the
2311
result of the operation, <em class="parameter"><code>operation_data</code></em> and <em class="parameter"><code>callback_data</code></em>.</p>
2314
<div class="variablelist"><table border="0">
2315
<col align="left" valign="top">
2318
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
2319
<td> handle of the file to affect.
2323
<td><p><span class="term"><em class="parameter"><code>operation</code></em> :</span></p></td>
2324
<td> operation to execute.
2328
<td><p><span class="term"><em class="parameter"><code>operation_data</code></em> :</span></p></td>
2329
<td> data needed to execute the operation.
2333
<td><p><span class="term"><em class="parameter"><code>operation_data_destroy_func</code></em> :</span></p></td>
2334
<td> callback to destroy <em class="parameter"><code>operation_data</code></em> when its no longer needed.
2338
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
2339
<td> function to be called when the <em class="parameter"><code>operation</code></em> is complete.
2343
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
2344
<td> data to pass to <em class="parameter"><code>callback</code></em>.
2349
<p class="since">Since 2.2</p>
2352
<div class="refsect2" lang="en">
2353
<a name="gnome-vfs-find-directory-result-dup"></a><h3>gnome_vfs_find_directory_result_dup ()</h3>
2354
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a>* gnome_vfs_find_directory_result_dup
2355
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a> *result);</pre>
2357
Duplicates <em class="parameter"><code>result</code></em>.
2360
Note: The internal uri is not duplicated but its
2361
refcount is incremented.</p>
2364
<div class="variablelist"><table border="0">
2365
<col align="left" valign="top">
2368
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
2369
<td> a <span class="type">GnomeVFSFindDirectoryResult.</span>
2373
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2374
<td> A 1:1 copy of <em class="parameter"><code>result</code></em>.
2380
<p class="since">Since 2.12</p>
2383
<div class="refsect2" lang="en">
2384
<a name="gnome-vfs-find-directory-result-free"></a><h3>gnome_vfs_find_directory_result_free ()</h3>
2385
<pre class="programlisting">void gnome_vfs_find_directory_result_free
2386
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-async-ops.html#GnomeVFSFindDirectoryResult" title="GnomeVFSFindDirectoryResult">GnomeVFSFindDirectoryResult</a> *result);</pre>
2388
Unrefs the inner uri object and frees the memory
2389
allocated for <em class="parameter"><code>result</code></em>.</p>
2392
<div class="variablelist"><table border="0">
2393
<col align="left" valign="top">
2395
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
2396
<td> a <span class="type">GnomeVFSFindDirectoryResult.</span>
2400
<p class="since">Since 2.12</p>
2404
<div class="footer">
2406
Generated by GTK-Doc V1.12</div>