mirror of
https://github.com/moparisthebest/davmail
synced 2025-03-05 11:49:46 -05:00
Carddav: iPhone personalHomePage support
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1216 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e894e65da7
commit
173fa38526
@ -2728,6 +2728,9 @@ public abstract class ExchangeSession {
|
|||||||
properties.put("businesshomepage", property.getValue());
|
properties.put("businesshomepage", property.getValue());
|
||||||
} else if (property.hasParam("TYPE", "home")) {
|
} else if (property.hasParam("TYPE", "home")) {
|
||||||
properties.put("personalHomePage", property.getValue());
|
properties.put("personalHomePage", property.getValue());
|
||||||
|
} else {
|
||||||
|
// default: set personal home page
|
||||||
|
properties.put("personalHomePage", property.getValue());
|
||||||
}
|
}
|
||||||
} else if ("TITLE".equals(property.getKey())) {
|
} else if ("TITLE".equals(property.getKey())) {
|
||||||
properties.put("title", property.getValue());
|
properties.put("title", property.getValue());
|
||||||
@ -3087,6 +3090,7 @@ public abstract class ExchangeSession {
|
|||||||
CONTACT_ATTRIBUTES.add("extensionattribute4");
|
CONTACT_ATTRIBUTES.add("extensionattribute4");
|
||||||
CONTACT_ATTRIBUTES.add("bday");
|
CONTACT_ATTRIBUTES.add("bday");
|
||||||
CONTACT_ATTRIBUTES.add("businesshomepage");
|
CONTACT_ATTRIBUTES.add("businesshomepage");
|
||||||
|
CONTACT_ATTRIBUTES.add("personalHomePage");
|
||||||
CONTACT_ATTRIBUTES.add("cn");
|
CONTACT_ATTRIBUTES.add("cn");
|
||||||
CONTACT_ATTRIBUTES.add("co");
|
CONTACT_ATTRIBUTES.add("co");
|
||||||
CONTACT_ATTRIBUTES.add("department");
|
CONTACT_ATTRIBUTES.add("department");
|
||||||
|
@ -315,4 +315,21 @@ public class TestExchangeSessionContact extends AbstractExchangeSessionTestCase
|
|||||||
assertEquals("mobile with prefix", contact.get("mobile"));
|
assertEquals("mobile with prefix", contact.get("mobile"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testIphonePersonalHomePage() throws IOException {
|
||||||
|
ExchangeSession.Contact contact = (ExchangeSession.Contact) session.getItem("testcontactfolder", itemName);
|
||||||
|
|
||||||
|
VCardWriter vCardWriter = new VCardWriter();
|
||||||
|
vCardWriter.startCard();
|
||||||
|
vCardWriter.appendProperty("ITEM1.URL", "http://www.myhomepage.org");
|
||||||
|
vCardWriter.endCard();
|
||||||
|
|
||||||
|
ExchangeSession.ItemResult result = session.createOrUpdateContact("testcontactfolder", itemName, vCardWriter.toString(), contact.etag, null);
|
||||||
|
assertEquals(200, result.status);
|
||||||
|
|
||||||
|
contact = (ExchangeSession.Contact) session.getItem("testcontactfolder", itemName);
|
||||||
|
|
||||||
|
assertEquals("http://www.myhomepage.org", contact.get("personalHomePage"));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user