gio/auto/
functions.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5#[cfg(feature = "futures")]
6use futures::future;
7use gio_sys;
8use glib;
9use glib::object::IsA;
10use glib::translate::*;
11use glib::GString;
12use glib_sys;
13use gobject_sys;
14use std;
15#[cfg(feature = "futures")]
16use std::boxed::Box as Box_;
17use std::mem;
18use std::ptr;
19use Cancellable;
20use Error;
21use File;
22use IOErrorEnum;
23use IOStream;
24use Icon;
25use InputStream;
26use Resource;
27use ResourceLookupFlags;
28use SettingsBackend;
29
30//pub fn bus_get<P: IsA<Cancellable>, Q: FnOnce(Result</*Ignored*/DBusConnection, Error>) + Send + 'static>(bus_type: /*Ignored*/BusType, cancellable: Option<&P>, callback: Q) {
31//    unsafe { TODO: call gio_sys:g_bus_get() }
32//}
33
34//#[cfg(feature = "futures")]
35//pub fn bus_get_future(bus_type: /*Ignored*/BusType) -> Box_<dyn future::Future<Output = Result</*Ignored*/DBusConnection, Error>> + std::marker::Unpin> {
36//use GioFuture;
37//use fragile::Fragile;
38
39//GioFuture::new(&(), move |_obj, send| {
40//    let cancellable = Cancellable::new();
41//    let send = Fragile::new(send);
42//    bus_get(
43//        bus_type,
44//        Some(&cancellable),
45//        move |res| {
46//            let _ = send.into_inner().send(res);
47//        },
48//    );
49
50//    cancellable
51//})
52//}
53
54//pub fn bus_get_sync<P: IsA<Cancellable>>(bus_type: /*Ignored*/BusType, cancellable: Option<&P>) -> Result</*Ignored*/DBusConnection, Error> {
55//    unsafe { TODO: call gio_sys:g_bus_get_sync() }
56//}
57
58//pub fn bus_own_name(bus_type: /*Ignored*/BusType, name: &str, flags: /*Ignored*/BusNameOwnerFlags, bus_acquired_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), name_acquired_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), name_lost_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
59//    unsafe { TODO: call gio_sys:g_bus_own_name() }
60//}
61
62//pub fn bus_own_name_on_connection(connection: /*Ignored*/&DBusConnection, name: &str, flags: /*Ignored*/BusNameOwnerFlags, name_acquired_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), name_lost_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
63//    unsafe { TODO: call gio_sys:g_bus_own_name_on_connection() }
64//}
65
66//pub fn bus_own_name_on_connection_with_closures(connection: /*Ignored*/&DBusConnection, name: &str, flags: /*Ignored*/BusNameOwnerFlags, name_acquired_closure: /*Ignored*/Option<&glib::Closure>, name_lost_closure: /*Ignored*/Option<&glib::Closure>) -> u32 {
67//    unsafe { TODO: call gio_sys:g_bus_own_name_on_connection_with_closures() }
68//}
69
70//pub fn bus_own_name_with_closures(bus_type: /*Ignored*/BusType, name: &str, flags: /*Ignored*/BusNameOwnerFlags, bus_acquired_closure: /*Ignored*/Option<&glib::Closure>, name_acquired_closure: /*Ignored*/Option<&glib::Closure>, name_lost_closure: /*Ignored*/Option<&glib::Closure>) -> u32 {
71//    unsafe { TODO: call gio_sys:g_bus_own_name_with_closures() }
72//}
73
74pub fn bus_unown_name(owner_id: u32) {
75    unsafe {
76        gio_sys::g_bus_unown_name(owner_id);
77    }
78}
79
80pub fn bus_unwatch_name(watcher_id: u32) {
81    unsafe {
82        gio_sys::g_bus_unwatch_name(watcher_id);
83    }
84}
85
86//pub fn bus_watch_name(bus_type: /*Ignored*/BusType, name: &str, flags: /*Ignored*/BusNameWatcherFlags, name_appeared_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str, &str), name_vanished_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
87//    unsafe { TODO: call gio_sys:g_bus_watch_name() }
88//}
89
90//pub fn bus_watch_name_on_connection(connection: /*Ignored*/&DBusConnection, name: &str, flags: /*Ignored*/BusNameWatcherFlags, name_appeared_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str, &str), name_vanished_handler: /*Unimplemented*/Fn(/*Ignored*/DBusConnection, &str), user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> u32 {
91//    unsafe { TODO: call gio_sys:g_bus_watch_name_on_connection() }
92//}
93
94//pub fn bus_watch_name_on_connection_with_closures(connection: /*Ignored*/&DBusConnection, name: &str, flags: /*Ignored*/BusNameWatcherFlags, name_appeared_closure: /*Ignored*/Option<&glib::Closure>, name_vanished_closure: /*Ignored*/Option<&glib::Closure>) -> u32 {
95//    unsafe { TODO: call gio_sys:g_bus_watch_name_on_connection_with_closures() }
96//}
97
98//pub fn bus_watch_name_with_closures(bus_type: /*Ignored*/BusType, name: &str, flags: /*Ignored*/BusNameWatcherFlags, name_appeared_closure: /*Ignored*/Option<&glib::Closure>, name_vanished_closure: /*Ignored*/Option<&glib::Closure>) -> u32 {
99//    unsafe { TODO: call gio_sys:g_bus_watch_name_with_closures() }
100//}
101
102pub fn content_type_can_be_executable(type_: &str) -> bool {
103    unsafe {
104        from_glib(gio_sys::g_content_type_can_be_executable(
105            type_.to_glib_none().0,
106        ))
107    }
108}
109
110pub fn content_type_equals(type1: &str, type2: &str) -> bool {
111    unsafe {
112        from_glib(gio_sys::g_content_type_equals(
113            type1.to_glib_none().0,
114            type2.to_glib_none().0,
115        ))
116    }
117}
118
119pub fn content_type_from_mime_type(mime_type: &str) -> Option<GString> {
120    unsafe {
121        from_glib_full(gio_sys::g_content_type_from_mime_type(
122            mime_type.to_glib_none().0,
123        ))
124    }
125}
126
127pub fn content_type_get_description(type_: &str) -> Option<GString> {
128    unsafe {
129        from_glib_full(gio_sys::g_content_type_get_description(
130            type_.to_glib_none().0,
131        ))
132    }
133}
134
135pub fn content_type_get_generic_icon_name(type_: &str) -> Option<GString> {
136    unsafe {
137        from_glib_full(gio_sys::g_content_type_get_generic_icon_name(
138            type_.to_glib_none().0,
139        ))
140    }
141}
142
143pub fn content_type_get_icon(type_: &str) -> Option<Icon> {
144    unsafe { from_glib_full(gio_sys::g_content_type_get_icon(type_.to_glib_none().0)) }
145}
146
147pub fn content_type_get_mime_type(type_: &str) -> Option<GString> {
148    unsafe {
149        from_glib_full(gio_sys::g_content_type_get_mime_type(
150            type_.to_glib_none().0,
151        ))
152    }
153}
154
155pub fn content_type_get_symbolic_icon(type_: &str) -> Option<Icon> {
156    unsafe {
157        from_glib_full(gio_sys::g_content_type_get_symbolic_icon(
158            type_.to_glib_none().0,
159        ))
160    }
161}
162
163pub fn content_type_guess(filename: Option<&str>, data: &[u8]) -> (GString, bool) {
164    let data_size = data.len() as usize;
165    unsafe {
166        let mut result_uncertain = mem::uninitialized();
167        let ret = from_glib_full(gio_sys::g_content_type_guess(
168            filename.to_glib_none().0,
169            data.to_glib_none().0,
170            data_size,
171            &mut result_uncertain,
172        ));
173        (ret, from_glib(result_uncertain))
174    }
175}
176
177pub fn content_type_guess_for_tree<P: IsA<File>>(root: &P) -> Vec<GString> {
178    unsafe {
179        FromGlibPtrContainer::from_glib_full(gio_sys::g_content_type_guess_for_tree(
180            root.as_ref().to_glib_none().0,
181        ))
182    }
183}
184
185pub fn content_type_is_a(type_: &str, supertype: &str) -> bool {
186    unsafe {
187        from_glib(gio_sys::g_content_type_is_a(
188            type_.to_glib_none().0,
189            supertype.to_glib_none().0,
190        ))
191    }
192}
193
194#[cfg(any(feature = "v2_52", feature = "dox"))]
195pub fn content_type_is_mime_type(type_: &str, mime_type: &str) -> bool {
196    unsafe {
197        from_glib(gio_sys::g_content_type_is_mime_type(
198            type_.to_glib_none().0,
199            mime_type.to_glib_none().0,
200        ))
201    }
202}
203
204pub fn content_type_is_unknown(type_: &str) -> bool {
205    unsafe { from_glib(gio_sys::g_content_type_is_unknown(type_.to_glib_none().0)) }
206}
207
208pub fn content_types_get_registered() -> Vec<GString> {
209    unsafe { FromGlibPtrContainer::from_glib_full(gio_sys::g_content_types_get_registered()) }
210}
211
212pub fn dbus_address_escape_value(string: &str) -> Option<GString> {
213    unsafe {
214        from_glib_full(gio_sys::g_dbus_address_escape_value(
215            string.to_glib_none().0,
216        ))
217    }
218}
219
220//pub fn dbus_address_get_for_bus_sync<P: IsA<Cancellable>>(bus_type: /*Ignored*/BusType, cancellable: Option<&P>) -> Result<GString, Error> {
221//    unsafe { TODO: call gio_sys:g_dbus_address_get_for_bus_sync() }
222//}
223
224pub fn dbus_address_get_stream<
225    P: IsA<Cancellable>,
226    Q: FnOnce(Result<(IOStream, GString), Error>) + Send + 'static,
227>(
228    address: &str,
229    cancellable: Option<&P>,
230    callback: Q,
231) {
232    let user_data: Box<Q> = Box::new(callback);
233    unsafe extern "C" fn dbus_address_get_stream_trampoline<
234        Q: FnOnce(Result<(IOStream, GString), Error>) + Send + 'static,
235    >(
236        _source_object: *mut gobject_sys::GObject,
237        res: *mut gio_sys::GAsyncResult,
238        user_data: glib_sys::gpointer,
239    ) {
240        let mut error = ptr::null_mut();
241        let mut out_guid = ptr::null_mut();
242        let ret = gio_sys::g_dbus_address_get_stream_finish(res, &mut out_guid, &mut error);
243        let result = if error.is_null() {
244            Ok((from_glib_full(ret), from_glib_full(out_guid)))
245        } else {
246            Err(from_glib_full(error))
247        };
248        let callback: Box<Q> = Box::from_raw(user_data as *mut _);
249        callback(result);
250    }
251    let callback = dbus_address_get_stream_trampoline::<Q>;
252    unsafe {
253        gio_sys::g_dbus_address_get_stream(
254            address.to_glib_none().0,
255            cancellable.map(|p| p.as_ref()).to_glib_none().0,
256            Some(callback),
257            Box::into_raw(user_data) as *mut _,
258        );
259    }
260}
261
262#[cfg(feature = "futures")]
263pub fn dbus_address_get_stream_future(
264    address: &str,
265) -> Box_<dyn future::Future<Output = Result<(IOStream, GString), Error>> + std::marker::Unpin> {
266    use fragile::Fragile;
267    use GioFuture;
268
269    let address = String::from(address);
270    GioFuture::new(&(), move |_obj, send| {
271        let cancellable = Cancellable::new();
272        let send = Fragile::new(send);
273        dbus_address_get_stream(&address, Some(&cancellable), move |res| {
274            let _ = send.into_inner().send(res);
275        });
276
277        cancellable
278    })
279}
280
281pub fn dbus_address_get_stream_sync<P: IsA<Cancellable>>(
282    address: &str,
283    cancellable: Option<&P>,
284) -> Result<(IOStream, GString), Error> {
285    unsafe {
286        let mut out_guid = ptr::null_mut();
287        let mut error = ptr::null_mut();
288        let ret = gio_sys::g_dbus_address_get_stream_sync(
289            address.to_glib_none().0,
290            &mut out_guid,
291            cancellable.map(|p| p.as_ref()).to_glib_none().0,
292            &mut error,
293        );
294        if error.is_null() {
295            Ok((from_glib_full(ret), from_glib_full(out_guid)))
296        } else {
297            Err(from_glib_full(error))
298        }
299    }
300}
301
302pub fn dbus_generate_guid() -> Option<GString> {
303    unsafe { from_glib_full(gio_sys::g_dbus_generate_guid()) }
304}
305
306pub fn dbus_gvalue_to_gvariant(
307    gvalue: &glib::Value,
308    type_: &glib::VariantTy,
309) -> Option<glib::Variant> {
310    unsafe {
311        from_glib_full(gio_sys::g_dbus_gvalue_to_gvariant(
312            gvalue.to_glib_none().0,
313            type_.to_glib_none().0,
314        ))
315    }
316}
317
318pub fn dbus_gvariant_to_gvalue(value: &glib::Variant) -> glib::Value {
319    unsafe {
320        let mut out_gvalue = glib::Value::uninitialized();
321        gio_sys::g_dbus_gvariant_to_gvalue(value.to_glib_none().0, out_gvalue.to_glib_none_mut().0);
322        out_gvalue
323    }
324}
325
326pub fn dbus_is_address(string: &str) -> bool {
327    unsafe { from_glib(gio_sys::g_dbus_is_address(string.to_glib_none().0)) }
328}
329
330pub fn dbus_is_guid(string: &str) -> bool {
331    unsafe { from_glib(gio_sys::g_dbus_is_guid(string.to_glib_none().0)) }
332}
333
334pub fn dbus_is_interface_name(string: &str) -> bool {
335    unsafe { from_glib(gio_sys::g_dbus_is_interface_name(string.to_glib_none().0)) }
336}
337
338pub fn dbus_is_member_name(string: &str) -> bool {
339    unsafe { from_glib(gio_sys::g_dbus_is_member_name(string.to_glib_none().0)) }
340}
341
342pub fn dbus_is_name(string: &str) -> bool {
343    unsafe { from_glib(gio_sys::g_dbus_is_name(string.to_glib_none().0)) }
344}
345
346pub fn dbus_is_supported_address(string: &str) -> Result<(), Error> {
347    unsafe {
348        let mut error = ptr::null_mut();
349        let _ = gio_sys::g_dbus_is_supported_address(string.to_glib_none().0, &mut error);
350        if error.is_null() {
351            Ok(())
352        } else {
353            Err(from_glib_full(error))
354        }
355    }
356}
357
358pub fn dbus_is_unique_name(string: &str) -> bool {
359    unsafe { from_glib(gio_sys::g_dbus_is_unique_name(string.to_glib_none().0)) }
360}
361
362pub fn io_error_from_errno(err_no: i32) -> IOErrorEnum {
363    unsafe { from_glib(gio_sys::g_io_error_from_errno(err_no)) }
364}
365
366pub fn io_error_quark() -> glib::Quark {
367    unsafe { from_glib(gio_sys::g_io_error_quark()) }
368}
369
370//pub fn io_modules_load_all_in_directory<P: AsRef<std::path::Path>>(dirname: P) -> /*Ignored*/Vec<IOModule> {
371//    unsafe { TODO: call gio_sys:g_io_modules_load_all_in_directory() }
372//}
373
374//pub fn io_modules_load_all_in_directory_with_scope<P: AsRef<std::path::Path>>(dirname: P, scope: /*Ignored*/&mut IOModuleScope) -> /*Ignored*/Vec<IOModule> {
375//    unsafe { TODO: call gio_sys:g_io_modules_load_all_in_directory_with_scope() }
376//}
377
378pub fn io_modules_scan_all_in_directory<P: AsRef<std::path::Path>>(dirname: P) {
379    unsafe {
380        gio_sys::g_io_modules_scan_all_in_directory(dirname.as_ref().to_glib_none().0);
381    }
382}
383
384//pub fn io_modules_scan_all_in_directory_with_scope<P: AsRef<std::path::Path>>(dirname: P, scope: /*Ignored*/&mut IOModuleScope) {
385//    unsafe { TODO: call gio_sys:g_io_modules_scan_all_in_directory_with_scope() }
386//}
387
388pub fn io_scheduler_cancel_all_jobs() {
389    unsafe {
390        gio_sys::g_io_scheduler_cancel_all_jobs();
391    }
392}
393
394//pub fn io_scheduler_push_job<P: IsA<Cancellable>>(job_func: /*Unimplemented*/Fn(/*Ignored*/IOSchedulerJob, Option<&Cancellable>) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>, io_priority: i32, cancellable: Option<&P>) {
395//    unsafe { TODO: call gio_sys:g_io_scheduler_push_job() }
396//}
397
398pub fn keyfile_settings_backend_new(
399    filename: &str,
400    root_path: &str,
401    root_group: Option<&str>,
402) -> Option<SettingsBackend> {
403    unsafe {
404        from_glib_full(gio_sys::g_keyfile_settings_backend_new(
405            filename.to_glib_none().0,
406            root_path.to_glib_none().0,
407            root_group.to_glib_none().0,
408        ))
409    }
410}
411
412pub fn memory_settings_backend_new() -> Option<SettingsBackend> {
413    unsafe { from_glib_full(gio_sys::g_memory_settings_backend_new()) }
414}
415
416pub fn networking_init() {
417    unsafe {
418        gio_sys::g_networking_init();
419    }
420}
421
422pub fn null_settings_backend_new() -> Option<SettingsBackend> {
423    unsafe { from_glib_full(gio_sys::g_null_settings_backend_new()) }
424}
425
426pub fn resources_enumerate_children(
427    path: &str,
428    lookup_flags: ResourceLookupFlags,
429) -> Result<Vec<GString>, Error> {
430    unsafe {
431        let mut error = ptr::null_mut();
432        let ret = gio_sys::g_resources_enumerate_children(
433            path.to_glib_none().0,
434            lookup_flags.to_glib(),
435            &mut error,
436        );
437        if error.is_null() {
438            Ok(FromGlibPtrContainer::from_glib_full(ret))
439        } else {
440            Err(from_glib_full(error))
441        }
442    }
443}
444
445pub fn resources_get_info(
446    path: &str,
447    lookup_flags: ResourceLookupFlags,
448) -> Result<(usize, u32), Error> {
449    unsafe {
450        let mut size = mem::uninitialized();
451        let mut flags = mem::uninitialized();
452        let mut error = ptr::null_mut();
453        let _ = gio_sys::g_resources_get_info(
454            path.to_glib_none().0,
455            lookup_flags.to_glib(),
456            &mut size,
457            &mut flags,
458            &mut error,
459        );
460        if error.is_null() {
461            Ok((size, flags))
462        } else {
463            Err(from_glib_full(error))
464        }
465    }
466}
467
468pub fn resources_lookup_data(
469    path: &str,
470    lookup_flags: ResourceLookupFlags,
471) -> Result<glib::Bytes, Error> {
472    unsafe {
473        let mut error = ptr::null_mut();
474        let ret = gio_sys::g_resources_lookup_data(
475            path.to_glib_none().0,
476            lookup_flags.to_glib(),
477            &mut error,
478        );
479        if error.is_null() {
480            Ok(from_glib_full(ret))
481        } else {
482            Err(from_glib_full(error))
483        }
484    }
485}
486
487pub fn resources_open_stream(
488    path: &str,
489    lookup_flags: ResourceLookupFlags,
490) -> Result<InputStream, Error> {
491    unsafe {
492        let mut error = ptr::null_mut();
493        let ret = gio_sys::g_resources_open_stream(
494            path.to_glib_none().0,
495            lookup_flags.to_glib(),
496            &mut error,
497        );
498        if error.is_null() {
499            Ok(from_glib_full(ret))
500        } else {
501            Err(from_glib_full(error))
502        }
503    }
504}
505
506pub fn resources_register(resource: &Resource) {
507    unsafe {
508        gio_sys::g_resources_register(resource.to_glib_none().0);
509    }
510}
511
512pub fn resources_unregister(resource: &Resource) {
513    unsafe {
514        gio_sys::g_resources_unregister(resource.to_glib_none().0);
515    }
516}
517
518//#[cfg_attr(feature = "v2_46", deprecated)]
519//pub fn simple_async_report_error_in_idle<P: IsA<glib::Object>, Q: FnOnce(Result<(), Error>) + 'static>(object: Option<&P>, callback: Q, domain: glib::Quark, code: i32, format: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
520//    unsafe { TODO: call gio_sys:g_simple_async_report_error_in_idle() }
521//}
522
523//#[cfg_attr(feature = "v2_46", deprecated)]
524//pub fn simple_async_report_gerror_in_idle<P: IsA<glib::Object>, Q: FnOnce(Result<(), Error>) + 'static>(object: Option<&P>, callback: Q, error: &Error) {
525//    unsafe { TODO: call gio_sys:g_simple_async_report_gerror_in_idle() }
526//}
527
528//#[cfg_attr(feature = "v2_46", deprecated)]
529//pub fn simple_async_report_take_gerror_in_idle<P: IsA<glib::Object>, Q: FnOnce(Result<(), Error>) + 'static>(object: Option<&P>, callback: Q, error: &mut Error) {
530//    unsafe { TODO: call gio_sys:g_simple_async_report_take_gerror_in_idle() }
531//}
532
533#[cfg(any(unix, feature = "dox"))]
534pub fn unix_is_mount_path_system_internal<P: AsRef<std::path::Path>>(mount_path: P) -> bool {
535    unsafe {
536        from_glib(gio_sys::g_unix_is_mount_path_system_internal(
537            mount_path.as_ref().to_glib_none().0,
538        ))
539    }
540}
541
542#[cfg(any(unix, feature = "dox"))]
543#[cfg(any(feature = "v2_56", feature = "dox"))]
544pub fn unix_is_system_device_path<P: AsRef<std::path::Path>>(device_path: P) -> bool {
545    unsafe {
546        from_glib(gio_sys::g_unix_is_system_device_path(
547            device_path.as_ref().to_glib_none().0,
548        ))
549    }
550}
551
552#[cfg(any(unix, feature = "dox"))]
553#[cfg(any(feature = "v2_56", feature = "dox"))]
554pub fn unix_is_system_fs_type(fs_type: &str) -> bool {
555    unsafe { from_glib(gio_sys::g_unix_is_system_fs_type(fs_type.to_glib_none().0)) }
556}
557
558//#[cfg(any(unix, feature = "dox"))]
559//pub fn unix_mount_at<P: AsRef<std::path::Path>>(mount_path: P) -> (/*Ignored*/UnixMountEntry, u64) {
560//    unsafe { TODO: call gio_sys:g_unix_mount_at() }
561//}
562
563//#[cfg(any(unix, feature = "dox"))]
564//pub fn unix_mount_compare(mount1: /*Ignored*/&mut UnixMountEntry, mount2: /*Ignored*/&mut UnixMountEntry) -> i32 {
565//    unsafe { TODO: call gio_sys:g_unix_mount_compare() }
566//}
567
568//#[cfg(any(unix, feature = "dox"))]
569//#[cfg(any(feature = "v2_54", feature = "dox"))]
570//pub fn unix_mount_copy(mount_entry: /*Ignored*/&mut UnixMountEntry) -> /*Ignored*/Option<UnixMountEntry> {
571//    unsafe { TODO: call gio_sys:g_unix_mount_copy() }
572//}
573
574//#[cfg(any(unix, feature = "dox"))]
575//#[cfg(any(feature = "v2_52", feature = "dox"))]
576//pub fn unix_mount_for<P: AsRef<std::path::Path>>(file_path: P) -> (/*Ignored*/UnixMountEntry, u64) {
577//    unsafe { TODO: call gio_sys:g_unix_mount_for() }
578//}
579
580//#[cfg(any(unix, feature = "dox"))]
581//pub fn unix_mount_free(mount_entry: /*Ignored*/&mut UnixMountEntry) {
582//    unsafe { TODO: call gio_sys:g_unix_mount_free() }
583//}
584
585//#[cfg(any(unix, feature = "dox"))]
586//pub fn unix_mount_get_device_path(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<std::path::PathBuf> {
587//    unsafe { TODO: call gio_sys:g_unix_mount_get_device_path() }
588//}
589
590//#[cfg(any(unix, feature = "dox"))]
591//pub fn unix_mount_get_fs_type(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<GString> {
592//    unsafe { TODO: call gio_sys:g_unix_mount_get_fs_type() }
593//}
594
595//#[cfg(any(unix, feature = "dox"))]
596//pub fn unix_mount_get_mount_path(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<std::path::PathBuf> {
597//    unsafe { TODO: call gio_sys:g_unix_mount_get_mount_path() }
598//}
599
600//#[cfg(any(unix, feature = "dox"))]
601//#[cfg(any(feature = "v2_58", feature = "dox"))]
602//pub fn unix_mount_get_options(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<GString> {
603//    unsafe { TODO: call gio_sys:g_unix_mount_get_options() }
604//}
605
606//#[cfg(any(unix, feature = "dox"))]
607//pub fn unix_mount_guess_can_eject(mount_entry: /*Ignored*/&mut UnixMountEntry) -> bool {
608//    unsafe { TODO: call gio_sys:g_unix_mount_guess_can_eject() }
609//}
610
611//#[cfg(any(unix, feature = "dox"))]
612//pub fn unix_mount_guess_icon(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<Icon> {
613//    unsafe { TODO: call gio_sys:g_unix_mount_guess_icon() }
614//}
615
616//#[cfg(any(unix, feature = "dox"))]
617//pub fn unix_mount_guess_name(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<GString> {
618//    unsafe { TODO: call gio_sys:g_unix_mount_guess_name() }
619//}
620
621//#[cfg(any(unix, feature = "dox"))]
622//pub fn unix_mount_guess_should_display(mount_entry: /*Ignored*/&mut UnixMountEntry) -> bool {
623//    unsafe { TODO: call gio_sys:g_unix_mount_guess_should_display() }
624//}
625
626//#[cfg(any(unix, feature = "dox"))]
627//pub fn unix_mount_guess_symbolic_icon(mount_entry: /*Ignored*/&mut UnixMountEntry) -> Option<Icon> {
628//    unsafe { TODO: call gio_sys:g_unix_mount_guess_symbolic_icon() }
629//}
630
631//#[cfg(any(unix, feature = "dox"))]
632//pub fn unix_mount_is_readonly(mount_entry: /*Ignored*/&mut UnixMountEntry) -> bool {
633//    unsafe { TODO: call gio_sys:g_unix_mount_is_readonly() }
634//}
635
636//#[cfg(any(unix, feature = "dox"))]
637//pub fn unix_mount_is_system_internal(mount_entry: /*Ignored*/&mut UnixMountEntry) -> bool {
638//    unsafe { TODO: call gio_sys:g_unix_mount_is_system_internal() }
639//}
640
641#[cfg(any(unix, feature = "dox"))]
642pub fn unix_mount_points_changed_since(time: u64) -> bool {
643    unsafe { from_glib(gio_sys::g_unix_mount_points_changed_since(time)) }
644}
645
646//#[cfg(any(unix, feature = "dox"))]
647//pub fn unix_mount_points_get() -> (/*Ignored*/Vec<UnixMountPoint>, u64) {
648//    unsafe { TODO: call gio_sys:g_unix_mount_points_get() }
649//}
650
651#[cfg(any(unix, feature = "dox"))]
652pub fn unix_mounts_changed_since(time: u64) -> bool {
653    unsafe { from_glib(gio_sys::g_unix_mounts_changed_since(time)) }
654}
655
656//#[cfg(any(unix, feature = "dox"))]
657//pub fn unix_mounts_get() -> (/*Ignored*/Vec<UnixMountEntry>, u64) {
658//    unsafe { TODO: call gio_sys:g_unix_mounts_get() }
659//}