mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 12:48:51 +00:00
WIP split stable/unstable packages/gir/vapis
This commit is contained in:
parent
931f677c7a
commit
9bf4efd762
@ -249,6 +249,7 @@ AC_CONFIG_FILES([
|
||||
po/Makefile
|
||||
library/Makefile
|
||||
library/libsecret.pc
|
||||
library/libsecret-unstable.pc
|
||||
library/tests/Makefile
|
||||
tool/Makefile
|
||||
])
|
||||
|
@ -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
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
|
2
library/SecretUnstable.metadata
Normal file
2
library/SecretUnstable.metadata
Normal file
@ -0,0 +1,2 @@
|
||||
// Metadata file for Vala API generation.
|
||||
// See https://live.gnome.org/Vala/UpstreamGuide for more information
|
13
library/libsecret-unstable.pc.in
Normal file
13
library/libsecret-unstable.pc.in
Normal file
@ -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
|
@ -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__
|
||||
|
@ -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()
|
||||
*/
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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"
|
||||
|
@ -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 *
|
||||
|
@ -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__
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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__
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "secret-item.h"
|
||||
#include "secret-service.h"
|
||||
#include "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_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;
|
||||
|
||||
|
@ -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__
|
||||
|
@ -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__
|
||||
|
@ -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 *
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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___ */
|
||||
|
@ -1,39 +0,0 @@
|
||||
/* libsecret - GLib wrapper for Secret Service
|
||||
*
|
||||
* Copyright 2012 Red Hat Inc.
|
||||
*
|
||||
* 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 licence or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* See the included COPYING file for more information.
|
||||
*
|
||||
* Author: Stef Walter <stefw@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef SECRET_API_SUBJECT_TO_CHANGE
|
||||
#error "This API has not yet reached stability. Define SECRET_API_SUBJECT_TO_CHANGE to acknowledge"
|
||||
#endif
|
||||
|
||||
#ifndef __SECRET_UNSTABLE_H__
|
||||
#define __SECRET_UNSTABLE_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <secret/secret.h>
|
||||
|
||||
#define __SECRET_INSIDE_HEADER__
|
||||
|
||||
#include <secret/secret-attributes.h>
|
||||
#include <secret/secret-collection.h>
|
||||
#include <secret/secret-enum-types.h>
|
||||
#include <secret/secret-item.h>
|
||||
#include <secret/secret-paths.h>
|
||||
#include <secret/secret-prompt.h>
|
||||
#include <secret/secret-service.h>
|
||||
#include <secret/secret-value.h>
|
||||
|
||||
#undef __SECRET_INSIDE_HEADER__
|
||||
|
||||
#endif /* __SECRET_UNSTABLE_H__ */
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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__
|
||||
|
||||
|
@ -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
|
||||
|
11
library/tests/test-vala-unstable.vala
Normal file
11
library/tests/test-vala-unstable.vala
Normal file
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user