This file is indexed.

/usr/share/gtk-doc/html/gdata/GDataDocumentsUploadQuery.html is in libgdata-doc 0.14.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GData Reference Manual: GDataDocumentsUploadQuery</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GData Reference Manual">
<link rel="up" href="ch16.html" title="Google Documents API">
<link rel="prev" href="GDataDocumentsQuery.html" title="GDataDocumentsQuery">
<link rel="next" href="GDataDocumentsEntry.html" title="GDataDocumentsEntry">
<meta name="generator" content="GTK-Doc V1.19.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left">
<a href="#" class="shortcut">Top</a>
                   | 
                  <a href="#GDataDocumentsUploadQuery.description" class="shortcut">Description</a>
                   | 
                  <a href="#GDataDocumentsUploadQuery.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GDataDocumentsUploadQuery.properties" class="shortcut">Properties</a>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch16.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GDataDocumentsQuery.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GDataDocumentsEntry.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GDataDocumentsUploadQuery"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GDataDocumentsUploadQuery.top_of_page"></a>GDataDocumentsUploadQuery</span></h2>
<p>GDataDocumentsUploadQuery — GData Documents upload query object</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GDataDocumentsUploadQuery.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="GDataDocumentsUploadQuery.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdata/services/documents/gdata-documents-upload-query.h&gt;

                    <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery-struct" title="GDataDocumentsUploadQuery">GDataDocumentsUploadQuery</a>;
                    <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQueryClass" title="GDataDocumentsUploadQueryClass">GDataDocumentsUploadQueryClass</a>;
<a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="returnvalue">GDataDocumentsUploadQuery</span></a> * <a class="link" href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-new" title="gdata_documents_upload_query_new ()">gdata_documents_upload_query_new</a>
                                                        (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-build-uri" title="gdata_documents_upload_query_build_uri ()">gdata_documents_upload_query_build_uri</a>
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>);
<a class="link" href="GDataDocumentsFolder.html" title="GDataDocumentsFolder"><span class="returnvalue">GDataDocumentsFolder</span></a> * <a class="link" href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-get-folder" title="gdata_documents_upload_query_get_folder ()">gdata_documents_upload_query_get_folder</a>
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-set-folder" title="gdata_documents_upload_query_set_folder ()">gdata_documents_upload_query_set_folder</a>
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDataDocumentsFolder.html" title="GDataDocumentsFolder"><span class="type">GDataDocumentsFolder</span></a> *folder</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-get-convert" title="gdata_documents_upload_query_get_convert ()">gdata_documents_upload_query_get_convert</a>
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-set-convert" title="gdata_documents_upload_query_set_convert ()">gdata_documents_upload_query_set_convert</a>
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> convert</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GDataDocumentsUploadQuery.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GDataDocumentsUploadQuery
</pre>
</div>
<div class="refsect1">
<a name="GDataDocumentsUploadQuery.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery--convert" title='The "convert" property'>convert</a>"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
  "<a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery--folder" title='The "folder" property'>folder</a>"                   <a class="link" href="GDataDocumentsFolder.html" title="GDataDocumentsFolder"><span class="type">GDataDocumentsFolder</span></a>*  : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GDataDocumentsUploadQuery.description"></a><h2>Description</h2>
<p>
<a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> is a collection of parameters for document uploads to Google Documents, allowing various options to be set when uploading
a document for the first time. For example, the destination folder for the uploaded document may be specified; or whether to automatically convert
the document to a common format.
</p>
<p>
<a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> is designed as an object (rather than a fixed struct or set of function arguments) to allow for easy additions of new
Google Documents features in the future.
</p>
<p>
</p>
<div class="example">
<a name="id-1.5.5.5.7.4.1"></a><p class="title"><b>Example 31. Uploading an Arbitrary File from Disk</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">GDataDocumentsService</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">service</span><span class="symbol">;</span>
<span class="usertype">GDataDocumentsDocument</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">document</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">uploaded_document</span><span class="symbol">;</span>
<span class="usertype">GFile</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">arbitrary_file</span><span class="symbol">;</span>
<span class="usertype">GFileInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">file_info</span><span class="symbol">;</span>
<span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">slug</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">content_type</span><span class="symbol">;</span>
<span class="usertype">goffset</span><span class="normal"> file_size</span><span class="symbol">;</span>
<span class="usertype">GDataDocumentsUploadQuery</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">upload_query</span><span class="symbol">;</span>
<span class="usertype">GFileInputStream</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">file_stream</span><span class="symbol">;</span>
<span class="usertype">GDataUploadStream</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">upload_stream</span><span class="symbol">;</span>
<span class="usertype">GError</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">error </span><span class="symbol">=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>

<span class="comment">/* Create a service. */</span>
<span class="normal">service </span><span class="symbol">=</span><span class="normal"> </span><span class="function">create_documents_service</span><span class="normal"> </span><span class="symbol">();</span>

<span class="comment">/* Get the file to upload. */</span>
<span class="normal">arbitrary_file </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GFile.html#g-file-new-for-path">g_file_new_for_path</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"arbitrary-file.bin"</span><span class="symbol">);</span>

<span class="comment">/* Get the file's display name, content type and size. */</span>
<span class="normal">file_info </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GFile.html#g-file-query-info">g_file_query_info</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">arbitrary_file</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/gio/unstable/GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-DISPLAY-NAME:CAPS">G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</a> </span><span class="string">","</span><span class="normal"> <a href="http://library.gnome.org/devel/gio/unstable/GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-CONTENT-TYPE:CAPS">G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</a> </span><span class="string">","</span>
<span class="normal">                               <a href="http://library.gnome.org/devel/gio/unstable/GFileInfo.html#G-FILE-ATTRIBUTE-STANDARD-SIZE:CAPS">G_FILE_ATTRIBUTE_STANDARD_SIZE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/gio/unstable/GFile.html#G-FILE-QUERY-INFO-NONE:CAPS">G_FILE_QUERY_INFO_NONE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>

<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error getting arbitrary file information: %s"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">arbitrary_file</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>
<span class="normal">    </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span>

<span class="normal">slug </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GFileInfo.html#g-file-info-get-display-name">g_file_info_get_display_name</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_info</span><span class="symbol">);</span>
<span class="normal">content_type </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GFileInfo.html#g-file-info-get-content-type">g_file_info_get_content_type</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_info</span><span class="symbol">);</span>
<span class="normal">file_size </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GFileInfo.html#g-file-info-get-size">g_file_info_get_size</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_info</span><span class="symbol">);</span>

<span class="comment">/* Get an input stream for the file. */</span>
<span class="normal">file_stream </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GFile.html#g-file-read">g_file_read</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">arbitrary_file</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>

<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">arbitrary_file</span><span class="symbol">);</span>

<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error getting arbitrary file stream: %s"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_info</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>
<span class="normal">    </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span>

<span class="comment">/* Create the file metadata to upload. */</span>
<span class="normal">document </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataDocumentsDocument.html#gdata-documents-document-new">gdata_documents_document_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="function"><a href="GDataEntry.html#gdata-entry-set-title">gdata_entry_set_title</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GDATA_ENTRY</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">document</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"Title for My Arbitrary File"</span><span class="symbol">);</span>

<span class="comment">/* Build the upload query and set the upload to not be converted to a standard format. */</span>
<span class="normal">upload_query </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-new">gdata_documents_upload_query_new</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="function"><a href="GDataDocumentsUploadQuery.html#gdata-documents-upload-query-set-convert">gdata_documents_upload_query_set_convert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">upload_query</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>

<span class="comment">/* Get an upload stream for the file. */</span>
<span class="normal">upload_stream </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataDocumentsService.html#gdata-documents-service-upload-document-resumable">gdata_documents_service_upload_document_resumable</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">,</span><span class="normal"> document</span><span class="symbol">,</span><span class="normal"> slug</span><span class="symbol">,</span><span class="normal"> content_type</span><span class="symbol">,</span><span class="normal"> file_size</span><span class="symbol">,</span><span class="normal"> upload_query</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>

<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">upload_query</span><span class="symbol">);</span>
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">document</span><span class="symbol">);</span>
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_info</span><span class="symbol">);</span>

<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error getting upload stream: %s"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_stream</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>
<span class="normal">    </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span>

<span class="comment">/* Upload the document. This is a blocking operation, and should normally be done asynchronously. */</span>
<span class="function"><a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html#g-output-stream-splice">g_output_stream_splice</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">G_OUTPUT_STREAM</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">upload_stream</span><span class="symbol">),</span><span class="normal"> </span><span class="function">G_INPUT_STREAM</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_stream</span><span class="symbol">),</span>
<span class="normal">                        <a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html#G-OUTPUT-STREAM-SPLICE-CLOSE-SOURCE:CAPS">G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE</a> </span><span class="symbol">|</span><span class="normal"> <a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html#G-OUTPUT-STREAM-SPLICE-CLOSE-TARGET:CAPS">G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>

<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">file_stream</span><span class="symbol">);</span>

<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error splicing streams: %s"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">upload_stream</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>
<span class="normal">    </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span>

<span class="comment">/* Finish off the upload by parsing the returned updated document metadata entry. */</span>
<span class="normal">uploaded_document </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataDocumentsService.html#gdata-documents-service-finish-upload">gdata_documents_service_finish_upload</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">,</span><span class="normal"> upload_stream</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>

<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">upload_stream</span><span class="symbol">);</span>
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>

<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error uploading file: %s"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="normal">    </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span>

<span class="comment">/* Do something with the uploaded document. */</span>

<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">uploaded_document</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p><br class="example-break">
</p>
</div>
<div class="refsect1">
<a name="GDataDocumentsUploadQuery.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GDataDocumentsUploadQuery-struct"></a><h3>GDataDocumentsUploadQuery</h3>
<pre class="programlisting">typedef struct _GDataDocumentsUploadQuery GDataDocumentsUploadQuery;</pre>
<p>
All the fields in the <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> structure are private and should never be accessed directly.
</p>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="GDataDocumentsUploadQueryClass"></a><h3>GDataDocumentsUploadQueryClass</h3>
<pre class="programlisting">typedef struct {
} GDataDocumentsUploadQueryClass;
</pre>
<p>
All the fields in the <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQueryClass" title="GDataDocumentsUploadQueryClass"><span class="type">GDataDocumentsUploadQueryClass</span></a> structure are private and should never be accessed directly.
</p>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-documents-upload-query-new"></a><h3>gdata_documents_upload_query_new ()</h3>
<pre class="programlisting"><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="returnvalue">GDataDocumentsUploadQuery</span></a> * gdata_documents_upload_query_new
                                                        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Constructs a new empty <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>; unref with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-documents-upload-query-build-uri"></a><h3>gdata_documents_upload_query_build_uri ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             gdata_documents_upload_query_build_uri
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>);</pre>
<p>
Builds an upload URI suitable for passing to <a class="link" href="GDataUploadStream.html#gdata-upload-stream-new-resumable" title="gdata_upload_stream_new_resumable ()"><code class="function">gdata_upload_stream_new_resumable()</code></a> in order to upload a document to Google Documents as described in
the
<a class="ulink" href="https://developers.google.com/google-apps/documents-list/#uploading_a_new_document_or_file_with_both_metadata_and_content" target="_top">
online documentation</a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a complete upload URI; free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-documents-upload-query-get-folder"></a><h3>gdata_documents_upload_query_get_folder ()</h3>
<pre class="programlisting"><a class="link" href="GDataDocumentsFolder.html" title="GDataDocumentsFolder"><span class="returnvalue">GDataDocumentsFolder</span></a> * gdata_documents_upload_query_get_folder
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>);</pre>
<p>
Gets <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery--folder" title='The "folder" property'><span class="type">"folder"</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the folder to upload into, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-documents-upload-query-set-folder"></a><h3>gdata_documents_upload_query_set_folder ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdata_documents_upload_query_set_folder
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDataDocumentsFolder.html" title="GDataDocumentsFolder"><span class="type">GDataDocumentsFolder</span></a> *folder</code></em>);</pre>
<p>
Sets <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery--folder" title='The "folder" property'><span class="type">"folder"</span></a> to <em class="parameter"><code>folder</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>folder</code></em> :</span></p></td>
<td>a new folder to upload into, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-documents-upload-query-get-convert"></a><h3>gdata_documents_upload_query_get_convert ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdata_documents_upload_query_get_convert
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>);</pre>
<p>
Gets <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery--convert" title='The "convert" property'><span class="type">"convert"</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to convert documents to common formats, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to upload them unmodified</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-documents-upload-query-set-convert"></a><h3>gdata_documents_upload_query_set_convert ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdata_documents_upload_query_set_convert
                                                        (<em class="parameter"><code><a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> convert</code></em>);</pre>
<p>
Sets <a class="link" href="GDataDocumentsUploadQuery.html#GDataDocumentsUploadQuery--convert" title='The "convert" property'><span class="type">"convert"</span></a> to <em class="parameter"><code>convert</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>a <a class="link" href="GDataDocumentsUploadQuery.html" title="GDataDocumentsUploadQuery"><span class="type">GDataDocumentsUploadQuery</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>convert</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to convert documents to common formats, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to upload them unmodified</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.13.0</p>
</div>
</div>
<div class="refsect1">
<a name="GDataDocumentsUploadQuery.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GDataDocumentsUploadQuery--convert"></a><h3>The <code class="literal">"convert"</code> property</h3>
<pre class="programlisting">  "convert"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
<p>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to automatically convert the uploaded document into a standard format (such as a text document, spreadsheet, presentation, etc.).
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to upload the document without converting it; this allows for arbitrary files to be uploaded to Google Documents.
</p>
<p>
For more information, see the
<a class="ulink" href="https://developers.google.com/google-apps/documents-list/#creating_or_uploading_files" target="_top">online documentation</a>.
</p>
<p>
Note that uploading with this property set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will only have an effect when using <a class="link" href="GDataDocumentsService.html#gdata-documents-service-update-document-resumable" title="gdata_documents_service_update_document_resumable ()"><code class="function">gdata_documents_service_update_document_resumable()</code></a>
and not <a class="link" href="GDataDocumentsService.html#gdata-documents-service-update-document" title="gdata_documents_service_update_document ()"><code class="function">gdata_documents_service_update_document()</code></a>. Additionally, the <a class="link" href="GDataDocumentsDocument.html" title="GDataDocumentsDocument"><span class="type">GDataDocumentsDocument</span></a> passed to
<a class="link" href="GDataDocumentsService.html#gdata-documents-service-update-document-resumable" title="gdata_documents_service_update_document_resumable ()"><code class="function">gdata_documents_service_update_document_resumable()</code></a> must be a <a class="link" href="GDataDocumentsDocument.html" title="GDataDocumentsDocument"><span class="type">GDataDocumentsDocument</span></a> if this property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, and a subclass of it
otherwise.
</p>
<p>Default value: TRUE</p>
<p class="since">Since 0.13.0</p>
</div>
<hr>
<div class="refsect2">
<a name="GDataDocumentsUploadQuery--folder"></a><h3>The <code class="literal">"folder"</code> property</h3>
<pre class="programlisting">  "folder"                   <a class="link" href="GDataDocumentsFolder.html" title="GDataDocumentsFolder"><span class="type">GDataDocumentsFolder</span></a>*  : Read / Write</pre>
<p>
Folder to upload the document into. If this is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the document will be uploaded into the root folder.
</p>
<p class="since">Since 0.13.0</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19.1</div>
</body>
</html>