File: CosNotifyFilter.idl

package info (click to toggle)
omniorb-dfsg 4.3.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,172 kB
  • sloc: cpp: 115,843; python: 24,962; ansic: 13,414; sh: 2,665; makefile: 40
file content (185 lines) | stat: -rw-r--r-- 4,417 bytes parent folder | download | duplicates (11)
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
//File: CosNotifyFilter.idl
//Part of the Notification Service

#ifndef _COS_NOTIFY_FILTER_IDL_
#define _COS_NOTIFY_FILTER_IDL_

// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"

#pragma prefix "omg.org"

#include <CosNotifyComm.idl>

module CosNotifyFilter {

	typedef long ConstraintID;

	struct ConstraintExp {
		CosNotification::EventTypeSeq event_types;
		string constraint_expr;
	};

	typedef sequence<ConstraintID> ConstraintIDSeq;
	typedef sequence<ConstraintExp> ConstraintExpSeq;

	struct ConstraintInfo {
		ConstraintExp constraint_expression;
		ConstraintID constraint_id;
	};

	typedef sequence<ConstraintInfo> ConstraintInfoSeq;

	struct MappingConstraintPair {
		ConstraintExp constraint_expression;
		any result_to_set;
	};

	typedef sequence<MappingConstraintPair> MappingConstraintPairSeq;

	struct MappingConstraintInfo {
		ConstraintExp constraint_expression;
		ConstraintID constraint_id;
		any value;
	};

	typedef sequence<MappingConstraintInfo> MappingConstraintInfoSeq;

	typedef long CallbackID;
	typedef sequence<CallbackID> CallbackIDSeq;

	exception UnsupportedFilterableData {}; 
	exception InvalidGrammar {};
	exception InvalidConstraint {ConstraintExp constr;};
	exception DuplicateConstraintID {ConstraintID id;};

	exception ConstraintNotFound {ConstraintID id;};
	exception CallbackNotFound {};

	exception InvalidValue {ConstraintExp constr; any value;};

	interface Filter { 

		readonly attribute string constraint_grammar; 

		ConstraintInfoSeq add_constraints (
				in ConstraintExpSeq constraint_list)
			raises (InvalidConstraint);

		void modify_constraints (
				in ConstraintIDSeq del_list,
				in ConstraintInfoSeq modify_list)
			raises (InvalidConstraint, ConstraintNotFound);

		ConstraintInfoSeq get_constraints(
				in ConstraintIDSeq id_list)
			raises (ConstraintNotFound);

		ConstraintInfoSeq get_all_constraints();

		void remove_all_constraints();

		void destroy();

		boolean match ( in any filterable_data )
			raises (UnsupportedFilterableData);

		boolean match_structured (
			in CosNotification::StructuredEvent filterable_data )
			raises (UnsupportedFilterableData);

		boolean match_typed (
			in CosNotification::PropertySeq filterable_data )
			raises (UnsupportedFilterableData);

		CallbackID attach_callback (
				in CosNotifyComm::NotifySubscribe callback);

		void detach_callback ( in CallbackID callback)
			raises ( CallbackNotFound );

		CallbackIDSeq get_callbacks();

	}; // Filter 

	interface MappingFilter {

		readonly attribute string constraint_grammar;

		readonly attribute CORBA::TypeCode value_type;

		readonly attribute any default_value;

		MappingConstraintInfoSeq add_mapping_constraints (
				in MappingConstraintPairSeq pair_list)
			raises (InvalidConstraint, InvalidValue);

		void modify_mapping_constraints (
				in ConstraintIDSeq del_list,
				in MappingConstraintInfoSeq modify_list)
			raises (InvalidConstraint, InvalidValue,
						ConstraintNotFound);

		MappingConstraintInfoSeq get_mapping_constraints (
				in ConstraintIDSeq id_list)
			raises (ConstraintNotFound);

		MappingConstraintInfoSeq get_all_mapping_constraints();

		void remove_all_mapping_constraints();

		void destroy();

		boolean match ( in any filterable_data,
				out any result_to_set )
			raises (UnsupportedFilterableData);

		boolean match_structured (
			in CosNotification::StructuredEvent filterable_data,
				out any result_to_set)
			raises (UnsupportedFilterableData);

		boolean match_typed (
			in CosNotification::PropertySeq filterable_data,
				out any result_to_set)
			raises (UnsupportedFilterableData);

	}; // MappingFilter

	interface FilterFactory {

		Filter create_filter (
				in string constraint_grammar)
			raises (InvalidGrammar);

		MappingFilter create_mapping_filter (
				in string constraint_grammar,
				in any default_value)
			raises(InvalidGrammar);

	}; // FilterFactory

	typedef long FilterID;
	typedef sequence<FilterID> FilterIDSeq;

	exception FilterNotFound {};

	interface FilterAdmin {

		FilterID add_filter ( in Filter new_filter );

		void remove_filter ( in FilterID filter )
			raises ( FilterNotFound );

		Filter get_filter ( in FilterID filter )
			raises ( FilterNotFound );

		FilterIDSeq get_all_filters();

		void remove_all_filters();

	}; // FilterAdmin

}; // CosNotifyFilter

#endif /* _COS_NOTIFY_FILTER_IDL_ */