Debian Codegraph @

lib/packagekit-glib2/pk-enum.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2007-2014 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU Lesser General Public License Version 2.1
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library 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 GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; 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_ENUM_H
27 #define __PK_ENUM_H
28
29 #include <glib.h>
30
31 G_BEGIN_DECLS
32
33 /**
34 * PkEnumMatch:
35 * @value: enumerated value
36 * @string: string for given value
37 *
38 * Matching an enumerated type to a string
39 **/
40 typedef struct {
41 guint value;
42 const gchar *string;
43 } PkEnumMatch;
44
45 /**
46 * PkRoleEnum:
47 * @PK_ROLE_ENUM_UNKNOWN: Unknow request
48 * @PK_ROLE_ENUM_CANCEL: Cancel transaction
49 * @PK_ROLE_ENUM_DEPENDS_ON: Get package dependencies
50 * @PK_ROLE_ENUM_GET_DETAILS: Get package details
51 * @PK_ROLE_ENUM_GET_FILES:
52 * @PK_ROLE_ENUM_GET_PACKAGES: Get available packages
53 * @PK_ROLE_ENUM_GET_REPO_LIST: Get repository list
54 * @PK_ROLE_ENUM_REQUIRED_BY: Get packages required by given package
55 * @PK_ROLE_ENUM_GET_UPDATE_DETAIL: Get update details
56 * @PK_ROLE_ENUM_GET_UPDATES: Get available updates
57 * @PK_ROLE_ENUM_INSTALL_FILES: Install package files
58 * @PK_ROLE_ENUM_INSTALL_PACKAGES: Install packages
59 * @PK_ROLE_ENUM_INSTALL_SIGNATURE: Install signature
60 * @PK_ROLE_ENUM_REFRESH_CACHE: Refresh cache
61 * @PK_ROLE_ENUM_REMOVE_PACKAGES: Remove packages
62 * @PK_ROLE_ENUM_REPO_ENABLE: Enable repository
63 * @PK_ROLE_ENUM_REPO_SET_DATA:
64 * @PK_ROLE_ENUM_RESOLVE: Resolve depdencies
65 * @PK_ROLE_ENUM_SEARCH_DETAILS: Search for details
66 * @PK_ROLE_ENUM_SEARCH_FILE: Search for file
67 * @PK_ROLE_ENUM_SEARCH_GROUP: Search for group
68 * @PK_ROLE_ENUM_SEARCH_NAME: Search for package name
69 * @PK_ROLE_ENUM_UPDATE_PACKAGES: Update packages
70 * @PK_ROLE_ENUM_WHAT_PROVIDES: Get what a package provides
71 * @PK_ROLE_ENUM_ACCEPT_EULA: Accept an EULA
72 * @PK_ROLE_ENUM_DOWNLOAD_PACKAGES: Download packages
73 * @PK_ROLE_ENUM_GET_DISTRO_UPGRADES: Get available distribution upgrades
74 * @PK_ROLE_ENUM_GET_CATEGORIES: Get available categories
75 * @PK_ROLE_ENUM_GET_OLD_TRANSACTIONS: Get old transation information
76 * @PK_ROLE_ENUM_REPAIR_SYSTEM: Repair system
77 * @PK_ROLE_ENUM_GET_DETAILS_LOCAL: Get details on local package
78 * @PK_ROLE_ENUM_GET_FILES_LOCAL: Get files provided by local package
79 * @PK_ROLE_ENUM_REPO_REMOVE: Remove repository
80 * @PK_ROLE_ENUM_UPGRADE_SYSTEM: Upgrade system
81 * @PK_ROLE_ENUM_LAST:
82 *
83 * What we were asked to do, this never changes for the lifetime of the
84 * transaction.
85 * Icons that have to represent the whole "aim" of the transaction will use
86 * these constants
87 **/
88 typedef enum {
89 PK_ROLE_ENUM_UNKNOWN,
90 PK_ROLE_ENUM_CANCEL,
91 PK_ROLE_ENUM_DEPENDS_ON,
92 PK_ROLE_ENUM_GET_DETAILS,
93 PK_ROLE_ENUM_GET_FILES,
94 PK_ROLE_ENUM_GET_PACKAGES,
95 PK_ROLE_ENUM_GET_REPO_LIST,
96 PK_ROLE_ENUM_REQUIRED_BY,
97 PK_ROLE_ENUM_GET_UPDATE_DETAIL,
98 PK_ROLE_ENUM_GET_UPDATES,
99 PK_ROLE_ENUM_INSTALL_FILES,
100 PK_ROLE_ENUM_INSTALL_PACKAGES,
101 PK_ROLE_ENUM_INSTALL_SIGNATURE,
102 PK_ROLE_ENUM_REFRESH_CACHE,
103 PK_ROLE_ENUM_REMOVE_PACKAGES,
104 PK_ROLE_ENUM_REPO_ENABLE,
105 PK_ROLE_ENUM_REPO_SET_DATA,
106 PK_ROLE_ENUM_RESOLVE,
107 PK_ROLE_ENUM_SEARCH_DETAILS,
108 PK_ROLE_ENUM_SEARCH_FILE,
109 PK_ROLE_ENUM_SEARCH_GROUP,
110 PK_ROLE_ENUM_SEARCH_NAME,
111 PK_ROLE_ENUM_UPDATE_PACKAGES,
112 PK_ROLE_ENUM_WHAT_PROVIDES,
113 PK_ROLE_ENUM_ACCEPT_EULA,
114 PK_ROLE_ENUM_DOWNLOAD_PACKAGES,
115 PK_ROLE_ENUM_GET_DISTRO_UPGRADES,
116 PK_ROLE_ENUM_GET_CATEGORIES,
117 PK_ROLE_ENUM_GET_OLD_TRANSACTIONS,
118 PK_ROLE_ENUM_REPAIR_SYSTEM, /* Since: 0.7.2 */
119 PK_ROLE_ENUM_GET_DETAILS_LOCAL, /* Since: 0.8.17 */
120 PK_ROLE_ENUM_GET_FILES_LOCAL, /* Since: 0.9.1 */
121 PK_ROLE_ENUM_REPO_REMOVE, /* Since: 0.9.1 */
122 PK_ROLE_ENUM_UPGRADE_SYSTEM, /* Since: 1.0.10 */
123 PK_ROLE_ENUM_LAST
124 } PkRoleEnum;
125
126 /**
127 * PkStatusEnum:
128 * @PK_STATUS_ENUM_UNKNOWN: Unknown status
129 * @PK_STATUS_ENUM_WAIT: Waiting
130 * @PK_STATUS_ENUM_SETUP: Setting up
131 * @PK_STATUS_ENUM_RUNNING: Running
132 * @PK_STATUS_ENUM_QUERY:
133 * @PK_STATUS_ENUM_INFO:
134 * @PK_STATUS_ENUM_REMOVE: Removing
135 * @PK_STATUS_ENUM_REFRESH_CACHE: Refreshing cache
136 * @PK_STATUS_ENUM_DOWNLOAD: Downloading
137 * @PK_STATUS_ENUM_INSTALL: Installing
138 * @PK_STATUS_ENUM_UPDATE: Updating
139 * @PK_STATUS_ENUM_CLEANUP: Cleaning up
140 * @PK_STATUS_ENUM_OBSOLETE:
141 * @PK_STATUS_ENUM_DEP_RESOLVE: Resolving dependencies
142 * @PK_STATUS_ENUM_SIG_CHECK: Checking signatures
143 * @PK_STATUS_ENUM_TEST_COMMIT: Testing commit
144 * @PK_STATUS_ENUM_COMMIT: Committing
145 * @PK_STATUS_ENUM_REQUEST:
146 * @PK_STATUS_ENUM_FINISHED: Finished
147 * @PK_STATUS_ENUM_CANCEL: Cancelling
148 * @PK_STATUS_ENUM_DOWNLOAD_REPOSITORY: Downloading respository
149 * @PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST: Donwloading package list
150 * @PK_STATUS_ENUM_DOWNLOAD_FILELIST: Downloading file list
151 * @PK_STATUS_ENUM_DOWNLOAD_CHANGELOG: Downloading changelog information
152 * @PK_STATUS_ENUM_DOWNLOAD_GROUP: Downloading group information
153 * @PK_STATUS_ENUM_DOWNLOAD_UPDATEINFO: Downloading update information
154 * @PK_STATUS_ENUM_REPACKAGING: Repackaging
155 * @PK_STATUS_ENUM_LOADING_CACHE: Loading cache
156 * @PK_STATUS_ENUM_SCAN_APPLICATIONS: Scanning for applications
157 * @PK_STATUS_ENUM_GENERATE_PACKAGE_LIST: Generating package list
158 * @PK_STATUS_ENUM_WAITING_FOR_LOCK: Waiting for lock
159 * @PK_STATUS_ENUM_WAITING_FOR_AUTH: Waiting for authentication/authorization
160 * @PK_STATUS_ENUM_SCAN_PROCESS_LIST: Scanning running processes
161 * @PK_STATUS_ENUM_CHECK_EXECUTABLE_FILES: Checking executable files
162 * @PK_STATUS_ENUM_CHECK_LIBRARIES: Checking libraries
163 * @PK_STATUS_ENUM_COPY_FILES: Copying files
164 * @PK_STATUS_ENUM_RUN_HOOK: Running package hook
165 * @PK_STATUS_ENUM_LAST:
166 *
167 * What status we are now; this can change for each transaction giving a
168 * status of what sort of thing is happening
169 * Icons that change to represent the current status of the transaction will
170 * use these constants
171 * If you add to these, make sure you add filenames in gpk-watch.c also
172 *
173 * A typical transaction will do:
174 * - schedule task
175 * WAIT
176 * - run task
177 * SETUP
178 * - wait for lock
179 * RUNNING
180 *
181 * This means that backends should run pk_backend_set_status (backend, PK_STATUS_ENUM_RUNNING)
182 * when they are ready to start running the transaction and after a lock has been got.
183 **/
184 typedef enum {
185 PK_STATUS_ENUM_UNKNOWN,
186 PK_STATUS_ENUM_WAIT,
187 PK_STATUS_ENUM_SETUP,
188 PK_STATUS_ENUM_RUNNING,
189 PK_STATUS_ENUM_QUERY,
190 PK_STATUS_ENUM_INFO,
191 PK_STATUS_ENUM_REMOVE,
192 PK_STATUS_ENUM_REFRESH_CACHE,
193 PK_STATUS_ENUM_DOWNLOAD,
194 PK_STATUS_ENUM_INSTALL,
195 PK_STATUS_ENUM_UPDATE,
196 PK_STATUS_ENUM_CLEANUP,
197 PK_STATUS_ENUM_OBSOLETE,
198 PK_STATUS_ENUM_DEP_RESOLVE,
199 PK_STATUS_ENUM_SIG_CHECK,
200 PK_STATUS_ENUM_TEST_COMMIT,
201 PK_STATUS_ENUM_COMMIT,
202 PK_STATUS_ENUM_REQUEST,
203 PK_STATUS_ENUM_FINISHED,
204 PK_STATUS_ENUM_CANCEL,
205 PK_STATUS_ENUM_DOWNLOAD_REPOSITORY,
206 PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST,
207 PK_STATUS_ENUM_DOWNLOAD_FILELIST,
208 PK_STATUS_ENUM_DOWNLOAD_CHANGELOG,
209 PK_STATUS_ENUM_DOWNLOAD_GROUP,
210 PK_STATUS_ENUM_DOWNLOAD_UPDATEINFO,
211 PK_STATUS_ENUM_REPACKAGING,
212 PK_STATUS_ENUM_LOADING_CACHE,
213 PK_STATUS_ENUM_SCAN_APPLICATIONS,
214 PK_STATUS_ENUM_GENERATE_PACKAGE_LIST,
215 PK_STATUS_ENUM_WAITING_FOR_LOCK,
216 PK_STATUS_ENUM_WAITING_FOR_AUTH,
217 PK_STATUS_ENUM_SCAN_PROCESS_LIST,
218 PK_STATUS_ENUM_CHECK_EXECUTABLE_FILES,
219 PK_STATUS_ENUM_CHECK_LIBRARIES,
220 PK_STATUS_ENUM_COPY_FILES,
221 PK_STATUS_ENUM_RUN_HOOK,
222 PK_STATUS_ENUM_LAST
223 } PkStatusEnum;
224
225 /**
226 * PkExitEnum:
227 * @PK_EXIT_ENUM_UNKNOWN: Unknown exit status
228 * @PK_EXIT_ENUM_SUCCESS: Backend exited successfully
229 * @PK_EXIT_ENUM_FAILED: Backend failed
230 * @PK_EXIT_ENUM_CANCELLED: Backend was cancelled
231 * @PK_EXIT_ENUM_KEY_REQUIRED: A repository encryption key needs installing
232 * @PK_EXIT_ENUM_EULA_REQUIRED: A EULA is required to be accepted
233 * @PK_EXIT_ENUM_KILLED: Backend was killed
234 * @PK_EXIT_ENUM_MEDIA_CHANGE_REQUIRED: Media change required
235 * @PK_EXIT_ENUM_NEED_UNTRUSTED:
236 * @PK_EXIT_ENUM_CANCELLED_PRIORITY: Cancelled due to higher priority task
237 * @PK_EXIT_ENUM_SKIP_TRANSACTION:
238 * @PK_EXIT_ENUM_REPAIR_REQUIRED: Package database requires repairing
239 * @PK_EXIT_ENUM_LAST:
240 *
241 * How the backend exited
242 **/
243 typedef enum {
244 PK_EXIT_ENUM_UNKNOWN,
245 PK_EXIT_ENUM_SUCCESS,
246 PK_EXIT_ENUM_FAILED,
247 PK_EXIT_ENUM_CANCELLED,
248 PK_EXIT_ENUM_KEY_REQUIRED,
249 PK_EXIT_ENUM_EULA_REQUIRED,
250 PK_EXIT_ENUM_KILLED, /* when we forced the cancel, but had to SIGKILL */
251 PK_EXIT_ENUM_MEDIA_CHANGE_REQUIRED,
252 PK_EXIT_ENUM_NEED_UNTRUSTED,
253 PK_EXIT_ENUM_CANCELLED_PRIORITY,
254 PK_EXIT_ENUM_SKIP_TRANSACTION,
255 PK_EXIT_ENUM_REPAIR_REQUIRED,
256 PK_EXIT_ENUM_LAST
257 } PkExitEnum;
258
259 /**
260 * PkNetworkEnum:
261 * @PK_NETWORK_ENUM_UNKNOWN: Unknown network
262 * @PK_NETWORK_ENUM_OFFLINE: Offline (no network)
263 * @PK_NETWORK_ENUM_ONLINE: Online (network type unknown)
264 * @PK_NETWORK_ENUM_WIRED: Wired network
265 * @PK_NETWORK_ENUM_WIFI: WiFi network
266 * @PK_NETWORK_ENUM_MOBILE: Mobile network
267 * @PK_NETWORK_ENUM_LAST:
268 *
269 * Network type
270 **/
271 typedef enum {
272 PK_NETWORK_ENUM_UNKNOWN,
273 PK_NETWORK_ENUM_OFFLINE,
274 PK_NETWORK_ENUM_ONLINE,
275 PK_NETWORK_ENUM_WIRED,
276 PK_NETWORK_ENUM_WIFI,
277 PK_NETWORK_ENUM_MOBILE,
278 PK_NETWORK_ENUM_LAST
279 } PkNetworkEnum;
280
281 /**
282 * PkFilterEnum:
283 * @PK_FILTER_ENUM_UNKNOWN: Unknown filter
284 * @PK_FILTER_ENUM_NONE: No filter
285 * @PK_FILTER_ENUM_INSTALLED: Filter for installed packages
286 * @PK_FILTER_ENUM_NOT_INSTALLED: Filter for not installed packages
287 * @PK_FILTER_ENUM_DEVELOPMENT: Filter for development packages
288 * @PK_FILTER_ENUM_NOT_DEVELOPMENT: Filter for non-development packages
289 * @PK_FILTER_ENUM_GUI: Filter for GUI packages
290 * @PK_FILTER_ENUM_NOT_GUI: Filter for non-GUI packages
291 * @PK_FILTER_ENUM_FREE: Filter for free packages
292 * @PK_FILTER_ENUM_NOT_FREE: Filter for non-free packages
293 * @PK_FILTER_ENUM_VISIBLE: Filter for visible packages
294 * @PK_FILTER_ENUM_NOT_VISIBLE: Filter for invisible packages
295 * @PK_FILTER_ENUM_SUPPORTED: Filter for supported packages
296 * @PK_FILTER_ENUM_NOT_SUPPORTED: Filter for not supported packages
297 * @PK_FILTER_ENUM_BASENAME: Filter for packages that match basename
298 * @PK_FILTER_ENUM_NOT_BASENAME: Filter for packages that don't match basename
299 * @PK_FILTER_ENUM_NEWEST: Filter for newest packages
300 * @PK_FILTER_ENUM_NOT_NEWEST: Filter for not newest packages
301 * @PK_FILTER_ENUM_ARCH: Filter for packages that match architecture
302 * @PK_FILTER_ENUM_NOT_ARCH: Filter for packages that don't match architecture
303 * @PK_FILTER_ENUM_SOURCE: Filter for source packages
304 * @PK_FILTER_ENUM_NOT_SOURCE: Filter for non-source packages
305 * @PK_FILTER_ENUM_COLLECTIONS: Filter for collections
306 * @PK_FILTER_ENUM_NOT_COLLECTIONS: Filter for not collections
307 * @PK_FILTER_ENUM_APPLICATION: Filter for application packages
308 * @PK_FILTER_ENUM_NOT_APPLICATION: Filter for non-application packages
309 * @PK_FILTER_ENUM_DOWNLOADED: Filter for downloaded packages
310 * @PK_FILTER_ENUM_NOT_DOWNLOADED: Filter for not downloaded packages
311 * @PK_FILTER_ENUM_LAST:
312 *
313 * The filter types
314 **/
315 typedef enum {
316 PK_FILTER_ENUM_UNKNOWN,
317 PK_FILTER_ENUM_NONE,
318 PK_FILTER_ENUM_INSTALLED,
319 PK_FILTER_ENUM_NOT_INSTALLED,
320 PK_FILTER_ENUM_DEVELOPMENT,
321 PK_FILTER_ENUM_NOT_DEVELOPMENT,
322 PK_FILTER_ENUM_GUI,
323 PK_FILTER_ENUM_NOT_GUI,
324 PK_FILTER_ENUM_FREE,
325 PK_FILTER_ENUM_NOT_FREE,
326 PK_FILTER_ENUM_VISIBLE,
327 PK_FILTER_ENUM_NOT_VISIBLE,
328 PK_FILTER_ENUM_SUPPORTED,
329 PK_FILTER_ENUM_NOT_SUPPORTED,
330 PK_FILTER_ENUM_BASENAME,
331 PK_FILTER_ENUM_NOT_BASENAME,
332 PK_FILTER_ENUM_NEWEST,
333 PK_FILTER_ENUM_NOT_NEWEST,
334 PK_FILTER_ENUM_ARCH,
335 PK_FILTER_ENUM_NOT_ARCH,
336 PK_FILTER_ENUM_SOURCE,
337 PK_FILTER_ENUM_NOT_SOURCE,
338 PK_FILTER_ENUM_COLLECTIONS,
339 PK_FILTER_ENUM_NOT_COLLECTIONS,
340 PK_FILTER_ENUM_APPLICATION,
341 PK_FILTER_ENUM_NOT_APPLICATION,
342 PK_FILTER_ENUM_DOWNLOADED, /* Since: 0.8.10 */
343 PK_FILTER_ENUM_NOT_DOWNLOADED, /* Since: 0.8.10 */
344 PK_FILTER_ENUM_LAST,
345 } PkFilterEnum;
346
347 /**
348 * PkRestartEnum:
349 * @PK_RESTART_ENUM_UNKNOWN: Unknown restart state
350 * @PK_RESTART_ENUM_NONE: No restart required
351 * @PK_RESTART_ENUM_APPLICATION: Need to restart the application
352 * @PK_RESTART_ENUM_SESSION: Need to restart the session
353 * @PK_RESTART_ENUM_SYSTEM: Need to restart the system
354 * @PK_RESTART_ENUM_SECURITY_SESSION:
355 * @PK_RESTART_ENUM_SECURITY_SYSTEM:
356 * @PK_RESTART_ENUM_LAST:
357 *
358 * What restart we need to after a transaction, ordered by severity
359 **/
360 typedef enum {
361 PK_RESTART_ENUM_UNKNOWN,
362 PK_RESTART_ENUM_NONE,
363 PK_RESTART_ENUM_APPLICATION,
364 PK_RESTART_ENUM_SESSION,
365 PK_RESTART_ENUM_SYSTEM,
366 PK_RESTART_ENUM_SECURITY_SESSION, /* a library that is being used by this package has been updated for security */
367 PK_RESTART_ENUM_SECURITY_SYSTEM,
368 PK_RESTART_ENUM_LAST
369 } PkRestartEnum;
370
371 /**
372 * PkErrorEnum:
373 * @PK_ERROR_ENUM_UNKNOWN:
374 * @PK_ERROR_ENUM_OOM: Out of memory
375 * @PK_ERROR_ENUM_NO_NETWORK: No network access available
376 * @PK_ERROR_ENUM_NOT_SUPPORTED: Request not supported
377 * @PK_ERROR_ENUM_INTERNAL_ERROR: Undefined internal error
378 * @PK_ERROR_ENUM_GPG_FAILURE: GPG encryption failure
379 * @PK_ERROR_ENUM_PACKAGE_ID_INVALID: Invalid package ID provided
380 * @PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED: Requested package not installed
381 * @PK_ERROR_ENUM_PACKAGE_NOT_FOUND: Requested package not found
382 * @PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED: Requested package already installed
383 * @PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED: Failed to download package
384 * @PK_ERROR_ENUM_GROUP_NOT_FOUND: Requested group not gound
385 * @PK_ERROR_ENUM_GROUP_LIST_INVALID: Invalid group list provided
386 * @PK_ERROR_ENUM_DEP_RESOLUTION_FAILED: Failed to resolve dependencies
387 * @PK_ERROR_ENUM_FILTER_INVALID: Invalid filter provides
388 * @PK_ERROR_ENUM_CREATE_THREAD_FAILED: Failed to create thread
389 * @PK_ERROR_ENUM_TRANSACTION_ERROR: Error occurred during transaction
390 * @PK_ERROR_ENUM_TRANSACTION_CANCELLED: Transaction was cancelled
391 * @PK_ERROR_ENUM_NO_CACHE: No cache available
392 * @PK_ERROR_ENUM_REPO_NOT_FOUND: Requested repository not found
393 * @PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE: Not allowed to remove system package
394 * @PK_ERROR_ENUM_PROCESS_KILL: Process killed
395 * @PK_ERROR_ENUM_FAILED_INITIALIZATION:
396 * @PK_ERROR_ENUM_FAILED_FINALISE:
397 * @PK_ERROR_ENUM_FAILED_CONFIG_PARSING: Configuration is not valid
398 * @PK_ERROR_ENUM_CANNOT_CANCEL:
399 * @PK_ERROR_ENUM_CANNOT_GET_LOCK: Cannot get lock
400 * @PK_ERROR_ENUM_NO_PACKAGES_TO_UPDATE: No packages to update
401 * @PK_ERROR_ENUM_CANNOT_WRITE_REPO_CONFIG: Cannot write repository configuration
402 * @PK_ERROR_ENUM_LOCAL_INSTALL_FAILED:
403 * @PK_ERROR_ENUM_BAD_GPG_SIGNATURE: Bad GPG signature found
404 * @PK_ERROR_ENUM_MISSING_GPG_SIGNATURE: Required GPG signature not found
405 * @PK_ERROR_ENUM_CANNOT_INSTALL_SOURCE_PACKAGE: Cannot install source package
406 * @PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR:
407 * @PK_ERROR_ENUM_NO_LICENSE_AGREEMENT:
408 * @PK_ERROR_ENUM_FILE_CONFLICTS: File conflicts detected
409 * @PK_ERROR_ENUM_PACKAGE_CONFLICTS: Package conflict
410 * @PK_ERROR_ENUM_REPO_NOT_AVAILABLE: Repository not available
411 * @PK_ERROR_ENUM_INVALID_PACKAGE_FILE:
412 * @PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED: Package installation blocked
413 * @PK_ERROR_ENUM_PACKAGE_CORRUPT: Package corruption occurred
414 * @PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED: All packages already installed
415 * @PK_ERROR_ENUM_FILE_NOT_FOUND: Required file not found
416 * @PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY: Out of repository mirrors to try
417 * @PK_ERROR_ENUM_NO_DISTRO_UPGRADE_DATA: No distribution upgrade path found
418 * @PK_ERROR_ENUM_INCOMPATIBLE_ARCHITECTURE: Incompatible architecture found
419 * @PK_ERROR_ENUM_NO_SPACE_ON_DEVICE: Out of required disk space
420 * @PK_ERROR_ENUM_MEDIA_CHANGE_REQUIRED: Need to change media
421 * @PK_ERROR_ENUM_NOT_AUTHORIZED: Authorization failed
422 * @PK_ERROR_ENUM_UPDATE_NOT_FOUND: Update not found
423 * @PK_ERROR_ENUM_CANNOT_INSTALL_REPO_UNSIGNED: Installation repository missing signature
424 * @PK_ERROR_ENUM_CANNOT_UPDATE_REPO_UNSIGNED: Update repository missing signature
425 * @PK_ERROR_ENUM_CANNOT_GET_FILELIST: Cannot get file list
426 * @PK_ERROR_ENUM_CANNOT_GET_REQUIRES: Cannot get package requirements
427 * @PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY: Cannot disable reposoitory
428 * @PK_ERROR_ENUM_RESTRICTED_DOWNLOAD:
429 * @PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE: Package failed to configure
430 * @PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD: Package failed to build
431 * @PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL: Package failed to install
432 * @PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE: Package failed to remove
433 * @PK_ERROR_ENUM_UPDATE_FAILED_DUE_TO_RUNNING_PROCESS:
434 * @PK_ERROR_ENUM_PACKAGE_DATABASE_CHANGED:
435 * @PK_ERROR_ENUM_PROVIDE_TYPE_NOT_SUPPORTED:
436 * @PK_ERROR_ENUM_INSTALL_ROOT_INVALID: Installtion root not suitable
437 * @PK_ERROR_ENUM_CANNOT_FETCH_SOURCES: Cannot fetch sources
438 * @PK_ERROR_ENUM_CANCELLED_PRIORITY: Cancelled due to higher priority task
439 * @PK_ERROR_ENUM_UNFINISHED_TRANSACTION: Transaction unfinished
440 * @PK_ERROR_ENUM_LOCK_REQUIRED: Required lock not available
441 * @PK_ERROR_ENUM_REPO_ALREADY_SET:
442 * @PK_ERROR_ENUM_LAST:
443 *
444 * The error type
445 **/
446 typedef enum {
447 PK_ERROR_ENUM_UNKNOWN,
448 PK_ERROR_ENUM_OOM,
449 PK_ERROR_ENUM_NO_NETWORK,
450 PK_ERROR_ENUM_NOT_SUPPORTED,
451 PK_ERROR_ENUM_INTERNAL_ERROR,
452 PK_ERROR_ENUM_GPG_FAILURE,
453 PK_ERROR_ENUM_PACKAGE_ID_INVALID,
454 PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED,
455 PK_ERROR_ENUM_PACKAGE_NOT_FOUND,
456 PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED,
457 PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED,
458 PK_ERROR_ENUM_GROUP_NOT_FOUND,
459 PK_ERROR_ENUM_GROUP_LIST_INVALID,
460 PK_ERROR_ENUM_DEP_RESOLUTION_FAILED,
461 PK_ERROR_ENUM_FILTER_INVALID,
462 PK_ERROR_ENUM_CREATE_THREAD_FAILED,
463 PK_ERROR_ENUM_TRANSACTION_ERROR,
464 PK_ERROR_ENUM_TRANSACTION_CANCELLED,
465 PK_ERROR_ENUM_NO_CACHE,
466 PK_ERROR_ENUM_REPO_NOT_FOUND,
467 PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE,
468 PK_ERROR_ENUM_PROCESS_KILL,
469 PK_ERROR_ENUM_FAILED_INITIALIZATION,
470 PK_ERROR_ENUM_FAILED_FINALISE,
471 PK_ERROR_ENUM_FAILED_CONFIG_PARSING,
472 PK_ERROR_ENUM_CANNOT_CANCEL,
473 PK_ERROR_ENUM_CANNOT_GET_LOCK,
474 PK_ERROR_ENUM_NO_PACKAGES_TO_UPDATE,
475 PK_ERROR_ENUM_CANNOT_WRITE_REPO_CONFIG,
476 PK_ERROR_ENUM_LOCAL_INSTALL_FAILED,
477 PK_ERROR_ENUM_BAD_GPG_SIGNATURE,
478 PK_ERROR_ENUM_MISSING_GPG_SIGNATURE,
479 PK_ERROR_ENUM_CANNOT_INSTALL_SOURCE_PACKAGE,
480 PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR,
481 PK_ERROR_ENUM_NO_LICENSE_AGREEMENT,
482 PK_ERROR_ENUM_FILE_CONFLICTS,
483 PK_ERROR_ENUM_PACKAGE_CONFLICTS,
484 PK_ERROR_ENUM_REPO_NOT_AVAILABLE,
485 PK_ERROR_ENUM_INVALID_PACKAGE_FILE,
486 PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED,
487 PK_ERROR_ENUM_PACKAGE_CORRUPT,
488 PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED,
489 PK_ERROR_ENUM_FILE_NOT_FOUND,
490 PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY,
491 PK_ERROR_ENUM_NO_DISTRO_UPGRADE_DATA,
492 PK_ERROR_ENUM_INCOMPATIBLE_ARCHITECTURE,
493 PK_ERROR_ENUM_NO_SPACE_ON_DEVICE,
494 PK_ERROR_ENUM_MEDIA_CHANGE_REQUIRED,
495 PK_ERROR_ENUM_NOT_AUTHORIZED,
496 PK_ERROR_ENUM_UPDATE_NOT_FOUND,
497 PK_ERROR_ENUM_CANNOT_INSTALL_REPO_UNSIGNED,
498 PK_ERROR_ENUM_CANNOT_UPDATE_REPO_UNSIGNED,
499 PK_ERROR_ENUM_CANNOT_GET_FILELIST,
500 PK_ERROR_ENUM_CANNOT_GET_REQUIRES,
501 PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY,
502 PK_ERROR_ENUM_RESTRICTED_DOWNLOAD,
503 PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE,
504 PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD,
505 PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL,
506 PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE,
507 PK_ERROR_ENUM_UPDATE_FAILED_DUE_TO_RUNNING_PROCESS,
508 PK_ERROR_ENUM_PACKAGE_DATABASE_CHANGED,
509 PK_ERROR_ENUM_PROVIDE_TYPE_NOT_SUPPORTED,
510 PK_ERROR_ENUM_INSTALL_ROOT_INVALID,
511 PK_ERROR_ENUM_CANNOT_FETCH_SOURCES,
512 PK_ERROR_ENUM_CANCELLED_PRIORITY,
513 PK_ERROR_ENUM_UNFINISHED_TRANSACTION,
514 PK_ERROR_ENUM_LOCK_REQUIRED,
515 PK_ERROR_ENUM_REPO_ALREADY_SET,
516 PK_ERROR_ENUM_LAST
517 } PkErrorEnum;
518
519 /**
520 * PkGroupEnum:
521 * @PK_GROUP_ENUM_UNKNOWN: Unknown group
522 * @PK_GROUP_ENUM_ACCESSIBILITY: Accessibility related packages
523 * @PK_GROUP_ENUM_ACCESSORIES: Accessory packages
524 * @PK_GROUP_ENUM_ADMIN_TOOLS: Administration tools packages
525 * @PK_GROUP_ENUM_COMMUNICATION: Communication packages
526 * @PK_GROUP_ENUM_DESKTOP_GNOME: GNOME packages
527 * @PK_GROUP_ENUM_DESKTOP_KDE: KDE packages
528 * @PK_GROUP_ENUM_DESKTOP_OTHER: Other desktop packages
529 * @PK_GROUP_ENUM_DESKTOP_XFCE: XFCE packages
530 * @PK_GROUP_ENUM_EDUCATION: Education packages
531 * @PK_GROUP_ENUM_FONTS: Fonts
532 * @PK_GROUP_ENUM_GAMES: Games
533 * @PK_GROUP_ENUM_GRAPHICS: Graphics related packages
534 * @PK_GROUP_ENUM_INTERNET: Internet related packages
535 * @PK_GROUP_ENUM_LEGACY: Legacy packages
536 * @PK_GROUP_ENUM_LOCALIZATION: Localization related packages
537 * @PK_GROUP_ENUM_MAPS: Map related packages
538 * @PK_GROUP_ENUM_MULTIMEDIA: Multimedia packages
539 * @PK_GROUP_ENUM_NETWORK: Network related packages
540 * @PK_GROUP_ENUM_OFFICE: Office packages
541 * @PK_GROUP_ENUM_OTHER:
542 * @PK_GROUP_ENUM_POWER_MANAGEMENT: Power-management related packages
543 * @PK_GROUP_ENUM_PROGRAMMING: Programming packages
544 * @PK_GROUP_ENUM_PUBLISHING: Publishing related packages
545 * @PK_GROUP_ENUM_REPOS:
546 * @PK_GROUP_ENUM_SECURITY: Security packages
547 * @PK_GROUP_ENUM_SERVERS: Server related packages
548 * @PK_GROUP_ENUM_SYSTEM: System packages
549 * @PK_GROUP_ENUM_VIRTUALIZATION: Virtualization packages
550 * @PK_GROUP_ENUM_SCIENCE: Science related packages
551 * @PK_GROUP_ENUM_DOCUMENTATION: Documentation
552 * @PK_GROUP_ENUM_ELECTRONICS: Electronics package
553 * @PK_GROUP_ENUM_COLLECTIONS:
554 * @PK_GROUP_ENUM_VENDOR: Vendor defined group
555 * @PK_GROUP_ENUM_NEWEST: Special group for recently updated packages
556 * @PK_GROUP_ENUM_DESKTOP_DDE: DDE packages
557 * @PK_GROUP_ENUM_LAST:
558 *
559 * The group type
560 **/
561 typedef enum {
562 PK_GROUP_ENUM_UNKNOWN,
563 PK_GROUP_ENUM_ACCESSIBILITY,
564 PK_GROUP_ENUM_ACCESSORIES,
565 PK_GROUP_ENUM_ADMIN_TOOLS,
566 PK_GROUP_ENUM_COMMUNICATION,
567 PK_GROUP_ENUM_DESKTOP_GNOME,
568 PK_GROUP_ENUM_DESKTOP_KDE,
569 PK_GROUP_ENUM_DESKTOP_OTHER,
570 PK_GROUP_ENUM_DESKTOP_XFCE,
571 PK_GROUP_ENUM_EDUCATION,
572 PK_GROUP_ENUM_FONTS,
573 PK_GROUP_ENUM_GAMES,
574 PK_GROUP_ENUM_GRAPHICS,
575 PK_GROUP_ENUM_INTERNET,
576 PK_GROUP_ENUM_LEGACY,
577 PK_GROUP_ENUM_LOCALIZATION,
578 PK_GROUP_ENUM_MAPS,
579 PK_GROUP_ENUM_MULTIMEDIA,
580 PK_GROUP_ENUM_NETWORK,
581 PK_GROUP_ENUM_OFFICE,
582 PK_GROUP_ENUM_OTHER,
583 PK_GROUP_ENUM_POWER_MANAGEMENT,
584 PK_GROUP_ENUM_PROGRAMMING,
585 PK_GROUP_ENUM_PUBLISHING,
586 PK_GROUP_ENUM_REPOS,
587 PK_GROUP_ENUM_SECURITY,
588 PK_GROUP_ENUM_SERVERS,
589 PK_GROUP_ENUM_SYSTEM,
590 PK_GROUP_ENUM_VIRTUALIZATION,
591 PK_GROUP_ENUM_SCIENCE,
592 PK_GROUP_ENUM_DOCUMENTATION,
593 PK_GROUP_ENUM_ELECTRONICS,
594 PK_GROUP_ENUM_COLLECTIONS,
595 PK_GROUP_ENUM_VENDOR,
596 PK_GROUP_ENUM_NEWEST,
597 PK_GROUP_ENUM_DESKTOP_DDE,
598 PK_GROUP_ENUM_LAST
599 } PkGroupEnum;
600
601 /**
602 * PkUpdateStateEnum:
603 * @PK_UPDATE_STATE_ENUM_UNKNOWN: Update stability unknown
604 * @PK_UPDATE_STATE_ENUM_STABLE: Update is a stable release
605 * @PK_UPDATE_STATE_ENUM_UNSTABLE: Update is an unstable release
606 * @PK_UPDATE_STATE_ENUM_TESTING: Update is a testing release
607 * @PK_UPDATE_STATE_ENUM_LAST:
608 *
609 * What state the update is in
610 **/
611 typedef enum {
612 PK_UPDATE_STATE_ENUM_UNKNOWN,
613 PK_UPDATE_STATE_ENUM_STABLE,
614 PK_UPDATE_STATE_ENUM_UNSTABLE,
615 PK_UPDATE_STATE_ENUM_TESTING,
616 PK_UPDATE_STATE_ENUM_LAST
617 } PkUpdateStateEnum;
618
619 /**
620 * PkInfoEnum:
621 * @PK_INFO_ENUM_UNKNOWN: Package status is unknown
622 * @PK_INFO_ENUM_INSTALLED: Package is installed
623 * @PK_INFO_ENUM_AVAILABLE: Package is available to be installed
624 * @PK_INFO_ENUM_LOW: Package update has a low priority
625 * @PK_INFO_ENUM_ENHANCEMENT: Package update is an enhancement
626 * @PK_INFO_ENUM_NORMAL: Package update has normal priority
627 * @PK_INFO_ENUM_BUGFIX: Package update fixes bugs
628 * @PK_INFO_ENUM_IMPORTANT: Package update is important
629 * @PK_INFO_ENUM_SECURITY: Package update contains a security fix
630 * @PK_INFO_ENUM_BLOCKED: Package is blocked
631 * @PK_INFO_ENUM_DOWNLOADING: Package is being downloaded
632 * @PK_INFO_ENUM_UPDATING: Package is updating
633 * @PK_INFO_ENUM_INSTALLING: Package is being installed
634 * @PK_INFO_ENUM_REMOVING: Package is being removed
635 * @PK_INFO_ENUM_CLEANUP: Package is running cleanup
636 * @PK_INFO_ENUM_OBSOLETING: Package is being obsoleted
637 * @PK_INFO_ENUM_COLLECTION_INSTALLED:
638 * @PK_INFO_ENUM_COLLECTION_AVAILABLE:
639 * @PK_INFO_ENUM_FINISHED:
640 * @PK_INFO_ENUM_REINSTALLING: Package is being reinstalled
641 * @PK_INFO_ENUM_DOWNGRADING: Package is being downgraded
642 * @PK_INFO_ENUM_PREPARING: Package is preparing for installation/removal
643 * @PK_INFO_ENUM_DECOMPRESSING: Package is decompressing
644 * @PK_INFO_ENUM_UNTRUSTED:
645 * @PK_INFO_ENUM_TRUSTED:
646 * @PK_INFO_ENUM_UNAVAILABLE: Package is unavailable
647 * @PK_INFO_ENUM_CRITICAL: Package update severity is critical. Since: 1.2.4
648 * @PK_INFO_ENUM_INSTALL: Package is intended for installation. Since 1.3.0
649 * @PK_INFO_ENUM_REMOVE: Package is intended for removal. Since 1.3.0
650 * @PK_INFO_ENUM_OBSOLETE: Package is obsoleted. Since 1.3.0
651 * @PK_INFO_ENUM_DOWNGRADE: Package is intended for downgrade. Since 1.3.0
652 * @PK_INFO_ENUM_LAST:
653 *
654 * The enumerated types used in Package() - these have to refer to a specific
655 * package action, rather than a general state
656 **/
657 typedef enum {
658 PK_INFO_ENUM_UNKNOWN,
659 PK_INFO_ENUM_INSTALLED,
660 PK_INFO_ENUM_AVAILABLE,
661 PK_INFO_ENUM_LOW,
662 PK_INFO_ENUM_ENHANCEMENT,
663 PK_INFO_ENUM_NORMAL,
664 PK_INFO_ENUM_BUGFIX,
665 PK_INFO_ENUM_IMPORTANT,
666 PK_INFO_ENUM_SECURITY,
667 PK_INFO_ENUM_BLOCKED,
668 PK_INFO_ENUM_DOWNLOADING,
669 PK_INFO_ENUM_UPDATING,
670 PK_INFO_ENUM_INSTALLING,
671 PK_INFO_ENUM_REMOVING,
672 PK_INFO_ENUM_CLEANUP,
673 PK_INFO_ENUM_OBSOLETING,
674 PK_INFO_ENUM_COLLECTION_INSTALLED,
675 PK_INFO_ENUM_COLLECTION_AVAILABLE,
676 PK_INFO_ENUM_FINISHED,
677 PK_INFO_ENUM_REINSTALLING,
678 PK_INFO_ENUM_DOWNGRADING,
679 PK_INFO_ENUM_PREPARING,
680 PK_INFO_ENUM_DECOMPRESSING,
681 PK_INFO_ENUM_UNTRUSTED,
682 PK_INFO_ENUM_TRUSTED,
683 PK_INFO_ENUM_UNAVAILABLE,
684 PK_INFO_ENUM_CRITICAL,
685 PK_INFO_ENUM_INSTALL,
686 PK_INFO_ENUM_REMOVE,
687 PK_INFO_ENUM_OBSOLETE,
688 PK_INFO_ENUM_DOWNGRADE,
689 PK_INFO_ENUM_LAST
690 } PkInfoEnum;
691
692 /**
693 * PkDistroUpgradeEnum:
694 * @PK_DISTRO_UPGRADE_ENUM_UNKNOWN: Unknown disto upgrade state
695 * @PK_DISTRO_UPGRADE_ENUM_STABLE: Upgraded to stable release
696 * @PK_DISTRO_UPGRADE_ENUM_UNSTABLE: Upgraded to unstable release
697 * @PK_DISTRO_UPGRADE_ENUM_LAST:
698 *
699 * The distro upgrade status
700 **/
701 typedef enum {
702 PK_DISTRO_UPGRADE_ENUM_UNKNOWN,
703 PK_DISTRO_UPGRADE_ENUM_STABLE,
704 PK_DISTRO_UPGRADE_ENUM_UNSTABLE,
705 PK_DISTRO_UPGRADE_ENUM_LAST
706 } PkDistroUpgradeEnum;
707
708 /**
709 * PkSigTypeEnum:
710 * @PK_SIGTYPE_ENUM_UNKNOWN: Unkwown signature type
711 * @PK_SIGTYPE_ENUM_GPG: GPG signature
712 * @PK_SIGTYPE_ENUM_LAST:
713 *
714 * The signature type type
715 **/
716 typedef enum {
717 PK_SIGTYPE_ENUM_UNKNOWN,
718 PK_SIGTYPE_ENUM_GPG,
719 PK_SIGTYPE_ENUM_LAST
720 } PkSigTypeEnum;
721
722 /**
723 * PkMediaTypeEnum:
724 * @PK_MEDIA_TYPE_ENUM_UNKNOWN: Unknown media type
725 * @PK_MEDIA_TYPE_ENUM_CD: Media is a CD
726 * @PK_MEDIA_TYPE_ENUM_DVD: Media is a DVD
727 * @PK_MEDIA_TYPE_ENUM_DISC: Media is a disc (not CD or DVD)
728 * @PK_MEDIA_TYPE_ENUM_LAST:
729 *
730 * The media type
731 **/
732 typedef enum {
733 PK_MEDIA_TYPE_ENUM_UNKNOWN,
734 PK_MEDIA_TYPE_ENUM_CD,
735 PK_MEDIA_TYPE_ENUM_DVD,
736 PK_MEDIA_TYPE_ENUM_DISC,
737 PK_MEDIA_TYPE_ENUM_LAST
738 } PkMediaTypeEnum;
739
740 /**
741 * PkAuthorizeEnum:
742 * @PK_AUTHORIZE_ENUM_UNKNOWN: Unknown authorization status
743 * @PK_AUTHORIZE_ENUM_YES: Authorized
744 * @PK_AUTHORIZE_ENUM_NO: Not authorized
745 * @PK_AUTHORIZE_ENUM_INTERACTIVE: Interaction required for authorization
746 * @PK_AUTHORIZE_ENUM_LAST:
747 *
748 * The authorization result
749 **/
750 typedef enum {
751 PK_AUTHORIZE_ENUM_UNKNOWN,
752 PK_AUTHORIZE_ENUM_YES,
753 PK_AUTHORIZE_ENUM_NO,
754 PK_AUTHORIZE_ENUM_INTERACTIVE,
755 PK_AUTHORIZE_ENUM_LAST
756 } PkAuthorizeEnum;
757
758 /**
759 * PkUpgradeKindEnum:
760 * @PK_UPGRADE_KIND_ENUM_UNKNOWN:
761 * @PK_UPGRADE_KIND_ENUM_MINIMAL: Perform minimal upgrade
762 * @PK_UPGRADE_KIND_ENUM_DEFAULT: Perform default upgrade
763 * @PK_UPGRADE_KIND_ENUM_COMPLETE: Perform complete upgrade
764 * @PK_UPGRADE_KIND_ENUM_LAST:
765 *
766 * The type of distribution upgrade to perform
767 **/
768 typedef enum {
769 PK_UPGRADE_KIND_ENUM_UNKNOWN,
770 PK_UPGRADE_KIND_ENUM_MINIMAL,
771 PK_UPGRADE_KIND_ENUM_DEFAULT,
772 PK_UPGRADE_KIND_ENUM_COMPLETE,
773 PK_UPGRADE_KIND_ENUM_LAST
774 } PkUpgradeKindEnum;
775
776 /**
777 * PkTransactionFlagEnum:
778 * @PK_TRANSACTION_FLAG_ENUM_NONE: No transaction flag
779 * @PK_TRANSACTION_FLAG_ENUM_ONLY_TRUSTED: Only allow trusted packages
780 * @PK_TRANSACTION_FLAG_ENUM_SIMULATE: Simulate transaction
781 * @PK_TRANSACTION_FLAG_ENUM_ONLY_DOWNLOAD: Only download packages
782 * @PK_TRANSACTION_FLAG_ENUM_ALLOW_REINSTALL: Allow package reinstallation
783 * @PK_TRANSACTION_FLAG_ENUM_JUST_REINSTALL: Only allow package reinstallation
784 * @PK_TRANSACTION_FLAG_ENUM_ALLOW_DOWNGRADE: Allow packages to be downgraded
785 * @PK_TRANSACTION_FLAG_ENUM_LAST:
786 *
787 * The transaction flags that alter how the transaction is handled
788 **/
789 typedef enum {
790 PK_TRANSACTION_FLAG_ENUM_NONE, /* Since: 0.8.1 */
791 PK_TRANSACTION_FLAG_ENUM_ONLY_TRUSTED, /* Since: 0.8.1 */
792 PK_TRANSACTION_FLAG_ENUM_SIMULATE, /* Since: 0.8.1 */
793 PK_TRANSACTION_FLAG_ENUM_ONLY_DOWNLOAD, /* Since: 0.8.1 */
794 PK_TRANSACTION_FLAG_ENUM_ALLOW_REINSTALL, /* Since: 1.0.2 */
795 PK_TRANSACTION_FLAG_ENUM_JUST_REINSTALL, /* Since: 1.0.2 */
796 PK_TRANSACTION_FLAG_ENUM_ALLOW_DOWNGRADE, /* Since: 1.0.2 */
797 PK_TRANSACTION_FLAG_ENUM_LAST /* Since: 0.8.1 */
798 } PkTransactionFlagEnum;
799
800 /* general */
801 guint pk_enum_find_value (const PkEnumMatch *table,
802 const gchar *string)
803 G_GNUC_WARN_UNUSED_RESULT;
804 const gchar *pk_enum_find_string (const PkEnumMatch *table,
805 guint value)
806 G_GNUC_WARN_UNUSED_RESULT;
807
808 PkSigTypeEnum pk_sig_type_enum_from_string (const gchar *sig_type);
809 const gchar *pk_sig_type_enum_to_string (PkSigTypeEnum sig_type);
810
811 PkInfoEnum pk_info_enum_from_string (const gchar *info);
812 const gchar *pk_info_enum_to_string (PkInfoEnum info);
813
814 PkUpdateStateEnum pk_update_state_enum_from_string (const gchar *update_state);
815 const gchar *pk_update_state_enum_to_string (PkUpdateStateEnum update_state);
816
817 PkExitEnum pk_exit_enum_from_string (const gchar *exit);
818 const gchar *pk_exit_enum_to_string (PkExitEnum exit);
819
820 PkNetworkEnum pk_network_enum_from_string (const gchar *network);
821 const gchar *pk_network_enum_to_string (PkNetworkEnum network);
822
823 PkStatusEnum pk_status_enum_from_string (const gchar *status);
824 const gchar *pk_status_enum_to_string (PkStatusEnum status);
825
826 PkRoleEnum pk_role_enum_from_string (const gchar *role);
827 const gchar *pk_role_enum_to_string (PkRoleEnum role);
828
829 PkErrorEnum pk_error_enum_from_string (const gchar *code);
830 const gchar *pk_error_enum_to_string (PkErrorEnum code);
831
832 PkRestartEnum pk_restart_enum_from_string (const gchar *restart);
833 const gchar *pk_restart_enum_to_string (PkRestartEnum restart);
834
835 PkGroupEnum pk_group_enum_from_string (const gchar *group);
836 const gchar *pk_group_enum_to_string (PkGroupEnum group);
837
838 PkFilterEnum pk_filter_enum_from_string (const gchar *filter);
839 const gchar *pk_filter_enum_to_string (PkFilterEnum filter);
840
841 PkDistroUpgradeEnum pk_distro_upgrade_enum_from_string (const gchar *upgrade);
842 const gchar *pk_distro_upgrade_enum_to_string (PkDistroUpgradeEnum upgrade);
843
844 PkMediaTypeEnum pk_media_type_enum_from_string (const gchar *media_type);
845 const gchar *pk_media_type_enum_to_string (PkMediaTypeEnum media_type);
846
847 PkAuthorizeEnum pk_authorize_type_enum_from_string (const gchar *authorize_type);
848 const gchar *pk_authorize_type_enum_to_string (PkAuthorizeEnum authorize_type);
849
850 PkUpgradeKindEnum pk_upgrade_kind_enum_from_string (const gchar *upgrade_kind);
851 const gchar *pk_upgrade_kind_enum_to_string (PkUpgradeKindEnum upgrade_kind);
852
853 PkTransactionFlagEnum pk_transaction_flag_enum_from_string (const gchar *transaction_flag);
854 const gchar *pk_transaction_flag_enum_to_string (PkTransactionFlagEnum transaction_flag);
855
856 const gchar *pk_status_enum_to_localised_text (PkStatusEnum status);
857 const gchar *pk_info_enum_to_localised_past (PkInfoEnum info);
858 const gchar *pk_info_enum_to_localised_present (PkInfoEnum info);
859 const gchar *pk_role_enum_to_localised_present (PkRoleEnum role);
860
861 G_END_DECLS
862
863 #endif /* __PK_ENUM_H */