Imported Upstream version 2.28.6
[platform/upstream/pygobject2.git] / gio / gio.defs
1 ;; -*- scheme -*-
2
3 (include "gio-types.defs")
4
5 ;; From gappinfo.h
6
7 (define-function app_info_get_type
8   (c-name "g_app_info_get_type")
9   (return-type "GType")
10 )
11
12 (define-function app_launch_context_get_type
13   (c-name "g_app_launch_context_get_type")
14   (return-type "GType")
15 )
16
17 (define-function app_info_create_from_commandline
18   (c-name "g_app_info_create_from_commandline")
19   (is-constructor-of "GAppInfo")
20   (return-type "GAppInfo*")
21   (parameters
22     '("const-char*" "commandline")
23     '("const-char*" "application_name" (null-ok) (default "NULL"))
24     '("GAppInfoCreateFlags" "flags" (default "G_APP_INFO_CREATE_NONE"))
25     '("GError**" "error")
26   )
27 )
28
29 (define-method dup
30   (of-object "GAppInfo")
31   (c-name "g_app_info_dup")
32   (return-type "GAppInfo*")
33   (caller-owns-return #t)
34 )
35
36 (define-method equal
37   (of-object "GAppInfo")
38   (c-name "g_app_info_equal")
39   (return-type "gboolean")
40   (parameters
41     '("GAppInfo*" "appinfo2")
42   )
43 )
44
45 (define-method get_id
46   (of-object "GAppInfo")
47   (c-name "g_app_info_get_id")
48   (return-type "const-char*")
49 )
50
51 (define-method get_name
52   (of-object "GAppInfo")
53   (c-name "g_app_info_get_name")
54   (return-type "const-char*")
55 )
56
57 (define-method get_description
58   (of-object "GAppInfo")
59   (c-name "g_app_info_get_description")
60   (return-type "const-char*")
61 )
62
63 (define-method get_executable
64   (of-object "GAppInfo")
65   (c-name "g_app_info_get_executable")
66   (return-type "const-char*")
67 )
68
69 (define-method get_icon
70   (of-object "GAppInfo")
71   (c-name "g_app_info_get_icon")
72   (return-type "GIcon*")
73 )
74
75 ;;
76 ;; wrapped in gappinfo.override
77 ;;
78 (define-method launch
79   (docstring
80   "launch (files=None, launch_context=None) -> gboolean\n"
81   "\n"
82   "Launches the application. Passes files to the launched application\n"
83   "as arguments, using the optional launch_context to get information\n"
84   "about the details of the launcher (like what screen it is on).\n"
85   "On error, error will be set accordingly.\n\n"
86   "Note that even if the launch is successful the application launched\n"
87   "can fail to start if it runs into problems during startup.\n"
88   "There is no way to detect this.\n\n"
89   "Some URIs can be changed when passed through a gio.File\n"
90   "(for instance unsupported uris with strange formats like mailto:),\n"
91   "so if you have a textual uri you want to pass in as argument,\n"
92   "consider using gio.AppInfo.launch_uris() instead."
93   )
94   (of-object "GAppInfo")
95   (c-name "g_app_info_launch")
96   (return-type "gboolean")
97   (parameters
98     '("GList*" "files")
99     '("GAppLaunchContext*" "launch_context")
100     '("GError**" "error")
101   )
102 )
103
104 (define-method supports_uris
105   (of-object "GAppInfo")
106   (c-name "g_app_info_supports_uris")
107   (return-type "gboolean")
108 )
109
110 (define-method supports_files
111   (of-object "GAppInfo")
112   (c-name "g_app_info_supports_files")
113   (return-type "gboolean")
114 )
115
116 ;;
117 ;; wrapped in gappinfo.override
118 ;;
119 (define-method launch_uris
120   (docstring
121   "launch_uris (files=None, launch_context=None) -> gboolean\n"
122   "\n"
123   "Launches the application. Passes files to the launched application\n"
124   "as arguments, using the optional launch_context to get information\n"
125   "about the details of the launcher (like what screen it is on).\n"
126   "On error, error will be set accordingly.\n\n"
127   "Note that even if the launch is successful the application launched\n"
128   "can fail to start if it runs into problems during startup.\n"
129   "There is no way to detect this.\n\n"
130   )
131   (of-object "GAppInfo")
132   (c-name "g_app_info_launch_uris")
133   (return-type "gboolean")
134   (parameters
135     '("GList*" "uris")
136     '("GAppLaunchContext*" "launch_context")
137     '("GError**" "error")
138   )
139 )
140
141 (define-method should_show
142   (of-object "GAppInfo")
143   (c-name "g_app_info_should_show")
144   (return-type "gboolean")
145 )
146
147 (define-method set_as_default_for_type
148   (of-object "GAppInfo")
149   (c-name "g_app_info_set_as_default_for_type")
150   (return-type "gboolean")
151   (parameters
152     '("const-char*" "content_type")
153     '("GError**" "error")
154   )
155 )
156
157 (define-method set_as_default_for_extension
158   (of-object "GAppInfo")
159   (c-name "g_app_info_set_as_default_for_extension")
160   (return-type "gboolean")
161   (parameters
162     '("const-char*" "extension")
163     '("GError**" "error")
164   )
165 )
166
167 (define-method add_supports_type
168   (of-object "GAppInfo")
169   (c-name "g_app_info_add_supports_type")
170   (return-type "gboolean")
171   (parameters
172     '("const-char*" "content_type")
173     '("GError**" "error")
174   )
175 )
176
177 (define-method can_remove_supports_type
178   (of-object "GAppInfo")
179   (c-name "g_app_info_can_remove_supports_type")
180   (return-type "gboolean")
181 )
182
183 (define-method remove_supports_type
184   (of-object "GAppInfo")
185   (c-name "g_app_info_remove_supports_type")
186   (return-type "gboolean")
187   (parameters
188     '("const-char*" "content_type")
189     '("GError**" "error")
190   )
191 )
192
193 ;;
194 ;; wrapped in gio.override
195 ;;
196 (define-function app_info_get_all
197   (c-name "g_app_info_get_all")
198   (return-type "GList*")
199 )
200
201 ;;
202 ;; wrapped in gio.override
203 ;;
204 (define-function app_info_get_all_for_type
205   (c-name "g_app_info_get_all_for_type")
206   (return-type "GList*")
207   (parameters
208     '("const-char*" "content_type")
209   )
210 )
211
212 (define-function app_info_get_default_for_type
213   (c-name "g_app_info_get_default_for_type")
214   (return-type "GAppInfo*")
215   (parameters
216     '("const-char*" "content_type")
217     '("gboolean" "must_support_uris")
218   )
219 )
220
221 (define-function app_info_get_default_for_uri_scheme
222   (c-name "g_app_info_get_default_for_uri_scheme")
223   (return-type "GAppInfo*")
224   (parameters
225     '("const-char*" "uri_scheme")
226   )
227 )
228
229 (define-function app_launch_context_new
230   (c-name "g_app_launch_context_new")
231   (is-constructor-of "GAppLaunchContext")
232   (return-type "GAppLaunchContext*")
233 )
234
235 ;;
236 ;; wrapped in gapplaunchcontext.override
237 ;;
238 (define-method get_display
239   (of-object "GAppLaunchContext")
240   (c-name "g_app_launch_context_get_display")
241   (return-type "char*")
242   (parameters
243     '("GAppInfo*" "info")
244     '("GList*" "files")
245   )
246 )
247
248 ;;
249 ;; wrapped in gapplaunchcontext.override
250 ;;
251 (define-method get_startup_notify_id
252   (of-object "GAppLaunchContext")
253   (c-name "g_app_launch_context_get_startup_notify_id")
254   (return-type "char*")
255   (parameters
256     '("GAppInfo*" "info")
257     '("GList*" "files")
258   )
259 )
260
261 (define-method launch_failed
262   (of-object "GAppLaunchContext")
263   (c-name "g_app_launch_context_launch_failed")
264   (return-type "none")
265   (parameters
266     '("const-char*" "startup_notify_id")
267   )
268 )
269
270 (define-function app_info_reset_type_associations
271   (c-name "g_app_info_reset_type_associations")
272   (return-type "none")
273   (parameters
274     '("const-char*" "content_type")
275   )
276 )
277
278 (define-method can_delete
279   (of-object "GAppInfo")
280   (c-name "g_app_info_can_delete")
281   (return-type "gboolean")
282 )
283
284 (define-method delete
285   (of-object "GAppInfo")
286   (c-name "g_app_info_delete")
287   (return-type "gboolean")
288 )
289
290 (define-method get_commandline
291   (of-object "GAppInfo")
292   (c-name "g_app_info_get_commandline")
293   (return-type "const-char*")
294 )
295
296
297
298 ;; From gasyncinitable.h
299
300 (define-function async_initable_get_type
301   (c-name "g_async_initable_get_type")
302   (return-type "GType")
303 )
304
305 (define-method init_async
306   (of-object "GAsyncInitable")
307   (c-name "g_async_initable_init_async")
308   (return-type "none")
309   (parameters
310     '("int" "io_priority")
311     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
312     '("GAsyncReadyCallback" "callback")
313     '("gpointer" "user_data")
314   )
315 )
316
317 (define-method init_finish
318   (of-object "GAsyncInitable")
319   (c-name "g_async_initable_init_finish")
320   (return-type "gboolean")
321   (parameters
322     '("GAsyncResult*" "res")
323     '("GError**" "error")
324   )
325 )
326
327 (define-function async_initable_new_async
328   (c-name "g_async_initable_new_async")
329   (return-type "none")
330   (parameters
331     '("GType" "object_type")
332     '("int" "io_priority")
333     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
334     '("GAsyncReadyCallback" "callback")
335     '("gpointer" "user_data")
336     '("const-gchar*" "first_property_name")
337   )
338   (varargs #t)
339 )
340
341 (define-function async_initable_newv_async
342   (c-name "g_async_initable_newv_async")
343   (return-type "none")
344   (parameters
345     '("GType" "object_type")
346     '("guint" "n_parameters")
347     '("GParameter*" "parameters")
348     '("int" "io_priority")
349     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
350     '("GAsyncReadyCallback" "callback")
351     '("gpointer" "user_data")
352   )
353 )
354
355 (define-function async_initable_new_valist_async
356   (c-name "g_async_initable_new_valist_async")
357   (return-type "none")
358   (parameters
359     '("GType" "object_type")
360     '("const-gchar*" "first_property_name")
361     '("va_list" "var_args")
362     '("int" "io_priority")
363     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
364     '("GAsyncReadyCallback" "callback")
365     '("gpointer" "user_data")
366   )
367 )
368
369 (define-method new_finish
370   (of-object "GAsyncInitable")
371   (c-name "g_async_initable_new_finish")
372   (return-type "GObject*")
373   (parameters
374     '("GAsyncResult*" "res")
375     '("GError**" "error")
376   )
377 )
378
379
380
381 ;; From gasyncresult.h
382
383 (define-function async_result_get_type
384   (c-name "g_async_result_get_type")
385   (return-type "GType")
386 )
387
388 (define-method get_user_data
389   (of-object "GAsyncResult")
390   (c-name "g_async_result_get_user_data")
391   (return-type "gpointer")
392 )
393
394 (define-method get_source_object
395   (of-object "GAsyncResult")
396   (c-name "g_async_result_get_source_object")
397   (return-type "GObject*")
398 )
399
400
401
402 ;; From gbufferedinputstream.h
403
404 (define-function buffered_input_stream_get_type
405   (c-name "g_buffered_input_stream_get_type")
406   (return-type "GType")
407 )
408
409 (define-function buffered_input_stream_new
410   (c-name "g_buffered_input_stream_new")
411   (is-constructor-of "GBufferedInputStream")
412   (return-type "GInputStream*")
413   (properties
414     '("base_stream")
415   )
416 )
417
418 (define-function buffered_input_stream_new_sized
419   (c-name "g_buffered_input_stream_new_sized")
420   (return-type "GInputStream*")
421   (parameters
422     '("GInputStream*" "base_stream")
423     '("gsize" "size")
424   )
425 )
426
427 (define-method get_buffer_size
428   (of-object "GBufferedInputStream")
429   (c-name "g_buffered_input_stream_get_buffer_size")
430   (return-type "gsize")
431 )
432
433 (define-method set_buffer_size
434   (of-object "GBufferedInputStream")
435   (c-name "g_buffered_input_stream_set_buffer_size")
436   (return-type "none")
437   (parameters
438     '("gsize" "size")
439   )
440 )
441
442 (define-method get_available
443   (of-object "GBufferedInputStream")
444   (c-name "g_buffered_input_stream_get_available")
445   (return-type "gsize")
446 )
447
448 (define-method peek
449   (of-object "GBufferedInputStream")
450   (c-name "g_buffered_input_stream_peek")
451   (return-type "gsize")
452   (parameters
453     '("void*" "buffer")
454     '("gsize" "offset")
455     '("gsize" "count")
456   )
457 )
458
459 (define-method peek_buffer
460   (of-object "GBufferedInputStream")
461   (c-name "g_buffered_input_stream_peek_buffer")
462   (return-type "const-void*")
463   (parameters
464     '("gsize*" "count")
465   )
466 )
467
468 (define-method fill
469   (of-object "GBufferedInputStream")
470   (c-name "g_buffered_input_stream_fill")
471   (return-type "gssize")
472   (unblock-threads #t)
473   (parameters
474     '("gssize" "count")
475     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
476     '("GError**" "error")
477   )
478 )
479
480 (define-method fill_async
481   (of-object "GBufferedInputStream")
482   (c-name "g_buffered_input_stream_fill_async")
483   (return-type "none")
484   (parameters
485     '("gssize" "count")
486     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
487     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
488     '("GAsyncReadyCallback" "callback")
489     '("gpointer" "user_data")
490   )
491 )
492
493 (define-method fill_finish
494   (of-object "GBufferedInputStream")
495   (c-name "g_buffered_input_stream_fill_finish")
496   (return-type "gssize")
497   (parameters
498     '("GAsyncResult*" "result")
499     '("GError**" "error")
500   )
501 )
502
503 (define-method read_byte
504   (of-object "GBufferedInputStream")
505   (c-name "g_buffered_input_stream_read_byte")
506   (return-type "int")
507   (parameters
508     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
509     '("GError**" "error")
510   )
511 )
512
513
514
515 ;; From gbufferedoutputstream.h
516
517 (define-function buffered_output_stream_get_type
518   (c-name "g_buffered_output_stream_get_type")
519   (return-type "GType")
520 )
521
522 (define-function buffered_output_stream_new
523   (c-name "g_buffered_output_stream_new")
524   (is-constructor-of "GBufferedOutputStream")
525   (return-type "GOutputStream*")
526   (properties
527     '("base_stream")
528   )
529 )
530
531 (define-function buffered_output_stream_new_sized
532   (c-name "g_buffered_output_stream_new_sized")
533   (return-type "GOutputStream*")
534   (parameters
535     '("GOutputStream*" "base_stream")
536     '("guint" "size")
537   )
538 )
539
540 (define-method get_buffer_size
541   (of-object "GBufferedOutputStream")
542   (c-name "g_buffered_output_stream_get_buffer_size")
543   (return-type "gsize")
544 )
545
546 (define-method set_buffer_size
547   (of-object "GBufferedOutputStream")
548   (c-name "g_buffered_output_stream_set_buffer_size")
549   (return-type "none")
550   (parameters
551     '("gsize" "size")
552   )
553 )
554
555 (define-method get_auto_grow
556   (of-object "GBufferedOutputStream")
557   (c-name "g_buffered_output_stream_get_auto_grow")
558   (return-type "gboolean")
559 )
560
561 (define-method set_auto_grow
562   (of-object "GBufferedOutputStream")
563   (c-name "g_buffered_output_stream_set_auto_grow")
564   (return-type "none")
565   (parameters
566     '("gboolean" "auto_grow")
567   )
568 )
569
570
571
572 ;; From gcancellable.h
573
574 (define-function cancellable_get_type
575   (c-name "g_cancellable_get_type")
576   (return-type "GType")
577 )
578
579 (define-function cancellable_new
580   (c-name "g_cancellable_new")
581   (is-constructor-of "GCancellable")
582   (return-type "GCancellable*")
583 )
584
585 (define-method is_cancelled
586   (of-object "GCancellable")
587   (c-name "g_cancellable_is_cancelled")
588   (return-type "gboolean")
589 )
590
591 (define-method set_error_if_cancelled
592   (of-object "GCancellable")
593   (c-name "g_cancellable_set_error_if_cancelled")
594   (return-type "gboolean")
595   (parameters
596     '("GError**" "error")
597   )
598 )
599
600 (define-method get_fd
601   (of-object "GCancellable")
602   (c-name "g_cancellable_get_fd")
603   (return-type "int")
604 )
605
606 (define-method make_pollfd
607   (of-object "GCancellable")
608   (c-name "g_cancellable_make_pollfd")
609   (return-type "none")
610   (parameters
611     '("GPollFD*" "pollfd")
612   )
613 )
614
615 (define-function cancellable_get_current
616   (c-name "g_cancellable_get_current")
617   (return-type "GCancellable*")
618 )
619
620 (define-method push_current
621   (of-object "GCancellable")
622   (c-name "g_cancellable_push_current")
623   (return-type "none")
624 )
625
626 (define-method pop_current
627   (of-object "GCancellable")
628   (c-name "g_cancellable_pop_current")
629   (return-type "none")
630 )
631
632 (define-method reset
633   (of-object "GCancellable")
634   (c-name "g_cancellable_reset")
635   (return-type "none")
636 )
637
638 (define-method cancel
639   (of-object "GCancellable")
640   (c-name "g_cancellable_cancel")
641   (return-type "none")
642 )
643
644 (define-method connect
645   (of-object "GCancellable")
646   (c-name "g_cancellable_connect")
647   (return-type "gulong")
648   (parameters
649     '("GCallback" "callback")
650     '("gpointer" "data")
651     '("GDestroyNotify" "data_destroy_func")
652   )
653 )
654
655 (define-method disconnect
656   (of-object "GCancellable")
657   (c-name "g_cancellable_disconnect")
658   (return-type "none")
659   (parameters
660     '("gulong" "handler_id")
661   )
662 )
663
664 (define-method release_fd
665   (of-object "GCancellable")
666   (c-name "g_cancellable_release_fd")
667   (return-type "none")
668 )
669
670
671
672 ;; From gcontenttype.h
673
674 (define-function content_type_equals
675   (c-name "g_content_type_equals")
676   (return-type "gboolean")
677   (parameters
678     '("const-char*" "type1")
679     '("const-char*" "type2")
680   )
681 )
682
683 (define-function content_type_is_a
684   (c-name "g_content_type_is_a")
685   (return-type "gboolean")
686   (parameters
687     '("const-char*" "type")
688     '("const-char*" "supertype")
689   )
690 )
691
692 (define-function content_type_is_unknown
693   (c-name "g_content_type_is_unknown")
694   (return-type "gboolean")
695   (parameters
696     '("const-char*" "type")
697   )
698 )
699
700 (define-function content_type_get_description
701   (c-name "g_content_type_get_description")
702   (return-type "char*")
703   (parameters
704     '("const-char*" "type")
705   )
706 )
707
708 (define-function content_type_get_mime_type
709   (c-name "g_content_type_get_mime_type")
710   (return-type "char*")
711   (parameters
712     '("const-char*" "type")
713   )
714 )
715
716 (define-function content_type_get_icon
717   (c-name "g_content_type_get_icon")
718   (return-type "GIcon*")
719   (caller-owns-return #t)
720   (parameters
721     '("const-char*" "type")
722   )
723 )
724
725 (define-function content_type_can_be_executable
726   (c-name "g_content_type_can_be_executable")
727   (return-type "gboolean")
728   (parameters
729     '("const-char*" "type")
730   )
731 )
732
733 (define-function content_type_from_mime_type
734   (c-name "g_content_type_from_mime_type")
735   (return-type "char*")
736   (parameters
737     '("const-char*" "mime_type")
738   )
739 )
740
741 ;;
742 ;; wrapped in gio.override
743 ;;
744 (define-function content_type_guess
745   (docstring
746 "content_type_guess([filename, data, want_uncertain]) -> mime type\n"
747 "\n"
748 "Guesses the content type based on the parameters passed.\n"
749 "Either filename or data must be specified\n"
750 "Returns a string containing the mime type.\n"
751 "If want_uncertain is set to True, return a tuple with the mime type and \n"
752 "True/False if the type guess was uncertain or not.")
753   (c-name "g_content_type_guess")
754   (return-type "char*")
755   (parameters
756     '("const-char*" "filename")
757     '("const-guchar*" "data")
758     '("gsize" "data_size")
759     '("gboolean*" "result_uncertain")
760   )
761 )
762
763 (define-function content_type_guess_for_tree
764   (c-name "g_content_type_guess_for_tree")
765   (return-type "char**")
766   (parameters
767     '("GFile*" "root")
768   )
769 )
770
771 ;;
772 ;; wrapped in gio.override
773 ;;
774 (define-function content_types_get_registered
775   (c-name "g_content_types_get_registered")
776   (return-type "GList*")
777 )
778
779
780
781 ;; From gdatainputstream.h
782
783 (define-function data_input_stream_get_type
784   (c-name "g_data_input_stream_get_type")
785   (return-type "GType")
786 )
787
788 (define-function data_input_stream_new
789   (c-name "g_data_input_stream_new")
790   (is-constructor-of "GDataInputStream")
791   (return-type "GDataInputStream*")
792   (properties
793     '("base_stream")
794   )
795 )
796
797 (define-method set_byte_order
798   (of-object "GDataInputStream")
799   (c-name "g_data_input_stream_set_byte_order")
800   (return-type "none")
801   (parameters
802     '("GDataStreamByteOrder" "order")
803   )
804 )
805
806 (define-method get_byte_order
807   (of-object "GDataInputStream")
808   (c-name "g_data_input_stream_get_byte_order")
809   (return-type "GDataStreamByteOrder")
810 )
811
812 (define-method set_newline_type
813   (of-object "GDataInputStream")
814   (c-name "g_data_input_stream_set_newline_type")
815   (return-type "none")
816   (parameters
817     '("GDataStreamNewlineType" "type")
818   )
819 )
820
821 (define-method get_newline_type
822   (of-object "GDataInputStream")
823   (c-name "g_data_input_stream_get_newline_type")
824   (return-type "GDataStreamNewlineType")
825 )
826
827 (define-method read_byte
828   (of-object "GDataInputStream")
829   (c-name "g_data_input_stream_read_byte")
830   (return-type "guchar")
831   (parameters
832     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
833     '("GError**" "error")
834   )
835 )
836
837 (define-method read_int16
838   (of-object "GDataInputStream")
839   (c-name "g_data_input_stream_read_int16")
840   (return-type "gint16")
841   (parameters
842     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
843     '("GError**" "error")
844   )
845 )
846
847 (define-method read_uint16
848   (of-object "GDataInputStream")
849   (c-name "g_data_input_stream_read_uint16")
850   (return-type "guint16")
851   (parameters
852     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
853     '("GError**" "error")
854   )
855 )
856
857 (define-method read_int32
858   (of-object "GDataInputStream")
859   (c-name "g_data_input_stream_read_int32")
860   (return-type "gint32")
861   (parameters
862     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
863     '("GError**" "error")
864   )
865 )
866
867 (define-method read_uint32
868   (of-object "GDataInputStream")
869   (c-name "g_data_input_stream_read_uint32")
870   (return-type "guint32")
871   (parameters
872     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
873     '("GError**" "error")
874   )
875 )
876
877 (define-method read_int64
878   (of-object "GDataInputStream")
879   (c-name "g_data_input_stream_read_int64")
880   (return-type "gint64")
881   (parameters
882     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
883     '("GError**" "error")
884   )
885 )
886
887 (define-method read_uint64
888   (of-object "GDataInputStream")
889   (c-name "g_data_input_stream_read_uint64")
890   (return-type "guint64")
891   (parameters
892     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
893     '("GError**" "error")
894   )
895 )
896
897 ;;
898 ;; wrapped in gdatainputstream.override
899 ;;
900 (define-method read_line
901   (of-object "GDataInputStream")
902   (docstring
903    "S.read_line([cancellable]) -> str\n"
904    "Read a line from the stream. Return value includes ending newline\n"
905    "character.")
906   (c-name "g_data_input_stream_read_line")
907   (return-type "char*")
908   (parameters
909     '("gsize*" "length")
910     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
911     '("GError**" "error")
912   )
913 )
914
915 ;;
916 ;; wrapped in gdatainputstream.override
917 ;;
918 (define-method read_until
919   (of-object "GDataInputStream")
920   (docstring
921    "S.read_until(stop_chars, [cancellable]) -> str\n"
922    "Read characters from the string, stopping at the end or upon reading\n"
923    "any character in stop_chars. Return value does not include the stopping\n"
924    "character.")
925   (c-name "g_data_input_stream_read_until")
926   (return-type "char*")
927   (parameters
928     '("const-gchar*" "stop_chars")
929     '("gsize*" "length")
930     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
931     '("GError**" "error")
932   )
933 )
934
935 (define-method read_until_async
936   (of-object "GDataInputStream")
937   (c-name "g_data_input_stream_read_until_async")
938   (return-type "none")
939   (parameters
940     '("const-gchar*" "stop_chars")
941     '("gint" "io_priority")
942     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
943     '("GAsyncReadyCallback" "callback")
944     '("gpointer" "user_data")
945   )
946 )
947
948 (define-method read_until_finish
949   (of-object "GDataInputStream")
950   (c-name "g_data_input_stream_read_until_finish")
951   (return-type "char*")
952   (parameters
953     '("GAsyncResult*" "result")
954     '("gsize*" "length")
955     '("GError**" "error")
956   )
957 )
958
959 (define-method read_line_async
960   (of-object "GDataInputStream")
961   (c-name "g_data_input_stream_read_line_async")
962   (return-type "none")
963   (parameters
964     '("gint" "io_priority")
965     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
966     '("GAsyncReadyCallback" "callback")
967     '("gpointer" "user_data")
968   )
969 )
970
971 (define-method read_line_finish
972   (of-object "GDataInputStream")
973   (c-name "g_data_input_stream_read_line_finish")
974   (return-type "char*")
975   (parameters
976     '("GAsyncResult*" "result")
977     '("gsize*" "length")
978     '("GError**" "error")
979   )
980 )
981
982
983
984 ;; From gdataoutputstream.h
985
986 (define-function data_output_stream_get_type
987   (c-name "g_data_output_stream_get_type")
988   (return-type "GType")
989 )
990
991 (define-function data_output_stream_new
992   (c-name "g_data_output_stream_new")
993   (is-constructor-of "GDataOutputStream")
994   (return-type "GDataOutputStream*")
995   (properties
996     '("base_stream")
997   )
998 )
999
1000 (define-method set_byte_order
1001   (of-object "GDataOutputStream")
1002   (c-name "g_data_output_stream_set_byte_order")
1003   (return-type "none")
1004   (parameters
1005     '("GDataStreamByteOrder" "order")
1006   )
1007 )
1008
1009 (define-method get_byte_order
1010   (of-object "GDataOutputStream")
1011   (c-name "g_data_output_stream_get_byte_order")
1012   (return-type "GDataStreamByteOrder")
1013 )
1014
1015 (define-method put_byte
1016   (of-object "GDataOutputStream")
1017   (c-name "g_data_output_stream_put_byte")
1018   (return-type "gboolean")
1019   (parameters
1020     '("guchar" "data")
1021     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1022     '("GError**" "error")
1023   )
1024 )
1025
1026 (define-method put_int16
1027   (of-object "GDataOutputStream")
1028   (c-name "g_data_output_stream_put_int16")
1029   (return-type "gboolean")
1030   (parameters
1031     '("gint16" "data")
1032     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1033     '("GError**" "error")
1034   )
1035 )
1036
1037 (define-method put_uint16
1038   (of-object "GDataOutputStream")
1039   (c-name "g_data_output_stream_put_uint16")
1040   (return-type "gboolean")
1041   (parameters
1042     '("guint16" "data")
1043     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1044     '("GError**" "error")
1045   )
1046 )
1047
1048 (define-method put_int32
1049   (of-object "GDataOutputStream")
1050   (c-name "g_data_output_stream_put_int32")
1051   (return-type "gboolean")
1052   (parameters
1053     '("gint32" "data")
1054     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1055     '("GError**" "error")
1056   )
1057 )
1058
1059 (define-method put_uint32
1060   (of-object "GDataOutputStream")
1061   (c-name "g_data_output_stream_put_uint32")
1062   (return-type "gboolean")
1063   (parameters
1064     '("guint32" "data")
1065     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1066     '("GError**" "error")
1067   )
1068 )
1069
1070 (define-method put_int64
1071   (of-object "GDataOutputStream")
1072   (c-name "g_data_output_stream_put_int64")
1073   (return-type "gboolean")
1074   (parameters
1075     '("gint64" "data")
1076     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1077     '("GError**" "error")
1078   )
1079 )
1080
1081 (define-method put_uint64
1082   (of-object "GDataOutputStream")
1083   (c-name "g_data_output_stream_put_uint64")
1084   (return-type "gboolean")
1085   (parameters
1086     '("guint64" "data")
1087     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1088     '("GError**" "error")
1089   )
1090 )
1091
1092 (define-method put_string
1093   (of-object "GDataOutputStream")
1094   (c-name "g_data_output_stream_put_string")
1095   (return-type "gboolean")
1096   (parameters
1097     '("const-char*" "str")
1098     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1099     '("GError**" "error")
1100   )
1101 )
1102
1103
1104
1105
1106
1107
1108 ;; From gdrive.h
1109
1110 (define-function drive_get_type
1111   (c-name "g_drive_get_type")
1112   (return-type "GType")
1113 )
1114
1115 (define-method get_name
1116   (of-object "GDrive")
1117   (c-name "g_drive_get_name")
1118   (return-type "char*")
1119 )
1120
1121 (define-method get_icon
1122   (of-object "GDrive")
1123   (c-name "g_drive_get_icon")
1124   (return-type "GIcon*")
1125   (caller-owns-return #t)
1126 )
1127
1128 (define-method has_volumes
1129   (of-object "GDrive")
1130   (c-name "g_drive_has_volumes")
1131   (return-type "gboolean")
1132 )
1133
1134 ;;
1135 ;; wrapped in gdrive.override
1136 ;;
1137 (define-method get_volumes
1138   (of-object "GDrive")
1139   (c-name "g_drive_get_volumes")
1140   (return-type "GList*")
1141 )
1142
1143 (define-method is_media_removable
1144   (of-object "GDrive")
1145   (c-name "g_drive_is_media_removable")
1146   (return-type "gboolean")
1147 )
1148
1149 (define-method has_media
1150   (of-object "GDrive")
1151   (c-name "g_drive_has_media")
1152   (return-type "gboolean")
1153 )
1154
1155 (define-method is_media_check_automatic
1156   (of-object "GDrive")
1157   (c-name "g_drive_is_media_check_automatic")
1158   (return-type "gboolean")
1159 )
1160
1161 (define-method can_poll_for_media
1162   (of-object "GDrive")
1163   (c-name "g_drive_can_poll_for_media")
1164   (return-type "gboolean")
1165 )
1166
1167 (define-method can_eject
1168   (of-object "GDrive")
1169   (c-name "g_drive_can_eject")
1170   (return-type "gboolean")
1171 )
1172
1173 ;;
1174 ;; wrapped in gdrive.override
1175 ;;
1176 (define-method eject
1177   (of-object "GDrive")
1178   (c-name "g_drive_eject")
1179   (return-type "none")
1180   (parameters
1181     '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
1182     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1183     '("GAsyncReadyCallback" "callback")
1184     '("gpointer" "user_data")
1185   )
1186 )
1187
1188 (define-method eject_finish
1189   (of-object "GDrive")
1190   (c-name "g_drive_eject_finish")
1191   (return-type "gboolean")
1192   (parameters
1193     '("GAsyncResult*" "result")
1194     '("GError**" "error")
1195   )
1196 )
1197
1198 ;;
1199 ;; wrapped in gdrive.override
1200 ;;
1201 (define-method poll_for_media
1202   (of-object "GDrive")
1203   (c-name "g_drive_poll_for_media")
1204   (return-type "none")
1205   (parameters
1206     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1207     '("GAsyncReadyCallback" "callback")
1208     '("gpointer" "user_data")
1209   )
1210 )
1211
1212 (define-method poll_for_media_finish
1213   (of-object "GDrive")
1214   (c-name "g_drive_poll_for_media_finish")
1215   (return-type "gboolean")
1216   (parameters
1217     '("GAsyncResult*" "result")
1218     '("GError**" "error")
1219   )
1220 )
1221
1222 (define-method get_identifier
1223   (of-object "GDrive")
1224   (c-name "g_drive_get_identifier")
1225   (return-type "char*")
1226   (parameters
1227     '("const-char*" "kind")
1228   )
1229 )
1230
1231 ;;
1232 ;; wrapped in gdrive.override
1233 ;;
1234 (define-method enumerate_identifiers
1235   (of-object "GDrive")
1236   (c-name "g_drive_enumerate_identifiers")
1237   (return-type "char**")
1238 )
1239
1240 (define-method can_start
1241   (of-object "GDrive")
1242   (c-name "g_drive_can_start")
1243   (return-type "gboolean")
1244 )
1245
1246 (define-method can_start_degraded
1247   (of-object "GDrive")
1248   (c-name "g_drive_can_start_degraded")
1249   (return-type "gboolean")
1250 )
1251
1252 (define-method can_stop
1253   (of-object "GDrive")
1254   (c-name "g_drive_can_stop")
1255   (return-type "gboolean")
1256 )
1257
1258 (define-method eject_with_operation
1259   (of-object "GDrive")
1260   (c-name "g_drive_eject_with_operation")
1261   (return-type "none")
1262   (parameters
1263     '("GMountUnmountFlags" "flags")
1264     '("GMountOperation*" "mount_operation")
1265     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1266     '("GAsyncReadyCallback" "callback")
1267     '("gpointer" "user_data")
1268   )
1269 )
1270
1271 (define-method eject_with_operation_finish
1272   (of-object "GDrive")
1273   (c-name "g_drive_eject_with_operation_finish")
1274   (return-type "gboolean")
1275   (parameters
1276     '("GAsyncResult*" "result")
1277     '("GError**" "error")
1278   )
1279 )
1280
1281 (define-method get_start_stop_type
1282   (of-object "GDrive")
1283   (c-name "g_drive_get_start_stop_type")
1284   (return-type "GDriveStartStopType")
1285 )
1286
1287 (define-method start
1288   (of-object "GDrive")
1289   (c-name "g_drive_start")
1290   (return-type "none")
1291   (parameters
1292     '("GDriveStartFlags" "flags")
1293     '("GMountOperation*" "mount_operation")
1294     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1295     '("GAsyncReadyCallback" "callback")
1296     '("gpointer" "user_data")
1297   )
1298 )
1299
1300 (define-method start_finish
1301   (of-object "GDrive")
1302   (c-name "g_drive_start_finish")
1303   (return-type "gboolean")
1304   (parameters
1305     '("GAsyncResult*" "result")
1306     '("GError**" "error")
1307   )
1308 )
1309
1310 (define-method stop
1311   (of-object "GDrive")
1312   (c-name "g_drive_stop")
1313   (return-type "none")
1314   (parameters
1315     '("GMountUnmountFlags" "flags")
1316     '("GMountOperation*" "mount_operation")
1317     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1318     '("GAsyncReadyCallback" "callback")
1319     '("gpointer" "user_data")
1320   )
1321 )
1322
1323 (define-method stop_finish
1324   (of-object "GDrive")
1325   (c-name "g_drive_stop_finish")
1326   (return-type "gboolean")
1327   (parameters
1328     '("GAsyncResult*" "result")
1329     '("GError**" "error")
1330   )
1331 )
1332
1333
1334
1335 ;; From gemblemedicon.h
1336
1337 (define-function emblemed_icon_get_type
1338   (c-name "g_emblemed_icon_get_type")
1339   (return-type "GType")
1340 )
1341
1342 (define-function emblemed_icon_new
1343   (c-name "g_emblemed_icon_new")
1344   (is-constructor-of "GEmblemedIcon")
1345   (return-type "GIcon*")
1346   (parameters
1347     '("GIcon*" "icon")
1348     '("GEmblem*" "emblem")
1349   )
1350 )
1351
1352 (define-method get_icon
1353   (of-object "GEmblemedIcon")
1354   (c-name "g_emblemed_icon_get_icon")
1355   (return-type "GIcon*")
1356 )
1357
1358 (define-method get_emblems
1359   (of-object "GEmblemedIcon")
1360   (c-name "g_emblemed_icon_get_emblems")
1361   (return-type "GList*")
1362 )
1363
1364 (define-method add_emblem
1365   (of-object "GEmblemedIcon")
1366   (c-name "g_emblemed_icon_add_emblem")
1367   (return-type "none")
1368   (parameters
1369     '("GEmblem*" "emblem")
1370   )
1371 )
1372
1373
1374
1375 ;; From gemblem.h
1376
1377 (define-function emblem_get_type
1378   (c-name "g_emblem_get_type")
1379   (return-type "GType")
1380 )
1381
1382 (define-function emblem_new
1383   (c-name "g_emblem_new")
1384   (is-constructor-of "GEmblem")
1385   (return-type "GEmblem*")
1386   (properties
1387     '("icon")
1388     '("origin" (optional))
1389   )
1390 )
1391
1392 (define-function emblem_new_with_origin
1393   (c-name "g_emblem_new_with_origin")
1394   (return-type "GEmblem*")
1395   (parameters
1396     '("GIcon*" "icon")
1397     '("GEmblemOrigin" "origin")
1398   )
1399 )
1400
1401 (define-method get_icon
1402   (of-object "GEmblem")
1403   (c-name "g_emblem_get_icon")
1404   (return-type "GIcon*")
1405 )
1406
1407 (define-method get_origin
1408   (of-object "GEmblem")
1409   (c-name "g_emblem_get_origin")
1410   (return-type "GEmblemOrigin")
1411 )
1412
1413
1414
1415 ;; From gfileattribute.h
1416
1417 (define-function file_attribute_info_list_new
1418   (c-name "g_file_attribute_info_list_new")
1419   (is-constructor-of "GFileAttributeInfoList")
1420   (return-type "GFileAttributeInfoList*")
1421 )
1422
1423 (define-method ref
1424   (of-object "GFileAttributeInfoList")
1425   (c-name "g_file_attribute_info_list_ref")
1426   (return-type "GFileAttributeInfoList*")
1427 )
1428
1429 (define-method unref
1430   (of-object "GFileAttributeInfoList")
1431   (c-name "g_file_attribute_info_list_unref")
1432   (return-type "none")
1433 )
1434
1435 (define-method dup
1436   (of-object "GFileAttributeInfoList")
1437   (c-name "g_file_attribute_info_list_dup")
1438   (return-type "GFileAttributeInfoList*")
1439 )
1440
1441 (define-method lookup
1442   (of-object "GFileAttributeInfoList")
1443   (c-name "g_file_attribute_info_list_lookup")
1444   (return-type "const-GFileAttributeInfo*")
1445   (parameters
1446     '("const-char*" "name")
1447   )
1448 )
1449
1450 (define-method add
1451   (of-object "GFileAttributeInfoList")
1452   (c-name "g_file_attribute_info_list_add")
1453   (return-type "none")
1454   (parameters
1455     '("const-char*" "name")
1456     '("GFileAttributeType" "type")
1457     '("GFileAttributeInfoFlags" "flags" (default "G_FILE_ATTRIBUTE_INFO_NONE"))
1458   )
1459 )
1460
1461
1462
1463 ;; From gfileenumerator.h
1464
1465 (define-function file_enumerator_get_type
1466   (c-name "g_file_enumerator_get_type")
1467   (return-type "GType")
1468 )
1469
1470 (define-method next_file
1471   (of-object "GFileEnumerator")
1472   (c-name "g_file_enumerator_next_file")
1473   (return-type "GFileInfo*")
1474   (caller-owns-return #t)
1475   (parameters
1476     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1477     '("GError**" "error")
1478   )
1479 )
1480
1481 (define-method close
1482   (of-object "GFileEnumerator")
1483   (c-name "g_file_enumerator_close")
1484   (return-type "gboolean")
1485   (parameters
1486     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1487     '("GError**" "error")
1488   )
1489 )
1490
1491 ;;
1492 ;; wrapped in gfileenumerator.override
1493 ;;
1494 (define-method next_files_async
1495   (docstring
1496 "FE.next_files_async(num_files, callback, [io_priority, cancellable,\n"
1497 "                    user_data])\n"
1498 "Request information for a number of files from the enumerator\n"
1499 "asynchronously. When all i/o for the operation is finished the callback\n"
1500 "will be called with the requested information.\n"
1501 "\n"
1502 "The callback can be called with less than num_files files in case of error\n"
1503 "or at the end of the enumerator. In case of a partial error the callback\n"
1504 "will be called with any succeeding items and no error, and on the next\n"
1505 "request the error will be reported. If a request is cancelled the callback\n"
1506 "will be called with gio.ERROR_CANCELLED.\n"
1507 "\n"
1508 "During an async request no other sync and async calls are allowed, and will\n"
1509 "result in gio.ERROR_PENDING errors.\n"
1510 "\n"
1511 "Any outstanding i/o request with higher priority (lower numerical value)\n"
1512 "will be executed before an outstanding request with lower priority.\n"
1513 "Default priority is gobject.PRIORITY_DEFAULT.")
1514
1515   (of-object "GFileEnumerator")
1516   (c-name "g_file_enumerator_next_files_async")
1517   (return-type "none")
1518   (parameters
1519     '("int" "num_files")
1520     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
1521     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1522     '("GAsyncReadyCallback" "callback")
1523     '("gpointer" "user_data")
1524   )
1525 )
1526
1527 ;;
1528 ;; wrapped in gfileenumerator.override
1529 ;;
1530 (define-method next_files_finish
1531   (docstring
1532 "FE.next_files_finish(result) -> a list of gio.FileInfos\n"
1533 "Finishes the asynchronous operation started with\n"
1534 "gio.FileEnumerator.next_files_async().")
1535   (of-object "GFileEnumerator")
1536   (c-name "g_file_enumerator_next_files_finish")
1537   (return-type "GList*")
1538   (parameters
1539     '("GAsyncResult*" "result")
1540     '("GError**" "error")
1541   )
1542 )
1543
1544 ;;
1545 ;; wrapped in gfileenumerator.override
1546 ;;
1547 (define-method close_async
1548   (of-object "GFileEnumerator")
1549   (c-name "g_file_enumerator_close_async")
1550   (return-type "none")
1551   (parameters
1552     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
1553     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1554     '("GAsyncReadyCallback" "callback")
1555     '("gpointer" "user_data")
1556   )
1557 )
1558
1559 (define-method close_finish
1560   (of-object "GFileEnumerator")
1561   (c-name "g_file_enumerator_close_finish")
1562   (return-type "gboolean")
1563   (parameters
1564     '("GAsyncResult*" "result")
1565     '("GError**" "error")
1566   )
1567 )
1568
1569 (define-method is_closed
1570   (of-object "GFileEnumerator")
1571   (c-name "g_file_enumerator_is_closed")
1572   (return-type "gboolean")
1573 )
1574
1575 (define-method has_pending
1576   (of-object "GFileEnumerator")
1577   (c-name "g_file_enumerator_has_pending")
1578   (return-type "gboolean")
1579 )
1580
1581 (define-method set_pending
1582   (of-object "GFileEnumerator")
1583   (c-name "g_file_enumerator_set_pending")
1584   (return-type "none")
1585   (parameters
1586     '("gboolean" "pending")
1587   )
1588 )
1589
1590 (define-method get_container
1591   (of-object "GFileEnumerator")
1592   (c-name "g_file_enumerator_get_container")
1593   (return-type "GFile*")
1594 )
1595
1596
1597
1598 ;; From gfile.h
1599
1600 (define-function file_get_type
1601   (c-name "g_file_get_type")
1602   (return-type "GType")
1603 )
1604
1605 (define-function file_new_for_path
1606   (c-name "g_file_new_for_path")
1607   (is-constructor-of "GFile")
1608   (return-type "GFile*")
1609   (parameters
1610     '("const-char*" "path")
1611   )
1612 )
1613
1614 (define-function file_new_for_uri
1615   (c-name "g_file_new_for_uri")
1616   (is-constructor-of "GFile")
1617   (return-type "GFile*")
1618   (parameters
1619     '("const-char*" "uri")
1620   )
1621 )
1622
1623 (define-function file_new_for_commandline_arg
1624   (is-constructor-of "GFile")
1625   (c-name "g_file_new_for_commandline_arg")
1626   (return-type "GFile*")
1627   (parameters
1628     '("const-char*" "arg")
1629   )
1630 )
1631
1632 (define-function file_parse_name
1633   (c-name "g_file_parse_name")
1634   (return-type "GFile*")
1635   (caller-owns-return #t)
1636   (parameters
1637     '("const-char*" "parse_name")
1638   )
1639 )
1640
1641 (define-method dup
1642   (of-object "GFile")
1643   (c-name "g_file_dup")
1644   (return-type "GFile*")
1645   (caller-owns-return #t)
1646 )
1647
1648 (define-function file_hash
1649   (c-name "g_file_hash")
1650   (return-type "guint")
1651   (parameters
1652     '("gconstpointer" "file")
1653   )
1654 )
1655
1656 (define-method equal
1657   (of-object "GFile")
1658   (c-name "g_file_equal")
1659   (return-type "gboolean")
1660   (parameters
1661     '("GFile*" "file2")
1662   )
1663 )
1664
1665 (define-method get_basename
1666   (of-object "GFile")
1667   (c-name "g_file_get_basename")
1668   (return-type "char*")
1669 )
1670
1671 (define-method get_path
1672   (of-object "GFile")
1673   (c-name "g_file_get_path")
1674   (return-type "char*")
1675 )
1676
1677 (define-method get_uri
1678   (of-object "GFile")
1679   (c-name "g_file_get_uri")
1680   (return-type "char*")
1681 )
1682
1683 (define-method get_parse_name
1684   (of-object "GFile")
1685   (c-name "g_file_get_parse_name")
1686   (return-type "char*")
1687 )
1688
1689 (define-method get_parent
1690   (of-object "GFile")
1691   (c-name "g_file_get_parent")
1692   (return-type "GFile*")
1693   (caller-owns-return #t)
1694 )
1695
1696 (define-method get_child
1697   (of-object "GFile")
1698   (c-name "g_file_get_child")
1699   (return-type "GFile*")
1700   (caller-owns-return #t)
1701   (parameters
1702     '("const-char*" "name")
1703   )
1704 )
1705
1706 (define-method get_child_for_display_name
1707   (of-object "GFile")
1708   (c-name "g_file_get_child_for_display_name")
1709   (return-type "GFile*")
1710   (caller-owns-return #t)
1711   (parameters
1712     '("const-char*" "display_name")
1713     '("GError**" "error")
1714   )
1715 )
1716
1717 (define-method has_prefix
1718   (of-object "GFile")
1719   (c-name "g_file_has_prefix")
1720   (return-type "gboolean")
1721   (parameters
1722     '("GFile*" "descendant")
1723   )
1724 )
1725
1726 (define-method get_relative_path
1727   (of-object "GFile")
1728   (c-name "g_file_get_relative_path")
1729   (return-type "char*")
1730   (parameters
1731     '("GFile*" "descendant")
1732   )
1733 )
1734
1735 (define-method resolve_relative_path
1736   (of-object "GFile")
1737   (c-name "g_file_resolve_relative_path")
1738   (return-type "GFile*")
1739   (caller-owns-return #t)
1740   (parameters
1741     '("const-char*" "relative_path")
1742   )
1743 )
1744
1745 (define-method is_native
1746   (of-object "GFile")
1747   (c-name "g_file_is_native")
1748   (return-type "gboolean")
1749 )
1750
1751 (define-method has_uri_scheme
1752   (of-object "GFile")
1753   (c-name "g_file_has_uri_scheme")
1754   (return-type "gboolean")
1755   (parameters
1756     '("const-char*" "uri_scheme")
1757   )
1758 )
1759
1760 (define-method get_uri_scheme
1761   (of-object "GFile")
1762   (c-name "g_file_get_uri_scheme")
1763   (return-type "char*")
1764 )
1765
1766 (define-method read
1767   (of-object "GFile")
1768   (docstring
1769   "F.read([cancellable]) -> input stream\n"
1770   "Opens a file for reading. The result is a GFileInputStream that\n"
1771   "can be used to read the contents of the file.\n"
1772   "\n"
1773   "If cancellable is specified, then the operation can be cancelled\n"
1774   "by triggering the cancellable object from another thread. If the\n"
1775   "operation was cancelled, the error gio.IO_ERROR_CANCELLED will\n"
1776   "be returned. If the file does not exist, the gio.IO_ERROR_NOT_FOUND\n"
1777   "error will be returned. If the file is a directory, the\n"
1778   "gio.IO_ERROR_IS_DIRECTORY error will be returned. Other errors\n"
1779   "are possible too, and depend on what kind of filesystem the file is on."
1780   )
1781   (c-name "g_file_read")
1782   (return-type "GFileInputStream*")
1783   (unblock-threads #t)
1784   (caller-owns-return #t)
1785   (parameters
1786     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1787     '("GError**" "error")
1788   )
1789 )
1790
1791 ;;
1792 ;; wrapped in gfile.override
1793 ;;
1794 (define-method read_async
1795   (of-object "GFile")
1796   (docstring
1797   "F.read_async(callback [,io_priority [,cancellable [,user_data]]])\n"
1798   "-> start read\n"
1799   "\n"
1800   "For more details, see gio.File.read() which is the synchronous\n"
1801   "version of this call. Asynchronously opens file for reading.\n"
1802   "When the operation is finished, callback will be called.\n"
1803   "You can then call g_file_read_finish() to get the result of the\n"
1804   "operation.\n"
1805   )
1806   (c-name "g_file_read_async")
1807   (return-type "none")
1808   (parameters
1809     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
1810     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1811     '("GAsyncReadyCallback" "callback")
1812     '("gpointer" "user_data")
1813   )
1814 )
1815
1816 (define-method read_finish
1817   (of-object "GFile")
1818   (c-name "g_file_read_finish")
1819   (return-type "GFileInputStream*")
1820   (caller-owns-return #t)
1821   (parameters
1822     '("GAsyncResult*" "res")
1823     '("GError**" "error")
1824   )
1825 )
1826
1827 (define-method append_to
1828   (of-object "GFile")
1829   (c-name "g_file_append_to")
1830   (return-type "GFileOutputStream*")
1831   (unblock-threads #t)
1832   (caller-owns-return #t)
1833   (parameters
1834     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
1835     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1836     '("GError**" "error")
1837   )
1838 )
1839
1840 (define-method create
1841   (of-object "GFile")
1842   (c-name "g_file_create")
1843   (return-type "GFileOutputStream*")
1844   (unblock-threads #t)
1845   (caller-owns-return #t)
1846   (parameters
1847     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
1848     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1849     '("GError**" "error")
1850   )
1851 )
1852
1853 (define-method replace
1854   (of-object "GFile")
1855   (c-name "g_file_replace")
1856   (return-type "GFileOutputStream*")
1857   (unblock-threads #t)
1858   (caller-owns-return #t)
1859   (parameters
1860     '("const-char*" "etag")
1861     '("gboolean" "make_backup")
1862     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
1863     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1864     '("GError**" "error")
1865   )
1866 )
1867
1868 ;;
1869 ;; wrapped in gfile.override
1870 ;;
1871 (define-method append_to_async
1872   (docstring
1873   "F.append_to_async(callback [flags, [,io_priority [,cancellable\n"
1874   "                  [,user_data]]]]) -> open for append\n"
1875   "\n"
1876   "Asynchronously opens file for appending.\n"
1877   "For more details, see gio.File.append_to() which is the synchronous\n"
1878   "version of this call. When the operation is finished, callback will\n"
1879   "be called. You can then call F.append_to_finish() to get the result\n"
1880   "of the operation."
1881   )
1882   (of-object "GFile")
1883   (c-name "g_file_append_to_async")
1884   (return-type "none")
1885   (parameters
1886     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
1887     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
1888     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1889     '("GAsyncReadyCallback" "callback")
1890     '("gpointer" "user_data")
1891   )
1892 )
1893
1894 (define-method append_to_finish
1895   (of-object "GFile")
1896   (c-name "g_file_append_to_finish")
1897   (return-type "GFileOutputStream*")
1898   (caller-owns-return #t)
1899   (parameters
1900     '("GAsyncResult*" "res")
1901     '("GError**" "error")
1902   )
1903 )
1904
1905 ;;
1906 ;; wrapped in gfile.override
1907 ;;
1908 (define-method create_async
1909   (docstring
1910   "F.create_async(callback [flags, [,io_priority [,cancellable\n"
1911   "               [,user_data]]]]) -> file created\n"
1912   "\n"
1913   "Asynchronously creates a new file and returns an output stream for\n"
1914   "writing to it. The file must not already exist.\n"
1915   "For more details, see F.create() which is the synchronous\n"
1916   "version of this call.\n"
1917   "When the operation is finished, callback will be called. You can\n"
1918   "then call F.create_finish() to get the result of the operation."
1919   )
1920   (of-object "GFile")
1921   (c-name "g_file_create_async")
1922   (return-type "none")
1923   (parameters
1924     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
1925     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
1926     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1927     '("GAsyncReadyCallback" "callback")
1928     '("gpointer" "user_data")
1929   )
1930 )
1931
1932 (define-method create_finish
1933   (of-object "GFile")
1934   (c-name "g_file_create_finish")
1935   (return-type "GFileOutputStream*")
1936   (caller-owns-return #t)
1937   (parameters
1938     '("GAsyncResult*" "res")
1939     '("GError**" "error")
1940   )
1941 )
1942
1943 ;;
1944 ;; wrapped in gfile.override
1945 ;;
1946 (define-method replace_async
1947   (docstring
1948   "F.replace_async(callback [etag, [make_backup, [flags, [io_priority,\n"
1949   "                [cancellable, [user_data]]]]]]) -> file replace\n"
1950   "\n"
1951   "Asynchronously overwrites the file, replacing the contents, possibly\n"
1952   "creating a backup copy of the file first.\n"
1953   "For more details, see F.replace() which is the synchronous\n"
1954   "version of this call.\n"
1955   "When the operation is finished, callback will be called. You can\n"
1956   "then call F.replace_finish() to get the result of the operation."
1957   )
1958   (of-object "GFile")
1959   (c-name "g_file_replace_async")
1960   (return-type "none")
1961   (parameters
1962     '("const-char*" "etag")
1963     '("gboolean" "make_backup")
1964     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
1965     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
1966     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1967     '("GAsyncReadyCallback" "callback")
1968     '("gpointer" "user_data")
1969   )
1970 )
1971
1972 (define-method replace_finish
1973   (of-object "GFile")
1974   (c-name "g_file_replace_finish")
1975   (return-type "GFileOutputStream*")
1976   (caller-owns-return #t)
1977   (parameters
1978     '("GAsyncResult*" "res")
1979     '("GError**" "error")
1980   )
1981 )
1982
1983 (define-method query_exists
1984   (of-object "GFile")
1985   (c-name "g_file_query_exists")
1986   (return-type "gboolean")
1987   (parameters
1988     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1989   )
1990 )
1991
1992 (define-method query_file_type
1993   (of-object "GFile")
1994   (c-name "g_file_query_file_type")
1995   (return-type "GFileType")
1996   (parameters
1997     '("GFileQueryInfoFlags" "flags")
1998     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
1999   )
2000 )
2001
2002 (define-method query_info
2003   (of-object "GFile")
2004   (c-name "g_file_query_info")
2005   (return-type "GFileInfo*")
2006   (unblock-threads #t)
2007   (caller-owns-return #t)
2008   (parameters
2009     '("const-char*" "attributes")
2010     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2011     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2012     '("GError**" "error")
2013   )
2014 )
2015
2016 ;;
2017 ;; wrapped in gfile.override
2018 ;;
2019 (define-method query_info_async
2020   (docstring
2021   "F.query_info_async(attributes, callback, [flags, [io_priority,\n"
2022   "                   [cancellable, [user_data]]]]) -> query attributes\n"
2023   "\n"
2024   "Asynchronously gets the requested information about specified file.\n"
2025   "The result is a GFileInfo object that contains key-value attributes\n"
2026   "(such as type or size for the file).\n"
2027   "For more details, see F.query_info() which is the synchronous\n"
2028   "version of this call. \n"
2029   "When the operation is finished, callback will be called. You can\n"
2030   "then call F.query_info_finish() to get the result of the operation.\n"
2031   )
2032   (of-object "GFile")
2033   (c-name "g_file_query_info_async")
2034   (return-type "none")
2035   (parameters
2036     '("const-char*" "attributes")
2037     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2038     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
2039     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2040     '("GAsyncReadyCallback" "callback")
2041     '("gpointer" "user_data")
2042   )
2043 )
2044
2045 (define-method query_info_finish
2046   (of-object "GFile")
2047   (c-name "g_file_query_info_finish")
2048   (return-type "GFileInfo*")
2049   (caller-owns-return #t)
2050   (parameters
2051     '("GAsyncResult*" "res")
2052     '("GError**" "error")
2053   )
2054 )
2055
2056 (define-method query_filesystem_info
2057   (of-object "GFile")
2058   (c-name "g_file_query_filesystem_info")
2059   (return-type "GFileInfo*")
2060   (unblock-threads #t)
2061   (caller-owns-return #t)
2062   (parameters
2063     '("const-char*" "attributes")
2064     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2065     '("GError**" "error")
2066   )
2067 )
2068
2069 (define-method query_filesystem_info_async
2070   (of-object "GFile")
2071   (c-name "g_file_query_filesystem_info_async")
2072   (return-type "none")
2073   (parameters
2074     '("const-char*" "attributes")
2075     '("int" "io_priority")
2076     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2077     '("GAsyncReadyCallback" "callback")
2078     '("gpointer" "user_data")
2079   )
2080 )
2081
2082 (define-method query_filesystem_info_finish
2083   (of-object "GFile")
2084   (c-name "g_file_query_filesystem_info_finish")
2085   (return-type "GFileInfo*")
2086   (parameters
2087     '("GAsyncResult*" "res")
2088     '("GError**" "error")
2089   )
2090 )
2091
2092 (define-method find_enclosing_mount
2093   (of-object "GFile")
2094   (c-name "g_file_find_enclosing_mount")
2095   (return-type "GMount*")
2096   (unblock-threads #t)
2097   (caller-owns-return #t)
2098   (parameters
2099     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2100     '("GError**" "error")
2101   )
2102 )
2103
2104 (define-method find_enclosing_mount_async
2105   (of-object "GFile")
2106   (c-name "g_file_find_enclosing_mount_async")
2107   (return-type "none")
2108   (parameters
2109     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
2110     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2111     '("GAsyncReadyCallback" "callback")
2112     '("gpointer" "user_data")
2113   )
2114 )
2115
2116 (define-method find_enclosing_mount_finish
2117   (of-object "GFile")
2118   (c-name "g_file_find_enclosing_mount_finish")
2119   (return-type "GMount*")
2120   (caller-owns-return #t)
2121   (parameters
2122     '("GAsyncResult*" "res")
2123     '("GError**" "error")
2124   )
2125 )
2126
2127 (define-method enumerate_children
2128   (docstring
2129 "F.enumerate_children(attributes, [flags, cancellable]) -> enumerator\n"
2130 "Gets the requested information about the files in a directory.\n"
2131 "The result is a gio.FileEnumerator object that will give out gio.FileInfo\n"
2132 "objects for all the files in the directory.\n"
2133 "The attribute value is a string that specifies the file attributes that\n"
2134 "should be gathered. It is not an error if it's not possible to read a \n"
2135 "particular requested attribute from a file - it just won't be set.\n"
2136 "attribute should be a comma-separated list of attribute or attribute\n"
2137 "wildcards. The wildcard \"*\" means all attributes, and a wildcard like\n"
2138 "\"standard::*\" means all attributes in the standard namespace.\n"
2139 "An example attribute query be \"standard::*,owner::user\". The standard\n"
2140 "attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.\n"
2141 "\n"
2142 "If cancellable is not None, then the operation can be cancelled by\n"
2143 "triggering the cancellable object from another thread. If the operation was\n"
2144 "cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
2145 "\n"
2146 "If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.\n"
2147 "If the file is not a directory, the gio.FILE_ERROR_NOTDIR error will\n"
2148 "be returned. Other errors are possible too.")
2149   (of-object "GFile")
2150   (c-name "g_file_enumerate_children")
2151   (return-type "GFileEnumerator*")
2152   (unblock-threads #t)
2153   (caller-owns-return #t)
2154   (parameters
2155     '("const-char*" "attributes")
2156     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2157     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2158     '("GError**" "error")
2159   )
2160 )
2161
2162 ;;
2163 ;; wrapped in gfile.override
2164 ;;
2165 (define-method enumerate_children_async
2166   (docstring
2167 "F.enumerate_children_async(attributes, callback,\n"
2168 "                           [flags, io_priority, cancellable, user_data])\n"
2169 "Asynchronously gets the requested information about the files in a\n"
2170 "directory. The result is a GFileEnumerator object that will give out\n"
2171 "GFileInfo objects for all the files in the directory.\n"
2172 "\n"
2173 "For more details, see gio.File.enumerate_children() which is the synchronous\n"
2174 "version of this call.\n"
2175 "\n"
2176 "When the operation is finished, callback will be called. You can then call\n"
2177 "gio.File.enumerate_children_finish() to get the result of the operation.")
2178   (of-object "GFile")
2179   (c-name "g_file_enumerate_children_async")
2180   (return-type "none")
2181   (parameters
2182     '("const-char*" "attributes")
2183     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2184     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
2185     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2186     '("GAsyncReadyCallback" "callback")
2187     '("gpointer" "user_data")
2188   )
2189 )
2190
2191 (define-method enumerate_children_finish
2192   (of-object "GFile")
2193   (c-name "g_file_enumerate_children_finish")
2194   (return-type "GFileEnumerator*")
2195   (caller-owns-return #t)
2196   (parameters
2197     '("GAsyncResult*" "res")
2198     '("GError**" "error")
2199   )
2200 )
2201
2202 (define-method set_display_name
2203   (of-object "GFile")
2204   (c-name "g_file_set_display_name")
2205   (return-type "GFile*")
2206   (unblock-threads #t)
2207   (caller-owns-return #t)
2208   (parameters
2209     '("const-char*" "display_name")
2210     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2211     '("GError**" "error")
2212   )
2213 )
2214
2215 (define-method set_display_name_async
2216   (of-object "GFile")
2217   (c-name "g_file_set_display_name_async")
2218   (return-type "none")
2219   (parameters
2220     '("const-char*" "display_name")
2221     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
2222     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2223     '("GAsyncReadyCallback" "callback")
2224     '("gpointer" "user_data")
2225   )
2226 )
2227
2228 (define-method set_display_name_finish
2229   (of-object "GFile")
2230   (c-name "g_file_set_display_name_finish")
2231   (return-type "GFile*")
2232   (caller-owns-return #t)
2233   (parameters
2234     '("GAsyncResult*" "res")
2235     '("GError**" "error")
2236   )
2237 )
2238
2239 (define-method delete
2240   (of-object "GFile")
2241   (c-name "g_file_delete")
2242   (return-type "gboolean")
2243   (unblock-threads #t)
2244   (parameters
2245     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2246     '("GError**" "error")
2247   )
2248 )
2249
2250 (define-method trash
2251   (of-object "GFile")
2252   (c-name "g_file_trash")
2253   (return-type "gboolean")
2254   (unblock-threads #t)
2255   (parameters
2256     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2257     '("GError**" "error")
2258   )
2259 )
2260
2261 ;;
2262 ;; wrapped in gfile.override
2263 ;;
2264 (define-method copy
2265   (docstring
2266 "F.copy(destination, [callback, flags, cancellable, user_data])\n"
2267 "Copies the file source to the location specified by destination.\n"
2268 "Can not handle recursive copies of directories.\n"
2269 "\n"
2270 "If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
2271 "destination file is overwritten.\n"
2272 "\n"
2273 "If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
2274 "will be copied as symlinks, otherwise the target of the source symlink\n"
2275 "will be copied.\n"
2276 "\n"
2277 "If cancellable is not None, then the operation can be cancelled b\n"
2278 "triggering the cancellable object from another thread.\n"
2279 "If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
2280 "will be returned.\n"
2281 "\n"
2282 "If progress_callback is not None, then the operation can be monitored\n"
2283 "by setting this to a callable. if specified progress_callback_data will\n"
2284 "be passed to this function. It is guaranteed that this callback\n"
2285 "will be called after all data has been transferred with the total number\n"
2286 "of bytes copied during the operation.\n"
2287 "\n"
2288 "If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
2289 "error is returned, independent on the status of the destination.\n"
2290 "\n"
2291 "If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
2292 "then the error gio.ERROR_EXISTS is returned.\n"
2293 "\n"
2294 "If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
2295 "error is returned. If trying to overwrite a directory with a directory\n"
2296 "the gio.ERROR_WOULD_MERGE error is returned.\n"
2297 "\n"
2298 "If the source is a directory and the target does not exist\n"
2299 "or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
2300 "then the gio.ERROR_WOULD_RECURSE error is returned.\n"
2301 "\n"
2302 "If you are interested in copying the GFile object itself\n"
2303 "(not the on-disk file), see gio.File.dup().")
2304   (of-object "GFile")
2305   (c-name "g_file_copy")
2306   (unblock-threads #t)
2307   (return-type "gboolean")
2308   (parameters
2309     '("GFile*" "destination")
2310     '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
2311     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2312     '("GFileProgressCallback" "progress_callback")
2313     '("gpointer" "progress_callback_data")
2314     '("GError**" "error")
2315   )
2316 )
2317
2318 ;;
2319 ;; wrapped in gfile.override
2320 ;;
2321 (define-method copy_async
2322   (of-object "GFile")
2323   (docstring
2324   "F.copy_async(destination, callback, [flags, io_priority, user_data, cancellable, progress_callback])\n"
2325   "-> start copy\n"
2326   "\n"
2327   "For more details, see gio.File.copy() which is the synchronous\n"
2328   "version of this call. Asynchronously copies file.\n"
2329   "When the operation is finished, callback will be called.\n"
2330   "You can then call g_file_copy_finish() to get the result of the\n"
2331   "operation.\n"
2332   )
2333   (c-name "g_file_copy_async")
2334   (return-type "none")
2335   (parameters
2336     '("GFile*" "destination")
2337     '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
2338     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
2339     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2340     '("GFileProgressCallback" "progress_callback")
2341     '("gpointer" "progress_callback_data")
2342     '("GAsyncReadyCallback" "callback")
2343     '("gpointer" "user_data")
2344   )
2345 )
2346
2347 (define-method copy_finish
2348   (of-object "GFile")
2349   (c-name "g_file_copy_finish")
2350   (return-type "gboolean")
2351   (parameters
2352     '("GAsyncResult*" "res")
2353     '("GError**" "error")
2354   )
2355 )
2356
2357 ;;
2358 ;; wrapped in gfile.override
2359 ;;
2360 (define-method move
2361   (docstring
2362 "F.move(destination, [callback, flags, cancellable, user_data])\n"
2363 "Tries to move the file or directory source to the location\n"
2364 "specified by destination. If native move operations are\n"
2365 "supported then this is used, otherwise a copy + delete fallback\n"
2366 "is used. The native implementation may support moving directories\n"
2367 "(for instance on moves inside the same filesystem), but the \n"
2368 "fallback code does not.\n"
2369 "\n"
2370 "If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
2371 "destination file is overwritten.\n"
2372 "\n"
2373 "If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
2374 "will be copied as symlinks, otherwise the target of the source symlink\n"
2375 "will be copied.\n"
2376 "\n"
2377 "If cancellable is not None, then the operation can be cancelled b\n"
2378 "triggering the cancellable object from another thread.\n"
2379 "If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
2380 "will be returned.\n"
2381 "\n"
2382 "If progress_callback is not None, then the operation can be monitored\n"
2383 "by setting this to a callable. if specified progress_callback_data will\n"
2384 "be passed to this function. It is guaranteed that this callback\n"
2385 "will be called after all data has been transferred with the total number\n"
2386 "of bytes copied during the operation.\n"
2387 "\n"
2388 "If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
2389 "error is returned, independent on the status of the destination.\n"
2390 "\n"
2391 "If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
2392 "then the error gio.ERROR_EXISTS is returned.\n"
2393 "\n"
2394 "If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
2395 "error is returned. If trying to overwrite a directory with a directory\n"
2396 "the gio.ERROR_WOULD_MERGE error is returned.\n"
2397 "\n"
2398 "If the source is a directory and the target does not exist\n"
2399 "or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
2400 "then the gio.ERROR_WOULD_RECURSE error is returned.")
2401   (of-object "GFile")
2402   (c-name "g_file_move")
2403   (return-type "gboolean")
2404   (parameters
2405     '("GFile*" "destination")
2406     '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
2407     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2408     '("GFileProgressCallback" "progress_callback")
2409     '("gpointer" "progress_callback_data")
2410     '("GError**" "error")
2411   )
2412 )
2413
2414 (define-method make_directory
2415   (of-object "GFile")
2416   (c-name "g_file_make_directory")
2417   (return-type "gboolean")
2418   (unblock-threads #t)
2419   (parameters
2420     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2421     '("GError**" "error")
2422   )
2423 )
2424
2425 (define-method make_directory_with_parents
2426   (of-object "GFile")
2427   (c-name "g_file_make_directory_with_parents")
2428   (return-type "gboolean")
2429   (unblock-threads #t)
2430   (parameters
2431     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2432     '("GError**" "error")
2433   )
2434 )
2435
2436 (define-method make_symbolic_link
2437   (of-object "GFile")
2438   (c-name "g_file_make_symbolic_link")
2439   (return-type "gboolean")
2440   (unblock-threads #t)
2441   (parameters
2442     '("const-char*" "symlink_value")
2443     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2444     '("GError**" "error")
2445   )
2446 )
2447
2448 ;;
2449 ;; wrapped in gfile.override
2450 ;;
2451 (define-method query_settable_attributes
2452   (docstring
2453   "F.query_settable_attributes([cancellable]) -> list\n\n"
2454   "Obtain the list of settable attributes for the file.\n"
2455   "Returns the type and full attribute name of all the attributes that\n"
2456   "can be set on this file. This doesn't mean setting it will always\n"
2457   "succeed though, you might get an access failure, or some specific\n"
2458   "file may not support a specific attribute.\n\n"
2459   "If cancellable is not None, then the operation can be cancelled by\n"
2460   "triggering the cancellable object from another thread. If the operation\n"
2461   "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
2462   )
2463   (of-object "GFile")
2464   (c-name "g_file_query_settable_attributes")
2465   (return-type "GFileAttributeInfoList*")
2466   (parameters
2467     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2468     '("GError**" "error")
2469   )
2470 )
2471
2472 ;;
2473 ;; wrapped in gfile.override
2474 ;;
2475 (define-method query_writable_namespaces
2476   (docstring
2477   "F.query_writable_namespaces([cancellable]) -> list\n\n"
2478   "Obtain the list of attribute namespaces where new attributes can\n"
2479   "be created by a user. An example of this is extended attributes\n"
2480   "(in the "xattr" namespace).\n"
2481   "If cancellable is not None, then the operation can be cancelled\n"
2482   "by triggering the cancellable object from another thread. If the\n"
2483   "operation was cancelled, the error gio.IO_ERROR_CANCELLED\n"
2484   "will be returned."
2485   )
2486   (of-object "GFile")
2487   (c-name "g_file_query_writable_namespaces")
2488   (return-type "GFileAttributeInfoList*")
2489   (parameters
2490     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2491     '("GError**" "error")
2492   )
2493 )
2494
2495 ;;
2496 ;; wrapped in gfile.override
2497 ;;
2498 (define-method set_attribute
2499   (docstring
2500   "F.set_attribute(attribute, type, value_p [,flags [,cancellable ]])->bool\n"
2501   "\n"
2502   "Sets an attribute in the file with attribute name attribute to value_p.\n"
2503   "If cancellable is not None, then the operation can be cancelled by\n"
2504   "triggering the cancellable object from another thread. If the operation\n"
2505   "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
2506   )
2507   (of-object "GFile")
2508   (c-name "g_file_set_attribute")
2509   (return-type "gboolean")
2510   (parameters
2511     '("const-char*" "attribute")
2512     '("GFileAttributeType" "type")
2513     '("gpointer" "value_p")
2514     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2515     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2516     '("GError**" "error")
2517   )
2518 )
2519
2520 (define-method set_attributes_from_info
2521   (of-object "GFile")
2522   (c-name "g_file_set_attributes_from_info")
2523   (return-type "gboolean")
2524   (parameters
2525     '("GFileInfo*" "info")
2526     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2527     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2528     '("GError**" "error")
2529   )
2530 )
2531
2532 (define-method set_attributes_async
2533   (of-object "GFile")
2534   (c-name "g_file_set_attributes_async")
2535   (return-type "none")
2536   (parameters
2537     '("GFileInfo*" "info")
2538     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2539     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
2540     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2541     '("GAsyncReadyCallback" "callback")
2542     '("gpointer" "user_data")
2543   )
2544 )
2545
2546 (define-method set_attributes_finish
2547   (of-object "GFile")
2548   (c-name "g_file_set_attributes_finish")
2549   (return-type "gboolean")
2550   (parameters
2551     '("GAsyncResult*" "result")
2552     '("GFileInfo**" "info")
2553     '("GError**" "error")
2554   )
2555 )
2556
2557 (define-method set_attribute_string
2558   (of-object "GFile")
2559   (c-name "g_file_set_attribute_string")
2560   (return-type "gboolean")
2561   (parameters
2562     '("const-char*" "attribute")
2563     '("const-char*" "value")
2564     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2565     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2566     '("GError**" "error")
2567   )
2568 )
2569
2570 (define-method set_attribute_byte_string
2571   (of-object "GFile")
2572   (c-name "g_file_set_attribute_byte_string")
2573   (return-type "gboolean")
2574   (parameters
2575     '("const-char*" "attribute")
2576     '("const-char*" "value")
2577     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2578     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2579     '("GError**" "error")
2580   )
2581 )
2582
2583 (define-method set_attribute_uint32
2584   (of-object "GFile")
2585   (c-name "g_file_set_attribute_uint32")
2586   (return-type "gboolean")
2587   (parameters
2588     '("const-char*" "attribute")
2589     '("guint32" "value")
2590     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2591     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2592     '("GError**" "error")
2593   )
2594 )
2595
2596 (define-method set_attribute_int32
2597   (of-object "GFile")
2598   (c-name "g_file_set_attribute_int32")
2599   (return-type "gboolean")
2600   (parameters
2601     '("const-char*" "attribute")
2602     '("gint32" "value")
2603     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2604     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2605     '("GError**" "error")
2606   )
2607 )
2608
2609 (define-method set_attribute_uint64
2610   (of-object "GFile")
2611   (c-name "g_file_set_attribute_uint64")
2612   (return-type "gboolean")
2613   (parameters
2614     '("const-char*" "attribute")
2615     '("guint64" "value")
2616     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2617     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2618     '("GError**" "error")
2619   )
2620 )
2621
2622 (define-method set_attribute_int64
2623   (of-object "GFile")
2624   (c-name "g_file_set_attribute_int64")
2625   (return-type "gboolean")
2626   (parameters
2627     '("const-char*" "attribute")
2628     '("gint64" "value")
2629     '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
2630     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2631     '("GError**" "error")
2632   )
2633 )
2634
2635 ;;
2636 ;; wrapped in gfile.override
2637 ;;
2638 (define-method mount_enclosing_volume
2639   (docstring
2640 "F.mount_enclosing_volume(mount_operation, callback, [cancellable,\n"
2641 "                         user_data])\n"
2642 "Starts a mount_operation, mounting the volume that contains\n"
2643 "the file location.\n"
2644 "\n"
2645 "When this operation has completed, callback will be called with\n"
2646 "user_user data, and the operation can be finalized with\n"
2647 "gio.File.mount_enclosing_volume_finish().\n"
2648 "\n"
2649 "If cancellable is not None, then the operation can be cancelled\n"
2650 "by triggering the cancellable object from another thread.\n"
2651 "If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
2652 "will be returned.")
2653   (of-object "GFile")
2654   (c-name "g_file_mount_enclosing_volume")
2655   (return-type "none")
2656   (parameters
2657     '("GMountOperation*" "mount_operation")
2658     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2659     '("GAsyncReadyCallback" "callback")
2660     '("gpointer" "user_data")
2661   )
2662 )
2663
2664 (define-method mount_enclosing_volume_finish
2665   (of-object "GFile")
2666   (c-name "g_file_mount_enclosing_volume_finish")
2667   (return-type "gboolean")
2668   (parameters
2669     '("GAsyncResult*" "result")
2670     '("GError**" "error")
2671   )
2672 )
2673
2674 ;;
2675 ;; wrapped in gfile.override
2676 ;;
2677 (define-method mount_mountable
2678   (docstring
2679 "F.mount_mountable(mount_operation, callback, [flags, cancellable,\n"
2680 "                  user_data])\n"
2681 "Mounts a file of type gio.FILE_TYPE_MOUNTABLE. Using mount_operation,\n"
2682 "you can request callbacks when, for instance, passwords are needed\n"
2683 "during authentication.\n"
2684 "\n"
2685 "If cancellable is not None, then the operation can be cancelled by\n"
2686 " triggering the cancellable object from another thread. If the\n"
2687 "operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
2688 "\n"
2689 "When the operation is finished, callback will be called. You can then\n"
2690 "call g_file_mount_mountable_finish() to get the result of the operation.\n")
2691   (of-object "GFile")
2692   (c-name "g_file_mount_mountable")
2693   (return-type "none")
2694   (parameters
2695     '("GMountOperation*" "mount_operation")
2696     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2697     '("GAsyncReadyCallback" "callback")
2698     '("gpointer" "user_data")
2699   )
2700 )
2701
2702 (define-method mount_mountable_finish
2703   (of-object "GFile")
2704   (c-name "g_file_mount_mountable_finish")
2705   (return-type "GFile*")
2706   (caller-owns-return #t)
2707   (parameters
2708     '("GAsyncResult*" "result")
2709     '("GError**" "error")
2710   )
2711 )
2712
2713 ;;
2714 ;; wrapped in gfile.override
2715 ;;
2716 (define-method unmount_mountable
2717   (docstring
2718 "F.unmount_mountable(callback, [flags, cancellable, user_data])\n"
2719 "Unmounts a file of type gio.FILE_TYPE_MOUNTABLE.\n"
2720 "\n"
2721 "If cancellable is not None, then the operation can be cancelled by\n"
2722 "triggering the cancellable object from another thread. If the\n"
2723 "operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
2724 "\n"
2725 "When the operation is finished, callback will be called. You can\n"
2726 "then call gio.File.unmount_mountable_finish() to get the\n"
2727 "result of the operation.\n")
2728   (of-object "GFile")
2729   (c-name "g_file_unmount_mountable")
2730   (return-type "none")
2731   (parameters
2732     '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
2733     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2734     '("GAsyncReadyCallback" "callback")
2735     '("gpointer" "user_data")
2736   )
2737 )
2738
2739 (define-method unmount_mountable_finish
2740   (of-object "GFile")
2741   (c-name "g_file_unmount_mountable_finish")
2742   (return-type "gboolean")
2743   (parameters
2744     '("GAsyncResult*" "result")
2745     '("GError**" "error")
2746   )
2747 )
2748
2749 (define-method eject_mountable
2750   (of-object "GFile")
2751   (c-name "g_file_eject_mountable")
2752   (return-type "none")
2753   (parameters
2754     '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
2755     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2756     '("GAsyncReadyCallback" "callback")
2757     '("gpointer" "user_data")
2758   )
2759 )
2760
2761 (define-method eject_mountable_finish
2762   (of-object "GFile")
2763   (c-name "g_file_eject_mountable_finish")
2764   (return-type "gboolean")
2765   (parameters
2766     '("GAsyncResult*" "result")
2767     '("GError**" "error")
2768   )
2769 )
2770
2771
2772 (define-method copy_attributes
2773   (of-object "GFile")
2774   (c-name "g_file_copy_attributes")
2775   (return-type "gboolean")
2776   (parameters
2777     '("GFile*" "destination")
2778     '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
2779     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2780     '("GError**" "error")
2781   )
2782 )
2783
2784 (define-method monitor_directory
2785   (of-object "GFile")
2786   (c-name "g_file_monitor_directory")
2787   (return-type "GFileMonitor*")
2788   (caller-owns-return #t)
2789   (parameters
2790     '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
2791     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2792     '("GError**" "error")
2793   )
2794 )
2795
2796 (define-method monitor_file
2797   (of-object "GFile")
2798   (c-name "g_file_monitor_file")
2799   (return-type "GFileMonitor*")
2800   (caller-owns-return #t)
2801   (parameters
2802     '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
2803     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2804     '("GError**" "error")
2805   )
2806 )
2807
2808 (define-method monitor
2809   (of-object "GFile")
2810   (c-name "g_file_monitor")
2811   (return-type "GFileMonitor*")
2812   (parameters
2813     '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
2814     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2815     '("GError**" "error")
2816   )
2817 )
2818
2819 (define-method query_default_handler
2820   (of-object "GFile")
2821   (c-name "g_file_query_default_handler")
2822   (return-type "GAppInfo*")
2823   (caller-owns-return #t)
2824   (parameters
2825     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2826     '("GError**" "error")
2827   )
2828 )
2829
2830 ;;
2831 ;; wrapped in gfile.override
2832 ;;
2833 (define-method load_contents
2834   (docstring
2835   "F.load_contents([cancellable]) -> contents, length, etag_out\n\n"
2836   "Loads the content of the file into memory, returning the size of the\n"
2837   "data. The data is always zero terminated, but this is not included\n"
2838   "in the resultant length.\n"
2839   "If cancellable is not None, then the operation can be cancelled by\n"
2840   "triggering the cancellable object from another thread. If the operation\n"
2841   "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
2842   )
2843   (of-object "GFile")
2844   (c-name "g_file_load_contents")
2845   (return-type "gboolean")
2846   (parameters
2847     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2848     '("char**" "contents")
2849     '("gsize*" "length")
2850     '("char**" "etag_out")
2851     '("GError**" "error")
2852   )
2853 )
2854
2855 ;;
2856 ;; wrapped in gfile.override
2857 ;;
2858 (define-method load_contents_async
2859   (docstring
2860   "F.load_contents_async(callback, [cancellable, [user_data]])->start loading\n\n"
2861   "Starts an asynchronous load of the file's contents.\n\n"
2862   "For more details, see F.load_contents() which is the synchronous\n"
2863   "version of this call.\n\n"
2864   "When the load operation has completed, callback will be called with\n"
2865   "user data. To finish the operation, call F.load_contents_finish() with\n"
2866   "the parameter 'res' returned by the callback.\n\n"
2867   "If cancellable is not None, then the operation can be cancelled by\n"
2868   "triggering the cancellable object from another thread. If the operation\n"
2869   "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
2870   )
2871   (of-object "GFile")
2872   (c-name "g_file_load_contents_async")
2873   (return-type "none")
2874   (parameters
2875     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2876     '("GAsyncReadyCallback" "callback")
2877     '("gpointer" "user_data")
2878   )
2879 )
2880
2881 ;;
2882 ;; wrapped in gfile.override
2883 ;;
2884 (define-method load_contents_finish
2885   (docstring
2886   "F.load_contents_finish(res) -> contents, length, etag_out\n\n"
2887   "Finishes an asynchronous load of the file's contents. The contents are\n"
2888   "placed in contents, and length is set to the size of the contents\n"
2889   "string. If etag_out is present, it will be set to the new entity\n"
2890   "tag for the file.\n"
2891   )
2892   (of-object "GFile")
2893   (c-name "g_file_load_contents_finish")
2894   (return-type "gboolean")
2895   (parameters
2896     '("GAsyncResult*" "res")
2897     '("char**" "contents")
2898     '("gsize*" "length")
2899     '("char**" "etag_out")
2900     '("GError**" "error")
2901   )
2902 )
2903
2904 (define-method load_partial_contents_async
2905   (of-object "GFile")
2906   (c-name "g_file_load_partial_contents_async")
2907   (return-type "none")
2908   (parameters
2909     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2910     '("GFileReadMoreCallback" "read_more_callback")
2911     '("GAsyncReadyCallback" "callback")
2912     '("gpointer" "user_data")
2913   )
2914 )
2915
2916 (define-method load_partial_contents_finish
2917   (of-object "GFile")
2918   (c-name "g_file_load_partial_contents_finish")
2919   (return-type "gboolean")
2920   (parameters
2921     '("GAsyncResult*" "res")
2922     '("char**" "contents")
2923     '("gsize*" "length")
2924     '("char**" "etag_out")
2925     '("GError**" "error")
2926   )
2927 )
2928
2929 ;;
2930 ;; wrapped in gfile.override
2931 ;;
2932 (define-method replace_contents
2933   (docstring
2934   "F.replace_contents(contents, [etag, [make_backup, [flags, [cancellable]]]])\n"
2935   "-> etag_out\n"
2936   "\n"
2937   "Replaces the content of the file, returning the new etag value for the\n"
2938   "file. If an etag is specified, any existing file must have that etag, or\n"
2939   "the error gio.IO_ERROR_WRONG_ETAG will be returned.\n"
2940   "If make_backup is True, this method will attempt to make a backup of the\n"
2941   "file. If cancellable is not None, then the operation can be cancelled by\n"
2942   "triggering the cancellable object from another thread. If the operation\n"
2943   "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
2944   )
2945   (of-object "GFile")
2946   (c-name "g_file_replace_contents")
2947   (return-type "gboolean")
2948   (parameters
2949     '("const-char*" "contents")
2950     '("gsize" "length")
2951     '("const-char*" "etag")
2952     '("gboolean" "make_backup")
2953     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
2954     '("char**" "new_etag")
2955     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2956     '("GError**" "error")
2957   )
2958 )
2959
2960 ;;
2961 ;; wrapped in gfile.override
2962 ;;
2963 (define-method replace_contents_async
2964   (docstring
2965   "F.replace_contents_async(contents, callback, [etag, [make_backup, [flags,\n"
2966   "                         [cancellable]]]]) -> etag_out\n"
2967   "\n"
2968   "Starts an asynchronous replacement of the file with the given contents.\n"
2969   "For more details, see F.replace_contents() which is the synchronous\n"
2970   "version of this call.\n\n"
2971   "When the load operation has completed, callback will be called with\n"
2972   "user data. To finish the operation, call F.replace_contents_finish() with\n"
2973   "the parameter 'res' returned by the callback.\n\n"
2974   "If cancellable is not None, then the operation can be cancelled by\n"
2975   "triggering the cancellable object from another thread. If the operation\n"
2976   "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
2977   )
2978   (of-object "GFile")
2979   (c-name "g_file_replace_contents_async")
2980   (return-type "none")
2981   (parameters
2982     '("const-char*" "contents")
2983     '("gsize" "length")
2984     '("const-char*" "etag")
2985     '("gboolean" "make_backup")
2986     '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
2987     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
2988     '("GAsyncReadyCallback" "callback")
2989     '("gpointer" "user_data")
2990   )
2991 )
2992
2993 ;;
2994 ;; wrapped in gfile.override
2995 ;;
2996 (define-method replace_contents_finish
2997   (docstring
2998   "F.replace_contents_finish(res) -> etag_out\n\n"
2999   "Finishes an asynchronous replacement of the file's contents.\n"
3000   "The new entity tag for the file is returned.\n"
3001   )
3002   (of-object "GFile")
3003   (c-name "g_file_replace_contents_finish")
3004   (return-type "gboolean")
3005   (parameters
3006     '("GAsyncResult*" "res")
3007     '("char**" "new_etag")
3008     '("GError**" "error")
3009   )
3010 )
3011
3012 (define-method create_readwrite
3013   (of-object "GFile")
3014   (c-name "g_file_create_readwrite")
3015   (return-type "GFileIOStream*")
3016   (parameters
3017     '("GFileCreateFlags" "flags")
3018     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
3019     '("GError**" "error")
3020   )
3021 )
3022
3023 (define-method create_readwrite_async
3024   (of-object "GFile")
3025   (c-name "g_file_create_readwrite_async")
3026   (return-type "none")
3027   (parameters
3028     '("GFileCreateFlags" "flags")
3029     '("int" "io_priority")
3030     '("GCancellable*" "cancellable")
3031     '("GAsyncReadyCallback" "callback")
3032     '("gpointer" "user_data")
3033   )
3034 )
3035
3036 (define-method create_readwrite_finish
3037   (of-object "GFile")
3038   (c-name "g_file_create_readwrite_finish")
3039   (return-type "GFileIOStream*")
3040   (parameters
3041     '("GAsyncResult*" "res")
3042     '("GError**" "error")
3043   )
3044 )
3045
3046 (define-method eject_mountable_with_operation
3047   (of-object "GFile")
3048   (c-name "g_file_eject_mountable_with_operation")
3049   (return-type "none")
3050   (parameters
3051     '("GMountUnmountFlags" "flags")
3052     '("GMountOperation*" "mount_operation")
3053     '("GCancellable*" "cancellable")
3054     '("GAsyncReadyCallback" "callback")
3055     '("gpointer" "user_data")
3056   )
3057 )
3058
3059 (define-method eject_mountable_with_operation_finish
3060   (of-object "GFile")
3061   (c-name "g_file_eject_mountable_with_operation_finish")
3062   (return-type "gboolean")
3063   (parameters
3064     '("GAsyncResult*" "result")
3065     '("GError**" "error")
3066   )
3067 )
3068
3069 (define-method open_readwrite
3070   (of-object "GFile")
3071   (c-name "g_file_open_readwrite")
3072   (return-type "GFileIOStream*")
3073   (parameters
3074     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
3075     '("GError**" "error")
3076   )
3077 )
3078
3079 (define-method open_readwrite_async
3080   (of-object "GFile")
3081   (c-name "g_file_open_readwrite_async")
3082   (return-type "none")
3083   (parameters
3084     '("int" "io_priority")
3085     '("GCancellable*" "cancellable")
3086     '("GAsyncReadyCallback" "callback")
3087     '("gpointer" "user_data")
3088   )
3089 )
3090
3091 (define-method open_readwrite_finish
3092   (of-object "GFile")
3093   (c-name "g_file_open_readwrite_finish")
3094   (return-type "GFileIOStream*")
3095   (parameters
3096     '("GAsyncResult*" "res")
3097     '("GError**" "error")
3098   )
3099 )
3100
3101 (define-method poll_mountable
3102   (of-object "GFile")
3103   (c-name "g_file_poll_mountable")
3104   (return-type "none")
3105   (parameters
3106     '("GCancellable*" "cancellable")
3107     '("GAsyncReadyCallback" "callback")
3108     '("gpointer" "user_data")
3109   )
3110 )
3111
3112 (define-method poll_mountable_finish
3113   (of-object "GFile")
3114   (c-name "g_file_poll_mountable_finish")
3115   (return-type "gboolean")
3116   (parameters
3117     '("GAsyncResult*" "result")
3118     '("GError**" "error")
3119   )
3120 )
3121
3122 (define-method replace_readwrite
3123   (of-object "GFile")
3124   (c-name "g_file_replace_readwrite")
3125   (return-type "GFileIOStream*")
3126   (parameters
3127     '("const-char*" "etag")
3128     '("gboolean" "make_backup")
3129     '("GFileCreateFlags" "flags")
3130     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
3131     '("GError**" "error")
3132   )
3133 )
3134
3135 (define-method replace_readwrite_async
3136   (of-object "GFile")
3137   (c-name "g_file_replace_readwrite_async")
3138   (return-type "none")
3139   (parameters
3140     '("const-char*" "etag")
3141     '("gboolean" "make_backup")
3142     '("GFileCreateFlags" "flags")
3143     '("int" "io_priority")
3144     '("GCancellable*" "cancellable")
3145     '("GAsyncReadyCallback" "callback")
3146     '("gpointer" "user_data")
3147   )
3148 )
3149
3150 (define-method replace_readwrite_finish
3151   (of-object "GFile")
3152   (c-name "g_file_replace_readwrite_finish")
3153   (return-type "GFileIOStream*")
3154   (parameters
3155     '("GAsyncResult*" "res")
3156     '("GError**" "error")
3157   )
3158 )
3159
3160 (define-method start_mountable
3161   (of-object "GFile")
3162   (c-name "g_file_start_mountable")
3163   (return-type "none")
3164   (parameters
3165     '("GDriveStartFlags" "flags")
3166     '("GMountOperation*" "start_operation")
3167     '("GCancellable*" "cancellable")
3168     '("GAsyncReadyCallback" "callback")
3169     '("gpointer" "user_data")
3170   )
3171 )
3172
3173 (define-method start_mountable_finish
3174   (of-object "GFile")
3175   (c-name "g_file_start_mountable_finish")
3176   (return-type "gboolean")
3177   (parameters
3178     '("GAsyncResult*" "result")
3179     '("GError**" "error")
3180   )
3181 )
3182
3183 (define-method stop_mountable
3184   (of-object "GFile")
3185   (c-name "g_file_stop_mountable")
3186   (return-type "none")
3187   (parameters
3188     '("GMountUnmountFlags" "flags")
3189     '("GMountOperation*" "mount_operation")
3190     '("GCancellable*" "cancellable")
3191     '("GAsyncReadyCallback" "callback")
3192     '("gpointer" "user_data")
3193   )
3194 )
3195
3196 (define-method stop_mountable_finish
3197   (of-object "GFile")
3198   (c-name "g_file_stop_mountable_finish")
3199   (return-type "gboolean")
3200   (parameters
3201     '("GAsyncResult*" "result")
3202     '("GError**" "error")
3203   )
3204 )
3205
3206 (define-method supports_thread_contexts
3207   (of-object "GFile")
3208   (c-name "g_file_supports_thread_contexts")
3209   (return-type "gboolean")
3210 )
3211
3212 (define-method unmount_mountable_with_operation
3213   (of-object "GFile")
3214   (c-name "g_file_unmount_mountable_with_operation")
3215   (return-type "none")
3216   (parameters
3217     '("GMountUnmountFlags" "flags")
3218     '("GMountOperation*" "mount_operation")
3219     '("GCancellable*" "cancellable")
3220     '("GAsyncReadyCallback" "callback")
3221     '("gpointer" "user_data")
3222   )
3223 )
3224
3225 (define-method unmount_mountable_with_operation_finish
3226   (of-object "GFile")
3227   (c-name "g_file_unmount_mountable_with_operation_finish")
3228   (return-type "gboolean")
3229   (parameters
3230     '("GAsyncResult*" "result")
3231     '("GError**" "error")
3232   )
3233 )
3234
3235
3236
3237 ;; From gfileicon.h
3238
3239 (define-function file_icon_get_type
3240   (c-name "g_file_icon_get_type")
3241   (return-type "GType")
3242 )
3243
3244 (define-function file_icon_new
3245   (c-name "g_file_icon_new")
3246   (is-constructor-of "GFileIcon")
3247   (return-type "GIcon*")
3248   ;; Note: starting with GLib 2.18 we could use (properties ...)
3249   ;; instead, but I don't know if it is possible to branch on version
3250   ;; in codegen.
3251   (parameters
3252     '("GFile*" "file")
3253   )
3254 )
3255
3256 (define-method get_file
3257   (of-object "GFileIcon")
3258   (c-name "g_file_icon_get_file")
3259   (return-type "GFile*")
3260 )
3261
3262
3263
3264 ;; From gfileinfo.h
3265
3266 (define-function file_info_get_type
3267   (c-name "g_file_info_get_type")
3268   (return-type "GType")
3269 )
3270
3271 (define-function file_info_new
3272   (c-name "g_file_info_new")
3273   (is-constructor-of "GFileInfo")
3274   (return-type "GFileInfo*")
3275 )
3276
3277 (define-method dup
3278   (of-object "GFileInfo")
3279   (c-name "g_file_info_dup")
3280   (return-type "GFileInfo*")
3281   (caller-owns-return #t)
3282 )
3283
3284 (define-method copy_into
3285   (of-object "GFileInfo")
3286   (c-name "g_file_info_copy_into")
3287   (return-type "none")
3288   (parameters
3289     '("GFileInfo*" "dest_info")
3290   )
3291 )
3292
3293 (define-method has_attribute
3294   (of-object "GFileInfo")
3295   (c-name "g_file_info_has_attribute")
3296   (return-type "gboolean")
3297   (parameters
3298     '("const-char*" "attribute")
3299   )
3300 )
3301
3302 (define-method has_namespace
3303   (of-object "GFileInfo")
3304   (c-name "g_file_info_has_namespace")
3305   (return-type "gboolean")
3306   (parameters
3307     '("const-char*" "name_space")
3308   )
3309 )
3310
3311 ;;
3312 ;; wrapped in  gfileinfo.override
3313 (define-method list_attributes
3314   (docstring
3315   "INFO.list_attributes(name_space) -> Attribute list\n\n"
3316   "Lists the file info structure's attributes."
3317   )
3318   (of-object "GFileInfo")
3319   (c-name "g_file_info_list_attributes")
3320   (return-type "char**")
3321   (parameters
3322     '("const-char*" "name_space")
3323   )
3324 )
3325
3326 (define-method get_attribute_data
3327   (of-object "GFileInfo")
3328   (c-name "g_file_info_get_attribute_data")
3329   (return-type "gboolean")
3330   (parameters
3331     '("const-char*" "attribute")
3332     '("GFileAttributeType*" "type")
3333     '("gpointer*" "value_pp")
3334     '("GFileAttributeStatus*" "status")
3335   )
3336 )
3337
3338 (define-method get_attribute_type
3339   (of-object "GFileInfo")
3340   (c-name "g_file_info_get_attribute_type")
3341   (return-type "GFileAttributeType")
3342   (parameters
3343     '("const-char*" "attribute")
3344   )
3345 )
3346
3347 (define-method remove_attribute
3348   (of-object "GFileInfo")
3349   (c-name "g_file_info_remove_attribute")
3350   (return-type "none")
3351   (parameters
3352     '("const-char*" "attribute")
3353   )
3354 )
3355
3356 (define-method get_attribute_status
3357   (of-object "GFileInfo")
3358   (c-name "g_file_info_get_attribute_status")
3359   (return-type "GFileAttributeStatus")
3360   (parameters
3361     '("const-char*" "attribute")
3362   )
3363 )
3364
3365 (define-method set_attribute_status
3366   (of-object "GFileInfo")
3367   (c-name "g_file_info_set_attribute_status")
3368   (return-type "gboolean")
3369   (parameters
3370     '("const-char*" "attribute")
3371     '("GFileAttributeStatus" "status")
3372   )
3373 )
3374
3375 (define-method get_attribute_as_string
3376   (of-object "GFileInfo")
3377   (c-name "g_file_info_get_attribute_as_string")
3378   (return-type "char*")
3379   (parameters
3380     '("const-char*" "attribute")
3381   )
3382 )
3383
3384 (define-method get_attribute_string
3385   (of-object "GFileInfo")
3386   (c-name "g_file_info_get_attribute_string")
3387   (return-type "const-char*")
3388   (parameters
3389     '("const-char*" "attribute")
3390   )
3391 )
3392
3393 (define-method get_attribute_byte_string
3394   (of-object "GFileInfo")
3395   (c-name "g_file_info_get_attribute_byte_string")
3396   (return-type "const-char*")
3397   (parameters
3398     '("const-char*" "attribute")
3399   )
3400 )
3401
3402 (define-method get_attribute_boolean
3403   (of-object "GFileInfo")
3404   (c-name "g_file_info_get_attribute_boolean")
3405   (return-type "gboolean")
3406   (parameters
3407     '("const-char*" "attribute")
3408   )
3409 )
3410
3411 (define-method get_attribute_uint32
3412   (of-object "GFileInfo")
3413   (c-name "g_file_info_get_attribute_uint32")
3414   (return-type "guint32")
3415   (parameters
3416     '("const-char*" "attribute")
3417   )
3418 )
3419
3420 (define-method get_attribute_int32
3421   (of-object "GFileInfo")
3422   (c-name "g_file_info_get_attribute_int32")
3423   (return-type "gint32")
3424   (parameters
3425     '("const-char*" "attribute")
3426   )
3427 )
3428
3429 (define-method get_attribute_uint64
3430   (of-object "GFileInfo")
3431   (c-name "g_file_info_get_attribute_uint64")
3432   (return-type "guint64")
3433   (parameters
3434     '("const-char*" "attribute")
3435   )
3436 )
3437
3438 (define-method get_attribute_int64
3439   (of-object "GFileInfo")
3440   (c-name "g_file_info_get_attribute_int64")
3441   (return-type "gint64")
3442   (parameters
3443     '("const-char*" "attribute")
3444   )
3445 )
3446
3447 (define-method get_attribute_object
3448   (of-object "GFileInfo")
3449   (c-name "g_file_info_get_attribute_object")
3450   (return-type "GObject*")
3451   (parameters
3452     '("const-char*" "attribute")
3453   )
3454 )
3455
3456 (define-method get_attribute_stringv
3457   (of-object "GFileInfo")
3458   (c-name "g_file_info_get_attribute_stringv")
3459   (return-type "char**")
3460   (parameters
3461     '("const-char*" "attribute")
3462   )
3463 )
3464
3465 (define-method set_attribute
3466   (of-object "GFileInfo")
3467   (c-name "g_file_info_set_attribute")
3468   (return-type "none")
3469   (parameters
3470     '("const-char*" "attribute")
3471     '("GFileAttributeType" "type")
3472     '("gpointer" "value_p")
3473   )
3474 )
3475
3476 (define-method set_attribute_string
3477   (of-object "GFileInfo")
3478   (c-name "g_file_info_set_attribute_string")
3479   (return-type "none")
3480   (parameters
3481     '("const-char*" "attribute")
3482     '("const-char*" "attr_value")
3483   )
3484 )
3485
3486 (define-method set_attribute_byte_string
3487   (of-object "GFileInfo")
3488   (c-name "g_file_info_set_attribute_byte_string")
3489   (return-type "none")
3490   (parameters
3491     '("const-char*" "attribute")
3492     '("const-char*" "attr_value")
3493   )
3494 )
3495
3496 (define-method set_attribute_boolean
3497   (of-object "GFileInfo")
3498   (c-name "g_file_info_set_attribute_boolean")
3499   (return-type "none")
3500   (parameters
3501     '("const-char*" "attribute")
3502     '("gboolean" "attr_value")
3503   )
3504 )
3505
3506 (define-method set_attribute_uint32
3507   (of-object "GFileInfo")
3508   (c-name "g_file_info_set_attribute_uint32")
3509   (return-type "none")
3510   (parameters
3511     '("const-char*" "attribute")
3512     '("guint32" "attr_value")
3513   )
3514 )
3515
3516 (define-method set_attribute_int32
3517   (of-object "GFileInfo")
3518   (c-name "g_file_info_set_attribute_int32")
3519   (return-type "none")
3520   (parameters
3521     '("const-char*" "attribute")
3522     '("gint32" "attr_value")
3523   )
3524 )
3525
3526 (define-method set_attribute_uint64
3527   (of-object "GFileInfo")
3528   (c-name "g_file_info_set_attribute_uint64")
3529   (return-type "none")
3530   (parameters
3531     '("const-char*" "attribute")
3532     '("guint64" "attr_value")
3533   )
3534 )
3535
3536 (define-method set_attribute_int64
3537   (of-object "GFileInfo")
3538   (c-name "g_file_info_set_attribute_int64")
3539   (return-type "none")
3540   (parameters
3541     '("const-char*" "attribute")
3542     '("gint64" "attr_value")
3543   )
3544 )
3545
3546 (define-method set_attribute_object
3547   (of-object "GFileInfo")
3548   (c-name "g_file_info_set_attribute_object")
3549   (return-type "none")
3550   (parameters
3551     '("const-char*" "attribute")
3552     '("GObject*" "attr_value")
3553   )
3554 )
3555
3556 (define-method clear_status
3557   (of-object "GFileInfo")
3558   (c-name "g_file_info_clear_status")
3559   (return-type "none")
3560 )
3561
3562 (define-method get_file_type
3563   (of-object "GFileInfo")
3564   (c-name "g_file_info_get_file_type")
3565   (return-type "GFileType")
3566 )
3567
3568 (define-method get_is_hidden
3569   (of-object "GFileInfo")
3570   (c-name "g_file_info_get_is_hidden")
3571   (return-type "gboolean")
3572 )
3573
3574 (define-method get_is_backup
3575   (of-object "GFileInfo")
3576   (c-name "g_file_info_get_is_backup")
3577   (return-type "gboolean")
3578 )
3579
3580 (define-method get_is_symlink
3581   (of-object "GFileInfo")
3582   (c-name "g_file_info_get_is_symlink")
3583   (return-type "gboolean")
3584 )
3585
3586 (define-method get_name
3587   (of-object "GFileInfo")
3588   (c-name "g_file_info_get_name")
3589   (return-type "const-char*")
3590 )
3591
3592 (define-method get_display_name
3593   (of-object "GFileInfo")
3594   (c-name "g_file_info_get_display_name")
3595   (return-type "const-char*")
3596 )
3597
3598 (define-method get_edit_name
3599   (of-object "GFileInfo")
3600   (c-name "g_file_info_get_edit_name")
3601   (return-type "const-char*")
3602 )
3603
3604 (define-method get_icon
3605   (of-object "GFileInfo")
3606   (c-name "g_file_info_get_icon")
3607   (return-type "GIcon*")
3608 )
3609
3610 (define-method get_content_type
3611   (of-object "GFileInfo")
3612   (c-name "g_file_info_get_content_type")
3613   (return-type "const-char*")
3614 )
3615
3616 (define-method get_size
3617   (of-object "GFileInfo")
3618   (c-name "g_file_info_get_size")
3619   (return-type "goffset")
3620 )
3621
3622 ;;
3623 ;; wrapped in gfileinfo.override
3624 ;;
3625 (define-method get_modification_time
3626   (docstring
3627 "INFO.get_modification_time() -> modification time\n"
3628 "Returns the modification time, in UNIX time format\n")
3629   (of-object "GFileInfo")
3630   (c-name "g_file_info_get_modification_time")
3631   (return-type "none")
3632   (parameters
3633     '("GTimeVal*" "result")
3634   )
3635 )
3636
3637 (define-method get_symlink_target
3638   (of-object "GFileInfo")
3639   (c-name "g_file_info_get_symlink_target")
3640   (return-type "const-char*")
3641 )
3642
3643 (define-method get_etag
3644   (of-object "GFileInfo")
3645   (c-name "g_file_info_get_etag")
3646   (return-type "const-char*")
3647 )
3648
3649 (define-method get_sort_order
3650   (of-object "GFileInfo")
3651   (c-name "g_file_info_get_sort_order")
3652   (return-type "gint32")
3653 )
3654
3655 (define-method set_attribute_mask
3656   (of-object "GFileInfo")
3657   (c-name "g_file_info_set_attribute_mask")
3658   (return-type "none")
3659   (parameters
3660     '("GFileAttributeMatcher*" "mask")
3661   )
3662 )
3663
3664 (define-method unset_attribute_mask
3665   (of-object "GFileInfo")
3666   (c-name "g_file_info_unset_attribute_mask")
3667   (return-type "none")
3668 )
3669
3670 (define-method set_file_type
3671   (of-object "GFileInfo")
3672   (c-name "g_file_info_set_file_type")
3673   (return-type "none")
3674   (parameters
3675     '("GFileType" "type")
3676   )
3677 )
3678
3679 (define-method set_is_hidden
3680   (of-object "GFileInfo")
3681   (c-name "g_file_info_set_is_hidden")
3682   (return-type "none")
3683   (parameters
3684     '("gboolean" "is_hidden")
3685   )
3686 )
3687
3688 (define-method set_is_symlink
3689   (of-object "GFileInfo")
3690   (c-name "g_file_info_set_is_symlink")
3691   (return-type "none")
3692   (parameters
3693     '("gboolean" "is_symlink")
3694   )
3695 )
3696
3697 (define-method set_name
3698   (of-object "GFileInfo")
3699   (c-name "g_file_info_set_name")
3700   (return-type "none")
3701   (parameters
3702     '("const-char*" "name")
3703   )
3704 )
3705
3706 (define-method set_display_name
3707   (of-object "GFileInfo")
3708   (c-name "g_file_info_set_display_name")
3709   (return-type "none")
3710   (parameters
3711     '("const-char*" "display_name")
3712   )
3713 )
3714
3715 (define-method set_edit_name
3716   (of-object "GFileInfo")
3717   (c-name "g_file_info_set_edit_name")
3718   (return-type "none")
3719   (parameters
3720     '("const-char*" "edit_name")
3721   )
3722 )
3723
3724 (define-method set_icon
3725   (of-object "GFileInfo")
3726   (c-name "g_file_info_set_icon")
3727   (return-type "none")
3728   (parameters
3729     '("GIcon*" "icon")
3730   )
3731 )
3732
3733 (define-method set_content_type
3734   (of-object "GFileInfo")
3735   (c-name "g_file_info_set_content_type")
3736   (return-type "none")
3737   (parameters
3738     '("const-char*" "content_type")
3739   )
3740 )
3741
3742 (define-method set_size
3743   (of-object "GFileInfo")
3744   (c-name "g_file_info_set_size")
3745   (return-type "none")
3746   (parameters
3747     '("goffset" "size")
3748   )
3749 )
3750
3751 (define-method set_modification_time
3752   (of-object "GFileInfo")
3753   (c-name "g_file_info_set_modification_time")
3754   (return-type "none")
3755   (parameters
3756     '("GTimeVal*" "mtime")
3757   )
3758 )
3759
3760 (define-method set_symlink_target
3761   (of-object "GFileInfo")
3762   (c-name "g_file_info_set_symlink_target")
3763   (return-type "none")
3764   (parameters
3765     '("const-char*" "symlink_target")
3766   )
3767 )
3768
3769 (define-method set_sort_order
3770   (of-object "GFileInfo")
3771   (c-name "g_file_info_set_sort_order")
3772   (return-type "none")
3773   (parameters
3774     '("gint32" "sort_order")
3775   )
3776 )
3777
3778 (define-function file_attribute_matcher_new
3779   (c-name "g_file_attribute_matcher_new")
3780   (is-constructor-of "GFileAttributeMatcher")
3781   (return-type "GFileAttributeMatcher*")
3782   (parameters
3783     '("const-char*" "attributes")
3784   )
3785 )
3786
3787 (define-method ref
3788   (of-object "GFileAttributeMatcher")
3789   (c-name "g_file_attribute_matcher_ref")
3790   (return-type "GFileAttributeMatcher*")
3791 )
3792
3793 (define-method unref
3794   (of-object "GFileAttributeMatcher")
3795   (c-name "g_file_attribute_matcher_unref")
3796   (return-type "none")
3797 )
3798
3799 (define-method matches
3800   (of-object "GFileAttributeMatcher")
3801   (c-name "g_file_attribute_matcher_matches")
3802   (return-type "gboolean")
3803   (parameters
3804     '("const-char*" "attribute")
3805   )
3806 )
3807
3808 (define-method matches_only
3809   (of-object "GFileAttributeMatcher")
3810   (c-name "g_file_attribute_matcher_matches_only")
3811   (return-type "gboolean")
3812   (parameters
3813     '("const-char*" "attribute")
3814   )
3815 )
3816
3817 (define-method enumerate_namespace
3818   (of-object "GFileAttributeMatcher")
3819   (c-name "g_file_attribute_matcher_enumerate_namespace")
3820   (return-type "gboolean")
3821   (parameters
3822     '("const-char*" "ns")
3823   )
3824 )
3825
3826 (define-method enumerate_next
3827   (of-object "GFileAttributeMatcher")
3828   (c-name "g_file_attribute_matcher_enumerate_next")
3829   (return-type "const-char*")
3830 )
3831
3832
3833
3834 ;; From gfileinputstream.h
3835
3836 (define-function file_input_stream_get_type
3837   (c-name "g_file_input_stream_get_type")
3838   (return-type "GType")
3839 )
3840
3841 (define-method query_info
3842   (of-object "GFileInputStream")
3843   (c-name "g_file_input_stream_query_info")
3844   (return-type "GFileInfo*")
3845   (parameters
3846     '("char*" "attributes")
3847     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
3848     '("GError**" "error")
3849   )
3850 )
3851
3852 (define-method query_info_async
3853   (of-object "GFileInputStream")
3854   (c-name "g_file_input_stream_query_info_async")
3855   (return-type "none")
3856   (parameters
3857     '("char*" "attributes")
3858     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
3859     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
3860     '("GAsyncReadyCallback" "callback")
3861     '("gpointer" "user_data")
3862   )
3863 )
3864
3865 (define-method query_info_finish
3866   (of-object "GFileInputStream")
3867   (c-name "g_file_input_stream_query_info_finish")
3868   (return-type "GFileInfo*")
3869   (parameters
3870     '("GAsyncResult*" "result")
3871     '("GError**" "error")
3872   )
3873 )
3874
3875
3876
3877 ;; From gfileiostream.h
3878
3879 (define-function file_io_stream_get_type
3880   (c-name "g_file_io_stream_get_type")
3881   (return-type "GType")
3882 )
3883
3884 (define-method query_info
3885   (of-object "GFileIOStream")
3886   (c-name "g_file_io_stream_query_info")
3887   (return-type "GFileInfo*")
3888   (parameters
3889     '("const-char*" "attributes")
3890     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
3891     '("GError**" "error")
3892   )
3893 )
3894
3895 (define-method query_info_async
3896   (of-object "GFileIOStream")
3897   (c-name "g_file_io_stream_query_info_async")
3898   (return-type "none")
3899   (parameters
3900     '("const-char*" "attributes")
3901     '("int" "io_priority")
3902     '("GCancellable*" "cancellable")
3903     '("GAsyncReadyCallback" "callback")
3904     '("gpointer" "user_data")
3905   )
3906 )
3907
3908 (define-method query_info_finish
3909   (of-object "GFileIOStream")
3910   (c-name "g_file_io_stream_query_info_finish")
3911   (return-type "GFileInfo*")
3912   (parameters
3913     '("GAsyncResult*" "result")
3914     '("GError**" "error")
3915   )
3916 )
3917
3918 (define-method get_etag
3919   (of-object "GFileIOStream")
3920   (c-name "g_file_io_stream_get_etag")
3921   (return-type "char*")
3922 )
3923
3924
3925
3926
3927 ;; From gfilemonitor.h
3928
3929 (define-function file_monitor_get_type
3930   (c-name "g_file_monitor_get_type")
3931   (return-type "GType")
3932 )
3933
3934 (define-method cancel
3935   (of-object "GFileMonitor")
3936   (c-name "g_file_monitor_cancel")
3937   (return-type "gboolean")
3938 )
3939
3940 (define-method is_cancelled
3941   (of-object "GFileMonitor")
3942   (c-name "g_file_monitor_is_cancelled")
3943   (return-type "gboolean")
3944 )
3945
3946 (define-method set_rate_limit
3947   (of-object "GFileMonitor")
3948   (c-name "g_file_monitor_set_rate_limit")
3949   (return-type "none")
3950   (parameters
3951     '("int" "limit_msecs")
3952   )
3953 )
3954
3955 (define-method emit_event
3956   (of-object "GFileMonitor")
3957   (c-name "g_file_monitor_emit_event")
3958   (return-type "none")
3959   (parameters
3960     '("GFile*" "file")
3961     '("GFile*" "other_file")
3962     '("GFileMonitorEvent" "event_type")
3963   )
3964 )
3965
3966
3967
3968 ;; From gfilenamecompleter.h
3969
3970 (define-function filename_completer_get_type
3971   (c-name "g_filename_completer_get_type")
3972   (return-type "GType")
3973 )
3974
3975 (define-function filename_completer_new
3976   (c-name "g_filename_completer_new")
3977   (is-constructor-of "GFilenameCompleter")
3978   (return-type "GFilenameCompleter*")
3979 )
3980
3981 (define-method get_completion_suffix
3982   (of-object "GFilenameCompleter")
3983   (c-name "g_filename_completer_get_completion_suffix")
3984   (return-type "char*")
3985   (parameters
3986     '("const-char*" "initial_text")
3987   )
3988 )
3989
3990 (define-method get_completions
3991   (of-object "GFilenameCompleter")
3992   (c-name "g_filename_completer_get_completions")
3993   (return-type "char**")
3994   (parameters
3995     '("const-char*" "initial_text")
3996   )
3997 )
3998
3999 (define-method set_dirs_only
4000   (of-object "GFilenameCompleter")
4001   (c-name "g_filename_completer_set_dirs_only")
4002   (return-type "none")
4003   (parameters
4004     '("gboolean" "dirs_only")
4005   )
4006 )
4007
4008
4009
4010 ;; From gfileoutputstream.h
4011
4012 (define-function file_output_stream_get_type
4013   (c-name "g_file_output_stream_get_type")
4014   (return-type "GType")
4015 )
4016
4017 (define-method query_info
4018   (of-object "GFileOutputStream")
4019   (c-name "g_file_output_stream_query_info")
4020   (return-type "GFileInfo*")
4021   (parameters
4022     '("char*" "attributes")
4023     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4024     '("GError**" "error")
4025   )
4026 )
4027
4028 (define-method query_info_async
4029   (of-object "GFileOutputStream")
4030   (c-name "g_file_output_stream_query_info_async")
4031   (return-type "none")
4032   (parameters
4033     '("char*" "attributes")
4034     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
4035     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4036     '("GAsyncReadyCallback" "callback")
4037     '("gpointer" "user_data")
4038   )
4039 )
4040
4041 (define-method query_info_finish
4042   (of-object "GFileOutputStream")
4043   (c-name "g_file_output_stream_query_info_finish")
4044   (return-type "GFileInfo*")
4045   (parameters
4046     '("GAsyncResult*" "result")
4047     '("GError**" "error")
4048   )
4049 )
4050
4051 (define-method get_etag
4052   (of-object "GFileOutputStream")
4053   (c-name "g_file_output_stream_get_etag")
4054   (return-type "char*")
4055 )
4056
4057
4058 ;; From gfilterinputstream.h
4059
4060 (define-function filter_input_stream_get_type
4061   (c-name "g_filter_input_stream_get_type")
4062   (return-type "GType")
4063 )
4064
4065 (define-method get_base_stream
4066   (of-object "GFilterInputStream")
4067   (c-name "g_filter_input_stream_get_base_stream")
4068   (return-type "GInputStream*")
4069 )
4070
4071 (define-method get_close_base_stream
4072   (of-object "GFilterInputStream")
4073   (c-name "g_filter_input_stream_get_close_base_stream")
4074   (return-type "gboolean")
4075 )
4076
4077 (define-method set_close_base_stream
4078   (of-object "GFilterInputStream")
4079   (c-name "g_filter_input_stream_set_close_base_stream")
4080   (return-type "none")
4081   (parameters
4082     '("gboolean" "close_base")
4083   )
4084 )
4085
4086
4087
4088 ;; From gfilteroutputstream.h
4089
4090 (define-function filter_output_stream_get_type
4091   (c-name "g_filter_output_stream_get_type")
4092   (return-type "GType")
4093 )
4094
4095 (define-method get_base_stream
4096   (of-object "GFilterOutputStream")
4097   (c-name "g_filter_output_stream_get_base_stream")
4098   (return-type "GOutputStream*")
4099 )
4100
4101 (define-method get_close_base_stream
4102   (of-object "GFilterOutputStream")
4103   (c-name "g_filter_output_stream_get_close_base_stream")
4104   (return-type "gboolean")
4105 )
4106
4107 (define-method set_close_base_stream
4108   (of-object "GFilterOutputStream")
4109   (c-name "g_filter_output_stream_set_close_base_stream")
4110   (return-type "none")
4111   (parameters
4112     '("gboolean" "close_base")
4113   )
4114 )
4115
4116
4117
4118 ;; From gicon.h
4119
4120 (define-function icon_get_type
4121   (c-name "g_icon_get_type")
4122   (return-type "GType")
4123 )
4124
4125 (define-function icon_hash
4126   (c-name "g_icon_hash")
4127   (return-type "guint")
4128   (parameters
4129     '("gconstpointer" "icon")
4130   )
4131 )
4132
4133 (define-method equal
4134   (of-object "GIcon")
4135   (c-name "g_icon_equal")
4136   (return-type "gboolean")
4137   (parameters
4138     '("GIcon*" "icon2")
4139   )
4140 )
4141
4142 (define-method to_string
4143   (of-object "GIcon")
4144   (c-name "g_icon_to_string")
4145   (return-type "gchar*")
4146 )
4147
4148 (define-function icon_new_for_string
4149   (c-name "g_icon_new_for_string")
4150   (return-type "GIcon*")
4151   (parameters
4152     '("const-gchar*" "str")
4153     '("GError**" "error")
4154   )
4155 )
4156
4157
4158
4159 ;; From ginetsocketaddress.h
4160
4161 (define-function inet_socket_address_get_type
4162   (c-name "g_inet_socket_address_get_type")
4163   (return-type "GType")
4164 )
4165
4166 (define-function inet_socket_address_new
4167   (c-name "g_inet_socket_address_new")
4168   (is-constructor-of "GInetSocketAddress")
4169   (return-type "GSocketAddress*")
4170   (parameters
4171     '("GInetAddress*" "address")
4172     '("guint16" "port")
4173   )
4174 )
4175
4176 (define-method get_address
4177   (of-object "GInetSocketAddress")
4178   (c-name "g_inet_socket_address_get_address")
4179   (return-type "GInetAddress*")
4180 )
4181
4182 (define-method get_port
4183   (of-object "GInetSocketAddress")
4184   (c-name "g_inet_socket_address_get_port")
4185   (return-type "guint16")
4186 )
4187
4188
4189
4190 ;; From ginputstream.h
4191
4192 (define-function input_stream_get_type
4193   (c-name "g_input_stream_get_type")
4194   (return-type "GType")
4195 )
4196
4197 ;;
4198 ;; wrapped in ginputstream.override
4199 ;;
4200 ;; Note: the following two methods are renamed for consistency with
4201 ;; Python file objects' read().  I.e. g_input_stream_read_all() is
4202 ;; more like Python file.read(), so it is renamed read().  Since now
4203 ;; there is a name clash, g_input_stream_read() is renamed
4204 ;; read_part().
4205 (define-method read_part
4206   (of-object "GInputStream")
4207   (docstring
4208    "STREAM.read_part([count, [cancellable]]) -> string\n"
4209    "\n"
4210    "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
4211    "omitted, read until the end of the stream. This method is allowed to\n"
4212    "stop at any time after reading at least 1 byte from the stream. E.g.\n"
4213    "when reading over a (relatively slow) HTTP connection, it will often\n"
4214    "stop after receiving one packet. Therefore, to reliably read requested\n"
4215    "number of bytes, you need to use a loop. See also gio.InputStream.read\n"
4216    "for easier to use (though less efficient) method.\n"
4217    "\n"
4218    "Note: this method roughly corresponds to C GIO g_input_stream_read."
4219   )
4220   (c-name "g_input_stream_read")
4221   (return-type "gssize")
4222   (parameters
4223     '("void*" "buffer")
4224     '("gsize" "count")
4225     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4226     '("GError**" "error")
4227   )
4228 )
4229
4230 ;;
4231 ;; wrapped in ginputstream.override
4232 ;;
4233 ;; See comments before the previous method definition.
4234 (define-method read
4235   (of-object "GInputStream")
4236   (docstring
4237    "STREAM.read([count, [cancellable]]) -> string\n"
4238    "\n"
4239    "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
4240    "omitted, read until the end of the stream. This method will stop only\n"
4241    "after reading requested number of bytes, reaching end of stream or\n"
4242    "triggering an I/O error. See also gio.InputStream.read_part for more\n"
4243    "efficient, but more cumbersome to use method.\n"
4244    "\n"
4245    "Note: this method roughly corresponds to C GIO g_input_stream_read_all.\n"
4246    "It was renamed for consistency with Python standard file.read."
4247   )
4248   (c-name "g_input_stream_read_all")
4249   (return-type "gboolean")
4250   (parameters
4251     '("void*" "buffer")
4252     '("gsize" "count")
4253     '("gsize*" "bytes_read")
4254     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4255     '("GError**" "error")
4256   )
4257 )
4258
4259 (define-method skip
4260   (of-object "GInputStream")
4261   (c-name "g_input_stream_skip")
4262   (return-type "gssize")
4263   (parameters
4264     '("gsize" "count")
4265     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4266     '("GError**" "error")
4267   )
4268 )
4269
4270 (define-method close
4271   (of-object "GInputStream")
4272   (c-name "g_input_stream_close")
4273   (return-type "gboolean")
4274   (parameters
4275     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4276     '("GError**" "error")
4277   )
4278 )
4279
4280 ;;
4281 ;; wrapped in ginputstream.override
4282 ;;
4283 (define-method read_async
4284   (of-object "GInputStream")
4285   (c-name "g_input_stream_read_async")
4286   (return-type "none")
4287   (parameters
4288     '("void*" "buffer")
4289     '("gsize" "count")
4290     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
4291     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4292     '("GAsyncReadyCallback" "callback")
4293     '("gpointer" "user_data")
4294   )
4295 )
4296
4297 ;;
4298 ;; wrapped in ginputstream.override
4299 ;;
4300 (define-method read_finish
4301   (of-object "GInputStream")
4302   (c-name "g_input_stream_read_finish")
4303   (return-type "gssize")
4304   (parameters
4305     '("GAsyncResult*" "result")
4306     '("GError**" "error")
4307   )
4308 )
4309
4310 (define-method skip_async
4311   (of-object "GInputStream")
4312   (c-name "g_input_stream_skip_async")
4313   (return-type "none")
4314   (parameters
4315     '("gsize" "count")
4316     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
4317     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4318     '("GAsyncReadyCallback" "callback")
4319     '("gpointer" "user_data")
4320   )
4321 )
4322
4323 (define-method skip_finish
4324   (of-object "GInputStream")
4325   (c-name "g_input_stream_skip_finish")
4326   (return-type "gssize")
4327   (parameters
4328     '("GAsyncResult*" "result")
4329     '("GError**" "error")
4330   )
4331 )
4332
4333 ;;
4334 ;; wrapped in ginputstream.override
4335 ;;
4336 (define-method close_async
4337   (of-object "GInputStream")
4338   (c-name "g_input_stream_close_async")
4339   (return-type "none")
4340   (parameters
4341     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
4342     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4343     '("GAsyncReadyCallback" "callback")
4344     '("gpointer" "user_data")
4345   )
4346 )
4347
4348 (define-method close_finish
4349   (of-object "GInputStream")
4350   (c-name "g_input_stream_close_finish")
4351   (return-type "gboolean")
4352   (parameters
4353     '("GAsyncResult*" "result")
4354     '("GError**" "error")
4355   )
4356 )
4357
4358 (define-method is_closed
4359   (of-object "GInputStream")
4360   (c-name "g_input_stream_is_closed")
4361   (return-type "gboolean")
4362 )
4363
4364 (define-method has_pending
4365   (of-object "GInputStream")
4366   (c-name "g_input_stream_has_pending")
4367   (return-type "gboolean")
4368 )
4369
4370 (define-method set_pending
4371   (of-object "GInputStream")
4372   (c-name "g_input_stream_set_pending")
4373   (return-type "gboolean")
4374   (parameters
4375     '("GError**" "error")
4376   )
4377 )
4378
4379 (define-method clear_pending
4380   (of-object "GInputStream")
4381   (c-name "g_input_stream_clear_pending")
4382   (return-type "none")
4383 )
4384
4385
4386
4387 ;; From gioalias.h
4388
4389
4390
4391 ;; From gioenumtypes.h
4392
4393 (define-function app_info_create_flags_get_type
4394   (c-name "g_app_info_create_flags_get_type")
4395   (return-type "GType")
4396 )
4397
4398 (define-function data_stream_byte_order_get_type
4399   (c-name "g_data_stream_byte_order_get_type")
4400   (return-type "GType")
4401 )
4402
4403 (define-function data_stream_newline_type_get_type
4404   (c-name "g_data_stream_newline_type_get_type")
4405   (return-type "GType")
4406 )
4407
4408 (define-function file_query_info_flags_get_type
4409   (c-name "g_file_query_info_flags_get_type")
4410   (return-type "GType")
4411 )
4412
4413 (define-function file_create_flags_get_type
4414   (c-name "g_file_create_flags_get_type")
4415   (return-type "GType")
4416 )
4417
4418 (define-function file_copy_flags_get_type
4419   (c-name "g_file_copy_flags_get_type")
4420   (return-type "GType")
4421 )
4422
4423 (define-function file_monitor_flags_get_type
4424   (c-name "g_file_monitor_flags_get_type")
4425   (return-type "GType")
4426 )
4427
4428 (define-function file_attribute_type_get_type
4429   (c-name "g_file_attribute_type_get_type")
4430   (return-type "GType")
4431 )
4432
4433 (define-function file_attribute_info_flags_get_type
4434   (c-name "g_file_attribute_info_flags_get_type")
4435   (return-type "GType")
4436 )
4437
4438 (define-function file_attribute_status_get_type
4439   (c-name "g_file_attribute_status_get_type")
4440   (return-type "GType")
4441 )
4442
4443 (define-function file_type_get_type
4444   (c-name "g_file_type_get_type")
4445   (return-type "GType")
4446 )
4447
4448 (define-function file_monitor_event_get_type
4449   (c-name "g_file_monitor_event_get_type")
4450   (return-type "GType")
4451 )
4452
4453 (define-function io_error_enum_get_type
4454   (c-name "g_io_error_enum_get_type")
4455   (return-type "GType")
4456 )
4457
4458 (define-function ask_password_flags_get_type
4459   (c-name "g_ask_password_flags_get_type")
4460   (return-type "GType")
4461 )
4462
4463 (define-function password_save_get_type
4464   (c-name "g_password_save_get_type")
4465   (return-type "GType")
4466 )
4467
4468 (define-function output_stream_splice_flags_get_type
4469   (c-name "g_output_stream_splice_flags_get_type")
4470   (return-type "GType")
4471 )
4472
4473
4474
4475 ;; From gioerror.h
4476
4477 (define-function io_error_quark
4478   (c-name "g_io_error_quark")
4479   (return-type "GQuark")
4480 )
4481
4482 (define-function io_error_from_errno
4483   (c-name "g_io_error_from_errno")
4484   (return-type "GIOErrorEnum")
4485   (parameters
4486     '("gint" "err_no")
4487   )
4488 )
4489
4490
4491
4492 ;; From gio.h
4493
4494
4495
4496 ;; From gio-marshal.h
4497
4498
4499
4500 ;; From giomodule.h
4501
4502 (define-function io_module_get_type
4503   (c-name "g_io_module_get_type")
4504   (return-type "GType")
4505 )
4506
4507 (define-function io_module_new
4508   (c-name "g_io_module_new")
4509   (is-constructor-of "GIoModule")
4510   (return-type "GIOModule*")
4511   (parameters
4512     '("const-gchar*" "filename")
4513   )
4514 )
4515
4516 (define-function io_modules_load_all_in_directory
4517   (c-name "g_io_modules_load_all_in_directory")
4518   (return-type "GList*")
4519   (parameters
4520     '("const-char*" "dirname")
4521   )
4522 )
4523
4524 (define-method load
4525   (of-object "GIOModule")
4526   (c-name "g_io_module_load")
4527   (return-type "none")
4528 )
4529
4530 (define-method unload
4531   (of-object "GIOModule")
4532   (c-name "g_io_module_unload")
4533   (return-type "none")
4534 )
4535
4536
4537
4538 ;; From gioscheduler.h
4539
4540 (define-function io_scheduler_push_job
4541   (c-name "g_io_scheduler_push_job")
4542   (return-type "none")
4543   (parameters
4544     '("GIOSchedulerJobFunc" "job_func")
4545     '("gpointer" "user_data")
4546     '("GDestroyNotify" "notify")
4547     '("gint" "io_priority" (default "G_PRIORITY_DEFAULT"))
4548     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4549   )
4550 )
4551
4552 (define-function io_scheduler_cancel_all_jobs
4553   (c-name "g_io_scheduler_cancel_all_jobs")
4554   (return-type "none")
4555 )
4556
4557 (define-method send_to_mainloop
4558   (of-object "GIOSchedulerJob")
4559   (c-name "g_io_scheduler_job_send_to_mainloop")
4560   (return-type "gboolean")
4561   (parameters
4562     '("GSourceFunc" "func")
4563     '("gpointer" "user_data")
4564     '("GDestroyNotify" "notify")
4565   )
4566 )
4567
4568 (define-method send_to_mainloop_async
4569   (of-object "GIOSchedulerJob")
4570   (c-name "g_io_scheduler_job_send_to_mainloop_async")
4571   (return-type "none")
4572   (parameters
4573     '("GSourceFunc" "func")
4574     '("gpointer" "user_data")
4575     '("GDestroyNotify" "notify")
4576   )
4577 )
4578
4579
4580
4581 ;; From gloadableicon.h
4582
4583 (define-function loadable_icon_get_type
4584   (c-name "g_loadable_icon_get_type")
4585   (return-type "GType")
4586 )
4587
4588 ;;
4589 ;; wrapped in gicon.override
4590 ;;
4591 (define-method load
4592   (of-object "GLoadableIcon")
4593   (docstring
4594   "ICON.load([size, [cancellable]]) -> input stream, type\n"
4595   "\n"
4596   "Opens a stream of icon data for reading. The result is a tuple of\n"
4597   "gio.InputStream and type (either a string or None). The stream can\n"
4598   "be read to retrieve icon data.\n"
4599   "\n"
4600   ;; Note: this is just a guess, GIO docs say nothing at the moment.
4601   "Optional size is a hint at desired icon size. Not all implementations\n"
4602   "support it and the hint will be just ignored in such cases.\n"
4603   "If cancellable is specified, then the operation can be cancelled\n"
4604   "by triggering the cancellable object from another thread. See\n"
4605   "gio.File.read for details."
4606   )
4607   (c-name "g_loadable_icon_load")
4608   (return-type "GInputStream*")
4609   (parameters
4610     '("int" "size")
4611     '("char**" "type")
4612     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4613     '("GError**" "error")
4614   )
4615 )
4616
4617 ;;
4618 ;; wrapped in gicon.override
4619 ;;
4620 (define-method load_async
4621   (of-object "GLoadableIcon")
4622   (docstring
4623   "ICON.load_async(callback, [size, [cancellable, [user_data]]])\n"
4624   "-> start loading\n"
4625   "\n"
4626   "For more information, see gio.LoadableIcon.load() which is the\n"
4627   "synchronous version of this call. Asynchronously opens icon data for\n"
4628   "reading. When the operation is finished, callback will be called.\n"
4629   "You can then call gio.LoadableIcon.load_finish() to get the result of\n"
4630   "the operation.\n"
4631   )
4632   (c-name "g_loadable_icon_load_async")
4633   (return-type "none")
4634   (parameters
4635     '("int" "size")
4636     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4637     '("GAsyncReadyCallback" "callback")
4638     '("gpointer" "user_data")
4639   )
4640 )
4641
4642 ;;
4643 ;; wrapped in gicon.override
4644 ;;
4645 (define-method load_finish
4646   (docstring
4647   "F.load_finish(res) -> start loading\n"
4648   "\n"
4649   "Finish asynchronous icon loading operation. Must be called from callback\n"
4650   "as specified to gio.LoadableIcon.load_async. Returns a tuple of\n"
4651   "gio.InputStream and type, just as gio.LoadableIcon.load."
4652   )
4653   (of-object "GLoadableIcon")
4654   (c-name "g_loadable_icon_load_finish")
4655   (return-type "GInputStream*")
4656   (parameters
4657     '("GAsyncResult*" "res")
4658     '("char**" "type")
4659     '("GError**" "error")
4660   )
4661 )
4662
4663
4664
4665 ;; From ginetaddress.h
4666
4667 (define-function inet_address_get_type
4668   (c-name "g_inet_address_get_type")
4669   (return-type "GType")
4670 )
4671
4672 (define-function inet_address_new_from_string
4673   (c-name "g_inet_address_new_from_string")
4674   (return-type "GInetAddress*")
4675   (parameters
4676     '("const-gchar*" "string")
4677   )
4678 )
4679
4680 (define-function inet_address_new_from_bytes
4681   (c-name "g_inet_address_new_from_bytes")
4682   (return-type "GInetAddress*")
4683   (parameters
4684     '("const-guint8*" "bytes")
4685     '("GSocketFamily" "family")
4686   )
4687 )
4688
4689 (define-function inet_address_new_loopback
4690   (c-name "g_inet_address_new_loopback")
4691   (return-type "GInetAddress*")
4692   (parameters
4693     '("GSocketFamily" "family")
4694   )
4695 )
4696
4697 (define-function inet_address_new_any
4698   (c-name "g_inet_address_new_any")
4699   (return-type "GInetAddress*")
4700   (parameters
4701     '("GSocketFamily" "family")
4702   )
4703 )
4704
4705 (define-method to_string
4706   (of-object "GInetAddress")
4707   (c-name "g_inet_address_to_string")
4708   (return-type "gchar*")
4709 )
4710
4711
4712 ;; FIXME codegen barfs on this one
4713 ;;
4714 ;;(define-method to_bytes
4715 ;;  (of-object "GInetAddress")
4716 ;;  (c-name "g_inet_address_to_bytes")
4717 ;;  (return-type "const-guint8*")
4718 ;;)
4719
4720 (define-method get_native_size
4721   (of-object "GInetAddress")
4722   (c-name "g_inet_address_get_native_size")
4723   (return-type "gsize")
4724 )
4725
4726 (define-method get_family
4727   (of-object "GInetAddress")
4728   (c-name "g_inet_address_get_family")
4729   (return-type "GSocketFamily")
4730 )
4731
4732 (define-method get_is_any
4733   (of-object "GInetAddress")
4734   (c-name "g_inet_address_get_is_any")
4735   (return-type "gboolean")
4736 )
4737
4738 (define-method get_is_loopback
4739   (of-object "GInetAddress")
4740   (c-name "g_inet_address_get_is_loopback")
4741   (return-type "gboolean")
4742 )
4743
4744 (define-method get_is_link_local
4745   (of-object "GInetAddress")
4746   (c-name "g_inet_address_get_is_link_local")
4747   (return-type "gboolean")
4748 )
4749
4750 (define-method get_is_site_local
4751   (of-object "GInetAddress")
4752   (c-name "g_inet_address_get_is_site_local")
4753   (return-type "gboolean")
4754 )
4755
4756 (define-method get_is_multicast
4757   (of-object "GInetAddress")
4758   (c-name "g_inet_address_get_is_multicast")
4759   (return-type "gboolean")
4760 )
4761
4762 (define-method get_is_mc_global
4763   (of-object "GInetAddress")
4764   (c-name "g_inet_address_get_is_mc_global")
4765   (return-type "gboolean")
4766 )
4767
4768 (define-method get_is_mc_link_local
4769   (of-object "GInetAddress")
4770   (c-name "g_inet_address_get_is_mc_link_local")
4771   (return-type "gboolean")
4772 )
4773
4774 (define-method get_is_mc_node_local
4775   (of-object "GInetAddress")
4776   (c-name "g_inet_address_get_is_mc_node_local")
4777   (return-type "gboolean")
4778 )
4779
4780 (define-method get_is_mc_org_local
4781   (of-object "GInetAddress")
4782   (c-name "g_inet_address_get_is_mc_org_local")
4783   (return-type "gboolean")
4784 )
4785
4786 (define-method get_is_mc_site_local
4787   (of-object "GInetAddress")
4788   (c-name "g_inet_address_get_is_mc_site_local")
4789   (return-type "gboolean")
4790 )
4791
4792
4793
4794 ;; From ginitable.h
4795
4796 (define-function initable_get_type
4797   (c-name "g_initable_get_type")
4798   (return-type "GType")
4799 )
4800
4801 (define-method init
4802   (of-object "GInitable")
4803   (c-name "g_initable_init")
4804   (return-type "gboolean")
4805   (parameters
4806     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4807     '("GError**" "error")
4808   )
4809 )
4810
4811 (define-function initable_new
4812   (c-name "g_initable_new")
4813   (return-type "gpointer")
4814   (parameters
4815     '("GType" "object_type")
4816     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4817     '("GError**" "error")
4818     '("const-gchar*" "first_property_name")
4819   )
4820   (varargs #t)
4821 )
4822
4823 (define-function initable_newv
4824   (c-name "g_initable_newv")
4825   (return-type "gpointer")
4826   (parameters
4827     '("GType" "object_type")
4828     '("guint" "n_parameters")
4829     '("GParameter*" "parameters")
4830     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4831     '("GError**" "error")
4832   )
4833 )
4834
4835 (define-function initable_new_valist
4836   (c-name "g_initable_new_valist")
4837   (return-type "GObject*")
4838   (parameters
4839     '("GType" "object_type")
4840     '("const-gchar*" "first_property_name")
4841     '("va_list" "var_args")
4842     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4843     '("GError**" "error")
4844   )
4845 )
4846
4847
4848
4849 ;; From giostream.h
4850
4851 (define-function io_stream_get_type
4852   (c-name "g_io_stream_get_type")
4853   (return-type "GType")
4854 )
4855
4856 (define-method get_input_stream
4857   (of-object "GIOStream")
4858   (c-name "g_io_stream_get_input_stream")
4859   (return-type "GInputStream*")
4860 )
4861
4862 (define-method get_output_stream
4863   (of-object "GIOStream")
4864   (c-name "g_io_stream_get_output_stream")
4865   (return-type "GOutputStream*")
4866 )
4867
4868 (define-method close
4869   (of-object "GIOStream")
4870   (c-name "g_io_stream_close")
4871   (return-type "gboolean")
4872   (parameters
4873     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4874     '("GError**" "error")
4875   )
4876 )
4877
4878 (define-method close_async
4879   (of-object "GIOStream")
4880   (c-name "g_io_stream_close_async")
4881   (return-type "none")
4882   (parameters
4883     '("int" "io_priority")
4884     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
4885     '("GAsyncReadyCallback" "callback")
4886     '("gpointer" "user_data")
4887   )
4888 )
4889
4890 (define-method close_finish
4891   (of-object "GIOStream")
4892   (c-name "g_io_stream_close_finish")
4893   (return-type "gboolean")
4894   (parameters
4895     '("GAsyncResult*" "result")
4896     '("GError**" "error")
4897   )
4898 )
4899
4900 (define-method is_closed
4901   (of-object "GIOStream")
4902   (c-name "g_io_stream_is_closed")
4903   (return-type "gboolean")
4904 )
4905
4906 (define-method has_pending
4907   (of-object "GIOStream")
4908   (c-name "g_io_stream_has_pending")
4909   (return-type "gboolean")
4910 )
4911
4912 (define-method set_pending
4913   (of-object "GIOStream")
4914   (c-name "g_io_stream_set_pending")
4915   (return-type "gboolean")
4916   (parameters
4917     '("GError**" "error")
4918   )
4919 )
4920
4921 (define-method clear_pending
4922   (of-object "GIOStream")
4923   (c-name "g_io_stream_clear_pending")
4924   (return-type "none")
4925 )
4926
4927
4928
4929 ;; From glocaldirectorymonitor.h
4930
4931 (define-function local_directory_monitor_get_type
4932   (c-name "g_local_directory_monitor_get_type")
4933   (return-type "GType")
4934 )
4935
4936
4937
4938 ;; From glocalfileenumerator.h
4939
4940
4941
4942 ;; From glocalfile.h
4943
4944
4945
4946 ;; From glocalfileinfo.h
4947
4948
4949
4950 ;; From glocalfileinputstream.h
4951
4952
4953
4954 ;; From glocalfilemonitor.h
4955
4956 (define-function local_file_monitor_get_type
4957   (c-name "g_local_file_monitor_get_type")
4958   (return-type "GType")
4959 )
4960
4961
4962
4963 ;; From glocalfileoutputstream.h
4964
4965
4966
4967 ;; From glocalvfs.h
4968
4969
4970
4971 ;; From gmemoryinputstream.h
4972
4973 (define-function memory_input_stream_get_type
4974   (c-name "g_memory_input_stream_get_type")
4975   (return-type "GType")
4976 )
4977
4978 (define-function memory_input_stream_new
4979   (c-name "g_memory_input_stream_new")
4980   (is-constructor-of "GMemoryInputStream")
4981   (return-type "GInputStream*")
4982 )
4983
4984 (define-function memory_input_stream_new_from_data
4985   (c-name "g_memory_input_stream_new_from_data")
4986   (return-type "GInputStream*")
4987   (parameters
4988     '("const-void*" "data")
4989     '("gssize" "len")
4990     '("GDestroyNotify" "destroy")
4991   )
4992 )
4993
4994 ;;
4995 ;; wrapped in ginputstream.override
4996 ;;
4997 (define-method add_data
4998   (of-object "GMemoryInputStream")
4999   (c-name "g_memory_input_stream_add_data")
5000   (return-type "none")
5001   (parameters
5002     '("const-void*" "data")
5003     '("gssize" "len")
5004     '("GDestroyNotify" "destroy")
5005   )
5006 )
5007
5008
5009
5010 ;; From gmemoryoutputstream.h
5011
5012 (define-function memory_output_stream_get_type
5013   (c-name "g_memory_output_stream_get_type")
5014   (return-type "GType")
5015 )
5016
5017 ;;
5018 ;; wrapped in goutputstream.override
5019 ;;
5020 (define-function memory_output_stream_new
5021   (c-name "g_memory_output_stream_new")
5022   (is-constructor-of "GMemoryOutputStream")
5023   (return-type "GOutputStream*")
5024   (parameters
5025     '("gpointer" "data")
5026     '("gsize" "len")
5027     '("GReallocFunc" "realloc_fn")
5028     '("GDestroyNotify" "destroy")
5029   )
5030 )
5031
5032 ;;
5033 ;; wrapped in goutputstream.override
5034 ;;
5035 ;; Note: name clash with gobject.GObject.get_data; renamed.
5036 (define-method get_contents
5037   (of-object "GMemoryOutputStream")
5038   (c-name "g_memory_output_stream_get_data")
5039   (return-type "gpointer")
5040 )
5041
5042 (define-method get_size
5043   (of-object "GMemoryOutputStream")
5044   (c-name "g_memory_output_stream_get_size")
5045   (return-type "gsize")
5046 )
5047
5048 (define-method get_data_size
5049   (of-object "GMemoryOutputStream")
5050   (c-name "g_memory_output_stream_get_data_size")
5051   (return-type "gsize")
5052 )
5053
5054
5055
5056 ;; From gmount.h
5057
5058 (define-function mount_get_type
5059   (c-name "g_mount_get_type")
5060   (return-type "GType")
5061 )
5062
5063 (define-method get_root
5064   (of-object "GMount")
5065   (c-name "g_mount_get_root")
5066   (return-type "GFile*")
5067   (caller-owns-return #t)
5068 )
5069
5070 (define-method get_name
5071   (of-object "GMount")
5072   (c-name "g_mount_get_name")
5073   (return-type "char*")
5074 )
5075
5076 (define-method get_icon
5077   (of-object "GMount")
5078   (c-name "g_mount_get_icon")
5079   (return-type "GIcon*")
5080   (caller-owns-return #t)
5081 )
5082
5083 (define-method get_uuid
5084   (of-object "GMount")
5085   (c-name "g_mount_get_uuid")
5086   (return-type "char*")
5087 )
5088
5089 (define-method get_volume
5090   (of-object "GMount")
5091   (c-name "g_mount_get_volume")
5092   (return-type "GVolume*")
5093   (caller-owns-return #t)
5094 )
5095
5096 (define-method get_drive
5097   (of-object "GMount")
5098   (c-name "g_mount_get_drive")
5099   (return-type "GDrive*")
5100   (caller-owns-return #t)
5101 )
5102
5103 (define-method can_unmount
5104   (of-object "GMount")
5105   (c-name "g_mount_can_unmount")
5106   (return-type "gboolean")
5107 )
5108
5109 (define-method can_eject
5110   (of-object "GMount")
5111   (c-name "g_mount_can_eject")
5112   (return-type "gboolean")
5113 )
5114
5115 ;;
5116 ;; wrapped in gio.override
5117 ;;
5118 (define-method unmount
5119   (docstring
5120 "M.unmount(callback, [flags, cancellable, user_data])\n"
5121 "Unmounts a mount. This is an asynchronous operation, and is finished\n"
5122 "by calling gio.Mount.unmount_finish() with the mount and gio.AsyncResults\n"
5123 "data returned in the callback."
5124 )
5125   (of-object "GMount")
5126   (c-name "g_mount_unmount")
5127   (return-type "none")
5128   (parameters
5129     '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
5130     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5131     '("GAsyncReadyCallback" "callback")
5132     '("gpointer" "user_data")
5133   )
5134 )
5135
5136 (define-method unmount_finish
5137   (of-object "GMount")
5138   (c-name "g_mount_unmount_finish")
5139   (return-type "gboolean")
5140   (parameters
5141     '("GAsyncResult*" "result")
5142     '("GError**" "error")
5143   )
5144 )
5145
5146 ;;
5147 ;; wrapped in gio.override
5148 ;;
5149 (define-method eject
5150   (docstring
5151 "F.eject(callback, [flags, cancellable, user_data])\n"
5152 "Ejects a volume.\n"
5153 "\n"
5154 "If cancellable is not None, then the operation can be cancelled by\n"
5155 "triggering the cancellable object from another thread. If the\n"
5156 "operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
5157 "\n"
5158 "When the operation is finished, callback will be called. You can\n"
5159 "then call gio.Volume.eject_finish() to get the result of the operation.\n")
5160   (of-object "GMount")
5161   (c-name "g_mount_eject")
5162   (return-type "none")
5163   (parameters
5164     '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
5165     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5166     '("GAsyncReadyCallback" "callback")
5167     '("gpointer" "user_data")
5168   )
5169 )
5170
5171 (define-method eject_finish
5172   (of-object "GMount")
5173   (c-name "g_mount_eject_finish")
5174   (return-type "gboolean")
5175   (parameters
5176     '("GAsyncResult*" "result")
5177     '("GError**" "error")
5178   )
5179 )
5180
5181 ;;
5182 ;; wrapped in gio.override
5183 ;;
5184 (define-method remount
5185   (of-object "GMount")
5186   (docstring
5187    "M.remount(callback, [flags, [mount_operation, [cancellable, [user_data]]]])\n"
5188    "Remounts a mount. This is an asynchronous operation, and is finished by\n"
5189    "calling gio.Mount.remount_finish with the mount and gio.AsyncResults data\n"
5190    "returned in the callback.")
5191   (c-name "g_mount_remount")
5192   (return-type "none")
5193   (parameters
5194     '("GMountOperation*" "mount_operation")
5195     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5196     '("GAsyncReadyCallback" "callback")
5197     '("gpointer" "user_data")
5198   )
5199 )
5200
5201 (define-method remount_finish
5202   (of-object "GMount")
5203   (c-name "g_mount_remount_finish")
5204   (return-type "gboolean")
5205   (parameters
5206     '("GAsyncResult*" "result")
5207     '("GError**" "error")
5208   )
5209 )
5210
5211 (define-method guess_content_type
5212   (of-object "GMount")
5213   (c-name "g_mount_guess_content_type")
5214   (return-type "none")
5215   (parameters
5216     '("gboolean" "force_rescan")
5217     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5218     '("GAsyncReadyCallback" "callback")
5219     '("gpointer" "user_data")
5220   )
5221 )
5222
5223 (define-method guess_content_type_finish
5224   (of-object "GMount")
5225   (c-name "g_mount_guess_content_type_finish")
5226   (return-type "gchar**")
5227   (parameters
5228     '("GAsyncResult*" "result")
5229     '("GError**" "error")
5230   )
5231 )
5232
5233 (define-method guess_content_type_sync
5234   (of-object "GMount")
5235   (c-name "g_mount_guess_content_type_sync")
5236   (return-type "gchar**")
5237   (parameters
5238     '("gboolean" "force_rescan")
5239     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5240     '("GError**" "error")
5241   )
5242 )
5243
5244 (define-method is_shadowed
5245   (of-object "GMount")
5246   (c-name "g_mount_is_shadowed")
5247   (return-type "gboolean")
5248 )
5249
5250 (define-method shadow
5251   (of-object "GMount")
5252   (c-name "g_mount_shadow")
5253   (return-type "none")
5254 )
5255
5256 (define-method unshadow
5257   (of-object "GMount")
5258   (c-name "g_mount_unshadow")
5259   (return-type "none")
5260 )
5261
5262 (define-method unmount_with_operation
5263   (of-object "GMount")
5264   (c-name "g_mount_unmount_with_operation")
5265   (return-type "none")
5266   (parameters
5267     '("GMountUnmountFlags" "flags")
5268     '("GMountOperation*" "mount_operation")
5269     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5270     '("GAsyncReadyCallback" "callback")
5271     '("gpointer" "user_data")
5272   )
5273 )
5274
5275 (define-method unmount_with_operation_finish
5276   (of-object "GMount")
5277   (c-name "g_mount_unmount_with_operation_finish")
5278   (return-type "gboolean")
5279   (parameters
5280     '("GAsyncResult*" "result")
5281     '("GError**" "error")
5282   )
5283 )
5284
5285 (define-method eject_with_operation
5286   (of-object "GMount")
5287   (c-name "g_mount_eject_with_operation")
5288   (return-type "none")
5289   (parameters
5290     '("GMountUnmountFlags" "flags")
5291     '("GMountOperation*" "mount_operation")
5292     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5293     '("GAsyncReadyCallback" "callback")
5294     '("gpointer" "user_data")
5295   )
5296 )
5297
5298 (define-method eject_with_operation_finish
5299   (of-object "GMount")
5300   (c-name "g_mount_eject_with_operation_finish")
5301   (return-type "gboolean")
5302   (parameters
5303     '("GAsyncResult*" "result")
5304     '("GError**" "error")
5305   )
5306 )
5307
5308
5309
5310 ;; From gmountoperation.h
5311
5312 (define-function mount_operation_get_type
5313   (c-name "g_mount_operation_get_type")
5314   (return-type "GType")
5315 )
5316
5317 (define-function mount_operation_new
5318   (c-name "g_mount_operation_new")
5319   (is-constructor-of "GMountOperation")
5320   (return-type "GMountOperation*")
5321 )
5322
5323 (define-method get_username
5324   (of-object "GMountOperation")
5325   (c-name "g_mount_operation_get_username")
5326   (return-type "const-char*")
5327 )
5328
5329 (define-method set_username
5330   (of-object "GMountOperation")
5331   (c-name "g_mount_operation_set_username")
5332   (return-type "none")
5333   (parameters
5334     '("const-char*" "username")
5335   )
5336 )
5337
5338 (define-method get_password
5339   (of-object "GMountOperation")
5340   (c-name "g_mount_operation_get_password")
5341   (return-type "const-char*")
5342 )
5343
5344 (define-method set_password
5345   (of-object "GMountOperation")
5346   (c-name "g_mount_operation_set_password")
5347   (return-type "none")
5348   (parameters
5349     '("const-char*" "password")
5350   )
5351 )
5352
5353 (define-method get_anonymous
5354   (of-object "GMountOperation")
5355   (c-name "g_mount_operation_get_anonymous")
5356   (return-type "gboolean")
5357 )
5358
5359 (define-method set_anonymous
5360   (of-object "GMountOperation")
5361   (c-name "g_mount_operation_set_anonymous")
5362   (return-type "none")
5363   (parameters
5364     '("gboolean" "anonymous")
5365   )
5366 )
5367
5368 (define-method get_domain
5369   (of-object "GMountOperation")
5370   (c-name "g_mount_operation_get_domain")
5371   (return-type "const-char*")
5372 )
5373
5374 (define-method set_domain
5375   (of-object "GMountOperation")
5376   (c-name "g_mount_operation_set_domain")
5377   (return-type "none")
5378   (parameters
5379     '("const-char*" "domain")
5380   )
5381 )
5382
5383 (define-method get_password_save
5384   (of-object "GMountOperation")
5385   (c-name "g_mount_operation_get_password_save")
5386   (return-type "GPasswordSave")
5387 )
5388
5389 (define-method set_password_save
5390   (of-object "GMountOperation")
5391   (c-name "g_mount_operation_set_password_save")
5392   (return-type "none")
5393   (parameters
5394     '("GPasswordSave" "save")
5395   )
5396 )
5397
5398 (define-method get_choice
5399   (of-object "GMountOperation")
5400   (c-name "g_mount_operation_get_choice")
5401   (return-type "int")
5402 )
5403
5404 (define-method set_choice
5405   (of-object "GMountOperation")
5406   (c-name "g_mount_operation_set_choice")
5407   (return-type "none")
5408   (parameters
5409     '("int" "choice")
5410   )
5411 )
5412
5413 (define-method reply
5414   (of-object "GMountOperation")
5415   (c-name "g_mount_operation_reply")
5416   (return-type "none")
5417   (parameters
5418     '("GMountOperationResult" "result")
5419   )
5420 )
5421
5422
5423
5424 ;; From gnativevolumemonitor.h
5425
5426 (define-function native_volume_monitor_get_type
5427   (c-name "g_native_volume_monitor_get_type")
5428   (return-type "GType")
5429 )
5430
5431
5432
5433 ;; From gnetworkaddress.h
5434
5435 (define-function network_address_get_type
5436   (c-name "g_network_address_get_type")
5437   (return-type "GType")
5438 )
5439
5440 (define-function network_address_new
5441   (c-name "g_network_address_new")
5442   (is-constructor-of "GNetworkAddress")
5443   (return-type "GSocketConnectable*")
5444   (parameters
5445     '("const-gchar*" "hostname")
5446     '("guint16" "port")
5447   )
5448 )
5449
5450 (define-function network_address_parse
5451   (c-name "g_network_address_parse")
5452   (return-type "GSocketConnectable*")
5453   (parameters
5454     '("const-gchar*" "host_and_port")
5455     '("guint16" "default_port")
5456     '("GError**" "error")
5457   )
5458 )
5459
5460 (define-method get_hostname
5461   (of-object "GNetworkAddress")
5462   (c-name "g_network_address_get_hostname")
5463   (return-type "const-gchar*")
5464 )
5465
5466 (define-method get_port
5467   (of-object "GNetworkAddress")
5468   (c-name "g_network_address_get_port")
5469   (return-type "guint16")
5470 )
5471
5472
5473
5474 ;; From gnetworkservice.h
5475
5476 (define-function network_service_get_type
5477   (c-name "g_network_service_get_type")
5478   (return-type "GType")
5479 )
5480
5481 (define-function network_service_new
5482   (c-name "g_network_service_new")
5483   (is-constructor-of "GNetworkService")
5484   (return-type "GSocketConnectable*")
5485   (parameters
5486     '("const-gchar*" "service")
5487     '("const-gchar*" "protocol")
5488     '("const-gchar*" "domain")
5489   )
5490 )
5491
5492 (define-method get_service
5493   (of-object "GNetworkService")
5494   (c-name "g_network_service_get_service")
5495   (return-type "const-gchar*")
5496 )
5497
5498 (define-method get_protocol
5499   (of-object "GNetworkService")
5500   (c-name "g_network_service_get_protocol")
5501   (return-type "const-gchar*")
5502 )
5503
5504 (define-method get_domain
5505   (of-object "GNetworkService")
5506   (c-name "g_network_service_get_domain")
5507   (return-type "const-gchar*")
5508 )
5509
5510
5511
5512 ;; From goutputstream.h
5513
5514 (define-function output_stream_get_type
5515   (c-name "g_output_stream_get_type")
5516   (return-type "GType")
5517 )
5518
5519 ;;
5520 ;; wrapped in goutputstream.override
5521 ;;
5522 ;; Note: the following two methods are renamed for consistency with
5523 ;; Python file objects' write().  I.e. g_output_stream_write_all() is
5524 ;; more like Python file.write(), so it is renamed write().  Since now
5525 ;; there is a name clash, g_output_stream_write() is renamed
5526 ;; write_part().
5527 (define-method write_part
5528   (of-object "GOutputStream")
5529   (docstring
5530    "STREAM.write_part(buffer, [cancellable]) -> int\n"
5531    "\n"
5532    "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
5533    "successfully written. This method is allowed to stop at any time after\n"
5534    "writing at least 1 byte. Therefore, to reliably write the whole buffer,\n"
5535    "you need to use a loop. See also gio.OutputStream.write for easier to\n"
5536    "use (though less efficient) method.\n"
5537    "\n"
5538    "Note: this method roughly corresponds to C GIO g_output_stream_write."
5539   )
5540   (c-name "g_output_stream_write")
5541   (return-type "gssize")
5542   (parameters
5543     '("const-void*" "buffer")
5544     '("gsize" "count")
5545     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5546     '("GError**" "error")
5547   )
5548 )
5549
5550 ;;
5551 ;; wrapped in goutputstream.override
5552 ;;
5553 ;; See comments before the previous method definition.
5554 (define-method write
5555   (of-object "GOutputStream")
5556    "STREAM.write(buffer, [cancellable]) -> int\n"
5557    "\n"
5558    "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
5559    "successfully written. This method will stop only after writing the whole\n"
5560    "buffer or triggering an I/O error. See also gio.OutputStream.write_part\n"
5561    "for more efficient, but more cumbersome to use method.\n"
5562    "\n"
5563    "Note: this method roughly corresponds to C GIO g_output_stream_write_all.\n"
5564    "It was renamed for consistency with Python standard file.write."
5565   (c-name "g_output_stream_write_all")
5566   (return-type "gboolean")
5567   (parameters
5568     '("const-void*" "buffer")
5569     '("gsize" "count")
5570     '("gsize*" "bytes_written")
5571     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5572     '("GError**" "error")
5573   )
5574 )
5575
5576 (define-method splice
5577   (of-object "GOutputStream")
5578   (c-name "g_output_stream_splice")
5579   (return-type "gssize")
5580   (parameters
5581     '("GInputStream*" "source")
5582     '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
5583     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5584     '("GError**" "error")
5585   )
5586 )
5587
5588 (define-method flush
5589   (of-object "GOutputStream")
5590   (c-name "g_output_stream_flush")
5591   (return-type "gboolean")
5592   (parameters
5593     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5594     '("GError**" "error")
5595   )
5596 )
5597
5598 (define-method close
5599   (of-object "GOutputStream")
5600   (c-name "g_output_stream_close")
5601   (return-type "gboolean")
5602   (parameters
5603     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5604     '("GError**" "error")
5605   )
5606 )
5607
5608 ;;
5609 ;; wrapped in goutputstream.override
5610 ;;
5611 (define-method write_async
5612   (of-object "GOutputStream")
5613   (docstring
5614 "S.write_async(buffer, callback [,io_priority] [,cancellable] [,user_data])\n"
5615 "\n"
5616 "Request an asynchronous write of count bytes from buffer into the stream.\n"
5617 "When the operation is finished callback will be called. You can then call\n"
5618 "gio.OutputStream.write_finish() to get the result of the operation.\n"
5619 "On success, the number of bytes written will be passed to the callback.\n"
5620 "It is not an error if this is not the same as the requested size, as it can\n"
5621 "happen e.g. on a partial I/O error, but generally tries to write as many \n"
5622 "bytes as requested.\n"
5623 "For the synchronous, blocking version of this function, see\n"
5624 "gio.OutputStream.write().\n")
5625   (c-name "g_output_stream_write_async")
5626   (return-type "none")
5627   (parameters
5628     '("const-void*" "buffer")
5629     '("gsize" "count")
5630     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
5631     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5632     '("GAsyncReadyCallback" "callback")
5633     '("gpointer" "user_data")
5634   )
5635 )
5636
5637 (define-method write_finish
5638   (of-object "GOutputStream")
5639   (c-name "g_output_stream_write_finish")
5640   (return-type "gssize")
5641   (parameters
5642     '("GAsyncResult*" "result")
5643     '("GError**" "error")
5644   )
5645 )
5646
5647 (define-method splice_async
5648   (of-object "GOutputStream")
5649   (c-name "g_output_stream_splice_async")
5650   (return-type "none")
5651   (parameters
5652     '("GInputStream*" "source")
5653     '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
5654     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
5655     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5656     '("GAsyncReadyCallback" "callback")
5657     '("gpointer" "user_data")
5658   )
5659 )
5660
5661 (define-method splice_finish
5662   (of-object "GOutputStream")
5663   (c-name "g_output_stream_splice_finish")
5664   (return-type "gssize")
5665   (parameters
5666     '("GAsyncResult*" "result")
5667     '("GError**" "error")
5668   )
5669 )
5670
5671 (define-method flush_async
5672   (of-object "GOutputStream")
5673   (c-name "g_output_stream_flush_async")
5674   (return-type "none")
5675   (parameters
5676     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
5677     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5678     '("GAsyncReadyCallback" "callback")
5679     '("gpointer" "user_data")
5680   )
5681 )
5682
5683 (define-method flush_finish
5684   (of-object "GOutputStream")
5685   (c-name "g_output_stream_flush_finish")
5686   (return-type "gboolean")
5687   (parameters
5688     '("GAsyncResult*" "result")
5689     '("GError**" "error")
5690   )
5691 )
5692
5693 ;;
5694 ;; wrapped in goutputstream.override
5695 ;;
5696 (define-method close_async
5697   (of-object "GOutputStream")
5698   (c-name "g_output_stream_close_async")
5699   (return-type "none")
5700   (parameters
5701     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
5702     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5703     '("GAsyncReadyCallback" "callback")
5704     '("gpointer" "user_data")
5705   )
5706 )
5707
5708 (define-method close_finish
5709   (of-object "GOutputStream")
5710   (c-name "g_output_stream_close_finish")
5711   (return-type "gboolean")
5712   (parameters
5713     '("GAsyncResult*" "result")
5714     '("GError**" "error")
5715   )
5716 )
5717
5718 (define-method is_closed
5719   (of-object "GOutputStream")
5720   (c-name "g_output_stream_is_closed")
5721   (return-type "gboolean")
5722 )
5723
5724 (define-method has_pending
5725   (of-object "GOutputStream")
5726   (c-name "g_output_stream_has_pending")
5727   (return-type "gboolean")
5728 )
5729
5730 (define-method set_pending
5731   (of-object "GOutputStream")
5732   (c-name "g_output_stream_set_pending")
5733   (return-type "gboolean")
5734   (parameters
5735     '("GError**" "error")
5736   )
5737 )
5738
5739 (define-method clear_pending
5740   (of-object "GOutputStream")
5741   (c-name "g_output_stream_clear_pending")
5742   (return-type "none")
5743 )
5744
5745
5746
5747 ;; From gresolver.h
5748
5749 (define-function resolver_get_type
5750   (c-name "g_resolver_get_type")
5751   (return-type "GType")
5752 )
5753
5754 (define-function resolver_get_default
5755   (c-name "g_resolver_get_default")
5756   (return-type "GResolver*")
5757 )
5758
5759 (define-method set_default
5760   (of-object "GResolver")
5761   (c-name "g_resolver_set_default")
5762   (return-type "none")
5763 )
5764
5765 (define-method lookup_by_name
5766   (of-object "GResolver")
5767   (c-name "g_resolver_lookup_by_name")
5768   (return-type "GList*")
5769   (parameters
5770     '("const-gchar*" "hostname")
5771     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5772     '("GError**" "error")
5773   )
5774 )
5775
5776 (define-method lookup_by_name_async
5777   (of-object "GResolver")
5778   (c-name "g_resolver_lookup_by_name_async")
5779   (return-type "none")
5780   (parameters
5781     '("const-gchar*" "hostname")
5782     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5783     '("GAsyncReadyCallback" "callback")
5784     '("gpointer" "user_data")
5785   )
5786 )
5787
5788 (define-method lookup_by_name_finish
5789   (of-object "GResolver")
5790   (c-name "g_resolver_lookup_by_name_finish")
5791   (return-type "GList*")
5792   (parameters
5793     '("GAsyncResult*" "result")
5794     '("GError**" "error")
5795   )
5796 )
5797
5798 (define-function resolver_free_addresses
5799   (c-name "g_resolver_free_addresses")
5800   (return-type "none")
5801   (parameters
5802     '("GList*" "addresses")
5803   )
5804 )
5805
5806 (define-method lookup_by_address
5807   (of-object "GResolver")
5808   (c-name "g_resolver_lookup_by_address")
5809   (return-type "gchar*")
5810   (parameters
5811     '("GInetAddress*" "address")
5812     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5813     '("GError**" "error")
5814   )
5815 )
5816
5817 (define-method lookup_by_address_async
5818   (of-object "GResolver")
5819   (c-name "g_resolver_lookup_by_address_async")
5820   (return-type "none")
5821   (parameters
5822     '("GInetAddress*" "address")
5823     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5824     '("GAsyncReadyCallback" "callback")
5825     '("gpointer" "user_data")
5826   )
5827 )
5828
5829 (define-method lookup_by_address_finish
5830   (of-object "GResolver")
5831   (c-name "g_resolver_lookup_by_address_finish")
5832   (return-type "gchar*")
5833   (parameters
5834     '("GAsyncResult*" "result")
5835     '("GError**" "error")
5836   )
5837 )
5838
5839 (define-method lookup_service
5840   (of-object "GResolver")
5841   (c-name "g_resolver_lookup_service")
5842   (return-type "GList*")
5843   (parameters
5844     '("const-gchar*" "service")
5845     '("const-gchar*" "protocol")
5846     '("const-gchar*" "domain")
5847     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5848     '("GError**" "error")
5849   )
5850 )
5851
5852 (define-method lookup_service_async
5853   (of-object "GResolver")
5854   (c-name "g_resolver_lookup_service_async")
5855   (return-type "none")
5856   (parameters
5857     '("const-gchar*" "service")
5858     '("const-gchar*" "protocol")
5859     '("const-gchar*" "domain")
5860     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5861     '("GAsyncReadyCallback" "callback")
5862     '("gpointer" "user_data")
5863   )
5864 )
5865
5866 (define-method lookup_service_finish
5867   (of-object "GResolver")
5868   (c-name "g_resolver_lookup_service_finish")
5869   (return-type "GList*")
5870   (parameters
5871     '("GAsyncResult*" "result")
5872     '("GError**" "error")
5873   )
5874 )
5875
5876 (define-function resolver_free_targets
5877   (c-name "g_resolver_free_targets")
5878   (return-type "none")
5879   (parameters
5880     '("GList*" "targets")
5881   )
5882 )
5883
5884 (define-function resolver_error_quark
5885   (c-name "g_resolver_error_quark")
5886   (return-type "GQuark")
5887 )
5888
5889
5890
5891 ;; From gseekable.h
5892
5893 (define-function seekable_get_type
5894   (c-name "g_seekable_get_type")
5895   (return-type "GType")
5896 )
5897
5898 (define-method tell
5899   (of-object "GSeekable")
5900   (c-name "g_seekable_tell")
5901   (return-type "goffset")
5902 )
5903
5904 (define-method can_seek
5905   (of-object "GSeekable")
5906   (c-name "g_seekable_can_seek")
5907   (return-type "gboolean")
5908 )
5909
5910 (define-method seek
5911   (of-object "GSeekable")
5912   (c-name "g_seekable_seek")
5913   (return-type "gboolean")
5914   (parameters
5915     '("goffset" "offset")
5916     '("GSeekType" "type" (default "G_SEEK_SET"))
5917     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5918     '("GError**" "error")
5919   )
5920 )
5921
5922 (define-method can_truncate
5923   (of-object "GSeekable")
5924   (c-name "g_seekable_can_truncate")
5925   (return-type "gboolean")
5926 )
5927
5928 (define-method truncate
5929   (of-object "GSeekable")
5930   (c-name "g_seekable_truncate")
5931   (return-type "gboolean")
5932   (parameters
5933     '("goffset" "offset")
5934     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
5935     '("GError**" "error")
5936   )
5937 )
5938
5939
5940
5941 ;; From gsimpleasyncresult.h
5942
5943 (define-function simple_async_result_get_type
5944   (c-name "g_simple_async_result_get_type")
5945   (return-type "GType")
5946 )
5947
5948 (define-function simple_async_result_new
5949   (c-name "g_simple_async_result_new")
5950   (is-constructor-of "GSimpleAsyncResult")
5951   (return-type "GSimpleAsyncResult*")
5952   (parameters
5953     '("GObject*" "source_object")
5954     '("GAsyncReadyCallback" "callback")
5955     '("gpointer" "user_data")
5956     '("gpointer" "source_tag")
5957   )
5958 )
5959
5960 (define-function simple_async_result_new_error
5961   (c-name "g_simple_async_result_new_error")
5962   (return-type "GSimpleAsyncResult*")
5963   (parameters
5964     '("GObject*" "source_object")
5965     '("GAsyncReadyCallback" "callback")
5966     '("gpointer" "user_data")
5967     '("GQuark" "domain")
5968     '("gint" "code")
5969     '("const-char*" "format")
5970   )
5971   (varargs #t)
5972 )
5973
5974 (define-function simple_async_result_new_from_error
5975   (c-name "g_simple_async_result_new_from_error")
5976   (return-type "GSimpleAsyncResult*")
5977   (parameters
5978     '("GObject*" "source_object")
5979     '("GAsyncReadyCallback" "callback")
5980     '("gpointer" "user_data")
5981     '("GError*" "error")
5982   )
5983 )
5984
5985 (define-method set_op_res_gpointer
5986   (of-object "GSimpleAsyncResult")
5987   (c-name "g_simple_async_result_set_op_res_gpointer")
5988   (return-type "none")
5989   (parameters
5990     '("gpointer" "op_res")
5991     '("GDestroyNotify" "destroy_op_res")
5992   )
5993 )
5994
5995 (define-method get_op_res_gpointer
5996   (of-object "GSimpleAsyncResult")
5997   (c-name "g_simple_async_result_get_op_res_gpointer")
5998   (return-type "gpointer")
5999 )
6000
6001 (define-method set_op_res_gssize
6002   (of-object "GSimpleAsyncResult")
6003   (c-name "g_simple_async_result_set_op_res_gssize")
6004   (return-type "none")
6005   (parameters
6006     '("gssize" "op_res")
6007   )
6008 )
6009
6010 (define-method get_op_res_gssize
6011   (of-object "GSimpleAsyncResult")
6012   (c-name "g_simple_async_result_get_op_res_gssize")
6013   (return-type "gssize")
6014 )
6015
6016 (define-method set_op_res_gboolean
6017   (of-object "GSimpleAsyncResult")
6018   (c-name "g_simple_async_result_set_op_res_gboolean")
6019   (return-type "none")
6020   (parameters
6021     '("gboolean" "op_res")
6022   )
6023 )
6024
6025 (define-method get_op_res_gboolean
6026   (of-object "GSimpleAsyncResult")
6027   (c-name "g_simple_async_result_get_op_res_gboolean")
6028   (return-type "gboolean")
6029 )
6030
6031 (define-method get_source_tag
6032   (of-object "GSimpleAsyncResult")
6033   (c-name "g_simple_async_result_get_source_tag")
6034   (return-type "gpointer")
6035 )
6036
6037 (define-method set_handle_cancellation
6038   (of-object "GSimpleAsyncResult")
6039   (c-name "g_simple_async_result_set_handle_cancellation")
6040   (return-type "none")
6041   (parameters
6042     '("gboolean" "handle_cancellation")
6043   )
6044 )
6045
6046 (define-method complete
6047   (of-object "GSimpleAsyncResult")
6048   (c-name "g_simple_async_result_complete")
6049   (return-type "none")
6050 )
6051
6052 (define-method complete_in_idle
6053   (of-object "GSimpleAsyncResult")
6054   (c-name "g_simple_async_result_complete_in_idle")
6055   (return-type "none")
6056 )
6057
6058 (define-method run_in_thread
6059   (of-object "GSimpleAsyncResult")
6060   (c-name "g_simple_async_result_run_in_thread")
6061   (return-type "none")
6062   (parameters
6063     '("GSimpleAsyncThreadFunc" "func")
6064     '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
6065     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6066   )
6067 )
6068
6069 (define-method set_from_error
6070   (of-object "GSimpleAsyncResult")
6071   (c-name "g_simple_async_result_set_from_error")
6072   (return-type "none")
6073   (parameters
6074     '("GError*" "error")
6075   )
6076 )
6077
6078 (define-method propagate_error
6079   (of-object "GSimpleAsyncResult")
6080   (c-name "g_simple_async_result_propagate_error")
6081   (return-type "gboolean")
6082   (parameters
6083     '("GError**" "dest")
6084   )
6085 )
6086
6087 (define-method set_error
6088   (of-object "GSimpleAsyncResult")
6089   (c-name "g_simple_async_result_set_error")
6090   (return-type "none")
6091   (parameters
6092     '("GQuark" "domain")
6093     '("gint" "code")
6094     '("const-char*" "format")
6095   )
6096   (varargs #t)
6097 )
6098
6099 (define-method set_error_va
6100   (of-object "GSimpleAsyncResult")
6101   (c-name "g_simple_async_result_set_error_va")
6102   (return-type "none")
6103   (parameters
6104     '("GQuark" "domain")
6105     '("gint" "code")
6106     '("const-char*" "format")
6107     '("va_list" "args")
6108   )
6109 )
6110
6111 (define-function simple_async_report_error_in_idle
6112   (c-name "g_simple_async_report_error_in_idle")
6113   (return-type "none")
6114   (parameters
6115     '("GObject*" "object")
6116     '("GAsyncReadyCallback" "callback")
6117     '("gpointer" "user_data")
6118     '("GQuark" "domain")
6119     '("gint" "code")
6120     '("const-char*" "format")
6121   )
6122   (varargs #t)
6123 )
6124
6125 (define-function simple_async_report_gerror_in_idle
6126   (c-name "g_simple_async_report_gerror_in_idle")
6127   (return-type "none")
6128   (parameters
6129     '("GObject*" "object")
6130     '("GAsyncReadyCallback" "callback")
6131     '("gpointer" "user_data")
6132     '("GError*" "error")
6133   )
6134 )
6135
6136
6137
6138 ;; From gsocketaddressenumerator.h
6139
6140 (define-function socket_address_enumerator_get_type
6141   (c-name "g_socket_address_enumerator_get_type")
6142   (return-type "GType")
6143 )
6144
6145 (define-method next
6146   (of-object "GSocketAddressEnumerator")
6147   (c-name "g_socket_address_enumerator_next")
6148   (return-type "GSocketAddress*")
6149   (parameters
6150     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6151     '("GError**" "error")
6152   )
6153 )
6154
6155 (define-method next_async
6156   (of-object "GSocketAddressEnumerator")
6157   (c-name "g_socket_address_enumerator_next_async")
6158   (return-type "none")
6159   (parameters
6160     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6161     '("GAsyncReadyCallback" "callback")
6162     '("gpointer" "user_data")
6163   )
6164 )
6165
6166 (define-method next_finish
6167   (of-object "GSocketAddressEnumerator")
6168   (c-name "g_socket_address_enumerator_next_finish")
6169   (return-type "GSocketAddress*")
6170   (parameters
6171     '("GAsyncResult*" "result")
6172     '("GError**" "error")
6173   )
6174 )
6175
6176
6177
6178 ;; From gsocketaddress.h
6179
6180 (define-function socket_address_get_type
6181   (c-name "g_socket_address_get_type")
6182   (return-type "GType")
6183 )
6184
6185 (define-method get_family
6186   (of-object "GSocketAddress")
6187   (c-name "g_socket_address_get_family")
6188   (return-type "GSocketFamily")
6189 )
6190
6191 (define-function socket_address_new_from_native
6192   (c-name "g_socket_address_new_from_native")
6193   (return-type "GSocketAddress*")
6194   (parameters
6195     '("gpointer" "native")
6196     '("gsize" "len")
6197   )
6198 )
6199
6200 (define-method to_native
6201   (of-object "GSocketAddress")
6202   (c-name "g_socket_address_to_native")
6203   (return-type "gboolean")
6204   (parameters
6205     '("gpointer" "dest")
6206     '("gsize" "destlen")
6207     '("GError**" "error")
6208   )
6209 )
6210
6211 (define-method get_native_size
6212   (of-object "GSocketAddress")
6213   (c-name "g_socket_address_get_native_size")
6214   (return-type "gssize")
6215 )
6216
6217
6218
6219 ;; From gsocketclient.h
6220
6221 (define-function socket_client_get_type
6222   (c-name "g_socket_client_get_type")
6223   (return-type "GType")
6224 )
6225
6226 (define-function socket_client_new
6227   (c-name "g_socket_client_new")
6228   (is-constructor-of "GSocketClient")
6229   (return-type "GSocketClient*")
6230 )
6231
6232 (define-method get_family
6233   (of-object "GSocketClient")
6234   (c-name "g_socket_client_get_family")
6235   (return-type "GSocketFamily")
6236 )
6237
6238 (define-method set_family
6239   (of-object "GSocketClient")
6240   (c-name "g_socket_client_set_family")
6241   (return-type "none")
6242   (parameters
6243     '("GSocketFamily" "family")
6244   )
6245 )
6246
6247 (define-method get_socket_type
6248   (of-object "GSocketClient")
6249   (c-name "g_socket_client_get_socket_type")
6250   (return-type "GSocketType")
6251 )
6252
6253 (define-method set_socket_type
6254   (of-object "GSocketClient")
6255   (c-name "g_socket_client_set_socket_type")
6256   (return-type "none")
6257   (parameters
6258     '("GSocketType" "type")
6259   )
6260 )
6261
6262 (define-method get_protocol
6263   (of-object "GSocketClient")
6264   (c-name "g_socket_client_get_protocol")
6265   (return-type "GSocketProtocol")
6266 )
6267
6268 (define-method set_protocol
6269   (of-object "GSocketClient")
6270   (c-name "g_socket_client_set_protocol")
6271   (return-type "none")
6272   (parameters
6273     '("GSocketProtocol" "protocol")
6274   )
6275 )
6276
6277 (define-method get_local_address
6278   (of-object "GSocketClient")
6279   (c-name "g_socket_client_get_local_address")
6280   (return-type "GSocketAddress*")
6281 )
6282
6283 (define-method set_local_address
6284   (of-object "GSocketClient")
6285   (c-name "g_socket_client_set_local_address")
6286   (return-type "none")
6287   (parameters
6288     '("GSocketAddress*" "address")
6289   )
6290 )
6291
6292 (define-method connect
6293   (of-object "GSocketClient")
6294   (c-name "g_socket_client_connect")
6295   (return-type "GSocketConnection*")
6296   (parameters
6297     '("GSocketConnectable*" "connectable")
6298     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6299     '("GError**" "error")
6300   )
6301 )
6302
6303 (define-method connect_to_host
6304   (of-object "GSocketClient")
6305   (c-name "g_socket_client_connect_to_host")
6306   (return-type "GSocketConnection*")
6307   (parameters
6308     '("const-gchar*" "host_and_port")
6309     '("guint16" "default_port")
6310     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6311     '("GError**" "error")
6312   )
6313 )
6314
6315 (define-method connect_to_service
6316   (of-object "GSocketClient")
6317   (c-name "g_socket_client_connect_to_service")
6318   (return-type "GSocketConnection*")
6319   (parameters
6320     '("const-gchar*" "domain")
6321     '("const-gchar*" "service")
6322     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6323     '("GError**" "error")
6324   )
6325 )
6326
6327 (define-method connect_async
6328   (of-object "GSocketClient")
6329   (c-name "g_socket_client_connect_async")
6330   (return-type "none")
6331   (parameters
6332     '("GSocketConnectable*" "connectable")
6333     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6334     '("GAsyncReadyCallback" "callback")
6335     '("gpointer" "user_data")
6336   )
6337 )
6338
6339 (define-method connect_finish
6340   (of-object "GSocketClient")
6341   (c-name "g_socket_client_connect_finish")
6342   (return-type "GSocketConnection*")
6343   (parameters
6344     '("GAsyncResult*" "result")
6345     '("GError**" "error")
6346   )
6347 )
6348
6349 (define-method connect_to_host_async
6350   (of-object "GSocketClient")
6351   (c-name "g_socket_client_connect_to_host_async")
6352   (return-type "none")
6353   (parameters
6354     '("const-gchar*" "host_and_port")
6355     '("guint16" "default_port")
6356     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6357     '("GAsyncReadyCallback" "callback")
6358     '("gpointer" "user_data")
6359   )
6360 )
6361
6362 (define-method connect_to_host_finish
6363   (of-object "GSocketClient")
6364   (c-name "g_socket_client_connect_to_host_finish")
6365   (return-type "GSocketConnection*")
6366   (parameters
6367     '("GAsyncResult*" "result")
6368     '("GError**" "error")
6369   )
6370 )
6371
6372 (define-method connect_to_service_async
6373   (of-object "GSocketClient")
6374   (c-name "g_socket_client_connect_to_service_async")
6375   (return-type "none")
6376   (parameters
6377     '("const-gchar*" "domain")
6378     '("const-gchar*" "service")
6379     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6380     '("GAsyncReadyCallback" "callback")
6381     '("gpointer" "user_data")
6382   )
6383 )
6384
6385 (define-method connect_to_service_finish
6386   (of-object "GSocketClient")
6387   (c-name "g_socket_client_connect_to_service_finish")
6388   (return-type "GSocketConnection*")
6389   (parameters
6390     '("GAsyncResult*" "result")
6391     '("GError**" "error")
6392   )
6393 )
6394
6395
6396
6397 ;; From gsocketconnectable.h
6398
6399 (define-function socket_connectable_get_type
6400   (c-name "g_socket_connectable_get_type")
6401   (return-type "GType")
6402 )
6403
6404 (define-method enumerate
6405   (of-object "GSocketConnectable")
6406   (c-name "g_socket_connectable_enumerate")
6407   (return-type "GSocketAddressEnumerator*")
6408 )
6409
6410
6411
6412 ;; From gsocketconnection.h
6413
6414 (define-function socket_connection_get_type
6415   (c-name "g_socket_connection_get_type")
6416   (return-type "GType")
6417 )
6418
6419 (define-method get_socket
6420   (of-object "GSocketConnection")
6421   (c-name "g_socket_connection_get_socket")
6422   (return-type "GSocket*")
6423 )
6424
6425 (define-method get_local_address
6426   (of-object "GSocketConnection")
6427   (c-name "g_socket_connection_get_local_address")
6428   (return-type "GSocketAddress*")
6429   (parameters
6430     '("GError**" "error")
6431   )
6432 )
6433
6434 (define-method get_remote_address
6435   (of-object "GSocketConnection")
6436   (c-name "g_socket_connection_get_remote_address")
6437   (return-type "GSocketAddress*")
6438   (parameters
6439     '("GError**" "error")
6440   )
6441 )
6442
6443 (define-function socket_connection_factory_register_type
6444   (c-name "g_socket_connection_factory_register_type")
6445   (return-type "none")
6446   (parameters
6447     '("GType" "g_type")
6448     '("GSocketFamily" "family")
6449     '("GSocketType" "type")
6450     '("gint" "protocol")
6451   )
6452 )
6453
6454 (define-function socket_connection_factory_lookup_type
6455   (c-name "g_socket_connection_factory_lookup_type")
6456   (return-type "GType")
6457   (parameters
6458     '("GSocketFamily" "family")
6459     '("GSocketType" "type")
6460     '("gint" "protocol_id")
6461   )
6462 )
6463
6464 (define-method connection_factory_create_connection
6465   (of-object "GSocket")
6466   (c-name "g_socket_connection_factory_create_connection")
6467   (return-type "GSocketConnection*")
6468 )
6469
6470
6471
6472 ;; From gsocketcontrolmessage.h
6473
6474 (define-function socket_control_message_get_type
6475   (c-name "g_socket_control_message_get_type")
6476   (return-type "GType")
6477 )
6478
6479 (define-method get_size
6480   (of-object "GSocketControlMessage")
6481   (c-name "g_socket_control_message_get_size")
6482   (return-type "gsize")
6483 )
6484
6485 (define-method get_level
6486   (of-object "GSocketControlMessage")
6487   (c-name "g_socket_control_message_get_level")
6488   (return-type "int")
6489 )
6490
6491 (define-method get_msg_type
6492   (of-object "GSocketControlMessage")
6493   (c-name "g_socket_control_message_get_msg_type")
6494   (return-type "int")
6495 )
6496
6497 (define-method serialize
6498   (of-object "GSocketControlMessage")
6499   (c-name "g_socket_control_message_serialize")
6500   (return-type "none")
6501   (parameters
6502     '("gpointer" "data")
6503   )
6504 )
6505
6506 (define-function socket_control_message_deserialize
6507   (c-name "g_socket_control_message_deserialize")
6508   (return-type "GSocketControlMessage*")
6509   (parameters
6510     '("int" "level")
6511     '("int" "type")
6512     '("gsize" "size")
6513     '("gpointer" "data")
6514   )
6515 )
6516
6517
6518
6519 ;; From gsocket.h
6520
6521 (define-function socket_get_type
6522   (c-name "g_socket_get_type")
6523   (return-type "GType")
6524 )
6525
6526 (define-function socket_new
6527   (c-name "g_socket_new")
6528   (is-constructor-of "GSocket")
6529   (return-type "GSocket*")
6530   (parameters
6531     '("GSocketFamily" "family")
6532     '("GSocketType" "type")
6533     '("GSocketProtocol" "protocol")
6534     '("GError**" "error")
6535   )
6536 )
6537
6538 (define-function socket_new_from_fd
6539   (c-name "g_socket_new_from_fd")
6540   (return-type "GSocket*")
6541   (parameters
6542     '("gint" "fd")
6543     '("GError**" "error")
6544   )
6545 )
6546
6547 (define-method get_fd
6548   (of-object "GSocket")
6549   (c-name "g_socket_get_fd")
6550   (return-type "int")
6551 )
6552
6553 (define-method get_family
6554   (of-object "GSocket")
6555   (c-name "g_socket_get_family")
6556   (return-type "GSocketFamily")
6557 )
6558
6559 (define-method get_socket_type
6560   (of-object "GSocket")
6561   (c-name "g_socket_get_socket_type")
6562   (return-type "GSocketType")
6563 )
6564
6565 (define-method get_protocol
6566   (of-object "GSocket")
6567   (c-name "g_socket_get_protocol")
6568   (return-type "GSocketProtocol")
6569 )
6570
6571 (define-method get_local_address
6572   (of-object "GSocket")
6573   (c-name "g_socket_get_local_address")
6574   (return-type "GSocketAddress*")
6575   (parameters
6576     '("GError**" "error")
6577   )
6578 )
6579
6580 (define-method get_remote_address
6581   (of-object "GSocket")
6582   (c-name "g_socket_get_remote_address")
6583   (return-type "GSocketAddress*")
6584   (parameters
6585     '("GError**" "error")
6586   )
6587 )
6588
6589 (define-method set_blocking
6590   (of-object "GSocket")
6591   (c-name "g_socket_set_blocking")
6592   (return-type "none")
6593   (parameters
6594     '("gboolean" "blocking")
6595   )
6596 )
6597
6598 (define-method get_blocking
6599   (of-object "GSocket")
6600   (c-name "g_socket_get_blocking")
6601   (return-type "gboolean")
6602 )
6603
6604 (define-method set_keepalive
6605   (of-object "GSocket")
6606   (c-name "g_socket_set_keepalive")
6607   (return-type "none")
6608   (parameters
6609     '("gboolean" "keepalive")
6610   )
6611 )
6612
6613 (define-method get_keepalive
6614   (of-object "GSocket")
6615   (c-name "g_socket_get_keepalive")
6616   (return-type "gboolean")
6617 )
6618
6619 (define-method get_listen_backlog
6620   (of-object "GSocket")
6621   (c-name "g_socket_get_listen_backlog")
6622   (return-type "gint")
6623 )
6624
6625 (define-method set_listen_backlog
6626   (of-object "GSocket")
6627   (c-name "g_socket_set_listen_backlog")
6628   (return-type "none")
6629   (parameters
6630     '("gint" "backlog")
6631   )
6632 )
6633
6634 (define-method is_connected
6635   (of-object "GSocket")
6636   (c-name "g_socket_is_connected")
6637   (return-type "gboolean")
6638 )
6639
6640 (define-method bind
6641   (of-object "GSocket")
6642   (c-name "g_socket_bind")
6643   (return-type "gboolean")
6644   (parameters
6645     '("GSocketAddress*" "address")
6646     '("gboolean" "allow_reuse")
6647     '("GError**" "error")
6648   )
6649 )
6650
6651 (define-method connect
6652   (of-object "GSocket")
6653   (c-name "g_socket_connect")
6654   (return-type "gboolean")
6655   (parameters
6656     '("GSocketAddress*" "address")
6657     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6658     '("GError**" "error")
6659   )
6660 )
6661
6662 (define-method check_connect_result
6663   (of-object "GSocket")
6664   (c-name "g_socket_check_connect_result")
6665   (return-type "gboolean")
6666   (parameters
6667     '("GError**" "error")
6668   )
6669 )
6670
6671 (define-method condition_check
6672   (of-object "GSocket")
6673   (c-name "g_socket_condition_check")
6674   (return-type "GIOCondition")
6675   (parameters
6676     '("GIOCondition" "condition")
6677   )
6678 )
6679
6680 (define-method condition_wait
6681   (of-object "GSocket")
6682   (c-name "g_socket_condition_wait")
6683   (return-type "gboolean")
6684   (parameters
6685     '("GIOCondition" "condition")
6686     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6687     '("GError**" "error")
6688   )
6689 )
6690
6691 (define-method accept
6692   (of-object "GSocket")
6693   (c-name "g_socket_accept")
6694   (return-type "GSocket*")
6695   (parameters
6696     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6697     '("GError**" "error")
6698   )
6699 )
6700
6701 (define-method listen
6702   (of-object "GSocket")
6703   (c-name "g_socket_listen")
6704   (return-type "gboolean")
6705   (parameters
6706     '("GError**" "error")
6707   )
6708 )
6709
6710 (define-method receive
6711   (of-object "GSocket")
6712   (c-name "g_socket_receive")
6713   (return-type "gssize")
6714   (parameters
6715     '("gchar*" "buffer")
6716     '("gsize" "size")
6717     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6718     '("GError**" "error")
6719   )
6720 )
6721
6722 (define-method receive_from
6723   (of-object "GSocket")
6724   (c-name "g_socket_receive_from")
6725   (return-type "gssize")
6726   (parameters
6727     '("GSocketAddress**" "address")
6728     '("gchar*" "buffer")
6729     '("gsize" "size")
6730     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6731     '("GError**" "error")
6732   )
6733 )
6734
6735 (define-method send
6736   (of-object "GSocket")
6737   (c-name "g_socket_send")
6738   (return-type "gssize")
6739   (parameters
6740     '("const-gchar*" "buffer")
6741     '("gsize" "size")
6742     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6743     '("GError**" "error")
6744   )
6745 )
6746
6747 (define-method send_to
6748   (of-object "GSocket")
6749   (c-name "g_socket_send_to")
6750   (return-type "gssize")
6751   (parameters
6752     '("GSocketAddress*" "address")
6753     '("const-gchar*" "buffer")
6754     '("gsize" "size")
6755     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6756     '("GError**" "error")
6757   )
6758 )
6759
6760 (define-method receive_message
6761   (of-object "GSocket")
6762   (c-name "g_socket_receive_message")
6763   (return-type "gssize")
6764   (parameters
6765     '("GSocketAddress**" "address")
6766     '("GInputVector*" "vectors")
6767     '("gint" "num_vectors")
6768     '("GSocketControlMessage***" "messages")
6769     '("gint*" "num_messages")
6770     '("gint*" "flags")
6771     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6772     '("GError**" "error")
6773   )
6774 )
6775
6776 (define-method send_message
6777   (of-object "GSocket")
6778   (c-name "g_socket_send_message")
6779   (return-type "gssize")
6780   (parameters
6781     '("GSocketAddress*" "address")
6782     '("GOutputVector*" "vectors")
6783     '("gint" "num_vectors")
6784     '("GSocketControlMessage**" "messages")
6785     '("gint" "num_messages")
6786     '("gint" "flags")
6787     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6788     '("GError**" "error")
6789   )
6790 )
6791
6792 (define-method close
6793   (of-object "GSocket")
6794   (c-name "g_socket_close")
6795   (return-type "gboolean")
6796   (parameters
6797     '("GError**" "error")
6798   )
6799 )
6800
6801 (define-method shutdown
6802   (of-object "GSocket")
6803   (c-name "g_socket_shutdown")
6804   (return-type "gboolean")
6805   (parameters
6806     '("gboolean" "shutdown_read")
6807     '("gboolean" "shutdown_write")
6808     '("GError**" "error")
6809   )
6810 )
6811
6812 (define-method is_closed
6813   (of-object "GSocket")
6814   (c-name "g_socket_is_closed")
6815   (return-type "gboolean")
6816 )
6817
6818 (define-method create_source
6819   (of-object "GSocket")
6820   (c-name "g_socket_create_source")
6821   (return-type "GSource*")
6822   (parameters
6823     '("GIOCondition" "condition")
6824     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6825   )
6826 )
6827
6828 (define-method speaks_ipv4
6829   (of-object "GSocket")
6830   (c-name "g_socket_speaks_ipv4")
6831   (return-type "gboolean")
6832 )
6833
6834
6835
6836 ;; From gsocketlistener.h
6837
6838 (define-function socket_listener_get_type
6839   (c-name "g_socket_listener_get_type")
6840   (return-type "GType")
6841 )
6842
6843 (define-function socket_listener_new
6844   (c-name "g_socket_listener_new")
6845   (is-constructor-of "GSocketListener")
6846   (return-type "GSocketListener*")
6847 )
6848
6849 (define-method set_backlog
6850   (of-object "GSocketListener")
6851   (c-name "g_socket_listener_set_backlog")
6852   (return-type "none")
6853   (parameters
6854     '("int" "listen_backlog")
6855   )
6856 )
6857
6858 (define-method add_socket
6859   (of-object "GSocketListener")
6860   (c-name "g_socket_listener_add_socket")
6861   (return-type "gboolean")
6862   (parameters
6863     '("GSocket*" "socket")
6864     '("GObject*" "source_object")
6865     '("GError**" "error")
6866   )
6867 )
6868
6869 (define-method add_address
6870   (of-object "GSocketListener")
6871   (c-name "g_socket_listener_add_address")
6872   (return-type "gboolean")
6873   (parameters
6874     '("GSocketAddress*" "address")
6875     '("GSocketType" "type")
6876     '("GSocketProtocol" "protocol")
6877     '("GObject*" "source_object")
6878     '("GSocketAddress**" "effective_address")
6879     '("GError**" "error")
6880   )
6881 )
6882
6883 (define-method add_inet_port
6884   (of-object "GSocketListener")
6885   (c-name "g_socket_listener_add_inet_port")
6886   (return-type "gboolean")
6887   (parameters
6888     '("guint16" "port")
6889     '("GObject*" "source_object")
6890     '("GError**" "error")
6891   )
6892 )
6893
6894 (define-method accept_socket
6895   (of-object "GSocketListener")
6896   (c-name "g_socket_listener_accept_socket")
6897   (return-type "GSocket*")
6898   (parameters
6899     '("GObject**" "source_object")
6900     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6901     '("GError**" "error")
6902   )
6903 )
6904
6905 (define-method accept_socket_async
6906   (of-object "GSocketListener")
6907   (c-name "g_socket_listener_accept_socket_async")
6908   (return-type "none")
6909   (parameters
6910     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6911     '("GAsyncReadyCallback" "callback")
6912     '("gpointer" "user_data")
6913   )
6914 )
6915
6916 (define-method accept_socket_finish
6917   (of-object "GSocketListener")
6918   (c-name "g_socket_listener_accept_socket_finish")
6919   (return-type "GSocket*")
6920   (parameters
6921     '("GAsyncResult*" "result")
6922     '("GObject**" "source_object")
6923     '("GError**" "error")
6924   )
6925 )
6926
6927 (define-method accept
6928   (of-object "GSocketListener")
6929   (c-name "g_socket_listener_accept")
6930   (return-type "GSocketConnection*")
6931   (parameters
6932     '("GObject**" "source_object")
6933     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6934     '("GError**" "error")
6935   )
6936 )
6937
6938 (define-method accept_async
6939   (of-object "GSocketListener")
6940   (c-name "g_socket_listener_accept_async")
6941   (return-type "none")
6942   (parameters
6943     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
6944     '("GAsyncReadyCallback" "callback")
6945     '("gpointer" "user_data")
6946   )
6947 )
6948
6949 (define-method accept_finish
6950   (of-object "GSocketListener")
6951   (c-name "g_socket_listener_accept_finish")
6952   (return-type "GSocketConnection*")
6953   (parameters
6954     '("GAsyncResult*" "result")
6955     '("GObject**" "source_object")
6956     '("GError**" "error")
6957   )
6958 )
6959
6960 (define-method close
6961   (of-object "GSocketListener")
6962   (c-name "g_socket_listener_close")
6963   (return-type "none")
6964 )
6965
6966
6967
6968 ;; From gsocketservice.h
6969
6970 (define-function socket_service_get_type
6971   (c-name "g_socket_service_get_type")
6972   (return-type "GType")
6973 )
6974
6975 (define-function socket_service_new
6976   (c-name "g_socket_service_new")
6977   (is-constructor-of "GSocketService")
6978   (return-type "GSocketService*")
6979 )
6980
6981 (define-method start
6982   (of-object "GSocketService")
6983   (c-name "g_socket_service_start")
6984   (return-type "none")
6985 )
6986
6987 (define-method stop
6988   (of-object "GSocketService")
6989   (c-name "g_socket_service_stop")
6990   (return-type "none")
6991 )
6992
6993 (define-method is_active
6994   (of-object "GSocketService")
6995   (c-name "g_socket_service_is_active")
6996   (return-type "gboolean")
6997 )
6998
6999
7000
7001 ;; From gsrvtarget.h
7002
7003 (define-function srv_target_get_type
7004   (c-name "g_srv_target_get_type")
7005   (return-type "GType")
7006 )
7007
7008 (define-function srv_target_new
7009   (c-name "g_srv_target_new")
7010   (is-constructor-of "GSrvTarget")
7011   (return-type "GSrvTarget*")
7012   (parameters
7013     '("const-gchar*" "hostname")
7014     '("guint16" "port")
7015     '("guint16" "priority")
7016     '("guint16" "weight")
7017   )
7018 )
7019
7020 (define-method copy
7021   (of-object "GSrvTarget")
7022   (c-name "g_srv_target_copy")
7023   (return-type "GSrvTarget*")
7024 )
7025
7026 (define-method free
7027   (of-object "GSrvTarget")
7028   (c-name "g_srv_target_free")
7029   (return-type "none")
7030 )
7031
7032 (define-method get_hostname
7033   (of-object "GSrvTarget")
7034   (c-name "g_srv_target_get_hostname")
7035   (return-type "const-gchar*")
7036 )
7037
7038 (define-method get_port
7039   (of-object "GSrvTarget")
7040   (c-name "g_srv_target_get_port")
7041   (return-type "guint16")
7042 )
7043
7044 (define-method get_priority
7045   (of-object "GSrvTarget")
7046   (c-name "g_srv_target_get_priority")
7047   (return-type "guint16")
7048 )
7049
7050 (define-method get_weight
7051   (of-object "GSrvTarget")
7052   (c-name "g_srv_target_get_weight")
7053   (return-type "guint16")
7054 )
7055
7056 (define-function srv_target_list_sort
7057   (c-name "g_srv_target_list_sort")
7058   (return-type "GList*")
7059   (parameters
7060     '("GList*" "targets")
7061   )
7062 )
7063
7064
7065
7066 ;; From gthemedicon.h
7067
7068 (define-function themed_icon_get_type
7069   (c-name "g_themed_icon_get_type")
7070   (return-type "GType")
7071 )
7072
7073 (define-function themed_icon_new
7074   (c-name "g_themed_icon_new")
7075   (is-constructor-of "GThemedIcon")
7076   (return-type "GIcon*")
7077   (properties
7078     '("name" (argname "iconname"))
7079   )
7080 )
7081
7082 (define-function themed_icon_new_with_default_fallbacks
7083   (c-name "g_themed_icon_new_with_default_fallbacks")
7084   (return-type "GIcon*")
7085   (parameters
7086     '("const-char*" "iconname")
7087   )
7088 )
7089
7090 (define-function themed_icon_new_from_names
7091   (c-name "g_themed_icon_new_from_names")
7092   (return-type "GIcon*")
7093   (parameters
7094     '("char**" "iconnames")
7095     '("int" "len")
7096   )
7097 )
7098
7099 (define-method prepend_name
7100   (of-object "GThemedIcon")
7101   (c-name "g_themed_icon_prepend_name")
7102   (return-type "none")
7103   (parameters
7104     '("const-char*" "iconname")
7105   )
7106 )
7107
7108 ;;
7109 ;; wrapped in gicon.override
7110 ;;
7111 (define-method get_names
7112   (c-name "g_themed_icon_get_names")
7113   (of-object "GThemedIcon")
7114   (return-type "const-gchar*-const*")
7115 )
7116
7117 (define-method append_name
7118   (c-name "g_themed_icon_append_name")
7119   (of-object "GThemedIcon")
7120   (return-type "none")
7121   (parameters
7122     '("char*" "iconname")
7123   )
7124 )
7125
7126
7127
7128 ;; From gthreadedsocketservice.h
7129
7130 (define-function threaded_socket_service_get_type
7131   (c-name "g_threaded_socket_service_get_type")
7132   (return-type "GType")
7133 )
7134
7135 (define-function threaded_socket_service_new
7136   (c-name "g_threaded_socket_service_new")
7137   (is-constructor-of "GThreadedSocketService")
7138   (return-type "GSocketService*")
7139   (parameters
7140     '("int" "max_threads")
7141   )
7142 )
7143
7144
7145
7146 ;; From gunixinputstream.h
7147
7148 (define-function unix_input_stream_get_type
7149   (c-name "g_unix_input_stream_get_type")
7150   (return-type "GType")
7151 )
7152
7153 (define-function unix_input_stream_new
7154   (c-name "g_unix_input_stream_new")
7155   (is-constructor-of "GUnixInputStream")
7156   (return-type "GInputStream*")
7157   (parameters
7158     '("int" "fd")
7159     '("gboolean" "close_fd_at_close")
7160   )
7161 )
7162
7163
7164
7165 ;; From gvfs.h
7166
7167 (define-function vfs_get_type
7168   (c-name "g_vfs_get_type")
7169   (return-type "GType")
7170 )
7171
7172 (define-method is_active
7173   (of-object "GVfs")
7174   (c-name "g_vfs_is_active")
7175   (return-type "gboolean")
7176 )
7177
7178 (define-method get_file_for_path
7179   (of-object "GVfs")
7180   (c-name "g_vfs_get_file_for_path")
7181   (return-type "GFile*")
7182   (caller-owns-return #t)
7183   (parameters
7184     '("const-char*" "path")
7185   )
7186 )
7187
7188 (define-method get_file_for_uri
7189   (of-object "GVfs")
7190   (c-name "g_vfs_get_file_for_uri")
7191   (return-type "GFile*")
7192   (caller-owns-return #t)
7193   (parameters
7194     '("const-char*" "uri")
7195   )
7196 )
7197
7198 (define-method parse_name
7199   (of-object "GVfs")
7200   (c-name "g_vfs_parse_name")
7201   (return-type "GFile*")
7202   (caller-owns-return #t)
7203   (parameters
7204     '("const-char*" "parse_name")
7205   )
7206 )
7207
7208 (define-function vfs_get_default
7209   (c-name "g_vfs_get_default")
7210   (return-type "GVfs*")
7211 )
7212
7213 (define-function vfs_get_local
7214   (c-name "g_vfs_get_local")
7215   (return-type "GVfs*")
7216 )
7217
7218 ;;
7219 ;; wrapped in gio.override
7220 ;;
7221 (define-method get_supported_uri_schemes
7222   (docstring
7223 "VFS.get_supported_uri_schemes() -> [uri, ..]\n"
7224 "Gets a list of URI schemes supported by vfs.")
7225   (of-object "GVfs")
7226   (c-name "g_vfs_get_supported_uri_schemes")
7227   (return-type "const-char*-const*")
7228 )
7229
7230
7231
7232 ;; From gwin32appinfo.h
7233
7234 (define-function win32_app_info_get_type
7235   (c-name "g_win32_app_info_get_type")
7236   (return-type "GType")
7237 )
7238
7239
7240
7241 ;; From gvolume.h
7242
7243 (define-function volume_get_type
7244   (c-name "g_volume_get_type")
7245   (return-type "GType")
7246 )
7247
7248 (define-method get_name
7249   (of-object "GVolume")
7250   (c-name "g_volume_get_name")
7251   (return-type "char*")
7252 )
7253
7254 (define-method get_icon
7255   (of-object "GVolume")
7256   (c-name "g_volume_get_icon")
7257   (return-type "GIcon*")
7258   (caller-owns-return #t)
7259 )
7260
7261 (define-method get_uuid
7262   (of-object "GVolume")
7263   (c-name "g_volume_get_uuid")
7264   (return-type "char*")
7265 )
7266
7267 (define-method get_drive
7268   (of-object "GVolume")
7269   (c-name "g_volume_get_drive")
7270   (return-type "GDrive*")
7271   (caller-owns-return #t)
7272 )
7273
7274 (define-method get_mount
7275   (of-object "GVolume")
7276   (c-name "g_volume_get_mount")
7277   (return-type "GMount*")
7278   (caller-owns-return #t)
7279 )
7280
7281 (define-method can_mount
7282   (of-object "GVolume")
7283   (c-name "g_volume_can_mount")
7284   (return-type "gboolean")
7285 )
7286
7287 (define-method can_eject
7288   (of-object "GVolume")
7289   (c-name "g_volume_can_eject")
7290   (return-type "gboolean")
7291 )
7292
7293 (define-method should_automount
7294   (of-object "GVolume")
7295   (c-name "g_volume_should_automount")
7296   (return-type "gboolean")
7297 )
7298
7299 ;;
7300 ;; wrapped in gvolume.override
7301 ;;
7302 (define-method mount
7303   (of-object "GVolume")
7304   (c-name "g_volume_mount")
7305   (return-type "none")
7306   (parameters
7307     '("GMountOperation*" "mount_operation")
7308     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
7309     '("GAsyncReadyCallback" "callback")
7310     '("gpointer" "user_data")
7311   )
7312 )
7313
7314 (define-method mount_finish
7315   (of-object "GVolume")
7316   (c-name "g_volume_mount_finish")
7317   (return-type "gboolean")
7318   (parameters
7319     '("GAsyncResult*" "result")
7320     '("GError**" "error")
7321   )
7322 )
7323
7324 ;;
7325 ;; wrapped in gvolume.override
7326 ;;
7327 (define-method eject
7328   (of-object "GVolume")
7329   (c-name "g_volume_eject")
7330   (return-type "none")
7331   (parameters
7332     '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
7333     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
7334     '("GAsyncReadyCallback" "callback")
7335     '("gpointer" "user_data")
7336   )
7337 )
7338
7339 (define-method eject_finish
7340   (of-object "GVolume")
7341   (c-name "g_volume_eject_finish")
7342   (return-type "gboolean")
7343   (parameters
7344     '("GAsyncResult*" "result")
7345     '("GError**" "error")
7346   )
7347   (deprecated "use gio.Drive.eject_with_operation_finish instead.")
7348 )
7349
7350 (define-method get_identifier
7351   (of-object "GVolume")
7352   (c-name "g_volume_get_identifier")
7353   (return-type "char*")
7354   (parameters
7355     '("const-char*" "kind")
7356   )
7357 )
7358
7359 ;;
7360 ;; wrapped in gvolume.override
7361 ;;
7362 (define-method enumerate_identifiers
7363   (of-object "GVolume")
7364   (c-name "g_volume_enumerate_identifiers")
7365   (return-type "char**")
7366 )
7367
7368 (define-method get_activation_root
7369   (of-object "GVolume")
7370   (c-name "g_volume_get_activation_root")
7371   (return-type "GFile*")
7372 )
7373
7374 (define-method eject_with_operation
7375   (of-object "GVolume")
7376   (c-name "g_volume_eject_with_operation")
7377   (return-type "none")
7378   (parameters
7379     '("GMountUnmountFlags" "flags")
7380     '("GMountOperation*" "mount_operation")
7381     '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
7382     '("GAsyncReadyCallback" "callback")
7383     '("gpointer" "user_data")
7384   )
7385 )
7386
7387 (define-method eject_with_operation_finish
7388   (of-object "GVolume")
7389   (c-name "g_volume_eject_with_operation_finish")
7390   (return-type "gboolean")
7391   (parameters
7392     '("GAsyncResult*" "result")
7393     '("GError**" "error")
7394   )
7395 )
7396
7397
7398
7399 ;; From gvolumemonitor.h
7400
7401 (define-function volume_monitor_get_type
7402   (c-name "g_volume_monitor_get_type")
7403   (return-type "GType")
7404 )
7405
7406 (define-function volume_monitor_get
7407   (c-name "g_volume_monitor_get")
7408   (return-type "GVolumeMonitor*")
7409 )
7410
7411 ;;
7412 ;; wrapped in gvolumemonitor.override
7413 ;;
7414 (define-method get_connected_drives
7415   (of-object "GVolumeMonitor")
7416   (c-name "g_volume_monitor_get_connected_drives")
7417   (return-type "GList*")
7418 )
7419
7420 ;;
7421 ;; wrapped in gvolumemonitor.override
7422 ;;
7423 (define-method get_volumes
7424   (of-object "GVolumeMonitor")
7425   (c-name "g_volume_monitor_get_volumes")
7426   (return-type "GList*")
7427 )
7428
7429 ;;
7430 ;; wrapped in gvolumemonitor.override
7431 ;;
7432 (define-method get_mounts
7433   (of-object "GVolumeMonitor")
7434   (c-name "g_volume_monitor_get_mounts")
7435   (return-type "GList*")
7436 )
7437
7438 (define-method get_volume_for_uuid
7439   (of-object "GVolumeMonitor")
7440   (c-name "g_volume_monitor_get_volume_for_uuid")
7441   (return-type "GVolume*")
7442   (caller-owns-return #t)
7443   (parameters
7444     '("const-char*" "uuid")
7445   )
7446 )
7447
7448 (define-method get_mount_for_uuid
7449   (of-object "GVolumeMonitor")
7450   (c-name "g_volume_monitor_get_mount_for_uuid")
7451   (return-type "GMount*")
7452   (caller-owns-return #t)
7453   (parameters
7454     '("const-char*" "uuid")
7455   )
7456 )
7457
7458 (define-function volume_monitor_adopt_orphan_mount
7459   (c-name "g_volume_monitor_adopt_orphan_mount")
7460   (return-type "GVolume*")
7461   (parameters
7462     '("GMount*" "mount")
7463   )
7464 )
7465