Horde_ActiveSync_Wbxml_Encoder
extends Horde_ActiveSync_Wbxml
in package
Horde_ActiveSync_Wbxml_Encoder:: Encapsulates all Wbxml encoding from server to client.
Tags
Table of Contents
- EN_ATTRIBUTES = 5
- EN_CONTENT = 3
- EN_FLAGS = 4
- EN_FLAGS_ATTRIBUTES = 2
- EN_FLAGS_CONTENT = 1
- EN_TAG = 2
- EN_TYPE = 1
- EN_TYPE_CONTENT = 3
- EN_TYPE_ENDTAG = 2
- EN_TYPE_STARTTAG = 1
- END = 0x1
- ENTITY = 0x2
- EXT_0 = 0xc0
- EXT_1 = 0xc1
- EXT_2 = 0xc2
- EXT_I_0 = 0x40
- EXT_I_1 = 0x41
- EXT_I_2 = 0x42
- EXT_T_0 = 0x80
- EXT_T_1 = 0x81
- EXT_T_2 = 0x82
- LITERAL = 0x4
- LITERAL_A = 0x84
- LITERAL_AC = 0xc4
- LITERAL_C = 0x44
- LOG_DETAILED = 1
- LOG_MAXCONTENT = 50
- LOG_PROTOCOL = 2
- OPAQUE = 0xc3
- PI = 0x43
- STR_I = 0x3
- STR_T = 0x83
- SWITCH_PAGE = 0x0
- WBXML_VERSION = 0x3
- $multipart : bool
- Flag to indicate if we are outputing multipart binary data during e.g., ITEMOPERATION requests.
- $_dtd : array<string|int, mixed>
- The code page definitions for the wbxml encoder/decoders
- $_logger : Horde_Log_Logger
- Logger
- $_logLevel : mixed
- Logging level.
- $_logStack : array<string|int, mixed>
- Used to hold log entries for each tag so we can only output the log entries for the tags that are actually sent (@see $_stack).
- $_parts : array<string|int, mixed>
- Collection of parts to send in MULTIPART responses.
- $_procid : int
- The current procid
- $_stream : Horde_Stream
- Input or Output stream
- $_tagcp : int
- Track the codepage for the currently output tag so we know when to switch codepages.
- $_tempStream : resource
- Private stream when handling multipart output
- $_stack : array<string|int, mixed>
- Cache the tags to output. The stack is output when content() is called.
- __construct() : Horde_ActiveSync_Wbxml_Encoder
- Const'r
- addPart() : mixed
- Add a mulitpart part to be output.
- content() : mixed
- Output the tag content
- endTag() : mixed
- Output the end tag
- getParts() : array<string|int, mixed>
- Return the parts array.
- getStream() : mixed
- outputWbxmlHeader() : mixed
- Output the Wbxml header to the output stream.
- setLogger() : mixed
- Set the logger instance
- startTag() : mixed
- Start output for the specified tag
- startWBXML() : mixed
- Starts the wbxml output.
- _content() : mixed
- Outputs data
- _endTag() : mixed
- Output the endtag
- _getMapping() : array<string|int, mixed>
- Obtain the wbxml mapping for the given tag
- _logContent() : void
- Log the content output
- _logEndTag() : void
- Log the endtag output
- _logStartTag() : void
- Log the start tag output
- _outAttributes() : mixed
- Output attributes
- _outByte() : mixed
- Output a single byte to the stream
- _outMBUInt() : mixed
- Outputs an MBUInt to the stream
- _outputStack() : mixed
- Output any tags on the stack that haven't been output yet
- _outSwitchPage() : mixed
- Switch code page.
- _outTermStr() : mixed
- Output a string along with the terminator.
- _splitTag() : array<string|int, mixed>
- Split a tag into it's atomic parts
- _startTag() : mixed
- Actually outputs the start tag
Constants
EN_ATTRIBUTES
public
mixed
EN_ATTRIBUTES
= 5
EN_CONTENT
public
mixed
EN_CONTENT
= 3
EN_FLAGS
public
mixed
EN_FLAGS
= 4
EN_FLAGS_ATTRIBUTES
public
mixed
EN_FLAGS_ATTRIBUTES
= 2
EN_FLAGS_CONTENT
public
mixed
EN_FLAGS_CONTENT
= 1
EN_TAG
public
mixed
EN_TAG
= 2
EN_TYPE
public
mixed
EN_TYPE
= 1
EN_TYPE_CONTENT
public
mixed
EN_TYPE_CONTENT
= 3
EN_TYPE_ENDTAG
public
mixed
EN_TYPE_ENDTAG
= 2
EN_TYPE_STARTTAG
public
mixed
EN_TYPE_STARTTAG
= 1
END
public
mixed
END
= 0x1
ENTITY
public
mixed
ENTITY
= 0x2
EXT_0
public
mixed
EXT_0
= 0xc0
EXT_1
public
mixed
EXT_1
= 0xc1
EXT_2
public
mixed
EXT_2
= 0xc2
EXT_I_0
public
mixed
EXT_I_0
= 0x40
EXT_I_1
public
mixed
EXT_I_1
= 0x41
EXT_I_2
public
mixed
EXT_I_2
= 0x42
EXT_T_0
public
mixed
EXT_T_0
= 0x80
EXT_T_1
public
mixed
EXT_T_1
= 0x81
EXT_T_2
public
mixed
EXT_T_2
= 0x82
LITERAL
public
mixed
LITERAL
= 0x4
LITERAL_A
public
mixed
LITERAL_A
= 0x84
LITERAL_AC
public
mixed
LITERAL_AC
= 0xc4
LITERAL_C
public
mixed
LITERAL_C
= 0x44
LOG_DETAILED
public
mixed
LOG_DETAILED
= 1
LOG_MAXCONTENT
public
mixed
LOG_MAXCONTENT
= 50
LOG_PROTOCOL
public
mixed
LOG_PROTOCOL
= 2
OPAQUE
public
mixed
OPAQUE
= 0xc3
PI
public
mixed
PI
= 0x43
STR_I
public
mixed
STR_I
= 0x3
STR_T
public
mixed
STR_T
= 0x83
SWITCH_PAGE
public
mixed
SWITCH_PAGE
= 0x0
WBXML_VERSION
public
mixed
WBXML_VERSION
= 0x3
Properties
$multipart
Flag to indicate if we are outputing multipart binary data during e.g., ITEMOPERATION requests.
public
bool
$multipart
$_dtd
The code page definitions for the wbxml encoder/decoders
protected
array<string|int, mixed>
$_dtd
= array('codes' => array(
0 => array(
0x5 => 'Synchronize',
0x6 => 'Replies',
0x7 => 'Add',
0x8 => 'Modify',
0x9 => 'Remove',
0xa => 'Fetch',
0xb => 'SyncKey',
0xc => 'ClientEntryId',
0xd => 'ServerEntryId',
0xe => 'Status',
0xf => 'Folder',
0x10 => 'FolderType',
0x11 => 'Version',
0x12 => 'FolderId',
0x13 => 'GetChanges',
0x14 => 'MoreAvailable',
0x15 => 'WindowSize',
0x16 => 'Commands',
0x17 => 'Options',
0x18 => 'FilterType',
0x19 => 'Truncation',
0x1a => 'RtfTruncation',
0x1b => 'Conflict',
0x1c => 'Folders',
0x1d => 'Data',
0x1e => 'DeletesAsMoves',
0x1f => 'NotifyGUID',
0x20 => 'Supported',
0x21 => 'SoftDelete',
0x22 => 'MIMESupport',
0x23 => 'MIMETruncation',
0x24 => 'Wait',
0x25 => 'Limit',
0x26 => 'Partial',
// EAS 14.0
0x27 => 'ConversationMode',
0x28 => 'MaxItems',
0x29 => 'HeartbeatInterval',
),
/* POOMCONTACTS */
1 => array(
0x5 => 'Anniversary',
0x6 => 'AssistantName',
0x7 => 'AssistnamePhoneNumber',
0x8 => 'Birthday',
0x9 => 'Body',
0xa => 'BodySize',
0xb => 'BodyTruncated',
0xc => 'Business2PhoneNumber',
0xd => 'BusinessCity',
0xe => 'BusinessCountry',
0xf => 'BusinessPostalCode',
0x10 => 'BusinessState',
0x11 => 'BusinessStreet',
0x12 => 'BusinessFaxNumber',
0x13 => 'BusinessPhoneNumber',
0x14 => 'CarPhoneNumber',
0x15 => 'Categories',
0x16 => 'Category',
0x17 => 'Children',
0x18 => 'Child',
0x19 => 'CompanyName',
0x1a => 'Department',
0x1b => 'Email1Address',
0x1c => 'Email2Address',
0x1d => 'Email3Address',
0x1e => 'FileAs',
0x1f => 'FirstName',
0x20 => 'Home2PhoneNumber',
0x21 => 'HomeCity',
0x22 => 'HomeCountry',
0x23 => 'HomePostalCode',
0x24 => 'HomeState',
0x25 => 'HomeStreet',
0x26 => 'HomeFaxNumber',
0x27 => 'HomePhoneNumber',
0x28 => 'JobTitle',
0x29 => 'LastName',
0x2a => 'MiddleName',
0x2b => 'MobilePhoneNumber',
0x2c => 'OfficeLocation',
0x2d => 'OtherCity',
0x2e => 'OtherCountry',
0x2f => 'OtherPostalCode',
0x30 => 'OtherState',
0x31 => 'OtherStreet',
0x32 => 'PagerNumber',
0x33 => 'RadioPhoneNumber',
0x34 => 'Spouse',
0x35 => 'Suffix',
0x36 => 'Title',
0x37 => 'WebPage',
0x38 => 'YomiCompanyName',
0x39 => 'YomiFirstName',
0x3a => 'YomiLastName',
0x3b => 'Rtf',
// EAS 2.5 only.
0x3c => 'Picture',
// EAS 14.0
0x3d => 'Alias',
0x3e => 'WeightedRank',
),
/* POOMMAIL */
2 => array(
0x5 => 'Attachment',
0x6 => 'Attachments',
0x7 => 'AttName',
0x8 => 'AttSize',
0x9 => 'AttOid',
0xa => 'AttMethod',
0xb => 'AttRemoved',
0xc => 'Body',
0xd => 'BodySize',
0xe => 'BodyTruncated',
0xf => 'DateReceived',
0x10 => 'DisplayName',
0x11 => 'DisplayTo',
0x12 => 'Importance',
0x13 => 'MessageClass',
0x14 => 'Subject',
0x15 => 'Read',
0x16 => 'To',
0x17 => 'Cc',
0x18 => 'From',
0x19 => 'Reply-To',
0x1a => 'AllDayEvent',
0x1b => 'Categories',
// EAS 14.0
0x1c => 'Category',
// EAS 14.0
0x1d => 'DtStamp',
0x1e => 'EndTime',
0x1f => 'InstanceType',
0x20 => 'BusyStatus',
0x21 => 'Location',
0x22 => 'MeetingRequest',
0x23 => 'Organizer',
0x24 => 'RecurrenceId',
0x25 => 'Reminder',
0x26 => 'ResponseRequested',
0x27 => 'Recurrences',
0x28 => 'Recurrence',
0x29 => 'Type',
0x2a => 'Until',
0x2b => 'Occurrences',
0x2c => 'Interval',
0x2d => 'DayOfWeek',
0x2e => 'DayOfMonth',
0x2f => 'WeekOfMonth',
0x30 => 'MonthOfYear',
0x31 => 'StartTime',
0x32 => 'Sensitivity',
0x33 => 'TimeZone',
0x34 => 'GlobalObjId',
0x35 => 'ThreadTopic',
0x36 => 'MIMEData',
0x37 => 'MIMETruncated',
0x38 => 'MIMESize',
0x39 => 'InternetCPID',
// EAS 12.0
0x3a => 'Flag',
0x3b => 'FlagStatus',
0x3c => 'ContentClass',
0x3d => 'FlagType',
0x3e => 'CompleteTime',
// EAS 14.0
0x3f => 'DisallowNewTimeProposal',
),
/* 3 == AirNotify == deprecated */
/* POOMCAL */
4 => array(
0x5 => 'Timezone',
0x6 => 'AllDayEvent',
0x7 => 'Attendees',
0x8 => 'Attendee',
0x9 => 'Email',
0xa => 'Name',
0xb => 'Body',
// 2.5 Only
0xc => 'BodyTruncated',
// 2.5 Only
0xd => 'BusyStatus',
0xe => 'Categories',
0xf => 'Category',
0x10 => 'Rtf',
// 2.5 ONly
0x11 => 'DtStamp',
0x12 => 'EndTime',
0x13 => 'Exception',
0x14 => 'Exceptions',
0x15 => 'Deleted',
0x16 => 'ExceptionStartTime',
0x17 => 'Location',
0x18 => 'MeetingStatus',
0x19 => 'OrganizerEmail',
0x1a => 'OrganizerName',
0x1b => 'Recurrence',
0x1c => 'Type',
0x1d => 'Until',
0x1e => 'Occurrences',
0x1f => 'Interval',
0x20 => 'DayOfWeek',
0x21 => 'DayOfMonth',
0x22 => 'WeekOfMonth',
0x23 => 'MonthOfYear',
0x24 => 'Reminder',
0x25 => 'Sensitivity',
0x26 => 'Subject',
0x27 => 'StartTime',
0x28 => 'UID',
// EAS 12.0
0x29 => 'AttendeeStatus',
0x2a => 'AttendeeType',
// EAS 12.1 (Apparently no longer documented).
0x2b => 'Attachment',
0x2c => 'Attachments',
0x2d => 'AttName',
0x2e => 'AttSize',
0x2f => 'AttOid',
0x30 => 'AttMethod',
0x31 => 'AttRemoved',
0x32 => 'DisplayName',
// EAS 14
0x33 => 'DisallowNewTimeProposal',
0x34 => 'ResponseRequested',
0x35 => 'AppointmentReplyTime',
0x36 => 'ResponseType',
0x37 => 'CalendarType',
0x38 => 'IsLeapMonth',
// EAS 14.1
0x39 => 'FirstDayOfWeek',
0x3a => 'OnlineMeetingConfLink',
0x3b => 'OnlineMeetingExternalLink',
// EAS 16.0
0x3c => 'ClientUid',
),
/* MOVE */
5 => array(0x5 => 'Moves', 0x6 => 'Move', 0x7 => 'SrcMsgId', 0x8 => 'SrcFldId', 0x9 => 'DstFldId', 0xa => 'Response', 0xb => 'Status', 0xc => 'DstMsgId'),
/* GETITEMESTIMATE */
6 => array(
0x5 => 'GetItemEstimate',
0x6 => 'Version',
// 12.1
0x7 => 'Folders',
0x8 => 'Folder',
0x9 => 'FolderType',
// 12.1
0xa => 'FolderId',
0xb => 'DateTime',
// 12.1
0xc => 'Estimate',
0xd => 'Response',
0xe => 'Status',
),
/* FOLDERHIERARCHY */
7 => array(0x5 => 'Folders', 0x6 => 'Folder', 0x7 => 'DisplayName', 0x8 => 'ServerEntryId', 0x9 => 'ParentId', 0xa => 'Type', 0xb => 'Response', 0xc => 'Status', 0xd => 'ContentClass', 0xe => 'Changes', 0xf => 'Add', 0x10 => 'Remove', 0x11 => 'Update', 0x12 => 'SyncKey', 0x13 => 'FolderCreate', 0x14 => 'FolderDelete', 0x15 => 'FolderUpdate', 0x16 => 'FolderSync', 0x17 => 'Count', 0x18 => 'Version'),
/* MEETINGRESPONSE */
8 => array(
0x5 => 'CalendarId',
0x6 => 'FolderId',
0x7 => 'MeetingResponse',
0x8 => 'RequestId',
0x9 => 'Request',
0xa => 'Result',
0xb => 'Status',
0xc => 'UserResponse',
0xd => 'Version',
// EAS 14.1
0xe => 'InstanceId',
// EAS 16.0
0x12 => 'SendResponse',
),
/* POOMTASKS */
9 => array(
0x5 => 'Body',
0x6 => 'BodySize',
0x7 => 'BodyTruncated',
0x8 => 'Categories',
0x9 => 'Category',
0xa => 'Complete',
0xb => 'DateCompleted',
0xc => 'DueDate',
0xd => 'UtcDueDate',
0xe => 'Importance',
0xf => 'Recurrence',
0x10 => 'Type',
0x11 => 'Start',
0x12 => 'Until',
0x13 => 'Occurrences',
0x14 => 'Interval',
0x16 => 'DayOfWeek',
0x15 => 'DayOfMonth',
0x17 => 'WeekOfMonth',
0x18 => 'MonthOfYear',
0x19 => 'Regenerate',
0x1a => 'DeadOccur',
0x1b => 'ReminderSet',
0x1c => 'ReminderTime',
0x1d => 'Sensitivity',
0x1e => 'StartDate',
0x1f => 'UtcStartDate',
0x20 => 'Subject',
0x21 => 'Rtf',
// EAS 12.0
0x22 => 'OrdinalDate',
0x23 => 'SubOrdinalDate',
// EAS 14.0
0x24 => 'CalendarType',
0x25 => 'IsLeapMonth',
// EAS 14.1
0x26 => 'FirstDayOfWeek',
),
/* RESOLVERECIPIENTS */
0xa => array(
0x5 => 'ResolveRecipients',
0x6 => 'Response',
0x7 => 'Status',
0x8 => 'Type',
0x9 => 'Recipient',
0xa => 'DisplayName',
0xb => 'EmailAddress',
0xc => 'Certificates',
0xd => 'Certificate',
0xe => 'MiniCertificate',
0xf => 'Options',
0x10 => 'To',
0x11 => 'CertificateRetrieval',
0x12 => 'RecipientCount',
0x13 => 'MaxCertificates',
0x14 => 'MaxAmbiguousRecipients',
0x15 => 'CertificateCount',
0x16 => 'Availability',
0x17 => 'StartTime',
0x18 => 'EndTime',
0x19 => 'MergedFreeBusy',
// 14.1
0x1a => 'Picture',
0x1b => 'MaxSize',
0x1c => 'Data',
0x1d => 'MaxPictures',
),
/* VALIDATECERT */
0xb => array(0x5 => 'ValidateCert', 0x6 => 'Certificates', 0x7 => 'Certificate', 0x8 => 'CertificateChain', 0x9 => 'CheckCRL', 0xa => 'Status'),
/* POOMCONTACTS2*/
0xc => array(0x5 => 'CustomerId', 0x6 => 'GovernmentId', 0x7 => 'IMAddress', 0x8 => 'IMAddress2', 0x9 => 'IMAddress3', 0xa => 'ManagerName', 0xb => 'CompanyMainPhone', 0xc => 'AccountName', 0xd => 'NickName', 0xe => 'MMS'),
/* PING */
0xd => array(0x5 => 'Ping', 0x6 => 'AutdState', 0x7 => 'Status', 0x8 => 'HeartbeatInterval', 0x9 => 'Folders', 0xa => 'Folder', 0xb => 'ServerEntryId', 0xc => 'FolderType', 0xd => 'MaxFolders'),
/* PROVISION */
0xe => array(
0x5 => 'Provision',
0x6 => 'Policies',
0x7 => 'Policy',
0x8 => 'PolicyType',
0x9 => 'PolicyKey',
0xa => 'Data',
0xb => 'Status',
0xc => 'RemoteWipe',
0xd => 'EASProvisionDoc',
// EAS 12.0
0xe => 'DevicePasswordEnabled',
0xf => 'AlphanumericDevicePasswordRequired',
0x10 => 'DeviceEncryptionEnabled',
0x11 => 'PasswordRecoveryEnabled',
0x12 => 'DocumentBrowseEnabled',
0x13 => 'AttachmentsEnabled',
0x14 => 'MinDevicePasswordLength',
0x15 => 'MaxInactivityTimeDeviceLock',
0x16 => 'MaxDevicePasswordFailedAttempts',
0x17 => 'MaxAttachmentSize',
0x18 => 'AllowSimpleDevicePassword',
0x19 => 'DevicePasswordExpiration',
0x1a => 'DevicePasswordHistory',
// EAS 12.1
0x1b => 'AllowStorageCard',
0x1c => 'AllowCamera',
0x1d => 'RequireDeviceEncryption',
0x1e => 'AllowUnsignedApplications',
0x1f => 'AllowUnsignedInstallationPackages',
0x20 => 'MinDevicePasswordComplexCharacters',
0x21 => 'AllowWiFi',
0x22 => 'AllowTextMessaging',
0x23 => 'AllowPOPIMAPEmail',
0x24 => 'AllowBluetooth',
0x25 => 'AllowIrDA',
0x26 => 'RequireManualSyncWhenRoaming',
0x27 => 'AllowDesktopSync',
0x28 => 'MaxCalendarAgeFilter',
0x29 => 'AllowHTMLEmail',
0x2a => 'MaxEmailAgeFilter',
0x2b => 'MaxEmailBodyTruncationSize',
0x2c => 'MaxHTMLBodyTruncationSize',
0x2d => 'RequireSignedSMIMEMessages',
0x2e => 'RequireEncryptedSMIMEMessages',
0x2f => 'RequireSignedSMIMEAlgorithm',
0x30 => 'RequireEncryptedSMIMEAlgorithm',
0x31 => 'AllowSMIMEEncryptionAlgorithmNegotiation',
0x32 => 'AllowSMIMESoftCerts',
0x33 => 'AllowBrowser',
0x34 => 'AllowConsumerEmail',
0x35 => 'AllowRemoteDesktop',
0x36 => 'AllowInternetSharing',
0x37 => 'UnapprovedInROMApplicationList',
0x38 => 'ApplicationName',
0x39 => 'ApprovedApplicationList',
0x3a => 'Hash',
),
/* SEARCH */
0xf => array(
0x5 => 'Search',
0x7 => 'Store',
0x8 => 'Name',
0x9 => 'Query',
0xa => 'Options',
0xb => 'Range',
0xc => 'Status',
0xd => 'Response',
0xe => 'Result',
0xf => 'Properties',
0x10 => 'Total',
0x11 => 'EqualTo',
0x12 => 'Value',
0x13 => 'And',
0x14 => 'Or',
0x15 => 'FreeText',
0x17 => 'DeepTraversal',
0x18 => 'LongId',
0x19 => 'RebuildResults',
0x1a => 'LessThan',
0x1b => 'GreaterThan',
0x1c => 'Schema',
0x1d => 'Supported',
// EAS 12.1
0x1e => 'UserName',
0x1f => 'Password',
0x20 => 'ConversationId',
// EAS 14.1
0x21 => 'Picture',
0x22 => 'MaxSize',
0x23 => 'MaxPictures',
),
/* GAL (Global Address List) */
0x10 => array(
0x5 => 'DisplayName',
0x6 => 'Phone',
0x7 => 'Office',
0x8 => 'Title',
0x9 => 'Company',
0xa => 'Alias',
0xb => 'FirstName',
0xc => 'LastName',
0xd => 'HomePhone',
0xe => 'MobilePhone',
0xf => 'EmailAddress',
// 14.1
0x10 => 'Picture',
0x11 => 'Status',
0x12 => 'Data',
),
// EAS 12.0
/* AIRSYNCBASE */
0x11 => array(
0x5 => 'BodyPreference',
0x6 => 'Type',
0x7 => 'TruncationSize',
0x8 => 'AllOrNone',
0xa => 'Body',
0xb => 'Data',
0xc => 'EstimatedDataSize',
0xd => 'Truncated',
0xe => 'Attachments',
0xf => 'Attachment',
0x10 => 'DisplayName',
0x11 => 'FileReference',
0x12 => 'Method',
0x13 => 'ContentId',
0x14 => 'ContentLocation',
0x15 => 'IsInline',
0x16 => 'NativeBodyType',
0x17 => 'ContentType',
// EAS 14.0
0x18 => 'Preview',
// EAS 14.1
0x19 => 'BodyPartPreference',
0x1a => 'BodyPart',
0x1b => 'Status',
// EAS 16.0
0x1c => 'Add',
0x1d => 'Delete',
0x1e => 'ClientId',
0x1f => 'Content',
0x20 => 'Location',
0x21 => 'Annontation',
0x22 => 'Street',
0x23 => 'City',
0x24 => 'State',
0x25 => 'Country',
0x26 => 'PostalCode',
0x27 => 'Latitude',
0x28 => 'Longitude',
0x29 => 'Accuracy',
0x2a => 'Altitude',
0x2b => 'AltitudeAccuracy',
0x2c => 'LocationUri',
0x2d => 'InstanceId',
),
/* SETTINGS */
0x12 => array(
0x5 => 'Settings',
0x6 => 'Status',
0x7 => 'Get',
0x8 => 'Set',
0x9 => 'Oof',
0xa => 'OofState',
0xb => 'StartTime',
0xc => 'EndTime',
0xd => 'OofMessage',
0xe => 'AppliesToInternal',
0xf => 'AppliesToExternalKnown',
0x10 => 'AppliesToExternalUnknown',
0x11 => 'Enabled',
0x12 => 'ReplyMessage',
0x13 => 'BodyType',
0x14 => 'DevicePassword',
0x15 => 'Password',
0x16 => 'DeviceInformation',
0x17 => 'Model',
0x18 => 'IMEI',
0x19 => 'FriendlyName',
0x1a => 'OS',
0x1b => 'OSLanguage',
0x1c => 'PhoneNumber',
0x1d => 'UserInformation',
0x1e => 'EmailAddresses',
0x1f => 'SmtpAddress',
// EAS 12.1
0x20 => 'UserAgent',
// EAS 14.0
0x21 => 'EnableOutboundSMS',
0x22 => 'MobileOperator',
// EAS 14.1
0x23 => 'PrimarySmtpAddress',
0x24 => 'Accounts',
0x25 => 'Account',
0x26 => 'AccountId',
0x27 => 'AccountName',
0x28 => 'UserDisplayName',
0x29 => 'SendDisabled',
0x2b => 'RightsManagementInformation',
),
/* Document Library */
0x13 => array(0x5 => 'LinkId', 0x6 => 'DisplayName', 0x7 => 'IsFolder', 0x8 => 'CreationDate', 0x9 => 'LastModifiedDate', 0xa => 'IsHidden', 0xb => 'ContentLength', 0xc => 'ContentType'),
/* ITEMOPERATIONS */
0x14 => array(
0x5 => 'ItemOperations',
0x6 => 'Fetch',
0x7 => 'Store',
0x8 => 'Options',
0x9 => 'Range',
0xa => 'Total',
0xb => 'Properties',
0xc => 'Data',
0xd => 'Status',
0xe => 'Response',
0xf => 'Version',
0x10 => 'Schema',
0x11 => 'Part',
0x12 => 'EmptyFolderContent',
0x13 => 'DeleteSubFolders',
// EAS 12.1
0x14 => 'UserName',
0x15 => 'Password',
// EAS 14.0
0x16 => 'Move',
0x17 => 'DstFldId',
0x18 => 'ConversationId',
0x19 => 'MoveAlways',
),
/* COMPOSEMAIL (14.0) */
0x15 => array(
0x5 => 'SendMail',
0x6 => 'SmartForward',
0x7 => 'SmartReply',
0x8 => 'SaveInSentItems',
0x9 => 'ReplaceMime',
0xa => 'Type',
0xb => 'Source',
0xc => 'FolderId',
0xd => 'ItemId',
0xe => 'LongId',
0xf => 'InstanceId',
0x10 => 'MIME',
0x11 => 'ClientId',
0x12 => 'Status',
// 14.1
0x13 => 'AccountId',
// EAS 16.0
0x15 => 'Forwardees',
0x16 => 'Forwardee',
0x17 => 'ForwardeeName',
0x18 => 'ForwardeeEmail',
),
/* POOMMAIL2 (14.0) */
0x16 => array(
0x5 => 'UmCallerId',
0x6 => 'UmUserNotes',
0x7 => 'UmAttDuration',
0x8 => 'UmAttOrder',
0x9 => 'ConversationId',
0xa => 'ConversationIndex',
0xb => 'LastVerbExecuted',
0xc => 'LastVerbExecutionTime',
0xd => 'ReceivedAsBcc',
0xe => 'Sender',
0xf => 'CalendarType',
0x10 => 'IsLeapMonth',
// 14.1
0x11 => 'AccountId',
0x12 => 'FirstDayOfWeek',
0x13 => 'MeetingMessageType',
// EAS 16.0
0x15 => 'IsDraft',
0x16 => 'Bcc',
0x17 => 'Send',
),
/* Notes (14.0) */
0x17 => array(0x5 => 'Subject', 0x6 => 'MessageClass', 0x7 => 'LastModifiedDate', 0x8 => 'Categories', 0x9 => 'Category'),
/* Rights Management (14.1) */
// Included here to decode without errors.
// Functionality not implemented.
0x18 => array(0x5 => 'RightsManagementSupport', 0x6 => 'RightsManagementTemplates', 0x7 => 'RightsManagementTemplate', 0x8 => 'RightsManagementLicense', 0x9 => 'EditAllowed', 0xa => 'ReplyAllowed', 0xb => 'ReplyAllAllowed', 0xc => 'ForwardAllowed', 0xd => 'ModifyRecipientsAllowed', 0xe => 'ExtractAllowed', 0xf => 'PrintAllowed', 0x10 => 'ExportAllowed', 0x11 => 'ProgrammaticAccessAllowed', 0x12 => 'Owner', 0x13 => 'ContentExpiryDate', 0x14 => 'TemplateID', 0x15 => 'TemplateName', 0x16 => 'TemplateDescription', 0x17 => 'ContentOwner', 0x18 => 'RemoveRightsManagementDistribution'),
// Windows Live
0xfe => array(0x5 => 'Annotations', 0x6 => 'Annotation', 0x7 => 'Name', 0x8 => 'Value'),
), 'namespaces' => array(
1 => 'POOMCONTACTS',
2 => 'POOMMAIL',
4 => 'POOMCAL',
5 => 'Move',
6 => 'GetItemEstimate',
7 => 'FolderHierarchy',
8 => 'MeetingResponse',
9 => 'POOMTASKS',
0xa => 'ResolveRecipients',
0xb => 'ValidateCert',
0xc => 'POOMCONTACTS2',
0xd => 'Ping',
0xe => 'Provision',
0xf => 'Search',
0x10 => 'GAL',
// EAS 12.0
0x11 => 'AirSyncBase',
0x12 => 'Settings',
0x13 => 'DocumentLibrary',
0x14 => 'ItemOperations',
// EAS 14
0x15 => 'ComposeMail',
0x16 => 'POOMMAIL2',
0x17 => 'Notes',
0x18 => 'RightsManagement',
// Hotmail/Outlook.com WBXML extension.
0xfe => 'WindowsLive',
))
$_logger
Logger
protected
Horde_Log_Logger
$_logger
$_logLevel
Logging level.
protected
mixed
$_logLevel
$_logStack
Used to hold log entries for each tag so we can only output the log entries for the tags that are actually sent (@see $_stack).
protected
array<string|int, mixed>
$_logStack
= array()
$_parts
Collection of parts to send in MULTIPART responses.
protected
array<string|int, mixed>
$_parts
= array()
$_procid
The current procid
protected
int
$_procid
$_stream
Input or Output stream
protected
Horde_Stream
$_stream
$_tagcp
Track the codepage for the currently output tag so we know when to switch codepages.
protected
int
$_tagcp
= 0
$_tempStream
Private stream when handling multipart output
protected
resource
$_tempStream
$_stack
Cache the tags to output. The stack is output when content() is called.
private
array<string|int, mixed>
$_stack
= array()
We only output tags when they actually contain something. i.e. calling startTag() 10 times, then endTag() will cause 0 bytes of output apart from the header.
Methods
__construct()
Const'r
public
__construct(stream $output[, int $log_level = self::LOG_PROTOCOL ]) : Horde_ActiveSync_Wbxml_Encoder
Parameters
- $output : stream
-
The output stream
- $log_level : int = self::LOG_PROTOCOL
-
The logging level
Return values
Horde_ActiveSync_Wbxml_Encoder —addPart()
Add a mulitpart part to be output.
public
addPart(mixed $data) : mixed
Parameters
- $data : mixed
-
The part data. A string or stream resource.
Return values
mixed —content()
Output the tag content
public
content(mixed $content[, mixed $opaque = false ]) : mixed
Parameters
- $content : mixed
-
The value to output for this tag. A string or a stream resource.
- $opaque : mixed = false
Return values
mixed —endTag()
Output the end tag
public
endTag() : mixed
Return values
mixed —getParts()
Return the parts array.
public
getParts() : array<string|int, mixed>
Return values
array<string|int, mixed> —getStream()
public
getStream() : mixed
Return values
mixed —outputWbxmlHeader()
Output the Wbxml header to the output stream.
public
outputWbxmlHeader() : mixed
Return values
mixed —setLogger()
Set the logger instance
public
setLogger(Horde_Log_Logger $logger) : mixed
Parameters
- $logger : Horde_Log_Logger
-
The logger.
Return values
mixed —startTag()
Start output for the specified tag
public
startTag(string $tag[, mixed $attributes = false ][, bool $output_empty = false ]) : mixed
Parameters
- $tag : string
-
The name of the tag to start
- $attributes : mixed = false
-
Any attributes for the start tag
- $output_empty : bool = false
-
Force output of empty tags
Return values
mixed —startWBXML()
Starts the wbxml output.
public
startWBXML([bool $multipart = false ]) : mixed
Parameters
- $multipart : bool = false
-
Indicates we need to output mulitpart binary binary data. See MS-ASCMD 2.2.1.8.1
Return values
mixed —_content()
Outputs data
private
_content(mixed $content[, mixed $opaque = false ]) : mixed
Parameters
- $content : mixed
-
A string or stream resource to write to the output
- $opaque : mixed = false
Return values
mixed —_endTag()
Output the endtag
private
_endTag() : mixed
Return values
mixed —_getMapping()
Obtain the wbxml mapping for the given tag
private
_getMapping(string $tag) : array<string|int, mixed>
Parameters
- $tag : string
Return values
array<string|int, mixed> —_logContent()
Log the content output
private
_logContent(string $content) : void
Parameters
- $content : string
-
The output
Return values
void —_logEndTag()
Log the endtag output
private
_logEndTag() : void
Return values
void —_logStartTag()
Log the start tag output
private
_logStartTag(string $tag, mixed $attr, bool $output_empty) : void
Parameters
- $tag : string
- $attr : mixed
- $output_empty : bool
Return values
void —_outAttributes()
Output attributes
private
_outAttributes() : mixed
Return values
mixed —_outByte()
Output a single byte to the stream
private
_outByte(byte $byte) : mixed
Parameters
- $byte : byte
-
The byte to output.
Return values
mixed —_outMBUInt()
Outputs an MBUInt to the stream
private
_outMBUInt( $uint) : mixed
Parameters
Return values
mixed —_outputStack()
Output any tags on the stack that haven't been output yet
private
_outputStack() : mixed
Return values
mixed —_outSwitchPage()
Switch code page.
private
_outSwitchPage(int $page) : mixed
Parameters
- $page : int
-
The code page to switch to.
Return values
mixed —_outTermStr()
Output a string along with the terminator.
private
_outTermStr(mixed $content) : mixed
Parameters
- $content : mixed
-
A string or a stream resource.
Return values
mixed —_splitTag()
Split a tag into it's atomic parts
private
_splitTag(string $fulltag) : array<string|int, mixed>
Parameters
- $fulltag : string
-
The full tag name (e.g. POOMCONTACTS:Email1Address)
Return values
array<string|int, mixed> —An array containing the namespace and tagname
_startTag()
Actually outputs the start tag
private
_startTag(string $tag[, mixed $attributes = false ][, bool $output_empty = false ]) : mixed
Parameters
- $tag : string
-
@see Horde_ActiveSync_Wbxml_Encoder::startTag
- $attributes : mixed = false
-
@see Horde_ActiveSync_Wbxml_Encoder::startTag
- $output_empty : bool = false
-
@see Horde_ActiveSync_Wbxml_Encoder::startTag