Constants

STATUS_NOCHANGES

STATUS_NOCHANGES

STATUS_NEEDSYNC

STATUS_NEEDSYNC

STATUS_MISSING

STATUS_MISSING

STATUS_PROTERROR

STATUS_PROTERROR

STATUS_HBOUTOFBOUNDS

STATUS_HBOUTOFBOUNDS

STATUS_MAXFOLDERS

STATUS_MAXFOLDERS

STATUS_FOLDERSYNCREQD

STATUS_FOLDERSYNCREQD

STATUS_SERVERERROR

STATUS_SERVERERROR

PING

PING

STATUS

STATUS

HEARTBEATINTERVAL

HEARTBEATINTERVAL

FOLDERS

FOLDERS

FOLDER

FOLDER

SERVERENTRYID

SERVERENTRYID

FOLDERTYPE

FOLDERTYPE

MAXFOLDERS

MAXFOLDERS

VERSION

VERSION

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

$_pingSettings

$_pingSettings : array

The device's PING configuration (obtained from state)

Type

array

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

_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 a PING command from the client. PING is sent periodically by the client to tell the server what folders we are interested in monitoring for changes. If no changes are detected by the server during the 'heartbeat' interval, the server sends back a status of self::STATUS_NOCHANGES to indicate heartbeat expired and the client should re-issue the PING command. If a change has been found, the client is sent a self::STATUS_NEEDSYNC and should issue a SYNC command.

Returns

boolean

_checkHeartbeat()

_checkHeartbeat(integer  $lifetime) : integer

Validate the configured/requested heartbeat Will set self::_statusCode appropriately in case of an invalid interval.

Parameters

integer $lifetime

The heartbeat to verify

Returns

integer —

The valid heartbeat value to use.

_handleGlobalError()

_handleGlobalError() 

Helper for sending error status results.