source: contrib/z-push/backend/backend.php @ 4898

Revision 4898, 2.5 KB checked in by thiagoaos, 13 years ago (diff)

Ticket #2180 - Adicionado código fonte completo do zpush

Line 
1<?php
2/***********************************************
3* File      :   backend.php
4* Project   :   Z-Push
5* Descr     :   This is what C++ people
6*               (and PHP5) would call an
7*               abstract class. All backend
8*               modules should adhere to this
9*               specification. All communication
10*               with this module is done via
11*               the Sync* object types, the
12*               backend module itself is
13*               responsible for converting any
14*               necessary types and formats.
15*
16*               If you wish to implement a new
17*               backend, all you need to do is
18*               to subclass the following class,
19*               and place the subclassed file in
20*               the backend/ directory. You can
21*               then use your backend by
22*               specifying it in the config.php file
23*
24*
25* Created   :   01.10.2007
26*
27* ᅵ Zarafa Deutschland GmbH, www.zarafaserver.de
28* This file is distributed under GPL v2.
29* Consult LICENSE file for details
30************************************************/
31
32define('EXPORT_HIERARCHY', 1);
33define('EXPORT_CONTENTS', 2);
34
35define('BACKEND_DISCARD_DATA', 1);
36
37class ImportContentsChanges {
38    function ImportMessageChange($message) {}
39
40    function ImportMessageDeletion($message) {}
41
42    function ImportMessageReadStateChange($message) {}
43
44    function ImportMessageMove($message) {}
45};
46
47class ImportHierarchyChanges {
48    function ImportFolderChange($folder) {}
49
50    function ImportFolderDeletion($folder) {}
51};
52
53class ExportChanges {
54    // Exports (returns) changes since '$synckey' as an array of Sync* objects. $flags
55    // can be EXPORT_HIERARCHY or EXPORT_CONTENTS. $restrict contains the restriction on which
56    // messages should be filtered. Synckey is updated via reference (!)
57    function ExportChanges($importer, $folderid, $restrict, $syncstate, $flags) {}
58};
59
60class Backend {
61    var $hierarchyimporter;
62    var $contentsimporter;
63    var $exporter;
64
65    // Returns TRUE if the logon succeeded, FALSE if not
66    function Logon($username, $domain, $password) {}
67
68    // called before closing connection
69    function Logoff() {}
70
71    // Returns an array of SyncFolder types for the entire folder hierarchy
72    // on the server (the array itself is flat, but refers to parents via the 'parent'
73    // property)
74    function GetHierarchy() {}
75
76    // Called when a message has to be sent and the message needs to be saved to the 'sent items'
77    // folder
78    function SendMail($rfc822, $forward = false, $reply = false, $parent = false) {}
79};
80
81?>
Note: See TracBrowser for help on using the repository browser.