[7589] | 1 | <?php |
---|
| 2 | /*********************************************** |
---|
| 3 | * File : isearchprovider.php |
---|
| 4 | * Project : Z-Push |
---|
| 5 | * Descr : The ISearchProvider interface for searching |
---|
| 6 | * functionalities on the mobile. |
---|
| 7 | * |
---|
| 8 | * Created : 02.01.2012 |
---|
| 9 | * |
---|
| 10 | * Copyright 2007 - 2012 Zarafa Deutschland GmbH |
---|
| 11 | * |
---|
| 12 | * This program is free software: you can redistribute it and/or modify |
---|
| 13 | * it under the terms of the GNU Affero General Public License, version 3, |
---|
| 14 | * as published by the Free Software Foundation with the following additional |
---|
| 15 | * term according to sec. 7: |
---|
| 16 | * |
---|
| 17 | * According to sec. 7 of the GNU Affero General Public License, version 3, |
---|
| 18 | * the terms of the AGPL are supplemented with the following terms: |
---|
| 19 | * |
---|
| 20 | * "Zarafa" is a registered trademark of Zarafa B.V. |
---|
| 21 | * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH |
---|
| 22 | * The licensing of the Program under the AGPL does not imply a trademark license. |
---|
| 23 | * Therefore any rights, title and interest in our trademarks remain entirely with us. |
---|
| 24 | * |
---|
| 25 | * However, if you propagate an unmodified version of the Program you are |
---|
| 26 | * allowed to use the term "Z-Push" to indicate that you distribute the Program. |
---|
| 27 | * Furthermore you may use our trademarks where it is necessary to indicate |
---|
| 28 | * the intended purpose of a product or service provided you use it in accordance |
---|
| 29 | * with honest practices in industrial or commercial matters. |
---|
| 30 | * If you want to propagate modified versions of the Program under the name "Z-Push", |
---|
| 31 | * you may only do so if you have a written permission by Zarafa Deutschland GmbH |
---|
| 32 | * (to acquire a permission please contact Zarafa at trademark@zarafa.com). |
---|
| 33 | * |
---|
| 34 | * This program is distributed in the hope that it will be useful, |
---|
| 35 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 36 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 37 | * GNU Affero General Public License for more details. |
---|
| 38 | * |
---|
| 39 | * You should have received a copy of the GNU Affero General Public License |
---|
| 40 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
| 41 | * |
---|
| 42 | * Consult LICENSE file for details |
---|
| 43 | ************************************************/ |
---|
| 44 | |
---|
| 45 | interface ISearchProvider { |
---|
| 46 | const SEARCH_GAL = "GAL"; |
---|
| 47 | const SEARCH_MAILBOX = "MAILBOX"; |
---|
| 48 | const SEARCH_DOCUMENTLIBRARY = "DOCUMENTLIBRARY"; |
---|
| 49 | |
---|
| 50 | /** |
---|
| 51 | * Constructor |
---|
| 52 | * |
---|
| 53 | * @throws StatusException, FatalException |
---|
| 54 | */ |
---|
| 55 | |
---|
| 56 | /** |
---|
| 57 | * Indicates if a search type is supported by this SearchProvider |
---|
| 58 | * Currently only the type SEARCH_GAL (Global Address List) is implemented |
---|
| 59 | * |
---|
| 60 | * @param string $searchtype |
---|
| 61 | * |
---|
| 62 | * @access public |
---|
| 63 | * @return boolean |
---|
| 64 | */ |
---|
| 65 | public function SupportsType($searchtype); |
---|
| 66 | |
---|
| 67 | /** |
---|
| 68 | * Searches the GAL |
---|
| 69 | * |
---|
| 70 | * @param string $searchquery |
---|
| 71 | * @param string $searchrange |
---|
| 72 | * |
---|
| 73 | * @access public |
---|
| 74 | * @return array |
---|
| 75 | * @throws StatusException |
---|
| 76 | */ |
---|
| 77 | public function GetGALSearchResults($searchquery, $searchrange); |
---|
| 78 | |
---|
| 79 | /** |
---|
| 80 | * Searches for the emails on the server |
---|
| 81 | * |
---|
| 82 | * @param ContentParameter $cpo |
---|
| 83 | * |
---|
| 84 | * @return array |
---|
| 85 | */ |
---|
| 86 | public function GetMailboxSearchResults($cpo); |
---|
| 87 | |
---|
| 88 | /** |
---|
| 89 | * Terminates a search for a given PID |
---|
| 90 | * |
---|
| 91 | * @param int $pid |
---|
| 92 | * |
---|
| 93 | * @return boolean |
---|
| 94 | */ |
---|
| 95 | public function TerminateSearch($pid); |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | /** |
---|
| 99 | * Disconnects from the current search provider |
---|
| 100 | * |
---|
| 101 | * @access public |
---|
| 102 | * @return boolean |
---|
| 103 | */ |
---|
| 104 | public function Disconnect(); |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | ?> |
---|