1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 11:12:22 -05:00

Carddav: add fburl field

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1278 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-07-26 13:22:28 +00:00
parent b6d1836092
commit 3d460c64c0
4 changed files with 13 additions and 0 deletions

View File

@ -1761,6 +1761,8 @@ public abstract class ExchangeSession {
writer.appendProperty("CATEGORIES", get("keywords")); writer.appendProperty("CATEGORIES", get("keywords"));
writer.appendProperty("FBURL", get("fburl"));
if ("1".equals(get("private"))) { if ("1".equals(get("private"))) {
writer.appendProperty("CLASS", "PRIVATE"); writer.appendProperty("CLASS", "PRIVATE");
} }
@ -2862,6 +2864,8 @@ public abstract class ExchangeSession {
} else if ("2".equals(propertyValue)) { } else if ("2".equals(propertyValue)) {
properties.put("gender", "1"); properties.put("gender", "1");
} }
} else if ("FBURL".equals(property.getKey())) {
properties.put("fburl", property.getValue());
} else if ("X-ASSISTANT".equals(property.getKey())) { } else if ("X-ASSISTANT".equals(property.getKey())) {
properties.put("secretarycn", property.getValue()); properties.put("secretarycn", property.getValue());
} else if ("X-MANAGER".equals(property.getKey())) { } else if ("X-MANAGER".equals(property.getKey())) {
@ -3259,6 +3263,7 @@ public abstract class ExchangeSession {
CONTACT_ATTRIBUTES.add("gender"); CONTACT_ATTRIBUTES.add("gender");
CONTACT_ATTRIBUTES.add("private"); CONTACT_ATTRIBUTES.add("private");
CONTACT_ATTRIBUTES.add("sensitivity"); CONTACT_ATTRIBUTES.add("sensitivity");
CONTACT_ATTRIBUTES.add("fburl");
} }
/** /**

View File

@ -259,6 +259,8 @@ public class Field {
createField("haspicture", DistinguishedPropertySetType.Address, 0x8015, "haspicture", PropertyType.Boolean); // True/False createField("haspicture", DistinguishedPropertySetType.Address, 0x8015, "haspicture", PropertyType.Boolean); // True/False
createField(URN_SCHEMAS_CALENDAR, "fburl"); // freeBusyLocation
// OWA settings // OWA settings
createField("messageclass", 0x001a, PropertyType.String); createField("messageclass", 0x001a, PropertyType.String);
createField("roamingxmlstream", 0x7c08, PropertyType.Binary); createField("roamingxmlstream", 0x7c08, PropertyType.Binary);

View File

@ -161,6 +161,8 @@ public class Field {
FIELD_MAP.put("haspicture", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.Address, 0x8015, ExtendedFieldURI.PropertyType.Boolean)); FIELD_MAP.put("haspicture", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.Address, 0x8015, ExtendedFieldURI.PropertyType.Boolean));
FIELD_MAP.put("fburl", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.Address, 0x80D8, ExtendedFieldURI.PropertyType.String));
// calendar // calendar
FIELD_MAP.put("processed", new ExtendedFieldURI(0x65e8, ExtendedFieldURI.PropertyType.Boolean)); FIELD_MAP.put("processed", new ExtendedFieldURI(0x65e8, ExtendedFieldURI.PropertyType.Boolean));

View File

@ -89,6 +89,8 @@ public class TestExchangeSessionContact extends AbstractExchangeSessionTestCase
vCardWriter.appendProperty("BDAY", "2000-01-02T00:00:00Z"); vCardWriter.appendProperty("BDAY", "2000-01-02T00:00:00Z");
vCardWriter.appendProperty("CATEGORIES", "keyword1,keyword2"); vCardWriter.appendProperty("CATEGORIES", "keyword1,keyword2");
vCardWriter.appendProperty("FBURL", "http://fburl");
vCardWriter.appendProperty("X-ASSISTANT", "secretarycn"); vCardWriter.appendProperty("X-ASSISTANT", "secretarycn");
vCardWriter.appendProperty("X-MANAGER", "manager"); vCardWriter.appendProperty("X-MANAGER", "manager");
vCardWriter.appendProperty("X-SPOUSE", "spousecn"); vCardWriter.appendProperty("X-SPOUSE", "spousecn");
@ -174,6 +176,8 @@ public class TestExchangeSessionContact extends AbstractExchangeSessionTestCase
assertEquals("true", contact.get("private")); assertEquals("true", contact.get("private"));
assertEquals("http://fburl", contact.get("url"));
assertEquals("true", contact.get("haspicture")); assertEquals("true", contact.get("haspicture"));
assertNotNull(session.getContactPhoto(contact)); assertNotNull(session.getContactPhoto(contact));
} }