PHP Class Horde_SyncMl_State, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Anthony Mills ([email protected])
Author: Jan Schneider ([email protected])
Datei anzeigen Open project: horde/horde

Public Properties

Property Type Description
$authenticated boolean Whether this session has authenticated successfully.
$curSyncItem Horde_SyncMl_SyncElement Stored in state if one element is split into multiple message packets.
$delayedFinal boolean Flag that is set if the client sends a Final but we are not finished with the current package and thus can't final this package yet.
$deviceInfo Horde_SyncMl_DeviceInfo Device info provided by the SyncML DevInf data.
$maxMsgSize integer The maximum allowed message size in bytes.
$maxObjSize integer The maximum allowed object size in bytes.
$messageID integer Id of the current message.
$serverChanges array The list of all server changes being sent to the client as a reference for Status responses from the client.
$sessionID string This is not to confuse with the PHP session id, though it is part of the generated PHP session id.
$sourceURI string Can be used to identify the client and is part of the PHP session id.
$targetURI string This is normally the URL of the RPC server. However the client is free to send anything.
$uriDevInf string namespace uri.
$uriMeta string namespace uri.
$user string Username used to authenticate with the backend.
$version integer 0 for SyncML 1.0, 1 for SyncML 1.1, etc.
$wbxml boolean Whether WBXML encoding is used.

Protected Properties

Property Type Description
$_deviceDriver string Name of the appropriate device driver.
$_syncs array Array of Horde_SyncMl_Sync objects.
$_uri string namespace uri.

Public Methods

Method Description
__construct ( $sourceURI, $user, $sessionID ) Constructor.
getDevInfURI ( ) Returns the DevInf URI based on the protocol version.
getDevice ( ) : Horde_SyncMl_Device Returns a Horde_SyncMl_Device instance for the device used in this session.
getPendingSyncs ( ) : array Returns all syncs which have pending elements left.
getProtocolName ( ) Returns the protocol name based on the protocol version.
getSync ( string $target ) : Horde_SyncMl_Sync
getSyncs ( ) : array
getURI ( ) : string Returns the namespace URI for the element.
getVerDTD ( ) Returns the content based on the protocol version.
handleFinal ( &$output, $debug = false ) Propagates final tags here and then further to every sync.
hasPendingSyncs ( ) : boolean Returns whether there are any pending elements that have not been sent to due to message size restrictions. These will be sent int the next message.
isAllSyncsComplete ( ) : boolean Returns whether all syncs are in completed state or no syncs are present.
setSync ( string $target, Horde_SyncMl_Sync $sync )
setVersion ( integer $version ) Sets the protocol version

Method Details

__construct() public method

Constructor.
public __construct ( $sourceURI, $user, $sessionID )

getDevInfURI() public method

Returns the DevInf URI based on the protocol version.
public getDevInfURI ( )

getDevice() public method

Returns a Horde_SyncMl_Device instance for the device used in this session.
public getDevice ( ) : Horde_SyncMl_Device
return Horde_SyncMl_Device A Horde_SyncMl_Device instance.

getPendingSyncs() public method

Returns all syncs which have pending elements left.
public getPendingSyncs ( ) : array
return array Array of TargetLocURIs which can be used as a key in getSync() calls.

getProtocolName() public method

Returns the protocol name based on the protocol version.
public getProtocolName ( )

getSync() public method

public getSync ( string $target ) : Horde_SyncMl_Sync
$target string
return Horde_SyncMl_Sync

getSyncs() public method

public getSyncs ( ) : array
return array

getURI() public method

Returns the namespace URI for the element.
public getURI ( ) : string
return string The namespace URI to use, if any.

getVerDTD() public method

Returns the content based on the protocol version.
public getVerDTD ( )

handleFinal() public method

This allows the sync objects to determine if they are complete.
public handleFinal ( &$output, $debug = false )

hasPendingSyncs() public method

Returns whether there are any pending elements that have not been sent to due to message size restrictions. These will be sent int the next message.
public hasPendingSyncs ( ) : boolean
return boolean True if there are pending elements that have yet to be sent.

isAllSyncsComplete() public method

Returns whether all syncs are in completed state or no syncs are present.
public isAllSyncsComplete ( ) : boolean
return boolean True if all syncs are in completed state.

setSync() public method

public setSync ( string $target, Horde_SyncMl_Sync $sync )
$target string
$sync Horde_SyncMl_Sync

setVersion() public method

Sets the protocol version
public setVersion ( integer $version )
$version integer The protocol version: 0 for SyncML 1.0, 1 for SyncML 1.1 etc.

Property Details

$_deviceDriver protected_oe property

Name of the appropriate device driver.
protected string $_deviceDriver
return string

$_syncs protected_oe property

Array of Horde_SyncMl_Sync objects.
protected array $_syncs
return array

$_uri protected_oe property

namespace uri.
protected string $_uri
return string

$authenticated public_oe property

Whether this session has authenticated successfully.
public bool $authenticated
return boolean

$curSyncItem public_oe property

Stored in state if one element is split into multiple message packets.
public Horde_SyncMl_SyncElement $curSyncItem
return Horde_SyncMl_SyncElement

$delayedFinal public_oe property

Flag that is set if the client sends a Final but we are not finished with the current package and thus can't final this package yet.
public bool $delayedFinal
return boolean

$deviceInfo public_oe property

Device info provided by the SyncML DevInf data.
public Horde_SyncMl_DeviceInfo $deviceInfo
return Horde_SyncMl_DeviceInfo

$maxMsgSize public_oe property

The maximum allowed message size in bytes.
public int $maxMsgSize
return integer

$maxObjSize public_oe property

The maximum allowed object size in bytes.
public int $maxObjSize
return integer

$messageID public_oe property

Id of the current message.
public int $messageID
return integer

$serverChanges public_oe property

The list of all server changes being sent to the client as a reference for Status responses from the client.
public array $serverChanges
return array

$sessionID public_oe property

This is not to confuse with the PHP session id, though it is part of the generated PHP session id.
public string $sessionID
return string

$sourceURI public_oe property

Can be used to identify the client and is part of the PHP session id.
public string $sourceURI
return string

$targetURI public_oe property

This is normally the URL of the RPC server. However the client is free to send anything.
public string $targetURI
return string

$uriDevInf public_oe property

namespace uri.
public string $uriDevInf
return string

$uriMeta public_oe property

namespace uri.
public string $uriMeta
return string

$user public_oe property

Username used to authenticate with the backend.
public string $user
return string

$version public_oe property

0 for SyncML 1.0, 1 for SyncML 1.1, etc.
public int $version
return integer

$wbxml public_oe property

Whether WBXML encoding is used.
public bool $wbxml
return boolean