Blame view

sources/lib/public/isearch.php 1.45 KB
31b7f2792   Kload   Upgrade to ownclo...
1
2
3
4
5
  <?php
  
  /**
   * ownCloud - App Framework
   *
6d9380f96   Cédric Dupont   Update sources OC...
6
7
   * @author Jörn Dreyer
   * @copyright 2014 Jörn Dreyer jfd@owncloud.com
31b7f2792   Kload   Upgrade to ownclo...
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
   * License as published by the Free Software Foundation; either
   * version 3 of the License, or any later version.
   *
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
   *
   * You should have received a copy of the GNU Affero General Public
   * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
   *
   */
6d9380f96   Cédric Dupont   Update sources OC...
23
  namespace OCP;
31b7f2792   Kload   Upgrade to ownclo...
24
25
26
  
  
  /**
6d9380f96   Cédric Dupont   Update sources OC...
27
   * Small Interface for Search
31b7f2792   Kload   Upgrade to ownclo...
28
   */
6d9380f96   Cédric Dupont   Update sources OC...
29
  interface ISearch {
31b7f2792   Kload   Upgrade to ownclo...
30

6d9380f96   Cédric Dupont   Update sources OC...
31
32
33
34
35
36
  	/**
  	 * Search all providers for $query
  	 * @param string $query
  	 * @return array An array of OCP\Search\Result's
  	 */
  	public function search($query);
31b7f2792   Kload   Upgrade to ownclo...
37
38
  
  	/**
6d9380f96   Cédric Dupont   Update sources OC...
39
40
41
  	 * Register a new search provider to search with
  	 * @param string $class class name of a OCP\Search\Provider
  	 * @param array $options optional
31b7f2792   Kload   Upgrade to ownclo...
42
  	 */
6d9380f96   Cédric Dupont   Update sources OC...
43
  	public function registerProvider($class, $options = array());
31b7f2792   Kload   Upgrade to ownclo...
44

6d9380f96   Cédric Dupont   Update sources OC...
45
46
47
48
49
  	/**
  	 * Remove one existing search provider
  	 * @param string $provider class name of a OCP\Search\Provider
  	 */
  	public function removeProvider($provider);
31b7f2792   Kload   Upgrade to ownclo...
50

6d9380f96   Cédric Dupont   Update sources OC...
51
52
53
54
  	/**
  	 * Remove all registered search providers
  	 */
  	public function clearProviders();
31b7f2792   Kload   Upgrade to ownclo...
55
56
  
  }