1: <?php
2: /**
3: * The interface of the basic list query.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Storage
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://pear.horde.org/index.php?package=Kolab_Storage
12: */
13:
14: /**
15: * The interface of the basic list query.
16: *
17: * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you
20: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
21: *
22: * @category Kolab
23: * @package Kolab_Storage
24: * @author Gunnar Wrobel <wrobel@pardus.de>
25: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26: * @link http://pear.horde.org/index.php?package=Kolab_Storage
27: */
28: interface Horde_Kolab_Storage_List_Query_List
29: extends Horde_Kolab_Storage_List_Query
30: {
31: /**
32: * Returns the folder types as associative array.
33: *
34: * @return array The list folder types with the folder names as key and the
35: * type as values.
36: */
37: public function listTypes();
38:
39: /**
40: * Returns the folder type annotation as associative array.
41: *
42: * @return array The list folder types with the folder names as key and the
43: * type handler as values.
44: */
45: public function listFolderTypeAnnotations();
46:
47: /**
48: * List basic folder data for the folders of a specific type.
49: *
50: * @param string $type The folder type the listing should be limited to.
51: *
52: * @return array The list of folders.
53: */
54: public function dataByType($type);
55:
56: /**
57: * List basic folder data for the specified folder.
58: *
59: * @param string $folder The folder path.
60: *
61: * @return array The folder data.
62: */
63: public function folderData($folder);
64:
65: /**
66: * List all folders of a specific type.
67: *
68: * @param string $type The folder type the listing should be limited to.
69: *
70: * @return array The list of folders.
71: */
72: public function listByType($type);
73:
74: /**
75: * Get the folder owners.
76: *
77: * @return array The folder owners with the folder names as key and the
78: * owner as values.
79: */
80: public function listOwners();
81:
82: /**
83: * Return the list of default folders.
84: *
85: * @return array An array with owners as keys and another array as
86: * value. The second array associates type (key) with the
87: * corresponding default folder (value).
88: */
89: public function listDefaults();
90:
91: /**
92: * Get the default folder for a certain type.
93: *
94: * @param string $type The type of the share/folder.
95: *
96: * @return string|boolean The name of the default folder, false if there is no default.
97: */
98: public function getDefault($type);
99:
100: /**
101: * Get the default folder for a certain type from a different owner.
102: *
103: * @param string $owner The folder owner.
104: * @param string $type The type of the share/folder.
105: *
106: * @return string|boolean The name of the default folder, false if there is no default.
107: */
108: public function getForeignDefault($owner, $type);
109: }