Constants

STATUS_SUCCESS

STATUS_SUCCESS

STATUS_VERSIONMISM

STATUS_VERSIONMISM

STATUS_KEYMISM

STATUS_KEYMISM

STATUS_PROTERROR

STATUS_PROTERROR

STATUS_SERVERERROR

STATUS_SERVERERROR

STATUS_INVALID

STATUS_INVALID

STATUS_CONFLICT

STATUS_CONFLICT

STATUS_NOTFOUND

STATUS_NOTFOUND

STATUS_FOLDERSYNC_REQUIRED

STATUS_FOLDERSYNC_REQUIRED

STATUS_REQUEST_INCOMPLETE

STATUS_REQUEST_INCOMPLETE

STATUS_INVALID_WAIT_HEARTBEAT

STATUS_INVALID_WAIT_HEARTBEAT

MAX_WINDOW_SIZE

MAX_WINDOW_SIZE

MAX_HEARTBEAT

MAX_HEARTBEAT

Properties

$_request

$_request : \Horde_Controller_Request_Http

Request object

Type

\Horde_Controller_Request_Http

$_provisioning

$_provisioning : integer

Whether we require provisioned devices.

Valid values are:

  • Horde_ActiveSync::PROVISIONING_FORCE: Accept ONLY provisioned devices
  • Horde_ActiveSync::PROVISIONING_LOOSE: Force provisioning if device supports provisioning, allow non-provisionable devices as well.
  • Horde_ActiveSync::PROVISIONING_NONE: Allow any device.

Type

integer

$_statusCode

$_statusCode : integer

Used to track what error code to send back to client on failure

Type

integer

$_activeSync

$_activeSync : \Horde_ActiveSync

ActiveSync server

Type

\Horde_ActiveSync

$_logger

$_logger : \Horde_Log_Logger

Logger

Type

\Horde_Log_Logger

$_procid

$_procid : integer

The procid

Type

integer

Methods

checkPolicyKey()

checkPolicyKey(string  $sentKey, string  $requestType = null) : boolean

Ensure the client's policy key is current.

Parameters

string $sentKey

The policykey sent to us by the client

string $requestType

The type of request we are handling. A Horde_ActiveSync constant.

Returns

boolean

setLogger()

setLogger(\Horde_Log_Logger  $logger) 

Set the logger.

Parameters

\Horde_Log_Logger $logger

handle()

handle() : boolean

Handle the request.

Returns

boolean

_parseSyncOptions()

_parseSyncOptions(array  $collection) 

Helper method to handle incoming OPTIONS nodes.

Parameters

array $collection

The current collection array.

_bodyPartPrefs()

_bodyPartPrefs(array  $options) 

Parse incoming BODYPARTPREFERENCE options.

Parameters

array $options

An array structure to parse the data into.

_bodyPrefs()

_bodyPrefs(  $options) 

Parse incoming BODYPREFERENCE options.

Parameters

$options

_rightsManagement()

_rightsManagement(  $collection) 

Parameters

$collection

_mimeSupport()

_mimeSupport(  $collection) 

Parameters

$collection

_cleanUpAfterPairing()

_cleanUpAfterPairing() 

Clean up after initial pairing. Initial pairing can happen either as a result of either a FOLDERSYNC or PROVISION command, depending on the device capabilities.

_requireProvisionWbxml()

_requireProvisionWbxml(string  $requestType, integer  $status) 

Send WBXML to indicate provisioning is required.

Parameters

string $requestType

The type of request we are handling.

integer $status

The reason we need to provision.

_handle()

_handle() : boolean

Handle the sync request

Throws

\Horde_ActiveSync_Exception

Returns

boolean

_sendOverWindowResponse()

_sendOverWindowResponse(  $collection) 

Parameters

$collection

_parseSyncFolders()

_parseSyncFolders() : boolean

Helper method for parsing incoming SYNC_FOLDERS nodes.

Throws

\Horde_ActiveSync_Exception

when an error cannot be handled gracefully, and thus not able to send status code to client.

Returns

boolean —

False if any errors were encountered and handled. Otherwise, true.

_parseSyncCommands()

_parseSyncCommands(array  $collection) : boolean

Handle incoming SYNC nodes

Parameters

array $collection

The current collection array.

Returns

boolean

_handleGlobalSyncError()

_handleGlobalSyncError(boolean  $limit = false) 

Helper for sending error status results.

Parameters

boolean $limit

Send the SYNC_LIMIT error if true.

_handleError()

_handleError(array  $collection) 

Helper for handling sync errors

Parameters

array $collection