Back to index

d-push  2.0
Public Member Functions
IBackend Interface Reference
Inheritance diagram for IBackend:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GetStateMachine ()
 Returns a IStateMachine implementation used to save states.
 GetSearchProvider ()
 Returns a ISearchProvider implementation used for searches.
 GetSupportedASVersion ()
 Indicates which AS version is supported by the backend.
 Logon ($username, $domain, $password)
 Authenticates the user.
 Setup ($store, $checkACLonly=false, $folderid=false)
 Setup the backend to work on a specific store or checks ACLs there.
 Logoff ()
 Logs off non critical operations closing the session should be done here.
 GetHierarchy ()
 Returns an array of SyncFolder types with the entire folder hierarchy on the server (the array itself is flat, but refers to parents via the 'parent' property.
 GetImporter ($folderid=false)
 Returns the importer to process changes from the mobile If no $folderid is given, hierarchy data will be imported With a $folderid a content data will be imported.
 GetExporter ($folderid=false)
 Returns the exporter to send changes to the mobile If no $folderid is given, hierarchy data should be exported With a $folderid a content data is expected.
 SendMail ($sm)
 Sends an e-mail This messages needs to be saved into the 'sent items' folder.
 Fetch ($folderid, $id, $contentparameters)
 Returns all available data of a single message.
 GetWasteBasket ()
 Returns the waste basket.
 GetAttachmentData ($attname)
 Returns the content of the named attachment as stream.
 EmptyFolder ($folderid, $includeSubfolders=true)
 Deletes all contents of the specified folder.
 MeetingResponse ($requestid, $folderid, $response)
 Processes a response to a meeting request.
 HasChangesSink ()
 Indicates if the backend has a ChangesSink.
 ChangesSinkInitialize ($folderid)
 The folder should be considered by the sink.
 ChangesSink ($timeout=30)
 The actual ChangesSink.
 Settings ($settings)
 Applies settings to and gets informations from the device.

Detailed Description

Definition at line 48 of file ibackend.php.


Member Function Documentation

IBackend::ChangesSink ( timeout = 30)

The actual ChangesSink.

For max. the $timeout value this method should block and if no changes are available return an empty array. If changes are available a list of folderids is expected.

Parameters:
int$timeoutmax. amount of seconds to block

public

Returns:
array

Implemented in BackendZarafa, BackendIMAP, and Backend.

The folder should be considered by the sink.

Folders which were not initialized should not result in a notification of IBacken->ChangesSink().

Parameters:
string$folderidpublic
Returns:
boolean false if there is any problem with that folder

Implemented in BackendZarafa, BackendIMAP, and Backend.

IBackend::EmptyFolder ( folderid,
includeSubfolders = true 
)

Deletes all contents of the specified folder.

This is generally used to empty the trash (wastebasked), but could also be used on any other folder.

Parameters:
string$folderid
boolean$includeSubfolders(opt) also delete sub folders, default true

public

Returns:
boolean
Exceptions:
StatusException

Implemented in BackendZarafa, and Backend.

IBackend::Fetch ( folderid,
id,
contentparameters 
)

Returns all available data of a single message.

Parameters:
string$folderid
string$id
ContentParameters$contentparametersflag

public

Returns:
object(SyncObject)
Exceptions:
StatusException

Implemented in BackendZarafa, BackendCombined, and BackendDiff.

Returns the content of the named attachment as stream.

The passed attachment identifier is the exact string that is returned in the 'AttName' property of an SyncAttachment. Any information necessary to locate the attachment must be encoded in that 'attname' property. Data is written directly - 'print $data;'

Parameters:
string$attnamepublic
Returns:
SyncItemOperationsAttachment
Exceptions:
StatusException

Implemented in BackendKolab, BackendZarafa, BackendIMAP, BackendCombined, BackendMaildir, and BackendVCardDir.

IBackend::GetExporter ( folderid = false)

Returns the exporter to send changes to the mobile If no $folderid is given, hierarchy data should be exported With a $folderid a content data is expected.

Parameters:
string$folderid(opt)

public

Returns:
object implements IExportChanges
Exceptions:
StatusException

Implemented in BackendZarafa, BackendCombined, and BackendDiff.

Returns an array of SyncFolder types with the entire folder hierarchy on the server (the array itself is flat, but refers to parents via the 'parent' property.

provides AS 1.0 compatibility

public

Returns:
array SYNC_FOLDER

Implemented in BackendZarafa, BackendCombined, and BackendDiff.

IBackend::GetImporter ( folderid = false)

Returns the importer to process changes from the mobile If no $folderid is given, hierarchy data will be imported With a $folderid a content data will be imported.

Parameters:
string$folderid(opt)

public

Returns:
object implements IImportChanges
Exceptions:
StatusException

Implemented in BackendZarafa, BackendCombined, and BackendDiff.

Returns a ISearchProvider implementation used for searches.

public

Returns:
object Implementation of ISearchProvider

Implemented in BackendZarafa, and Backend.

Returns a IStateMachine implementation used to save states.

public

Returns:
boolean/object if false is returned, the default Statemachine is used else the implementation of IStateMachine

Implemented in BackendZarafa, and Backend.

Indicates which AS version is supported by the backend.

Depending on this value the supported AS version announced to the mobile device is set.

public

Returns:
string AS version constant

Implemented in BackendZarafa, and Backend.

Returns the waste basket.

The waste basked is used when deleting items; if this function returns a valid folder ID, then all deletes are handled as moves and are sent to the backend as a move. If it returns FALSE, then deletes are handled as real deletes

public

Returns:
string

Implemented in BackendZarafa, BackendIMAP, BackendKolab, BackendCombined, BackendMaildir, and BackendVCardDir.

Indicates if the backend has a ChangesSink.

A sink is an active notification mechanism which does not need polling.

public

Returns:
boolean

Implemented in BackendZarafa, BackendIMAP, and Backend.

Logs off non critical operations closing the session should be done here.

public

Returns:
boolean

Implemented in BackendZarafa, BackendCombined, BackendIMAP, BackendKolab, BackendMaildir, and BackendVCardDir.

IBackend::Logon ( username,
domain,
password 
)

Authenticates the user.

Parameters:
string$username
string$domain
string$passwordpublic
Returns:
boolean
Exceptions:
FatalExceptione.g. some required libraries are unavailable

Implemented in BackendZarafa, BackendCombined, BackendIMAP, BackendMaildir, BackendVCardDir, and BackendKolab.

IBackend::MeetingResponse ( requestid,
folderid,
response 
)

Processes a response to a meeting request.

CalendarID is a reference and has to be set if a new calendar item is created

Parameters:
string$requestidid of the object containing the request
string$folderidid of the parent folder of $requestid
string$responsepublic
Returns:
string id of the created/updated calendar obj
Exceptions:
StatusException

Implemented in BackendZarafa, BackendCombined, and BackendDiff.

IBackend::SendMail ( sm)

Sends an e-mail This messages needs to be saved into the 'sent items' folder.

Basically two things can be done 1) Send the message to an SMTP server as-is 2) Parse the message, and send it some other way

Parameters:
SyncSendMail$smSyncSendMail object

public

Returns:
boolean
Exceptions:
StatusException

Implemented in BackendZarafa, BackendCombined, BackendIMAP, BackendMaildir, and BackendVCardDir.

IBackend::Settings ( settings)

Applies settings to and gets informations from the device.

Parameters:
SyncObject$settings(SyncOOF or SyncUserInformation possible)

public

Returns:
SyncObject $settings

Implemented in BackendZarafa, and Backend.

IBackend::Setup ( store,
checkACLonly = false,
folderid = false 
)

Setup the backend to work on a specific store or checks ACLs there.

If only the $store is submitted, all Import/Export/Fetch/Etc operations should be performed on this store (switch operations store). If the ACL check is enabled, this operation should just indicate the ACL status on the submitted store, without changing the store for operations. For the ACL status, the currently logged on user MUST have access rights on

  • the entire store - admin access if no folderid is sent, or
  • on a specific folderid in the store (secretary/full access rights)

The ACLcheck MUST fail if a folder of the authenticated user is checked!

Parameters:
string$storetarget store, could contain a "domain\user" value
boolean$checkACLonlyif set to true, Setup() should just check ACLs
string$folderidif set, only ACLs on this folderid are relevant

public

Returns:
boolean

Implemented in BackendZarafa, BackendCombined, BackendKolab, and BackendDiff.


The documentation for this interface was generated from the following file: