Overview

Packages

  • None
  • SyncMl

Classes

  • Horde_SyncMl
  • Horde_SyncMl_Backend
  • Horde_SyncMl_Backend_Horde
  • Horde_SyncMl_Command
  • Horde_SyncMl_Command_Alert
  • Horde_SyncMl_Command_Final
  • Horde_SyncMl_Command_Get
  • Horde_SyncMl_Command_Map
  • Horde_SyncMl_Command_Put
  • Horde_SyncMl_Command_Replace
  • Horde_SyncMl_Command_Results
  • Horde_SyncMl_Command_Status
  • Horde_SyncMl_Command_Sync
  • Horde_SyncMl_Command_SyncHdr
  • Horde_SyncMl_ContentHandler
  • Horde_SyncMl_DataStore
  • Horde_SyncMl_Device
  • Horde_SyncMl_Device_Nokia
  • Horde_SyncMl_Device_P800
  • Horde_SyncMl_Device_sync4j
  • Horde_SyncMl_Device_Sync4JMozilla
  • Horde_SyncMl_Device_Synthesis
  • Horde_SyncMl_DeviceInfo
  • Horde_SyncMl_Property
  • Horde_SyncMl_PropertyParameter
  • Horde_SyncMl_State
  • Horde_SyncMl_Sync
  • Horde_SyncMl_SyncElement
  • Horde_SyncMl_Translation
  • Horde_SyncMl_XmlOutput
  • Overview
  • Package
  • Class
  • Tree

Class Horde_SyncMl_Sync

Copyright 2003-2012 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.

Package: SyncMl
Author: Anthony Mills amills@pyramid6.com
Located at Horde/SyncMl/Sync.php
Methods summary
public
# __construct( string $syncType, string $serverURI, string $clientURI, integer $serverAnchorLast, integer $serverAnchorNext, string $clientAnchorNext )

Parameters

$syncType
$serverURI
$clientURI
$serverAnchorLast
$serverAnchorNext
$clientAnchorNext
public
# handleClientSyncItem( mixed & $output, Horde_SyncMl_SyncElement & $item )

Here's where the actual processing of a client-sent Sync Item takes place. Entries are added, deleted or replaced from the server database by using backend API calls.

Here's where the actual processing of a client-sent Sync Item takes place. Entries are added, deleted or replaced from the server database by using backend API calls.

Parameters

$output
$item
public
# createSyncOutput( mixed & $output )

Creates a output containing the server changes.

Creates a output containing the server changes.

public
# handleFinal( mixed & $output, mixed $debug = false )

Notifies the sync that a final has been received by the client.

Notifies the sync that a final has been received by the client.

Depending on the current state of the sync this can mean various things: a) Init phase (Alerts) done. Next package contaings actual syncs. b) Sync sending from client done. Next package are maps (or finish or finish if ONE_WAY_FROM_CLIENT sync c) Maps finished, completly done.

public
# hasPendingElements( )

Returns true if there are still outstanding server sync items to be sent to the client.

Returns true if there are still outstanding server sync items to be sent to the client.

This is the case if the MaxMsgSize has been reached and the pending elements are to be sent in another message.

public
# addSyncReceived( )
public
# getSyncsReceived( )
public
# isComplete( )
public
# closeSync( )

Completes a sync once everything is done: store the sync anchors so the next sync can be a delta sync and produce some debug info.

Completes a sync once everything is done: store the sync anchors so the next sync can be a delta sync and produce some debug info.

public
# getServerLocURI( )
public
# getClientLocURI( )
public
# getClientAnchorNext( )
public
# getServerAnchorNext( )
public
# getServerAnchorLast( )
public
# createUidMap( mixed $databaseURI, mixed $cuid, mixed $suid )
public string
# getServerChange( string $change, string $id )

Returns the client ID of server change identified by the change type and server ID.

Returns the client ID of server change identified by the change type and server ID.

Parameters

$change
The change type (add, replace, delete).
$id
The object's server UID.

Returns

string
The matching client ID or null if none found.
public
# setServerChange( string $change, string $sid, string $cid )

Sets the client ID of server change identified by the change type and server ID.

Sets the client ID of server change identified by the change type and server ID.

Parameters

$change
The change type (add, replace, delete).
$sid
The object's server UID.
$cid
The object's client UID.
public
# unsetServerChange( string $change, string $id )

Unsets the server-client-map of server change identified by the change type and server ID.

Unsets the server-client-map of server change identified by the change type and server ID.

Parameters

$change
The change type (add, replace, delete).
$id
The object's server UID.
Constants summary
integer STATE_INIT

See

Horde_SyncMl_Sync::_state
# 0
integer STATE_SYNC
# 1
integer STATE_MAP
# 2
integer STATE_COMPLETED
# 3
API documentation generated by ApiGen