1: <?php
2: /**
3: * Defines unique stamps that allow to determine if folder data has changed or
4: * not.
5: *
6: * PHP version 5
7: *
8: * @category Kolab
9: * @package Kolab_Storage
10: * @author Gunnar Wrobel <wrobel@pardus.de>
11: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
12: * @link http://pear.horde.org/index.php?package=Kolab_Storage
13: */
14:
15: /**
16: * Defines unique stamps that allow to determine if folder data has changed or
17: * not.
18: *
19: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
20: *
21: * See the enclosed file COPYING for license information (LGPL). If you
22: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
23: *
24: * @category Kolab
25: * @package Kolab_Storage
26: * @author Gunnar Wrobel <wrobel@pardus.de>
27: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
28: * @link http://pear.horde.org/index.php?package=Kolab_Storage
29: */
30: interface Horde_Kolab_Storage_Folder_Stamp
31: extends Serializable
32: {
33: /** List of deleted IDs */
34: const DELETED = 'd';
35:
36: /** List of added IDs */
37: const ADDED = 'a';
38:
39: /**
40: * Indicate if there was a complete folder reset.
41: *
42: * @param Horde_Kolab_Storage_Folder_Stamp_Uids The stamp to compare against.
43: *
44: * @return boolean True if there was a complete folder reset stamps are
45: * different, false if not.
46: */
47: public function isReset(Horde_Kolab_Storage_Folder_Stamp $stamp);
48:
49: /**
50: * Return the backend object IDs in the folder.
51: *
52: * @return array The list of backend IDs.
53: */
54: public function ids();
55:
56: /**
57: * What changed between this old stamp and the new provided stamp?
58: *
59: * @param Horde_Kolab_Storage_Folder_Stamp_Uids The new stamp to compare against.
60: *
61: * @return array|boolean False if there was no change, an array of two
62: * elements (added IDs, deleted IDs) otherwise.
63: */
64: public function getChanges(Horde_Kolab_Storage_Folder_Stamp $stamp);
65: }
66: