Import moonshot-ui_0.7.1.orig.tar.xz
[moonshot-ui.git] / src / moonshot-idcard-store.c
diff --git a/src/moonshot-idcard-store.c b/src/moonshot-idcard-store.c
new file mode 100644 (file)
index 0000000..d557379
--- /dev/null
@@ -0,0 +1,169 @@
+/* moonshot-idcard-store.c generated by valac 0.24.0, the Vala compiler
+ * generated from moonshot-idcard-store.vala, do not modify */
+
+/*
+ * Copyright (c) 2011-2014, JANET(UK)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of JANET(UK) nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+*/
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+
+
+#define TYPE_IIDENTITY_CARD_STORE (iidentity_card_store_get_type ())
+#define IIDENTITY_CARD_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IIDENTITY_CARD_STORE, IIdentityCardStore))
+#define IS_IIDENTITY_CARD_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IIDENTITY_CARD_STORE))
+#define IIDENTITY_CARD_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IIDENTITY_CARD_STORE, IIdentityCardStoreIface))
+
+typedef struct _IIdentityCardStore IIdentityCardStore;
+typedef struct _IIdentityCardStoreIface IIdentityCardStoreIface;
+
+#define TYPE_ID_CARD (id_card_get_type ())
+#define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
+#define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
+#define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
+#define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
+#define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
+
+typedef struct _IdCard IdCard;
+typedef struct _IdCardClass IdCardClass;
+
+#define IIDENTITY_CARD_STORE_TYPE_STORE_TYPE (iidentity_card_store_store_type_get_type ())
+
+typedef enum  {
+       IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE,
+       IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING
+} IIdentityCardStoreStoreType;
+
+struct _IIdentityCardStoreIface {
+       GTypeInterface parent_iface;
+       void (*add_card) (IIdentityCardStore* self, IdCard* card);
+       gboolean (*remove_card) (IIdentityCardStore* self, IdCard* card);
+       IdCard* (*update_card) (IIdentityCardStore* self, IdCard* card);
+       IIdentityCardStoreStoreType (*get_store_type) (IIdentityCardStore* self);
+       GeeLinkedList* (*get_card_list) (IIdentityCardStore* self);
+};
+
+
+
+GType id_card_get_type (void) G_GNUC_CONST;
+GType iidentity_card_store_store_type_get_type (void) G_GNUC_CONST;
+GType iidentity_card_store_get_type (void) G_GNUC_CONST;
+void iidentity_card_store_add_card (IIdentityCardStore* self, IdCard* card);
+gboolean iidentity_card_store_remove_card (IIdentityCardStore* self, IdCard* card);
+IdCard* iidentity_card_store_update_card (IIdentityCardStore* self, IdCard* card);
+IIdentityCardStoreStoreType iidentity_card_store_get_store_type (IIdentityCardStore* self);
+GeeLinkedList* iidentity_card_store_get_card_list (IIdentityCardStore* self);
+
+
+GType iidentity_card_store_store_type_get_type (void) {
+       static volatile gsize iidentity_card_store_store_type_type_id__volatile = 0;
+       if (g_once_init_enter (&iidentity_card_store_store_type_type_id__volatile)) {
+               static const GEnumValue values[] = {{IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE, "IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE", "flat-file"}, {IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING, "IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING", "keyring"}, {0, NULL, NULL}};
+               GType iidentity_card_store_store_type_type_id;
+               iidentity_card_store_store_type_type_id = g_enum_register_static ("IIdentityCardStoreStoreType", values);
+               g_once_init_leave (&iidentity_card_store_store_type_type_id__volatile, iidentity_card_store_store_type_type_id);
+       }
+       return iidentity_card_store_store_type_type_id__volatile;
+}
+
+
+void iidentity_card_store_add_card (IIdentityCardStore* self, IdCard* card) {
+#line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       g_return_if_fail (self != NULL);
+#line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       IIDENTITY_CARD_STORE_GET_INTERFACE (self)->add_card (self, card);
+#line 105 "moonshot-idcard-store.c"
+}
+
+
+gboolean iidentity_card_store_remove_card (IIdentityCardStore* self, IdCard* card) {
+#line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       g_return_val_if_fail (self != NULL, FALSE);
+#line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       return IIDENTITY_CARD_STORE_GET_INTERFACE (self)->remove_card (self, card);
+#line 114 "moonshot-idcard-store.c"
+}
+
+
+IdCard* iidentity_card_store_update_card (IIdentityCardStore* self, IdCard* card) {
+#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       g_return_val_if_fail (self != NULL, NULL);
+#line 42 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       return IIDENTITY_CARD_STORE_GET_INTERFACE (self)->update_card (self, card);
+#line 123 "moonshot-idcard-store.c"
+}
+
+
+IIdentityCardStoreStoreType iidentity_card_store_get_store_type (IIdentityCardStore* self) {
+#line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       g_return_val_if_fail (self != NULL, 0);
+#line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       return IIDENTITY_CARD_STORE_GET_INTERFACE (self)->get_store_type (self);
+#line 132 "moonshot-idcard-store.c"
+}
+
+
+GeeLinkedList* iidentity_card_store_get_card_list (IIdentityCardStore* self) {
+#line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       g_return_val_if_fail (self != NULL, NULL);
+#line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       return IIDENTITY_CARD_STORE_GET_INTERFACE (self)->get_card_list (self);
+#line 141 "moonshot-idcard-store.c"
+}
+
+
+static void iidentity_card_store_base_init (IIdentityCardStoreIface * iface) {
+#line 33 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       static gboolean initialized = FALSE;
+#line 33 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+       if (!initialized) {
+#line 33 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-idcard-store.vala"
+               initialized = TRUE;
+#line 152 "moonshot-idcard-store.c"
+       }
+}
+
+
+GType iidentity_card_store_get_type (void) {
+       static volatile gsize iidentity_card_store_type_id__volatile = 0;
+       if (g_once_init_enter (&iidentity_card_store_type_id__volatile)) {
+               static const GTypeInfo g_define_type_info = { sizeof (IIdentityCardStoreIface), (GBaseInitFunc) iidentity_card_store_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
+               GType iidentity_card_store_type_id;
+               iidentity_card_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "IIdentityCardStore", &g_define_type_info, 0);
+               g_type_interface_add_prerequisite (iidentity_card_store_type_id, G_TYPE_OBJECT);
+               g_once_init_leave (&iidentity_card_store_type_id__volatile, iidentity_card_store_type_id);
+       }
+       return iidentity_card_store_type_id__volatile;
+}
+
+
+