If gee-0.8 is available, accept version 0.10.5 or above
[moonshot-ui.git] / src / moonshot-idcard-store.c
index ac36aee..4293afb 100644 (file)
@@ -1,6 +1,37 @@
-/* moonshot-idcard-store.c generated by valac 0.10.4, the Vala compiler
+/* moonshot-idcard-store.c generated by valac 0.28.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>
@@ -25,49 +56,99 @@ typedef struct _IIdentityCardStoreIface IIdentityCardStoreIface;
 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);
-       void (*remove_card) (IIdentityCardStore* self, IdCard* card);
-       void (*update_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);
-void iidentity_card_store_remove_card (IIdentityCardStore* self, IdCard* card);
-void iidentity_card_store_update_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"
 }
 
 
-void iidentity_card_store_remove_card (IIdentityCardStore* self, IdCard* card) {
-       IIDENTITY_CARD_STORE_GET_INTERFACE (self)->remove_card (self, card);
+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"
 }
 
 
-void iidentity_card_store_update_card (IIdentityCardStore* self, IdCard* card) {
-       IIDENTITY_CARD_STORE_GET_INTERFACE (self)->update_card (self, card);
+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"
        }
 }
 
@@ -86,4 +167,3 @@ GType iidentity_card_store_get_type (void) {
 
 
 
-