Horde_ActiveSync_Wbxml_Decoder
extends Horde_ActiveSync_Wbxml
in package
ActiveSync specific WBXML decoder.
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
- $charsetid : mixed
- $publicid : mixed
- $publicstringid : mixed
- $stringtable : mixed
- $version : int
- Store the wbxml version value. Used to verify we have a valid wbxml input stream.
- $_attrcp : mixed
- $_buffer : stream
- Temporary string buffer
- $_dtd : array<string|int, mixed>
- The code page definitions for the wbxml encoder/decoders
- $_isWbxml : bool
- Flag to indicate we have a valid wbxml input stream
- $_lastStartElement : array<string|int, mixed>
- Cache the last successfully fetched start tag array. Used to be able to easily detected emtpy nodes after the element was already fetched.
- $_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).
- $_procid : int
- The current procid
- $_readHeader : mixed
- $_stream : Horde_Stream
- Input or Output stream
- $_tagcp : int
- Track the codepage for the currently output tag so we know when to switch codepages.
- $_ungetbuffer : mixed
- __construct() : mixed
- _ungetElement() : void
- Unget the specified element from the stream. Places the element into the unget buffer.
- getElement() : array<string|int, mixed>|bool
- Returns either start, content or end, and auto-concatenates successive content.
- getElementContent() : mixed
- Get the element contents
- getElementEndTag() : array<string|int, mixed>|bool
- Get the next tag, which is assumed to be an end tag.
- getElementStartTag() : array<string|int, mixed>|bool
- Get the next tag, which is assumed to be a start tag.
- getFullInputStream() : resource
- Return the full, raw, input stream. Used for things like SendMail request where we don't have wbxml to parse. The calling code is responsible for closing the stream.
- getLastStartElement() : array<string|int, mixed>|bool
- Returns the last element array fetched using getElementStartTag()
- getStream() : mixed
- getToken() : array<string|int, mixed>
- Get the next [start | content | end] tag.
- isEmptyElement() : bool
- Returns whether or not the passed in element array represents an empty tag.
- isWbxml() : bool
- Check that the input stream contains wbxml. Basically looks for a valid WBXML_VERSION header. self::readWbxmlHeader MUST have been called already.
- peek() : array<string|int, mixed>
- Peek at the next element in the stream.
- readWbxmlHeader() : mixed
- Start reading the wbxml stream, pulling off the initial header and populate the properties.
- setLogger() : mixed
- Set the logger instance
- _getAttributes() : mixed
- Get the element attributes
- _getByte() : string
- Fetch a single byte from the stream.
- _getMapping() : mixed
- Get a dtd mapping
- _getMBUInt() : int
- Get an MBU integer
- _getOpaque() : string
- Get an opaque value from the stream of the specified length.
- _getStringTable() : string
- Fetch the string table. Don't think we use the results anywhere though.
- _getStringTableEntry() : string
- Really don't know for sure what this method is supposed to do, it is called from numerous places in this class, but the original zpush code did not contain this method...so, either it's completely broken, or normal use-cases do not reach the calling code. Either way, it needs to eventually be fixed.
- _getTempStream() : stream
- Return the temporary buffer stream.
- _getTermStr() : string
- Get a null terminated string from the stream.
- _getToken() : array<string|int, mixed>
- Get the next start tag, content or end tag
- _logToken() : void
- Log the token.
- _readVersion() : mixed
- Read the Wbxml version header byte, and buffer the input incase we need the full stream later.
- _splitAttribute() : array<string|int, mixed>
- Parses an attribute string
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
$charsetid
public
mixed
$charsetid
$publicid
public
mixed
$publicid
$publicstringid
public
mixed
$publicstringid
$stringtable
public
mixed
$stringtable
$version
Store the wbxml version value. Used to verify we have a valid wbxml input stream.
public
int
$version
Tags
$_attrcp
protected
mixed
$_attrcp
= 0
$_buffer
Temporary string buffer
protected
stream
$_buffer
$_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',
))
$_isWbxml
Flag to indicate we have a valid wbxml input stream
protected
bool
$_isWbxml
$_lastStartElement
Cache the last successfully fetched start tag array. Used to be able to easily detected emtpy nodes after the element was already fetched.
protected
array<string|int, mixed>
$_lastStartElement
$_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()
$_procid
The current procid
protected
int
$_procid
$_readHeader
protected
mixed
$_readHeader
= \false
$_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
$_ungetbuffer
protected
mixed
$_ungetbuffer
Methods
__construct()
public
__construct(stream $stream[, mixed $log_level = self::LOG_PROTOCOL ]) : mixed
Parameters
- $stream : stream
-
The [input|output] stream.
- $log_level : mixed = self::LOG_PROTOCOL
Return values
mixed —_ungetElement()
Unget the specified element from the stream. Places the element into the unget buffer.
public
_ungetElement(array<string|int, mixed> $element) : void
Parameters
- $element : array<string|int, mixed>
-
The element array to unget.
Return values
void —getElement()
Returns either start, content or end, and auto-concatenates successive content.
public
getElement() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool —The element structure or false on failure.
getElementContent()
Get the element contents
public
getElementContent() : mixed
Return values
mixed —The content of the current element | false on failure.
getElementEndTag()
Get the next tag, which is assumed to be an end tag.
public
getElementEndTag() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool —The element array | false on failure.
getElementStartTag()
Get the next tag, which is assumed to be a start tag.
public
getElementStartTag(string $tag) : array<string|int, mixed>|bool
Parameters
- $tag : string
-
The element that this should be a start tag for.
Return values
array<string|int, mixed>|bool —The start tag array | false on failure.
getFullInputStream()
Return the full, raw, input stream. Used for things like SendMail request where we don't have wbxml to parse. The calling code is responsible for closing the stream.
public
getFullInputStream() : resource
Return values
resource —getLastStartElement()
Returns the last element array fetched using getElementStartTag()
public
getLastStartElement() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool —The element array, or false if none available.
getStream()
public
getStream() : mixed
Return values
mixed —getToken()
Get the next [start | content | end] tag.
public
getToken() : array<string|int, mixed>
Return values
array<string|int, mixed> —The next, complete, token array.
isEmptyElement()
Returns whether or not the passed in element array represents an empty tag.
public
isEmptyElement(array<string|int, mixed> $el) : bool
Parameters
- $el : array<string|int, mixed>
-
The element array.
Return values
bool —True if $el is an empty start tag, otherwise false.
isWbxml()
Check that the input stream contains wbxml. Basically looks for a valid WBXML_VERSION header. self::readWbxmlHeader MUST have been called already.
public
isWbxml() : bool
Return values
bool —peek()
Peek at the next element in the stream.
public
peek() : array<string|int, mixed>
Return values
array<string|int, mixed> —The next element in the stream.
readWbxmlHeader()
Start reading the wbxml stream, pulling off the initial header and populate the properties.
public
readWbxmlHeader() : 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 —_getAttributes()
Get the element attributes
protected
_getAttributes() : mixed
Return values
mixed —The value of the element's attributes.
_getByte()
Fetch a single byte from the stream.
protected
_getByte() : string
Return values
string —The single byte.
_getMapping()
Get a dtd mapping
protected
_getMapping(int $cp, int $id) : mixed
Parameters
- $cp : int
-
The codepage to use.
- $id : int
-
The property.
Return values
mixed —The mapped value.
_getMBUInt()
Get an MBU integer
protected
_getMBUInt() : int
Return values
int —_getOpaque()
Get an opaque value from the stream of the specified length.
protected
_getOpaque(int $len) : string
Parameters
- $len : int
-
The length of the data to fetch.
Return values
string —A string of bytes representing the opaque value.
_getStringTable()
Fetch the string table. Don't think we use the results anywhere though.
protected
_getStringTable() : string
Return values
string —The string table.
_getStringTableEntry()
Really don't know for sure what this method is supposed to do, it is called from numerous places in this class, but the original zpush code did not contain this method...so, either it's completely broken, or normal use-cases do not reach the calling code. Either way, it needs to eventually be fixed.
protected
_getStringTableEntry(int $id) : string
Parameters
- $id : int
-
The entry to return??
Return values
string —_getTempStream()
Return the temporary buffer stream.
protected
_getTempStream() : stream
Return values
stream —_getTermStr()
Get a null terminated string from the stream.
protected
_getTermStr() : string
Return values
string —The string
_getToken()
Get the next start tag, content or end tag
protected
_getToken() : array<string|int, mixed>
Return values
array<string|int, mixed> —The element array.
_logToken()
Log the token.
protected
_logToken(mixed $el) : void
Parameters
- $el : mixed
Return values
void —_readVersion()
Read the Wbxml version header byte, and buffer the input incase we need the full stream later.
protected
_readVersion() : mixed
Return values
mixed —_splitAttribute()
Parses an attribute string
protected
_splitAttribute(string $attr) : array<string|int, mixed>
Parameters
- $attr : string
-
The raw attribute value.
Return values
array<string|int, mixed> —The attribute hash