mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
Caldav: from John Ahern: translate CLASS and iCal X-CALENDARSERVER-ACCESS values
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@376 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
fee03f5917
commit
8dd6018aaf
@ -621,6 +621,7 @@ public class ExchangeSession {
|
|||||||
public MessageList getAllMessages(String folderName) throws IOException {
|
public MessageList getAllMessages(String folderName) throws IOException {
|
||||||
return searchMessages(folderName, "");
|
return searchMessages(folderName, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public MessageList searchMessages(String folderName, String conditions) throws IOException {
|
public MessageList searchMessages(String folderName, String conditions) throws IOException {
|
||||||
String folderUrl = getFolderPath(folderName);
|
String folderUrl = getFolderPath(folderName);
|
||||||
MessageList messages = new MessageList();
|
MessageList messages = new MessageList();
|
||||||
@ -1323,16 +1324,28 @@ public class ExchangeSession {
|
|||||||
} else if (line.startsWith("X-CALENDARSERVER-ACCESS:")) {
|
} else if (line.startsWith("X-CALENDARSERVER-ACCESS:")) {
|
||||||
if (!isAppleiCal) {
|
if (!isAppleiCal) {
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
if ("CONFIDENTIAL".equalsIgnoreCase(eventClass)) {
|
||||||
|
result.writeLine("CLASS:PRIVATE");
|
||||||
|
} else if ("PRIVATE".equalsIgnoreCase(eventClass)) {
|
||||||
|
result.writeLine("CLASS:CONFIDENTIAL");
|
||||||
} else {
|
} else {
|
||||||
result.writeLine("CLASS:" + eventClass);
|
result.writeLine("CLASS:" + eventClass);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (line.startsWith("CLASS:")) {
|
} else if (line.startsWith("CLASS:")) {
|
||||||
if (isAppleiCal) {
|
if (isAppleiCal) {
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
if ("PRIVATE".equalsIgnoreCase(eventClass)) {
|
||||||
|
result.writeLine("X-CALENDARSERVER-ACCESS:CONFIDENTIAL");
|
||||||
|
} else if ("CONFIDENTIAL".equalsIgnoreCase(eventClass)) {
|
||||||
|
result.writeLine("X-CALENDARSERVER-ACCESS:PRIVATE");
|
||||||
} else {
|
} else {
|
||||||
result.writeLine("X-CALENDARSERVER-ACCESS:" + eventClass);
|
result.writeLine("X-CALENDARSERVER-ACCESS:" + eventClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
result.writeLine(line);
|
result.writeLine(line);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
Reference in New Issue
Block a user