\Horde_Core_ActiveSync_Driver

Horde backend.

Provides the communication between horde data and ActiveSync server.

Summary

Methods
Properties
Constants
__construct()
setLogger()
authenticate()
clearAuthentication()
setup()
getWasteBasket()
getFolderList()
getFolders()
getFolder()
changeFolder()
deleteFolder()
statFolder()
getServerChanges()
getMessage()
getAttachment()
itemOperationsFetchMailbox()
itemOperationsGetAttachmentData()
itemOperationsGetDocumentLibraryLink()
itemOperationsEmptyFolder()
statMessage()
deleteMessage()
moveMessage()
changeMessage()
getSearchResults()
sendMail()
setReadFlag()
getSpecialFolderNameByType()
statMailMessage()
getCurrentPolicy()
getProvisioning()
getSettings()
setSettings()
autoDiscover()
getUsernameFromEmail()
resolveRecipient()
buildFbString()
meetingResponse()
createDeviceCallback()
deviceCallback()
modifyDeviceCallback()
getFreebusy()
getSyncStamp()
No public properties found
APPOINTMENTS_FOLDER_UID
CONTACTS_FOLDER_UID
TASKS_FOLDER_UID
NOTES_FOLDER_UID
SPECIAL_SENT
SPECIAL_SPAM
SPECIAL_TRASH
SPECIAL_DRAFTS
SPECIAL_INBOX
SPECIAL_OUTBOX
FOLDER_PART_CLASS
FOLDER_PART_ID
_getFolder()
_parseFolderId()
_buildNonMailFolder()
_smartStatMessage()
_getMailFolders()
_buildDummyFolder()
_getMailFolder()
_searchMailbox()
_searchGal()
_endBuffer()
_mungeCert()
_getPolicyFromPerms()
_getPolicyValue()
_getIdentityFromAddress()
_getMaillogChanges()
_getLastVerb()
$_displayMap
$_modCache
$_connector
$_folders
$_imap
$_auth
$_pid
$_verbs
$_classMap
N/A
No private methods found
No private properties found
N/A

Constants

APPOINTMENTS_FOLDER_UID

APPOINTMENTS_FOLDER_UID

Server folder ids for non-email folders.

We use the @ modifiers to avoid issues in the (fringe) case of having email folders named like contacts etc...

CONTACTS_FOLDER_UID

CONTACTS_FOLDER_UID

TASKS_FOLDER_UID

TASKS_FOLDER_UID

NOTES_FOLDER_UID

NOTES_FOLDER_UID

SPECIAL_SENT

SPECIAL_SENT

SPECIAL_SPAM

SPECIAL_SPAM

SPECIAL_TRASH

SPECIAL_TRASH

SPECIAL_DRAFTS

SPECIAL_DRAFTS

SPECIAL_INBOX

SPECIAL_INBOX

SPECIAL_OUTBOX

SPECIAL_OUTBOX

FOLDER_PART_CLASS

FOLDER_PART_CLASS

FOLDER_PART_ID

FOLDER_PART_ID

Properties

$_displayMap

$_displayMap : array

Mappings for server uids -> display names. Populated in the const'r so we can use localized text.

Type

array

$_modCache

$_modCache : array

Cache message stats

Type

array — An array of stat hashes

$_folders

$_folders : array

Local cache of folders polled from the various backends.

Type

array

$_imap

$_imap : \Horde_ActiveSync_Imap_Adapter

Imap client adapter

Type

\Horde_ActiveSync_Imap_Adapter

$_pid

$_pid : integer

Current process id

Type

integer

$_verbs

$_verbs : array

Local cache of last verb searches.

Type

array

$_classMap

$_classMap : array

Class => Id map

Type

array

Methods

__construct()

__construct(array  $params = array()) 

Const'r

Parameters

array $params

Configuration parameters:

  • logger: (Horde_Log_Logger) The logger. DEFAULT: none (No logging).

  • state: (Horde_ActiveSync_State_Base) The state driver. DEFAULT: none (REQUIRED).
  • connector: (Horde_Core_ActiveSync_Connector) The connector object for communicating with the registry. DEFAULT: none (REQUIRED)
  • auth: (Horde_Core_ActiveSync_Auth) The auth object. DEFAULT: none (REQUIRED).
  • imap: (Horde_ActiveSync_Imap_Adapter) The IMAP adapter if email support is desired. DEFAULT: none (No email support will be provided).
  • cache: (Horde_Cache) A cache object to store certain types of data, such as mailbox search results. @since 2.12.0

setLogger()

setLogger(\Horde_Log_Logger  $logger) 

Set the logger.

Parameters

\Horde_Log_Logger $logger

The logger.

authenticate()

authenticate(string  $username, string  $password, string  $domain = null) : mixed

Authenticate to Horde

Parameters

string $username

The username to authenticate as (as passed by the device).

string $password

The password

string $domain

The user domain (unused in this driver).

Returns

mixed —

Boolean true on success, boolean false on credential failure or Horde_ActiveSync::AUTHREASON* constant on policy failure.

clearAuthentication()

clearAuthentication() 

Clean up

setup()

setup(string  $user) : boolean

Setup sync parameters. The user provided here is the user the backend will sync with. This allows you to authenticate as one user, and sync as another, if the backend supports this (Horde does not).

Parameters

string $user

The username to sync as on the backend.

Returns

boolean

getWasteBasket()

getWasteBasket(  $class) : string|boolean

Get the wastebasket folder. If this returns false, imap deletions are permanent. If it returns a valid mailbox, deletions are treated as moves to this mailbox. Note that any collection class other than Horde_ActiveSync::CLASS_EMAIL will return false.

Parameters

$class

Returns

string|boolean —

Returns name of the trash folder, or false if not using a trash folder.

getFolderList()

getFolderList() : array

Return an array of stats for the server's folder list.

Returns

array —

An array of folder stats @see self::statFolder()

getFolders()

getFolders() : array

Return an array of the server's folder objects.

Returns

array —

An array of Horde_ActiveSync_Message_Folder objects.

getFolder()

getFolder(string  $id) : \Horde_ActiveSync_Message_Folder

Return a Horde_ActiveSync_Message_Folder object.

Parameters

string $id

The folder's server id.

Throws

\Horde_ActiveSync_Exception

Returns

\Horde_ActiveSync_Message_Folder

changeFolder()

changeFolder(string  $old_name, string  $new_name, string  $parent, string  $uid = null, integer  $type = null) : \Horde_ActiveSync_Message_Folder

Change a folder on the server.

Parameters

string $old_name

The server's existing folder id.

string $new_name

The new display name.

string $parent

The folder's parent server id, if needed.

string $uid

The existing folder uid, if this is an edit. @since 2.5.0 (@todo Look at this for H6. It's here now to save an extra DB lookup for data we already have.)

integer $type

The EAS Folder type. @since 2.12.0

Throws

\Horde_ActiveSync_Exception

Returns

\Horde_ActiveSync_Message_Folder

deleteFolder()

deleteFolder(string  $id, string  $parent = \Horde_ActiveSync::FOLDER_ROOT) 

Delete a folder on the server.

Parameters

string $id

The server's folder id.

string $parent

The folder's parent, if needed. @deprecated

Throws

\Horde_ActiveSync_Exception_DeletionNotSupported,

Horde_ActiveSync_Exception

statFolder()

statFolder(string  $id, mixed  $parent = '0', mixed  $mod = null, string  $serverid = null, integer  $type = null) : \a

Stat folder. Note that since the only thing that can ever change for a folder is the name, we use that as the 'mod' value.

Parameters

string $id

The folder's EAS uid

mixed $parent

The parent folder (or 0 if none).

mixed $mod

Modification indicator. For folders, this is the display name of the folder, since that's the only thing that can change.

string $serverid

The backend serverid for this folder.

integer $type

The EAS folder type, a Horde_ActiveSync::FOLDERTYPE* contant. @since 2.12.0

Returns

\a —

stat hash:

  • id: The activesync folder identifier.
  • mod: The modification value.
  • parent: The folder's parent id.
  • serverid: The backend server's folder name for this folder.
  • type: The EAS folder type. @since 2.12.0

getServerChanges()

getServerChanges(\Horde_ActiveSync_Folder_Base  $folder, integer  $from_ts, integer  $to_ts, integer  $cutoffdate, boolean  $ping, boolean  $ignoreFirstSync = false, integer  $maxitems = 100, boolean  $refreshFilter = false) : array

Get a list of server changes that occured during the specified time period.

Parameters

\Horde_ActiveSync_Folder_Base $folder

The ActiveSync folder object to request changes for.

integer $from_ts

The starting timestamp

integer $to_ts

The ending timestamp

integer $cutoffdate

The earliest date to retrieve back to.

boolean $ping

If true, returned changeset may not contain the full changeset, but rather only a single change, designed only to indicate some change has taken place. The value should not be used to determine what change has taken place.

boolean $ignoreFirstSync

If true, will not trigger an initial sync if $from_ts is 0. Needed to avoid race conditions when we don't have any history data. @since 2.6.0 @todo If we can pass the synckey ( perhaps as part of $folder), we can just look for synckey 0 to know when we CAN trigger an initial sync without this flag.

integer $maxitems

Maximum number of recipients for a RI collection. @since 2.12.0

boolean $refreshFilter

Force a SOFTDELETE operation and check for new items within the (newly changed) current FilterType interval. @since 2.19.0

Throws

\Horde_Exception_AuthenticationFailure

Thrown when the requested collection appears to be no longer available. For H6, we should have the application APIs be responsible for differentiating between deleted/not-visible.

Returns

array —

An array of hashes that contain the ids of items that have changed in the specified collection along with a 'type' flag that indicates the type of change.

getMessage()

getMessage(string  $folderid, string  $id, array  $collection) : \Horde_ActiveSync_Message_Base

Obtain an ActiveSync message from the backend.

Parameters

string $folderid

The server's folder id this message is from

string $id

The server's message id

array $collection

The colletion data. May contain things like:

  • mimesupport: (integer) Indicates if the device has MIME support. DEFAULT: 0 (No MIME support)
  • truncation: (integer) Non-MIME truncation limit. Anything larger than this amount of bytes will be truncated. DEFAULT: 0 (No truncation)
  • mimetruncation: (integer) MIME truncation limit. Anything larger than this amount of bytes will be truncated. DEFAULT: 0 (No truncation)
  • bodyprefs: (array) The bodypref array from the device.
  • type: (integer) The Horde_ActiveSync::FOLDERTYPE* for this collection.

Throws

\Horde_ActiveSync_Exception,

Horde_Exception_NotFound

Returns

\Horde_ActiveSync_Message_Base —

The message data

getAttachment()

getAttachment(string  $name, array  $options = array()) : array

Return the specified attachment.

Parameters

string $name

The attachment identifier. For this driver, this consists of 'mailbox:uid:mimepart'

array $options

Any options requested. Currently supported:

  • stream: (boolean) Return a stream resource for the mime contents. DEFAULT: true (Return a stream resource for the 'data' value).

Returns

array —

The attachment in the form of an array with the following structure: array('content-type' => {the content-type of the attachement}, 'data' => {the raw attachment data})

itemOperationsFetchMailbox()

itemOperationsFetchMailbox(string  $longid, array  $bodyprefs, integer  $mimesupport) : \Horde_ActiveSync_Message_Base

Return Horde_Imap_Message_Mail object represented by the specified longid. Used to fetch email objects from a search result, which only returns a 'longid'.

Parameters

string $longid

The unique search result identifier. Consists of mailbox:uid E.g, INBOX:110

array $bodyprefs

The bodypreference array.

integer $mimesupport

Mimesupport flag. A Horde_ActiveSync::MIMESUPPORT* constant.

Returns

\Horde_ActiveSync_Message_Base —

The message requested.

itemOperationsGetAttachmentData()

itemOperationsGetAttachmentData(string  $filereference) : \Horde_ActiveSync_Message_AirSyncBaseFileAttachment

Return the specified attachement data for an ITEMOPERATIONS request.

Parameters

string $filereference

The attachment identifier.

Returns

\Horde_ActiveSync_Message_AirSyncBaseFileAttachment

itemOperationsGetDocumentLibraryLink()

itemOperationsGetDocumentLibraryLink(string  $linkid, array  $cred) : array

Return a documentlibrary item.

Parameters

string $linkid

The linkid

array $cred

A credential array:

  • username: A hash with 'username' and 'domain' key/values.
  • password: User password

Returns

array —

An array containing the data and metadata:

itemOperationsEmptyFolder()

itemOperationsEmptyFolder(array  $params) 

Empty specified mailbox.

Parameters

array $params

An array of parameters:

  • folderid: The backend folderid of the mailbox to empty.
  • subfolders: IGNORED for now.

Throws

\Horde_ActiveSync_Exception

statMessage()

statMessage(  $folderid,   $id) 

Get message stat data

Parameters

$folderid
$id

deleteMessage()

deleteMessage(string  $folderid, array  $ids, boolean  $instanceids = false) : array

Delete a message

Parameters

string $folderid

The folder id

array $ids

The message ids to delete

boolean $instanceids

If true, $ids is a hash of instanceids => uids. @since 2.23.0

Returns

array —

An array of succesfully deleted messages (currently only guarenteed for email messages).

moveMessage()

moveMessage(string  $folderid, array  $ids, string  $newfolderid) : array

Move message

Parameters

string $folderid

Existing folder id.

array $ids

Message UIDs to move. @todo For H6 this should take a single id. We can't bulk move them for other reasons.

string $newfolderid

The new folder id to move to.

Throws

\Horde_ActiveSync_Exception

Returns

array —

An array of successfully moved messages with the old UIDs as keys and new UIDs as values.

changeMessage()

changeMessage(string  $folderid, string  $id, \Horde_ActiveSync_Message_Base  $message, \Horde_ActiveSync_Device  $device) : array|boolean

Add/Edit a message

Parameters

string $folderid

The server id of the message's folder.

string $id

The server's uid for the message if this is a change to an existing message, false if new.

\Horde_ActiveSync_Message_Base $message

The activesync message.

\Horde_ActiveSync_Device $device

The device information @since 2.5.0

Returns

array|boolean —

A stat array if successful, otherwise false. Contains the following keys:

  • id: (mixed) The UID of the message/item.
  • mod: (mixed) A value to indicate the last modification.
  • flags: (array) An array of flag chagnes, empty array if no changes.
  • categories: (array|boolean) An array of EAS categories for email messages that exist as IMAP flags, false if no changes.
  • atchash: (array|boolean) An array of clientid->filereference mappings for file attachment changes made to appointment or draft email folders. @since 2.27.0
    • conversationid: (hex encoded opaque value) The conversationid value if adding Draft email message. @since 2.28.0
    • conversationindex: (integer) The conversation index value if adding Draft email message @since 2.28.0

getSearchResults()

getSearchResults(string  $type, array  $query) : array

Returns array of items which contain contact information

Parameters

string $type

The search type; ['gal'|'mailbox']

array $query

The search query. An array containing:

  • query: (array) The search query. Contains at least: 'query' and 'range'. The rest depends on the type of search being performed. DEFAULT: none, REQUIRED
  • range: (string) A range limiter. DEFAULT: none (No range used).
  • rebuildresults: (boolean) If true, invalidate any cached search. DEFAULT: Use cached search results if available.
  • deeptraversal: (boolean) If true, traverse sub folders. @todo NOT IMPLEMENTED YET.

Returns

array —

An array containing:

  • rows: An array of search results, limited by $query['range'].
  • status: The search store status code.
  • total: The total number of matches (not limited by $query['range']

sendMail()

sendMail(mixed  $rfc822, integer|boolean  $forward = false, integer|boolean  $reply = false, string  $parent = false, boolean  $save = true, \Horde_ActiveSync_Message_SendMail  $message = null) : boolean

Sends the email represented by the rfc822 string received by the PIM.

Parameters

mixed $rfc822

The rfc822 mime message, a string or stream resource.

integer|boolean $forward

The UID of the message, if forwarding or true if forwarding and EAS >= 14.0

integer|boolean $reply

The UID of the message if replying or true if replying and EAS >= 14.0

string $parent

The collection id of parent message if forwarding/replying.

boolean $save

Save in sent messages.

\Horde_ActiveSync_Message_SendMail $message

The entire message object for EAS 14+ requests. @since 2.5.0

Throws

\Horde_ActiveSync_Exception

Returns

boolean

setReadFlag()

setReadFlag(string  $folderId, string  $id, integer  $flags) 

Set the read (\seen) flag on the specified message.

Parameters

string $folderId

The folder id containing the message.

string $id

The message uid.

integer $flags

The value to set the flag to.

getSpecialFolderNameByType()

getSpecialFolderNameByType(string  $type) : string|boolean

Return the server id of the specified special folder type.

Parameters

string $type

The self::SPECIAL_* constant.

Returns

string|boolean —

The folder's server id or false on failure.

statMailMessage()

statMailMessage(string  $folderid, integer|array  $id) : array

Build a stat structure for an email message.

Parameters

string $folderid

The mailbox name.

integer|array $id

The message(s) to stat (IMAP UIDs).

Returns

array

getCurrentPolicy()

getCurrentPolicy(boolean|array  $device = false) : array

Return the security policies.

Parameters

boolean|array $device

The device information sent by EAS 14.1 set to false otherwise.

Returns

array —

An array of provisionable properties and values.

getProvisioning()

getProvisioning(\Horde_ActiveSync_Device  $device = null) : mixed

Returns the provisioning support for the current request.

Parameters

\Horde_ActiveSync_Device $device

The device object. @since 2.16.0

Returns

mixed —

The value of the provisiong support flag.

getSettings()

getSettings(array  $settings, \stdClass  $device) : array

Return settings from the backend for a SETTINGS request.

Parameters

array $settings

An array of settings to return. Currently supported:

  • oof: The out of office message information. @todo
  • userinformation: UserInformation requests.
    • emailaddresses: User's From email addresses.
    • primarysmtpaddress: (@deprecated) The SMTP address used for the default account. Only supported in EAS >= 14.1 using accounts.
    • status: EAS status code.
    • accounts: Array with each entry containing emailaddresses, fullname for additional identities. The primary address should be the first in the emailaddresses array.
\stdClass $device

The device to obtain settings for.

Returns

array —

The requested settings.

setSettings()

setSettings(array  $settings, \stdClass  $device) : array

Set backend settings from a SETTINGS request.

Parameters

array $settings

The settings to store. Currently supported:

  • oof: (array) The Out of Office message.
\stdClass $device

The device to store settings for.

Returns

array —

An array of status responses for each set request. e.g.,: array('oof' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS);

autoDiscover()

autoDiscover(array  $params = array()) : array

Attempt to autodiscover. Autodiscovery happens before the user is authenticated, and ALWAYS uses the user's email address. We have to do our best to translate email address to username. If this fails, the device simply falls back to requiring full user configuration.

Parameters

array $params

Optional array of parameters.

Returns

array —

Either an array of autodiscover parameters that the ActiveSync server will use to build the response, or the raw XML response contained in the raw_xml key.

getUsernameFromEmail()

getUsernameFromEmail(string  $email) : string

Attempt to guess a username based on the email address passed from EAS Autodiscover requests.

Parameters

string $email

The email address

Returns

string —

The username to use to authenticate to Horde with.

resolveRecipient()

resolveRecipient(string  $type, string  $search, array  $opts = array()) : array

Handle ResolveRecipient requests

Parameters

string $type

The type of recipient request. e.g., 'certificate'

string $search

The email to resolve.

array $opts

Any options required to perform the resolution.

  • maxcerts: (integer) The maximum number of certificates to return as provided by the client.
  • maxambiguous: (integer) The maximum number of ambiguous results. If set to zero, we MUST have an exact match.
  • starttime: (Horde_Date) The start time for the availability window if requesting AVAILABILITY.
  • endtime: (Horde_Date) The end of the availability window if requesting AVAILABILITY.
  • maxsize: (integer) The maximum size of any pictures. DEFAULT: 0 (No limit).
  • maxpictures: (integer) The maximum count of images to return. DEFAULT: - (No limit).
  • pictures: (boolean) Return pictures.

Returns

array —

An array of results containing any of the following:

  • type: (string) The type of result a GAL entry or personal address book entry. A Horde_ActiveSync::RESOLVE_RESULT constant.
  • displayname: (string) The display name of the contact.
  • emailaddress: (string) The emailaddress.
  • entries: (array) An array of certificates.
  • availability: (string) A EAS style FB string.
  • picture: (Horde_ActiveSync_Message_ResolveRecipientsPicture)

buildFbString()

buildFbString(\stdClass  $fb, \Horde_Date  $start, \Horde_Date  $end) : string

Build a EAS style FB string. Essentially, each digit represents 1/2 hour.

The values are as follows: 0 - Free 1 - Tentative 2 - Busy 3 - OOF 4 - No data available.

Though currently we only provide a Free/Busy/Unknown differentiation.

Parameters

\stdClass $fb

The fb information. An object containing:

  • s: The start of the period covered.
  • e: The end of the period covered.
  • b: An array of busy periods.
\Horde_Date $start

The start of the period requested by the client.

\Horde_Date $end

The end of the period requested by the client.

Returns

string —

The EAS freebusy string.

meetingResponse()

meetingResponse(array  $response) : string

Handle meeting responses.

Parameters

array $response

The response data. Contains:

  • requestid: The identifier of the meeting request. Used by the server to fetch the original meeting request details.
  • response: The user's response to the request. One of the response code constants.
  • folderid: The collection id that contains the meeting request.

Throws

\Horde_ActiveSync_Exception,

Horde_Exception_NotFound

Returns

string —

The UID of any created calendar entries, otherwise false.

createDeviceCallback()

createDeviceCallback(\Horde_ActiveSync_Device  $device) : boolean|integer

Callback method called before new device is created for a user. Allows final check of permissions.

Parameters

\Horde_ActiveSync_Device $device

Returns

boolean|integer —

True on success (device allowed to be created) or error code on failure.

deviceCallback()

deviceCallback(\Horde_ActiveSync_Device  $device) : boolean|integer

Callback that allows custom policy checking on the device before allowing it to connect. Useful for things like limiting the types of devices that can connect e.g., not allowing iOS devices etc.

.

Parameters

\Horde_ActiveSync_Device $device

The device object.

Returns

boolean|integer —

True on success (device allowed to be created) or error code on failure.

modifyDeviceCallback()

modifyDeviceCallback(\Horde_ActiveSync_Device  $device) : \Horde_ActiveSync_Device

Allow modification of device properties before request processing continues.

Parameters

\Horde_ActiveSync_Device $device

The device object.

Returns

\Horde_ActiveSync_Device —

The possibly modified device object.

getFreebusy()

getFreebusy(  $user, array  $options = array()) 

Request freebusy information from the server

Parameters

$user
array $options

getSyncStamp()

getSyncStamp(string  $collection, integer  $last = null) : integer|boolean

Return the SyncStamp - the value used to determine the end of the current sync range. If the collection backend supports modification sequences, we will use that, otherwise return the current timestamp.

Parameters

string $collection

The collection id we are currently requesting.

integer $last

The last syncstamp, if known. Used to help sanity check the state.

Returns

integer|boolean —

The SyncStamp or false if an error is encountered.

_getFolder()

_getFolder(string  $id, array  $params = array()) : \Horde_ActiveSync_Message_Folder

Factory for creating new Horde_ActiveSync_Message_Folder objects from within this class.

For BC reasons, we need to still accept the *_FOLDER_UID constants and they should represent folders that are multiplexed.

Parameters

string $id

The folder's server id.

array $params

Additional folder parameters:

  • class: The collection class, a HordeActiveSync::CLASS* constant
  • primary: This folder is the 'default' collection for this class.
  • display: The display name for FOLDER_TYPE_USER folders.

Throws

\Horde_ActiveSync_Exception

Returns

\Horde_ActiveSync_Message_Folder —

The folder object.

_parseFolderId()

_parseFolderId(string  $id, boolean  $checkEmail = false) : string|array

Parse a folderid.

Parameters

string $id

The folder id.

boolean $checkEmail

Verify $id is not an Email collection.

Returns

string|array —

A parsed folder array or HordeActiveSync::CLASS* constant.

_buildNonMailFolder()

_buildNonMailFolder(string  $id, \stirng  $parent, integer  $type, string  $name) : \Horde_ActiveSync_Message_Folder

Helper to build a folder object for non-email folders.

Parameters

string $id

The folder's server id.

\stirng $parent

The folder's parent id.

integer $type

The folder type.

string $name

The folder description.

Returns

\Horde_ActiveSync_Message_Folder —

The folder object.

_smartStatMessage()

_smartStatMessage(string  $folderid, string  $id, boolean  $hint) : \message

Stat a backend item, optionally using the cached value if available.

Parameters

string $folderid

The folder id

string $id

The message id

boolean $hint

Use the cached data, if available?

Returns

\message —

stat hash

_getMailFolders()

_getMailFolders() : array

Return the list of mail server folders.

Returns

array —

An array of Horde_ActiveSync_Message_Folder objects.

_buildDummyFolder()

_buildDummyFolder(  $id) 

Parameters

$id

_getMailFolder()

_getMailFolder(string  $sid, array  $fl, array  $f) : \Horde_ActiveSync_Message_Folder

Return a folder object representing an email folder. Attempt to detect special folders appropriately.

Parameters

string $sid

The server name.

array $fl

The complete folder list.

array $f

An array describing the folder.

Returns

\Horde_ActiveSync_Message_Folder

_searchMailbox()

_searchMailbox(array  $query) : array

Perform a search of the email store.

Parameters

array $query

A query array. @see self::getSearchResults()

Returns

array —

The results array. @see self::getSearchResults()

_searchGal()

_searchGal(array  $query) : array

Perform a search of the Global Address Book.

Parameters

array $query

A query array. @see self::getSearchResults()

Returns

array —

The results array. @see self::getSearchResults()

_endBuffer()

_endBuffer() 

End output buffering, log any unexpected output.

_mungeCert()

_mungeCert(string  $cert) : string

Removes the beginning/ending delimiters from the certificate.

Parameters

string $cert

The certificate text.

Returns

string —

The certificate text, with delimiters removed.

_getPolicyFromPerms()

_getPolicyFromPerms(boolean  $deviceinfo = false) : array

Return a policy array suitable for transforming into either wbxml or xml to send to the device in the provision response.

Parameters

boolean $deviceinfo

EAS 14.1 DEVICESETTINGS sent with PROVISION.

Returns

array

_getPolicyValue()

_getPolicyValue(  $policy,   $allowed) 

Parameters

$policy
$allowed

_getIdentityFromAddress()

_getIdentityFromAddress() : string

Return the current user's From/Reply_To address.

Returns

string —

A RFC822 valid email string.

_getMaillogChanges()

_getMaillogChanges(\Horde_ActiveSync_Folder_Imap  $folder, integer  $ts) : \Horde_ActiveSync_Folder_Imap

Get verb changes from the maillog.

Parameters

\Horde_ActiveSync_Folder_Imap $folder

The folder to search.

integer $ts

The timestamp to start from.

Returns

\Horde_ActiveSync_Folder_Imap —

The folder object, with any changes added accordingly.

_getLastVerb()

_getLastVerb(string  $mid) : array

Return the last verb executed for the specified Message-ID.

Parameters

string $mid

The Message-ID.

Returns

array —

The most recent history log entry array for $mid.