aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-08-12 08:18:47 +0800
committerChris Toshok <toshok@src.gnome.org>2000-08-12 08:18:47 +0800
commite1ddccf0ca9d099b542b55bf2a46fac18e1b7935 (patch)
tree0ffaf5e65d9d8abd26c46d3a94363ee649ee884e
parentb9cc4db255609621b7e238faa64667ca3860475f (diff)
downloadgsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.tar
gsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.tar.gz
gsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.tar.bz2
gsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.tar.lz
gsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.tar.xz
gsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.tar.zst
gsoc2013-evolution-e1ddccf0ca9d099b542b55bf2a46fac18e1b7935.zip
add code for handling email addresses from pilot (which stores it as a
2000-08-11 Chris Toshok <toshok@helixcode.com> * conduit/address-conduit.c (ecard_from_remote_record): add code for handling email addresses from pilot (which stores it as a phone number entry. go figure.) (check_for_slow_setting): #if 0 out, since we don't use it (yet). (update_record): un #if 0 the code to handle the case where the pilot info has changed for a local record. (merge_ecard_with_remote_record): implement function, but for now just return the existing (desktop) record - we still don't allow merge from the pilot. svn path=/trunk/; revision=4758
-rw-r--r--addressbook/ChangeLog12
-rw-r--r--addressbook/conduit/address-conduit.c78
2 files changed, 56 insertions, 34 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 19e9f2d971..d7e7398971 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,15 @@
+2000-08-11 Chris Toshok <toshok@helixcode.com>
+
+ * conduit/address-conduit.c (ecard_from_remote_record): add code
+ for handling email addresses from pilot (which stores it as a
+ phone number entry. go figure.)
+ (check_for_slow_setting): #if 0 out, since we don't use it (yet).
+ (update_record): un #if 0 the code to handle the case where the
+ pilot info has changed for a local record.
+ (merge_ecard_with_remote_record): implement function, but for now
+ just return the existing (desktop) record - we still don't allow
+ merge from the pilot.
+
2000-08-10 Christopher James Lahey <clahey@helixcode.com>
* gui/search/addresstypes.xml: Changed a couple of input field
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
index fdac250a10..f36b214f42 100644
--- a/addressbook/conduit/address-conduit.c
+++ b/addressbook/conduit/address-conduit.c
@@ -309,42 +309,46 @@ ecard_from_remote_record(AddressbookConduitContext *ctxt,
ADD_PROP (orgprop, entryCompany, VCOrgNameProp);
}
-#if 1
for (i = entryPhone1; i <= entryPhone5; i ++) {
if (address.entry [i]) {
- const char* phone_type;
char *phonelabel = ctxt->ai.phoneLabels[address.phoneLabel[i - entryPhone1]];
- VObject *phoneprop = addPropValue (vobj,
- VCTelephoneProp,
- address.entry[i]);
-
- printf ("added '%s' phone entry %s\n",
- phonelabel,
- address.entry[i]);
-
- if (!strcmp (phonelabel, "Home"))
- phone_type = VCHomeProp;
- else if (!strcmp (phonelabel, "Work"))
- phone_type = VCWorkProp;
- else if (!strcmp (phonelabel, "Fax"))
- phone_type = VCFaxProp;
- else if (!strcmp (phonelabel, "Other"))
- phone_type = VCHomeProp; /* XXX */
- else if (!strcmp (phonelabel, "E-mail"))
- phone_type = VCHomeProp; /* XXX */
- else if (!strcmp (phonelabel, "Main")) { /* XXX */
- addProp (phoneprop, VCHomeProp);
- phone_type = VCPreferredProp;
+ if (!strcmp (phonelabel, "E-mail")) {
+ VObject *emailprop = addPropValue (vobj,
+ VCEmailAddressProp,
+ address.entry[i]);
+ addProp (emailprop, VCInternetProp);
+ }
+ else {
+ const char* phone_type = VCHomeProp;
+ VObject *phoneprop = addPropValue (vobj,
+ VCTelephoneProp,
+ address.entry[i]);
+
+ printf ("added '%s' phone entry %s\n",
+ phonelabel,
+ address.entry[i]);
+
+ if (!strcmp (phonelabel, "Home"))
+ phone_type = VCHomeProp;
+ else if (!strcmp (phonelabel, "Work"))
+ phone_type = VCWorkProp;
+ else if (!strcmp (phonelabel, "Fax"))
+ phone_type = VCFaxProp;
+ else if (!strcmp (phonelabel, "Other"))
+ phone_type = VCHomeProp; /* XXX */
+ else if (!strcmp (phonelabel, "Main")) { /* XXX */
+ addProp (phoneprop, VCHomeProp);
+ phone_type = VCPreferredProp;
+ }
+ else if (!strcmp (phonelabel, "Pager"))
+ phone_type = VCPagerProp;
+ else if (!strcmp (phonelabel, "Mobile"))
+ phone_type = VCCellularProp;
+ addProp (phoneprop, phone_type);
}
- else if (!strcmp (phonelabel, "Pager"))
- phone_type = VCPagerProp;
- else if (!strcmp (phonelabel, "Mobile"))
- phone_type = VCCellularProp;
-
- addProp (phoneprop, phone_type);
}
}
-#endif
+#undef ADD_PROP
temp = writeMemVObject (NULL, NULL, vobj);
ecard = e_card_new (temp);
@@ -358,6 +362,14 @@ ecard_from_remote_record(AddressbookConduitContext *ctxt,
return ecard;
}
+static ECard*
+merge_ecard_with_remote_record (AddressbookConduitContext *ctxt,
+ ECard *ecard,
+ PilotRecord *remote)
+{
+ return ecard;
+}
+
typedef struct {
EBookStatus status;
char *id;
@@ -413,7 +425,6 @@ update_record (GnomePilotConduitStandardAbs *conduit,
else
WARN ("update_record: failed to add card to ebook\n");
} else {
-#if 0
EBookStatus commit_status;
ecard = merge_ecard_with_remote_record (ctxt, ecard, remote);
@@ -424,7 +435,6 @@ update_record (GnomePilotConduitStandardAbs *conduit,
if (commit_status != E_BOOK_STATUS_SUCCESS)
WARN ("update_record: failed to update card in ebook\n");
-#endif
}
free_Address(&address);
@@ -432,10 +442,10 @@ update_record (GnomePilotConduitStandardAbs *conduit,
return 0;
}
+#if 0
static void
check_for_slow_setting (GnomePilotConduit *c, AddressbookConduitContext *ctxt)
{
-#if 0
GList *uids;
unsigned long int entry_number;
@@ -450,8 +460,8 @@ check_for_slow_setting (GnomePilotConduit *c, AddressbookConduitContext *ctxt)
conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
gnome_pilot_conduit_standard_set_slow (conduit);
}
-#endif /* 0 */
}
+#endif /* 0 */
static gint
pre_sync (GnomePilotConduit *c,