aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-card-simple.h
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-07 05:31:45 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-07 05:31:45 +0800
commit989f36ec0e0a0a835c30d521ffe77d70dd7fa321 (patch)
treecab36b6ea38ce3fd57cffc6a44470101902536f4 /addressbook/backend/ebook/e-card-simple.h
parent073f72e4f3827d51331cecf6800ae811b4776a08 (diff)
downloadgsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.tar
gsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.tar.gz
gsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.tar.bz2
gsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.tar.lz
gsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.tar.xz
gsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.tar.zst
gsoc2013-evolution-989f36ec0e0a0a835c30d521ffe77d70dd7fa321.zip
Mostly finished ECardSimple.
2000-05-06 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h: Mostly finished ECardSimple. * contact-editor/e-contact-editor.c: Changed this to match with some of the changes to ECardSimple. * gui/component/addressbook.c: Changed this to look for "addressbook.db" in the given directory if it doesn't find the file "uri". * gui/minicard/e-minicard.c, gui/minicard/e-minicard.h: Changed this to use ECardSimple. svn path=/trunk/; revision=2839
Diffstat (limited to 'addressbook/backend/ebook/e-card-simple.h')
-rw-r--r--addressbook/backend/ebook/e-card-simple.h114
1 files changed, 89 insertions, 25 deletions
diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h
index e039b55340..f0bb6cb541 100644
--- a/addressbook/backend/ebook/e-card-simple.h
+++ b/addressbook/backend/ebook/e-card-simple.h
@@ -28,6 +28,8 @@
typedef enum _ECardSimplePhoneId ECardSimplePhoneId;
typedef enum _ECardSimpleEmailId ECardSimpleEmailId;
typedef enum _ECardSimpleAddressId ECardSimpleAddressId;
+typedef enum _ECardSimpleType ECardSimpleType;
+typedef enum _ECardSimpleField ECardSimpleField;
enum _ECardSimplePhoneId {
E_CARD_SIMPLE_PHONE_ID_ASSISTANT,
@@ -68,6 +70,49 @@ enum _ECardSimpleAddressId {
E_CARD_SIMPLE_ADDRESS_ID_LAST
};
+enum _ECardSimpleType {
+ E_CARD_SIMPLE_TYPE_STRING,
+ E_CARD_SIMPLE_TYPE_DATE,
+};
+
+enum _ECardSimpleField {
+ E_CARD_SIMPLE_FIELD_FILE_AS,
+ E_CARD_SIMPLE_FIELD_FULL_NAME,
+ E_CARD_SIMPLE_FIELD_BIRTH_DATE,
+ E_CARD_SIMPLE_FIELD_URL,
+ E_CARD_SIMPLE_FIELD_ORG,
+ E_CARD_SIMPLE_FIELD_ORG_UNIT,
+ E_CARD_SIMPLE_FIELD_OFFICE,
+ E_CARD_SIMPLE_FIELD_TITLE,
+ E_CARD_SIMPLE_FIELD_ROLE,
+ E_CARD_SIMPLE_FIELD_MANAGER,
+ E_CARD_SIMPLE_FIELD_ASSISTANT,
+ E_CARD_SIMPLE_FIELD_NICKNAME,
+ E_CARD_SIMPLE_FIELD_SPOUSE,
+ E_CARD_SIMPLE_FIELD_ANNIVERSARY,
+ E_CARD_SIMPLE_FIELD_FBURL,
+ E_CARD_SIMPLE_FIELD_NOTE,
+ E_CARD_SIMPLE_FIELD_PHONE_BUSINESS,
+ E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2,
+ E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX,
+ E_CARD_SIMPLE_FIELD_PHONE_CAR,
+ E_CARD_SIMPLE_FIELD_PHONE_HOME,
+ E_CARD_SIMPLE_FIELD_PHONE_HOME_2,
+ E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX,
+ E_CARD_SIMPLE_FIELD_PHONE_ISDN,
+ E_CARD_SIMPLE_FIELD_PHONE_MOBILE,
+ E_CARD_SIMPLE_FIELD_PHONE_OTHER,
+ E_CARD_SIMPLE_FIELD_PHONE_PAGER,
+ E_CARD_SIMPLE_FIELD_PHONE_PRIMARY,
+ E_CARD_SIMPLE_FIELD_ADDRESS_HOME,
+ E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS,
+ E_CARD_SIMPLE_FIELD_ADDRESS_OTHER,
+ E_CARD_SIMPLE_FIELD_EMAIL,
+ E_CARD_SIMPLE_FIELD_EMAIL_2,
+ E_CARD_SIMPLE_FIELD_EMAIL_3,
+ E_CARD_SIMPLE_FIELD_LAST
+};
+
typedef struct _ECardSimple ECardSimple;
typedef struct _ECardSimpleClass ECardSimpleClass;
@@ -84,32 +129,51 @@ struct _ECardSimpleClass {
GtkObjectClass parent_class;
};
-ECardSimple *e_card_simple_new (ECard *card);
-char *e_card_simple_get_id (ECardSimple *simple);
-void e_card_simple_set_id (ECardSimple *simple, const gchar *character);
-char *e_card_simple_get_vcard (ECardSimple *simple);
-
-ECardSimple *e_card_simple_duplicate (ECardSimple *simple);
-
-ECardPhone *e_card_simple_get_phone (ECardSimple *simple,
- ECardSimplePhoneId id);
-char *e_card_simple_get_email (ECardSimple *simple,
- ECardSimpleEmailId id);
-ECardAddrLabel *e_card_simple_get_address (ECardSimple *simple,
- ECardSimpleAddressId id);
-void e_card_simple_set_phone (ECardSimple *simple,
- ECardSimplePhoneId id,
- ECardPhone *phone);
-void e_card_simple_set_email (ECardSimple *simple,
- ECardSimpleEmailId id,
- char *email);
-void e_card_simple_set_address (ECardSimple *simple,
- ECardSimpleAddressId id,
- ECardAddrLabel *address);
-
-void e_card_simple_sync_card (ECardSimple *simple);
+ECardSimple *e_card_simple_new (ECard *card);
+char *e_card_simple_get_id (ECardSimple *simple);
+void e_card_simple_set_id (ECardSimple *simple,
+ const gchar *character);
+char *e_card_simple_get_vcard (ECardSimple *simple);
+
+ECardSimple *e_card_simple_duplicate (ECardSimple *simple);
+
+char *e_card_simple_get (ECardSimple *simple,
+ ECardSimpleField field);
+void e_card_simple_set (ECardSimple *simple,
+ ECardSimpleField field,
+ const char *data);
+
+ECardSimpleType e_card_simple_type (ECardSimple *simple,
+ ECardSimpleField field);
+const char *e_card_simple_get_name (ECardSimple *simple,
+ ECardSimpleField field);
+const char *e_card_simple_get_short_name (ECardSimple *simple,
+ ECardSimpleField field);
+
+
+/* Use these only if building lists of specific types. It should be
+ * easier to use the above if you consider a phone field to be the
+ * same as any other field.
+ */
+const ECardPhone *e_card_simple_get_phone (ECardSimple *simple,
+ ECardSimplePhoneId id);
+const char *e_card_simple_get_email (ECardSimple *simple,
+ ECardSimpleEmailId id);
+const ECardAddrLabel *e_card_simple_get_address (ECardSimple *simple,
+ ECardSimpleAddressId id);
+void e_card_simple_set_phone (ECardSimple *simple,
+ ECardSimplePhoneId id,
+ const ECardPhone *phone);
+void e_card_simple_set_email (ECardSimple *simple,
+ ECardSimpleEmailId id,
+ const char *email);
+void e_card_simple_set_address (ECardSimple *simple,
+ ECardSimpleAddressId id,
+ const ECardAddrLabel *address);
+
+void e_card_simple_sync_card (ECardSimple *simple);
/* Standard Gtk function */
-GtkType e_card_simple_get_type (void);
+GtkType e_card_simple_get_type (void);
#endif /* ! __E_CARD_SIMPLE_H__ */