[libsecret/wip/unstable] WIP split stable/unstable packages/gir/vapis
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsecret/wip/unstable] WIP split stable/unstable packages/gir/vapis
- Date: Fri, 13 Jul 2012 07:05:44 +0000 (UTC)
commit 9bf4efd762a4a59027c312d861f04f62944270b1
Author: Stef Walter <stefw gnome org>
Date: Fri Jul 13 09:04:55 2012 +0200
WIP split stable/unstable packages/gir/vapis
configure.ac | 1 +
library/Makefile.am | 52 ++++++++++++++++++++++++--------
library/SecretUnstable.metadata | 2 +
library/libsecret-unstable.pc.in | 13 ++++++++
library/secret-attributes.h | 2 +-
library/secret-collection.c | 6 ++--
library/secret-collection.h | 5 ++-
library/secret-item.c | 4 +-
library/secret-item.h | 3 +-
library/secret-methods.c | 4 +-
library/secret-password.h | 2 +-
library/secret-paths.c | 4 +-
library/secret-paths.h | 2 +-
library/secret-private.h | 1 +
library/secret-prompt.h | 3 +-
library/secret-schema.h | 2 +-
library/secret-schemas.h | 2 +-
library/secret-service.c | 2 +-
library/secret-service.h | 11 ++++++-
library/secret-types.h | 15 +---------
library/secret-unstable.h | 39 ------------------------
library/secret-value.c | 2 +-
library/secret-value.h | 4 ++-
library/secret.h | 26 ++++++++++++++--
library/tests/Makefile.am | 31 +++++++++-----------
library/tests/test-vala-unstable.vala | 11 +++++++
26 files changed, 141 insertions(+), 108 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd8c674..57cb2da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -249,6 +249,7 @@ AC_CONFIG_FILES([
po/Makefile
library/Makefile
library/libsecret.pc
+ library/libsecret-unstable.pc
library/tests/Makefile
tool/Makefile
])
diff --git a/library/Makefile.am b/library/Makefile.am
index c45c10f..115f73d 100644
--- a/library/Makefile.am
+++ b/library/Makefile.am
@@ -32,7 +32,6 @@ HEADER_FILES = \
secret-schemas.h \
secret-service.h \
secret-types.h \
- secret-unstable.h \
secret-value.h \
$(NULL)
@@ -46,30 +45,34 @@ BUILT_SOURCES = \
secret-enum-types.c secret-enum-types.h \
$(NULL)
-PUBLIC_FILES = \
+STABLE_FILES = \
secret-attributes.h secret-attributes.c \
+ secret-password.h secret-password.c \
+ secret-schema.h secret-schema.c \
+ secret-types.h \
+ $(NULL)
+
+UNSTABLE_FILES = \
secret-collection.h secret-collection.c \
secret-item.h secret-item.c \
secret-methods.c \
- secret-password.h secret-password.c \
secret-paths.h secret-paths.c \
secret-prompt.h secret-prompt.c \
- secret-schema.h secret-schema.c \
secret-schemas.h secret-schemas.c \
secret-service.h secret-service.c \
- secret-types.h \
secret-value.h secret-value.c \
$(NULL)
-INTERNAL_FILES = \
+PRIVATE_FILES = \
secret-private.h \
secret-session.c \
secret-util.c \
$(NULL)
libsecret_ SECRET_MAJOR@_la_SOURCES = \
- $(PUBLIC_FILES) \
- $(INTERNAL_FILES) \
+ $(STABLE_FILES) \
+ $(UNSTABLE_FILES) \
+ $(PRIVATE_FILES) \
$(BUILT_SOURCES) \
$(NULL)
@@ -107,20 +110,32 @@ if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS = Secret- SECRET_MAJOR@.gir
+INTROSPECTION_GIRS = Secret- SECRET_MAJOR@.gir SecretUnstable.gir
INTROSPECTION_SCANNER_ARGS = $(INTROSPECTION_FLAGS) --warn-all --add-include-path=$(srcdir) --add-include-path=.
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=.
Secret- SECRET_MAJOR@.gir: libsecret- SECRET_MAJOR@.la
+Secret_ SECRET_MAJOR@_gir_NAMESPACE = Secret
Secret_ SECRET_MAJOR@_gir_PACKAGES = gobject-2.0 gio-2.0
Secret_ SECRET_MAJOR@_gir_EXPORT_PACKAGES = libsecret- SECRET_MAJOR@
Secret_ SECRET_MAJOR@_gir_INCLUDES = GObject-2.0 Gio-2.0
Secret_ SECRET_MAJOR@_gir_LIBS = libsecret- SECRET_MAJOR@.la
-Secret_ SECRET_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DSECRET_COMPILATION -DSECRET_API_SUBJECT_TO_CHANGE
-Secret_ SECRET_MAJOR@_gir_FILES = $(PUBLIC_FILES)
+Secret_ SECRET_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DSECRET_COMPILATION
+Secret_ SECRET_MAJOR@_gir_FILES = $(STABLE_FILES)
Secret_ SECRET_MAJOR@_gir_SCANNERFLAGS = --c-include "secret.h"
+SecretUnstable.gir: libsecret- SECRET_MAJOR@.la
+
+SecretUnstable_gir_NAMESPACE = SecretUnstable
+SecretUnstable_gir_PACKAGES = gobject-2.0 gio-2.0 libsecret- SECRET_MAJOR@
+SecretUnstable_gir_EXPORT_PACKAGES = libsecret-unstable
+SecretUnstable_gir_INCLUDES = GObject-2.0 Gio-2.0 Secret- SECRET_MAJOR@
+SecretUnstable_gir_LIBS = libsecret- SECRET_MAJOR@.la
+SecretUnstable_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DSECRET_COMPILATION -DSECRET_API_SUBJECT_TO_CHANGE
+SecretUnstable_gir_FILES = $(UNSTABLE_FILES)
+SecretUnstable_gir_SCANNERFLAGS = --c-include "secret.h" --identifier-prefix=Secret --symbol-prefix=secret
+
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
@@ -132,12 +147,21 @@ include $(VAPIGEN_MAKEFILE)
libsecret- SECRET_MAJOR@.vapi: Secret- SECRET_MAJOR@.gir Secret- SECRET_MAJOR@.metadata
-VAPIGEN_VAPIS = libsecret- SECRET_MAJOR@.vapi
+libsecret-unstable.vapi: SecretUnstable.gir SecretUnstable.metadata
+
+VAPIGEN_VAPIS = \
+ libsecret- SECRET_MAJOR@.vapi \
+ libsecret-unstable.vapi
libsecret_ SECRET_MAJOR@_vapi_DEPS = gio-2.0
libsecret_ SECRET_MAJOR@_vapi_METADATADIRS = $(srcdir)
libsecret_ SECRET_MAJOR@_vapi_FILES = Secret- SECRET_MAJOR@.gir
+libsecret_unstable_vapi_DEPS = gio-2.0 libsecret- SECRET_MAJOR@
+libsecret_unstable_vapi_METADATADIRS = $(srcdir)
+libsecret_unstable_vapi_VAPIDIRS = $(builddir)
+libsecret_unstable_vapi_FILES = SecretUnstable.gir
+
vapidir = $(datadir)/vala/vapi
vapi_DATA = $(VAPIGEN_VAPIS)
@@ -153,7 +177,9 @@ libsecret-$(SECRET_MAJOR).pc: libsecret.pc
cp libsecret.pc libsecret-$(SECRET_MAJOR).pc
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libsecret-$(SECRET_MAJOR).pc
+pkgconfig_DATA = \
+ libsecret-$(SECRET_MAJOR).pc \
+ libsecret-unstable.pc
# ------------------------------------------------------------------
diff --git a/library/SecretUnstable.metadata b/library/SecretUnstable.metadata
new file mode 100644
index 0000000..b175213
--- /dev/null
+++ b/library/SecretUnstable.metadata
@@ -0,0 +1,2 @@
+// Metadata file for Vala API generation.
+// See https://live.gnome.org/Vala/UpstreamGuide for more information
diff --git a/library/libsecret-unstable.pc.in b/library/libsecret-unstable.pc.in
new file mode 100644
index 0000000..44bb10f
--- /dev/null
+++ b/library/libsecret-unstable.pc.in
@@ -0,0 +1,13 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+datarootdir= datarootdir@
+datadir= datadir@
+sysconfdir= sysconfdir@
+
+Name: libsecret-unstable
+Description: GObject bindings for Secret Service API (Unstable)
+Version: @VERSION@
+Requires: libsecret- SECRET_MAJOR@
+Cflags: -DSECRET_WITH_UNSTABLE
diff --git a/library/secret-attributes.h b/library/secret-attributes.h
index 91c2735..db5f6fa 100644
--- a/library/secret-attributes.h
+++ b/library/secret-attributes.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_ATTRIBUTES_H__
diff --git a/library/secret-collection.c b/library/secret-collection.c
index 58d690b..1165e12 100644
--- a/library/secret-collection.c
+++ b/library/secret-collection.c
@@ -1456,7 +1456,7 @@ secret_collection_search (SecretCollection *self,
*
* Complete asynchronous operation to search for items in a collection.
*
- * Returns: (transfer full) (element-type Secret.Item):
+ * Returns: (transfer full) (element-type SecretUnstable.Item):
* a list of items that matched the search
*/
GList *
@@ -1546,7 +1546,7 @@ collection_load_items_sync (SecretCollection *self,
* This function may block indefinetely. Use the asynchronous version
* in user interface threads.
*
- * Returns: (transfer full) (element-type Secret.Item):
+ * Returns: (transfer full) (element-type SecretUnstable.Item):
* a list of items that matched the search
*/
GList *
@@ -1767,7 +1767,7 @@ secret_collection_get_flags (SecretCollection *self)
*
* Get the list of items in this collection.
*
- * Returns: (transfer full) (element-type Secret.Item): a list of items,
+ * Returns: (transfer full) (element-type SecretUnstable.Item): a list of items,
* when done, the list should be freed with g_list_free, and each item should
* be released with g_object_unref()
*/
diff --git a/library/secret-collection.h b/library/secret-collection.h
index f367dbe..63b7927 100644
--- a/library/secret-collection.h
+++ b/library/secret-collection.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_COLLECTION_H__
@@ -22,6 +22,7 @@
#include <gio/gio.h>
#include "secret-schema.h"
+#include "secret-service.h"
#include "secret-types.h"
G_BEGIN_DECLS
@@ -42,6 +43,8 @@ typedef enum {
#define SECRET_IS_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_COLLECTION))
#define SECRET_COLLECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_COLLECTION, SecretCollectionClass))
+typedef struct _SecretItem SecretItem;
+typedef struct _SecretCollection SecretCollection;
typedef struct _SecretCollectionClass SecretCollectionClass;
typedef struct _SecretCollectionPrivate SecretCollectionPrivate;
diff --git a/library/secret-item.c b/library/secret-item.c
index a2a8c1b..ca4c107 100644
--- a/library/secret-item.c
+++ b/library/secret-item.c
@@ -1405,7 +1405,7 @@ on_loads_secrets_session (GObject *source,
/**
* secret_item_load_secrets:
- * @items: (element-type Secret.Item): the items to retrieve secrets for
+ * @items: (element-type SecretUnstable.Item): the items to retrieve secrets for
* @cancellable: optional cancellation object
* @callback: called when the operation completes
* @user_data: data to pass to the callback
@@ -1504,7 +1504,7 @@ secret_item_load_secrets_finish (GAsyncResult *result,
/**
* secret_item_load_secrets_sync:
- * @items: (element-type Secret.Item): the items to retrieve secrets for
+ * @items: (element-type SecretUnstable.Item): the items to retrieve secrets for
* @cancellable: optional cancellation object
* @error: location to place an error on failure
*
diff --git a/library/secret-item.h b/library/secret-item.h
index 05dbb1c..79970f8 100644
--- a/library/secret-item.h
+++ b/library/secret-item.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_ITEM_H__
@@ -21,6 +21,7 @@
#include <gio/gio.h>
+#include "secret-collection.h"
#include "secret-item.h"
#include "secret-service.h"
#include "secret-value.h"
diff --git a/library/secret-methods.c b/library/secret-methods.c
index 55b658f..78b3eeb 100644
--- a/library/secret-methods.c
+++ b/library/secret-methods.c
@@ -340,7 +340,7 @@ secret_service_search (SecretService *service,
*
* Complete asynchronous operation to search for items.
*
- * Returns: (transfer full) (element-type Secret.Item):
+ * Returns: (transfer full) (element-type SecretUnstable.Item):
* a list of items that matched the search
*/
GList *
@@ -430,7 +430,7 @@ service_load_items_sync (SecretService *service,
* This function may block indefinetely. Use the asynchronous version
* in user interface threads.
*
- * Returns: (transfer full) (element-type Secret.Item):
+ * Returns: (transfer full) (element-type SecretUnstable.Item):
* a list of items that matched the search
*/
GList *
diff --git a/library/secret-password.h b/library/secret-password.h
index 58a42d6..79663f6 100644
--- a/library/secret-password.h
+++ b/library/secret-password.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_PASSWORD_H__
diff --git a/library/secret-paths.c b/library/secret-paths.c
index a4068b8..60df179 100644
--- a/library/secret-paths.c
+++ b/library/secret-paths.c
@@ -905,7 +905,7 @@ secret_service_get_secrets_for_dbus_paths (SecretService *self,
*
* Items that are locked will not be included the results.
*
- * Returns: (transfer full) (element-type utf8 Secret.Value): a newly
+ * Returns: (transfer full) (element-type utf8 SecretUnstable.Value): a newly
* allocated hash table of item_path keys to #SecretValue
* values.
*/
@@ -948,7 +948,7 @@ secret_service_get_secrets_for_dbus_paths_finish (SecretService *self,
*
* Items that are locked will not be included the results.
*
- * Returns: (transfer full) (element-type utf8 Secret.Value): a newly
+ * Returns: (transfer full) (element-type utf8 SecretUnstable.Value): a newly
* allocated hash table of item_path keys to #SecretValue
* values.
*/
diff --git a/library/secret-paths.h b/library/secret-paths.h
index 19cb501..5d12b67 100644
--- a/library/secret-paths.h
+++ b/library/secret-paths.h
@@ -14,7 +14,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_PATHS_H__
diff --git a/library/secret-private.h b/library/secret-private.h
index c33b57c..aa66689 100644
--- a/library/secret-private.h
+++ b/library/secret-private.h
@@ -17,6 +17,7 @@
#include <gio/gio.h>
+#include "secret-item.h"
#include "secret-service.h"
#include "secret-value.h"
diff --git a/library/secret-prompt.h b/library/secret-prompt.h
index 15b035e..181b508 100644
--- a/library/secret-prompt.h
+++ b/library/secret-prompt.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_PROMPT_H__
@@ -32,6 +32,7 @@ G_BEGIN_DECLS
#define SECRET_IS_PROMPT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_PROMPT))
#define SECRET_PROMPT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_PROMPT, SecretPromptClass))
+typedef struct _SecretPrompt SecretPrompt;
typedef struct _SecretPromptClass SecretPromptClass;
typedef struct _SecretPromptPrivate SecretPromptPrivate;
diff --git a/library/secret-schema.h b/library/secret-schema.h
index ccbf5c9..bb4a93a 100644
--- a/library/secret-schema.h
+++ b/library/secret-schema.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_SCHEMA_H__
diff --git a/library/secret-schemas.h b/library/secret-schemas.h
index 82c5b28..1a1327c 100644
--- a/library/secret-schemas.h
+++ b/library/secret-schemas.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_SCHEMAS_H__
diff --git a/library/secret-service.c b/library/secret-service.c
index f58f2ff..eea9b18 100644
--- a/library/secret-service.c
+++ b/library/secret-service.c
@@ -1079,7 +1079,7 @@ secret_service_get_flags (SecretService *self)
* initializing #SecretService proxy object, then this method will return
* %NULL. Use secret_service_load_collections() to load the collections.
*
- * Returns: (transfer full) (element-type Secret.Collection) (allow-none): a
+ * Returns: (transfer full) (element-type SecretUnstable.Collection) (allow-none): a
* list of the collections in the secret service
*/
GList *
diff --git a/library/secret-service.h b/library/secret-service.h
index 69d3ce0..9c7a406 100644
--- a/library/secret-service.h
+++ b/library/secret-service.h
@@ -14,7 +14,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_SERVICE_H__
@@ -35,6 +35,13 @@ typedef enum {
SECRET_SERVICE_LOAD_COLLECTIONS = 1 << 2,
} SecretServiceFlags;
+typedef enum {
+ SECRET_SEARCH_NONE = 0,
+ SECRET_SEARCH_ALL = 1 << 1,
+ SECRET_SEARCH_UNLOCK = 1 << 2,
+ SECRET_SEARCH_LOAD_SECRETS = 1 << 3,
+} SecretSearchFlags;
+
#define SECRET_TYPE_SERVICE (secret_service_get_type ())
#define SECRET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECRET_TYPE_SERVICE, SecretService))
#define SECRET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET_TYPE_SERVICE, SecretServiceClass))
@@ -42,6 +49,8 @@ typedef enum {
#define SECRET_IS_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_SERVICE))
#define SECRET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_SERVICE, SecretServiceClass))
+typedef struct _SecretCollection SecretCollection;
+typedef struct _SecretService SecretService;
typedef struct _SecretServiceClass SecretServiceClass;
typedef struct _SecretServicePrivate SecretServicePrivate;
diff --git a/library/secret-types.h b/library/secret-types.h
index a7977df..99b47ea 100644
--- a/library/secret-types.h
+++ b/library/secret-types.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_TYPES_H__
@@ -34,23 +34,10 @@ typedef enum {
SECRET_ERROR_ALREADY_EXISTS = 4,
} SecretError;
-typedef struct _SecretCollection SecretCollection;
-typedef struct _SecretItem SecretItem;
-typedef struct _SecretPrompt SecretPrompt;
-typedef struct _SecretService SecretService;
-typedef struct _SecretValue SecretValue;
-
#define SECRET_COLLECTION_DEFAULT "default"
#define SECRET_COLLECTION_SESSION "session"
-typedef enum {
- SECRET_SEARCH_NONE = 0,
- SECRET_SEARCH_ALL = 1 << 1,
- SECRET_SEARCH_UNLOCK = 1 << 2,
- SECRET_SEARCH_LOAD_SECRETS = 1 << 3,
-} SecretSearchFlags;
-
G_END_DECLS
#endif /* __G_SERVICE_H___ */
diff --git a/library/secret-value.c b/library/secret-value.c
index 4f6e49f..9b46c48 100644
--- a/library/secret-value.c
+++ b/library/secret-value.c
@@ -201,7 +201,7 @@ secret_value_ref (SecretValue *value)
/**
* secret_value_unref:
- * @value: (type Secret.Value) (allow-none): value to unreference
+ * @value: (type SecretUnstable.Value) (allow-none): value to unreference
*
* Unreference a #SecretValue. When the last reference is gone, then
* the value will be freed.
diff --git a/library/secret-value.h b/library/secret-value.h
index cdd7035..06b7633 100644
--- a/library/secret-value.h
+++ b/library/secret-value.h
@@ -13,7 +13,7 @@
*/
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
-#error "Only <secret/secret.h> or <secret/secret-unstable.h> can be included directly."
+#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __SECRET_VALUE_H__
@@ -25,6 +25,8 @@
G_BEGIN_DECLS
+typedef struct _SecretValue SecretValue;
+
#define SECRET_TYPE_VALUE (secret_value_get_type ())
GType secret_value_get_type (void) G_GNUC_CONST;
diff --git a/library/secret.h b/library/secret.h
index a9306d7..db7e66e 100644
--- a/library/secret.h
+++ b/library/secret.h
@@ -19,10 +19,28 @@
#define __SECRET_INSIDE_HEADER__
-#include <secret/secret-password.h>
-#include <secret/secret-schema.h>
-#include <secret/secret-schemas.h>
-#include <secret/secret-types.h>
+#include "secret-password.h"
+#include "secret-schema.h"
+#include "secret-schemas.h"
+#include "secret-types.h"
+
+/* This symbol is defined by the secret-unstable.pc pkg-config file */
+#ifdef SECRET_WITH_UNSTABLE
+
+#ifndef SECRET_API_SUBJECT_TO_CHANGE
+#warning "This API has not yet reached stability. Define SECRET_API_SUBJECT_TO_CHANGE to acknowledge"
+#endif
+
+#include "secret-attributes.h"
+#include "secret-collection.h"
+#include "secret-enum-types.h"
+#include "secret-item.h"
+#include "secret-paths.h"
+#include "secret-prompt.h"
+#include "secret-service.h"
+#include "secret-value.h"
+
+#endif /* SECRET_WITH_UNSTABLE */
#undef __SECRET_INSIDE_HEADER__
diff --git a/library/tests/Makefile.am b/library/tests/Makefile.am
index 994c41e..0d04964 100644
--- a/library/tests/Makefile.am
+++ b/library/tests/Makefile.am
@@ -80,13 +80,25 @@ if ENABLE_VAPIGEN
VALA_TESTS = \
test-vala-lang \
+ test-vala-unstable \
$(NULL)
endif
endif
-test-vala-lang.c: test-vala-lang.vala libsecret- SECRET_MAJOR@.vapi mock-service-0.vapi
- $(VALA_V)$(VALAC) -C --pkg gio-2.0 $^
+VALA_FLAGS = \
+ --vapidir=$(builddir)/.. \
+ --pkg gio-2.0
+
+VALA_TESTS_VAPIS = \
+ $(builddir)/../libsecret-unstable.vapi \
+ $(builddir)/../libsecret- SECRET_MAJOR@.vapi \
+ mock-service-0.vapi
+
+test-vala-lang.c: test-vala-lang.vala $(VALA_TESTS_VAPIS)
+ $(VALA_V)$(VALAC) $(VALA_FLAGS) -C $^
+test-vala-unstable.c: test-vala-unstable.vala $(VALA_TESTS_VAPIS)
+ $(VALA_V)$(VALAC) $(VALA_FLAGS) -C $^
TEST_PROGS += $(VALA_TESTS)
@@ -154,21 +166,6 @@ mock_service_0_vapi_FILES = MockService-0.gir
vapidir = $(datadir)/vala/vapi
vapi_DATA = mock-service-0.vapi
-# We have to make a version of the VAPI which references the
-# uninstalled C headers.
-
-VAPIGEN_VAPIS += libsecret- SECRET_MAJOR@.vapi
-
-Secret- SECRET_MAJOR@.metadata: $(top_srcdir)/library/Secret- SECRET_MAJOR@.metadata
- $(AM_V_GEN) echo "* cheader_filename=\"secret-collection.h,secret-item.h,secret-password.h,secret-prompt.h,secret-schema.h,secret-schemas.h,secret-service.h,secret-types.h,secret-value.h\"" > $@ && \
- cat < $^ >> $@
-
-libsecret- SECRET_MAJOR@.vapi: Secret- SECRET_MAJOR@.metadata $(top_builddir)/library/Secret- SECRET_MAJOR@.gir
-
-libsecret_ SECRET_MAJOR@_vapi_DEPS = gio-2.0
-libsecret_ SECRET_MAJOR@_vapi_METADATADIRS = $(srcdir)
-libsecret_ SECRET_MAJOR@_vapi_FILES = $(top_builddir)/library/Secret- SECRET_MAJOR@.gir
-
noinst_DATA += $(VAPIGEN_VAPIS)
endif # ENABLE_VAPIGEN
diff --git a/library/tests/test-vala-unstable.vala b/library/tests/test-vala-unstable.vala
new file mode 100644
index 0000000..390d75d
--- /dev/null
+++ b/library/tests/test-vala-unstable.vala
@@ -0,0 +1,11 @@
+private static int main (string[] args) {
+ GLib.Test.init (ref args);
+
+ var service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.NONE);
+ var path = service.read_alias_dbus_path_sync("default", null);
+
+ /* Just running is enough for us */
+ if (GLib.Test.verbose())
+ stderr.printf("Vala unstable got default path: %s\n", path);
+ return 0;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]