[seahorse/refactor: 12/32] Rename SeahorsePkcs11Source to SeahorsePkcs11Token
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/refactor: 12/32] Rename SeahorsePkcs11Source to SeahorsePkcs11Token
- Date: Tue, 18 Oct 2011 07:11:01 +0000 (UTC)
commit db3f5ab88f918bb8493641037d117209f45d330c
Author: Stef Walter <stefw collabora co uk>
Date: Fri Sep 9 14:12:08 2011 +0200
Rename SeahorsePkcs11Source to SeahorsePkcs11Token
* Display label and manufacturer as label and tooltip.
pkcs11/Makefile.am | 2 +-
pkcs11/seahorse-pkcs11-backend.c | 4 +-
pkcs11/seahorse-pkcs11-operations.c | 34 ++--
pkcs11/seahorse-pkcs11-operations.h | 8 +-
pkcs11/seahorse-pkcs11-source.h | 62 --------
...rse-pkcs11-source.c => seahorse-pkcs11-token.c} | 156 ++++++++++----------
pkcs11/seahorse-pkcs11-token.h | 61 ++++++++
src/seahorse-sidebar.c | 1 +
8 files changed, 164 insertions(+), 164 deletions(-)
---
diff --git a/pkcs11/Makefile.am b/pkcs11/Makefile.am
index a6a76b0..142d5f1 100644
--- a/pkcs11/Makefile.am
+++ b/pkcs11/Makefile.am
@@ -22,7 +22,7 @@ libseahorse_pkcs11_la_SOURCES = \
seahorse-pkcs11-helpers.c seahorse-pkcs11-helpers.h \
seahorse-pkcs11-object.c seahorse-pkcs11-object.h \
seahorse-pkcs11-operations.c seahorse-pkcs11-operations.h \
- seahorse-pkcs11-source.c seahorse-pkcs11-source.h\
+ seahorse-pkcs11-token.c seahorse-pkcs11-token.h\
seahorse-pkcs11.c seahorse-pkcs11.h
libseahorse_pkcs11_la_LIBADD = \
diff --git a/pkcs11/seahorse-pkcs11-backend.c b/pkcs11/seahorse-pkcs11-backend.c
index 6cb0a76..ca97dfd 100644
--- a/pkcs11/seahorse-pkcs11-backend.c
+++ b/pkcs11/seahorse-pkcs11-backend.c
@@ -23,7 +23,7 @@
#include "seahorse-pkcs11-backend.h"
#include "seahorse-pkcs11-commands.h"
-#include "seahorse-pkcs11-source.h"
+#include "seahorse-pkcs11-token.h"
#include "seahorse-backend.h"
#include "seahorse-registry.h"
@@ -90,7 +90,7 @@ seahorse_pkcs11_backend_constructed (GObject *obj)
for (m = modules; m != NULL; m = g_list_next (m)) {
slots = gck_module_get_slots (m->data, FALSE);
for (s = slots; s; s = g_list_next (s)) {
- source = SEAHORSE_SOURCE (seahorse_pkcs11_source_new (s->data));
+ source = SEAHORSE_SOURCE (seahorse_pkcs11_token_new (s->data));
self->slots = g_list_append (self->slots, source);
}
diff --git a/pkcs11/seahorse-pkcs11-operations.c b/pkcs11/seahorse-pkcs11-operations.c
index f5fc3c4..c71b59d 100644
--- a/pkcs11/seahorse-pkcs11-operations.c
+++ b/pkcs11/seahorse-pkcs11-operations.c
@@ -25,7 +25,7 @@
#include "seahorse-pkcs11-helpers.h"
#include "seahorse-pkcs11-object.h"
#include "seahorse-pkcs11-operations.h"
-#include "seahorse-pkcs11-source.h"
+#include "seahorse-pkcs11-token.h"
#include "seahorse-progress.h"
@@ -37,7 +37,7 @@
#include <gcr/gcr.h>
typedef struct {
- SeahorsePkcs11Source *source;
+ SeahorsePkcs11Token *token;
GCancellable *cancellable;
GHashTable *checks;
GckSession *session;
@@ -47,7 +47,7 @@ static void
pkcs11_refresh_free (gpointer data)
{
pkcs11_refresh_closure *closure = data;
- g_object_unref (closure->source);
+ g_object_unref (closure->token);
g_clear_object (&closure->cancellable);
g_hash_table_destroy (closure->checks);
g_clear_object (&closure->session);
@@ -59,9 +59,9 @@ remove_each_object (gpointer key,
gpointer value,
gpointer user_data)
{
- SeahorsePkcs11Source *source = SEAHORSE_PKCS11_SOURCE (user_data);
+ SeahorsePkcs11Token *token = SEAHORSE_PKCS11_TOKEN (user_data);
SeahorsePkcs11Object *object = SEAHORSE_PKCS11_OBJECT (value);
- seahorse_pkcs11_source_remove_object (source, object);
+ seahorse_pkcs11_token_remove_object (token, object);
return TRUE;
}
@@ -83,13 +83,13 @@ on_refresh_find_objects (GckSession *session,
/* Remove all objects that were found, from the check table */
for (l = objects; l; l = g_list_next (l)) {
- seahorse_pkcs11_source_receive_object (closure->source, l->data);
+ seahorse_pkcs11_token_receive_object (closure->token, l->data);
handle = gck_object_get_handle (l->data);
g_hash_table_remove (closure->checks, &handle);
}
/* Remove everything not found from the context */
- g_hash_table_foreach_remove (closure->checks, remove_each_object, closure->source);
+ g_hash_table_foreach_remove (closure->checks, remove_each_object, closure->token);
}
g_simple_async_result_complete (res);
@@ -126,7 +126,7 @@ on_refresh_open_session (GObject *source,
}
void
-seahorse_pkcs11_refresh_async (SeahorsePkcs11Source *source,
+seahorse_pkcs11_refresh_async (SeahorsePkcs11Token *token,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -137,18 +137,18 @@ seahorse_pkcs11_refresh_async (SeahorsePkcs11Source *source,
GList *objects, *l;
gulong handle;
- res = g_simple_async_result_new (G_OBJECT (source), callback, user_data,
+ res = g_simple_async_result_new (G_OBJECT (token), callback, user_data,
seahorse_pkcs11_refresh_async);
closure = g_new0 (pkcs11_refresh_closure, 1);
closure->checks = g_hash_table_new_full (seahorse_pkcs11_ulong_hash,
seahorse_pkcs11_ulong_equal,
g_free, g_object_unref);
- closure->source = g_object_ref (source);
+ closure->token = g_object_ref (token);
closure->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
g_simple_async_result_set_op_res_gpointer (res, closure, pkcs11_refresh_free);
/* Make note of all the objects that were there */
- objects = gcr_collection_get_objects (GCR_COLLECTION (source));
+ objects = gcr_collection_get_objects (GCR_COLLECTION (token));
for (l = objects; l; l = g_list_next (l)) {
if (g_object_class_find_property (G_OBJECT_GET_CLASS (l->data), "pkcs11-handle")) {
g_object_get (l->data, "pkcs11-handle", &handle, NULL);
@@ -160,7 +160,7 @@ seahorse_pkcs11_refresh_async (SeahorsePkcs11Source *source,
g_list_free (objects);
/* Step 1. Load the session */
- slot = seahorse_pkcs11_source_get_slot (closure->source);
+ slot = seahorse_pkcs11_token_get_slot (closure->token);
gck_slot_open_session_async (slot, GCK_SESSION_READ_WRITE, closure->cancellable,
on_refresh_open_session, g_object_ref (res));
@@ -168,11 +168,11 @@ seahorse_pkcs11_refresh_async (SeahorsePkcs11Source *source,
}
gboolean
-seahorse_pkcs11_refresh_finish (SeahorsePkcs11Source *source,
+seahorse_pkcs11_refresh_finish (SeahorsePkcs11Token *token,
GAsyncResult *result,
GError **error)
{
- g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (source),
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (token),
seahorse_pkcs11_refresh_async), FALSE);
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
@@ -208,7 +208,7 @@ on_delete_object_completed (GObject *source,
pkcs11_delete_closure *closure = g_simple_async_result_get_op_res_gpointer (res);
GError *error = NULL;
SeahorseObject *object;
- SeahorsePkcs11Source *pkcs11_source;
+ SeahorsePkcs11Token *pkcs11_token;
object = g_queue_pop_head (closure->objects);
seahorse_progress_end (closure->cancellable, object);
@@ -226,8 +226,8 @@ on_delete_object_completed (GObject *source,
}
if (error == NULL) {
- pkcs11_source = SEAHORSE_PKCS11_SOURCE (seahorse_object_get_source (object));
- seahorse_pkcs11_source_remove_object (pkcs11_source, SEAHORSE_PKCS11_OBJECT (object));
+ pkcs11_token = SEAHORSE_PKCS11_TOKEN (seahorse_object_get_source (object));
+ seahorse_pkcs11_token_remove_object (pkcs11_token, SEAHORSE_PKCS11_OBJECT (object));
pkcs11_delete_one_object (res);
}
diff --git a/pkcs11/seahorse-pkcs11-operations.h b/pkcs11/seahorse-pkcs11-operations.h
index f915db0..d3a876f 100644
--- a/pkcs11/seahorse-pkcs11-operations.h
+++ b/pkcs11/seahorse-pkcs11-operations.h
@@ -26,14 +26,14 @@
#include <glib-object.h>
#include "seahorse-pkcs11-object.h"
-#include "seahorse-pkcs11-source.h"
+#include "seahorse-pkcs11-token.h"
-void seahorse_pkcs11_refresh_async (SeahorsePkcs11Source *source,
+void seahorse_pkcs11_refresh_async (SeahorsePkcs11Token *token,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean seahorse_pkcs11_refresh_finish (SeahorsePkcs11Source *source,
+gboolean seahorse_pkcs11_refresh_finish (SeahorsePkcs11Token *token,
GAsyncResult *result,
GError **error);
@@ -45,4 +45,4 @@ void seahorse_pkcs11_delete_async (GList *objects,
gboolean seahorse_pkcs11_delete_finish (GAsyncResult *result,
GError **error);
-#endif /* __SEAHORSE_PKCS11_OPERATIONS_H__ */
+#endif /* __SEAHORSE_PKCS11_TOKEN_H__ */
diff --git a/pkcs11/seahorse-pkcs11-source.c b/pkcs11/seahorse-pkcs11-token.c
similarity index 56%
rename from pkcs11/seahorse-pkcs11-source.c
rename to pkcs11/seahorse-pkcs11-token.c
index 162565f..7d6df98 100644
--- a/pkcs11/seahorse-pkcs11-source.c
+++ b/pkcs11/seahorse-pkcs11-token.c
@@ -37,7 +37,7 @@
#include "seahorse-pkcs11-helpers.h"
#include "seahorse-pkcs11-object.h"
#include "seahorse-pkcs11-operations.h"
-#include "seahorse-pkcs11-source.h"
+#include "seahorse-pkcs11-token.h"
#include "seahorse-registry.h"
@@ -50,18 +50,18 @@ enum {
PROP_FLAGS
};
-struct _SeahorsePkcs11SourcePrivate {
+struct _SeahorsePkcs11TokenPrivate {
GckSlot *slot;
GHashTable *objects;
};
-static void seahorse_pkcs11_source_iface (SeahorseSourceIface *iface);
+static void seahorse_pkcs11_token_source_iface (SeahorseSourceIface *iface);
-static void seahorse_pkcs11_collection_iface (GcrCollectionIface *iface);
+static void seahorse_pkcs11_collection_iface (GcrCollectionIface *iface);
-G_DEFINE_TYPE_EXTENDED (SeahorsePkcs11Source, seahorse_pkcs11_source, G_TYPE_OBJECT, 0,
+G_DEFINE_TYPE_EXTENDED (SeahorsePkcs11Token, seahorse_pkcs11_token, G_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (GCR_TYPE_COLLECTION, seahorse_pkcs11_collection_iface);
- G_IMPLEMENT_INTERFACE (SEAHORSE_TYPE_SOURCE, seahorse_pkcs11_source_iface);
+ G_IMPLEMENT_INTERFACE (SEAHORSE_TYPE_SOURCE, seahorse_pkcs11_token_source_iface);
);
/* -----------------------------------------------------------------------------
@@ -69,40 +69,40 @@ G_DEFINE_TYPE_EXTENDED (SeahorsePkcs11Source, seahorse_pkcs11_source, G_TYPE_OBJ
*/
static void
-seahorse_pkcs11_source_init (SeahorsePkcs11Source *self)
+seahorse_pkcs11_token_init (SeahorsePkcs11Token *self)
{
- self->pv = (G_TYPE_INSTANCE_GET_PRIVATE (self, SEAHORSE_TYPE_PKCS11_SOURCE, SeahorsePkcs11SourcePrivate));
+ self->pv = (G_TYPE_INSTANCE_GET_PRIVATE (self, SEAHORSE_TYPE_PKCS11_TOKEN, SeahorsePkcs11TokenPrivate));
self->pv->objects = g_hash_table_new_full (seahorse_pkcs11_ulong_hash,
seahorse_pkcs11_ulong_equal,
g_free, g_object_unref);
}
-static GObject*
-seahorse_pkcs11_source_constructor (GType type, guint n_props, GObjectConstructParam* props)
-{
- GObject* obj = G_OBJECT_CLASS (seahorse_pkcs11_source_parent_class)->constructor (type, n_props, props);
- SeahorsePkcs11Source *self = NULL;
-
- if (obj) {
- self = SEAHORSE_PKCS11_SOURCE (obj);
- g_return_val_if_fail (self->pv->slot, NULL);
- }
-
- return obj;
-}
-
-static void
-seahorse_pkcs11_source_get_property (GObject *object, guint prop_id, GValue *value,
- GParamSpec *pspec)
+static void
+seahorse_pkcs11_token_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (object);
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (object);
+ GckTokenInfo *token;
switch (prop_id) {
case PROP_LABEL:
- g_value_set_string (value, _("To Do Pkcs11"));
+ token = gck_slot_get_token_info (self->pv->slot);
+ if (token == NULL)
+ g_value_set_string (value, _("Unknown"));
+ else
+ g_value_set_string (value, token->label);
+ gck_token_info_free (token);
break;
case PROP_DESCRIPTION:
- g_value_set_string (value, _("To Do Description"));
+ token = gck_slot_get_token_info (self->pv->slot);
+ if (token == NULL)
+ g_value_set_string (value, NULL);
+ else
+ g_value_set_string (value, token->manufacturer_id);
+ gck_token_info_free (token);
+ break;
break;
case PROP_ICON:
g_value_take_object (value, g_themed_icon_new (GTK_STOCK_DIALOG_QUESTION));
@@ -116,11 +116,13 @@ seahorse_pkcs11_source_get_property (GObject *object, guint prop_id, GValue *val
}
}
-static void
-seahorse_pkcs11_source_set_property (GObject *object, guint prop_id, const GValue *value,
- GParamSpec *pspec)
+static void
+seahorse_pkcs11_token_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (object);
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (object);
switch (prop_id) {
case PROP_SLOT:
@@ -133,43 +135,42 @@ seahorse_pkcs11_source_set_property (GObject *object, guint prop_id, const GValu
}
static void
-seahorse_pkcs11_source_dispose (GObject *obj)
+seahorse_pkcs11_token_dispose (GObject *obj)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (obj);
-
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (obj);
+
/* The keyring object */
if (self->pv->slot)
g_object_unref (self->pv->slot);
self->pv->slot = NULL;
- G_OBJECT_CLASS (seahorse_pkcs11_source_parent_class)->dispose (obj);
+ G_OBJECT_CLASS (seahorse_pkcs11_token_parent_class)->dispose (obj);
}
static void
-seahorse_pkcs11_source_finalize (GObject *obj)
+seahorse_pkcs11_token_finalize (GObject *obj)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (obj);
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (obj);
g_hash_table_destroy (self->pv->objects);
g_assert (self->pv->slot == NULL);
-
- G_OBJECT_CLASS (seahorse_pkcs11_source_parent_class)->finalize (obj);
+
+ G_OBJECT_CLASS (seahorse_pkcs11_token_parent_class)->finalize (obj);
}
static void
-seahorse_pkcs11_source_class_init (SeahorsePkcs11SourceClass *klass)
+seahorse_pkcs11_token_class_init (SeahorsePkcs11TokenClass *klass)
{
GObjectClass *gobject_class;
-
- seahorse_pkcs11_source_parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (SeahorsePkcs11SourcePrivate));
-
+
+ seahorse_pkcs11_token_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (SeahorsePkcs11TokenPrivate));
+
gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->constructor = seahorse_pkcs11_source_constructor;
- gobject_class->dispose = seahorse_pkcs11_source_dispose;
- gobject_class->finalize = seahorse_pkcs11_source_finalize;
- gobject_class->set_property = seahorse_pkcs11_source_set_property;
- gobject_class->get_property = seahorse_pkcs11_source_get_property;
+ gobject_class->dispose = seahorse_pkcs11_token_dispose;
+ gobject_class->finalize = seahorse_pkcs11_token_finalize;
+ gobject_class->set_property = seahorse_pkcs11_token_set_property;
+ gobject_class->get_property = seahorse_pkcs11_token_get_property;
g_object_class_override_property (gobject_class, PROP_LABEL, "label");
g_object_class_override_property (gobject_class, PROP_DESCRIPTION, "description");
@@ -180,36 +181,35 @@ seahorse_pkcs11_source_class_init (SeahorsePkcs11SourceClass *klass)
GCK_TYPE_SLOT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_FLAGS,
- g_param_spec_uint ("flags", "Flags", "Object Source flags.",
+ g_param_spec_uint ("flags", "Flags", "Object Token flags.",
0, G_MAXUINT, 0, G_PARAM_READABLE));
}
-static void
-seahorse_pkcs11_source_iface (SeahorseSourceIface *iface)
+static void
+seahorse_pkcs11_token_source_iface (SeahorseSourceIface *iface)
{
}
-
static guint
-seahorse_pkcs11_source_get_length (GcrCollection *collection)
+seahorse_pkcs11_token_get_length (GcrCollection *collection)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (collection);
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (collection);
return g_hash_table_size (self->pv->objects);
}
static GList *
-seahorse_pkcs11_source_get_objects (GcrCollection *collection)
+seahorse_pkcs11_token_get_objects (GcrCollection *collection)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (collection);
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (collection);
return g_hash_table_get_values (self->pv->objects);
}
static gboolean
-seahorse_pkcs11_source_contains (GcrCollection *collection,
- GObject *object)
+seahorse_pkcs11_token_contains (GcrCollection *collection,
+ GObject *object)
{
- SeahorsePkcs11Source *self = SEAHORSE_PKCS11_SOURCE (collection);
+ SeahorsePkcs11Token *self = SEAHORSE_PKCS11_TOKEN (collection);
gulong handle;
if (!SEAHORSE_PKCS11_IS_OBJECT (object))
@@ -222,37 +222,37 @@ seahorse_pkcs11_source_contains (GcrCollection *collection,
static void
seahorse_pkcs11_collection_iface (GcrCollectionIface *iface)
{
- iface->get_length = seahorse_pkcs11_source_get_length;
- iface->get_objects = seahorse_pkcs11_source_get_objects;
- iface->contains = seahorse_pkcs11_source_contains;
+ iface->get_length = seahorse_pkcs11_token_get_length;
+ iface->get_objects = seahorse_pkcs11_token_get_objects;
+ iface->contains = seahorse_pkcs11_token_contains;
}
-/* --------------------------------------------------------------------------
+/* --------------------------------------------------------------------------
* PUBLIC
*/
-SeahorsePkcs11Source*
-seahorse_pkcs11_source_new (GckSlot *slot)
+SeahorsePkcs11Token *
+seahorse_pkcs11_token_new (GckSlot *slot)
{
- return g_object_new (SEAHORSE_TYPE_PKCS11_SOURCE, "slot", slot, NULL);
+ return g_object_new (SEAHORSE_TYPE_PKCS11_TOKEN, "slot", slot, NULL);
}
-GckSlot*
-seahorse_pkcs11_source_get_slot (SeahorsePkcs11Source *self)
+GckSlot *
+seahorse_pkcs11_token_get_slot (SeahorsePkcs11Token *self)
{
- g_return_val_if_fail (SEAHORSE_IS_PKCS11_SOURCE (self), NULL);
+ g_return_val_if_fail (SEAHORSE_IS_PKCS11_TOKEN (self), NULL);
return self->pv->slot;
}
void
-seahorse_pkcs11_source_receive_object (SeahorsePkcs11Source *self,
- GckObject *obj)
+seahorse_pkcs11_token_receive_object (SeahorsePkcs11Token *self,
+ GckObject *obj)
{
SeahorsePkcs11Certificate *cert;
SeahorseObject *prev;
gulong handle;
- g_return_if_fail (SEAHORSE_IS_PKCS11_SOURCE (self));
+ g_return_if_fail (SEAHORSE_IS_PKCS11_TOKEN (self));
handle = gck_object_get_handle (obj);
prev = g_hash_table_lookup (self->pv->objects, &handle);
@@ -263,19 +263,19 @@ seahorse_pkcs11_source_receive_object (SeahorsePkcs11Source *self,
}
cert = seahorse_pkcs11_certificate_new (obj);
- g_object_set (cert, "source", self, NULL);
+ g_object_set (cert, "token", self, NULL);
g_hash_table_insert (self->pv->objects, g_memdup (&handle, sizeof (handle)), cert);
gcr_collection_emit_added (GCR_COLLECTION (self), G_OBJECT (cert));
}
void
-seahorse_pkcs11_source_remove_object (SeahorsePkcs11Source *self,
- SeahorsePkcs11Object *object)
+seahorse_pkcs11_token_remove_object (SeahorsePkcs11Token *self,
+ SeahorsePkcs11Object *object)
{
gulong handle;
- g_return_if_fail (SEAHORSE_IS_PKCS11_SOURCE (self));
+ g_return_if_fail (SEAHORSE_IS_PKCS11_TOKEN (self));
g_return_if_fail (SEAHORSE_PKCS11_IS_OBJECT (object));
g_object_ref (object);
diff --git a/pkcs11/seahorse-pkcs11-token.h b/pkcs11/seahorse-pkcs11-token.h
new file mode 100644
index 0000000..a6499db
--- /dev/null
+++ b/pkcs11/seahorse-pkcs11-token.h
@@ -0,0 +1,61 @@
+/*
+ * Seahorse
+ *
+ * Copyright (C) 2008 Stefan Walter
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ * You should have received a copy of the GNU 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.
+ */
+
+
+#ifndef __SEAHORSE_PKCS11_TOKEN_H__
+#define __SEAHORSE_PKCS11_TOKEN_H__
+
+#include "seahorse-pkcs11-object.h"
+
+#include <gck/gck.h>
+
+#define SEAHORSE_TYPE_PKCS11_TOKEN (seahorse_pkcs11_token_get_type ())
+#define SEAHORSE_PKCS11_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_PKCS11_TOKEN, SeahorsePkcs11Token))
+#define SEAHORSE_PKCS11_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_PKCS11_TOKEN, SeahorsePkcs11TokenClass))
+#define SEAHORSE_IS_PKCS11_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_PKCS11_TOKEN))
+#define SEAHORSE_IS_PKCS11_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_PKCS11_TOKEN))
+#define SEAHORSE_PKCS11_TOKEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_PKCS11_TOKEN, SeahorsePkcs11TokenClass))
+
+typedef struct _SeahorsePkcs11Token SeahorsePkcs11Token;
+typedef struct _SeahorsePkcs11TokenClass SeahorsePkcs11TokenClass;
+typedef struct _SeahorsePkcs11TokenPrivate SeahorsePkcs11TokenPrivate;
+
+struct _SeahorsePkcs11Token {
+ GObject parent;
+ SeahorsePkcs11TokenPrivate *pv;
+};
+
+struct _SeahorsePkcs11TokenClass {
+ GObjectClass parent_class;
+};
+
+GType seahorse_pkcs11_token_get_type (void);
+
+SeahorsePkcs11Token * seahorse_pkcs11_token_new (GckSlot *slot);
+
+GckSlot * seahorse_pkcs11_token_get_slot (SeahorsePkcs11Token *self);
+
+void seahorse_pkcs11_token_receive_object (SeahorsePkcs11Token *self, GckObject *obj);
+
+void seahorse_pkcs11_token_remove_object (SeahorsePkcs11Token *self,
+ SeahorsePkcs11Object *object);
+
+#endif /* __SEAHORSE_PKCS11_TOKEN_H__ */
diff --git a/src/seahorse-sidebar.c b/src/seahorse-sidebar.c
index 19cddf0..9bfed4d 100644
--- a/src/seahorse-sidebar.c
+++ b/src/seahorse-sidebar.c
@@ -716,6 +716,7 @@ seahorse_sidebar_constructed (GObject *obj)
gtk_tree_selection_set_select_function (selection, on_tree_selection_validate, self, NULL);
g_signal_connect (selection, "changed", G_CALLBACK (on_tree_selection_changed), self);
+
load_backends (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]