1: <?php
2: /**
3: * A library for accessing a Kolab storage (usually IMAP).
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 Horde_Kolab_Storage class provides the means to access the
16: * Kolab server storage for groupware objects.
17: *
18: * To get access to the folder handling you would do the following:
19: *
20: * <code>
21: * require_once 'Horde/Kolab/Storage.php';
22: * $folder = Horde_Kolab_Storage::getFolder('INBOX/Calendar');
23: * </code>
24: *
25: * or (in case you are dealing with share identifications):
26: *
27: * <code>
28: * require_once 'Horde/Kolab/Storage.php';
29: * $folder = Horde_Kolab_Storage::getShare(Auth::getAuth(), 'event');
30: * </code>
31: *
32: * To access data in a share (or folder) you need to retrieve the
33: * corresponding data object:
34: *
35: * <code>
36: * require_once 'Horde/Kolab/Storage.php';
37: * $folder = Horde_Kolab_Storage::getShareData(Auth::getAuth(), 'event');
38: * </code>
39: *
40: * Copyright 2004-2012 Horde LLC (http://www.horde.org/)
41: *
42: * See the enclosed file COPYING for license information (LGPL). If you
43: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
44: *
45: * @category Kolab
46: * @package Kolab_Storage
47: * @author Gunnar Wrobel <wrobel@pardus.de>
48: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
49: * @link http://pear.horde.org/index.php?package=Kolab_Storage
50: */
51: interface Horde_Kolab_Storage
52: {
53: /** The package version */
54: const VERSION = '@version@';
55:
56: /**
57: * Get the folder list object.
58: *
59: * @return Horde_Kolab_Storage_List The handler for the list of folders
60: * present in the Kolab backend.
61: */
62: public function getList();
63:
64: /**
65: * Get a folder list object for a "system" user.
66: *
67: * @param string $type The type of system user.
68: *
69: * @return Horde_Kolab_Storage_List The handler for the list of folders
70: * present in the Kolab backend.
71: */
72: public function getSystemList($type);
73:
74: /**
75: * Get a folder representation.
76: *
77: * @param string $folder The folder name.
78: *
79: * @return Horde_Kolab_Storage_Folder The Kolab folder object.
80: */
81: public function getFolder($folder);
82:
83: /**
84: * Return a data handler for accessing data in the specified
85: * folder.
86: *
87: * @param string $folder The name of the folder.
88: * @param string $object_type The type of data we want to
89: * access in the folder.
90: * @param int $data_version Format version of the object data.
91: *
92: * @return Horde_Kolab_Data The data object.
93: */
94: public function getData($folder, $object_type = null, $data_version = 1);
95: }
96:
97: