1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

use crate::ffi;
use glib::{bitflags::bitflags, prelude::*, translate::*};

bitflags! {
    /// Flags to alter the behavior of [`InstallationExtManual::install_full()`][crate::prelude::InstallationExtManual::install_full()].
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakInstallFlags")]
    pub struct InstallFlags: u32 {
        /// Default
        #[doc(alias = "FLATPAK_INSTALL_FLAGS_NONE")]
        const NONE = ffi::FLATPAK_INSTALL_FLAGS_NONE as _;
        /// Don't use static deltas when pulling
        #[doc(alias = "FLATPAK_INSTALL_FLAGS_NO_STATIC_DELTAS")]
        const NO_STATIC_DELTAS = ffi::FLATPAK_INSTALL_FLAGS_NO_STATIC_DELTAS as _;
        /// Don't install any new builds that might be fetched
        #[doc(alias = "FLATPAK_INSTALL_FLAGS_NO_DEPLOY")]
        const NO_DEPLOY = ffi::FLATPAK_INSTALL_FLAGS_NO_DEPLOY as _;
        /// Don't try to fetch new builds from the remote repo
        #[doc(alias = "FLATPAK_INSTALL_FLAGS_NO_PULL")]
        const NO_PULL = ffi::FLATPAK_INSTALL_FLAGS_NO_PULL as _;
        /// Don't call triggers after installing. If used,
        /// the caller must later call [`InstallationExt::run_triggers()`][crate::prelude::InstallationExt::run_triggers()] to update
        /// the exported files. (Since: 1.0.3)
        #[doc(alias = "FLATPAK_INSTALL_FLAGS_NO_TRIGGERS")]
        const NO_TRIGGERS = ffi::FLATPAK_INSTALL_FLAGS_NO_TRIGGERS as _;
    }
}

#[doc(hidden)]
impl IntoGlib for InstallFlags {
    type GlibType = ffi::FlatpakInstallFlags;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakInstallFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::FlatpakInstallFlags> for InstallFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakInstallFlags) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for InstallFlags {
    #[inline]
    #[doc(alias = "flatpak_install_flags_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_install_flags_get_type()) }
    }
}

impl glib::HasParamSpec for InstallFlags {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

impl glib::value::ValueType for InstallFlags {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for InstallFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for InstallFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<InstallFlags> for glib::Value {
    #[inline]
    fn from(v: InstallFlags) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    /// Flags to alter the behavior of [`InstallationExtManual::launch_full()`][crate::prelude::InstallationExtManual::launch_full()].
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakLaunchFlags")]
    pub struct LaunchFlags: u32 {
        /// Default
        #[doc(alias = "FLATPAK_LAUNCH_FLAGS_NONE")]
        const NONE = ffi::FLATPAK_LAUNCH_FLAGS_NONE as _;
        /// Do not reap the child. Use this if you want to wait
        /// for the child with `g_child_watch_add()`. (Since: 1.1)
        #[doc(alias = "FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP")]
        const DO_NOT_REAP = ffi::FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP as _;
    }
}

#[doc(hidden)]
impl IntoGlib for LaunchFlags {
    type GlibType = ffi::FlatpakLaunchFlags;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakLaunchFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::FlatpakLaunchFlags> for LaunchFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakLaunchFlags) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for LaunchFlags {
    #[inline]
    #[doc(alias = "flatpak_launch_flags_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_launch_flags_get_type()) }
    }
}

impl glib::HasParamSpec for LaunchFlags {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

impl glib::value::ValueType for LaunchFlags {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for LaunchFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for LaunchFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<LaunchFlags> for glib::Value {
    #[inline]
    fn from(v: LaunchFlags) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

#[cfg(feature = "v1_3_3")]
bitflags! {
    /// Flags to alter the behavior of e.g [`InstallationExt::list_remote_refs_sync_full()`][crate::prelude::InstallationExt::list_remote_refs_sync_full()].
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakQueryFlags")]
    pub struct QueryFlags: u32 {
        /// Default
        #[doc(alias = "FLATPAK_QUERY_FLAGS_NONE")]
        const NONE = ffi::FLATPAK_QUERY_FLAGS_NONE as _;
        /// Don't do any network i/o, but only return cached data.
        /// This can return stale data, or a [`Error::NotCached`][crate::Error::NotCached] error, however it is a
        /// lot more efficient if you're doing many requests.
        #[doc(alias = "FLATPAK_QUERY_FLAGS_ONLY_CACHED")]
        const ONLY_CACHED = ffi::FLATPAK_QUERY_FLAGS_ONLY_CACHED as _;
        /// Only list refs available from sideload
        /// repos; see flatpak(1). (Since: 1.7)
        #[doc(alias = "FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED")]
        const ONLY_SIDELOADED = ffi::FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED as _;
        /// Include refs from all arches, not just the primary ones. (Since: 1.11.2)
        #[doc(alias = "FLATPAK_QUERY_FLAGS_ALL_ARCHES")]
        const ALL_ARCHES = ffi::FLATPAK_QUERY_FLAGS_ALL_ARCHES as _;
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
#[doc(hidden)]
impl IntoGlib for QueryFlags {
    type GlibType = ffi::FlatpakQueryFlags;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakQueryFlags {
        self.bits()
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
#[doc(hidden)]
impl FromGlib<ffi::FlatpakQueryFlags> for QueryFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakQueryFlags) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
impl StaticType for QueryFlags {
    #[inline]
    #[doc(alias = "flatpak_query_flags_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_query_flags_get_type()) }
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
impl glib::HasParamSpec for QueryFlags {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
impl glib::value::ValueType for QueryFlags {
    type Type = Self;
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
unsafe impl<'a> glib::value::FromValue<'a> for QueryFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
impl ToValue for QueryFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

#[cfg(feature = "v1_3_3")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_3_3")))]
impl From<QueryFlags> for glib::Value {
    #[inline]
    fn from(v: QueryFlags) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    /// The details for [`operation-error`][struct@crate::Transaction#operation-error].
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakTransactionErrorDetails")]
    pub struct TransactionErrorDetails: u32 {
        /// The operation failure was not fatal
        #[doc(alias = "FLATPAK_TRANSACTION_ERROR_DETAILS_NON_FATAL")]
        const FATAL = ffi::FLATPAK_TRANSACTION_ERROR_DETAILS_NON_FATAL as _;
    }
}

#[doc(hidden)]
impl IntoGlib for TransactionErrorDetails {
    type GlibType = ffi::FlatpakTransactionErrorDetails;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakTransactionErrorDetails {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::FlatpakTransactionErrorDetails> for TransactionErrorDetails {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakTransactionErrorDetails) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for TransactionErrorDetails {
    #[inline]
    #[doc(alias = "flatpak_transaction_error_details_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_transaction_error_details_get_type()) }
    }
}

impl glib::HasParamSpec for TransactionErrorDetails {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

impl glib::value::ValueType for TransactionErrorDetails {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for TransactionErrorDetails {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for TransactionErrorDetails {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<TransactionErrorDetails> for glib::Value {
    #[inline]
    fn from(v: TransactionErrorDetails) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    /// The details for [`operation-done`][struct@crate::Transaction#operation-done].
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakTransactionResult")]
    pub struct TransactionResult: u32 {
        /// The update caused no changes
        #[doc(alias = "FLATPAK_TRANSACTION_RESULT_NO_CHANGE")]
        const CHANGE = ffi::FLATPAK_TRANSACTION_RESULT_NO_CHANGE as _;
    }
}

#[doc(hidden)]
impl IntoGlib for TransactionResult {
    type GlibType = ffi::FlatpakTransactionResult;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakTransactionResult {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::FlatpakTransactionResult> for TransactionResult {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakTransactionResult) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for TransactionResult {
    #[inline]
    #[doc(alias = "flatpak_transaction_result_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_transaction_result_get_type()) }
    }
}

impl glib::HasParamSpec for TransactionResult {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

impl glib::value::ValueType for TransactionResult {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for TransactionResult {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for TransactionResult {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<TransactionResult> for glib::Value {
    #[inline]
    fn from(v: TransactionResult) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    /// Flags to alter the behavior of [`InstallationExtManual::uninstall_full()`][crate::prelude::InstallationExtManual::uninstall_full()].
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakUninstallFlags")]
    pub struct UninstallFlags: u32 {
        /// Default
        #[doc(alias = "FLATPAK_UNINSTALL_FLAGS_NONE")]
        const NONE = ffi::FLATPAK_UNINSTALL_FLAGS_NONE as _;
        /// Don't prune the local OSTree repository after uninstalling
        #[doc(alias = "FLATPAK_UNINSTALL_FLAGS_NO_PRUNE")]
        const NO_PRUNE = ffi::FLATPAK_UNINSTALL_FLAGS_NO_PRUNE as _;
        /// Don't call triggers after uninstalling. If used,
        /// the caller must later call [`InstallationExt::run_triggers()`][crate::prelude::InstallationExt::run_triggers()] to update
        /// the exported file. (Since: 1.0.3)
        #[doc(alias = "FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS")]
        const NO_TRIGGERS = ffi::FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS as _;
    }
}

#[doc(hidden)]
impl IntoGlib for UninstallFlags {
    type GlibType = ffi::FlatpakUninstallFlags;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakUninstallFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::FlatpakUninstallFlags> for UninstallFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakUninstallFlags) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for UninstallFlags {
    #[inline]
    #[doc(alias = "flatpak_uninstall_flags_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_uninstall_flags_get_type()) }
    }
}

impl glib::HasParamSpec for UninstallFlags {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

impl glib::value::ValueType for UninstallFlags {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for UninstallFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for UninstallFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<UninstallFlags> for glib::Value {
    #[inline]
    fn from(v: UninstallFlags) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}

bitflags! {
    /// Flags to alter the behavior of [`InstallationExtManual::update()`][crate::prelude::InstallationExtManual::update()].
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "FlatpakUpdateFlags")]
    pub struct UpdateFlags: u32 {
        /// Fetch remote builds and install the latest one (default)
        #[doc(alias = "FLATPAK_UPDATE_FLAGS_NONE")]
        const NONE = ffi::FLATPAK_UPDATE_FLAGS_NONE as _;
        /// Don't install any new builds that might be fetched
        #[doc(alias = "FLATPAK_UPDATE_FLAGS_NO_DEPLOY")]
        const NO_DEPLOY = ffi::FLATPAK_UPDATE_FLAGS_NO_DEPLOY as _;
        /// Don't try to fetch new builds from the remote repo
        #[doc(alias = "FLATPAK_UPDATE_FLAGS_NO_PULL")]
        const NO_PULL = ffi::FLATPAK_UPDATE_FLAGS_NO_PULL as _;
        /// Don't use static deltas when pulling
        #[doc(alias = "FLATPAK_UPDATE_FLAGS_NO_STATIC_DELTAS")]
        const NO_STATIC_DELTAS = ffi::FLATPAK_UPDATE_FLAGS_NO_STATIC_DELTAS as _;
        /// Don't prune the local OSTree repository after updating (Since: 0.11.8)
        #[doc(alias = "FLATPAK_UPDATE_FLAGS_NO_PRUNE")]
        const NO_PRUNE = ffi::FLATPAK_UPDATE_FLAGS_NO_PRUNE as _;
        /// Don't call triggers after updating. If used,
        /// the caller must later call [`InstallationExt::run_triggers()`][crate::prelude::InstallationExt::run_triggers()] to update
        /// the exported files. (Since: 1.0.3)
        #[doc(alias = "FLATPAK_UPDATE_FLAGS_NO_TRIGGERS")]
        const NO_TRIGGERS = ffi::FLATPAK_UPDATE_FLAGS_NO_TRIGGERS as _;
    }
}

#[doc(hidden)]
impl IntoGlib for UpdateFlags {
    type GlibType = ffi::FlatpakUpdateFlags;

    #[inline]
    fn into_glib(self) -> ffi::FlatpakUpdateFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::FlatpakUpdateFlags> for UpdateFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::FlatpakUpdateFlags) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

impl StaticType for UpdateFlags {
    #[inline]
    #[doc(alias = "flatpak_update_flags_get_type")]
    fn static_type() -> glib::Type {
        unsafe { from_glib(ffi::flatpak_update_flags_get_type()) }
    }
}

impl glib::HasParamSpec for UpdateFlags {
    type ParamSpec = glib::ParamSpecFlags;
    type SetValue = Self;
    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;

    fn param_spec_builder() -> Self::BuilderFn {
        Self::ParamSpec::builder
    }
}

impl glib::value::ValueType for UpdateFlags {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for UpdateFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        skip_assert_initialized!();
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for UpdateFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<UpdateFlags> for glib::Value {
    #[inline]
    fn from(v: UpdateFlags) -> Self {
        skip_assert_initialized!();
        ToValue::to_value(&v)
    }
}