[7589] | 1 | <?php |
---|
| 2 | /*********************************************** |
---|
| 3 | * File : iimportchanges.php |
---|
| 4 | * Project : Z-Push |
---|
| 5 | * Descr : IImportChanges interface. It's responsible for |
---|
| 6 | * importing (receiving) data, content and hierarchy changes. |
---|
| 7 | * This interface extends the IChanges interface. |
---|
| 8 | * |
---|
| 9 | * Created : 02.01.2012 |
---|
| 10 | * |
---|
| 11 | * Copyright 2007 - 2012 Zarafa Deutschland GmbH |
---|
| 12 | * |
---|
| 13 | * This program is free software: you can redistribute it and/or modify |
---|
| 14 | * it under the terms of the GNU Affero General Public License, version 3, |
---|
| 15 | * as published by the Free Software Foundation with the following additional |
---|
| 16 | * term according to sec. 7: |
---|
| 17 | * |
---|
| 18 | * According to sec. 7 of the GNU Affero General Public License, version 3, |
---|
| 19 | * the terms of the AGPL are supplemented with the following terms: |
---|
| 20 | * |
---|
| 21 | * "Zarafa" is a registered trademark of Zarafa B.V. |
---|
| 22 | * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH |
---|
| 23 | * The licensing of the Program under the AGPL does not imply a trademark license. |
---|
| 24 | * Therefore any rights, title and interest in our trademarks remain entirely with us. |
---|
| 25 | * |
---|
| 26 | * However, if you propagate an unmodified version of the Program you are |
---|
| 27 | * allowed to use the term "Z-Push" to indicate that you distribute the Program. |
---|
| 28 | * Furthermore you may use our trademarks where it is necessary to indicate |
---|
| 29 | * the intended purpose of a product or service provided you use it in accordance |
---|
| 30 | * with honest practices in industrial or commercial matters. |
---|
| 31 | * If you want to propagate modified versions of the Program under the name "Z-Push", |
---|
| 32 | * you may only do so if you have a written permission by Zarafa Deutschland GmbH |
---|
| 33 | * (to acquire a permission please contact Zarafa at trademark@zarafa.com). |
---|
| 34 | * |
---|
| 35 | * This program is distributed in the hope that it will be useful, |
---|
| 36 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 37 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 38 | * GNU Affero General Public License for more details. |
---|
| 39 | * |
---|
| 40 | * You should have received a copy of the GNU Affero General Public License |
---|
| 41 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
| 42 | * |
---|
| 43 | * Consult LICENSE file for details |
---|
| 44 | ************************************************/ |
---|
| 45 | |
---|
| 46 | interface IImportChanges extends IChanges { |
---|
| 47 | |
---|
| 48 | /**---------------------------------------------------------------------------------------------------------- |
---|
| 49 | * Methods for to import contents |
---|
| 50 | */ |
---|
| 51 | |
---|
| 52 | /** |
---|
| 53 | * Loads objects which are expected to be exported with the state |
---|
| 54 | * Before importing/saving the actual message from the mobile, a conflict detection should be done |
---|
| 55 | * |
---|
| 56 | * @param ContentParameters $contentparameters |
---|
| 57 | * @param string $state |
---|
| 58 | * |
---|
| 59 | * @access public |
---|
| 60 | * @return boolean |
---|
| 61 | * @throws StatusException |
---|
| 62 | */ |
---|
| 63 | public function LoadConflicts($contentparameters, $state); |
---|
| 64 | |
---|
| 65 | /** |
---|
| 66 | * Imports a single message |
---|
| 67 | * |
---|
| 68 | * @param string $id |
---|
| 69 | * @param SyncObject $message |
---|
| 70 | * |
---|
| 71 | * @access public |
---|
| 72 | * @return boolean/string failure / id of message |
---|
| 73 | * @throws StatusException |
---|
| 74 | */ |
---|
| 75 | public function ImportMessageChange($id, $message); |
---|
| 76 | |
---|
| 77 | /** |
---|
| 78 | * Imports a deletion. This may conflict if the local object has been modified |
---|
| 79 | * |
---|
| 80 | * @param string $id |
---|
| 81 | * |
---|
| 82 | * @access public |
---|
| 83 | * @return boolean |
---|
| 84 | * @throws StatusException |
---|
| 85 | */ |
---|
| 86 | public function ImportMessageDeletion($id); |
---|
| 87 | |
---|
| 88 | /** |
---|
| 89 | * Imports a change in 'read' flag |
---|
| 90 | * This can never conflict |
---|
| 91 | * |
---|
| 92 | * @param string $id |
---|
| 93 | * @param int $flags |
---|
| 94 | * |
---|
| 95 | * @access public |
---|
| 96 | * @return boolean |
---|
| 97 | * @throws StatusException |
---|
| 98 | */ |
---|
| 99 | public function ImportMessageReadFlag($id, $flags); |
---|
| 100 | |
---|
| 101 | /** |
---|
| 102 | * Imports a move of a message. This occurs when a user moves an item to another folder |
---|
| 103 | * |
---|
| 104 | * @param string $id |
---|
| 105 | * @param string $newfolder destination folder |
---|
| 106 | * |
---|
| 107 | * @access public |
---|
| 108 | * @return boolean |
---|
| 109 | * @throws StatusException |
---|
| 110 | */ |
---|
| 111 | public function ImportMessageMove($id, $newfolder); |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | /**---------------------------------------------------------------------------------------------------------- |
---|
| 115 | * Methods to import hierarchy |
---|
| 116 | */ |
---|
| 117 | |
---|
| 118 | /** |
---|
| 119 | * Imports a change on a folder |
---|
| 120 | * |
---|
| 121 | * @param object $folder SyncFolder |
---|
| 122 | * |
---|
| 123 | * @access public |
---|
| 124 | * @return boolean/string status/id of the folder |
---|
| 125 | * @throws StatusException |
---|
| 126 | */ |
---|
| 127 | public function ImportFolderChange($folder); |
---|
| 128 | |
---|
| 129 | /** |
---|
| 130 | * Imports a folder deletion |
---|
| 131 | * |
---|
| 132 | * @param string $id |
---|
| 133 | * @param string $parent id |
---|
| 134 | * |
---|
| 135 | * @access public |
---|
| 136 | * @return boolean/int success/SYNC_FOLDERHIERARCHY_STATUS |
---|
| 137 | * @throws StatusException |
---|
| 138 | */ |
---|
| 139 | public function ImportFolderDeletion($id, $parent = false); |
---|
| 140 | |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | ?> |
---|