/usr/include/PackageKit/plugin/pk-backend.h is in libpackagekit-glib2-dev 0.8.17-4ubuntu6~gcc5.4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2007-2012 Richard Hughes <richard@hughsie.com>
*
* Licensed under the GNU General Public License Version 2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __PK_BACKEND_H
#define __PK_BACKEND_H
#include <glib.h>
#include <glib-object.h>
#include <gmodule.h>
/* these include the includes the backends should be using */
#include <packagekit-glib2/pk-enum.h>
#include <packagekit-glib2/pk-common.h>
#include <packagekit-glib2/pk-bitfield.h>
#include <packagekit-glib2/pk-package-id.h>
#include <packagekit-glib2/pk-package-ids.h>
#include <packagekit-glib2/pk-bitfield.h>
#include "pk-backend.h"
#include "pk-backend-job.h"
G_BEGIN_DECLS
#define PK_TYPE_BACKEND (pk_backend_get_type ())
#define PK_BACKEND(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_BACKEND, PkBackend))
#define PK_BACKEND_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_BACKEND, PkBackendClass))
#define PK_IS_BACKEND(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_BACKEND))
#define PK_IS_BACKEND_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_BACKEND))
#define PK_BACKEND_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_BACKEND, PkBackendClass))
typedef struct PkBackendPrivate PkBackendPrivate;
typedef struct
{
GObject parent;
PkBackendPrivate *priv;
} PkBackend;
typedef struct
{
GObjectClass parent_class;
} PkBackendClass;
/**
* PK_BACKEND_PERCENTAGE_INVALID:
*
* The unknown percentage value
*/
#define PK_BACKEND_PERCENTAGE_INVALID 101
GType pk_backend_get_type (void);
PkBackend *pk_backend_new (void);
/* utililties */
gboolean pk_backend_load (PkBackend *backend,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;
gboolean pk_backend_unload (PkBackend *backend)
G_GNUC_WARN_UNUSED_RESULT;
gboolean pk_backend_is_implemented (PkBackend *backend,
PkRoleEnum role);
void pk_backend_implement (PkBackend *backend,
PkRoleEnum role);
gchar *pk_backend_get_accepted_eula_string (PkBackend *backend);
gboolean pk_backend_repo_list_changed (PkBackend *backend);
const gchar *pk_backend_bool_to_string (gboolean value);
gboolean pk_backend_is_online (PkBackend *backend);
/* config changed functions */
typedef void (*PkBackendFileChanged) (PkBackend *backend,
gpointer data);
gboolean pk_backend_watch_file (PkBackend *backend,
const gchar *filename,
PkBackendFileChanged func,
gpointer data);
/* call into the backend using a vfunc */
const gchar *pk_backend_get_name (PkBackend *backend)
G_GNUC_WARN_UNUSED_RESULT;
const gchar *pk_backend_get_description (PkBackend *backend)
G_GNUC_WARN_UNUSED_RESULT;
const gchar *pk_backend_get_author (PkBackend *backend)
G_GNUC_WARN_UNUSED_RESULT;
PkBitfield pk_backend_get_groups (PkBackend *backend);
PkBitfield pk_backend_get_filters (PkBackend *backend);
PkBitfield pk_backend_get_roles (PkBackend *backend);
PkBitfield pk_backend_get_provides (PkBackend *backend);
gchar **pk_backend_get_mime_types (PkBackend *backend);
gboolean pk_backend_supports_parallelization (PkBackend *backend);
void pk_backend_initialize (PkBackend *backend);
void pk_backend_destroy (PkBackend *backend);
void pk_backend_start_job (PkBackend *backend,
PkBackendJob *job);
void pk_backend_reset_job (PkBackend *backend,
PkBackendJob *job);
void pk_backend_stop_job (PkBackend *backend,
PkBackendJob *job);
void pk_backend_cancel (PkBackend *backend,
PkBackendJob *job);
void pk_backend_download_packages (PkBackend *backend,
PkBackendJob *job,
gchar **package_ids,
const gchar *directory);
void pk_backend_get_categories (PkBackend *backend,
PkBackendJob *job);
void pk_backend_get_depends (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **package_ids,
gboolean recursive);
void pk_backend_get_details (PkBackend *backend,
PkBackendJob *job,
gchar **package_ids);
void pk_backend_get_distro_upgrades (PkBackend *backend,
PkBackendJob *job);
void pk_backend_get_files (PkBackend *backend,
PkBackendJob *job,
gchar **package_ids);
void pk_backend_get_requires (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **package_ids,
gboolean recursive);
void pk_backend_get_update_detail (PkBackend *backend,
PkBackendJob *job,
gchar **package_ids);
void pk_backend_get_updates (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters);
void pk_backend_install_packages (PkBackend *backend,
PkBackendJob *job,
PkBitfield transaction_flags,
gchar **package_ids);
void pk_backend_install_signature (PkBackend *backend,
PkBackendJob *job,
PkSigTypeEnum type,
const gchar *key_id,
const gchar *package_id);
void pk_backend_install_files (PkBackend *backend,
PkBackendJob *job,
PkBitfield transaction_flags,
gchar **full_paths);
void pk_backend_refresh_cache (PkBackend *backend,
PkBackendJob *job,
gboolean force);
void pk_backend_remove_packages (PkBackend *backend,
PkBackendJob *job,
PkBitfield transaction_flags,
gchar **package_ids,
gboolean allow_deps,
gboolean autoremove);
void pk_backend_resolve (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **packages);
void pk_backend_search_details (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **search);
void pk_backend_search_files (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **search);
void pk_backend_search_groups (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **search);
void pk_backend_search_names (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
gchar **search);
void pk_backend_update_packages (PkBackend *backend,
PkBackendJob *job,
PkBitfield transaction_flags,
gchar **package_ids);
void pk_backend_get_repo_list (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters);
void pk_backend_repo_enable (PkBackend *backend,
PkBackendJob *job,
const gchar *repo_id,
gboolean enabled);
void pk_backend_repo_set_data (PkBackend *backend,
PkBackendJob *job,
const gchar *repo_id,
const gchar *parameter,
const gchar *value);
void pk_backend_what_provides (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters,
PkProvidesEnum provides,
gchar **search);
void pk_backend_get_packages (PkBackend *backend,
PkBackendJob *job,
PkBitfield filters);
void pk_backend_upgrade_system (PkBackend *backend,
PkBackendJob *job,
const gchar *distro_id,
PkUpgradeKindEnum upgrade_kind);
void pk_backend_repair_system (PkBackend *backend,
PkBackendJob *job,
PkBitfield transaction_flags);
/* global backend state */
void pk_backend_accept_eula (PkBackend *backend,
const gchar *eula_id);
gboolean pk_backend_is_eula_valid (PkBackend *backend,
const gchar *eula_id);
G_END_DECLS
#endif /* __PK_BACKEND_H */
|