Documentation

Horde_ActiveSync_Connector_Importer
in package

Horde_ActiveSync_Connector_Imports:: Receives Wbxml from device.

Tags
license

http://www.horde.org/licenses/gpl GPLv2

copyright

2011-2020 Horde LLC (http://www.horde.org)

author

Michael J Rubinsky mrubinsk@horde.org

Table of Contents

$_as  : Horde_ActiveSync
The server object.
$_flags  : int
Conflict resolution flags
$_folderId  : string
The backend specific folder id
$_folderUid  : string
The EAS folder uid
$_logger  : Horde_Log_Logger
Logger
$_procid  : int
Process id for logging.
$_state  : Horde_ActiveSync_State_Base
State machine
__construct()  : mixed
Const'r
importFolderChange()  : Horde_ActiveSync_Message_Folder
Import a folder change from the wbxml stream
importFolderDeletion()  : mixed
Imports a folder deletion from the client.
importMessageChange()  : array<string|int, mixed>|bool
Import a message change from the wbxml stream
importMessageDeletion()  : array<string|int, mixed>
Import message deletions. This may conflict if the local object has been modified.
importMessageMove()  : array<string|int, mixed>
Perform a message move initiated on the clinet.
importMessageReadFlag()  : mixed
Import a change in 'read' flags. This can never conflict.
init()  : mixed
Initialize the importer for this collection
setLogger()  : mixed
Setter for a logger instance
_isConflict()  : bool
Check if this change conflicts with server changes This is only true in the following situations:

Properties

$_flags

Conflict resolution flags

protected int $_flags

$_folderId

The backend specific folder id

protected string $_folderId

$_folderUid

The EAS folder uid

protected string $_folderUid

$_logger

Logger

protected Horde_Log_Logger $_logger

$_procid

Process id for logging.

protected int $_procid

Methods

importFolderChange()

Import a folder change from the wbxml stream

public importFolderChange(string $uid, string $displayname[, string $parent = Horde_ActiveSync::FOLDER_ROOT ][, int $type = null ]) : Horde_ActiveSync_Message_Folder
Parameters
$uid : string

The folder uid

$displayname : string

The folder display name

$parent : string = Horde_ActiveSync::FOLDER_ROOT

The parent folder id.

$type : int = null

The EAS Folder type. @since 2.9.0

Return values
Horde_ActiveSync_Message_Folder

The new folder object.

importFolderDeletion()

Imports a folder deletion from the client.

public importFolderDeletion(string $uid[, string $parent = Horde_ActiveSync::FOLDER_ROOT ]) : mixed
Parameters
$uid : string

The folder uid

$parent : string = Horde_ActiveSync::FOLDER_ROOT

The folder id of the parent folder.

Return values
mixed

importMessageChange()

Import a message change from the wbxml stream

public importMessageChange(string|bool $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device, int $clientid[, string $class = false ][, string $synckey = false ]) : array<string|int, mixed>|bool
Parameters
$id : string|bool

A server message id or false if a new message.

$message : Horde_ActiveSync_Message_Base

A message object

$device : Horde_ActiveSync_Device

A device descriptor

$clientid : int

Client id sent from client. on message addition.

$class : string = false

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

$synckey : string = false

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

Tags
todo

Revisit passing $class for SMS. Probably pass class in the const'r.

Return values
array<string|int, mixed>|bool

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

importMessageDeletion()

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

public importMessageDeletion(array<string|int, mixed> $ids, string $class[, bool $instanceids = false ]) : array<string|int, mixed>
Parameters
$ids : array<string|int, mixed>

Server message uids to delete

$class : string

The server collection class.

$instanceids : bool = false

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

Return values
array<string|int, mixed>

An array containing ids of successfully deleted messages.

importMessageMove()

Perform a message move initiated on the clinet.

public importMessageMove(array<string|int, mixed> $uids, string $dst[, string $class = null ]) : array<string|int, mixed>
Parameters
$uids : array<string|int, mixed>

The source message ids.

$dst : string

The destination folder uid.

$class : string = null

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

Return values
array<string|int, mixed>

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.

importMessageReadFlag()

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

public importMessageReadFlag(int $id, string $flag) : mixed
Parameters
$id : int

Server message id (The IMAP UID).

$flag : string

The state of the /seen flag

Return values
mixed

init()

Initialize the importer for this collection

public init(Horde_ActiveSync_State_Base $state[, string $folderId = null ], int $flags) : mixed
Parameters
$state : Horde_ActiveSync_State_Base

The state machine.

$folderId : string = null

The collection's uid.

$flags : int

Conflict resolution flags.

Return values
mixed

setLogger()

Setter for a logger instance

public setLogger(Horde_Log_Logger $logger) : mixed
Parameters
$logger : Horde_Log_Logger

The logger

Return values
mixed

_isConflict()

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

protected _isConflict(string $type, string $folderid, string $id) : bool

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
$type : string

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

$folderid : string

The id of the folder this change is from.

$id : string

The uid for the changed message.

Return values
bool

Search results