Debian Codegraph @

lib/packagekit-glib2/pk-offline-private.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2014 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU General Public License Version 2
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
23 #error "Only <packagekit.h> can be included directly."
24 #endif
25
26 #ifndef __PK_OFFLINE_PRIVATE_H
27 #define __PK_OFFLINE_PRIVATE_H
28
29 /* FIXME: these have to remain here (and not in src until we remove the
30 * pkexec helpers from contrib */
31
32 #include <glib.h>
33
34 #include "pk-offline.h"
35 #include "pk-results.h"
36
37 G_BEGIN_DECLS
38
39 /* this allows us to override for the self tests */
40 #ifndef PK_OFFLINE_DESTDIR
41 #define PK_OFFLINE_DESTDIR ""
42 #endif
43
44 /* the state file for regular offline update */
45 #define PK_OFFLINE_PREPARED_FILENAME PK_OFFLINE_DESTDIR "/var/lib/PackageKit/prepared-update"
46 /* the state file for offline system upgrade */
47 #define PK_OFFLINE_PREPARED_UPGRADE_FILENAME \
48 PK_OFFLINE_DESTDIR "/var/lib/PackageKit/prepared-upgrade"
49
50 /* the trigger file that systemd uses to start a different boot target */
51 #define PK_OFFLINE_TRIGGER_FILENAME PK_OFFLINE_DESTDIR "/system-update"
52
53 /* the keyfile describing the outcome of the latest offline update */
54 #define PK_OFFLINE_RESULTS_FILENAME PK_OFFLINE_DESTDIR "/var/lib/PackageKit/offline-update-competed"
55
56 /* the action to take when the offline update has completed, e.g. restart */
57 #define PK_OFFLINE_ACTION_FILENAME PK_OFFLINE_DESTDIR "/var/lib/PackageKit/offline-update-action"
58
59 /* the group name for the offline updates results keyfile */
60 #define PK_OFFLINE_RESULTS_GROUP "PackageKit Offline Update Results"
61
62 gboolean pk_offline_auth_set_action (PkOfflineAction action,
63 GError **error);
64 gboolean pk_offline_auth_cancel (GError **error);
65 gboolean pk_offline_auth_clear_results (GError **error);
66 gboolean pk_offline_auth_trigger (PkOfflineAction action,
67 GError **error);
68 gboolean pk_offline_auth_trigger_upgrade
69 (PkOfflineAction action,
70 GError **error);
71 gboolean pk_offline_auth_set_prepared_ids(gchar **package_ids,
72 GError **error);
73 gboolean pk_offline_auth_set_prepared_upgrade
74 (const gchar *name,
75 const gchar *release_ver,
76 GError **error);
77 gboolean pk_offline_get_prepared_upgrade
78 (gchar **name,
79 gchar **release_ver,
80 GError **error);
81 gboolean pk_offline_auth_invalidate (GError **error);
82 gboolean pk_offline_auth_set_results (PkResults *results,
83 GError **error);
84
85 G_END_DECLS
86
87 #endif /* __PK_OFFLINE_PRIVATE_H */