summaryrefslogtreecommitdiff
path: root/idl/ConfigArchiver.idl
blob: d6124308d5e3d59720ee78fab7431084bd5d47e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/* -*- mode: idl; style: linux -*- */

/* Bonobo_ConfigArchiver.idl
 * Copyright (C) 2001 Ximian, Inc.
 *
 * Written by Bradford Hovinen <hovinen@ximian.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 */

#ifndef __CONFIGARCHIVER_IDL
#define __CONFIGARCHIVER_IDL

%{
#pragma include_defs bonobo/Bonobo.h
%}
#pragma inhibit push

#include <Bonobo_Unknown.idl>

#pragma inhibit pop

module ConfigArchiver {
	typedef unsigned long long Time;
	typedef sequence<string> StringSeq;

	enum ContainmentType {
		CONTAIN_NONE, CONTAIN_PARTIAL, CONTAIN_FULL
	};

	enum StoreType {
		STORE_DEFAULT, STORE_FULL, STORE_COMPARE_PARENT, STORE_MASK_PREVIOUS
	};

	interface BackendList : Bonobo::Unknown {
		readonly attribute StringSeq        backends;

		boolean            contains                 (in string            backendId);

		void               add                      (in string            backendId);
		void               remove                   (in string            backendId);

		void               save                     ();
	};

	interface Location : Bonobo::Unknown {
		exception RollbackDataNotFound {};

		readonly attribute Location         parent;
		readonly attribute string           path;
		readonly attribute StringSeq        backendList;

		attribute string                    label;
		attribute string                    id;

		string             getStorageFilename       (in string            backendId,
							     in boolean           isDefaultData);

		string             getRollbackFilename      (in Time              time,
							     in long              steps,
							     in string            backendId,
							     in boolean           parentChain)
			raises (RollbackDataNotFound);

		void               storageComplete          (in string            filename);

		void               rollbackBackends         (in Time              time,
							     in long              steps,
							     in StringSeq         backendId,
							     in boolean           parentChain);

		Time               getModificationTime      (in string            backendId);

		ContainmentType    contains                 (in string            backendId);
		long               addBackend               (in string            backendId,
							     in ContainmentType   type);
		void               removeBackend            (in string            backendId);

		boolean            doesBackendChange        (in Location          location,
							     in string            backendId);

		void               garbageCollect           ();

		void               delete                   ();
	};

	typedef sequence<Location> LocationSeq;

	interface Archive : Bonobo::Unknown {
		exception LocationNotFound {};

		readonly attribute string      prefix;
		readonly attribute boolean     isGlobal;
		readonly attribute BackendList backendList;

		attribute Location             currentLocation;
		attribute string               currentLocationId;

		Location           getLocation              (in string              locid)
			raises (LocationNotFound);

		Location           createLocation           (in string              locid,
							     in string              label,
							     in Location            parent);

		LocationSeq        getChildLocations        (in Location            parent);
	};
};

#endif /* ! __CONFIGARCHIVER_IDL */