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
|
//File: CosNotification.idl
//Part of the Notification Service
#ifndef _COS_NOTIFICATION_IDL_
#define _COS_NOTIFICATION_IDL_
// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"
#pragma prefix "omg.org"
module CosNotification {
typedef string Istring;
typedef Istring PropertyName;
typedef any PropertyValue;
struct Property {
PropertyName name;
PropertyValue value;
};
typedef sequence<Property> PropertySeq;
// The following are the same, but serve different purposes.
typedef PropertySeq OptionalHeaderFields;
typedef PropertySeq FilterableEventBody;
typedef PropertySeq QoSProperties;
typedef PropertySeq AdminProperties;
struct _EventType {
string domain_name;
string type_name;
};
typedef sequence<EventType> EventTypeSeq;
struct PropertyRange {
PropertyValue low_val;
PropertyValue high_val;
};
struct NamedPropertyRange {
PropertyName name;
PropertyRange range;
};
typedef sequence<NamedPropertyRange> NamedPropertyRangeSeq;
enum QoSError_code {
UNSUPPORTED_PROPERTY,
UNAVAILABLE_PROPERTY,
UNSUPPORTED_VALUE,
UNAVAILABLE_VALUE,
BAD_PROPERTY,
BAD_TYPE,
BAD_VALUE
};
struct PropertyError {
QoSError_code code;
PropertyName name;
PropertyRange available_range;
};
typedef sequence<PropertyError> 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<StructuredEvent> 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.
const string StopTime = "StopTime";
// StopTime takes a value of type TimeBase::UtcT.
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
const string StartTimeSupported = "StartTimeSupported";
// StartTimeSupported takes on a boolean value
const string StopTimeSupported = "StopTimeSupported";
// StopTimeSupported takes on a boolean value
const string MaxEventsPerConsumer = "MaxEventsPerConsumer";
// MaxEventsPerConsumer takes on a value of type long
interface QoSAdmin {
QoSProperties get_qos();
void set_qos ( in QoSProperties qos)
raises ( UnsupportedQoS );
void validate_qos (
in QoSProperties required_qos,
out NamedPropertyRangeSeq 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
const string RejectNewEvents = "RejectNewEvents";
// RejectNewEvents takes on a value of type Boolean
interface AdminPropertiesAdmin {
AdminProperties get_admin();
void set_admin (in AdminProperties admin)
raises ( UnsupportedAdmin);
}; // AdminPropertiesAdmin
}; // CosNotification
#endif /* _COS_NOTIFICATION_IDL_ */
|