#ifndef _COS_NOTIFICATION_IDL #define _COS_NOTIFICATION_IDL #include "CosTrading.idl" #pragma prefix "omg.org" module CosNotification { // The following two are the same, but serve different purposes. typedef CosTrading::PropertySeq OptionalHeaderFields; typedef CosTrading::PropertySeq FilterableEventBody; typedef CosTrading::PropertySeq QoSProperties; typedef CosTrading::PropertySeq AdminProperties; struct EventType { string domain_name; string type_name; }; typedef sequence EventTypeSeq; struct PropertyRange { CosTrading::PropertyName name; CosTrading::PropertyValue low_val; CosTrading::PropertyValue high_val; }; typedef sequence PropertyRangeSeq; enum QoSError_code { UNSUPPORTED_PROPERTY, UNAVAILABLE_PROPERTY, UNSUPPORTED_VALUE, UNAVAILABLE_VALUE, BAD_PROPERTY, BAD_TYPE, BAD_VALUE }; struct PropertyError { QoSError_code code; PropertyRange available_range; }; typedef sequence PropertyErrorSeq; exception UnsupportedQoS { PropertyErrorSeq qos_err; }; exception UnsupportedAdmin { PropertyErrorSeq admin_err; }; // Define the Structured Event structure struct FixedEventHeader { EventType event_type; string event_name; }; struct EventHeader { FixedEventHeader fixed_header; OptionalHeaderFields variable_header; }; struct StructuredEvent { EventHeader header; FilterableEventBody filterable_data; any remainder_of_body; }; // StructuredEvent typedef sequence EventBatch; // The following constant declarations define the standard // QoS property names and the associated values each property // can take on. The name/value pairs for each standard property // are grouped, beginning with a string constant defined for the // property name, followed by the values the property can take on. const string EventReliability = "EventReliability"; const short BestEffort = 0; const short Persistent = 1; const string ConnectionReliability = "ConnectionReliability"; // Can take on the same values as EventReliability const string Priority = "Priority"; const short LowestPriority = -32767; const short HighestPriority = 32767; const short DefaultPriority = 0; const string StartTime = "StartTime"; // StartTime takes a value of type TimeBase::UtcT when placed // in an event header. StartTime can also be set to either // TRUE or FALSE at the Proxy level, indicating whether or not the // Proxy supports the setting of per-message stop times. const string StopTime = "StopTime"; // StopTime takes a value of type TimeBase::UtcT when placed // in an event header. StopTime can also be set to either // TRUE or FALSE at the Proxy level, indicating whether or not the // Proxy supports the setting of per-message stop times. const string Timeout = "Timeout"; // Timeout takes on a value of type TimeBase::TimeT const string OrderPolicy = "OrderPolicy"; const short AnyOrder = 0; const short FifoOrder = 1; const short PriorityOrder = 2; const short DeadlineOrder = 3; const string DiscardPolicy = "DiscardPolicy"; // DiscardPolicy takes on the same values as OrderPolicy, plus const short LifoOrder = 4; const string MaximumBatchSize = "MaximumBatchSize"; // MaximumBatchSize takes on a value of type long const string PacingInterval = "PacingInterval"; // PacingInterval takes on a value of type TimeBase::TimeT interface QoSAdmin { QoSProperties get_qos(); void set_qos ( in QoSProperties qos) raises ( UnsupportedQoS ); void validate_qos ( in QoSProperties required_qos, out PropertyRangeSeq available_qos ) raises ( UnsupportedQoS ); }; // QosAdmin // Admin properties are defined in similar manner as QoS // properties. The only difference is that these properties // are related to channel administration policies, as opposed // message quality of service const string MaxQueueLength = "MaxQueueLength"; // MaxQueueLength takes on a value of type long const string MaxConsumers = "MaxConsumers"; // MaxConsumers takes on a value of type long const string MaxSuppliers = "MaxSuppliers"; // MaxSuppliers takes on a value of type long interface AdminPropertiesAdmin { AdminProperties get_admin(); void set_admin (in AdminProperties admin) raises ( UnsupportedAdmin); }; // AdminPropertiesAdmin }; // CosNotification #endif