[gnome-keyring] gcr: ABI fixes for gcr library



commit 273ddd8bc0df79ce8197cb91e4aac5337b351181
Author: Stef Walter <stefw collabora co uk>
Date:   Thu Aug 25 12:32:30 2011 +0200

    gcr: ABI fixes for gcr library
    
     * The gcr library has not iterated its major version
     * Move deprecated stuff into separate headers
     * Also fix problem with enum-types header.

 docs/reference/gcr/gcr-sections.txt |    1 +
 gcr/Makefile.am                     |   20 +++++++----
 gcr/gcr-deprecated.h                |   61 +++++++++++++++++++++++++++++++++++
 gcr/gcr-importer.h                  |    9 -----
 gcr/gcr-renderer.c                  |   17 ++++++++++
 gcr/gcr-types.h                     |    8 ----
 gcr/gcr.h                           |    8 +----
 7 files changed, 92 insertions(+), 32 deletions(-)
---
diff --git a/docs/reference/gcr/gcr-sections.txt b/docs/reference/gcr/gcr-sections.txt
index babaccf..0bd8c1c 100644
--- a/docs/reference/gcr/gcr-sections.txt
+++ b/docs/reference/gcr/gcr-sections.txt
@@ -359,6 +359,7 @@ GcrRendererIface
 gcr_renderer_create
 gcr_renderer_register
 gcr_renderer_popuplate_popup
+gcr_renderer_render
 gcr_renderer_render_view
 gcr_renderer_emit_data_changed
 <SUBSECTION Standard>
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index 456dc1e..b9d9d40 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -22,9 +22,7 @@ ui_DATA = \
 # ------------------------------------------------------------------
 # HEADERS
 
-incdir = $(includedir)/gcr- GCR_MAJOR@/gcr
-
-inc_HEADERS = \
+HEADER_FILES = \
 	gcr.h \
 	gcr-certificate.h \
 	gcr-certificate-basics-widget.h \
@@ -37,7 +35,7 @@ inc_HEADERS = \
 	gcr-column.h \
 	gcr-combo-selector.h \
 	gcr-comparable.h \
-	gcr-enum-types.h \
+	gcr-deprecated.h \
 	gcr-key-renderer.h \
 	gcr-key-widget.h \
 	gcr-importer.h \
@@ -55,6 +53,12 @@ inc_HEADERS = \
 	gcr-unlock-options-widget.h \
 	gcr-viewer.h
 
+incdir = $(includedir)/gcr- GCR_MAJOR@/gcr
+
+inc_HEADERS = \
+	$(HEADER_FILES) \
+	gcr-enum-types.h
+
 # ------------------------------------------------------------------
 # LIBRARY
 
@@ -156,13 +160,13 @@ gcr-marshal.c: gcr-marshal.list $(GLIB_GENMARSHAL)
 	$(AM_V_GEN) ( echo "#include \"gcr-marshal.h\"" > $@ && \
 		$(GLIB_GENMARSHAL) $< --body --prefix=_gcr_marshal >> $@ )
 
-gcr-enum-types.h: $(inc_HEADERS) gcr-enum-types.h.template
+gcr-enum-types.h: $(HEADER_FILES) gcr-enum-types.h.template
 	$(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
-		$(inc_HEADERS) > $@
+		$(HEADER_FILES) > $@
 
-gcr-enum-types.c: $(inc_HEADERS) gcr-enum-types.c.template
+gcr-enum-types.c: $(HEADER_FILES) gcr-enum-types.c.template
 	$(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
-		$(inc_HEADERS) > $@
+		$(HEADER_FILES) > $@
 
 gcr-oids.c: gcr-oids.list gcr-mkoids
 	$(AM_V_GEN) sh gcr-mkoids -p GCR -c gcr-oids.c -h gcr-oids.h gcr-oids.list
diff --git a/gcr/gcr-deprecated.h b/gcr/gcr-deprecated.h
new file mode 100644
index 0000000..bb88629
--- /dev/null
+++ b/gcr/gcr-deprecated.h
@@ -0,0 +1,61 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2011 Collabora Ltd.
+ *
+ * This program 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.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Author: Stef Walter <stefw collabora co uk>
+ */
+
+#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> can be included directly."
+#endif
+
+
+#ifndef GCR_DEPRECATED_H_
+#define GCR_DEPRECATED_H_
+
+#include <glib.h>
+
+#include <gck/gck.h>
+
+#include "gcr-importer.h"
+#include "gcr-parser.h"
+#include "gcr-viewer.h"
+
+#ifndef GCR_DISABLE_DEPRECATED
+
+#include "gcr-certificate-basics-widget.h"
+#include "gcr-certificate-details-widget.h"
+
+void              gcr_renderer_render                         (GcrRenderer *self,
+                                                               GcrViewer *viewer);
+
+GcrParser*        gcr_importer_get_parser                     (GcrImporter *self);
+
+void              gcr_importer_set_parser                     (GcrImporter *self,
+                                                               GcrParser *parser);
+
+#define           GCR_ERROR                                   (gcr_error_get_domain ())
+
+GQuark            gcr_error_get_domain                        (void) G_GNUC_CONST;
+
+#endif /* GCR_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
+#endif /* GCRTYPES_H_ */
diff --git a/gcr/gcr-importer.h b/gcr/gcr-importer.h
index ae25bfa..077ce1a 100644
--- a/gcr/gcr-importer.h
+++ b/gcr/gcr-importer.h
@@ -99,15 +99,6 @@ gboolean                  gcr_importer_import_finish          (GcrImporter *self
                                                                GAsyncResult *result,
                                                                GError **error);
 
-#ifndef GCR_DISABLE_DEPRECATED
-
-GcrParser*                gcr_importer_get_parser             (GcrImporter *self);
-
-void                      gcr_importer_set_parser             (GcrImporter *self,
-                                                               GcrParser *parser);
-
-#endif /* GCR_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* __GCR_IMPORTER_H__ */
diff --git a/gcr/gcr-renderer.c b/gcr/gcr-renderer.c
index 7014239..54e4216 100644
--- a/gcr/gcr-renderer.c
+++ b/gcr/gcr-renderer.c
@@ -21,6 +21,7 @@
 
 #include "config.h"
 
+#include "gcr-deprecated.h"
 #include "gcr-renderer.h"
 
 #include "gck/gck.h"
@@ -140,6 +141,22 @@ gcr_renderer_render_view (GcrRenderer *self, GcrViewer *viewer)
 }
 
 /**
+ * gcr_renderer_render:
+ * @self: the renderer
+ * @viewer: the viewer to render to
+ *
+ * Render a renderer to the viewer.
+ *
+ * Deprecated: 3.2: Use gcr_renderer_render_view() instead
+ */
+void
+gcr_renderer_render (GcrRenderer *self,
+                     GcrViewer *viewer)
+{
+	gcr_renderer_render_view (self, viewer);
+}
+
+/**
  * gcr_renderer_popuplate_popup:
  * @self: The renderer
  * @viewer: The viewer that is displaying a popup
diff --git a/gcr/gcr-types.h b/gcr/gcr-types.h
index 86b2e8c..ba6d85c 100644
--- a/gcr/gcr-types.h
+++ b/gcr/gcr-types.h
@@ -47,14 +47,6 @@ G_BEGIN_DECLS
 
 GQuark 	            gcr_data_error_get_domain         (void) G_GNUC_CONST;
 
-#ifndef GCR_DISABLE_DEPRECATED
-
-#define             GCR_ERROR                         (gcr_error_get_domain ())
-
-GQuark              gcr_error_get_domain              (void) G_GNUC_CONST;
-
-#endif /* GCR_DISABLE_DEPRECATED */
-
 typedef enum {
 	GCR_ERROR_FAILURE = -1,
 	GCR_ERROR_UNRECOGNIZED = 1,
diff --git a/gcr/gcr.h b/gcr/gcr.h
index a925e4e..0b789fc 100644
--- a/gcr/gcr.h
+++ b/gcr/gcr.h
@@ -41,6 +41,7 @@
 #include "gcr-collection-model.h"
 #include "gcr-column.h"
 #include "gcr-combo-selector.h"
+#include "gcr-deprecated.h"
 #include "gcr-enum-types.h"
 #include "gcr-key-renderer.h"
 #include "gcr-key-widget.h"
@@ -58,13 +59,6 @@
 #include "gcr-unlock-options-widget.h"
 #include "gcr-viewer.h"
 
-#ifndef GCR_DISABLE_DEPRECATED
-
-#include "gcr-certificate-basics-widget.h"
-#include "gcr-certificate-details-widget.h"
-
-#endif /* GCR_DISABLE_DEPRECATED */
-
 #undef __GCR_H_INSIDE__
 
 #endif /* __GCR_H__ */



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