Skip to content

Commit

Permalink
Basic AS 16.0 and 16.1 definitions
Browse files Browse the repository at this point in the history
AS16.1 changes based on grommunio-sync commit
grommunio/grommunio-sync@deeb586
  • Loading branch information
matidau committed Sep 4, 2023
1 parent d11bc98 commit 52d89df
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/lib/core/zpush.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class ZPush {
const ASV_121 = "12.1";
const ASV_14 = "14.0";
const ASV_141 = "14.1";
const ASV_16 = "16.0";
const ASV_161 = "16.1";

/**
* Command codes for base64 encoded requests (AS >= 12.1)
Expand All @@ -68,6 +70,7 @@ class ZPush {
const COMMAND_PROVISION = 20;
const COMMAND_RESOLVERECIPIENTS = 21;
const COMMAND_VALIDATECERT = 22;
const COMMAND_FIND = 23;

// Deprecated commands
const COMMAND_GETHIERARCHY = -1;
Expand Down Expand Up @@ -97,7 +100,9 @@ class ZPush {
self::ASV_12,
self::ASV_121,
self::ASV_14,
self::ASV_141
self::ASV_141,
self::ASV_16,
self::ASV_161
);

static private $supportedCommands = array(
Expand Down Expand Up @@ -126,6 +131,7 @@ class ZPush {
self::COMMAND_NOTIFY => array(self::ASV_1, self::REQUESTHANDLER => "Notify"), // deprecated & not implemented
self::COMMAND_ITEMOPERATIONS => array(self::ASV_12, self::REQUESTHANDLER => "ItemOperations"),
self::COMMAND_SETTINGS => array(self::ASV_12, self::REQUESTHANDLER => "Settings"),
self::COMMAND_FIND => array(self::ASV_161, self::REQUESTHANDLER => "Find"),

self::COMMAND_WEBSERVICE_DEVICE => array(self::REQUESTHANDLER => "Webservice", self::PLAININPUT, self::NOACTIVESYNCCOMMAND, self::WEBSERVICECOMMAND),
self::COMMAND_WEBSERVICE_USERS => array(self::REQUESTHANDLER => "Webservice", self::PLAININPUT, self::NOACTIVESYNCCOMMAND, self::WEBSERVICECOMMAND),
Expand Down
60 changes: 60 additions & 0 deletions src/lib/core/zpushdefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
define("SYNC_POOMCAL_FIRSTDAYOFWEEK","POOMCAL:FirstDayOfWeek"); // Since 14.1
define("SYNC_POOMCAL_ONLINEMEETINGCONFLINK","POOMCAL:OnlineMeetingConfLink"); // Since 14.1
define("SYNC_POOMCAL_ONLINEMEETINGEXTERNALLINK","POOMCAL:OnlineMeetingExternalLink"); // Since 14.0
define("SYNC_POOMCAL_CLIENTUID","POOMCAL:ClientUid"); // Since 16.0

// Code Page 5: Move, all AS versions
define("SYNC_MOVE_MOVES","Move:Moves");
Expand Down Expand Up @@ -323,6 +324,9 @@
define("SYNC_MEETINGRESPONSE_USERRESPONSE","MeetingResponse:UserResponse");
define("SYNC_MEETINGRESPONSE_VERSION","MeetingResponse:Version"); // Not defined / deprecated
define("SYNC_MEETINGRESPONSE_INSTANCEID","MeetingResponse:InstanceId"); // Since AS 14.1
define("SYNC_MEETINGRESPONSE_PROPOSEDSTARTTIME","MeetingResponse:ProposedStartTime"); // Since AS 16.1
define("SYNC_MEETINGRESPONSE_PROPOSEDENDTIME","MeetingResponse:ProposedEndTime"); // Since AS 16.1
define("SYNC_MEETINGRESPONSE_SENDRESPONSE","MeetingResponse:SendResponse"); // Since AS 16.0

// Code Page 9: Tasks - POOMTASKS, all AS versions
define("SYNC_POOMTASKS_BODY","POOMTASKS:Body"); // AirSyncBase Body is used since 12.0
Expand Down Expand Up @@ -474,6 +478,7 @@
define("SYNC_PROVISION_APPNAME", "Provision:ApplicationName"); // Since AS 12.1
define("SYNC_PROVISION_APPROVEDAPPLIST", "Provision:ApprovedApplicationList"); // Since AS 12.1
define("SYNC_PROVISION_HASH", "Provision:Hash"); // Since AS 12.1
define("SYNC_PROVISION_ACCOUNTONLYREMOTEWIPE", "Provision:AccountOnlyRemoteWipe"); // Since AS 16.1
// only for internal use - never to be streamed to the mobile
define("SYNC_PROVISION_POLICYNAME", "Provision:PolicyName");

Expand Down Expand Up @@ -547,6 +552,25 @@
define("SYNC_AIRSYNCBASE_BODYPARTPREFERENCE", "AirSyncBase:BodyPartPreference"); //Since 14.1
define("SYNC_AIRSYNCBASE_BODYPART", "AirSyncBase:BodyPart"); // Since 14.1
define("SYNC_AIRSYNCBASE_STATUS", "AirSyncBase:Status"); //Since 14.1
define("SYNC_AIRSYNCBASE_ADD", "AirSyncBase:Add"); // Since 16.0
define("SYNC_AIRSYNCBASE_DELETE", "AirSyncBase:Delete"); // Since 16.0
define("SYNC_AIRSYNCBASE_CLIENTID", "AirSyncBase:ClientId"); // Since 16.0
define("SYNC_AIRSYNCBASE_CONTENT", "AirSyncBase:Content"); // Since 16.0
define("SYNC_AIRSYNCBASE_LOCATION", "AirSyncBase:Location"); // Since 16.0
define("SYNC_AIRSYNCBASE_ANNOTATION", "AirSyncBase:Annotation"); // Since 16.0
define("SYNC_AIRSYNCBASE_STREET", "AirSyncBase:Street"); // Since 16.0
define("SYNC_AIRSYNCBASE_CITY", "AirSyncBase:City"); // Since 16.0
define("SYNC_AIRSYNCBASE_STATE", "AirSyncBase:State"); // Since 16.0
define("SYNC_AIRSYNCBASE_COUNTRY", "AirSyncBase:Country"); // Since 16.0
define("SYNC_AIRSYNCBASE_POSTALCODE", "AirSyncBase:PostalCode"); // Since 16.0
define("SYNC_AIRSYNCBASE_LATITUDE", "AirSyncBase:Latitude"); // Since 16.0
define("SYNC_AIRSYNCBASE_LONGITUDE", "AirSyncBase:Longitude"); // Since 16.0
define("SYNC_AIRSYNCBASE_ACCURACY", "AirSyncBase:Accuracy"); // Since 16.0
define("SYNC_AIRSYNCBASE_ALTITUDE", "AirSyncBase:Altitude"); // Since 16.0
define("SYNC_AIRSYNCBASE_ALTITUDEACCURACY", "AirSyncBase:AltitudeAccuracy"); // Since 16.0
define("SYNC_AIRSYNCBASE_LOCATIONURI", "AirSyncBase:LocationUri"); // Since 16.0
define("SYNC_AIRSYNCBASE_INSTANCEID", "AirSyncBase:InstanceId"); // Since 16.0
define("SYNC_AIRSYNCBASE_INSTANCEID_DELETE", "AirSyncBase:InstanceId:Delete"); // Internal to transport delete request

// Code Page 18: Settings, Since 12.0
define("SYNC_SETTINGS_SETTINGS", "Settings:Settings");
Expand Down Expand Up @@ -639,6 +663,10 @@
define("SYNC_COMPOSEMAIL_CLIENTID", "ComposeMail:ClientId");
define("SYNC_COMPOSEMAIL_STATUS", "ComposeMail:Status");
define("SYNC_COMPOSEMAIL_ACCOUNTID", "ComposeMail:AccountId"); // Since 14.1
define("SYNC_COMPOSEMAIL_FORWARDEES", "ComposeMail:Forwardees"); // Since 16.0
define("SYNC_COMPOSEMAIL_FORWARDEE", "ComposeMail:Forwardee"); // Since 16.0
define("SYNC_COMPOSEMAIL_NAME", "ComposeMail:Name"); // Since 16.0
define("SYNC_COMPOSEMAIL_EMAIL", "ComposeMail:Email"); // Since 16.0
// only for internal use - never to be streamed to the mobile
define("SYNC_COMPOSEMAIL_REPLYFLAG","ComposeMail:ReplyFlag");
define("SYNC_COMPOSEMAIL_FORWARDFLAG","ComposeMail:ForwardFlag");
Expand All @@ -659,6 +687,9 @@
define("SYNC_POOMMAIL2_ACCOUNTID", "POOMMAIL2:AccountId"); // Since 14.1
define("SYNC_POOMMAIL2_FIRSTDAYOFWEEK", "POOMMAIL2:FirstDayOfWeek"); // Since 14.1
define("SYNC_POOMMAIL2_MEETINGMESSAGETYPE", "POOMMAIL2:MeetingMessageType"); // Since 14.1
define("SYNC_POOMMAIL2_ISDRAFT", "POOMMAIL2:IsDraft"); // Since 16.0
define("SYNC_POOMMAIL2_BCC", "POOMMAIL2:Bcc"); // Since 16.0
define("SYNC_POOMMAIL2_SEND", "POOMMAIL2:Send"); // Since 16.0

// Code Page 23: Notes, Since 14.0
define("SYNC_NOTES_SUBJECT", "Notes:Subject");
Expand Down Expand Up @@ -691,6 +722,30 @@
define("SYNC_RIGHTSMANAGEMENT_CONTENTOWNER", "RightsManagement:ContentOwner");
define("SYNC_RIGHTSMANAGEMENT_REMOVERIGHTSMGNTPROTECTION", "RightsManagement:RemoveRightsManagementProtection");

// Code page 25: Find, Since 16.1
define("SYNC_FIND_FIND", "Find:Find");
define("SYNC_FIND_SEARCHID", "Find:SearchId");
define("SYNC_FIND_EXECUTESEARCH", "Find:ExecuteSearch");
define("SYNC_FIND_MAILBOXSEARCHCRITERION", "Find:MailBoxSearchCriterion");
define("SYNC_FIND_QUERY", "Find:Query");
define("SYNC_FIND_STATUS", "Find:Status");
define("SYNC_FIND_FREETEXT", "Find:FreeText");
define("SYNC_FIND_OPTIONS", "Find:Options");
define("SYNC_FIND_RANGE", "Find:Range");
define("SYNC_FIND_DEEPTRAVERSAL", "Find:DeepTraversal");
define("SYNC_FIND_RESPONSE", "Find:Response");
define("SYNC_FIND_RESULT", "Find:Result");
define("SYNC_FIND_PROPERTIES", "Find:Properties");
define("SYNC_FIND_PREVIEW", "Find:Preview");
define("SYNC_FIND_HASATTACHMENTS", "Find:HasAttachments");
define("SYNC_FIND_TOTAL", "Find:Total");
define("SYNC_FIND_DISPLAYCC", "Find:DisplayCc");
define("SYNC_FIND_DISPLAYBCC", "Find:DisplayBcc");
define("SYNC_FIND_GALSEARCHCRITERION", "Find:GalSearchCriterion");
define("SYNC_FIND_MAXPICTURES", "Find:MaxPictures");
define("SYNC_FIND_MAXSIZE", "Find:MaxSize");
define("SYNC_FIND_PICTURE", "Find:Picture");

// Other constants
define("SYNC_FOLDER_TYPE_OTHER", 1);
define("SYNC_FOLDER_TYPE_INBOX", 2);
Expand Down Expand Up @@ -915,6 +970,11 @@
define("SYNC_VALIDATECERTSTATUS_DIGIDREVSTATUSUNVALIDATED", 16);
define("SYNC_VALIDATECERTSTATUS_SERVERERROR", 17);

define("SYNC_FINDSTATUS_SUCCESS", 1);
define("SYNC_FINDSTATUS_INVALIDREQUEST", 2);
define("SYNC_FINDSTATUS_FOLDERSYNCREQUIRED", 3);
define("SYNC_FINDSTATUS_STARTRANGEZER0", 4);

define("SYNC_COMMONSTATUS_SUCCESS", 1);
define("SYNC_COMMONSTATUS_INVALIDCONTENT", 101);
define("SYNC_COMMONSTATUS_INVALIDWBXML", 102);
Expand Down
57 changes: 56 additions & 1 deletion src/lib/wbxml/wbxmldefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ class WBXMLDefs {
0x39 => "FirstDayOfWeek", // Since 14.1
0x3a => "OnlineMeetingConfLink", // Since 14.1
0x3b => "OnlineMeetingExternalLink", // Since 14.1
0x3c => "ClientUid", // Since 16.0
),
5 => array (
0x05 => "Moves",
Expand Down Expand Up @@ -359,7 +360,10 @@ class WBXMLDefs {
0x0b => "Status",
0x0c => "UserResponse",
0x0d => "Version", // 2.0 - not defined in 20100501
0x0e => "InstanceId" // Since AS 14.1
0x0e => "InstanceId", // Since AS 14.1
0x10 => "ProposedStartTime", // Since 16.1
0x11 => "ProposedEndTime", // Since 16.1
0x12 => "SendResponse", // Since 16.0
),
9 => array (
0x05 => "Body", // AirSyncBase Body is used since 12.0
Expand Down Expand Up @@ -512,6 +516,7 @@ class WBXMLDefs {
0x38 => "ApplicationName", // Since 12.1
0x39 => "ApprovedApplicationList", // Since 12.1
0x3A => "Hash", // Since 12.1
0x3B => "AccountOnlyRemoteWipe", // Since 16.1
),
0xf => array(
0x05 => "Search",
Expand Down Expand Up @@ -583,6 +588,24 @@ class WBXMLDefs {
0x19 => "BodyPartPreference", // Since 14.1
0x1A => "BodyPart", // Since 14.1
0x1B => "Status", // Since 14.1
0x1C => "Add", // Since 16.0
0x1D => "Delete", // Since 16.0
0x1E => "ClientId", // Since 16.0
0x1F => "Content", // Since 16.0
0x20 => "Location", // Since 16.0
0x21 => "Annotation", // Since 16.0
0x22 => "Street", // Since 16.0
0x23 => "City", // Since 16.0
0x24 => "State", // Since 16.0
0x25 => "Country", // Since 16.0
0x26 => "PostalCode", // Since 16.0
0x27 => "Latitude", // Since 16.0
0x28 => "Longitude", // Since 16.0
0x29 => "Accuracy", // Since 16.0
0x2A => "Altitude", // Since 16.0
0x2B => "AltitudeAccuracy", // Since 16.0
0x2C => "LocationUri", // Since 16.0
0x2D => "InstanceId", // Since 16.0
),
0x12 => array( // Since 12.0
0x05 => "Settings",
Expand Down Expand Up @@ -673,6 +696,10 @@ class WBXMLDefs {
0x11 => "ClientId",
0x12 => "Status",
0x13 => "AccountId", // Since 14.1
0x15 => "Forwardees", // Since 16.0
0x16 => "Forwardee", // Since 16.0
0x17 => "Name", // Since 16.0
0x18 => "Email", // Since 16.0
),
0x16 => array( // Since 14.0
0x05 => "UmCallerId",
Expand All @@ -690,6 +717,9 @@ class WBXMLDefs {
0x11 => "AccountId", // Since 14.1
0x12 => "FirstDayOfWeek", // Since 14.1
0x13 => "MeetingMessageType", // Since 14.1
0x15 => "IsDraft", // Since 16.0
0x16 => "Bcc", // Since 16.0
0x17 => "Send", // Since 16.0
),
0x17 => array( //Since 14.0
0x05 => "Subject",
Expand Down Expand Up @@ -720,6 +750,30 @@ class WBXMLDefs {
0x17 => "ContentOwner",
0x18 => "RemoveRightsManagementProtection",
),
0x19 => array( // Since 16.1
0x05 => "Find", // Since 16.1
0x06 => "SearchId", // Since 16.1
0x07 => "ExecuteSearch", // Since 16.1
0x08 => "MailBoxSearchCriterion", // Since 16.1
0x09 => "Query", // Since 16.1
0x0A => "Status", // Since 16.1
0x0B => "FreeText", // Since 16.1
0x0C => "Options", // Since 16.1
0x0D => "Range", // Since 16.1
0x0E => "DeepTraversal", // SinceE 16.1
0x11 => "Response", // Since 16.1
0x12 => "Result", // Since 16.1
0x13 => "Properties", // Since 16.1
0x14 => "Preview", // Since 16.1
0x15 => "HasAttachments", // Since 16.1
0x16 => "Total", // Since 16.1
0x17 => "DisplayCc", // Since 16.1
0x18 => "DisplayBcc", // Since 16.1
0x19 => "GalSearchCriterion", // Since 16.1
0x20 => "MaxPictures", // Since 16.1
0x21 => "MaxSize", // Since 16.1
0x22 => "Picture", // Since 16.1
),
),
"namespaces" => array(
//0 => "AirSync", //
Expand Down Expand Up @@ -747,6 +801,7 @@ class WBXMLDefs {
0x16 => "POOMMAIL2", //14.0
0x17 => "Notes", //14.0
0x18 => "RightsManagement",
0x19 => "Find", //16.1
)
);
}

0 comments on commit 52d89df

Please sign in to comment.