1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Adding code pages that Microsoft Exchange ActiveSync uses.

This commit is contained in:
Matthew Brace 2009-03-08 02:11:00 +00:00
parent 79377c220f
commit aa3f14ae4c
19 changed files with 1003 additions and 0 deletions

View File

@ -0,0 +1,43 @@
package com.android.email;
/**
* This class is the specific code page for AirSyncBase in the ActiveSync protocol.
* The code page number is 17.
*
* @version 1.0
* @author Matthew Brace
*/
class AirSyncBaseCodePage extends CodePage {
/**
* Constructor for AirSyncBaseCodePage. Initializes all of the code page values.
*/
public AirSyncBaseCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("BodyPreference", 0x05);
codepageTokens.put("Type", 0x06);
codepageTokens.put("TruncationSize", 0x07);
codepageTokens.put("AllOrNone", 0x08);
codepageTokens.put("Body", 0x0a);
codepageTokens.put("Data", 0x0b);
codepageTokens.put("EstimatedDataSize", 0x0c);
codepageTokens.put("Truncated", 0x0d);
codepageTokens.put("Attachments", 0x0e);
codepageTokens.put("Attachment", 0x0f);
codepageTokens.put("DisplayName", 0x10);
codepageTokens.put("FileReference", 0x11);
codepageTokens.put("Method", 0x12);
codepageTokens.put("ContentId", 0x13);
codepageTokens.put("ContentLocation", 0x14);
codepageTokens.put("IsInline", 0x15);
codepageTokens.put("NativeBodyType", 0x16);
codepageTokens.put("ContentType", 0x17);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x11;
codePageName = "AirSyncBase";
}
}

View File

@ -0,0 +1,89 @@
package com.android.email;
/**
* This class is the specific code page for AirSync in the ActiveSync protocol.
* The code page number is 0.
*
* @version 1.0
* @author Matthew Brace
*/
class AirSyncCodePage extends CodePage {
/**
* Constructor for AirSyncCodePage. Initializes all of the code page values.
*/
public AirSyncCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Sync", 0x05);
codepageTokens.put("Responses", 0x06);
codepageTokens.put("Add", 0x07);
codepageTokens.put("Change", 0x08);
codepageTokens.put("Delete", 0x09);
codepageTokens.put("Fetch", 0x0a);
codepageTokens.put("SyncKey", 0x0b);
codepageTokens.put("ClientId", 0x0c);
codepageTokens.put("ServerId", 0x0d);
codepageTokens.put("Status", 0x0e);
codepageTokens.put("Collection", 0x0f);
codepageTokens.put("Class", 0x10);
codepageTokens.put("Version", 0x11);
codepageTokens.put("CollectionId", 0x12);
codepageTokens.put("GetChanges", 0x13);
codepageTokens.put("MoreAvailable", 0x14);
codepageTokens.put("WindowSize", 0x15);
codepageTokens.put("Commands", 0x16);
codepageTokens.put("Options", 0x17);
codepageTokens.put("FilterType", 0x18);
codepageTokens.put("Truncation", 0x19);
codepageTokens.put("RTFTruncation", 0x1a);
codepageTokens.put("Conflict", 0x1b);
codepageTokens.put("Collections", 0x1c);
codepageTokens.put("ApplicationData", 0x1d);
codepageTokens.put("DeletesAsMoves", 0x1e);
codepageTokens.put("NotifyGUID", 0x1f);
codepageTokens.put("Supported", 0x20);
codepageTokens.put("SoftDelete", 0x21);
codepageTokens.put("MIMESupport", 0x22);
codepageTokens.put("MIMETruncation", 0x23);
codepageTokens.put("Wait", 0x24);
codepageTokens.put("Limit", 0x25);
codepageTokens.put("Partial", 0x26);
/* Maps token to string for the code page */
codepageStrings.put(0x05, "Sync");
codepageStrings.put(0x06, "Responses");
codepageStrings.put(0x07, "Add");
codepageStrings.put(0x08, "Change");
codepageStrings.put(0x09, "Delete");
codepageStrings.put(0x0a, "Fetch");
codepageStrings.put(0x0b, "SyncKey");
codepageStrings.put(0x0c, "ClientId");
codepageStrings.put(0x0d, "ServerId");
codepageStrings.put(0x0e, "Status");
codepageStrings.put(0x0f, "Collection");
codepageStrings.put(0x10, "Class");
codepageStrings.put(0x11, "Version");
codepageStrings.put(0x12, "CollectionId");
codepageStrings.put(0x13, "GetChanges");
codepageStrings.put(0x14, "MoreAvailable");
codepageStrings.put(0x15, "WindowSize");
codepageStrings.put(0x16, "Commands");
codepageStrings.put(0x17, "Options");
codepageStrings.put(0x18, "FilterType");
codepageStrings.put(0x19, "Truncation");
codepageStrings.put(0x1a, "RTFTruncation");
codepageStrings.put(0x1b, "Conflict");
codepageStrings.put(0x1c, "Collections");
codepageStrings.put(0x1d, "ApplicationData");
codepageStrings.put(0x1e, "DeletesAsMoves");
codepageStrings.put(0x1f, "NotifyGUID");
codepageStrings.put(0x20, "Supported");
codepageStrings.put(0x21, "SoftDelete");
codepageStrings.put(0x22, "MIMESupport");
codepageStrings.put(0x23, "MIMETruncation");
codepageStrings.put(0x24, "Wait");
codepageStrings.put(0x25, "Limit");
codepageStrings.put(0x26, "Partial");
codePageIndex = 0x00;
codePageName = "AirSync";
}
}

View File

@ -0,0 +1,63 @@
package com.android.email;
/**
* This class is the specific code page for Calendar in the ActiveSync protocol.
* The code page number is 4.
*
* @version 1.0
* @author Matthew Brace
*/
class CalendarCodePage extends CodePage {
/**
* Constructor for CalendarCodePage. Initializes all of the code page values.
*/
public CalendarCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("TimeZone", 0x05);
codepageTokens.put("AllDayEvent", 0x06);
codepageTokens.put("Attendees", 0x07);
codepageTokens.put("Attendee", 0x08);
codepageTokens.put("Attendee_Email", 0x09);
codepageTokens.put("Attendee_Name", 0x0a);
codepageTokens.put("Body", 0x0b);
codepageTokens.put("BodyTruncated", 0x0c);
codepageTokens.put("BusyStatus", 0x0d);
codepageTokens.put("Categories", 0x0e);
codepageTokens.put("Category", 0x0f);
codepageTokens.put("Compressed_RTF", 0x10);
codepageTokens.put("DTStamp", 0x11);
codepageTokens.put("EndTime", 0x12);
codepageTokens.put("Exception", 0x13);
codepageTokens.put("Exceptions", 0x14);
codepageTokens.put("Exception_IsDeleted", 0x15);
codepageTokens.put("Exception_StartTime", 0x16);
codepageTokens.put("Location", 0x17);
codepageTokens.put("MeetingStatus", 0x18);
codepageTokens.put("Organizer_Email", 0x19);
codepageTokens.put("Organizer_Name", 0x1a);
codepageTokens.put("Recurrence", 0x1b);
codepageTokens.put("Recurrence_Type", 0x1c);
codepageTokens.put("Recurrence_Until", 0x1d);
codepageTokens.put("Recurrence_Occurrences", 0x1e);
codepageTokens.put("Recurrence_Interval", 0x1f);
codepageTokens.put("Recurrence_DayOfWeek", 0x20);
codepageTokens.put("Recurrence_DayOfMonth", 0x21);
codepageTokens.put("Recurrence_WeekOfMonth", 0x22);
codepageTokens.put("Recurrence_MonthOfYear", 0x23);
codepageTokens.put("Reminder_MinsBefore", 0x24);
codepageTokens.put("Sensitivity", 0x25);
codepageTokens.put("Subject", 0x26);
codepageTokens.put("StartTime", 0x27);
codepageTokens.put("UID", 0x28);
codepageTokens.put("Attendee_Status", 0x29);
codepageTokens.put("Attendee_Type", 0x2a);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x03;
codePageName = "Calendar";
}
}

View File

@ -0,0 +1,35 @@
package com.android.email;
/**
* This class is the specific code page for Contacts2 in the ActiveSync protocol.
* The code page number is 12.
*
* @version 1.0
* @author Matthew Brace
*/
class Contacts2CodePage extends CodePage {
/**
* Constructor for Contacts2CodePage. Initializes all of the code page values.
*/
public Contacts2CodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("CustomerId", 0x05);
codepageTokens.put("GovernmentId", 0x06);
codepageTokens.put("IMAddress", 0x07);
codepageTokens.put("IMAddress2", 0x08);
codepageTokens.put("IMAddress3", 0x09);
codepageTokens.put("ManagerName", 0x0a);
codepageTokens.put("CompanyMainPhone", 0x0b);
codepageTokens.put("AccountName", 0x0c);
codepageTokens.put("NickName", 0x0d);
codepageTokens.put("MMS", 0x0e);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x0c;
codePageName = "Contacts2";
}
}

View File

@ -0,0 +1,133 @@
package com.android.email;
/**
* This class is the specific code page for Contacts in the ActiveSync protocol.
* The code page number is 1.
*
* @version 1.0
* @author Matthew Brace
*/
class ContactsCodePage extends CodePage {
/**
* Constructor for ContactsCodePage. Initializes all of the code page values.
*/
public ContactsCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Anniversary", 0x05);
codepageTokens.put("AssistantName", 0x06);
codepageTokens.put("AssistantTelephoneNumber", 0x07);
codepageTokens.put("Birthday", 0x08);
codepageTokens.put("Body", 0x09);
codepageTokens.put("BodySize", 0x0a);
codepageTokens.put("BodyTruncated", 0x0b);
codepageTokens.put("Business2TelephoneNumber", 0x0c);
codepageTokens.put("BusinessAddressCity", 0x0d);
codepageTokens.put("BusinessAddressCountry", 0x0e);
codepageTokens.put("BusinessAddressPostalCode", 0x0f);
codepageTokens.put("BusinessAddressState", 0x10);
codepageTokens.put("BusinessAddressStreet", 0x11);
codepageTokens.put("BusinessFaxNumber", 0x12);
codepageTokens.put("BusinessTelephoneNumber", 0x13);
codepageTokens.put("CarTelephoneNumber", 0x14);
codepageTokens.put("Categories", 0x15);
codepageTokens.put("Category", 0x16);
codepageTokens.put("Children", 0x17);
codepageTokens.put("Child", 0x18);
codepageTokens.put("CompanyName", 0x19);
codepageTokens.put("Department", 0x1a);
codepageTokens.put("Email1Address", 0x1b);
codepageTokens.put("Email2Address", 0x1c);
codepageTokens.put("Email3Address", 0x1d);
codepageTokens.put("FileAs", 0x1e);
codepageTokens.put("FirstName", 0x1f);
codepageTokens.put("Home2TelephoneNumber", 0x20);
codepageTokens.put("HomeAddressCity", 0x21);
codepageTokens.put("HomeAddressCountry", 0x22);
codepageTokens.put("HomeAddressPostalCode", 0x23);
codepageTokens.put("HomeAddressState", 0x24);
codepageTokens.put("HomeAddressStreet", 0x25);
codepageTokens.put("HomeFaxNumber", 0x26);
codepageTokens.put("HomeTelephoneNumber", 0x27);
codepageTokens.put("JobTitle", 0x28);
codepageTokens.put("LastName", 0x29);
codepageTokens.put("MiddleName", 0x2a);
codepageTokens.put("MobileTelephoneNumber", 0x2b);
codepageTokens.put("OfficeLocation", 0x2c);
codepageTokens.put("OtherAddressCity", 0x2d);
codepageTokens.put("OtherAddressCountry", 0x2e);
codepageTokens.put("OtherAddressPostalCode", 0x2f);
codepageTokens.put("OtherAddressState", 0x30);
codepageTokens.put("OtherAddressStreet", 0x31);
codepageTokens.put("PagerNumber", 0x32);
codepageTokens.put("RadioTelephoneNumber", 0x33);
codepageTokens.put("Spouse", 0x34);
codepageTokens.put("Suffix", 0x35);
codepageTokens.put("Title", 0x36);
codepageTokens.put("Webpage", 0x37);
codepageTokens.put("YomiCompanyName", 0x38);
codepageTokens.put("YomiFirstName", 0x39);
codepageTokens.put("YomiLastName", 0x3a);
codepageTokens.put("CompressedRTF", 0x3b);
codepageTokens.put("Picture", 0x3c);
/* Maps token to string for the code page */
codepageStrings.put(0x05, "Anniversary");
codepageStrings.put(0x06, "AssistantName");
codepageStrings.put(0x07, "AssistantTelephoneNumber");
codepageStrings.put(0x08, "Birthday");
codepageStrings.put(0x09, "Body");
codepageStrings.put(0x0a, "BodySize");
codepageStrings.put(0x0b, "BodyTruncated");
codepageStrings.put(0x0c, "Business2TelephoneNumber");
codepageStrings.put(0x0d, "BusinessAddressCity");
codepageStrings.put(0x0e, "BusinessAddressCountry");
codepageStrings.put(0x0f, "BusinessAddressPostalCode");
codepageStrings.put(0x10, "BusinessAddressState");
codepageStrings.put(0x11, "BusinessAddressStreet");
codepageStrings.put(0x12, "BusinessFaxNumber");
codepageStrings.put(0x13, "BusinessTelephoneNumber");
codepageStrings.put(0x14, "CarTelephoneNumber");
codepageStrings.put(0x15, "Categories");
codepageStrings.put(0x16, "Category");
codepageStrings.put(0x17, "Children");
codepageStrings.put(0x18, "Child");
codepageStrings.put(0x19, "CompanyName");
codepageStrings.put(0x1a, "Department");
codepageStrings.put(0x1b, "Email1Address");
codepageStrings.put(0x1c, "Email2Address");
codepageStrings.put(0x1d, "Email3Address");
codepageStrings.put(0x1e, "FileAs");
codepageStrings.put(0x1f, "FirstName");
codepageStrings.put(0x20, "Home2TelephoneNumber");
codepageStrings.put(0x21, "HomeAddressCity");
codepageStrings.put(0x22, "HomeAddressCountry");
codepageStrings.put(0x23, "HomeAddressPostalCode");
codepageStrings.put(0x24, "HomeAddressState");
codepageStrings.put(0x25, "HomeAddressStreet");
codepageStrings.put(0x26, "HomeFaxNumber");
codepageStrings.put(0x27, "HomeTelephoneNumber");
codepageStrings.put(0x28, "JobTitle");
codepageStrings.put(0x29, "LastName");
codepageStrings.put(0x2a, "MiddleName");
codepageStrings.put(0x2b, "MobileTelephoneNumber");
codepageStrings.put(0x2c, "OfficeLocation");
codepageStrings.put(0x2d, "OtherAddressCity");
codepageStrings.put(0x2e, "OtherAddressCountry");
codepageStrings.put(0x2f, "OtherAddressPostalCode");
codepageStrings.put(0x30, "OtherAddressState");
codepageStrings.put(0x31, "OtherAddressStreet");
codepageStrings.put(0x32, "PagerNumber");
codepageStrings.put(0x33, "RadioTelephoneNumber");
codepageStrings.put(0x34, "Spouse");
codepageStrings.put(0x35, "Suffix");
codepageStrings.put(0x36, "Title");
codepageStrings.put(0x37, "Webpage");
codepageStrings.put(0x38, "YomiCompanyName");
codepageStrings.put(0x39, "YomiFirstName");
codepageStrings.put(0x3a, "YomiLastName");
codepageStrings.put(0x3b, "CompressedRTF");
codepageStrings.put(0x3c, "Picture");
codePageIndex = 0x01;
codePageName = "POOMCONTACTS";
}
}

View File

@ -0,0 +1,33 @@
package com.android.email;
/**
* This class is the specific code page for DocumentLibrary in the ActiveSync protocol.
* The code page number is 19.
*
* @version 1.0
* @author Matthew Brace
*/
class DocumentLibraryCodePage extends CodePage {
/**
* Constructor for DocumentLibraryCodePage. Initializes all of the code page values.
*/
public DocumentLibraryCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("LinkId", 0x05);
codepageTokens.put("DisplayName", 0x06);
codepageTokens.put("IsFolder", 0x07);
codepageTokens.put("CreationDate", 0x08);
codepageTokens.put("LastModifiedDate", 0x09);
codepageTokens.put("IsHidden", 0x0a);
codepageTokens.put("ContentLength", 0x0b);
codepageTokens.put("ContentType", 0x0c);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x13;
codePageName = "DocumentLibrary";
}
}

View File

@ -0,0 +1,83 @@
package com.android.email;
/**
* This class is the specific code page for Emails in the ActiveSync protocol.
* The code page number is 2.
*
* @version 1.0
* @author Matthew Brace
*/
class EmailCodePage extends CodePage {
/**
* Constructor for EmailCodePage. Initializes all of the code page values.
*/
public EmailCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Attachment", 0x05);
codepageTokens.put("Attachments", 0x06);
codepageTokens.put("AttName", 0x07);
codepageTokens.put("AttSize", 0x08);
codepageTokens.put("Att0Id", 0x09);
codepageTokens.put("AttMethod", 0x0a);
codepageTokens.put("AttRemoved", 0x0b);
codepageTokens.put("Body", 0x0c);
codepageTokens.put("BodySize", 0x0d);
codepageTokens.put("BodyTruncated", 0x0e);
codepageTokens.put("DateReceived", 0x0f);
codepageTokens.put("DisplayName", 0x10);
codepageTokens.put("DisplayTo", 0x11);
codepageTokens.put("Importance", 0x12);
codepageTokens.put("MessageClass", 0x13);
codepageTokens.put("Subject", 0x14);
codepageTokens.put("Read", 0x15);
codepageTokens.put("To", 0x16);
codepageTokens.put("CC", 0x17);
codepageTokens.put("From", 0x18);
codepageTokens.put("ReplyTo", 0x19);
codepageTokens.put("AllDayEvent", 0x1a);
codepageTokens.put("Categories", 0x1b);
codepageTokens.put("Category", 0x1c);
codepageTokens.put("DTStamp", 0x1d);
codepageTokens.put("EndTime", 0x1e);
codepageTokens.put("InstanceType", 0x1f);
codepageTokens.put("IntDBusyStatus", 0x20);
codepageTokens.put("Location", 0x21);
codepageTokens.put("MeetingRequest", 0x22);
codepageTokens.put("Organizer", 0x23);
codepageTokens.put("RecurrenceId", 0x24);
codepageTokens.put("Reminder", 0x25);
codepageTokens.put("ResponseRequested", 0x26);
codepageTokens.put("Recurrences", 0x27);
codepageTokens.put("Recurrence", 0x28);
codepageTokens.put("Recurrence_Type", 0x29);
codepageTokens.put("Recurrence_Until", 0x2a);
codepageTokens.put("Recurrence_Occurrences", 0x2b);
codepageTokens.put("Recurrence_Interval", 0x2c);
codepageTokens.put("Recurrence_DayOfWeek", 0x2d);
codepageTokens.put("Recurrence_DayOfMonth", 0x2e);
codepageTokens.put("Recurrence_WeekOfMonth", 0x2f);
codepageTokens.put("Recurrence_MonthOfYear", 0x30);
codepageTokens.put("StartTime", 0x31);
codepageTokens.put("Sensitivity", 0x32);
codepageTokens.put("TimeZone", 0x33);
codepageTokens.put("GlobalObjId", 0x34);
codepageTokens.put("ThreadTopic", 0x35);
codepageTokens.put("MIMEData", 0x36);
codepageTokens.put("MIMETruncated", 0x37);
codepageTokens.put("MIMESize", 0x38);
codepageTokens.put("InternetCPID", 0x39);
codepageTokens.put("Flag", 0x3a);
codepageTokens.put("FlagStatus", 0x3b);
codepageTokens.put("ContentClass", 0x3c);
codepageTokens.put("FlagType", 0x3d);
codepageTokens.put("CompleteTime", 0x3e);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x02;
codePageName = "Email";
}
}

View File

@ -0,0 +1,45 @@
package com.android.email;
/**
* This class is the specific code page for FolderHierarchy in the ActiveSync protocol.
* The code page number is 7.
*
* @version 1.0
* @author Matthew Brace
*/
class FolderHierarchyCodePage extends CodePage {
/**
* Constructor for FolderHierarchyCodePage. Initializes all of the code page values.
*/
public FolderHierarchyCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Folders", 0x05);
codepageTokens.put("Folder", 0x06);
codepageTokens.put("DisplayName", 0x07);
codepageTokens.put("ServerId", 0x08);
codepageTokens.put("ParentId", 0x09);
codepageTokens.put("Type", 0x0a);
codepageTokens.put("Response", 0x0b);
codepageTokens.put("Status", 0x0c);
codepageTokens.put("ContentClass", 0x0d);
codepageTokens.put("Changes", 0x0e);
codepageTokens.put("Add", 0x0f);
codepageTokens.put("Delete", 0x10);
codepageTokens.put("Update", 0x11);
codepageTokens.put("SyncKey", 0x12);
codepageTokens.put("FolderCreate", 0x13);
codepageTokens.put("FolderDelete", 0x14);
codepageTokens.put("FolderUpdate", 0x15);
codepageTokens.put("FolderSync", 0x16);
codepageTokens.put("Count", 0x17);
codepageTokens.put("Version", 0x18);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x07;
codePageName = "FolderHierarchy";
}
}

View File

@ -0,0 +1,36 @@
package com.android.email;
/**
* This class is the specific code page for GAL in the ActiveSync protocol.
* The code page number is 16.
*
* @version 1.0
* @author Matthew Brace
*/
class GALCodePage extends CodePage {
/**
* Constructor for GALCodePage. Initializes all of the code page values.
*/
public GALCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("DisplayName", 0x05);
codepageTokens.put("Phone", 0x06);
codepageTokens.put("Office", 0x07);
codepageTokens.put("Title", 0x08);
codepageTokens.put("Company", 0x09);
codepageTokens.put("Alias", 0x0a);
codepageTokens.put("FirstName", 0x0b);
codepageTokens.put("LastName", 0x0c);
codepageTokens.put("HomePhone", 0x0d);
codepageTokens.put("MobilePhone", 0x0e);
codepageTokens.put("EmailAddress", 0x0f);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x10;
codePageName = "GAL";
}
}

View File

@ -0,0 +1,35 @@
package com.android.email;
/**
* This class is the specific code page for ItemEstimate in the ActiveSync protocol.
* The code page number is 6.
*
* @version 1.0
* @author Matthew Brace
*/
class ItemEstimateCodePage extends CodePage {
/**
* Constructor for ItemEstimateCodePage. Initializes all of the code page values.
*/
public ItemEstimateCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("GetItemEstimate", 0x05);
codepageTokens.put("Version", 0x06);
codepageTokens.put("Collections", 0x07);
codepageTokens.put("Collection", 0x08);
codepageTokens.put("Class", 0x09);
codepageTokens.put("CollectionId", 0x0a);
codepageTokens.put("DateTime", 0x0b);
codepageTokens.put("Estimate", 0x0c);
codepageTokens.put("Response", 0x0d);
codepageTokens.put("Status", 0x0e);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x06;
codePageName = "ItemEstimate";
}
}

View File

@ -0,0 +1,40 @@
package com.android.email;
/**
* This class is the specific code page for ItemOperations in the ActiveSync protocol.
* The code page number is 20.
*
* @version 1.0
* @author Matthew Brace
*/
class ItemOperationsCodePage extends CodePage {
/**
* Constructor for ItemOperationsCodePage. Initializes all of the code page values.
*/
public ItemOperationsCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("ItemOperations", 0x05);
codepageTokens.put("Fetch", 0x06);
codepageTokens.put("Store", 0x07);
codepageTokens.put("Option", 0x08);
codepageTokens.put("Range", 0x09);
codepageTokens.put("Total", 0x0a);
codepageTokens.put("Properties", 0x0b);
codepageTokens.put("Data", 0x0c);
codepageTokens.put("Status", 0x0d);
codepageTokens.put("Response", 0x0e);
codepageTokens.put("Version", 0x0f);
codepageTokens.put("Schema", 0x10);
codepageTokens.put("Part", 0x11);
codepageTokens.put("EmptyFolderContents", 0x12);
codepageTokens.put("DeleteSubFolders", 0x13);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x14;
codePageName = "ItemOperations";
}
}

View File

@ -0,0 +1,34 @@
package com.android.email;
/**
* This class is the specific code page for MeetingResponse in the ActiveSync protocol.
* The code page number is 8.
*
* @version 1.0
* @author Matthew Brace
*/
class MeetingResponseCodePage extends CodePage {
/**
* Constructor for MeetingResponseCodePage. Initializes all of the code page values.
*/
public MeetingResponseCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("CalId", 0x05);
codepageTokens.put("CollectionId", 0x06);
codepageTokens.put("MeetingResponse", 0x07);
codepageTokens.put("ReqId", 0x08);
codepageTokens.put("Request", 0x09);
codepageTokens.put("Result", 0x0a);
codepageTokens.put("Status", 0x0b);
codepageTokens.put("UserResponse", 0x0c);
codepageTokens.put("Version", 0x0d);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x08;
codePageName = "MeetingResponse";
}
}

View File

@ -0,0 +1,33 @@
package com.android.email;
/**
* This class is the specific code page for Move in the ActiveSync protocol.
* The code page number is 5.
*
* @version 1.0
* @author Matthew Brace
*/
class MoveCodePage extends CodePage {
/**
* Constructor for MoveCodePage. Initializes all of the code page values.
*/
public MoveCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("MoveItems", 0x05);
codepageTokens.put("Move", 0x06);
codepageTokens.put("SrcMsgId", 0x07);
codepageTokens.put("SrcFldId", 0x08);
codepageTokens.put("DstFldId", 0x09);
codepageTokens.put("Response", 0x0a);
codepageTokens.put("Status", 0x0b);
codepageTokens.put("DstMsgId", 0x0c);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x05;
codePageName = "Move";
}
}

View File

@ -0,0 +1,34 @@
package com.android.email;
/**
* This class is the specific code page for Ping in the ActiveSync protocol.
* The code page number is 13.
*
* @version 1.0
* @author Matthew Brace
*/
class PingCodePage extends CodePage {
/**
* Constructor for PingCodePage. Initializes all of the code page values.
*/
public PingCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Ping", 0x05);
codepageTokens.put("AutdState", 0x06); /* Not used by protocol */
codepageTokens.put("Status", 0x07);
codepageTokens.put("HeartbeatInterval", 0x08);
codepageTokens.put("Folders", 0x09);
codepageTokens.put("Folder", 0x0a);
codepageTokens.put("Id", 0x0b);
codepageTokens.put("Class", 0x0c);
codepageTokens.put("MaxFolders", 0x0d);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x0d;
codePageName = "Ping";
}
}

View File

@ -0,0 +1,79 @@
package com.android.email;
/**
* This class is the specific code page for Provision in the ActiveSync protocol.
* The code page number is 14.
*
* @version 1.0
* @author Matthew Brace
*/
class ProvisionCodePage extends CodePage {
/**
* Constructor for ProvisionCodePage. Initializes all of the code page values.
*/
public ProvisionCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Provision", 0x05);
codepageTokens.put("Policies", 0x06);
codepageTokens.put("Policy", 0x07);
codepageTokens.put("PolicyType", 0x08);
codepageTokens.put("PolicyKey", 0x09);
codepageTokens.put("Data", 0x0a);
codepageTokens.put("Status", 0x0b);
codepageTokens.put("RemoteWipe", 0x0c);
codepageTokens.put("EASProvisionDoc", 0x0d);
codepageTokens.put("DevicePasswordEnabled", 0x0e);
codepageTokens.put("AlphanumericDevicePasswordRequired", 0x0f);
codepageTokens.put("DeviceEncryptionEnabled", 0x10);
codepageTokens.put("PasswordRecoveryEnabled", 0x11);
codepageTokens.put("DocumentBrowseEnabled", 0x12);
codepageTokens.put("AttachmentsEnabled", 0x13);
codepageTokens.put("MinDevicePasswordLength", 0x14);
codepageTokens.put("MaxInactivityTimeDeviceLock", 0x15);
codepageTokens.put("MaxDevicePasswordFailedAttempts", 0x16);
codepageTokens.put("MaxAttachmentSize", 0x17);
codepageTokens.put("AllowSimpleDevicePassword", 0x18);
codepageTokens.put("DevicePasswordExpiration", 0x19);
codepageTokens.put("DevicePasswordHistory", 0x1a);
codepageTokens.put("AllowStorageCard", 0x1b);
codepageTokens.put("AllowCamera", 0x1c);
codepageTokens.put("RequireDeviceEncryption", 0x1d);
codepageTokens.put("AllowUnsignedApplications", 0x1e);
codepageTokens.put("AllowUnsignedInstallationPackages", 0x1f);
codepageTokens.put("MinDevicePasswordComplexCharacters", 0x20);
codepageTokens.put("AllowWiFi", 0x21);
codepageTokens.put("AllowTextMessaging", 0x22);
codepageTokens.put("AllowPOPIMAPEmail", 0x23);
codepageTokens.put("AllowBluetooth", 0x24);
codepageTokens.put("AllowIrDA", 0x25);
codepageTokens.put("RequireManualSyncWhenRoaming", 0x26);
codepageTokens.put("AllowDesktopSync", 0x27);
codepageTokens.put("MaxCalendarAgeFilter", 0x28);
codepageTokens.put("AllowHTMLEmail", 0x29);
codepageTokens.put("MaxEmailAgeFilter", 0x2a);
codepageTokens.put("MaxEmailBodyTruncationSize", 0x2b);
codepageTokens.put("MaxEmailHTMLBodyTruncationSize", 0x2c);
codepageTokens.put("RequireSignedSMIMEMessages", 0x2d);
codepageTokens.put("RequireEncryptedSMIMEMessages", 0x2e);
codepageTokens.put("RequireSignedSMIMEAlgorithm", 0x2f);
codepageTokens.put("RequireEncryptionSMIMEAlgorithm", 0x30);
codepageTokens.put("AllowSMIMEEncryptionAlgorithmNegotiation", 0x31);
codepageTokens.put("AllowSMIMESoftCerts", 0x32);
codepageTokens.put("AllowBrowser", 0x33);
codepageTokens.put("AllowConsumerEmail", 0x34);
codepageTokens.put("AllowRemoteDesktop", 0x35);
codepageTokens.put("AllowInternetSharing", 0x36);
codepageTokens.put("UnapprovedInROMApplicationList", 0x37);
codepageTokens.put("ApplicationName", 0x38);
codepageTokens.put("ApprovedApplicationList", 0x39);
codepageTokens.put("Hash", 0x3a);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x0e;
codePageName = "Provision";
}
}

View File

@ -0,0 +1,49 @@
package com.android.email;
/**
* This class is the specific code page for Search in the ActiveSync protocol.
* The code page number is 15.
*
* @version 1.0
* @author Matthew Brace
*/
class SearchCodePage extends CodePage {
/**
* Constructor for SearchCodePage. Initializes all of the code page values.
*/
public SearchCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Search", 0x05);
codepageTokens.put("Store", 0x07);
codepageTokens.put("Name", 0x08);
codepageTokens.put("Query", 0x09);
codepageTokens.put("Options", 0x0a);
codepageTokens.put("Range", 0x0b);
codepageTokens.put("Status", 0x0c);
codepageTokens.put("Response", 0x0d);
codepageTokens.put("Result", 0x0e);
codepageTokens.put("Properties", 0x0f);
codepageTokens.put("Total", 0x10);
codepageTokens.put("EqualTo", 0x11);
codepageTokens.put("Value", 0x12);
codepageTokens.put("And", 0x13);
codepageTokens.put("Or", 0x14);
codepageTokens.put("FreeText", 0x15);
codepageTokens.put("DeepTraversal", 0x17);
codepageTokens.put("LongId", 0x18);
codepageTokens.put("RebuildResults", 0x19);
codepageTokens.put("LessThan", 0x1a);
codepageTokens.put("GreaterThan", 0x1b);
codepageTokens.put("Schema", 0x1c);
codepageTokens.put("Supported", 0x1d);
/* Tokens 0x06 and 0x16 intentionally ommitted. They are not supported by ActiveSync */
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x0f;
codePageName = "Search";
}
}

View File

@ -0,0 +1,52 @@
package com.android.email;
/**
* This class is the specific code page for Settings in the ActiveSync protocol.
* The code page number is 18.
*
* @version 1.0
* @author Matthew Brace
*/
class SettingsCodePage extends CodePage {
/**
* Constructor for SettingsCodePage. Initializes all of the code page values.
*/
public SettingsCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Settings", 0x05);
codepageTokens.put("Status", 0x06);
codepageTokens.put("Get", 0x07);
codepageTokens.put("Set", 0x08);
codepageTokens.put("Oof", 0x09);
codepageTokens.put("OofState", 0x0a);
codepageTokens.put("StartTime", 0x0b);
codepageTokens.put("EndTime", 0x0c);
codepageTokens.put("OofMessage", 0x0d);
codepageTokens.put("AppliesToInternal", 0x0e);
codepageTokens.put("AppliesToExternalKnown", 0x0f);
codepageTokens.put("AppliesToExternalUnknown", 0x10);
codepageTokens.put("Enabled", 0x11);
codepageTokens.put("ReplyMessage", 0x12);
codepageTokens.put("BodyType", 0x13);
codepageTokens.put("DevicePassword", 0x14);
codepageTokens.put("Password", 0x15);
codepageTokens.put("DeviceInformation", 0x16);
codepageTokens.put("Model", 0x17);
codepageTokens.put("IMEI", 0x18);
codepageTokens.put("FriendlyName", 0x19);
codepageTokens.put("OS", 0x1a);
codepageTokens.put("OSLanguage", 0x1b);
codepageTokens.put("PhoneNumber", 0x1c);
codepageTokens.put("UserInformation", 0x1d);
codepageTokens.put("EmailAddresses", 0x1e);
codepageTokens.put("SmtpAddress", 0x1f);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x12;
codePageName = "Settings";
}
}

View File

@ -0,0 +1,56 @@
package com.android.email;
/**
* This class is the specific code page for Tasks in the ActiveSync protocol.
* The code page number is 9.
*
* @version 1.0
* @author Matthew Brace
*/
class TasksCodePage extends CodePage {
/**
* Constructor for TasksCodePage. Initializes all of the code page values.
*/
public TasksCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("Body", 0x05);
codepageTokens.put("BodySize", 0x06);
codepageTokens.put("BodyTruncated", 0x07);
codepageTokens.put("Categories", 0x08);
codepageTokens.put("Category", 0x09);
codepageTokens.put("Complete", 0x0a);
codepageTokens.put("DateCompleted", 0x0b);
codepageTokens.put("DueDate", 0x0c);
codepageTokens.put("UTCDueDate", 0x0d);
codepageTokens.put("Importance", 0x0e);
codepageTokens.put("Recurrence", 0x0f);
codepageTokens.put("RecurrenceType", 0x10);
codepageTokens.put("RecurrenceStart", 0x11);
codepageTokens.put("RecurrenceUntil", 0x12);
codepageTokens.put("RecurrenceOccurrences", 0x13);
codepageTokens.put("RecurrenceInterval", 0x14);
codepageTokens.put("RecurrenceDayOfMonth", 0x15);
codepageTokens.put("RecurrenceDayOfWeek", 0x16);
codepageTokens.put("RecurrenceWeekOfMonth", 0x17);
codepageTokens.put("RecurrenceMonthOfYear", 0x18);
codepageTokens.put("RecurrenceRegenerate", 0x19);
codepageTokens.put("RecurrenceDeadOccur", 0x1a);
codepageTokens.put("ReminderSet", 0x1b);
codepageTokens.put("ReminderTime", 0x1c);
codepageTokens.put("Sensitivity", 0x1d);
codepageTokens.put("StartDate", 0x1e);
codepageTokens.put("UTCStartDate", 0x1f);
codepageTokens.put("Subject", 0x20);
codepageTokens.put("CompressedRTF", 0x21);
codepageTokens.put("OrdinalDate", 0x22);
codepageTokens.put("SubOrdinalDate", 0x23);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x09;
codePageName = "Tasks";
}
}

View File

@ -0,0 +1,31 @@
package com.android.email;
/**
* This class is the specific code page for ValidateCert in the ActiveSync protocol.
* The code page number is 11.
*
* @version 1.0
* @author Matthew Brace
*/
class ValidateCertCodePage extends CodePage {
/**
* Constructor for ValidateCertCodePage. Initializes all of the code page values.
*/
public ValidateCertCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("ValidateCert", 0x05);
codepageTokens.put("Certificates", 0x06);
codepageTokens.put("Certificate", 0x07);
codepageTokens.put("CertificateChain", 0x08);
codepageTokens.put("CheckCRL", 0x09);
codepageTokens.put("Status", 0x0a);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x0b;
codePageName = "ValidateCert";
}
}