00001 #ifndef COS_NOTIFICATION_IDL 00002 #define COS_NOTIFICATION_IDL 00003 00014 #pragma prefix "omg.org" 00015 00016 #ifdef TAO12 00017 #define EventType _EventType 00018 #endif 00019 00020 #ifdef TAO13 00021 #define EventType _EventType 00022 #endif 00023 00024 module CosNotification 00025 { 00026 typedef string Istring; 00027 typedef Istring PropertyName; 00028 typedef any PropertyValue; 00029 00034 struct Property 00035 { 00036 PropertyName name; 00037 PropertyValue value; 00038 }; 00039 typedef sequence<Property> PropertySeq; 00040 00041 // The following are the same, but serve different purposes. 00042 00046 typedef PropertySeq OptionalHeaderFields; 00047 00051 typedef PropertySeq FilterableEventBody; 00052 00056 typedef PropertySeq QoSProperties; 00057 00061 typedef PropertySeq AdminProperties; 00062 00066 struct EventType 00067 { 00068 string domain_name; 00069 string type_name; 00070 }; 00071 00075 typedef sequence<EventType> EventTypeSeq; 00076 00081 struct PropertyRange 00082 { 00083 PropertyValue low_val; 00084 PropertyValue high_val; 00085 }; 00086 00091 struct NamedPropertyRange 00092 { 00093 PropertyName name; 00094 PropertyRange range; 00095 }; 00096 00100 typedef sequence<NamedPropertyRange> NamedPropertyRangeSeq; 00101 00105 enum QoSError_code 00106 { 00107 UNSUPPORTED_PROPERTY, 00108 UNAVAILABLE_PROPERTY, 00109 UNSUPPORTED_VALUE, 00110 UNAVAILABLE_VALUE, 00111 BAD_PROPERTY, 00112 BAD_TYPE, 00113 BAD_VALUE 00114 }; 00115 00120 struct PropertyError 00121 { 00122 QoSError_code code; 00123 PropertyName name; 00124 PropertyRange available_range; 00125 }; 00126 00130 typedef sequence<PropertyError> PropertyErrorSeq; 00131 00135 exception UnsupportedQoS { PropertyErrorSeq qos_err; }; 00136 00140 exception UnsupportedAdmin { PropertyErrorSeq admin_err; }; 00141 00142 // Define the Structured Event structure 00147 struct FixedEventHeader 00148 { 00149 EventType event_type; 00150 string event_name; 00151 }; 00152 00157 struct EventHeader 00158 { 00159 FixedEventHeader fixed_header; 00160 OptionalHeaderFields variable_header; 00161 }; 00162 00167 struct StructuredEvent 00168 { 00169 EventHeader header; 00170 FilterableEventBody filterable_data; 00171 any remainder_of_body; 00172 }; // StructuredEvent 00173 00178 typedef sequence<StructuredEvent> EventBatch; 00179 00180 // The following constant declarations define the standard 00181 // QoS property names and the associated values each property 00182 // can take on. The name/value pairs for each standard property 00183 // are grouped, beginning with a string constant defined for the 00184 // property name, followed by the values the property can take on. 00185 00186 const string EventReliability = "EventReliability"; 00187 const short BestEffort = 0; 00188 const short Persistent = 1; 00189 00190 const string ConnectionReliability = "ConnectionReliability"; 00191 // Can take on the same values as EventReliability 00192 00193 const string Priority = "Priority"; 00194 const short LowestPriority = -32767; 00195 const short HighestPriority = 32767; 00196 const short DefaultPriority = 0; 00197 00198 const string StartTime = "StartTime"; 00199 // StartTime takes a value of type TimeBase::UtcT. 00200 00201 const string StopTime = "StopTime"; 00202 // StopTime takes a value of type TimeBase::UtcT. 00203 00204 const string Timeout = "Timeout"; 00205 // Timeout takes on a value of type TimeBase::TimeT 00206 00207 const string OrderPolicy = "OrderPolicy"; 00208 const short AnyOrder = 0; 00209 const short FifoOrder = 1; 00210 const short PriorityOrder = 2; 00211 const short DeadlineOrder = 3; 00212 00213 const string DiscardPolicy = "DiscardPolicy"; 00214 // DiscardPolicy takes on the same values as OrderPolicy, plus 00215 const short LifoOrder = 4; 00216 00217 const string MaximumBatchSize = "MaximumBatchSize"; 00218 // MaximumBatchSize takes on a value of type long 00219 00220 const string PacingInterval = "PacingInterval"; 00221 // PacingInterval takes on a value of type TimeBase::TimeT 00222 00223 const string StartTimeSupported = "StartTimeSupported"; 00224 // StartTimeSupported takes on a boolean value 00225 00226 const string StopTimeSupported = "StopTimeSupported"; 00227 // StopTimeSupported takes on a boolean value 00228 00229 const string MaxEventsPerConsumer = "MaxEventsPerConsumer"; 00230 // MaxQueueLength takes on a value of type long 00231 00235 interface QoSAdmin 00236 { 00242 QoSProperties get_qos(); 00243 00250 void set_qos ( in QoSProperties qos) 00251 raises ( UnsupportedQoS ); 00252 00262 void validate_qos ( 00263 in QoSProperties required_qos, 00264 out NamedPropertyRangeSeq available_qos ) 00265 raises ( UnsupportedQoS ); 00266 00267 }; // QosAdmin 00268 00269 // Admin properties are defined in similar manner as QoS 00270 // properties. The only difference is that these properties 00271 // are related to channel administration policies, as opposed 00272 // message quality of service 00273 00274 const string MaxQueueLength = "MaxQueueLength"; 00275 // MaxQueueLength takes on a value of type long 00276 00277 const string MaxConsumers = "MaxConsumers"; 00278 // MaxConsumers takes on a value of type long 00279 00280 const string MaxSuppliers = "MaxSuppliers"; 00281 // MaxSuppliers takes on a value of type long 00282 00283 const string RejectNewEvents = "RejectNewEvents"; 00284 // RejectNewEvents takes on a value of type boolean 00285 00289 interface AdminPropertiesAdmin 00290 { 00296 AdminProperties get_admin(); 00297 00305 void set_admin (in AdminProperties admin) 00306 raises ( UnsupportedAdmin ); 00307 00308 }; // AdminPropertiesAdmin 00309 00310 }; // CosNotification 00311 00312 #endif /* COS_NOTIFICATION_IDL */