Split the gcr library into base and ui components.
authorStef Walter <stefw@collabora.co.uk>
Mon, 26 Sep 2011 09:58:33 +0000 (11:58 +0200)
committerStef Walter <stefw@collabora.co.uk>
Mon, 26 Sep 2011 09:58:33 +0000 (11:58 +0200)
 * Different pkg-config files gcr-3.pc and gcr-base-3.pc
 * The base library doesn't link to GTK+ or anything that
   is used in the UI. It can be used by non-ui programs.

57 files changed:
gcr/Makefile.am
gcr/gcr-base.h [new file with mode: 0644]
gcr/gcr-base.pc.in [new file with mode: 0644]
gcr/gcr-base.symbols [new file with mode: 0644]
gcr/gcr-certificate-chain.h
gcr/gcr-certificate-exporter.h
gcr/gcr-certificate-extensions.h
gcr/gcr-certificate-renderer.h
gcr/gcr-certificate-widget.h
gcr/gcr-certificate.h
gcr/gcr-combo-selector.c
gcr/gcr-deprecated-base.h [new file with mode: 0644]
gcr/gcr-deprecated.h
gcr/gcr-enum-types.c.template
gcr/gcr-enum-types.h.template
gcr/gcr-failure-renderer.h
gcr/gcr-gnupg-collection.h
gcr/gcr-gnupg-key.c
gcr/gcr-gnupg-key.h
gcr/gcr-gnupg-process.h
gcr/gcr-gnupg-util.h
gcr/gcr-import-dialog.c
gcr/gcr-importer.c
gcr/gcr-importer.h
gcr/gcr-key-renderer.h
gcr/gcr-key-widget.h
gcr/gcr-library.c
gcr/gcr-library.h
gcr/gcr-list-selector.c
gcr/gcr-memory.c [new file with mode: 0644]
gcr/gcr-parser.h
gcr/gcr-pkcs11-certificate.h
gcr/gcr-record.h
gcr/gcr-simple-certificate.h
gcr/gcr-simple-collection.c
gcr/gcr-simple-collection.h
gcr/gcr-tree-selector.c
gcr/gcr-trust.c
gcr/gcr-trust.h
gcr/gcr-types.h
gcr/gcr-union-collection.h
gcr/gcr-unlock-options-widget.h
gcr/gcr-unlock-renderer.h
gcr/gcr.h
gcr/gcr.pc.in
gcr/gcr.symbols
gcr/tests/frob-parser.c
gcr/tests/test-certificate-chain.c
gcr/tests/test-certificate.c
gcr/tests/test-fingerprint.c
gcr/tests/test-gnupg-collection.c
gcr/tests/test-gnupg-process.c
gcr/tests/test-parser.c
gcr/tests/test-pkcs11-certificate.c
gcr/tests/test-simple-certificate.c
gcr/tests/test-trust.c
gcr/tests/test-util.c

index 9108855..d7baeeb 100644 (file)
@@ -1,4 +1,3 @@
-
 if WITH_TESTS
 TESTS_DIR = tests
 TESTABLE_LIB = libgcr-testable.la
@@ -22,35 +21,39 @@ ui_DATA = \
 # ------------------------------------------------------------------
 # HEADERS
 
-HEADER_FILES = \
-       gcr.h \
+HEADER_BASE_FILES = \
+       gcr-base.h \
        gcr-certificate.h \
-       gcr-certificate-basics-widget.h \
        gcr-certificate-chain.h \
+       gcr-collection.h \
+       gcr-comparable.h \
+       gcr-deprecated-base.h \
+       gcr-library.h \
+       gcr-parser.h \
+       gcr-pkcs11-certificate.h \
+       gcr-simple-certificate.h \
+       gcr-trust.h \
+       gcr-types.h \
+       gcr-union-collection.h \
+       gcr-unlock-options.h
+
+HEADER_UI_FILES = \
+       gcr.h \
+       gcr-certificate-basics-widget.h \
        gcr-certificate-details-widget.h \
        gcr-certificate-renderer.h \
        gcr-certificate-widget.h \
-       gcr-collection.h \
        gcr-collection-model.h \
        gcr-column.h \
        gcr-combo-selector.h \
-       gcr-comparable.h \
        gcr-deprecated.h \
        gcr-key-renderer.h \
        gcr-key-widget.h \
        gcr-importer.h \
-       gcr-library.h \
        gcr-list-selector.h \
-       gcr-parser.h \
-       gcr-pkcs11-certificate.h \
        gcr-renderer.h \
-       gcr-simple-certificate.h \
        gcr-simple-collection.h \
        gcr-tree-selector.h \
-       gcr-trust.h \
-       gcr-types.h \
-       gcr-union-collection.h \
-       gcr-unlock-options.h \
        gcr-unlock-options-widget.h \
        gcr-viewer.h \
        gcr-viewer-window.h
@@ -58,7 +61,9 @@ HEADER_FILES = \
 incdir = $(includedir)/gcr-@GCR_MAJOR@/gcr
 
 inc_HEADERS = \
-       $(HEADER_FILES) \
+       $(HEADER_BASE_FILES) \
+       $(HEADER_UI_FILES) \
+       gcr-enum-types-base.h \
        gcr-enum-types.h
 
 # ------------------------------------------------------------------
@@ -67,98 +72,127 @@ inc_HEADERS = \
 INCLUDES = \
        -I$(top_builddir) \
        -I$(top_srcdir) \
-       $(GTK_CFLAGS) \
        $(GOBJECT_CFLAGS) \
        $(GLIB_CFLAGS) \
        $(LIBGCRYPT_CFLAGS) \
-       $(LIBTASN1_CFLAGS) \
        $(P11_KIT_CFLAGS) \
        -DG_LOG_DOMAIN=\"Gcr\"
 
-BUILT_SOURCES = \
+lib_LTLIBRARIES = \
+       libgcr-base-@GCR_MAJOR@.la \
+       libgcr-@GCR_MAJOR@.la
+
+BUILT_BASE_FILES = \
+       gcr-marshal.c gcr-marshal.h \
+       gcr-enum-types-base.c gcr-enum-types-base.h \
+       gcr-oids.c gcr-oids.h
+
+BUILT_UI_FILES = \
        gcr-marshal.c gcr-marshal.h \
        gcr-enum-types.c gcr-enum-types.h \
        gcr-oids.c gcr-oids.h
 
-lib_LTLIBRARIES = libgcr-@GCR_MAJOR@.la
+BUILT_SOURCES = \
+       $(BUILT_BASE_FILES) \
+       $(BUILT_UI_FILES)
 
-libgcr_@GCR_MAJOR@_la_SOURCES = \
+libgcr_base_@GCR_MAJOR@_la_SOURCES = \
        gcr-certificate.c gcr-certificate.h \
-       gcr-certificate-basics-widget.h gcr-certificate-basics-widget.c \
        gcr-certificate-chain.c gcr-certificate-chain.h \
-       gcr-certificate-details-widget.h gcr-certificate-details-widget.c \
-       gcr-certificate-renderer.c gcr-certificate-renderer.h \
+       gcr-collection.c gcr-collection.h \
+       gcr-comparable.c gcr-comparable.h \
+       gcr-debug.c gcr-debug.h \
+       gcr-gnupg-collection.c gcr-gnupg-collection.h \
+       gcr-gnupg-key.c gcr-gnupg-key.h \
+       gcr-gnupg-process.c gcr-gnupg-process.h \
+       gcr-gnupg-util.c gcr-gnupg-util.h \
+       gcr-library.c gcr-library.h \
+       gcr-internal.h \
+       gcr-memory.c \
+       gcr-memory-icon.c gcr-memory-icon.h \
+       gcr-parser.c gcr-parser.h \
+       gcr-pkcs11-certificate.c gcr-pkcs11-certificate.h \
+       gcr-record.c gcr-record.h \
+       gcr-simple-certificate.c gcr-simple-certificate.h \
+       gcr-simple-collection.c gcr-simple-collection.h \
+       gcr-trust.c gcr-trust.h \
+       gcr-types.h \
+       gcr-union-collection.c gcr-union-collection.h \
+       gcr-util.c gcr-util.h \
+       $(BUILT_BASE_FILES)
+
+libgcr_@GCR_MAJOR@_la_SOURCES = \
+       gcr-certificate-basics-widget.c gcr-certificate-basics-widget.h \
+       gcr-certificate-details-widget.c gcr-certificate-details-widget.h \
        gcr-certificate-exporter.c gcr-certificate-exporter.h \
        gcr-certificate-extensions.c gcr-certificate-extensions.h \
+       gcr-certificate-renderer.c gcr-certificate-renderer.h \
        gcr-certificate-widget.c gcr-certificate-widget.h \
-       gcr-collection.c gcr-collection.h \
        gcr-collection-model.c gcr-collection-model.h \
        gcr-combo-selector.c gcr-combo-selector.h \
-       gcr-comparable.c gcr-comparable.h \
-       gcr-debug.c gcr-debug.h \
        gcr-display-scrolled.c gcr-display-scrolled.h \
        gcr-display-view.c gcr-display-view.h \
-       gcr-gnupg-collection.c gcr-gnupg-collection.h \
-       gcr-gnupg-key.c gcr-gnupg-key.h \
        gcr-failure-renderer.c gcr-failure-renderer.h \
        gcr-fingerprint.c gcr-fingerprint.h \
-       gcr-gnupg-process.c gcr-gnupg-process.h \
-       gcr-gnupg-util.c gcr-gnupg-util.h \
        gcr-icons.c gcr-icons.h \
        gcr-import-dialog.c gcr-import-dialog.h \
        gcr-importer.c gcr-importer.h  \
-       gcr-internal.h \
        gcr-key-renderer.c gcr-key-renderer.h \
        gcr-key-widget.c gcr-key-widget.h \
-       gcr-library.c gcr-library.h \
        gcr-list-selector.c gcr-list-selector.h gcr-list-selector-private.h \
        gcr-live-search.c gcr-live-search.h \
-       gcr-memory-icon.c gcr-memory-icon.h \
-       gcr-parser.c gcr-parser.h \
-       gcr-pkcs11-certificate.c gcr-pkcs11-certificate.h \
-       gcr-record.c gcr-record.h \
+       gcr-memory.c \
        gcr-renderer.c gcr-renderer.h \
-       gcr-simple-certificate.c gcr-simple-certificate.h \
-       gcr-simple-collection.c gcr-simple-collection.h \
        gcr-tree-selector.c gcr-tree-selector.h \
-       gcr-trust.c gcr-trust.h \
-       gcr-types.h \
-       gcr-union-collection.c \
        gcr-unlock-options.h \
        gcr-unlock-options-widget.c gcr-unlock-options-widget.h \
        gcr-unlock-renderer.c gcr-unlock-renderer.h \
-       gcr-util.c gcr-util.h \
        gcr-viewer.c gcr-viewer.h \
        gcr-viewer-window.c \
-       $(BUILT_SOURCES)
+       $(BUILT_UI_FILES)
 
-libgcr_@GCR_MAJOR@_la_CFLAGS = \
+libgcr_base_@GCR_MAJOR@_la_CFLAGS = \
        -DGCK_API_SUBJECT_TO_CHANGE \
        -DGCR_API_SUBJECT_TO_CHANGE \
        -DP11_KIT_API_SUBJECT_TO_CHANGE \
-       -DGCR_COMPILATION \
-       -DUIDIR=\""$(uidir)"\"
+       -DGCR_COMPILATION
 
-libgcr_@GCR_MAJOR@_la_LDFLAGS = \
+libgcr_@GCR_MAJOR@_la_CFLAGS = \
+       $(GTK_CFLAGS) \
+       -DUIDIR=\""$(uidir)"\" \
+       $(libgcr_base_@GCR_MAJOR@_la_CFLAGS)
+
+libgcr_base_@GCR_MAJOR@_la_LDFLAGS = \
        -version-info $(GCR_LT_RELEASE) \
        -no-undefined \
        -export-symbols-regex '^gcr_*'
 
-libgcr_@GCR_MAJOR@_la_LIBADD = \
+libgcr_@GCR_MAJOR@_la_LDFLAGS = \
+       $(libgcr_base_@GCR_MAJOR@_la_LDFLAGS)
+
+libgcr_base_@GCR_MAJOR@_la_LIBADD = \
        $(top_builddir)/egg/libegg.la \
        $(top_builddir)/egg/libegg-entry-buffer.la \
        $(top_builddir)/gck/libgck-@GCK_MAJOR@.la \
        $(GOBJECT_LIBS) \
        $(GLIB_LIBS) \
        $(LIBGCRYPT_LIBS) \
-       $(GTK_LIBS) \
        $(P11_KIT_LIBS)
 
+libgcr_@GCR_MAJOR@_la_LIBADD = \
+       $(GTK_LIBS) \
+       $(libgcr_base_@GCR_MAJOR@_la_LIBADD) \
+       $(builddir)/libgcr-base-$(GCR_MAJOR).la
+
 noinst_LTLIBRARIES = $(TESTABLE_LIB)
 libgcr_testable_la_SOURCES =
-libgcr_testable_la_LIBADD = $(libgcr_@GCR_MAJOR@_la_OBJECTS) \
+libgcr_testable_la_LIBADD = \
+       $(libgcr_base_@GCR_MAJOR@_la_OBJECTS) \
+       $(libgcr_@GCR_MAJOR@_la_OBJECTS) \
        $(libgcr_@GCR_MAJOR@_la_LIBADD)
-libgcr_testable_la_DEPENDENCIES = $(libgcr_@GCR_MAJOR@_la_OBJECTS)
+libgcr_testable_la_DEPENDENCIES = \
+       $(libgcr_base_@GCR_MAJOR@_la_OBJECTS) \
+       $(libgcr_@GCR_MAJOR@_la_OBJECTS)
 
 gcr-marshal.h: gcr-marshal.list $(GLIB_GENMARSHAL)
        $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=_gcr_marshal > $@
@@ -167,13 +201,21 @@ 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: $(HEADER_FILES) gcr-enum-types.h.template
+gcr-enum-types.h: $(HEADER_UI_FILES) gcr-enum-types.h.template
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
+               $(HEADER_UI_FILES) > $@
+
+gcr-enum-types.c: $(HEADER_UI_FILES) gcr-enum-types.c.template
+       $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
+               $(HEADER_UI_FILES) > $@
+
+gcr-enum-types-base.h: $(HEADER_BASE_FILES) gcr-enum-types.h.template
        $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.h.template \
-               $(HEADER_FILES) > $@
+               $(HEADER_BASE_FILES) > $@
 
-gcr-enum-types.c: $(HEADER_FILES) gcr-enum-types.c.template
+gcr-enum-types-base.c: $(HEADER_BASE_FILES) gcr-enum-types.c.template
        $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/gcr-enum-types.c.template \
-               $(HEADER_FILES) > $@
+               $(HEADER_BASE_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
@@ -181,10 +223,12 @@ gcr-oids.c: gcr-oids.list gcr-mkoids
 gcr-oids.h: gcr-oids.c
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = gcr-$(GCR_MAJOR).pc
+pkgconfig_DATA = gcr-$(GCR_MAJOR).pc gcr-base-$(GCR_MAJOR).pc
 
 gcr-$(GCR_MAJOR).pc: gcr.pc
        cp gcr.pc gcr-$(GCR_MAJOR).pc
+gcr-base-$(GCR_MAJOR).pc: gcr-base.pc
+       cp gcr-base.pc gcr-base-$(GCR_MAJOR).pc
 
 # ----------------------------------------------------------------
 # SYSTEM INTEGRATION
@@ -234,14 +278,21 @@ gcr_viewer_LDADD = \
 
 # ----------------------------------------------------------------
 
+gcr-expected-base.abi: gcr-base.symbols
+       $(AM_V_GEN) cpp -P $< | sort > $@
 gcr-expected.abi: gcr.symbols
        $(AM_V_GEN) cpp -P $< | sort > $@
 
+gcr-actual-base.abi: $(builddir)/.libs/libgcr-base-@GCR_MAJOR@.so
+       $(AM_V_GEN)  $(NM) -D -g --defined-only $< | \
+               cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@
 gcr-actual.abi: $(builddir)/.libs/libgcr-@GCR_MAJOR@.so
        $(AM_V_GEN)  $(NM) -D -g --defined-only $< | \
                cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@
 
-check-symbols: gcr-expected.abi gcr-actual.abi
+check-symbols: gcr-expected.abi gcr-actual.abi gcr-expected-base.abi gcr-actual-base.abi
+       $(AM_V_GEN) diff -U0 --ignore-blank-lines gcr-expected-base.abi gcr-actual-base.abi || \
+               (echo "check-symbols: Symbols have CHANGED. Fix gcr-base.symbols"; exit 1)
        $(AM_V_GEN) diff -U0 --ignore-blank-lines gcr-expected.abi gcr-actual.abi || \
                (echo "check-symbols: Symbols have CHANGED. Fix gcr.symbols"; exit 1)
 
@@ -249,6 +300,7 @@ check-local: check-symbols
 
 EXTRA_DIST = \
        gcr.pc.in \
+       gcr-base.pc.in \
        gcr-marshal.list \
        gcr-oids.list \
        gcr-mkoids \
@@ -257,6 +309,7 @@ EXTRA_DIST = \
        gcr-enum-types.h.template \
        gcr-enum-types.c.template \
        gcr.symbols \
+       gcr-base.symbols \
        $(desktop_in_in_files) \
        $(desktop_in_files) \
        $(desktop_DATA) \
@@ -266,15 +319,11 @@ CLEANFILES = \
        $(BUILT_SOURCES) \
        $(pkgconfig_DATA) \
        gcr-actual.abi \
-       gcr-expected.abi
+       gcr-actual-base.abi \
+       gcr-expected.abi \
+       gcr-expected-base.abi
 
 DISTCLEANFILES = \
        $(desktop_in_files) \
        $(desktop_DATA) \
        $(pkgconfig_DATA)
-
-symbols: libgcr-$(VERSION).symbols
-
-libgcr-$(VERSION).symbols: .libs/libgcr-@GCR_MAJOR@.so
-       nm -D .libs/libgcr-@GCR_MAJOR@.so | grep -F ' T ' | \
-               cut -d ' ' -f 3 | sort > $@
diff --git a/gcr/gcr-base.h b/gcr/gcr-base.h
new file mode 100644 (file)
index 0000000..218030a
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2010 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>
+ */
+
+#ifndef GCR_API_SUBJECT_TO_CHANGE
+#error "This API has not yet reached stability."
+#endif
+
+#ifndef __GCR_BASE_H__
+#define __GCR_BASE_H__
+
+#include <glib.h>
+
+#define __GCR_INSIDE_HEADER__
+
+#include "gcr-types.h"
+
+#include "gcr-certificate.h"
+#include "gcr-certificate-chain.h"
+#include "gcr-deprecated-base.h"
+#include "gcr-enum-types-base.h"
+#include "gcr-library.h"
+#include "gcr-parser.h"
+#include "gcr-pkcs11-certificate.h"
+#include "gcr-simple-certificate.h"
+#include "gcr-trust.h"
+#include "gcr-union-collection.h"
+#include "gcr-unlock-options.h"
+
+#undef __GCR_INSIDE_HEADER__
+
+#endif /* __GCR_BASE_H__ */
diff --git a/gcr/gcr-base.pc.in b/gcr/gcr-base.pc.in
new file mode 100644 (file)
index 0000000..629882a
--- /dev/null
@@ -0,0 +1,16 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+sysconfdir=@sysconfdir@
+pkcs11dir=@P11_MODULE_PATH@
+pkcs11standalonedir=@pkcs11standalonedir@
+
+Name: gcr-base-@GCR_MAJOR@
+Description: GObject library for high level crypto parsing
+Version: @VERSION@
+Requires: glib-2.0 gck-@GCK_MAJOR@ p11-kit-1
+Libs: -L${libdir} -lgcr-base-@GCR_MAJOR@
+Cflags: -I${includedir}/gcr-@GCR_MAJOR@
diff --git a/gcr/gcr-base.symbols b/gcr/gcr-base.symbols
new file mode 100644 (file)
index 0000000..15f77b0
--- /dev/null
@@ -0,0 +1,110 @@
+/* This file lists all exported symbols. It is used to guarantee that we
+ * only consciously change our ABI.
+ */
+
+gcr_certificate_compare
+gcr_certificate_chain_add
+gcr_certificate_chain_build
+gcr_certificate_chain_build_async
+gcr_certificate_chain_build_finish
+gcr_certificate_chain_flags_get_type
+gcr_certificate_chain_get_anchor
+gcr_certificate_chain_get_certificate
+gcr_certificate_chain_get_endpoint
+gcr_certificate_chain_get_length
+gcr_certificate_chain_get_status
+gcr_certificate_chain_get_type
+gcr_certificate_chain_new
+gcr_certificate_chain_status_get_type
+gcr_certificate_get_columns
+gcr_certificate_get_der_data
+gcr_certificate_get_expiry_date
+gcr_certificate_get_fingerprint
+gcr_certificate_get_fingerprint_hex
+gcr_certificate_get_icon
+gcr_certificate_get_issued_date
+gcr_certificate_get_issuer_cn
+gcr_certificate_get_issuer_dn
+gcr_certificate_get_issuer_part
+gcr_certificate_get_issuer_raw
+gcr_certificate_get_key_size
+gcr_certificate_get_serial_number
+gcr_certificate_get_serial_number_hex
+gcr_certificate_get_subject_cn
+gcr_certificate_get_subject_dn
+gcr_certificate_get_subject_part
+gcr_certificate_get_subject_raw
+gcr_certificate_get_type
+gcr_certificate_mixin_class_init
+gcr_certificate_mixin_comparable_init
+gcr_certificate_mixin_get_property
+gcr_certificate_is_issuer
+gcr_collection_contains
+gcr_collection_emit_added
+gcr_collection_emit_removed
+gcr_collection_get_length
+gcr_collection_get_objects
+gcr_collection_get_type
+gcr_comparable_compare
+gcr_comparable_get_type
+gcr_comparable_memcmp
+gcr_data_error_get_domain
+gcr_data_error_get_type
+gcr_data_format_get_type
+gcr_error_get_domain
+gcr_parser_add_password
+gcr_parser_format_disable
+gcr_parser_format_enable
+gcr_parser_format_supported
+gcr_parser_get_parsed_attributes
+gcr_parser_get_parsed_block
+gcr_parser_get_parsed_description
+gcr_parser_get_parsed_label
+gcr_parser_get_type
+gcr_parser_new
+gcr_parser_parse_data
+gcr_parser_parse_stream
+gcr_parser_parse_stream_async
+gcr_parser_parse_stream_finish
+gcr_pkcs11_add_module
+gcr_pkcs11_add_module_from_file
+gcr_pkcs11_certificate_get_attributes
+gcr_pkcs11_certificate_get_type
+gcr_pkcs11_certificate_lookup_issuer
+gcr_pkcs11_certificate_lookup_issuer_async
+gcr_pkcs11_certificate_lookup_issuer_finish
+gcr_pkcs11_get_modules
+gcr_pkcs11_get_trust_lookup_slots
+gcr_pkcs11_get_trust_lookup_uris
+gcr_pkcs11_get_trust_store_slot
+gcr_pkcs11_get_trust_store_uri
+gcr_pkcs11_set_modules
+gcr_pkcs11_set_trust_lookup_uris
+gcr_pkcs11_set_trust_store_uri
+gcr_simple_certificate_get_type
+gcr_simple_certificate_new
+gcr_simple_certificate_new_static
+gcr_simple_collection_add
+gcr_simple_collection_contains
+gcr_simple_collection_get_type
+gcr_simple_collection_new
+gcr_simple_collection_remove
+gcr_trust_add_pinned_certificate
+gcr_trust_add_pinned_certificate_async
+gcr_trust_add_pinned_certificate_finish
+gcr_trust_is_certificate_anchored
+gcr_trust_is_certificate_anchored_async
+gcr_trust_is_certificate_anchored_finish
+gcr_trust_is_certificate_pinned
+gcr_trust_is_certificate_pinned_async
+gcr_trust_is_certificate_pinned_finish
+gcr_trust_remove_pinned_certificate
+gcr_trust_remove_pinned_certificate_async
+gcr_trust_remove_pinned_certificate_finish
+gcr_union_collection_add
+gcr_union_collection_get_type
+gcr_union_collection_have
+gcr_union_collection_new
+gcr_union_collection_remove
+gcr_union_collection_size
+gcr_union_collection_take
index fe3ab37..a77df07 100644 (file)
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_CERTIFICATE_CHAIN_H__
 #define __GCR_CERTIFICATE_CHAIN_H__
 
 #include <glib-object.h>
-#include <gtk/gtk.h>
 
 #include "gcr-certificate.h"
 #include "gcr-types.h"
index 5f7a9cf..3ab43d2 100644 (file)
@@ -19,8 +19,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_CERTIFICATE_EXPORTER_H__
index ab22d42..9101008 100644 (file)
@@ -21,8 +21,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef GCR_CERTIFICATE_EXTENSIONS_H
index c45f2ea..6167dd5 100644 (file)
@@ -17,8 +17,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_CERTIFICATE_RENDERER_H__
index b5d169d..3ad2f19 100644 (file)
@@ -17,8 +17,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_CERTIFICATE_WIDGET_H__
index 9ae32cb..76e3a80 100644 (file)
@@ -19,8 +19,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_CERTIFICATE_H__
index ee9c79d..91328a2 100644 (file)
@@ -188,8 +188,6 @@ gcr_combo_selector_class_init (GcrComboSelectorClass *klass)
        g_object_class_install_property (gobject_class, PROP_COLLECTION,
                   g_param_spec_object ("collection", "Collection", "Collection to select from",
                                        GCR_TYPE_COLLECTION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
-       _gcr_initialize_library ();
 }
 
 /* -----------------------------------------------------------------------------
diff --git a/gcr/gcr-deprecated-base.h b/gcr/gcr-deprecated-base.h
new file mode 100644 (file)
index 0000000..9f81281
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * 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_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
+#endif
+
+#ifndef GCR_BASE_DEPRECATED_H_
+#define GCR_BASE_DEPRECATED_H_
+#ifndef GCR_DISABLE_DEPRECATED
+
+#include <glib.h>
+
+#include "gcr-parser.h"
+#include "gcr-simple-collection.h"
+
+G_BEGIN_DECLS
+
+#define           GCR_ERROR                                   (gcr_error_get_domain ())
+
+GQuark            gcr_error_get_domain                        (void) G_GNUC_CONST;
+
+gboolean          gcr_simple_collection_contains              (GcrSimpleCollection *self,
+                                                               GObject *object);
+
+G_END_DECLS
+
+#endif /* GCR_DISABLE_DEPRECATED */
+#endif /* GCRTYPES_H_ */
index 3eb0a62..b3bfad7 100644 (file)
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
-
 #ifndef GCR_DEPRECATED_H_
 #define GCR_DEPRECATED_H_
+#ifndef GCR_DISABLE_DEPRECATED
 
 #include <glib.h>
 
-#include <gck/gck.h>
-
+#include "gcr-certificate-basics-widget.h"
+#include "gcr-certificate-details-widget.h"
 #include "gcr-importer.h"
-#include "gcr-parser.h"
-#include "gcr-simple-collection.h"
 #include "gcr-viewer.h"
 
-#ifndef GCR_DISABLE_DEPRECATED
-
-#include "gcr-certificate-basics-widget.h"
-#include "gcr-certificate-details-widget.h"
+G_BEGIN_DECLS
 
 void              gcr_renderer_render                         (GcrRenderer *self,
                                                                GcrViewer *viewer);
@@ -51,15 +46,7 @@ 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;
-
-gboolean          gcr_simple_collection_contains              (GcrSimpleCollection *self,
-                                                               GObject *object);
-
-#endif /* GCR_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
+#endif /* GCR_DISABLE_DEPRECATED */
 #endif /* GCRTYPES_H_ */
index 685ceb7..d609535 100644 (file)
@@ -1,13 +1,21 @@
 /*** BEGIN file-header ***/
-#include "gcr.h"
+
+#include <glib-object.h>
+
+#ifndef GCR_COMPILATION
+#define GCR_COMPILATION
+#endif
 
 /*** END file-header ***/
 
 /*** BEGIN file-production ***/
+#include "@filename@"
 /* enumerations from "@filename@" */
 /*** END file-production ***/
 
 /*** BEGIN value-header ***/
+GType @enum_name@_get_type (void) G_GNUC_CONST;
+
 GType
 @enum_name@_get_type (void)
 {
index c1b4f41..91d5a60 100644 (file)
@@ -1,5 +1,5 @@
 /*** BEGIN file-header ***/
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
 #error "Only <gcr/gcr.h> can be included directly."
 #endif
 
index 5ea2f09..0e8311e 100644 (file)
@@ -19,8 +19,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_FAILURE_RENDERER_H__
index 1a457e7..ab52a1e 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef GCR_GNUPG_COLLECTION_H
 #define GCR_GNUPG_COLLECTION_H
 
-#include "gcr.h"
+#include "gcr-base.h"
 #include "gcr-collection.h"
 
 #include <glib-object.h>
index a382c64..893ab27 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "gck/gck.h"
 
-#include <gdk/gdk.h>
 #include <glib/gi18n-lib.h>
 
 enum {
index 745bec2..2564edb 100644 (file)
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef GCR_GNUPG_KEY_H
 #define GCR_GNUPG_KEY_H
 
 #include <glib-object.h>
-#include <gtk/gtk.h>
 
 #include "gcr-column.h"
 #include "gcr-types.h"
index ecbab6d..143f36d 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef GCR_GNUPG_PROCESS_H
 #define GCR_GNUPG_PROCESS_H
 
-#include "gcr.h"
+#include "gcr-base.h"
 #include "gcr-record.h"
 
 #include <glib-object.h>
index 49b0e4f..5910bfb 100644 (file)
@@ -19,8 +19,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef GCR_GNUPG_UTIL_H
index 6e15db9..ba0a5cb 100644 (file)
@@ -272,8 +272,6 @@ _gcr_import_dialog_class_init (GcrImportDialogClass *klass)
        g_object_class_install_property (gobject_class, PROP_SECONDARY_TEXT,
                   g_param_spec_string ("secondary-text", "Secondary Text", "Dialog secondary text",
                                        NULL, G_PARAM_READWRITE));
-
-       _gcr_initialize_library ();
 }
 
 /* -----------------------------------------------------------------------------
index c2920c3..ad5def3 100644 (file)
@@ -690,8 +690,6 @@ gcr_importer_class_init (GcrImporterClass *klass)
                                        G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GcrImporterClass, imported),
                                        NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
                                        G_TYPE_NONE, 1, GCK_TYPE_OBJECT);
-
-       _gcr_initialize_library ();
 }
 
 static gpointer
index c2c026b..b1d709c 100644 (file)
@@ -19,8 +19,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_IMPORTER_H__
index 5d09aeb..1c79644 100644 (file)
@@ -17,8 +17,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_KEY_RENDERER_H__
index 2e3b7b6..4901aad 100644 (file)
@@ -17,8 +17,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_KEY_WIDGET_H__
index affed99..899c9e5 100644 (file)
 
 #include "config.h"
 
-#include "gcr.h"
-#include "gcr-certificate-renderer.h"
+#include "gcr-base.h"
 #define DEBUG_FLAG GCR_DEBUG_LIBRARY
 #include "gcr-debug.h"
 #include "gcr-internal.h"
 #include "gcr-library.h"
-#include "gcr-key-renderer.h"
 #include "gcr-types.h"
 
 #include "egg/egg-error.h"
@@ -109,72 +107,6 @@ gcr_error_get_domain (void)
 }
 
 /* -----------------------------------------------------------------------------
- * MEMORY
- */
-
-static gboolean do_warning = TRUE;
-#define WARNING  "couldn't allocate secure memory to keep passwords " \
-                "and or keys from being written to the disk"
-
-#define ABORTMSG "The GNOME_KEYRING_PARANOID environment variable was set. " \
-                 "Exiting..."
-
-static G_LOCK_DEFINE (memory_lock);
-
-/*
- * These are called from egg-secure-memory.c to provide appropriate
- * locking for memory between threads
- */
-
-void
-egg_memory_lock (void)
-{
-       G_LOCK (memory_lock);
-}
-
-void
-egg_memory_unlock (void)
-{
-       G_UNLOCK (memory_lock);
-}
-
-void*
-egg_memory_fallback (void *p, size_t sz)
-{
-       const gchar *env;
-
-       /* We were asked to free memory */
-       if (!sz) {
-               g_free (p);
-               return NULL;
-       }
-
-       /* We were asked to allocate */
-       if (!p) {
-               if (do_warning) {
-                       g_message (WARNING);
-                       do_warning = FALSE;
-               }
-
-               env = g_getenv ("GNOME_KEYRING_PARANOID");
-               if (env && *env)
-                       g_error (ABORTMSG);
-
-               return g_malloc0 (sz);
-       }
-
-       /*
-        * Reallocation is a bit of a gray area, as we can be asked
-        * by external libraries (like libgcrypt) to reallocate a
-        * non-secure block into secure memory. We cannot satisfy
-        * this request (as we don't know the size of the original
-        * block) so we just try our best here.
-        */
-
-       return g_realloc (p, sz);
-}
-
-/* -----------------------------------------------------------------------------
  * INITIALIZATION
  */
 
@@ -189,9 +121,6 @@ _gcr_initialize_library (void)
        /* Initialize the libgcrypt library if needed */
        egg_libgcrypt_initialize ();
 
-       g_type_class_unref (g_type_class_ref (GCR_TYPE_CERTIFICATE_RENDERER));
-       g_type_class_unref (g_type_class_ref (GCR_TYPE_KEY_RENDERER));
-
        _gcr_debug ("initialized library");
 }
 
index de0f44d..88e13a3 100644 (file)
@@ -21,8 +21,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef GCR_LIBRARY_H_
index 17b7d8a..b7e6beb 100644 (file)
@@ -352,8 +352,6 @@ gcr_list_selector_class_init (GcrListSelectorClass *klass)
        g_object_class_install_property (gobject_class, PROP_COLLECTION,
                   g_param_spec_object ("collection", "Collection", "Collection to select from",
                                        GCR_TYPE_COLLECTION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
-       _gcr_initialize_library ();
 }
 
 /* -----------------------------------------------------------------------------
diff --git a/gcr/gcr-memory.c b/gcr/gcr-memory.c
new file mode 100644 (file)
index 0000000..04d216d
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * gnome-keyring
+ *
+ * Copyright (C) 2008 Stefan Walter
+ *
+ * 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.
+ */
+
+#include "config.h"
+
+#include "egg/egg-secure-memory.h"
+
+#include <glib.h>
+
+/* -----------------------------------------------------------------------------
+ * MEMORY
+ */
+
+static gboolean do_warning = TRUE;
+#define WARNING  "couldn't allocate secure memory to keep passwords " \
+                "and or keys from being written to the disk"
+
+#define ABORTMSG "The GNOME_KEYRING_PARANOID environment variable was set. " \
+                 "Exiting..."
+
+static G_LOCK_DEFINE (memory_lock);
+
+/*
+ * These are called from egg-secure-memory.c to provide appropriate
+ * locking for memory between threads
+ */
+
+void
+egg_memory_lock (void)
+{
+       G_LOCK (memory_lock);
+}
+
+void
+egg_memory_unlock (void)
+{
+       G_UNLOCK (memory_lock);
+}
+
+void*
+egg_memory_fallback (void *p, size_t sz)
+{
+       const gchar *env;
+
+       /* We were asked to free memory */
+       if (!sz) {
+               g_free (p);
+               return NULL;
+       }
+
+       /* We were asked to allocate */
+       if (!p) {
+               if (do_warning) {
+                       g_message (WARNING);
+                       do_warning = FALSE;
+               }
+
+               env = g_getenv ("GNOME_KEYRING_PARANOID");
+               if (env && *env)
+                       g_error (ABORTMSG);
+
+               return g_malloc0 (sz);
+       }
+
+       /*
+        * Reallocation is a bit of a gray area, as we can be asked
+        * by external libraries (like libgcrypt) to reallocate a
+        * non-secure block into secure memory. We cannot satisfy
+        * this request (as we don't know the size of the original
+        * block) so we just try our best here.
+        */
+
+       return g_realloc (p, sz);
+}
index abf7fdc..1f83f1a 100644 (file)
@@ -19,8 +19,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_PARSER_H__
index e7ed464..04c15b3 100644 (file)
@@ -21,8 +21,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_PKCS11_CERTIFICATE_H__
index 937ef75..1fe2bce 100644 (file)
@@ -21,8 +21,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef GCR_RECORD_H
index b6f3096..4635e6d 100644 (file)
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_SIMPLE_CERTIFICATE_H__
 #define __GCR_SIMPLE_CERTIFICATE_H__
 
-#include "gcr.h"
+#include "gcr-base.h"
 
 #include <glib-object.h>
 
index 17e1f1c..05c17ae 100644 (file)
@@ -22,7 +22,7 @@
 #include "config.h"
 
 #include "gcr-collection.h"
-#include "gcr-deprecated.h"
+#include "gcr-deprecated-base.h"
 #include "gcr-internal.h"
 #include "gcr-simple-collection.h"
 
@@ -103,7 +103,6 @@ gcr_simple_collection_class_init (GcrSimpleCollectionClass *klass)
        gobject_class->dispose = gcr_simple_collection_dispose;
        gobject_class->finalize = gcr_simple_collection_finalize;
        g_type_class_add_private (gobject_class, sizeof (GcrSimpleCollectionPrivate));
-       _gcr_initialize_library ();
 }
 
 static guint
index 52def96..e78c48c 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __GCR_SIMPLE_COLLECTION_H__
 #define __GCR_SIMPLE_COLLECTION_H__
 
-#include "gcr.h"
+#include "gcr-base.h"
 #include "gcr-collection.h"
 
 #include <glib-object.h>
index 0bcb8ec..11836b4 100644 (file)
@@ -276,8 +276,6 @@ gcr_tree_selector_class_init (GcrTreeSelectorClass *klass)
        g_object_class_install_property (gobject_class, PROP_COLUMNS,
                   g_param_spec_pointer ("columns", "Columns", "Columns to display in selector",
                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
-       _gcr_initialize_library ();
 }
 
 /* -----------------------------------------------------------------------------
index 7191363..eaa9800 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "config.h"
 
-#include "gcr.h"
+#include "gcr-base.h"
 #define DEBUG_FLAG GCR_DEBUG_TRUST
 #include "gcr-debug.h"
 #include "gcr-types.h"
index 3c7e8a9..79db47f 100644 (file)
@@ -19,8 +19,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_TRUST_H__
index ba6d85c..23635ca 100644 (file)
@@ -21,8 +21,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef GCRTYPES_H_
index 46d8a04..4628799 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef __GCR_UNION_COLLECTION_H__
 #define __GCR_UNION_COLLECTION_H__
 
-#include "gcr.h"
+#include "gcr-base.h"
 #include "gcr-collection.h"
 
 #include <glib-object.h>
index ef4edc7..ca274f5 100644 (file)
@@ -17,8 +17,8 @@
  * 02111-1307, USA.
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_UNLOCK_OPTIONS_WIDGET_H__
index 54e0e46..739133a 100644 (file)
@@ -19,8 +19,8 @@
  * Author: Stef Walter <stefw@collabora.co.uk>
  */
 
-#if !defined (__GCR_H_INSIDE__) && !defined (GCR_COMPILATION)
-#error "Only <gcr/gcr.h> can be included directly."
+#if !defined (__GCR_INSIDE_HEADER__) && !defined (GCR_COMPILATION)
+#error "Only <gcr/gcr.h> or <gcr/gcr-base.h> can be included directly."
 #endif
 
 #ifndef __GCR_UNLOCK_RENDERER_H__
index cdb53ec..b3078ee 100644 (file)
--- a/gcr/gcr.h
+++ b/gcr/gcr.h
 
 #include <glib.h>
 
-#define __GCR_H_INSIDE__
+#include "gcr-base.h"
 
-#include "gcr-types.h"
+#define __GCR_INSIDE_HEADER__
 
-#include "gcr-certificate.h"
-#include "gcr-certificate-chain.h"
 #include "gcr-certificate-renderer.h"
 #include "gcr-certificate-widget.h"
 #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"
 #include "gcr-importer.h"
-#include "gcr-library.h"
 #include "gcr-list-selector.h"
-#include "gcr-parser.h"
 #include "gcr-renderer.h"
-#include "gcr-pkcs11-certificate.h"
-#include "gcr-simple-certificate.h"
-#include "gcr-simple-collection.h"
 #include "gcr-tree-selector.h"
-#include "gcr-trust.h"
 #include "gcr-union-collection.h"
-#include "gcr-unlock-options.h"
 #include "gcr-unlock-options-widget.h"
 #include "gcr-viewer.h"
 #include "gcr-viewer-window.h"
 
-#undef __GCR_H_INSIDE__
+#undef __GCR_INSIDE_HEADER__
 
 #endif /* __GCR_H__ */
index bb8f8cd..47f8935 100644 (file)
@@ -11,6 +11,6 @@ pkcs11standalonedir=@pkcs11standalonedir@
 Name: gcr-@GCR_MAJOR@
 Description: GObject and GUI library for high level crypto parsing and display
 Version: @VERSION@
-Requires: glib-2.0 gtk+-3.0 libtasn1 gck-@GCK_MAJOR@ p11-kit-1
+Requires: glib-2.0 gtk+-3.0 gcr-base-@GCR_MAJOR@ gck-@GCK_MAJOR@ p11-kit-1
 Libs: -L${libdir} -lgcr-@GCR_MAJOR@
 Cflags: -I${includedir}/gcr-@GCR_MAJOR@
index 0769e82..5781424 100644 (file)
@@ -6,47 +6,10 @@ gcr_certificate_basics_widget_get_certificate
 gcr_certificate_basics_widget_get_type
 gcr_certificate_basics_widget_new
 gcr_certificate_basics_widget_set_certificate
-gcr_certificate_compare
-gcr_certificate_chain_add
-gcr_certificate_chain_build
-gcr_certificate_chain_build_async
-gcr_certificate_chain_build_finish
-gcr_certificate_chain_flags_get_type
-gcr_certificate_chain_get_anchor
-gcr_certificate_chain_get_certificate
-gcr_certificate_chain_get_endpoint
-gcr_certificate_chain_get_length
-gcr_certificate_chain_get_status
-gcr_certificate_chain_get_type
-gcr_certificate_chain_new
-gcr_certificate_chain_status_get_type
 gcr_certificate_details_widget_get_certificate
 gcr_certificate_details_widget_get_type
 gcr_certificate_details_widget_new
 gcr_certificate_details_widget_set_certificate
-gcr_certificate_get_columns
-gcr_certificate_get_der_data
-gcr_certificate_get_expiry_date
-gcr_certificate_get_fingerprint
-gcr_certificate_get_fingerprint_hex
-gcr_certificate_get_icon
-gcr_certificate_get_issued_date
-gcr_certificate_get_issuer_cn
-gcr_certificate_get_issuer_dn
-gcr_certificate_get_issuer_part
-gcr_certificate_get_issuer_raw
-gcr_certificate_get_key_size
-gcr_certificate_get_serial_number
-gcr_certificate_get_serial_number_hex
-gcr_certificate_get_subject_cn
-gcr_certificate_get_subject_dn
-gcr_certificate_get_subject_part
-gcr_certificate_get_subject_raw
-gcr_certificate_get_type
-gcr_certificate_mixin_class_init
-gcr_certificate_mixin_comparable_init
-gcr_certificate_mixin_get_property
-gcr_certificate_is_issuer
 gcr_certificate_renderer_get_attributes
 gcr_certificate_renderer_get_certificate
 gcr_certificate_renderer_get_type
@@ -60,12 +23,6 @@ gcr_certificate_widget_get_type
 gcr_certificate_widget_new
 gcr_certificate_widget_set_attributes
 gcr_certificate_widget_set_certificate
-gcr_collection_contains
-gcr_collection_emit_added
-gcr_collection_emit_removed
-gcr_collection_get_length
-gcr_collection_get_objects
-gcr_collection_get_type
 gcr_collection_model_change_selected
 gcr_collection_model_column_for_selected
 gcr_collection_model_get_collection
@@ -85,13 +42,6 @@ gcr_combo_selector_get_selected
 gcr_combo_selector_get_type
 gcr_combo_selector_new
 gcr_combo_selector_set_selected
-gcr_comparable_compare
-gcr_comparable_get_type
-gcr_comparable_memcmp
-gcr_data_error_get_domain
-gcr_data_error_get_type
-gcr_data_format_get_type
-gcr_error_get_domain
 gcr_importer_get_parser
 gcr_importer_get_prompt_behavior
 gcr_importer_get_slot
@@ -119,35 +69,6 @@ gcr_list_selector_get_selected
 gcr_list_selector_get_type
 gcr_list_selector_new
 gcr_list_selector_set_selected
-gcr_parser_add_password
-gcr_parser_format_disable
-gcr_parser_format_enable
-gcr_parser_format_supported
-gcr_parser_get_parsed_attributes
-gcr_parser_get_parsed_block
-gcr_parser_get_parsed_description
-gcr_parser_get_parsed_label
-gcr_parser_get_type
-gcr_parser_new
-gcr_parser_parse_data
-gcr_parser_parse_stream
-gcr_parser_parse_stream_async
-gcr_parser_parse_stream_finish
-gcr_pkcs11_add_module
-gcr_pkcs11_add_module_from_file
-gcr_pkcs11_certificate_get_attributes
-gcr_pkcs11_certificate_get_type
-gcr_pkcs11_certificate_lookup_issuer
-gcr_pkcs11_certificate_lookup_issuer_async
-gcr_pkcs11_certificate_lookup_issuer_finish
-gcr_pkcs11_get_modules
-gcr_pkcs11_get_trust_lookup_slots
-gcr_pkcs11_get_trust_lookup_uris
-gcr_pkcs11_get_trust_store_slot
-gcr_pkcs11_get_trust_store_uri
-gcr_pkcs11_set_modules
-gcr_pkcs11_set_trust_lookup_uris
-gcr_pkcs11_set_trust_store_uri
 gcr_renderer_create
 gcr_renderer_emit_data_changed
 gcr_renderer_get_type
@@ -156,39 +77,12 @@ gcr_renderer_register
 gcr_renderer_register_well_known
 gcr_renderer_render
 gcr_renderer_render_view
-gcr_simple_certificate_get_type
-gcr_simple_certificate_new
-gcr_simple_certificate_new_static
-gcr_simple_collection_add
-gcr_simple_collection_contains
-gcr_simple_collection_get_type
-gcr_simple_collection_new
-gcr_simple_collection_remove
 gcr_tree_selector_get_collection
 gcr_tree_selector_get_columns
 gcr_tree_selector_get_selected
 gcr_tree_selector_get_type
 gcr_tree_selector_new
 gcr_tree_selector_set_selected
-gcr_trust_add_pinned_certificate
-gcr_trust_add_pinned_certificate_async
-gcr_trust_add_pinned_certificate_finish
-gcr_trust_is_certificate_anchored
-gcr_trust_is_certificate_anchored_async
-gcr_trust_is_certificate_anchored_finish
-gcr_trust_is_certificate_pinned
-gcr_trust_is_certificate_pinned_async
-gcr_trust_is_certificate_pinned_finish
-gcr_trust_remove_pinned_certificate
-gcr_trust_remove_pinned_certificate_async
-gcr_trust_remove_pinned_certificate_finish
-gcr_union_collection_add
-gcr_union_collection_get_type
-gcr_union_collection_have
-gcr_union_collection_new
-gcr_union_collection_remove
-gcr_union_collection_size
-gcr_union_collection_take
 gcr_unlock_options_widget_get_choice
 gcr_unlock_options_widget_get_label
 gcr_unlock_options_widget_get_sensitive
index 287e914..847d56d 100644 (file)
@@ -23,9 +23,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
-
-#include <gtk/gtk.h>
+#include "gcr/gcr-base.h"
 
 #include <unistd.h>
 #include <string.h>
@@ -81,7 +79,7 @@ main(int argc, char *argv[])
        const gchar *filename;
        gchar *path;
 
-       gtk_init (&argc, &argv);
+       g_type_init ();
        g_set_prgname ("frob-parser");
 
        if (argc != 2) {
index 39d7400..3bccfff 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 
 #include "egg/egg-asn1x.h"
index aed032d..dec2b52 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 
 #include "egg/egg-testing.h"
index 34b5960..1c5dcf9 100644 (file)
@@ -23,7 +23,7 @@
 #include "config.h"
 #define GCR_COMPILATION 1
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 #include "gcr/gcr-fingerprint.h"
 
index 0bdec96..686e80f 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-gnupg-collection.h"
 #include "gcr/gcr-gnupg-key.h"
 #include "gcr/gcr-record.h"
index c42a7b1..318b9a4 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-gnupg-process.h"
 
 #include "egg/egg-testing.h"
index 7d60150..199478e 100644 (file)
@@ -26,7 +26,7 @@
 #include "egg/egg-error.h"
 #include "egg/egg-secure-memory.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 
 #include "gck/gck.h"
index 8e5e1f6..dd03371 100644 (file)
@@ -25,7 +25,7 @@
 #include "egg/egg-asn1x.h"
 #include "egg/egg-asn1-defs.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 
 #include "egg/egg-testing.h"
index f3039cb..6044135 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 
 #include "gck/gck-test.h"
index 861651a..1071509 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-internal.h"
 
 #include "gck/gck-mock.h"
index 8afdd5f..96819ac 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gcr/gcr.h"
+#include "gcr/gcr-base.h"
 #include "gcr/gcr-util.h"
 
 #include <errno.h>