Merge lp:~mterry/deja-dup/no-python2 into lp:deja-dup/34

Proposed by Michael Terry
Status: Merged
Approved by: Michael Terry
Approved revision: 1554
Merged at revision: 1548
Proposed branch: lp:~mterry/deja-dup/no-python2
Merge into: lp:deja-dup/34
Diff against target: 1839 lines (+1538/-44)
9 files modified
CMakeLists.txt (+4/-0)
debian/control (+2/-1)
deja-dup/preferences/CMakeLists.txt (+5/-4)
deja-dup/preferences/Preferences.vala (+117/-22)
deja-dup/preferences/PreferencesPanel.c (+12/-7)
deja-dup/preferences/preferences-main.vala (+5/-7)
deja-dup/widgets/ConfigLabelDescription.vala (+18/-2)
libdeja/AsyncCommand.vala (+4/-1)
vapi/packagekit-glib2.vapi (+1371/-0)
To merge this branch: bzr merge lp:~mterry/deja-dup/no-python2
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli (community) Approve
Ken VanDine Pending
Déjà Dup Developers Pending
Review via email: mp+276875@code.launchpad.net

Description of the change

Use packagekit to install duplicity on the fly if needed, removing any dependency on python2 by deja-dup directly.

To post a comment you must log in.
lp:~mterry/deja-dup/no-python2 updated
1552. By Michael Terry

Add missing function declaration

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey Michael! Some review before some general thoughts :)

Code-wise:
I didn't spot anything horrible here at least. Everything should be working fine. It builds as well and seems to work on my existing install (even removing duplicity).

Tests:
I couldn't get the tests passing on sbuild (wily or xenial). The failing tests are here:
60% tests passed, 37 tests failed out of 93

Total Test time (real) = 82.80 sec

The following tests FAILED:
Errors while running CTest
  48 - permission.test (OTHER_FAULT)
  50 - no-space.test (OTHER_FAULT)
  51 - threshold-full.test (OTHER_FAULT)
  52 - delete-never.test (OTHER_FAULT)
  53 - clean-cache.test (OTHER_FAULT)
  54 - excludes.test (OTHER_FAULT)
  55 - symlink-direct.test (OTHER_FAULT)
  56 - symlink-trickshot.test (OTHER_FAULT)
  57 - stop.test (OTHER_FAULT)
  58 - mkdir.test (OTHER_FAULT)
  59 - disk-small.test (OTHER_FAULT)
  60 - bad-volume.test (OTHER_FAULT)
  61 - symlink-exclude2.test (OTHER_FAULT)
  62 - encrypt-ask.test (OTHER_FAULT)
  63 - threshold-inc.test (OTHER_FAULT)
  64 - instance-error.test (OTHER_FAULT)
  65 - symlink-recursive.test (OTHER_FAULT)
  66 - read-error.test (OTHER_FAULT)
  67 - disk-full.test (OTHER_FAULT)
  68 - symlink-follow2.test (OTHER_FAULT)
  70 - delete-too-old.test (OTHER_FAULT)
  71 - symlink-subdir.test (OTHER_FAULT)
  72 - cancel.test (OTHER_FAULT)
  73 - encrypt-detect.test (OTHER_FAULT)
  75 - bad-hostname.test (OTHER_FAULT)
  76 - delete-just-right.test (OTHER_FAULT)
  77 - special-chars.test (OTHER_FAULT)
  79 - delete-too-few.test (OTHER_FAULT)
  80 - nag.test (OTHER_FAULT)
  83 - disk-full2.test (OTHER_FAULT)
  84 - verify.test (OTHER_FAULT)
  86 - clean-tempdir.test (OTHER_FAULT)
  87 - symlink-exclude.test (OTHER_FAULT)
  88 - symlink-follow.test (OTHER_FAULT)
  89 - cancel-noop.test (OTHER_FAULT)
  91 - symlink-loop.test (OTHER_FAULT)
  92 - clean-incomplete.test (OTHER_FAULT)

In general:
I feel quite uncomfortable about this change claiming "dropping python support" by installing duplicity on the fly (and so, dropping it as a recommend).
First, I guess that duplicity will need to go to universe so that it's not pulled when we build the iso. Does it means that duplicity isn't supported officially anymore?
Secondly (and that's my main point), from the code and my understanding, duplicity is the only supported backend, right? Meaning, deja-dup is useless without it? That means that we will ship useless software by default and anyone who wants to do backups will then have to install duplicity, assuming it's supported by default as it's coming from an application which is supported. I feel this is just ticking up a box "no python2 on the install" where it's lying to ourself: most of users will still have python2 installed if we apply the same semantic to multiple projects. That's the reason I don't feel that this change is fully right.

Of course, if déjà-dup works well without duplicity for other form of backups, I withdraw that comment :)

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

@didier, thanks for looking at this!

re: tests, guh! LP doesn't see the failures and I don't see the failures. I don't know what you and Ken have going on. (timezones? locale? -- I will look for something along those lines that could fail the tests).

Regarding your broader point about this approach:

- Yes, duplicity is the only supported backend.

- We don't plan to demote duplicity, we'll leave it in main. It will still be supported. This is just a step on the path to python3-only-in-main. Eventually we will have to port it. (to keep it off the image, we'll move it to a Suggests for deja-dup -- and let the other derivatives know that they need to seed duplicity if they want to keep shipping it on their own images)

- Landscape is a precedent for shipping a hook for functionality that then installs the rest.

- I wasn't going to be able to commit the time necessary to port duplicity to python3 for 16.04. So it's either this or dropping deja-dup unless a volunteer does it -- patches welcome... ;) And I think keeping a user interaction point to nudge people towards backups is better than dropping it from the image.

- We aren't lying to ourselves so much as iterating and reducing the scope of python2 installs. It's still in main. We're working on that over time. And maybe if duplicity remains python2, we'll eventually drop deja-dup. But for 16.04, we're shooting for the base install not having python2 anymore (which is not nothing -- CVEs & bugs affecting python2 will no longer affect every single Ubuntu user; only some of them).

- Note that this MP itself doesn't actually change anything in Ubuntu. This debian/ packaging is just for the upstream PPA (and doesn't even drop duplicity to a Suggests). Your broader concerns are really about the planned followup MP for the deja-dup packaging that updates to this code and then will drop duplicity to a Suggests for Ubuntu. But talking about them here is fine and good. But maybe shouldn't be a blocker for *this* change.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I'm happy with your answers, even if I still think that brings to "we ditched python2 from the default installed, woooww" at the price of lost functionality that will never be properly fixed. This as well shift the focus on fixing the real issue bringing less pressure to it (and so, will probably never be done) but as you told, it's more a personal opinion than something on this MP itself which is more for upstream déjà-dup.

On the tests, using default sbuild, it shouldn't have any timezone/locale specific issue. I'm building on amd64. Can you reproduce the issue this way?
$ bzr bd -S; cd ..
$ sudo sbuild-launchpad-chroot create -n xenial -s xenial -a amd64
$ sbuild --dist=xenial --arch=amd64 -c xenial deja-dup_0.dsc

(I'm building without -proposed, I can try with it if that's the issue? Note that I tried as well with a wily chroot)

lp:~mterry/deja-dup/no-python2 updated
1553. By Michael Terry

Merge from trunk

Revision history for this message
Michael Terry (mterry) wrote :

@didrocks, fixed the build in sbuild. So I think this branch should be good? (if tests pass for you)

As discussed on IRC, I think you are also reluctantly on board with landing this change + duplicity-as-Suggests in Ubuntu?

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I did another run on xenial or wily sbuild and still got one error that I can reproduce reliably:
      Start 66: read-error.test
66/93 Test #66: read-error.test ..........................***Exception: Other 6.90 sec
/scripts/read-error: DUPLICITY: WARNING 10 '/blarg'

DUPLICITY: WARNING 10 '/sbuild-nonexistent/1'

DUPLICITY: WARNING 10 '/sbuild-nonexistent/2'

** (./test-runner:29958): WARNING **: runner.vala:287: Detail didn't match; expected Could not back up the following files. Please make sure you are able to open them.

/sbuild-nonexistent/1
/sbuild-nonexistent/2, got (null)

      Start 67: disk-full.test

All the other tests are fixed, nice work! Do not hesitate to ask if you want more debug info if you can't reproduce this one.

"Reluctant" is the word ;) for the reasons we discussed on IRC (shifting the focus, claiming that we removed python3 from the CD which isn't really the truth if you want to use all features that we ship by default), but I understand the constraints and anyway, from a pure upstream perspective, the change is fine.

lp:~mterry/deja-dup/no-python2 updated
1554. By Michael Terry

Merge from trunk

Revision history for this message
Michael Terry (mterry) wrote :

Guh, stupid HOME tests. I ctrl+c'd the tests once I saw they were passing. Wanted to save myself a whole minute, but I would have seen this failure if I waited. :)

Fixed now. They all pass for me in sbuild.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Yeah, it's passing now, +1 then :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-11-04 21:35:23 +0000
3+++ CMakeLists.txt 2015-11-25 14:11:44 +0000
4@@ -35,8 +35,12 @@
5 deja_check_modules(GTK REQUIRED gtk+-3.0>=3.6)
6 deja_check_modules(NOTIFY REQUIRED libnotify>=0.7)
7 deja_check_modules(PEAS REQUIRED libpeas-1.0)
8+deja_check_modules(PK REQUIRED packagekit-glib2)
9 deja_check_modules(SECRET REQUIRED libsecret-1)
10
11+# This is obnoxious.
12+set(PK_CFLAGS "${PK_CFLAGS} -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE")
13+
14 deja_enable_option(NAUTILUS libnautilus-extension)
15 if(ENABLE_NAUTILUS)
16 execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=extensiondir libnautilus-extension
17
18=== modified file 'debian/control'
19--- debian/control 2015-11-20 20:08:03 +0000
20+++ debian/control 2015-11-25 14:11:44 +0000
21@@ -13,6 +13,7 @@
22 libgtk-3-dev (>= 3.6),
23 libnautilus-extension-dev (>= 3.0),
24 libnotify-dev (>= 0.7),
25+ libpackagekit-glib2-dev,
26 libpeas-dev,
27 libsecret-1-dev,
28 libunity-control-center-dev,
29@@ -28,9 +29,9 @@
30 Pre-Depends: ${misc:Pre-Depends},
31 Depends: ${misc:Depends},
32 ${shlibs:Depends},
33- duplicity (>= 0.6.23),
34 gnome-icon-theme-symbolic,
35 Recommends: deja-dup-backend-gvfs,
36+ duplicity (>= 0.6.23),
37 policykit-1,
38 Suggests: deja-dup-backend-cloudfiles,
39 deja-dup-backend-s3,
40
41=== modified file 'deja-dup/preferences/CMakeLists.txt'
42--- deja-dup/preferences/CMakeLists.txt 2015-11-04 21:35:23 +0000
43+++ deja-dup/preferences/CMakeLists.txt 2015-11-25 14:11:44 +0000
44@@ -27,24 +27,25 @@
45 CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/libdeja/deja.vapi
46 ${CMAKE_BINARY_DIR}/deja-dup/widgets/widgets.vapi
47 ${CMAKE_SOURCE_DIR}/vapi/config.vapi
48+ ${CMAKE_SOURCE_DIR}/vapi/packagekit-glib2.vapi
49 OPTIONS ${COMMON_VFLAGS})
50 add_executable(deja-dup-preferences ${VALA_C})
51-target_link_libraries(deja-dup-preferences deja widgets ${GTK_LDFLAGS} ${NOTIFY_LDFLAGS} ${PEAS_LDFLAGS} ${SECRET_LDFLAGS})
52+target_link_libraries(deja-dup-preferences deja widgets ${GTK_LDFLAGS} ${NOTIFY_LDFLAGS} ${PEAS_LDFLAGS} ${PK_LDFLAGS} ${SECRET_LDFLAGS})
53 set_target_properties(deja-dup-preferences PROPERTIES
54 INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/libdeja;${CMAKE_BINARY_DIR}/deja-dup/widgets"
55- COMPILE_FLAGS "${GTK_CFLAGS} ${PEAS_CFLAGS} ${SECRET_CFLAGS} ${COMMON_CFLAGS}")
56+ COMPILE_FLAGS "${GTK_CFLAGS} ${PEAS_CFLAGS} ${PK_CFLAGS} ${SECRET_CFLAGS} ${COMMON_CFLAGS}")
57 install(TARGETS deja-dup-preferences DESTINATION bin)
58
59 deja_merge_po(desktop deja-dup-preferences.desktop "${CMAKE_INSTALL_FULL_DATADIR}/applications")
60
61 if(ENABLE_UNITY_CCPANEL)
62 add_library(deja-dup-unity-ccpanel MODULE Preferences.c PreferencesPanel.c)
63-target_link_libraries(deja-dup-unity-ccpanel deja widgets ${UNITY_CCPANEL_LDFLAGS} ${GTK_LDFLAGS} ${PEAS_LDFLAGS} ${SECRET_LDFLAGS})
64+target_link_libraries(deja-dup-unity-ccpanel deja widgets ${UNITY_CCPANEL_LDFLAGS} ${GTK_LDFLAGS} ${PEAS_LDFLAGS} ${PK_LDFLAGS} ${SECRET_LDFLAGS})
65 set_target_properties(deja-dup-unity-ccpanel PROPERTIES
66 OUTPUT_NAME deja-dup
67 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/unity-ccpanel"
68 INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/libdeja;${CMAKE_BINARY_DIR}/deja-dup/widgets"
69- COMPILE_FLAGS "-DUSE_UNITY ${UNITY_CCPANEL_CFLAGS} ${GTK_CFLAGS} ${PEAS_CFLAGS} ${SECRET_CFLAGS} ${COMMON_CFLAGS}")
70+ COMPILE_FLAGS "-DUSE_UNITY ${UNITY_CCPANEL_CFLAGS} ${GTK_CFLAGS} ${PEAS_CFLAGS} ${PK_CFLAGS} ${SECRET_CFLAGS} ${COMMON_CFLAGS}")
71 install(TARGETS deja-dup-unity-ccpanel DESTINATION "${UNITY_CCPANEL_EXTENSIONDIR}")
72
73 deja_merge_po(desktop unity-deja-dup-panel.desktop "${CMAKE_INSTALL_FULL_DATADIR}/applications")
74
75=== modified file 'deja-dup/preferences/Preferences.vala'
76--- deja-dup/preferences/Preferences.vala 2013-10-27 16:41:23 +0000
77+++ deja-dup/preferences/Preferences.vala 2015-11-25 14:11:44 +0000
78@@ -33,17 +33,26 @@
79
80 public class Preferences : Gtk.Grid
81 {
82- public bool show_auto_switch {get; construct;}
83+ public DejaDup.PreferencesPeriodicSwitch auto_switch {get; set; default = null;}
84+ public bool duplicity_installed {get; private set; default = false;}
85
86- Gtk.Widget backup_button;
87- Gtk.Widget restore_button;
88+ DejaDup.ConfigLabelDescription backup_desc;
89+ Gtk.Button backup_button;
90+ Gtk.ProgressBar backup_progress;
91+ DejaDup.ConfigLabelDescription restore_desc;
92+ Gtk.Button restore_button;
93+ Gtk.ProgressBar restore_progress;
94 uint bus_watch_id = 0;
95 static const int PAGE_HMARGIN = 24;
96 static const int PAGE_VMARGIN = 12;
97
98- public Preferences(bool show_auto_switch)
99+ public Preferences(DejaDup.PreferencesPeriodicSwitch? auto_switch)
100 {
101- Object(show_auto_switch: show_auto_switch);
102+ Object(auto_switch: auto_switch);
103+
104+ // Set initial switch sensitivity, but for some odd reason we can't set
105+ // this earlier. Even if at the end of the constructor, it gets reset...
106+ auto_switch.sensitive = duplicity_installed;
107 }
108
109 ~Preferences() {
110@@ -53,6 +62,64 @@
111 }
112 }
113
114+ async void install_duplicity()
115+ {
116+ backup_button.sensitive = false;
117+ restore_button.sensitive = false;
118+
119+ try {
120+ var task = new Pk.Task();
121+ var results = yield task.resolve_async(Pk.Filter.NOT_INSTALLED, {"duplicity"}, null, () => {});
122+ if (results != null && results.get_error_code () == null) {
123+
124+ // Convert from List to array (I don't know why the API couldn't be friendlier...)
125+ var package_array = results.get_package_array();
126+ var package_ids = new string[package_array.length + 1];
127+ package_ids[package_array.length] = null;
128+ for (var i = 0; i < package_array.length; i++) {
129+ package_ids[i] = package_array.data[i].get_id();
130+ }
131+
132+ yield task.install_packages_async(package_ids, null, (p, t) => {
133+ backup_progress.fraction = p.percentage / 100.0;
134+ restore_progress.fraction = p.percentage / 100.0;
135+ });
136+
137+ duplicity_installed = Environment.find_program_in_path("duplicity") != null;
138+ if (duplicity_installed) {
139+ backup_desc.everything_installed = true;
140+ backup_button.label = _("_Back Up Now…");
141+ restore_desc.everything_installed = true;
142+ restore_button.label = _("_Restore…");
143+ auto_switch.sensitive = true;
144+ }
145+ }
146+ }
147+ catch (Error e) {
148+ // We don't want to show authorization errors -- either the user clicked
149+ // cancel or already entered password several times. Don't need to warn them.
150+ // Oddly enough, I couldn't get error matching to work for this. Maybe the
151+ // policykit bindings I copied are incomplete.
152+ if (e.message.contains("org.freedesktop.PolicyKit.Error.NotAuthorized")) {
153+ warning("%s\n", e.message);
154+ } else {
155+ Gtk.MessageDialog dlg = new Gtk.MessageDialog (get_toplevel() as Gtk.Window,
156+ Gtk.DialogFlags.DESTROY_WITH_PARENT | Gtk.DialogFlags.MODAL,
157+ Gtk.MessageType.ERROR,
158+ Gtk.ButtonsType.OK,
159+ "%s", _("Could not install"));
160+ dlg.format_secondary_text("%s", e.message);
161+ dlg.run();
162+ destroy_widget(dlg);
163+ }
164+ }
165+
166+ backup_progress.visible = false;
167+ restore_progress.visible = false;
168+ backup_button.sensitive = true;
169+ restore_button.sensitive = true;
170+ }
171+
172 Gtk.Widget make_settings_page()
173 {
174 var settings_page = new Gtk.Grid();
175@@ -117,24 +184,38 @@
176 w = new DejaDup.ConfigLabelBackupDate(DejaDup.ConfigLabelBackupDate.Kind.LAST);
177 w.halign = Gtk.Align.START;
178 w.valign = Gtk.Align.START;
179- table.attach(w, 1, row, 1, 1);
180+ table.attach(w, 1, row, 2, 1);
181 ++row;
182
183- w = new DejaDup.ConfigLabelDescription(DejaDup.ConfigLabelDescription.Kind.RESTORE);
184+ w = new DejaDup.ConfigLabelDescription(DejaDup.ConfigLabelDescription.Kind.RESTORE, duplicity_installed);
185 w.halign = Gtk.Align.START;
186 w.valign = Gtk.Align.START;
187- table.attach(w, 1, row, 1, 1);
188+ restore_desc = w as DejaDup.ConfigLabelDescription;
189+ table.attach(w, 1, row, 2, 1);
190 ++row;
191
192- w = new Gtk.Button.with_mnemonic(_("_Restore…"));
193+ w = new Gtk.Button.with_mnemonic(duplicity_installed ? _("_Restore…") : _("_Install…"));
194 w.margin_top = 6;
195 w.halign = Gtk.Align.START;
196+ w.expand = false;
197 (w as Gtk.Button).clicked.connect((b) => {
198- run_deja_dup("--restore", b.get_display().get_app_launch_context());
199+ if (duplicity_installed) {
200+ run_deja_dup("--restore", b.get_display().get_app_launch_context());
201+ } else {
202+ restore_progress.visible = true;
203+ install_duplicity.begin();
204+ }
205 });
206- restore_button = w;
207+ restore_button = w as Gtk.Button;
208 label_sizes.add_widget(w);
209 table.attach(w, 1, row, 1, 1);
210+ w = new Gtk.ProgressBar();
211+ w.halign = Gtk.Align.START;
212+ w.valign = Gtk.Align.CENTER;
213+ w.hexpand = true;
214+ w.no_show_all = true;
215+ restore_progress = w as Gtk.ProgressBar;
216+ table.attach(w, 2, row, 1, 1);
217 ++row;
218
219 w = new Gtk.Grid(); // spacer
220@@ -149,24 +230,38 @@
221 w = new DejaDup.ConfigLabelBackupDate(DejaDup.ConfigLabelBackupDate.Kind.NEXT);
222 w.halign = Gtk.Align.START;
223 w.valign = Gtk.Align.START;
224- table.attach(w, 1, row, 1, 1);
225+ table.attach(w, 1, row, 2, 1);
226 ++row;
227
228- w = new DejaDup.ConfigLabelDescription(DejaDup.ConfigLabelDescription.Kind.BACKUP);
229+ w = new DejaDup.ConfigLabelDescription(DejaDup.ConfigLabelDescription.Kind.BACKUP, duplicity_installed);
230 w.halign = Gtk.Align.START;
231 w.valign = Gtk.Align.START;
232- table.attach(w, 1, row, 1, 1);
233+ backup_desc = w as DejaDup.ConfigLabelDescription;
234+ table.attach(w, 1, row, 2, 1);
235 ++row;
236
237- w = new Gtk.Button.with_mnemonic(_("_Back Up Now…"));
238+ w = new Gtk.Button.with_mnemonic(duplicity_installed ? _("_Back Up Now…") : _("Install…"));
239 w.margin_top = 6;
240 w.halign = Gtk.Align.START;
241+ w.expand = false;
242 (w as Gtk.Button).clicked.connect((b) => {
243- run_deja_dup("--backup", b.get_display().get_app_launch_context());
244+ if (duplicity_installed) {
245+ run_deja_dup("--backup", b.get_display().get_app_launch_context());
246+ } else {
247+ backup_progress.visible = true;
248+ install_duplicity.begin();
249+ }
250 });
251- backup_button = w;
252+ backup_button = w as Gtk.Button;
253 label_sizes.add_widget(w);
254 table.attach(w, 1, row, 1, 1);
255+ w = new Gtk.ProgressBar();
256+ w.halign = Gtk.Align.START;
257+ w.valign = Gtk.Align.CENTER;
258+ w.hexpand = true;
259+ w.no_show_all = true;
260+ backup_progress = w as Gtk.ProgressBar;
261+ table.attach(w, 2, row, 1, 1);
262 ++row;
263
264 bus_watch_id = Bus.watch_name(BusType.SESSION, "org.gnome.DejaDup.Operation",
265@@ -247,13 +342,12 @@
266 table.halign = Gtk.Align.CENTER;
267 row = 0;
268
269- if (show_auto_switch) {
270+ if (auto_switch == null) {
271 var align = new Gtk.Alignment(0.0f, 0.5f, 0.0f, 0.0f);
272- var @switch = new Gtk.Switch();
273- settings.bind(DejaDup.PERIODIC_KEY, @switch, "active", SettingsBindFlags.DEFAULT);
274- align.add(@switch);
275+ auto_switch = new DejaDup.PreferencesPeriodicSwitch();
276+ align.add(auto_switch);
277 label = new Gtk.Label.with_mnemonic(_("_Automatic backup"));
278- label.mnemonic_widget = @switch;
279+ label.mnemonic_widget = auto_switch;
280 label.xalign = 1.0f;
281 table.attach(label, 0, row, 1, 1);
282 table.attach(align, 1, row, 1, 1);
283@@ -318,6 +412,7 @@
284 }
285
286 construct {
287+ duplicity_installed = Environment.find_program_in_path("duplicity") != null;
288 add(make_settings_page());
289 set_size_request(-1, 400);
290 }
291
292=== modified file 'deja-dup/preferences/PreferencesPanel.c'
293--- deja-dup/preferences/PreferencesPanel.c 2015-11-04 21:35:23 +0000
294+++ deja-dup/preferences/PreferencesPanel.c 2015-11-25 14:11:44 +0000
295@@ -25,16 +25,16 @@
296 #include <libunity-control-center/cc-panel.h>
297 #include "widgets.h"
298
299-extern void* deja_dup_preferences_new (gboolean show_auto_switch);
300-
301 #define DEJA_DUP_TYPE_PREFERENCES_PANEL deja_dup_preferences_panel_get_type()
302
303 typedef struct _DejaDupPreferencesPanel DejaDupPreferencesPanel;
304 typedef struct _DejaDupPreferencesPanelClass DejaDupPreferencesPanelClass;
305+typedef struct _DejaDupPreferencesPeriodicSwitch DejaDupPreferencesPeriodicSwitch;
306
307 struct _DejaDupPreferencesPanel
308 {
309 CcPanel parent;
310+ DejaDupPreferencesPeriodicSwitch *auto_switch;
311 };
312
313 struct _DejaDupPreferencesPanelClass
314@@ -44,6 +44,9 @@
315
316 G_DEFINE_DYNAMIC_TYPE (DejaDupPreferencesPanel, deja_dup_preferences_panel, CC_TYPE_PANEL)
317
318+extern void* deja_dup_preferences_new (DejaDupPreferencesPeriodicSwitch *auto_switch);
319+extern DejaDupPreferencesPeriodicSwitch* deja_dup_preferences_periodic_switch_new (void);
320+
321 static void
322 deja_dup_preferences_panel_class_finalize (DejaDupPreferencesPanelClass *klass)
323 {
324@@ -53,13 +56,11 @@
325 deja_dup_preferences_panel_constructed (GObject *object)
326 {
327 CcPanel *panel = CC_PANEL (object);
328+ DejaDupPreferencesPanel *self = (DejaDupPreferencesPanel*)object;
329
330 G_OBJECT_CLASS (deja_dup_preferences_panel_parent_class)->constructed (object);
331
332- GtkWidget *switcher = GTK_WIDGET (deja_dup_preferences_periodic_switch_new ());
333- gtk_widget_set_valign (switcher, GTK_ALIGN_CENTER);
334- gtk_widget_show_all (switcher);
335- cc_shell_embed_widget_in_header (cc_panel_get_shell (panel), switcher);
336+ cc_shell_embed_widget_in_header (cc_panel_get_shell (panel), GTK_WIDGET (self->auto_switch));
337 }
338
339 static const char *
340@@ -81,7 +82,11 @@
341 static void
342 deja_dup_preferences_panel_init (DejaDupPreferencesPanel *self)
343 {
344- GtkWidget *widget = GTK_WIDGET (deja_dup_preferences_new (FALSE));
345+ self->auto_switch = deja_dup_preferences_periodic_switch_new ();
346+ gtk_widget_set_valign (GTK_WIDGET (self->auto_switch), GTK_ALIGN_CENTER);
347+ gtk_widget_show_all (GTK_WIDGET (self->auto_switch));
348+
349+ GtkWidget *widget = GTK_WIDGET (deja_dup_preferences_new (self->auto_switch));
350 gtk_container_set_border_width (GTK_CONTAINER (widget), 6); // g-c-c adds 6
351 gtk_widget_show_all (widget);
352 gtk_container_add (GTK_CONTAINER (self), widget);
353
354=== modified file 'deja-dup/preferences/preferences-main.vala'
355--- deja-dup/preferences/preferences-main.vala 2013-10-16 05:34:37 +0000
356+++ deja-dup/preferences/preferences-main.vala 2015-11-25 14:11:44 +0000
357@@ -36,26 +36,24 @@
358 list.data.present_with_time(Gtk.get_current_event_time());
359 else {
360 // We're first instance. Yay!
361- bool show_auto_switch = true;
362
363 var dlg = new Gtk.ApplicationWindow(this);
364 // Translators: "Backups" is a noun
365 dlg.title = _("Backups");
366 dlg.resizable = false;
367
368+ DejaDup.PreferencesPeriodicSwitch auto_switch = null;
369 #if HAVE_GTK_3_10
370- show_auto_switch = false;
371-
372 var header = new Gtk.HeaderBar();
373 header.show_close_button = true;
374 dlg.set_titlebar(header);
375
376- var switcher = new DejaDup.PreferencesPeriodicSwitch();
377- switcher.valign = Gtk.Align.CENTER;
378- header.pack_end(switcher);
379+ auto_switch = new DejaDup.PreferencesPeriodicSwitch();
380+ auto_switch.valign = Gtk.Align.CENTER;
381+ header.pack_end(auto_switch);
382 #endif
383
384- var prefs = new DejaDup.Preferences(show_auto_switch);
385+ var prefs = new DejaDup.Preferences(auto_switch);
386 prefs.border_width = 12;
387 dlg.add(prefs);
388 dlg.set_application(this);
389
390=== modified file 'deja-dup/widgets/ConfigLabelDescription.vala'
391--- deja-dup/widgets/ConfigLabelDescription.vala 2014-01-10 23:06:26 +0000
392+++ deja-dup/widgets/ConfigLabelDescription.vala 2015-11-25 14:11:44 +0000
393@@ -25,10 +25,11 @@
394 {
395 public enum Kind {BACKUP, RESTORE}
396 public Kind kind {get; construct;}
397+ public bool everything_installed {get; set;}
398
399- public ConfigLabelDescription(Kind kind)
400+ public ConfigLabelDescription(Kind kind, bool everything_installed)
401 {
402- Object(kind: kind);
403+ Object(kind: kind, everything_installed: everything_installed);
404 }
405
406 construct {
407@@ -37,6 +38,9 @@
408 watch_key(DejaDup.PERIODIC_KEY);
409 watch_key(DejaDup.PERIODIC_PERIOD_KEY);
410 }
411+ notify["everything-installed"].connect((s, p) => {
412+ set_from_config.begin();
413+ });
414 }
415
416 protected override void fill_box()
417@@ -51,6 +55,12 @@
418
419 void set_from_config_restore()
420 {
421+ if (!everything_installed) {
422+ var button_name = "<b>%s</b>".printf(_("Install…"));
423+ label.label = _("You can restore existing backups after you first install some necessary software by clicking the %s button.").printf(button_name);
424+ return;
425+ }
426+
427 var val = DejaDup.last_run_date(DejaDup.TimestampType.BACKUP);
428
429 // This here encodes a lot of outside GUI information in this widget,
430@@ -67,6 +77,12 @@
431
432 void set_from_config_backup()
433 {
434+ if (!everything_installed) {
435+ var button_name = "<b>%s</b>".printf(_("Install…"));
436+ label.label = _("You can create a backup after you first install some necessary software by clicking the %s button.").printf(button_name);
437+ return;
438+ }
439+
440 var next = DejaDup.next_run_date();
441 if (next == null) {
442 var button_name = "<b>%s</b>".printf(_("Back Up Now…"));
443
444=== modified file 'libdeja/AsyncCommand.vala'
445--- libdeja/AsyncCommand.vala 2011-06-28 15:48:17 +0000
446+++ libdeja/AsyncCommand.vala 2015-11-25 14:11:44 +0000
447@@ -53,12 +53,15 @@
448 SpawnFlags.STDERR_TO_DEV_NULL |
449 SpawnFlags.DO_NOT_REAP_CHILD |
450 SpawnFlags.SEARCH_PATH,
451- null, out pid))
452+ null, out pid)) {
453 done(false);
454+ return;
455+ }
456 }
457 catch (Error e) {
458 warning("%s\n", e.message);
459 done(false);
460+ return;
461 }
462
463 watch = ChildWatch.add(pid, handle_done);
464
465=== added file 'vapi/packagekit-glib2.vapi'
466--- vapi/packagekit-glib2.vapi 1970-01-01 00:00:00 +0000
467+++ vapi/packagekit-glib2.vapi 2015-11-25 14:11:44 +0000
468@@ -0,0 +1,1371 @@
469+/* packagekit-glib2.vapi generated by vapigen-0.28, do not modify. */
470+
471+[CCode (cprefix = "Pk", gir_namespace = "PackageKitGlib", gir_version = "1.0", lower_case_cprefix = "pk_")]
472+namespace Pk {
473+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_category_get_type ()")]
474+ public class Category : Pk.Source {
475+ [CCode (has_construct_function = false)]
476+ public Category ();
477+ public unowned string get_icon ();
478+ public unowned string get_id ();
479+ public unowned string get_name ();
480+ public unowned string get_parent_id ();
481+ public unowned string get_summary ();
482+ public void set_icon (string icon);
483+ public void set_id (string cat_id);
484+ public void set_name (string name);
485+ public void set_parent_id (string parent_id);
486+ public void set_summary (string summary);
487+ [NoAccessorMethod]
488+ public string cat_id { owned get; set; }
489+ public string icon { get; set; }
490+ public string name { get; set; }
491+ public string parent_id { get; set; }
492+ public string summary { get; set; }
493+ }
494+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_client_get_type ()")]
495+ public class Client : GLib.Object {
496+ [CCode (has_construct_function = false)]
497+ public Client ();
498+ public Pk.Results accept_eula (string eula_id, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
499+ [CCode (finish_name = "pk_client_generic_finish")]
500+ public async Pk.Results accept_eula_async (string eula_id, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
501+ public Pk.Results adopt (string transaction_id, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
502+ [CCode (finish_name = "pk_client_generic_finish")]
503+ public async Pk.Results adopt_async (string transaction_id, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
504+ [NoWrapper]
505+ public virtual void changed ();
506+ public Pk.Results depends_on (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
507+ [CCode (finish_name = "pk_client_generic_finish")]
508+ public async Pk.Results depends_on_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
509+ public Pk.Results download_packages ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, string directory, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
510+ [CCode (finish_name = "pk_client_generic_finish")]
511+ public async Pk.Results download_packages_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, string directory, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
512+ public bool get_background ();
513+ public uint get_cache_age ();
514+ public Pk.Results get_categories (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
515+ [CCode (finish_name = "pk_client_generic_finish")]
516+ public async Pk.Results get_categories_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
517+ public Pk.Results get_details ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
518+ [CCode (finish_name = "pk_client_generic_finish")]
519+ public async Pk.Results get_details_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
520+ public Pk.Results get_details_local ([CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
521+ [CCode (finish_name = "pk_client_generic_finish")]
522+ public async Pk.Results get_details_local_async ([CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
523+ public Pk.Results get_distro_upgrades (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
524+ [CCode (finish_name = "pk_client_generic_finish")]
525+ public async Pk.Results get_distro_upgrades_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
526+ public Pk.Results get_files ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
527+ [CCode (finish_name = "pk_client_generic_finish")]
528+ public async Pk.Results get_files_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
529+ public Pk.Results get_files_local ([CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
530+ [CCode (finish_name = "pk_client_generic_finish")]
531+ public async Pk.Results get_files_local_async ([CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
532+ public bool get_idle ();
533+ public bool get_interactive ();
534+ public unowned string get_locale ();
535+ public Pk.Results get_old_transactions (uint number, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
536+ [CCode (finish_name = "pk_client_generic_finish")]
537+ public async Pk.Results get_old_transactions_async (uint number, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
538+ public Pk.Results get_packages (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
539+ [CCode (finish_name = "pk_client_generic_finish")]
540+ public async Pk.Results get_packages_async (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
541+ public Pk.Progress get_progress (string transaction_id, GLib.Cancellable? cancellable = null) throws GLib.Error;
542+ public async Pk.Progress get_progress_async (string transaction_id, GLib.Cancellable? cancellable) throws GLib.Error;
543+ public Pk.Results get_repo_list (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
544+ [CCode (finish_name = "pk_client_generic_finish")]
545+ public async Pk.Results get_repo_list_async (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
546+ public Pk.Results get_update_detail ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
547+ [CCode (finish_name = "pk_client_generic_finish")]
548+ public async Pk.Results get_update_detail_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
549+ public Pk.Results get_updates (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
550+ [CCode (finish_name = "pk_client_generic_finish")]
551+ public async Pk.Results get_updates_async (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
552+ public Pk.Results install_files (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
553+ [CCode (finish_name = "pk_client_generic_finish")]
554+ public async Pk.Results install_files_async (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
555+ public Pk.Results install_packages (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
556+ [CCode (finish_name = "pk_client_generic_finish")]
557+ public async Pk.Results install_packages_async (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
558+ public Pk.Results install_signature (Pk.SigType type, string key_id, string package_id, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
559+ [CCode (finish_name = "pk_client_generic_finish")]
560+ public async Pk.Results install_signature_async (Pk.SigType type, string key_id, string package_id, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
561+ public Pk.Results refresh_cache (bool force, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
562+ [CCode (finish_name = "pk_client_generic_finish")]
563+ public async Pk.Results refresh_cache_async (bool force, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
564+ public Pk.Results remove_packages (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool allow_deps, bool autoremove, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
565+ [CCode (finish_name = "pk_client_generic_finish")]
566+ public async Pk.Results remove_packages_async (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool allow_deps, bool autoremove, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
567+ public Pk.Results repair_system (Pk.Bitfield transaction_flags, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
568+ [CCode (finish_name = "pk_client_generic_finish")]
569+ public async Pk.Results repair_system_async (Pk.Bitfield transaction_flags, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
570+ public Pk.Results repo_enable (string repo_id, bool enabled, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
571+ [CCode (finish_name = "pk_client_generic_finish")]
572+ public async Pk.Results repo_enable_async (string repo_id, bool enabled, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
573+ public Pk.Results repo_remove (Pk.Bitfield transaction_flags, string repo_id, bool autoremove, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
574+ [CCode (finish_name = "pk_client_generic_finish")]
575+ public async Pk.Results repo_remove_async (Pk.Bitfield transaction_flags, string repo_id, bool autoremove, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
576+ public Pk.Results repo_set_data (string repo_id, string parameter, string value, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
577+ [CCode (finish_name = "pk_client_generic_finish")]
578+ public async Pk.Results repo_set_data_async (string repo_id, string parameter, string value, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
579+ public Pk.Results required_by (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
580+ [CCode (finish_name = "pk_client_generic_finish")]
581+ public async Pk.Results required_by_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
582+ public Pk.Results resolve (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] packages, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
583+ [CCode (finish_name = "pk_client_generic_finish")]
584+ public async Pk.Results resolve_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] packages, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
585+ public Pk.Results search_details (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
586+ [CCode (finish_name = "pk_client_generic_finish")]
587+ public async Pk.Results search_details_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
588+ public Pk.Results search_files (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
589+ [CCode (finish_name = "pk_client_generic_finish")]
590+ public async Pk.Results search_files_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
591+ public Pk.Results search_groups (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
592+ [CCode (finish_name = "pk_client_generic_finish")]
593+ public async Pk.Results search_groups_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
594+ public Pk.Results search_names (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
595+ [CCode (finish_name = "pk_client_generic_finish")]
596+ public async Pk.Results search_names_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
597+ public void set_background (bool background);
598+ public void set_cache_age (uint cache_age);
599+ public void set_interactive (bool interactive);
600+ public void set_locale (string locale);
601+ public static void test (void* user_data);
602+ public Pk.Results update_packages (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
603+ [CCode (finish_name = "pk_client_generic_finish")]
604+ public async Pk.Results update_packages_async (Pk.Bitfield transaction_flags, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
605+ public Pk.Results what_provides (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
606+ [CCode (finish_name = "pk_client_generic_finish")]
607+ public async Pk.Results what_provides_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
608+ public bool background { get; set; }
609+ public uint cache_age { get; set; }
610+ public bool idle { get; }
611+ public bool interactive { get; set; }
612+ public string locale { get; set; }
613+ }
614+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_client_helper_get_type ()")]
615+ public class ClientHelper : GLib.Object {
616+ [CCode (has_construct_function = false)]
617+ public ClientHelper ();
618+ public bool start (string socket_filename, string argv, string envp) throws GLib.Error;
619+ public bool stop () throws GLib.Error;
620+ }
621+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_control_get_type ()")]
622+ public class Control : GLib.Object {
623+ [CCode (has_construct_function = false)]
624+ public Control ();
625+ public async Pk.Authorize can_authorize_async (string action_id, GLib.Cancellable? cancellable) throws GLib.Error;
626+ [NoWrapper]
627+ public virtual void connection_changed (bool connected);
628+ public async string get_daemon_state_async (GLib.Cancellable? cancellable) throws GLib.Error;
629+ public bool get_properties (GLib.Cancellable? cancellable = null) throws GLib.Error;
630+ public async bool get_properties_async (GLib.Cancellable? cancellable) throws GLib.Error;
631+ public async string get_tid_async (GLib.Cancellable? cancellable) throws GLib.Error;
632+ public async uint get_time_since_action_async (Pk.Role role, GLib.Cancellable? cancellable) throws GLib.Error;
633+ [CCode (array_length = false, array_null_terminated = true)]
634+ public string[] get_transaction_list (GLib.Cancellable? cancellable = null) throws GLib.Error;
635+ [CCode (array_length = false, array_null_terminated = true)]
636+ public async string[] get_transaction_list_async (GLib.Cancellable? cancellable) throws GLib.Error;
637+ [NoWrapper]
638+ public virtual void network_state_changed ();
639+ public bool set_proxy (string proxy_http, string proxy_ftp, GLib.Cancellable? cancellable = null) throws GLib.Error;
640+ public bool set_proxy2 (string proxy_http, string proxy_https, string proxy_ftp, string proxy_socks, string no_proxy, string pac, GLib.Cancellable? cancellable = null) throws GLib.Error;
641+ public async void set_proxy2_async (string proxy_http, string proxy_https, string proxy_ftp, string proxy_socks, string no_proxy, string pac, GLib.Cancellable? cancellable);
642+ public async bool set_proxy_async (string proxy_http, string proxy_ftp, GLib.Cancellable? cancellable) throws GLib.Error;
643+ public bool suggest_daemon_quit (GLib.Cancellable? cancellable = null) throws GLib.Error;
644+ public async bool suggest_daemon_quit_async (GLib.Cancellable? cancellable) throws GLib.Error;
645+ public static void test (void* user_data);
646+ [NoAccessorMethod]
647+ public string backend_author { owned get; set; }
648+ [NoAccessorMethod]
649+ public string backend_description { owned get; set; }
650+ [NoAccessorMethod]
651+ public string backend_name { owned get; set; }
652+ [NoAccessorMethod]
653+ public bool connected { get; set; }
654+ [NoAccessorMethod]
655+ public string distro_id { owned get; set; }
656+ [NoAccessorMethod]
657+ public uint64 filters { get; set; }
658+ [NoAccessorMethod]
659+ public uint64 groups { get; set; }
660+ [NoAccessorMethod]
661+ public virtual bool locked { get; set; }
662+ [CCode (array_length = false, array_null_terminated = true)]
663+ [NoAccessorMethod]
664+ public string[] mime_types { owned get; set; }
665+ [NoAccessorMethod]
666+ public Pk.Network network_state { get; set; }
667+ [NoAccessorMethod]
668+ public uint64 provides { get; set; }
669+ [NoAccessorMethod]
670+ public uint64 roles { get; set; }
671+ [NoAccessorMethod]
672+ public uint version_major { get; }
673+ [NoAccessorMethod]
674+ public uint version_micro { get; }
675+ [NoAccessorMethod]
676+ public uint version_minor { get; }
677+ public virtual signal void repo_list_changed ();
678+ public virtual signal void restart_schedule ();
679+ public virtual signal void transaction_list_changed ([CCode (array_length = false, array_null_terminated = true)] string[] transaction_ids);
680+ public virtual signal void updates_changed ();
681+ }
682+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_desktop_get_type ()")]
683+ public class Desktop : GLib.Object {
684+ [CCode (has_construct_function = false)]
685+ public Desktop ();
686+ public GLib.GenericArray<weak string> get_files_for_package (string package) throws GLib.Error;
687+ public string get_package_for_file (string filename) throws GLib.Error;
688+ public GLib.GenericArray<weak string> get_shown_for_package (string package) throws GLib.Error;
689+ public bool open_database () throws GLib.Error;
690+ public static void test (void* user_data);
691+ }
692+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_details_get_type ()")]
693+ public class Details : Pk.Source {
694+ [CCode (has_construct_function = false)]
695+ public Details ();
696+ public unowned string get_description ();
697+ public Pk.Group get_group ();
698+ public unowned string get_license ();
699+ public unowned string get_package_id ();
700+ public uint64 get_size ();
701+ public unowned string get_summary ();
702+ public unowned string get_url ();
703+ [NoAccessorMethod]
704+ public string description { owned get; set; }
705+ [NoAccessorMethod]
706+ public Pk.Group group { get; set; }
707+ [NoAccessorMethod]
708+ public string license { owned get; set; }
709+ [NoAccessorMethod]
710+ public string package_id { owned get; set; }
711+ [NoAccessorMethod]
712+ public uint64 size { get; set; }
713+ [NoAccessorMethod]
714+ public string summary { owned get; set; }
715+ [NoAccessorMethod]
716+ public string url { owned get; set; }
717+ }
718+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_distro_upgrade_get_type ()")]
719+ public class DistroUpgrade : Pk.Source {
720+ [CCode (has_construct_function = false)]
721+ public DistroUpgrade ();
722+ public unowned string get_id ();
723+ public Pk.DistroUpgradeEnum get_state ();
724+ public unowned string get_summary ();
725+ [NoAccessorMethod]
726+ public string name { owned get; set; }
727+ [NoAccessorMethod]
728+ public Pk.DistroUpgradeEnum state { get; set; }
729+ [NoAccessorMethod]
730+ public string summary { owned get; set; }
731+ }
732+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_error_get_type ()")]
733+ public class Error : Pk.Source {
734+ [CCode (has_construct_function = false)]
735+ public Error ();
736+ public Pk.ErrorEnum get_code ();
737+ public unowned string get_details ();
738+ [NoAccessorMethod]
739+ public Pk.ErrorEnum code { get; set; }
740+ [NoAccessorMethod]
741+ public string details { owned get; set; }
742+ }
743+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_eula_required_get_type ()")]
744+ public class EulaRequired : Pk.Source {
745+ [CCode (has_construct_function = false)]
746+ public EulaRequired ();
747+ [NoAccessorMethod]
748+ public string eula_id { owned get; set; }
749+ [NoAccessorMethod]
750+ public string license_agreement { owned get; set; }
751+ [NoAccessorMethod]
752+ public string package_id { owned get; set; }
753+ [NoAccessorMethod]
754+ public string vendor_name { owned get; set; }
755+ }
756+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_files_get_type ()")]
757+ public class Files : Pk.Source {
758+ [CCode (has_construct_function = false)]
759+ public Files ();
760+ [CCode (array_length = false, array_null_terminated = true)]
761+ public unowned string[] get_files ();
762+ public unowned string get_package_id ();
763+ [CCode (array_length = false, array_null_terminated = true)]
764+ [NoAccessorMethod]
765+ public string[] files { owned get; set; }
766+ [NoAccessorMethod]
767+ public string package_id { owned get; set; }
768+ }
769+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_item_progress_get_type ()")]
770+ public class ItemProgress : Pk.Source {
771+ [CCode (has_construct_function = false)]
772+ public ItemProgress ();
773+ public unowned string get_package_id ();
774+ public uint get_percentage ();
775+ public Pk.Status get_status ();
776+ [NoAccessorMethod]
777+ public string package_id { owned get; set; }
778+ [NoAccessorMethod]
779+ public uint percentage { get; set; }
780+ [NoAccessorMethod]
781+ public uint status { get; set; }
782+ }
783+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_media_change_required_get_type ()")]
784+ public class MediaChangeRequired : Pk.Source {
785+ [CCode (has_construct_function = false)]
786+ public MediaChangeRequired ();
787+ [NoAccessorMethod]
788+ public string media_id { owned get; set; }
789+ [NoAccessorMethod]
790+ public string media_text { owned get; set; }
791+ [NoAccessorMethod]
792+ public Pk.MediaType media_type { get; set; }
793+ }
794+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_package_get_type ()")]
795+ public class Package : Pk.Source {
796+ [CCode (has_construct_function = false)]
797+ public Package ();
798+ public bool equal (Pk.Package package2);
799+ public bool equal_id (Pk.Package package2);
800+ public unowned string get_arch ();
801+ public unowned string get_data ();
802+ public unowned string get_id ();
803+ public Pk.Info get_info ();
804+ public unowned string get_name ();
805+ public unowned string get_summary ();
806+ public unowned string get_version ();
807+ public static string id_build (string name, string version, string arch, string data);
808+ public static bool id_check (string package_id);
809+ public static bool id_equal_fuzzy_arch (string package_id1, string package_id2);
810+ [CCode (array_length = false, array_null_terminated = true)]
811+ public static string[] id_split (string package_id);
812+ public static void id_test (void* user_data);
813+ public static string id_to_printable (string package_id);
814+ [CCode (array_length = false, array_null_terminated = true)]
815+ public static string[] ids_add_id (string package_ids, string package_id);
816+ [CCode (array_length = false, array_null_terminated = true)]
817+ public static string[] ids_add_ids (string package_ids, string package_ids_new);
818+ public static bool ids_check (string package_ids);
819+ [CCode (array_length = false, array_null_terminated = true)]
820+ public static string[] ids_from_id (string package_id);
821+ [CCode (array_length = false, array_null_terminated = true)]
822+ public static string[] ids_from_string (string package_id);
823+ public static bool ids_present_id (string package_ids, string package_id);
824+ [CCode (array_length = false, array_null_terminated = true)]
825+ public static string[] ids_remove_id (string package_ids, string package_id);
826+ public static void ids_test (void* user_data);
827+ public static string ids_to_string (string package_ids);
828+ public bool parse (string data) throws GLib.Error;
829+ public void print ();
830+ public bool set_id (string package_id) throws GLib.Error;
831+ public void set_info (Pk.Info info);
832+ public void set_summary (string summary);
833+ public static void test (void* user_data);
834+ [NoAccessorMethod]
835+ public string description { owned get; set; }
836+ [NoAccessorMethod]
837+ public Pk.Group group { get; set; }
838+ public Pk.Info info { get; set; }
839+ [NoAccessorMethod]
840+ public string license { owned get; set; }
841+ [NoAccessorMethod]
842+ public string package_id { owned get; }
843+ [NoAccessorMethod]
844+ public uint64 size { get; set; }
845+ public string summary { get; set; }
846+ [CCode (array_length = false, array_null_terminated = true)]
847+ [NoAccessorMethod]
848+ public string[] update_bugzilla_urls { owned get; set; }
849+ [NoAccessorMethod]
850+ public string update_changelog { owned get; set; }
851+ [CCode (array_length = false, array_null_terminated = true)]
852+ [NoAccessorMethod]
853+ public string[] update_cve_urls { owned get; set; }
854+ [NoAccessorMethod]
855+ public string update_issued { owned get; set; }
856+ [NoAccessorMethod]
857+ public string update_obsoletes { owned get; set; }
858+ [NoAccessorMethod]
859+ public Pk.Restart update_restart { get; set; }
860+ [NoAccessorMethod]
861+ public Pk.UpdateState update_state { get; set; }
862+ [NoAccessorMethod]
863+ public string update_text { owned get; set; }
864+ [NoAccessorMethod]
865+ public string update_updated { owned get; set; }
866+ [NoAccessorMethod]
867+ public string update_updates { owned get; set; }
868+ [CCode (array_length = false, array_null_terminated = true)]
869+ [NoAccessorMethod]
870+ public string[] update_vendor_urls { owned get; set; }
871+ [NoAccessorMethod]
872+ public string url { owned get; set; }
873+ public virtual signal void changed ();
874+ }
875+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_package_sack_get_type ()")]
876+ public class PackageSack : GLib.Object {
877+ [CCode (has_construct_function = false)]
878+ public PackageSack ();
879+ public bool add_package (Pk.Package package);
880+ public bool add_package_by_id (string package_id) throws GLib.Error;
881+ public bool add_packages_from_file (GLib.File file) throws GLib.Error;
882+ [NoWrapper]
883+ public virtual void changed ();
884+ public void clear ();
885+ public Pk.PackageSack filter (Pk.PackageSackFilterFunc filter_cb);
886+ public Pk.PackageSack filter_by_info (Pk.Info info);
887+ public Pk.Package find_by_id (string package_id);
888+ public Pk.Package find_by_id_name_arch (string package_id);
889+ public GLib.GenericArray<weak Pk.Package> get_array ();
890+ public bool get_details (GLib.Cancellable? cancellable = null) throws GLib.Error;
891+ [CCode (finish_name = "pk_package_sack_merge_generic_finish")]
892+ public async bool get_details_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
893+ [CCode (array_length = false, array_null_terminated = true)]
894+ public string[] get_ids ();
895+ public uint get_size ();
896+ public uint64 get_total_bytes ();
897+ public bool get_update_detail (GLib.Cancellable? cancellable = null) throws GLib.Error;
898+ [CCode (finish_name = "pk_package_sack_merge_generic_finish")]
899+ public async bool get_update_detail_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
900+ public bool remove_by_filter (Pk.PackageSackFilterFunc filter_cb);
901+ public bool remove_package (Pk.Package package);
902+ public bool remove_package_by_id (string package_id);
903+ public bool resolve (GLib.Cancellable? cancellable = null) throws GLib.Error;
904+ [CCode (finish_name = "pk_package_sack_merge_generic_finish")]
905+ public async bool resolve_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
906+ public void sort (Pk.PackageSackSortType type);
907+ public static void test (void* user_data);
908+ public bool to_file (GLib.File file) throws GLib.Error;
909+ }
910+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
911+ [Compact]
912+ public class PackageSackResults {
913+ }
914+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_progress_get_type ()")]
915+ public class Progress : GLib.Object {
916+ [CCode (has_construct_function = false)]
917+ public Progress ();
918+ public bool set_allow_cancel (bool allow_cancel);
919+ public bool set_caller_active (bool caller_active);
920+ public bool set_download_size_remaining (uint64 download_size_remaining);
921+ public bool set_elapsed_time (uint elapsed_time);
922+ public bool set_item_progress (Pk.ItemProgress item_progress);
923+ public bool set_package (Pk.Package package);
924+ public bool set_package_id (string package_id);
925+ public bool set_percentage (int percentage);
926+ public bool set_remaining_time (uint remaining_time);
927+ public bool set_role (Pk.Role role);
928+ public bool set_speed (uint speed);
929+ public bool set_status (Pk.Status status);
930+ public bool set_transaction_flags (uint64 transaction_flags);
931+ public bool set_transaction_id (string package_id);
932+ public bool set_uid (uint uid);
933+ public static void test (void* user_data);
934+ [NoAccessorMethod]
935+ public bool allow_cancel { get; set; }
936+ [NoAccessorMethod]
937+ public bool caller_active { get; set; }
938+ [NoAccessorMethod]
939+ public uint download_size_remaining { get; set; }
940+ [NoAccessorMethod]
941+ public uint elapsed_time { get; set; }
942+ [NoAccessorMethod]
943+ public Pk.ItemProgress item_progress { owned get; set; }
944+ [NoAccessorMethod]
945+ public Pk.Package package { owned get; set; }
946+ [NoAccessorMethod]
947+ public string package_id { owned get; set; }
948+ [NoAccessorMethod]
949+ public int percentage { get; set; }
950+ [NoAccessorMethod]
951+ public uint remaining_time { get; set; }
952+ [NoAccessorMethod]
953+ public uint role { get; set; }
954+ [NoAccessorMethod]
955+ public uint speed { get; set; }
956+ [NoAccessorMethod]
957+ public uint status { get; set; }
958+ [NoAccessorMethod]
959+ public uint64 transaction_flags { get; set; }
960+ [NoAccessorMethod]
961+ public string transaction_id { owned get; set; }
962+ [NoAccessorMethod]
963+ public uint uid { get; set; }
964+ }
965+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_repo_detail_get_type ()")]
966+ public class RepoDetail : Pk.Source {
967+ [CCode (has_construct_function = false)]
968+ public RepoDetail ();
969+ public unowned string get_description ();
970+ public bool get_enabled ();
971+ public unowned string get_id ();
972+ [NoAccessorMethod]
973+ public string description { owned get; set; }
974+ [NoAccessorMethod]
975+ public bool enabled { get; set; }
976+ [NoAccessorMethod]
977+ public string repo_id { owned get; set; }
978+ }
979+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_repo_signature_required_get_type ()")]
980+ public class RepoSignatureRequired : Pk.Source {
981+ [CCode (has_construct_function = false)]
982+ public RepoSignatureRequired ();
983+ [NoAccessorMethod]
984+ public string key_fingerprint { owned get; set; }
985+ [NoAccessorMethod]
986+ public string key_id { owned get; set; }
987+ [NoAccessorMethod]
988+ public string key_timestamp { owned get; set; }
989+ [NoAccessorMethod]
990+ public string key_url { owned get; set; }
991+ [NoAccessorMethod]
992+ public string key_userid { owned get; set; }
993+ [NoAccessorMethod]
994+ public string package_id { owned get; set; }
995+ [NoAccessorMethod]
996+ public string repository_name { owned get; set; }
997+ [NoAccessorMethod]
998+ public Pk.SigType type { get; set; }
999+ }
1000+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_require_restart_get_type ()")]
1001+ public class RequireRestart : Pk.Source {
1002+ [CCode (has_construct_function = false)]
1003+ public RequireRestart ();
1004+ [NoAccessorMethod]
1005+ public string package_id { owned get; set; }
1006+ [NoAccessorMethod]
1007+ public Pk.Restart restart { get; set; }
1008+ }
1009+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_results_get_type ()")]
1010+ public class Results : GLib.Object {
1011+ [CCode (has_construct_function = false)]
1012+ public Results ();
1013+ public bool add_category (Pk.Category item);
1014+ public bool add_details (Pk.Details item);
1015+ public bool add_distro_upgrade (Pk.DistroUpgrade item);
1016+ public bool add_eula_required (Pk.EulaRequired item);
1017+ public bool add_files (Pk.Files item);
1018+ public bool add_media_change_required (Pk.MediaChangeRequired item);
1019+ public bool add_package (Pk.Package item);
1020+ public bool add_repo_detail (Pk.RepoDetail item);
1021+ public bool add_repo_signature_required (Pk.RepoSignatureRequired item);
1022+ public bool add_require_restart (Pk.RequireRestart item);
1023+ public bool add_transaction (Pk.TransactionPast item);
1024+ public bool add_update_detail (Pk.UpdateDetail item);
1025+ public GLib.GenericArray<weak Pk.Category> get_category_array ();
1026+ public GLib.GenericArray<weak Pk.Details> get_details_array ();
1027+ public GLib.GenericArray<weak Pk.DistroUpgrade> get_distro_upgrade_array ();
1028+ public Pk.Error get_error_code ();
1029+ public GLib.GenericArray<weak Pk.EulaRequired> get_eula_required_array ();
1030+ public Pk.Exit get_exit_code ();
1031+ public GLib.GenericArray<weak Pk.Files> get_files_array ();
1032+ public GLib.GenericArray<weak Pk.MediaChangeRequired> get_media_change_required_array ();
1033+ public GLib.GenericArray<weak Pk.Package> get_package_array ();
1034+ public Pk.PackageSack get_package_sack ();
1035+ public GLib.GenericArray<weak Pk.RepoDetail> get_repo_detail_array ();
1036+ public GLib.GenericArray<weak Pk.RepoSignatureRequired> get_repo_signature_required_array ();
1037+ public GLib.GenericArray<weak Pk.RequireRestart> get_require_restart_array ();
1038+ public Pk.Restart get_require_restart_worst ();
1039+ public Pk.Role get_role ();
1040+ public GLib.GenericArray<weak Pk.TransactionPast> get_transaction_array ();
1041+ public Pk.Bitfield get_transaction_flags ();
1042+ public GLib.GenericArray<weak Pk.UpdateDetail> get_update_detail_array ();
1043+ public bool set_error_code (Pk.Error item);
1044+ public bool set_exit_code (Pk.Exit exit_enum);
1045+ public static void test (void* user_data);
1046+ [NoAccessorMethod]
1047+ public uint inputs { get; set; }
1048+ [NoAccessorMethod]
1049+ public Pk.Progress progress { owned get; set; }
1050+ [NoAccessorMethod]
1051+ public Pk.Role role { get; set; }
1052+ [NoAccessorMethod]
1053+ public uint64 transaction_flags { get; set; }
1054+ }
1055+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_source_get_type ()")]
1056+ public class Source : GLib.Object {
1057+ [CCode (has_construct_function = false)]
1058+ public Source ();
1059+ [NoAccessorMethod]
1060+ public Pk.Role role { get; set; }
1061+ [NoAccessorMethod]
1062+ public string transaction_id { owned get; set; }
1063+ }
1064+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_task_get_type ()")]
1065+ public class Task : Pk.Client {
1066+ [CCode (has_construct_function = false)]
1067+ public Task ();
1068+ [CCode (finish_name = "pk_task_generic_finish")]
1069+ public async Pk.Results depends_on_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1070+ public Pk.Results depends_on_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1071+ [CCode (finish_name = "pk_task_generic_finish")]
1072+ public async Pk.Results download_packages_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, string directory, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1073+ public Pk.Results download_packages_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, string directory, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1074+ [NoWrapper]
1075+ public virtual void eula_question (uint request, Pk.Results results);
1076+ public bool get_allow_downgrade ();
1077+ public bool get_allow_reinstall ();
1078+ [CCode (finish_name = "pk_task_generic_finish")]
1079+ public async Pk.Results get_categories_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1080+ public Pk.Results get_categories_sync (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1081+ [CCode (finish_name = "pk_task_generic_finish")]
1082+ public async Pk.Results get_details_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1083+ public Pk.Results get_details_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1084+ [CCode (finish_name = "pk_task_generic_finish")]
1085+ public async Pk.Results get_files_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1086+ public Pk.Results get_files_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1087+ public bool get_interactive ();
1088+ public bool get_only_download ();
1089+ public bool get_only_trusted ();
1090+ [CCode (finish_name = "pk_task_generic_finish")]
1091+ public async Pk.Results get_packages_async (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1092+ public Pk.Results get_packages_sync (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1093+ [CCode (finish_name = "pk_task_generic_finish")]
1094+ public async Pk.Results get_repo_list_async (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1095+ public Pk.Results get_repo_list_sync (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1096+ public bool get_simulate ();
1097+ [CCode (finish_name = "pk_task_generic_finish")]
1098+ public async Pk.Results get_update_detail_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1099+ public Pk.Results get_update_detail_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1100+ [CCode (finish_name = "pk_task_generic_finish")]
1101+ public async Pk.Results get_updates_async (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1102+ public Pk.Results get_updates_sync (Pk.Bitfield filters, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1103+ [CCode (finish_name = "pk_task_generic_finish")]
1104+ public async Pk.Results install_files_async ([CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1105+ public Pk.Results install_files_sync ([CCode (array_length = false, array_null_terminated = true)] string[] files, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1106+ [CCode (finish_name = "pk_task_generic_finish")]
1107+ public async Pk.Results install_packages_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1108+ public Pk.Results install_packages_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1109+ [NoWrapper]
1110+ public virtual void key_question (uint request, Pk.Results results);
1111+ [NoWrapper]
1112+ public virtual void media_change_question (uint request, Pk.Results results);
1113+ [CCode (finish_name = "pk_task_generic_finish")]
1114+ public async Pk.Results refresh_cache_async (bool force, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1115+ public Pk.Results refresh_cache_sync (bool force, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1116+ [CCode (finish_name = "pk_task_generic_finish")]
1117+ public async Pk.Results remove_packages_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool allow_deps, bool autoremove, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1118+ public Pk.Results remove_packages_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool allow_deps, bool autoremove, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1119+ [NoWrapper]
1120+ public virtual void repair_question (uint request, Pk.Results results);
1121+ [CCode (finish_name = "pk_task_generic_finish")]
1122+ public async Pk.Results repair_system_async (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1123+ public Pk.Results repair_system_sync (GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1124+ [CCode (finish_name = "pk_task_generic_finish")]
1125+ public async Pk.Results repo_enable_async (string repo_id, bool enabled, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1126+ public Pk.Results repo_enable_sync (string repo_id, bool enabled, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1127+ [CCode (finish_name = "pk_task_generic_finish")]
1128+ public async Pk.Results required_by_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1129+ public Pk.Results required_by_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] package_ids, bool recursive, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1130+ [CCode (finish_name = "pk_task_generic_finish")]
1131+ public async Pk.Results resolve_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] packages, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1132+ public Pk.Results resolve_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] packages, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1133+ [CCode (finish_name = "pk_task_generic_finish")]
1134+ public async Pk.Results search_details_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1135+ public Pk.Results search_details_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1136+ [CCode (finish_name = "pk_task_generic_finish")]
1137+ public async Pk.Results search_files_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1138+ public Pk.Results search_files_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1139+ [CCode (finish_name = "pk_task_generic_finish")]
1140+ public async Pk.Results search_groups_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1141+ public Pk.Results search_groups_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1142+ [CCode (finish_name = "pk_task_generic_finish")]
1143+ public async Pk.Results search_names_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1144+ public Pk.Results search_names_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1145+ public void set_allow_downgrade (bool allow_downgrade);
1146+ public void set_allow_reinstall (bool allow_reinstall);
1147+ public void set_interactive (bool interactive);
1148+ public void set_only_download (bool only_download);
1149+ public void set_only_trusted (bool only_trusted);
1150+ public void set_simulate (bool simulate);
1151+ [NoWrapper]
1152+ public virtual void simulate_question (uint request, Pk.Results results);
1153+ public static void test (void* user_data);
1154+ [NoWrapper]
1155+ public virtual void untrusted_question (uint request, Pk.Results results);
1156+ [CCode (finish_name = "pk_task_generic_finish")]
1157+ public async Pk.Results update_packages_async ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1158+ public Pk.Results update_packages_sync ([CCode (array_length = false, array_null_terminated = true)] string[] package_ids, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1159+ public bool user_accepted (uint request);
1160+ public bool user_declined (uint request);
1161+ [CCode (finish_name = "pk_task_generic_finish")]
1162+ public async Pk.Results what_provides_async (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1163+ public Pk.Results what_provides_sync (Pk.Bitfield filters, [CCode (array_length = false, array_null_terminated = true)] string[] values, GLib.Cancellable? cancellable, Pk.ProgressCallback progress_callback) throws GLib.Error;
1164+ public bool allow_downgrade { get; set; }
1165+ public bool allow_reinstall { get; set; }
1166+ public bool only_download { get; set; }
1167+ public bool only_trusted { get; set; }
1168+ public bool simulate { get; set; }
1169+ }
1170+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_transaction_list_get_type ()")]
1171+ public class TransactionList : GLib.Object {
1172+ [CCode (has_construct_function = false)]
1173+ public TransactionList ();
1174+ [CCode (array_length = false, array_null_terminated = true)]
1175+ public string[] get_ids ();
1176+ public static void test (void* user_data);
1177+ public virtual signal void added (string tid);
1178+ public virtual signal void removed (string tid);
1179+ }
1180+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_transaction_past_get_type ()")]
1181+ public class TransactionPast : Pk.Source {
1182+ [CCode (has_construct_function = false)]
1183+ public TransactionPast ();
1184+ public unowned string get_cmdline ();
1185+ public unowned string get_data ();
1186+ public GLib.DateTime get_datetime ();
1187+ public uint get_duration ();
1188+ public unowned string get_id ();
1189+ public Pk.Role get_role ();
1190+ public bool get_succeeded ();
1191+ public unowned string get_timespec ();
1192+ public int64 get_timestamp ();
1193+ public uint get_uid ();
1194+ [NoAccessorMethod]
1195+ public string cmdline { owned get; set; }
1196+ [NoAccessorMethod]
1197+ public string data { owned get; set; }
1198+ [NoAccessorMethod]
1199+ public uint duration { get; set; }
1200+ [NoAccessorMethod]
1201+ public Pk.Role role { get; set; }
1202+ [NoAccessorMethod]
1203+ public bool succeeded { get; set; }
1204+ [NoAccessorMethod]
1205+ public string tid { owned get; set; }
1206+ [NoAccessorMethod]
1207+ public string timespec { owned get; set; }
1208+ [NoAccessorMethod]
1209+ public uint uid { get; set; }
1210+ }
1211+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", type_id = "pk_update_detail_get_type ()")]
1212+ public class UpdateDetail : Pk.Source {
1213+ [CCode (has_construct_function = false)]
1214+ public UpdateDetail ();
1215+ [CCode (array_length = false, array_null_terminated = true)]
1216+ public unowned string[] get_bugzilla_urls ();
1217+ public unowned string get_changelog ();
1218+ [CCode (array_length = false, array_null_terminated = true)]
1219+ public unowned string[] get_cve_urls ();
1220+ public unowned string get_issued ();
1221+ [CCode (array_length = false, array_null_terminated = true)]
1222+ public unowned string[] get_obsoletes ();
1223+ public unowned string get_package_id ();
1224+ public Pk.Restart get_restart ();
1225+ public Pk.UpdateState get_state ();
1226+ public unowned string get_update_text ();
1227+ public unowned string get_updated ();
1228+ [CCode (array_length = false, array_null_terminated = true)]
1229+ public unowned string[] get_updates ();
1230+ [CCode (array_length = false, array_null_terminated = true)]
1231+ public unowned string[] get_vendor_urls ();
1232+ [CCode (array_length = false, array_null_terminated = true)]
1233+ [NoAccessorMethod]
1234+ public string[] bugzilla_urls { owned get; set; }
1235+ [NoAccessorMethod]
1236+ public string changelog { owned get; set; }
1237+ [CCode (array_length = false, array_null_terminated = true)]
1238+ [NoAccessorMethod]
1239+ public string[] cve_urls { owned get; set; }
1240+ [NoAccessorMethod]
1241+ public string issued { owned get; set; }
1242+ [CCode (array_length = false, array_null_terminated = true)]
1243+ [NoAccessorMethod]
1244+ public string[] obsoletes { owned get; set; }
1245+ [NoAccessorMethod]
1246+ public string package_id { owned get; set; }
1247+ [NoAccessorMethod]
1248+ public Pk.Restart restart { get; set; }
1249+ [NoAccessorMethod]
1250+ public Pk.UpdateState state { get; set; }
1251+ [NoAccessorMethod]
1252+ public string update_text { owned get; set; }
1253+ [NoAccessorMethod]
1254+ public string updated { owned get; set; }
1255+ [CCode (array_length = false, array_null_terminated = true)]
1256+ [NoAccessorMethod]
1257+ public string[] updates { owned get; set; }
1258+ [CCode (array_length = false, array_null_terminated = true)]
1259+ [NoAccessorMethod]
1260+ public string[] vendor_urls { owned get; set; }
1261+ }
1262+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1263+ [SimpleType]
1264+ public struct Bitfield : uint64 {
1265+ public static void test (void* user_data);
1266+ }
1267+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", has_type_id = false)]
1268+ public struct EnumMatch {
1269+ public uint value;
1270+ public weak global::string string;
1271+ }
1272+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkAuthorizeEnum", cprefix = "PK_AUTHORIZE_ENUM_", type_id = "pk_authorize_enum_get_type ()")]
1273+ [GIR (name = "AuthorizeEnum")]
1274+ public enum Authorize {
1275+ UNKNOWN,
1276+ YES,
1277+ NO,
1278+ INTERACTIVE,
1279+ LAST;
1280+ public static Pk.Authorize type_enum_from_string (string authorize_type);
1281+ public static unowned string type_enum_to_string (Pk.Authorize authorize_type);
1282+ }
1283+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_DISTRO_UPGRADE_ENUM_", type_id = "pk_distro_upgrade_enum_get_type ()")]
1284+ public enum DistroUpgradeEnum {
1285+ UNKNOWN,
1286+ STABLE,
1287+ UNSTABLE,
1288+ LAST;
1289+ public static Pk.DistroUpgradeEnum from_string (string upgrade);
1290+ public static unowned string to_string (Pk.DistroUpgradeEnum upgrade);
1291+ }
1292+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_ERROR_ENUM_", type_id = "pk_error_enum_get_type ()")]
1293+ public enum ErrorEnum {
1294+ UNKNOWN,
1295+ OOM,
1296+ NO_NETWORK,
1297+ NOT_SUPPORTED,
1298+ INTERNAL_ERROR,
1299+ GPG_FAILURE,
1300+ PACKAGE_ID_INVALID,
1301+ PACKAGE_NOT_INSTALLED,
1302+ PACKAGE_NOT_FOUND,
1303+ PACKAGE_ALREADY_INSTALLED,
1304+ PACKAGE_DOWNLOAD_FAILED,
1305+ GROUP_NOT_FOUND,
1306+ GROUP_LIST_INVALID,
1307+ DEP_RESOLUTION_FAILED,
1308+ FILTER_INVALID,
1309+ CREATE_THREAD_FAILED,
1310+ TRANSACTION_ERROR,
1311+ TRANSACTION_CANCELLED,
1312+ NO_CACHE,
1313+ REPO_NOT_FOUND,
1314+ CANNOT_REMOVE_SYSTEM_PACKAGE,
1315+ PROCESS_KILL,
1316+ FAILED_INITIALIZATION,
1317+ FAILED_FINALISE,
1318+ FAILED_CONFIG_PARSING,
1319+ CANNOT_CANCEL,
1320+ CANNOT_GET_LOCK,
1321+ NO_PACKAGES_TO_UPDATE,
1322+ CANNOT_WRITE_REPO_CONFIG,
1323+ LOCAL_INSTALL_FAILED,
1324+ BAD_GPG_SIGNATURE,
1325+ MISSING_GPG_SIGNATURE,
1326+ CANNOT_INSTALL_SOURCE_PACKAGE,
1327+ REPO_CONFIGURATION_ERROR,
1328+ NO_LICENSE_AGREEMENT,
1329+ FILE_CONFLICTS,
1330+ PACKAGE_CONFLICTS,
1331+ REPO_NOT_AVAILABLE,
1332+ INVALID_PACKAGE_FILE,
1333+ PACKAGE_INSTALL_BLOCKED,
1334+ PACKAGE_CORRUPT,
1335+ ALL_PACKAGES_ALREADY_INSTALLED,
1336+ FILE_NOT_FOUND,
1337+ NO_MORE_MIRRORS_TO_TRY,
1338+ NO_DISTRO_UPGRADE_DATA,
1339+ INCOMPATIBLE_ARCHITECTURE,
1340+ NO_SPACE_ON_DEVICE,
1341+ MEDIA_CHANGE_REQUIRED,
1342+ NOT_AUTHORIZED,
1343+ UPDATE_NOT_FOUND,
1344+ CANNOT_INSTALL_REPO_UNSIGNED,
1345+ CANNOT_UPDATE_REPO_UNSIGNED,
1346+ CANNOT_GET_FILELIST,
1347+ CANNOT_GET_REQUIRES,
1348+ CANNOT_DISABLE_REPOSITORY,
1349+ RESTRICTED_DOWNLOAD,
1350+ PACKAGE_FAILED_TO_CONFIGURE,
1351+ PACKAGE_FAILED_TO_BUILD,
1352+ PACKAGE_FAILED_TO_INSTALL,
1353+ PACKAGE_FAILED_TO_REMOVE,
1354+ UPDATE_FAILED_DUE_TO_RUNNING_PROCESS,
1355+ PACKAGE_DATABASE_CHANGED,
1356+ PROVIDE_TYPE_NOT_SUPPORTED,
1357+ INSTALL_ROOT_INVALID,
1358+ CANNOT_FETCH_SOURCES,
1359+ CANCELLED_PRIORITY,
1360+ UNFINISHED_TRANSACTION,
1361+ LOCK_REQUIRED,
1362+ LAST;
1363+ public static Pk.ErrorEnum from_string (string code);
1364+ public static unowned string to_string (Pk.ErrorEnum code);
1365+ }
1366+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkExitEnum", cprefix = "PK_EXIT_ENUM_", type_id = "pk_exit_enum_get_type ()")]
1367+ [GIR (name = "ExitEnum")]
1368+ public enum Exit {
1369+ UNKNOWN,
1370+ SUCCESS,
1371+ FAILED,
1372+ CANCELLED,
1373+ KEY_REQUIRED,
1374+ EULA_REQUIRED,
1375+ KILLED,
1376+ MEDIA_CHANGE_REQUIRED,
1377+ NEED_UNTRUSTED,
1378+ CANCELLED_PRIORITY,
1379+ SKIP_TRANSACTION,
1380+ REPAIR_REQUIRED,
1381+ LAST;
1382+ public static Pk.Exit enum_from_string (string exit);
1383+ public static unowned string enum_to_string (Pk.Exit exit);
1384+ }
1385+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkFilterEnum", cprefix = "PK_FILTER_ENUM_", type_id = "pk_filter_enum_get_type ()")]
1386+ [GIR (name = "FilterEnum")]
1387+ public enum Filter {
1388+ UNKNOWN,
1389+ NONE,
1390+ INSTALLED,
1391+ NOT_INSTALLED,
1392+ DEVELOPMENT,
1393+ NOT_DEVELOPMENT,
1394+ GUI,
1395+ NOT_GUI,
1396+ FREE,
1397+ NOT_FREE,
1398+ VISIBLE,
1399+ NOT_VISIBLE,
1400+ SUPPORTED,
1401+ NOT_SUPPORTED,
1402+ BASENAME,
1403+ NOT_BASENAME,
1404+ NEWEST,
1405+ NOT_NEWEST,
1406+ ARCH,
1407+ NOT_ARCH,
1408+ SOURCE,
1409+ NOT_SOURCE,
1410+ COLLECTIONS,
1411+ NOT_COLLECTIONS,
1412+ APPLICATION,
1413+ NOT_APPLICATION,
1414+ DOWNLOADED,
1415+ NOT_DOWNLOADED,
1416+ LAST;
1417+ public static Pk.Bitfield bitfield_from_string (string filters);
1418+ public static string bitfield_to_string (Pk.Bitfield filters);
1419+ public static Pk.Filter enum_from_string (string filter);
1420+ public static unowned string enum_to_string (Pk.Filter filter);
1421+ }
1422+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkGroupEnum", cprefix = "PK_GROUP_ENUM_", type_id = "pk_group_enum_get_type ()")]
1423+ [GIR (name = "GroupEnum")]
1424+ public enum Group {
1425+ UNKNOWN,
1426+ ACCESSIBILITY,
1427+ ACCESSORIES,
1428+ ADMIN_TOOLS,
1429+ COMMUNICATION,
1430+ DESKTOP_GNOME,
1431+ DESKTOP_KDE,
1432+ DESKTOP_OTHER,
1433+ DESKTOP_XFCE,
1434+ EDUCATION,
1435+ FONTS,
1436+ GAMES,
1437+ GRAPHICS,
1438+ INTERNET,
1439+ LEGACY,
1440+ LOCALIZATION,
1441+ MAPS,
1442+ MULTIMEDIA,
1443+ NETWORK,
1444+ OFFICE,
1445+ OTHER,
1446+ POWER_MANAGEMENT,
1447+ PROGRAMMING,
1448+ PUBLISHING,
1449+ REPOS,
1450+ SECURITY,
1451+ SERVERS,
1452+ SYSTEM,
1453+ VIRTUALIZATION,
1454+ SCIENCE,
1455+ DOCUMENTATION,
1456+ ELECTRONICS,
1457+ COLLECTIONS,
1458+ VENDOR,
1459+ NEWEST,
1460+ LAST;
1461+ public static Pk.Bitfield bitfield_from_string (string groups);
1462+ public static string bitfield_to_string (Pk.Bitfield groups);
1463+ public static Pk.Group enum_from_string (string group);
1464+ public static unowned string enum_to_string (Pk.Group group);
1465+ }
1466+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkInfoEnum", cprefix = "PK_INFO_ENUM_", type_id = "pk_info_enum_get_type ()")]
1467+ [GIR (name = "InfoEnum")]
1468+ public enum Info {
1469+ UNKNOWN,
1470+ INSTALLED,
1471+ AVAILABLE,
1472+ LOW,
1473+ ENHANCEMENT,
1474+ NORMAL,
1475+ BUGFIX,
1476+ IMPORTANT,
1477+ SECURITY,
1478+ BLOCKED,
1479+ DOWNLOADING,
1480+ UPDATING,
1481+ INSTALLING,
1482+ REMOVING,
1483+ CLEANUP,
1484+ OBSOLETING,
1485+ COLLECTION_INSTALLED,
1486+ COLLECTION_AVAILABLE,
1487+ FINISHED,
1488+ REINSTALLING,
1489+ DOWNGRADING,
1490+ PREPARING,
1491+ DECOMPRESSING,
1492+ UNTRUSTED,
1493+ TRUSTED,
1494+ UNAVAILABLE,
1495+ LAST;
1496+ public static Pk.Info enum_from_string (string info);
1497+ public static unowned string enum_to_localised_past (Pk.Info info);
1498+ public static unowned string enum_to_localised_present (Pk.Info info);
1499+ public static unowned string enum_to_string (Pk.Info info);
1500+ }
1501+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkMediaTypeEnum", cprefix = "PK_MEDIA_TYPE_ENUM_", type_id = "pk_media_type_enum_get_type ()")]
1502+ [GIR (name = "MediaTypeEnum")]
1503+ public enum MediaType {
1504+ UNKNOWN,
1505+ CD,
1506+ DVD,
1507+ DISC,
1508+ LAST;
1509+ public static Pk.MediaType enum_from_string (string media_type);
1510+ public static unowned string enum_to_string (Pk.MediaType media_type);
1511+ }
1512+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkNetworkEnum", cprefix = "PK_NETWORK_ENUM_", type_id = "pk_network_enum_get_type ()")]
1513+ [GIR (name = "NetworkEnum")]
1514+ public enum Network {
1515+ UNKNOWN,
1516+ OFFLINE,
1517+ ONLINE,
1518+ WIRED,
1519+ WIFI,
1520+ MOBILE,
1521+ LAST;
1522+ public static Pk.Network enum_from_string (string network);
1523+ public static unowned string enum_to_string (Pk.Network network);
1524+ }
1525+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_OFFLINE_ACTION_", type_id = "pk_offline_action_get_type ()")]
1526+ public enum OfflineAction {
1527+ UNKNOWN,
1528+ REBOOT,
1529+ POWER_OFF,
1530+ UNSET,
1531+ LAST;
1532+ public static Pk.OfflineAction from_string (string action);
1533+ public static unowned string to_string (Pk.OfflineAction action);
1534+ }
1535+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_PACKAGE_SACK_SORT_TYPE_", type_id = "pk_package_sack_sort_type_get_type ()")]
1536+ public enum PackageSackSortType {
1537+ NAME,
1538+ INFO,
1539+ PACKAGE_ID,
1540+ SUMMARY,
1541+ LAST
1542+ }
1543+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_PROGRESS_TYPE_", type_id = "pk_progress_type_get_type ()")]
1544+ public enum ProgressType {
1545+ PACKAGE_ID,
1546+ TRANSACTION_ID,
1547+ PERCENTAGE,
1548+ ALLOW_CANCEL,
1549+ STATUS,
1550+ ROLE,
1551+ CALLER_ACTIVE,
1552+ ELAPSED_TIME,
1553+ REMAINING_TIME,
1554+ SPEED,
1555+ DOWNLOAD_SIZE_REMAINING,
1556+ UID,
1557+ PACKAGE,
1558+ ITEM_PROGRESS,
1559+ TRANSACTION_FLAGS,
1560+ INVALID
1561+ }
1562+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkRestartEnum", cprefix = "PK_RESTART_ENUM_", type_id = "pk_restart_enum_get_type ()")]
1563+ [GIR (name = "RestartEnum")]
1564+ public enum Restart {
1565+ UNKNOWN,
1566+ NONE,
1567+ APPLICATION,
1568+ SESSION,
1569+ SYSTEM,
1570+ SECURITY_SESSION,
1571+ SECURITY_SYSTEM,
1572+ LAST;
1573+ public static Pk.Restart enum_from_string (string restart);
1574+ public static unowned string enum_to_string (Pk.Restart restart);
1575+ }
1576+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkRoleEnum", cprefix = "PK_ROLE_ENUM_", type_id = "pk_role_enum_get_type ()")]
1577+ [GIR (name = "RoleEnum")]
1578+ public enum Role {
1579+ UNKNOWN,
1580+ CANCEL,
1581+ DEPENDS_ON,
1582+ GET_DETAILS,
1583+ GET_FILES,
1584+ GET_PACKAGES,
1585+ GET_REPO_LIST,
1586+ REQUIRED_BY,
1587+ GET_UPDATE_DETAIL,
1588+ GET_UPDATES,
1589+ INSTALL_FILES,
1590+ INSTALL_PACKAGES,
1591+ INSTALL_SIGNATURE,
1592+ REFRESH_CACHE,
1593+ REMOVE_PACKAGES,
1594+ REPO_ENABLE,
1595+ REPO_SET_DATA,
1596+ RESOLVE,
1597+ SEARCH_DETAILS,
1598+ SEARCH_FILE,
1599+ SEARCH_GROUP,
1600+ SEARCH_NAME,
1601+ UPDATE_PACKAGES,
1602+ WHAT_PROVIDES,
1603+ ACCEPT_EULA,
1604+ DOWNLOAD_PACKAGES,
1605+ GET_DISTRO_UPGRADES,
1606+ GET_CATEGORIES,
1607+ GET_OLD_TRANSACTIONS,
1608+ REPAIR_SYSTEM,
1609+ GET_DETAILS_LOCAL,
1610+ GET_FILES_LOCAL,
1611+ REPO_REMOVE,
1612+ LAST;
1613+ public static Pk.Bitfield bitfield_from_string (string roles);
1614+ public static string bitfield_to_string (Pk.Bitfield roles);
1615+ public static Pk.Role enum_from_string (string role);
1616+ public static unowned string enum_to_localised_present (Pk.Role role);
1617+ public static unowned string enum_to_string (Pk.Role role);
1618+ }
1619+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkSigTypeEnum", cprefix = "PK_SIGTYPE_ENUM_", type_id = "pk_sig_type_enum_get_type ()")]
1620+ [GIR (name = "SigTypeEnum")]
1621+ public enum SigType {
1622+ UNKNOWN,
1623+ GPG,
1624+ LAST;
1625+ public static Pk.SigType enum_from_string (string sig_type);
1626+ public static unowned string enum_to_string (Pk.SigType sig_type);
1627+ }
1628+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkStatusEnum", cprefix = "PK_STATUS_ENUM_", type_id = "pk_status_enum_get_type ()")]
1629+ [GIR (name = "StatusEnum")]
1630+ public enum Status {
1631+ UNKNOWN,
1632+ WAIT,
1633+ SETUP,
1634+ RUNNING,
1635+ QUERY,
1636+ INFO,
1637+ REMOVE,
1638+ REFRESH_CACHE,
1639+ DOWNLOAD,
1640+ INSTALL,
1641+ UPDATE,
1642+ CLEANUP,
1643+ OBSOLETE,
1644+ DEP_RESOLVE,
1645+ SIG_CHECK,
1646+ TEST_COMMIT,
1647+ COMMIT,
1648+ REQUEST,
1649+ FINISHED,
1650+ CANCEL,
1651+ DOWNLOAD_REPOSITORY,
1652+ DOWNLOAD_PACKAGELIST,
1653+ DOWNLOAD_FILELIST,
1654+ DOWNLOAD_CHANGELOG,
1655+ DOWNLOAD_GROUP,
1656+ DOWNLOAD_UPDATEINFO,
1657+ REPACKAGING,
1658+ LOADING_CACHE,
1659+ SCAN_APPLICATIONS,
1660+ GENERATE_PACKAGE_LIST,
1661+ WAITING_FOR_LOCK,
1662+ WAITING_FOR_AUTH,
1663+ SCAN_PROCESS_LIST,
1664+ CHECK_EXECUTABLE_FILES,
1665+ CHECK_LIBRARIES,
1666+ COPY_FILES,
1667+ LAST;
1668+ public static Pk.Status enum_from_string (string status);
1669+ public static unowned string enum_to_localised_text (Pk.Status status);
1670+ public static unowned string enum_to_string (Pk.Status status);
1671+ }
1672+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkTransactionFlagEnum", cprefix = "PK_TRANSACTION_FLAG_ENUM_", type_id = "pk_transaction_flag_enum_get_type ()")]
1673+ [GIR (name = "TransactionFlagEnum")]
1674+ public enum TransactionFlag {
1675+ NONE,
1676+ ONLY_TRUSTED,
1677+ SIMULATE,
1678+ ONLY_DOWNLOAD,
1679+ ALLOW_REINSTALL,
1680+ JUST_REINSTALL,
1681+ ALLOW_DOWNGRADE,
1682+ LAST;
1683+ public static Pk.Bitfield bitfield_from_string (string transaction_flags);
1684+ public static string bitfield_to_string (Pk.Bitfield transaction_flags);
1685+ public static Pk.TransactionFlag enum_from_string (string transaction_flag);
1686+ public static unowned string enum_to_string (Pk.TransactionFlag transaction_flag);
1687+ }
1688+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkUpdateStateEnum", cprefix = "PK_UPDATE_STATE_ENUM_", type_id = "pk_update_state_enum_get_type ()")]
1689+ [GIR (name = "UpdateStateEnum")]
1690+ public enum UpdateState {
1691+ UNKNOWN,
1692+ STABLE,
1693+ UNSTABLE,
1694+ TESTING,
1695+ LAST;
1696+ public static Pk.UpdateState enum_from_string (string update_state);
1697+ public static unowned string enum_to_string (Pk.UpdateState update_state);
1698+ }
1699+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PkUpgradeKindEnum", cprefix = "PK_UPGRADE_KIND_ENUM_", type_id = "pk_upgrade_kind_enum_get_type ()")]
1700+ [GIR (name = "UpgradeKindEnum")]
1701+ public enum UpgradeKind {
1702+ UNKNOWN,
1703+ MINIMAL,
1704+ DEFAULT,
1705+ COMPLETE,
1706+ LAST;
1707+ public static Pk.UpgradeKind enum_from_string (string upgrade_kind);
1708+ public static unowned string enum_to_string (Pk.UpgradeKind upgrade_kind);
1709+ }
1710+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_CLIENT_ERROR_")]
1711+ public errordomain ClientError {
1712+ FAILED,
1713+ FAILED_AUTH,
1714+ NO_TID,
1715+ ALREADY_TID,
1716+ ROLE_UNKNOWN,
1717+ CANNOT_START_DAEMON,
1718+ INVALID_INPUT,
1719+ INVALID_FILE,
1720+ NOT_SUPPORTED,
1721+ DECLINED_SIMULATION,
1722+ LAST;
1723+ public static GLib.Quark quark ();
1724+ }
1725+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_CONTROL_ERROR_")]
1726+ public errordomain ControlError {
1727+ FAILED,
1728+ CANNOT_START_DAEMON;
1729+ public static GLib.Quark quark ();
1730+ }
1731+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cprefix = "PK_OFFLINE_ERROR_")]
1732+ public errordomain OfflineError {
1733+ FAILED,
1734+ INVALID_VALUE,
1735+ NO_DATA,
1736+ LAST;
1737+ public static GLib.Quark quark ();
1738+ }
1739+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", instance_pos = 1.9)]
1740+ public delegate bool PackageSackFilterFunc (Pk.Package package);
1741+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", instance_pos = 2.9)]
1742+ public delegate void ProgressCallback (Pk.Progress progress, Pk.ProgressType type);
1743+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_DBUS_INTERFACE")]
1744+ public const string DBUS_INTERFACE;
1745+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_DBUS_INTERFACE_OFFLINE")]
1746+ public const string DBUS_INTERFACE_OFFLINE;
1747+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_DBUS_INTERFACE_TRANSACTION")]
1748+ public const string DBUS_INTERFACE_TRANSACTION;
1749+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_DBUS_PATH")]
1750+ public const string DBUS_PATH;
1751+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_DBUS_SERVICE")]
1752+ public const string DBUS_SERVICE;
1753+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_DESKTOP_DEFAULT_APPLICATION_DIR")]
1754+ public const string DESKTOP_DEFAULT_APPLICATION_DIR;
1755+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_MAJOR_VERSION")]
1756+ public const int MAJOR_VERSION;
1757+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_MICRO_VERSION")]
1758+ public const int MICRO_VERSION;
1759+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_MINOR_VERSION")]
1760+ public const int MINOR_VERSION;
1761+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_OFFLINE_DESTDIR")]
1762+ public const string OFFLINE_DESTDIR;
1763+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_OFFLINE_RESULTS_GROUP")]
1764+ public const string OFFLINE_RESULTS_GROUP;
1765+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_PACKAGE_IDS_DELIM")]
1766+ public const string PACKAGE_IDS_DELIM;
1767+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_PACKAGE_ID_ARCH")]
1768+ public const int PACKAGE_ID_ARCH;
1769+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_PACKAGE_ID_DATA")]
1770+ public const int PACKAGE_ID_DATA;
1771+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_PACKAGE_ID_NAME")]
1772+ public const int PACKAGE_ID_NAME;
1773+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_PACKAGE_ID_VERSION")]
1774+ public const int PACKAGE_ID_VERSION;
1775+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_SYSTEM_PACKAGE_CACHE_FILENAME")]
1776+ public const string SYSTEM_PACKAGE_CACHE_FILENAME;
1777+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h", cname = "PK_SYSTEM_PACKAGE_LIST_FILENAME")]
1778+ public const string SYSTEM_PACKAGE_LIST_FILENAME;
1779+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1780+ public static void common_test (void* user_data);
1781+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1782+ public static void debug_add_log_domain (string log_domain);
1783+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1784+ public static bool debug_is_verbose ();
1785+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1786+ public static void debug_set_verbose (bool verbose);
1787+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1788+ public static unowned string enum_find_string (Pk.EnumMatch table, uint value);
1789+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1790+ public static uint enum_find_value (Pk.EnumMatch table, string string);
1791+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1792+ public static void enum_test (void* user_data);
1793+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1794+ public static string get_distro_id ();
1795+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1796+ public static string iso8601_from_date (GLib.Date date);
1797+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1798+ public static string iso8601_present ();
1799+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1800+ public static bool offline_auth_cancel () throws GLib.Error;
1801+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1802+ public static bool offline_auth_clear_results () throws GLib.Error;
1803+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1804+ public static bool offline_auth_invalidate () throws GLib.Error;
1805+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1806+ public static bool offline_auth_set_action (Pk.OfflineAction action) throws GLib.Error;
1807+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1808+ public static bool offline_auth_set_prepared_ids (string package_ids) throws GLib.Error;
1809+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1810+ public static bool offline_auth_set_results (Pk.Results results) throws GLib.Error;
1811+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1812+ public static bool offline_auth_trigger (Pk.OfflineAction action) throws GLib.Error;
1813+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1814+ public static bool offline_cancel (GLib.Cancellable? cancellable = null) throws GLib.Error;
1815+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1816+ public static bool offline_clear_results (GLib.Cancellable? cancellable = null) throws GLib.Error;
1817+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1818+ public static Pk.OfflineAction offline_get_action () throws GLib.Error;
1819+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1820+ public static GLib.FileMonitor offline_get_action_monitor (GLib.Cancellable? cancellable = null) throws GLib.Error;
1821+ [CCode (array_length = false, array_null_terminated = true, cheader_filename = "packagekit-glib2/packagekit.h")]
1822+ public static string[] offline_get_prepared_ids () throws GLib.Error;
1823+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1824+ public static GLib.FileMonitor offline_get_prepared_monitor (GLib.Cancellable? cancellable = null) throws GLib.Error;
1825+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1826+ public static Pk.PackageSack offline_get_prepared_sack () throws GLib.Error;
1827+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1828+ public static Pk.Results offline_get_results () throws GLib.Error;
1829+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1830+ public static uint64 offline_get_results_mtime () throws GLib.Error;
1831+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1832+ public static bool offline_trigger (Pk.OfflineAction action, GLib.Cancellable? cancellable = null) throws GLib.Error;
1833+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1834+ public static void polkit_agent_close ();
1835+ [CCode (cheader_filename = "packagekit-glib2/packagekit.h")]
1836+ public static int polkit_agent_open ();
1837+ [CCode (array_length = false, array_null_terminated = true, cheader_filename = "packagekit-glib2/packagekit.h")]
1838+ public static string[] ptr_array_to_strv (GLib.GenericArray<string> array);
1839+}

Subscribers

People subscribed via source and target branches