Commit 46137f86 authored by Stef Walter's avatar Stef Walter

Rename gsecret to libsecret

 * Fixes the namespacing capitalization issues run into with
   gobject-introspection and glib code tools
parent 797b63f8
......@@ -34,13 +34,13 @@ stamp*
/build/valgrind-suppressions
/po/POTFILES
/po/gsecret.pot
/po/libsecret.pot
/egg/tests/test-*
!/egg/tests/test-*.c
/library/gsecret-dbus-generated.[ch]
/library/gsecret-enum-types.[ch]
/library/secret-dbus-generated.[ch]
/library/secret-enum-types.[ch]
/library/tests/test-*
!/library/tests/test-*.c
=== ChangeLog discontinued ===
gsecret relies on commit messages to provide change history. Please
libsecret relies on commit messages to provide change history. Please
write commit messages in the following format:
=== begin example commit ===
......
......@@ -6,9 +6,9 @@ test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=gsecret
PROJECT=libsecret
TEST_TYPE=-f
FILE=library/gsecret-value.c
FILE=library/secret-value.c
DIE=0
......
AC_PREREQ(2.65)
AC_CONFIG_MACRO_DIR([build/m4])
AC_INIT([gsecret],[0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=gsecret])
AC_INIT([libsecret],[0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret])
AC_CONFIG_SRCDIR([library/gsecret-value.c])
AC_CONFIG_SRCDIR([library/secret-value.c])
AC_CONFIG_HEADERS([config.h])
dnl Other initialization
......@@ -24,7 +24,7 @@ AC_CHECK_FUNCS(mlock)
#
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=gsecret
GETTEXT_PACKAGE=libsecret
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
......
......@@ -7,42 +7,42 @@ module_flags = \
-avoid-version \
-module \
-no-undefined \
-export-symbols-regex '^gsecret_'
-export-symbols-regex '^secret_'
INCLUDES = \
-DGSECRET_COMPILATION
-DSECRET_COMPILATION
lib_LTLIBRARIES = libgsecret.la
lib_LTLIBRARIES = libsecret.la
HEADER_FILES = \
gsecret-collection.h \
gsecret-item.h \
gsecret-password.h \
gsecret-prompt.h \
gsecret-service.h \
gsecret-value.h
secret-collection.h \
secret-item.h \
secret-password.h \
secret-prompt.h \
secret-service.h \
secret-value.h
BUILT_SOURCES = \
gsecret-dbus-generated.c gsecret-dbus-generated.h \
gsecret-enum-types.c gsecret-enum-types.h
secret-dbus-generated.c secret-dbus-generated.h \
secret-enum-types.c secret-enum-types.h
libgsecret_la_SOURCES = \
gsecret-collection.h gsecret-collection.c \
gsecret-item.h gsecret-item.c \
gsecret-methods.c \
gsecret-password.h gsecret-password.c \
gsecret-prompt.h gsecret-prompt.c \
gsecret-service.h gsecret-service.c \
gsecret-session.h gsecret-session.c \
gsecret-util.c \
gsecret-value.h gsecret-value.c \
libsecret_la_SOURCES = \
secret-collection.h secret-collection.c \
secret-item.h secret-item.c \
secret-methods.c \
secret-password.h secret-password.c \
secret-prompt.h secret-prompt.c \
secret-service.h secret-service.c \
secret-session.h secret-session.c \
secret-util.c \
secret-value.h secret-value.c \
$(BUILT_SOURCES) \
$(NULL)
libgsecret_la_CFLAGS = \
libsecret_la_CFLAGS = \
$(LIBGCRYPT_CFLAGS)
libgsecret_la_LIBADD = \
libsecret_la_LIBADD = \
$(top_builddir)/egg/libegg.la \
$(LIBGCRYPT_LIBS) \
$(LIBS)
......@@ -50,23 +50,23 @@ libgsecret_la_LIBADD = \
DBUS_XML_DEFINITIONS = \
org.freedesktop.Secrets.xml
gsecret-dbus-generated.c: $(DBUS_XML_DEFINITIONS) Makefile.am
secret-dbus-generated.c: $(DBUS_XML_DEFINITIONS) Makefile.am
$(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.Secret. \
--generate-c-code gsecret-dbus-generated --c-namespace GSecretGen \
--generate-c-code secret-dbus-generated --c-namespace SecretGen \
$(DBUS_XML_DEFINITIONS)
$(AM_V_GEN) sed -i -e 's/gsecret_gen_/_gsecret_gen_/g' gsecret-dbus-generated.[ch]
$(AM_V_GEN) sed -i -e '1i #define GLIB_DISABLE_DEPRECATION_WARNINGS' gsecret-dbus-generated.c
gsecret-dbus-generated.h: gsecret-dbus-generated.c
$(AM_V_GEN) sed -i -e 's/secret_gen_/_secret_gen_/g' secret-dbus-generated.[ch]
$(AM_V_GEN) sed -i -e '1i #define GLIB_DISABLE_DEPRECATION_WARNINGS' secret-dbus-generated.c
secret-dbus-generated.h: secret-dbus-generated.c
gsecret-enum-types.h: gsecret-enum-types.h.template $(HEADER_FILES)
secret-enum-types.h: secret-enum-types.h.template $(HEADER_FILES)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
gsecret-enum-types.c: gsecret-enum-types.c.template $(HEADER_FILES)
secret-enum-types.c: secret-enum-types.c.template $(HEADER_FILES)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
EXTRA_DIST = \
gsecret-enum-types.h.template \
gsecret-enum-types.c.template
secret-enum-types.h.template \
secret-enum-types.c.template
check-memory:
make -C tests check-memory
\ No newline at end of file
/* GSecret - GLib wrapper for Secret Service
/* libsecret - GLib wrapper for Secret Service
*
* Copyright 2012 Red Hat Inc.
*
......@@ -10,107 +10,107 @@
* See the included COPYING file for more information.
*/
#ifndef __GSECRET_COLLECTION_H__
#define __GSECRET_COLLECTION_H__
#ifndef __SECRET_COLLECTION_H__
#define __SECRET_COLLECTION_H__
#include <gio/gio.h>
#include "gsecret-types.h"
#include "secret-types.h"
G_BEGIN_DECLS
#define GSECRET_TYPE_COLLECTION (gsecret_collection_get_type ())
#define GSECRET_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), GSECRET_TYPE_COLLECTION, GSecretCollection))
#define GSECRET_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), GSECRET_TYPE_COLLECTION, GSecretCollectionClass))
#define GSECRET_IS_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), GSECRET_TYPE_COLLECTION))
#define GSECRET_IS_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), GSECRET_TYPE_COLLECTION))
#define GSECRET_COLLECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GSECRET_TYPE_COLLECTION, GSecretCollectionClass))
#define SECRET_TYPE_COLLECTION (secret_collection_get_type ())
#define SECRET_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECRET_TYPE_COLLECTION, SecretCollection))
#define SECRET_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET_TYPE_COLLECTION, SecretCollectionClass))
#define SECRET_IS_COLLECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), SECRET_TYPE_COLLECTION))
#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 _GSecretCollectionClass GSecretCollectionClass;
typedef struct _GSecretCollectionPrivate GSecretCollectionPrivate;
typedef struct _SecretCollectionClass SecretCollectionClass;
typedef struct _SecretCollectionPrivate SecretCollectionPrivate;
struct _GSecretCollection {
struct _SecretCollection {
GDBusProxy parent;
GSecretCollectionPrivate *pv;
SecretCollectionPrivate *pv;
};
struct _GSecretCollectionClass {
struct _SecretCollectionClass {
GDBusProxyClass parent_class;
gpointer padding[8];
};
GType gsecret_collection_get_type (void) G_GNUC_CONST;
GType secret_collection_get_type (void) G_GNUC_CONST;
void gsecret_collection_new (GSecretService *service,
void secret_collection_new (SecretService *service,
const gchar *collection_path,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GSecretCollection * gsecret_collection_new_finish (GAsyncResult *result,
SecretCollection * secret_collection_new_finish (GAsyncResult *result,
GError **error);
GSecretCollection * gsecret_collection_new_sync (GSecretService *service,
SecretCollection * secret_collection_new_sync (SecretService *service,
const gchar *collection_path,
GCancellable *cancellable,
GError **error);
void gsecret_collection_refresh (GSecretCollection *self);
void secret_collection_refresh (SecretCollection *self);
void gsecret_collection_create (GSecretService *service,
void secret_collection_create (SecretService *service,
const gchar *label,
const gchar *alias,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GSecretCollection * gsecret_collection_create_finish (GAsyncResult *result,
SecretCollection * secret_collection_create_finish (GAsyncResult *result,
GError **error);
GSecretCollection * gsecret_collection_create_sync (GSecretService *service,
SecretCollection * secret_collection_create_sync (SecretService *service,
const gchar *label,
const gchar *alias,
GCancellable *cancellable,
GError **error);
void gsecret_collection_delete (GSecretCollection *self,
void secret_collection_delete (SecretCollection *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_collection_delete_finish (GSecretCollection *self,
gboolean secret_collection_delete_finish (SecretCollection *self,
GAsyncResult *result,
GError **error);
gboolean gsecret_collection_delete_sync (GSecretCollection *self,
gboolean secret_collection_delete_sync (SecretCollection *self,
GCancellable *cancellable,
GError **error);
GList * gsecret_collection_get_items (GSecretCollection *self);
GList * secret_collection_get_items (SecretCollection *self);
gchar * gsecret_collection_get_label (GSecretCollection *self);
gchar * secret_collection_get_label (SecretCollection *self);
void gsecret_collection_set_label (GSecretCollection *self,
void secret_collection_set_label (SecretCollection *self,
const gchar *label,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_collection_set_label_finish (GSecretCollection *self,
gboolean secret_collection_set_label_finish (SecretCollection *self,
GAsyncResult *result,
GError **error);
gboolean gsecret_collection_set_label_sync (GSecretCollection *self,
gboolean secret_collection_set_label_sync (SecretCollection *self,
const gchar *label,
GCancellable *cancellable,
GError **error);
gboolean gsecret_collection_get_locked (GSecretCollection *self);
gboolean secret_collection_get_locked (SecretCollection *self);
guint64 gsecret_collection_get_created (GSecretCollection *self);
guint64 secret_collection_get_created (SecretCollection *self);
guint64 gsecret_collection_get_modified (GSecretCollection *self);
guint64 secret_collection_get_modified (SecretCollection *self);
G_END_DECLS
#endif /* __GSECRET_COLLECTION_H___ */
#endif /* __SECRET_COLLECTION_H___ */
......@@ -2,8 +2,8 @@
#include <glib-object.h>
#ifndef GSECRET_COMPILATION
#define GSECRET_COMPILATION
#ifndef SECRET_COMPILATION
#define SECRET_COMPILATION
#endif
/*** END file-header ***/
......
/*** BEGIN file-header ***/
#if !defined (__GSECRET_INSIDE_HEADER__) && !defined (GSECRET_COMPILATION)
#error "Only <gsecret/gsecret.h> can be included directly."
#if !defined (__SECRET_INSIDE_HEADER__) && !defined (SECRET_COMPILATION)
#error "Only <secret/secret.h> can be included directly."
#endif
#ifndef __GSECRET_ENUM_TYPES_H__
#define __GSECRET_ENUM_TYPES_H__
#ifndef __SECRET_ENUM_TYPES_H__
#define __SECRET_ENUM_TYPES_H__
#include <glib-object.h>
......@@ -24,5 +24,5 @@ GType @enum_name@_get_type (void) G_GNUC_CONST;
/*** BEGIN file-tail ***/
G_END_DECLS
#endif /* __GSECRET_ENUM_TYPES_H__ */
#endif /* __SECRET_ENUM_TYPES_H__ */
/*** END file-tail ***/
/* GSecret - GLib wrapper for Secret Service
/* libsecret - GLib wrapper for Secret Service
*
* Copyright 2012 Red Hat Inc.
*
......@@ -10,159 +10,159 @@
* See the included COPYING file for more information.
*/
#ifndef __GSECRET_ITEM_H__
#define __GSECRET_ITEM_H__
#ifndef __SECRET_ITEM_H__
#define __SECRET_ITEM_H__
#include <gio/gio.h>
#include "gsecret-item.h"
#include "gsecret-service.h"
#include "gsecret-value.h"
#include "secret-item.h"
#include "secret-service.h"
#include "secret-value.h"
G_BEGIN_DECLS
#define GSECRET_TYPE_ITEM (gsecret_item_get_type ())
#define GSECRET_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), GSECRET_TYPE_ITEM, GSecretItem))
#define GSECRET_ITEM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), GSECRET_TYPE_ITEM, GSecretItemClass))
#define GSECRET_IS_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), GSECRET_TYPE_ITEM))
#define GSECRET_IS_ITEM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), GSECRET_TYPE_ITEM))
#define GSECRET_ITEM_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GSECRET_TYPE_ITEM, GSecretItemClass))
#define SECRET_TYPE_ITEM (secret_item_get_type ())
#define SECRET_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), SECRET_TYPE_ITEM, SecretItem))
#define SECRET_ITEM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), SECRET_TYPE_ITEM, SecretItemClass))
#define SECRET_IS_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), SECRET_TYPE_ITEM))
#define SECRET_IS_ITEM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), SECRET_TYPE_ITEM))
#define SECRET_ITEM_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), SECRET_TYPE_ITEM, SecretItemClass))
typedef struct _GSecretItemClass GSecretItemClass;
typedef struct _GSecretItemPrivate GSecretItemPrivate;
typedef struct _SecretItemClass SecretItemClass;
typedef struct _SecretItemPrivate SecretItemPrivate;
struct _GSecretItem {
struct _SecretItem {
GDBusProxy parent_instance;
GSecretItemPrivate *pv;;
SecretItemPrivate *pv;;
};
struct _GSecretItemClass {
struct _SecretItemClass {
GDBusProxyClass parent_class;
gpointer padding[4];
};
GType gsecret_item_get_type (void) G_GNUC_CONST;
GType secret_item_get_type (void) G_GNUC_CONST;
void gsecret_item_new (GSecretService *service,
void secret_item_new (SecretService *service,
const gchar *item_path,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GSecretItem * gsecret_item_new_finish (GAsyncResult *result,
SecretItem * secret_item_new_finish (GAsyncResult *result,
GError **error);
GSecretItem * gsecret_item_new_sync (GSecretService *service,
SecretItem * secret_item_new_sync (SecretService *service,
const gchar *item_path,
GCancellable *cancellable,
GError **error);
void gsecret_item_refresh (GSecretItem *self);
void secret_item_refresh (SecretItem *self);
void gsecret_item_create (GSecretCollection *collection,
void secret_item_create (SecretCollection *collection,
const gchar *schema_name,
const gchar *label,
GHashTable *attributes,
GSecretValue *value,
SecretValue *value,
gboolean replace,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GSecretItem * gsecret_item_create_finish (GAsyncResult *result,
SecretItem * secret_item_create_finish (GAsyncResult *result,
GError **error);
GSecretItem * gsecret_item_create_sync (GSecretCollection *collection,
SecretItem * secret_item_create_sync (SecretCollection *collection,
const gchar *schema_name,
const gchar *label,
GHashTable *attributes,
GSecretValue *value,
SecretValue *value,
gboolean replace,
GCancellable *cancellable,
GError **error);
void gsecret_item_delete (GSecretItem *self,
void secret_item_delete (SecretItem *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_item_delete_finish (GSecretItem *self,
gboolean secret_item_delete_finish (SecretItem *self,
GAsyncResult *result,
GError **error);
gboolean gsecret_item_delete_sync (GSecretItem *self,
gboolean secret_item_delete_sync (SecretItem *self,
GCancellable *cancellable,
GError **error);
void gsecret_item_get_secret (GSecretItem *self,
void secret_item_get_secret (SecretItem *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GSecretValue * gsecret_item_get_secret_finish (GSecretItem *self,
SecretValue * secret_item_get_secret_finish (SecretItem *self,
GAsyncResult *result,
GError **error);
GSecretValue * gsecret_item_get_secret_sync (GSecretItem *self,
SecretValue * secret_item_get_secret_sync (SecretItem *self,
GCancellable *cancellable,
GError **error);
void gsecret_item_set_secret (GSecretItem *self,
GSecretValue *value,
void secret_item_set_secret (SecretItem *self,
SecretValue *value,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_item_set_secret_finish (GSecretItem *self,
gboolean secret_item_set_secret_finish (SecretItem *self,
GAsyncResult *result,
GError **error);
gboolean gsecret_item_set_secret_sync (GSecretItem *self,
GSecretValue *value,
gboolean secret_item_set_secret_sync (SecretItem *self,
SecretValue *value,
GCancellable *cancellable,
GError **error);
GHashTable* gsecret_item_get_attributes (GSecretItem *self);
GHashTable* secret_item_get_attributes (SecretItem *self);
void gsecret_item_set_attributes (GSecretItem *self,
void secret_item_set_attributes (SecretItem *self,
GHashTable *attributes,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_item_set_attributes_finish (GSecretItem *self,
gboolean secret_item_set_attributes_finish (SecretItem *self,
GAsyncResult *result,
GError **error);
gboolean gsecret_item_set_attributes_sync (GSecretItem *self,
gboolean secret_item_set_attributes_sync (SecretItem *self,
GHashTable *attributes,
GCancellable *cancellable,
GError **error);
gchar * gsecret_item_get_label (GSecretItem *self);
gchar * secret_item_get_label (SecretItem *self);
void gsecret_item_set_label (GSecretItem *self,
void secret_item_set_label (SecretItem *self,
const gchar *label,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_item_set_label_finish (GSecretItem *self,
gboolean secret_item_set_label_finish (SecretItem *self,
GAsyncResult *result,
GError **error);
gboolean gsecret_item_set_label_sync (GSecretItem *self,
gboolean secret_item_set_label_sync (SecretItem *self,
const gchar *label,
GCancellable *cancellable,
GError **error);
gchar * gsecret_item_get_schema (GSecretItem *self);
gchar * secret_item_get_schema (SecretItem *self);
gboolean gsecret_item_get_locked (GSecretItem *self);
gboolean secret_item_get_locked (SecretItem *self);
guint64 gsecret_item_get_created (GSecretItem *self);
guint64 secret_item_get_created (SecretItem *self);
guint64 gsecret_item_get_modified (GSecretItem *self);
guint64 secret_item_get_modified (SecretItem *self);
G_END_DECLS
......
/* GSecret - GLib wrapper for Secret Service
/* libsecret - GLib wrapper for Secret Service
*
* Copyright 2011 Collabora Ltd.
*
......@@ -10,16 +10,16 @@
* See the included COPYING file for more information.
*/
#ifndef __GSECRET_PASSWORD_H__
#define __GSECRET_PASSWORD_H__
#ifndef __SECRET_PASSWORD_H__
#define __SECRET_PASSWORD_H__
#include <gio/gio.h>
G_BEGIN_DECLS
#include "gsecret-types.h"
#include "secret-types.h"
void gsecret_password_store (const GSecretSchema *schema,
void secret_password_store (const SecretSchema *schema,
const gchar *collection_path,
const gchar *label,
const gchar *password,
......@@ -28,7 +28,7 @@ void gsecret_password_store (const GSecretSchema *sc
gpointer user_data,
...) G_GNUC_NULL_TERMINATED;
void gsecret_password_storev (const GSecretSchema *schema,
void secret_password_storev (const SecretSchema *schema,
const gchar *collection_path,
const gchar *label,
const gchar *password,
......@@ -37,10 +37,10 @@ void gsecret_password_storev (const GSecretSchema *sc
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gsecret_password_store_finish (GAsyncResult *result,
gboolean secret_password_store_finish (GAsyncResult *result,
GError **error);
gboolean gsecret_password_store_sync (const GSecretSchema *schema,
gboolean secret_password_store_sync (const SecretSchema *schema,
const gchar *collection_path,
const gchar *label,
const gchar *password,
......@@ -48,7 +48,7 @@ gboolean gsecret_password_store_sync (const GSecretSchema *sc
GError **error,
...) G_GNUC_NULL_TERMINATED;
gboolean gsecret_password_storev_sync (const GSecretSchema *schema,
gboolean secret_password_storev_sync (const SecretSchema *schema,