\Horde_ActiveSync_Connector_Importer

Horde_ActiveSync_Connector_Imports:: Receives Wbxml from device.

Summary

Methods
Properties
Constants
__construct()
init()
setLogger()
importMessageChange()
importMessageDeletion()
importMessageReadFlag()
importMessageMove()
importFolderChange()
importFolderDeletion()
No public properties found
No constants found
_isConflict()
$_state
$_as
$_flags
$_folderId
$_folderUid
$_logger
$_procid
N/A
No private methods found
No private properties found
N/A

Properties

$_flags

$_flags : integer

Conflict resolution flags

Type

integer

$_folderId

$_folderId : string

The backend specific folder id

Type

string

$_folderUid

$_folderUid : string

The EAS folder uid

Type

string

$_logger

$_logger : \Horde_Log_Logger

Logger

Type

\Horde_Log_Logger

$_procid

$_procid : integer

Process id for logging.

Type

integer

Methods

__construct()

__construct(\Horde_ActiveSync  $as) 

Const'r

Parameters

\Horde_ActiveSync $as

The server object.

init()

init(\Horde_ActiveSync_State_Base  $state, string  $folderId = null, integer  $flags) 

Initialize the importer for this collection

Parameters

\Horde_ActiveSync_State_Base $state

The state machine.

string $folderId

The collection's uid.

integer $flags

Conflict resolution flags.

setLogger()

setLogger(\Horde_Log_Logger  $logger) 

Setter for a logger instance

Parameters

\Horde_Log_Logger $logger

The logger

importMessageChange()

importMessageChange(string|boolean  $id, \Horde_ActiveSync_Message_Base  $message, \Horde_ActiveSync_Device  $device, integer  $clientid, string  $class = false, string  $synckey = false) : array|boolean

Import a message change from the wbxml stream

Parameters

string|boolean $id

A server message id or false if a new message.

\Horde_ActiveSync_Message_Base $message

A message object

\Horde_ActiveSync_Device $device

A device descriptor

integer $clientid

Client id sent from client. on message addition.

string $class

The collection class - needed for SMS since the actual serverid will be for an email folder. @since 2.6.0

string $synckey

The synckey currently being processed when processing a SYNC_MODIFY command. @since 2.31.0

Returns

array|boolean —

A stat array, or an array containing the 'error' key on error, or false on duplicate addition.

importMessageDeletion()

importMessageDeletion(array  $ids, string  $class, boolean  $instanceids = false) : array

Import message deletions. This may conflict if the local object has been modified.

Parameters

array $ids

Server message uids to delete

string $class

The server collection class.

boolean $instanceids

If true, $ids is a hash of instanceids => uids. @since 2.31.0

Returns

array —

An array containing ids of successfully deleted messages.

importMessageReadFlag()

importMessageReadFlag(integer  $id, string  $flag) 

Import a change in 'read' flags. This can never conflict.

Parameters

integer $id

Server message id (The IMAP UID).

string $flag

The state of the /seen flag

importMessageMove()

importMessageMove(array  $uids, string  $dst, string  $class = null) : array

Perform a message move initiated on the clinet.

Parameters

array $uids

The source message ids.

string $dst

The destination folder uid.

string $class

The collection class (only needed for SMS). @since 2.10.0

Returns

array —

An array containing the following keys:

  • results: An array with old uids as keys and new uids as values.
  • missing: An array containing source uids that were not found on the IMAP server.

importFolderChange()

importFolderChange(string  $uid, string  $displayname, string  $parent = \Horde_ActiveSync::FOLDER_ROOT, integer  $type = null) : \Horde_ActiveSync_Message_Folder

Import a folder change from the wbxml stream

Parameters

string $uid

The folder uid

string $displayname

The folder display name

string $parent

The parent folder id.

integer $type

The EAS Folder type. @since 2.9.0

Returns

\Horde_ActiveSync_Message_Folder

The new folder object.

importFolderDeletion()

importFolderDeletion(string  $uid, string  $parent = \Horde_ActiveSync::FOLDER_ROOT) 

Imports a folder deletion from the client.

Parameters

string $uid

The folder uid

string $parent

The folder id of the parent folder.

_isConflict()

_isConflict(string  $type, string  $folderid, string  $id) : boolean

Check if this change conflicts with server changes This is only true in the following situations:

Changed here and changed there Changed here and deleted there Deleted here and changed there

Any other combination of operations can be done (e.g. change flags & move or move & delete)

Parameters

string $type

The type of change('change', 'delete' etc...)

string $folderid

The id of the folder this change is from.

string $id

The uid for the changed message.

Returns

boolean