Class SyncML_State

Description

The SyncML_State class provides a SyncML state object.

$Horde: framework/SyncML/SyncML/State.php,v 1.17.2.19 2009/04/07 11:12:54 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /SyncML/SyncML/State.php (line 25)


	
			
Variable Summary
Method Summary
 SyncML_State SyncML_State ( $sourceURI,  $user,  $sessionID)
 void getDevInfURI ()
 array getPendingSyncs ()
 void getProtocolName ()
 SyncML_Sync &getSync (string $target)
 array &getSyncs ()
 string getURI ()
 void getVerDTD ()
 void handleFinal ( &$output, [ $debug = false])
 boolean hasPendingSyncs ()
 boolean isAllSyncsComplete ()
 void setSync (string $target,  &$sync, SyncML_Sync $sync)
 void setVersion (integer $version)
Variables
boolean $authenticated = false (line 84)

Whether this session has authenticated successfully.

SyncML_SyncElement $curSyncItem (line 159)

Current sync element sent from client.

Stored in state if one element is split into multiple message packets.

boolean $delayedFinal = false (line 167)

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.

SyncML_DeviceInfo $deviceInfo (line 150)

Device info provided by the SyncML DevInf data.

integer $maxMsgSize = 1000000000 (line 121)

The maximum allowed message size in bytes.

  • todo: Change to PHP_INT_MAX.
integer $messageID (line 42)

Id of the current message.

array $serverChanges = array() (line 136)

The list of all server changes being sent to the client as a reference for Status responses from the client.

string $sessionID (line 35)

Id of this SyncML session.

This is not to confuse with the PHP session id, though it is part of the generated PHP session id.

string $sourceURI (line 61)

The source URI as sent by the client.

Can be used to identify the client and is part of the PHP session id.

string $targetURI (line 52)

The target URI as sent by the client.

This is normally the URL of the RPC server. However the client is free to send anything.

string $uriDevInf (line 105)

<DevInf> namespace uri.

string $uriMeta (line 98)

<Meta> namespace uri.

string $user (line 77)

Username used to authenticate with the backend.

integer $version (line 70)

SyncML protocol version.

  1. for SyncML 1.0, 1 for SyncML 1.1, etc.

boolean $wbxml = false (line 112)

Whether WBXML encoding is used.

string $_deviceDriver (line 143)

Name of the appropriate device driver.

array $_syncs = array() (line 128)

Array of SyncML_Sync objects.

string $_uri (line 91)

<SyncML> namespace uri.

Methods
Constructor SyncML_State (line 172)

Constructor.

SyncML_State SyncML_State ( $sourceURI,  $user,  $sessionID)
  • $sourceURI
  • $user
  • $sessionID
getDevice (line 280)

Returns a SyncML_Device instance for the device used in this session.

  • return: A SyncML_Device instance.
SyncML_Device getDevice ()
getDevInfURI (line 201)

Returns the DevInf URI based on the protocol version.

void getDevInfURI ()
getPendingSyncs (line 371)

Returns all syncs which have pending elements left.

  • return: Array of TargetLocURIs which can be used as a key in getSync() calls.
array getPendingSyncs ()
getProtocolName (line 216)

Returns the protocol name based on the protocol version.

void getProtocolName ()
getSync (line 327)
SyncML_Sync &getSync (string $target)
  • string $target
getSyncs (line 340)
array &getSyncs ()
getURI (line 262)

Returns the namespace URI for the <SyncML> element.

  • return: The namespace URI to use, if any.
string getURI ()
getVerDTD (line 186)

Returns the <DevInf><VerDTD> content based on the protocol version.

void getVerDTD ()
handleFinal (line 407)

Propagates final tags here and then further to every sync.

This allows the sync objects to determine if they are complete.

void handleFinal ( &$output, [ $debug = false])
  • &$output
  • $debug
hasPendingSyncs (line 353)

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.

  • return: True if there are pending elements that have yet to be sent.
boolean hasPendingSyncs ()
isAllSyncsComplete (line 390)

Returns whether all syncs are in completed state or no syncs are present.

  • return: True if all syncs are in completed state.
boolean isAllSyncsComplete ()
setSync (line 318)
void setSync (string $target,  &$sync, SyncML_Sync $sync)
setVersion (line 234)

Sets the protocol version

void setVersion (integer $version)
  • integer $version: The protocol version: 0 for SyncML 1.0, 1 for SyncML 1.1 etc.

Documentation generated on Sun, 30 Jan 2011 05:22:20 +0000 by phpDocumentor 1.4.3