/usr/include/goa-1.0/goabackend/goaprovider.h is in libgoa-1.0-dev 3.4.0-0ubuntu1.
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 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2011 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#if !defined (__GOA_BACKEND_INSIDE_GOA_BACKEND_H__) && !defined (GOA_BACKEND_COMPILATION)
#error "Only <goabackend/goabackend.h> can be included directly."
#endif
#ifndef __GOA_PROVIDER_H__
#define __GOA_PROVIDER_H__
#include <goabackend/goabackendtypes.h>
G_BEGIN_DECLS
#define GOA_TYPE_PROVIDER (goa_provider_get_type ())
#define GOA_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOA_TYPE_PROVIDER, GoaProvider))
#define GOA_PROVIDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOA_TYPE_PROVIDER, GoaProviderClass))
#define GOA_PROVIDER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOA_TYPE_PROVIDER, GoaProviderClass))
#define GOA_IS_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOA_TYPE_PROVIDER))
#define GOA_IS_PROVIDER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOA_TYPE_PROVIDER))
typedef struct _GoaProviderClass GoaProviderClass;
typedef struct _GoaProviderPrivate GoaProviderPrivate;
/**
* GoaProvider:
*
* The #GoaProvider structure contains only private data and should
* only be accessed using the provided API.
*/
struct _GoaProvider
{
/*< private >*/
GObject parent_instance;
GoaProviderPrivate *priv;
};
/**
* GoaProviderClass:
* @parent_class: The parent class.
* @get_provider_type: Virtual function for goa_provider_get_provider_type().
* @get_provider_name: Virtual function for goa_provider_get_provider_name().
* @get_provider_icon: Virtual function for goa_provider_get_provider_icon().
* @add_account: Virtual function for goa_provider_add_account().
* @refresh_account: Virtual function for goa_provider_refresh_account().
* @build_object: Virtual function for goa_provider_build_object().
* @ensure_credentials_sync: Virtual function for goa_provider_ensure_credentials_sync().
* @get_credentials_generation: Virtual function for goa_provider_get_credentials_generation().
*
* Class structure for #GoaProvider.
*/
struct _GoaProviderClass
{
GObjectClass parent_class;
/* pure virtual */
const gchar *(*get_provider_type) (GoaProvider *provider);
gchar *(*get_provider_name) (GoaProvider *provider,
GoaObject *object);
GIcon *(*get_provider_icon) (GoaProvider *provider,
GoaObject *object);
GoaObject *(*add_account) (GoaProvider *provider,
GoaClient *client,
GtkDialog *dialog,
GtkBox *vbox,
GError **error);
gboolean (*refresh_account) (GoaProvider *provider,
GoaClient *client,
GoaObject *object,
GtkWindow *parent,
GError **error);
gboolean (*build_object) (GoaProvider *provider,
GoaObjectSkeleton *object,
GKeyFile *key_file,
const gchar *group,
GError **error);
/* virtual but with default implementation */
gboolean (*ensure_credentials_sync) (GoaProvider *provider,
GoaObject *object,
gint *out_expires_in,
GCancellable *cancellable,
GError **error);
void (*show_account) (GoaProvider *provider,
GoaClient *client,
GoaObject *object,
GtkBox *vbox,
GtkTable *table);
guint (*get_credentials_generation) (GoaProvider *provider);
/*< private >*/
/* Padding for future expansion */
gpointer goa_reserved[32];
};
GType goa_provider_get_type (void) G_GNUC_CONST;
const gchar *goa_provider_get_provider_type (GoaProvider *provider);
gchar *goa_provider_get_provider_name (GoaProvider *provider,
GoaObject *object);
GIcon *goa_provider_get_provider_icon (GoaProvider *provider,
GoaObject *object);
GoaObject *goa_provider_add_account (GoaProvider *provider,
GoaClient *client,
GtkDialog *dialog,
GtkBox *vbox,
GError **error);
gboolean goa_provider_refresh_account (GoaProvider *provider,
GoaClient *client,
GoaObject *object,
GtkWindow *parent,
GError **error);
void goa_provider_show_account (GoaProvider *provider,
GoaClient *client,
GoaObject *object,
GtkBox *vbox,
GtkTable *table);
gboolean goa_provider_build_object (GoaProvider *provider,
GoaObjectSkeleton *object,
GKeyFile *key_file,
const gchar *group,
GError **error);
gboolean goa_provider_store_credentials_sync (GoaProvider *provider,
GoaObject *object,
GVariant *credentials,
GCancellable *cancellable,
GError **error);
GVariant *goa_provider_lookup_credentials_sync (GoaProvider *provider,
GoaObject *object,
GCancellable *cancellable,
GError **error);
void goa_provider_ensure_credentials (GoaProvider *provider,
GoaObject *object,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean goa_provider_ensure_credentials_finish (GoaProvider *provider,
gint *out_expires_in,
GAsyncResult *res,
GError **error);
gboolean goa_provider_ensure_credentials_sync (GoaProvider *provider,
GoaObject *object,
gint *out_expires_in,
GCancellable *cancellable,
GError **error);
guint goa_provider_get_credentials_generation (GoaProvider *provider);
/**
* GOA_PROVIDER_EXTENSION_POINT_NAME:
*
* Extension point for #GoaProvider implementations.
*/
#define GOA_PROVIDER_EXTENSION_POINT_NAME "goa-backend-provider"
GList *goa_provider_get_all (void);
GoaProvider *goa_provider_get_for_provider_type (const gchar *provider_type);
/* ---------------------------------------------------------------------------------------------------- */
GtkWidget *goa_util_add_heading (GtkTable *table,
const gchar *heading_text);
GtkWidget *goa_util_add_row_widget (GtkTable *table,
const gchar *label_text,
GtkWidget *widget);
GtkWidget *goa_util_add_row_label (GtkTable *table,
const gchar *label_text,
const gchar *value_markup);
gchar *
goa_util_lookup_keyfile_string (GoaObject *object,
const gchar *key);
gboolean
goa_util_lookup_keyfile_boolean (GoaObject *object,
const gchar *key);
GtkWidget *goa_util_add_row_editable_label_from_keyfile (GtkTable *table,
GoaObject *object,
const gchar *label_text,
const gchar *key,
gboolean editable);
GtkWidget *goa_util_add_row_switch_from_keyfile (GtkTable *table,
GoaObject *object,
const gchar *label_text,
const gchar *key);
GtkWidget *
goa_util_add_row_check_button_from_keyfile (GtkTable *table,
GoaObject *object,
const gchar *label_text,
const gchar *key,
const gchar *value_mnemonic);
G_END_DECLS
#endif /* __GOA_PROVIDER_H__ */
|