diff options
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/ebook/e-card-simple.c | 1 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-card-simple.h | 5 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 29 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-card.h | 1 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-backend-ldap.c | 1 |
5 files changed, 35 insertions, 2 deletions
diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c index 6b1f057c22..0acc304840 100644 --- a/addressbook/backend/ebook/e-card-simple.c +++ b/addressbook/backend/ebook/e-card-simple.c @@ -97,6 +97,7 @@ static ECardSimpleFieldData field_data[] = { E_CARD_SIMPLE_FIELD_NOTE, "note", N_("Note"), N_("Note"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_CALURI, "caluri", N_("Calendar URI"), N_("CALUri"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_FBURL, "fburl", N_("Free-busy URL"), N_("FBUrl"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, + { E_CARD_SIMPLE_FIELD_ICSCALENDAR, "icscalendar", N_("Default server calendar"), N_("icsCalendar"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_ANNIVERSARY, "anniversary", N_("Anniversary"), N_("Anniv"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, { E_CARD_SIMPLE_FIELD_BIRTH_DATE, "birth_date", N_("Birth Date"), "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, { E_CARD_SIMPLE_FIELD_MAILER, "mailer", "", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h index 9e77a43ae1..868d4e1573 100644 --- a/addressbook/backend/ebook/e-card-simple.h +++ b/addressbook/backend/ebook/e-card-simple.h @@ -118,8 +118,9 @@ enum _ECardSimpleField { E_CARD_SIMPLE_FIELD_NOTE, E_CARD_SIMPLE_FIELD_CALURI, E_CARD_SIMPLE_FIELD_FBURL, - /* If you add after FBURL, make sure to move LAST_SIMPLE_STRING */ - E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING = E_CARD_SIMPLE_FIELD_FBURL, + E_CARD_SIMPLE_FIELD_ICSCALENDAR, + /* If you add after icscalendar, make sure to move LAST_SIMPLE_STRING */ + E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING = E_CARD_SIMPLE_FIELD_ICSCALENDAR, E_CARD_SIMPLE_FIELD_ANNIVERSARY, E_CARD_SIMPLE_FIELD_BIRTH_DATE, E_CARD_SIMPLE_FIELD_MAILER, diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index ec38219a2e..3a3f30e483 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -65,6 +65,7 @@ enum { PROP_MAILER, PROP_CALURI, PROP_FBURL, + PROP_ICSCALENDAR, PROP_NOTE, PROP_RELATED_CONTACTS, PROP_CATEGORIES, @@ -114,6 +115,7 @@ static void parse_anniversary(ECard *card, VObject *object, char *default_charse static void parse_mailer(ECard *card, VObject *object, char *default_charset); static void parse_caluri(ECard *card, VObject *object, char *default_charset); static void parse_fburl(ECard *card, VObject *object, char *default_charset); +static void parse_icscalendar(ECard *card, VObject *object, char *default_charset); static void parse_note(ECard *card, VObject *object, char *default_charset); static void parse_related_contacts(ECard *card, VObject *object, char *default_charset); static void parse_categories(ECard *card, VObject *object, char *default_charset); @@ -158,6 +160,7 @@ struct { { VCMailerProp, parse_mailer }, { "CALURI", parse_caluri }, { "FBURL", parse_fburl }, + { "ICSCALENDAR", parse_icscalendar }, { VCNoteProp, parse_note }, { XEV_RELATED_CONTACTS, parse_related_contacts }, { "CATEGORIES", parse_categories }, @@ -653,6 +656,9 @@ e_card_get_vobject (const ECard *card, gboolean assumeUTF8) if (card->fburl) ADD_PROP_VALUE(vobj, "FBURL", card->fburl); + + if (card->icscalendar) + ADD_PROP_VALUE(vobj, "ICSCALENDAR", card->icscalendar); if (card->note) { VObject *noteprop; @@ -1027,6 +1033,13 @@ parse_fburl(ECard *card, VObject *vobj, char *default_charset) } static void +parse_icscalendar(ECard *card, VObject *vobj, char *default_charset) +{ + g_free(card->icscalendar); + assign_string(vobj, default_charset, &(card->icscalendar)); +} + +static void parse_note(ECard *card, VObject *vobj, char *default_charset) { g_free(card->note); @@ -1443,6 +1456,13 @@ e_card_class_init (ECardClass *klass) NULL, G_PARAM_READWRITE)); + g_object_class_install_property (object_class, PROP_ICSCALENDAR, + g_param_spec_string ("icscalendar", + _("ICS Calendar"), + /*_( */"XXX blurb" /*)*/, + NULL, + G_PARAM_READWRITE)); + g_object_class_install_property (object_class, PROP_NOTE, g_param_spec_string ("note", _("Note"), @@ -2032,6 +2052,7 @@ e_card_dispose (GObject *object) FREE_IF(card->anniversary); FREE_IF(card->caluri); FREE_IF(card->fburl); + FREE_IF(card->icscalendar); FREE_IF(card->note); FREE_IF(card->related_contacts); @@ -2180,6 +2201,10 @@ e_card_set_property (GObject *object, g_free(card->fburl); card->fburl = g_strdup(g_value_get_string(value)); break; + case PROP_ICSCALENDAR: + g_free(card->icscalendar); + card->icscalendar = g_strdup(g_value_get_string(value)); + break; case PROP_NOTE: g_free (card->note); card->note = g_strdup(g_value_get_string(value)); @@ -2350,6 +2375,9 @@ e_card_get_property (GObject *object, case PROP_FBURL: g_value_set_string (value, card->fburl); break; + case PROP_ICSCALENDAR: + g_value_set_string (value, card->icscalendar); + break; case PROP_NOTE: g_value_set_string (value, card->note); break; @@ -2422,6 +2450,7 @@ e_card_init (ECard *card) card->mailer = NULL; card->caluri = NULL; card->fburl = NULL; + card->icscalendar = NULL; card->note = NULL; card->related_contacts = NULL; card->categories = NULL; diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h index e863f792fd..d82d5f4cb6 100644 --- a/addressbook/backend/ebook/e-card.h +++ b/addressbook/backend/ebook/e-card.h @@ -70,6 +70,7 @@ struct _ECard { char *caluri; /* Calendar URI */ char *fburl; /* Free Busy URL */ + char *icscalendar; /* Default server calendar */ gint timezone; /* number of minutes from UTC as an int */ diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 2c919c788b..237bc8597c 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -272,6 +272,7 @@ struct prop_info { STRING_PROP (E_CARD_SIMPLE_FIELD_CALURI, "caluri", "calCalURI"), STRING_PROP (E_CARD_SIMPLE_FIELD_FBURL, "fburl", "calFBURL"), + STRING_PROP (E_CARD_SIMPLE_FIELD_ICSCALENDAR, "icscalendar", "icsCalendar"), /* E_CARD_SIMPLE_FIELD_NAME_OR_ORG, */ |