IMAP: replace DAV:ishidden with DAV:isdeleted and fix new Iterator FETCH

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@330 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-02-04 23:33:29 +00:00
parent 70a8286809
commit 88081c9e42
2 changed files with 5 additions and 5 deletions

View File

@ -545,7 +545,7 @@ public class ExchangeSession {
message.draft = "9".equals(prop.getPropertyAsString());
} else if ("x10810003".equals(localName)) {
message.answered = prop.getPropertyAsString().length() > 0;
} else if ("ishidden".equals(localName)) {
} else if ("isdeleted".equals(localName)) {
message.deleted = "1".equals(prop.getPropertyAsString());
} else if ("message-id".equals(prop.getLocalName())) {
message.messageId = prop.getPropertyAsString();
@ -588,7 +588,7 @@ public class ExchangeSession {
} else if ("draft".equals(entry.getKey())) {
patchMethod.addPropertyToSet("x0E070003", entry.getValue(), "f", "http://schemas.microsoft.com/mapi/proptag/");
} else if ("deleted".equals(entry.getKey())) {
patchMethod.addPropertyToSet("ishidden", entry.getValue(), "d", "DAV:");
patchMethod.addPropertyToSet("isdeleted", entry.getValue(), "d", "DAV:");
}
}
}
@ -613,9 +613,9 @@ public class ExchangeSession {
String searchRequest = "Select \"DAV:uid\", \"http://schemas.microsoft.com/mapi/proptag/x0e080003\"" +
" ,\"http://schemas.microsoft.com/mapi/proptag/x10830003\", \"http://schemas.microsoft.com/mapi/proptag/x10900003\"" +
" ,\"http://schemas.microsoft.com/mapi/proptag/x0E070003\", \"http://schemas.microsoft.com/mapi/proptag/x10810003\"" +
" ,\"urn:schemas:mailheader:message-id\", \"urn:schemas:httpmail:read\", \"DAV:ishidden\"" +
" ,\"urn:schemas:mailheader:message-id\", \"urn:schemas:httpmail:read\", \"DAV:isdeleted\"" +
" FROM Scope('SHALLOW TRAVERSAL OF \"" + folderUrl + "\"')\n" +
" WHERE \"DAV:isfolder\" = False\n" +
" WHERE \"DAV:ishidden\" = False AND \"DAV:isfolder\" = False\n" +
" ORDER BY \"urn:schemas:httpmail:date\" ASC";
Enumeration folderEnum = DavGatewayHttpClientFacade.executeSearchMethod(wdr.retrieveSessionInstance(), folderUrl, searchRequest);

View File

@ -206,7 +206,7 @@ public class ImapConnection extends AbstractConnection {
}
while (rangeIterator.hasNext()) {
ExchangeSession.Message message = rangeIterator.next();
if (parameters == null) {
if (parameters == null || "FLAGS".equals(parameters)) {
sendClient("* " + (rangeIterator.currentIndex ) + " FETCH (UID " + message.getUidAsLong() + " FLAGS (" + (message.getImapFlags()) + "))");
} else if ("BODYSTRUCTURE".equals(parameters)) {
sendClient("* " + (rangeIterator.currentIndex ) + " FETCH (BODYSTRUCTURE (\"TEXT\" \"PLAIN\" (\"CHARSET\" \"windows-1252\") NIL NIL \"QUOTED-PRINTABLE\" " + message.size + " 50 NIL NIL NIL NIL))");