[gnome-online-accounts] provider: Clean up the public header



commit 583b9d0f63b1a3f007981904c23d98786a9d1f96
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jan 13 17:17:21 2014 +0100

    provider: Clean up the public header
    
    We do not support out-of-tree providers. Therefore, there is no need to
    export the definition of GoaProvider and GoaProviderClass.

 src/goabackend/goaoauth2provider.h |    3 +-
 src/goabackend/goaoauthprovider.h  |    3 +-
 src/goabackend/goaprovider-priv.h  |   82 +++++++++++++++++++++++++++++++++++-
 src/goabackend/goaprovider.h       |   80 -----------------------------------
 4 files changed, 85 insertions(+), 83 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider.h b/src/goabackend/goaoauth2provider.h
index 4c91998..fc55df5 100644
--- a/src/goabackend/goaoauth2provider.h
+++ b/src/goabackend/goaoauth2provider.h
@@ -1,6 +1,6 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /*
- * Copyright (C) 2011, 2012 Red Hat, Inc.
+ * Copyright (C) 2011, 2012, 2014 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
@@ -28,6 +28,7 @@
 #define __GOA_OAUTH2_PROVIDER_H__
 
 #include <goabackend/goaprovider.h>
+#include <goabackend/goaprovider-priv.h>
 #include <webkit/webkit.h>
 
 G_BEGIN_DECLS
diff --git a/src/goabackend/goaoauthprovider.h b/src/goabackend/goaoauthprovider.h
index 73e49fc..9ec1c29 100644
--- a/src/goabackend/goaoauthprovider.h
+++ b/src/goabackend/goaoauthprovider.h
@@ -1,6 +1,6 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /*
- * Copyright (C) 2011, 2012 Red Hat, Inc.
+ * Copyright (C) 2011, 2012, 2014 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
@@ -28,6 +28,7 @@
 #define __GOA_OAUTH_PROVIDER_H__
 
 #include <goabackend/goaprovider.h>
+#include <goabackend/goaprovider-priv.h>
 #include <rest/rest-proxy-call.h>
 #include <webkit/webkit.h>
 
diff --git a/src/goabackend/goaprovider-priv.h b/src/goabackend/goaprovider-priv.h
index 763e824..37f0019 100644
--- a/src/goabackend/goaprovider-priv.h
+++ b/src/goabackend/goaprovider-priv.h
@@ -1,6 +1,6 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013, 2014 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
@@ -30,6 +30,86 @@
 G_BEGIN_DECLS
 
 /**
+ * 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().
+ * @get_provider_group: Virtual function for goa_provider_get_provider_group().
+ * @get_provider_features: Virtual function for goa_provider_get_provider_features().
+ * @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().
+ * @show_account: Virtual function for goa_provider_show_account().
+ * @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);
+  void         (*show_account)      (GoaProvider         *provider,
+                                     GoaClient           *client,
+                                     GoaObject           *object,
+                                     GtkBox              *vbox,
+                                     GtkGrid             *grid,
+                                     GtkGrid             *dummy);
+  gboolean     (*build_object)      (GoaProvider        *provider,
+                                     GoaObjectSkeleton  *object,
+                                     GKeyFile           *key_file,
+                                     const gchar        *group,
+                                     GDBusConnection    *connection,
+                                     gboolean            just_added,
+                                     GError            **error);
+  /* virtual but with default implementation */
+  gboolean (*ensure_credentials_sync) (GoaProvider         *provider,
+                                       GoaObject           *object,
+                                       gint                *out_expires_in,
+                                       GCancellable        *cancellable,
+                                       GError             **error);
+  guint    (*get_credentials_generation) (GoaProvider   *provider);
+
+  /* pure virtual */
+  GoaProviderGroup (*get_provider_group) (GoaProvider   *provider);
+  GoaProviderFeatures  (*get_provider_features)     (GoaProvider   *provider);
+
+  /*< private >*/
+  /* Padding for future expansion */
+  gpointer goa_reserved[31];
+};
+
+/**
  * GOA_PROVIDER_EXTENSION_POINT_NAME:
  *
  * Extension point for #GoaProvider implementations.
diff --git a/src/goabackend/goaprovider.h b/src/goabackend/goaprovider.h
index c108fe0..0214dbd 100644
--- a/src/goabackend/goaprovider.h
+++ b/src/goabackend/goaprovider.h
@@ -43,86 +43,6 @@ G_BEGIN_DECLS
 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().
- * @get_provider_group: Virtual function for goa_provider_get_provider_group().
- * @get_provider_features: Virtual function for goa_provider_get_provider_features().
- * @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().
- * @show_account: Virtual function for goa_provider_show_account().
- * @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);
-  void         (*show_account)      (GoaProvider         *provider,
-                                     GoaClient           *client,
-                                     GoaObject           *object,
-                                     GtkBox              *vbox,
-                                     GtkGrid             *grid,
-                                     GtkGrid             *dummy);
-  gboolean     (*build_object)      (GoaProvider        *provider,
-                                     GoaObjectSkeleton  *object,
-                                     GKeyFile           *key_file,
-                                     const gchar        *group,
-                                     GDBusConnection    *connection,
-                                     gboolean            just_added,
-                                     GError            **error);
-  /* virtual but with default implementation */
-  gboolean (*ensure_credentials_sync) (GoaProvider         *provider,
-                                       GoaObject           *object,
-                                       gint                *out_expires_in,
-                                       GCancellable        *cancellable,
-                                       GError             **error);
-  guint    (*get_credentials_generation) (GoaProvider   *provider);
-
-  /* pure virtual */
-  GoaProviderGroup (*get_provider_group) (GoaProvider   *provider);
-  GoaProviderFeatures  (*get_provider_features)     (GoaProvider   *provider);
-
-  /*< private >*/
-  /* Padding for future expansion */
-  gpointer goa_reserved[31];
-};
-
 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]