Class Horde_ActiveSync_State_History
Horde_History based state management. Needs a number of SQL tables present:
syncStateTable (horde_activesync_state):
sync_time: timestamp of last sync
sync_key: the syncKey for the last sync
sync_data: If the last sync resulted in a MOREAVAILABLE, this contains
a list of UIDs that still need to be sent to the PIM. If
this sync_key represents a FOLDERSYNC state, then this
contains the current folder state on the PIM.
sync_devid: The device id.
sync_folderid: The folder id for this sync.
sync_user: The user for this synckey
syncMapTable (horde_activesync_map):
message_uid - The server uid for the object
sync_modtime - The time the change was received from the PIM and
applied to the server data store.
sync_key - The syncKey that was current at the time the change
was received.
sync_devid - The device id this change was done on.
sync_user - The user that initiated the change.
syncDeviceTable (horde_activesync_device):
device_id - The unique id for this device
device_type - The device type the PIM identifies itself with
device_agent - The user agent string sent by the device
device_policykey - The current policykey for this device
device_rwstatus - The current remote wipe status for this device
syncUsersTable (horde_activesync_device_users):
device_user - A username attached to the device
device_id - The device id
device_ping - The account's ping state
device_folders - Account's folder data
Copyright 2010-2012 Horde LLC (http://www.horde.org/)
- Horde_ActiveSync_State_Base
-
Horde_ActiveSync_State_History
Author: Michael J. Rubinsky mrubinsk@horde.org
Todo::
H5 This driver should be renamed to Horde_ActiveSync_State_Sql since the History related changes have been refactored out to a Core library.
Located at Horde/ActiveSync/State/History.php
public
Horde_ActiveSync_StateMachine_File
|
|
public
|
|
public
boolean
|
#
isConflict( array $stat, string $type )
Determines if the server version of the message represented by $stat conflicts with the PIM version of the message. For this driver, this is true whenever $lastSyncTime is older then $stat['mod']. Method is only called from the Importer during an import of a non-new change from the PIM. |
public
|
|
public
|
#
updateState( string $type, array $change, integer $origin =
Update the state to reflect changes |
public
boolean
|
#
setFolderData( object $device, array $folders )
Save folder data for a specific device. This is needed for BC with older activesync versions that use GETHIERARCHY requests to get the folder info instead of maintaining the folder state with FOLDERSYNC requests. |
public
mixed
|
|
public
array
|
#
getKnownFolders( )
Return an array of known folders. This is essentially the state for a FOLDERSYNC request. AS uses a seperate synckey for FOLDERSYNC requests also, so need to treat it as any other collection. |
public
The
|
#
initPingState( string $device )
Perform any initialization needed to deal with pingStates for this driver |
public
StdClass
|
#
loadDeviceInfo( string $devId, string $user )
Obtain the device object. For this driver, we also store the PING data in the device table. |
public
boolean
|
|
public
boolean
|
#
deviceExists( string $devId, string $user = null )
Check that a given device id is known to the server. This is regardless of Provisioning status. If $user is provided, checks that the device is attached to the provided username. |
public
array
|
|
public
integer
|
|
public
|
#
addPingCollections( array $collections )
Add a collection to the PING state. Ping state must already be loaded. |
public
|
#
loadPingCollectionState( array $pingCollection )
Load a specific collection's ping state. Ping state must already have been loaded. |
public
boolean
|
|
public
integer
|
|
public
|
|
public
array
|
|
public
|
|
public
|
#
resetAllPolicyKeys( )
Reset ALL device policy keys. Used when server policies have changed and you want to force ALL devices to pick up the changes. This will cause all devices that support provisioning to be reprovisioned. |
public
boolean
|
|
public
|
#
removeState( string $synckey = null, string $devId = null, string $user = null )
Explicitly remove a state from storage. |
public
string
|
#
isDuplicatePIMAddition( string $id )
Check and see that we didn't already see the incoming change from the PIM. This would happen e.g., if the PIM failed to receive the server response after successfully importing new messages. |
FILTERTYPE_1DAY,
FILTERTYPE_1MONTH,
FILTERTYPE_1WEEK,
FILTERTYPE_2WEEKS,
FILTERTYPE_3DAYS,
FILTERTYPE_3MONTHS,
FILTERTYPE_6MONTHS,
FILTERTYPE_ALL
|