interfaces/CGRS.idl Source File

CGRS.idl
Go to the documentation of this file.
1 #ifndef _INCLUDED_CRGS_IDL
2 #define _INCLUDED_CRGS_IDL
3 #include "xpcom.idl"
4 
10 module CGRS
11 {
12  interface GenericAttribute;
13  interface GenericMethod;
14  interface GenericValue;
15  interface GenericInterface;
16  interface StringValue;
17  interface WStringValue;
18  interface ShortValue;
19  interface LongValue;
20  interface LongLongValue;
21  interface UShortValue;
22  interface ULongValue;
23  interface ULongLongValue;
24  interface FloatValue;
25  interface DoubleValue;
26  interface BooleanValue;
27  interface CharValue;
28  interface OctetValue;
29  interface SequenceValue;
30  interface SequenceType;
31  interface EnumValue;
32  interface EnumType;
33  interface ObjectValue;
34 
38  typedef sequence<GenericValue> ValueSequence;
39 
40  exception CGRSError {};
41  interface GenericType;
42 
47  interface GenericsService
49  {
60  void loadGenericModule(in string aModulePath) raises(CGRSError);
61 
68  GenericValue getBootstrapByName(in string aBootstrapName) raises(CGRSError);
69 
76  GenericInterface getInterfaceByName(in string aInterfaceName) raises(CGRSError);
77 
81  StringValue makeString(in string val);
82 
86  WStringValue makeWString(in wstring val);
87 
91  ShortValue makeShort(in short val);
92 
96  LongValue makeLong(in long val);
97 
101  LongLongValue makeLongLong(in long long val);
102 
106  UShortValue makeUShort(in unsigned short val);
107 
111  ULongValue makeULong(in unsigned long val);
112 
116  ULongLongValue makeULongLong(in unsigned long long val);
117 
121  FloatValue makeFloat(in float val);
122 
126  DoubleValue makeDouble(in double val);
127 
131  BooleanValue makeBoolean(in boolean val);
132 
136  CharValue makeChar(in char val);
137 
141  OctetValue makeOctet(in octet val);
142 
146  SequenceValue makeSequence(in GenericType innerType);
147 
151  EnumValue makeEnumFromString(in EnumType etype,
152  in string name);
153 
157  EnumValue makeEnumFromIndex(in EnumType etype,
158  in long index);
159 
163  GenericValue makeObject(in XPCOM::IObject value);
164 
168  GenericValue makeVoid();
169  };
170 #pragma terminal-interface
171 
178  {
182  readonly attribute long baseCount;
183 
190  GenericInterface getBase(in long aBaseNumber) raises(CGRSError);
191 
195  readonly attribute long attributeCount;
196 
203  GenericAttribute getAttributeByIndex(in long aAttributeNumber) raises(CGRSError);
204 
211  GenericAttribute getAttributeByName(in string aAttributeName) raises(CGRSError);
212 
216  readonly attribute long operationCount;
217 
224  GenericMethod getOperationByIndex(in long aOperationNumber) raises(CGRSError);
225 
232  GenericMethod getOperationByName(in string aOperationName) raises(CGRSError);
233  };
234 #pragma terminal-interface
235 
240  interface GenericType
242  {
248  readonly attribute string asString;
249  };
250 
254  interface SequenceType
255  : GenericType
256  {
261  readonly attribute GenericType innerType;
262  };
263 #pragma terminal-interface
264 
269  interface EnumType
270  : GenericType
271  {
275  readonly attribute long maxIndex;
276 
281  string indexToName(in long index) raises(CGRSError);
282 
287  long nameToIndex(in string name) raises(CGRSError);
288  };
289 #pragma terminal-interface
290 
294  interface GenericValue
296  {
300  readonly attribute GenericType typeOfValue;
301  };
302 #pragma user-callback
303 
307  interface StringValue
308  : GenericValue
309  {
313  attribute string asString;
314  };
315 #pragma terminal-interface
316 
320  interface WStringValue
321  : GenericValue
322  {
326  attribute wstring asWString;
327  };
328 #pragma terminal-interface
329 
333  interface ShortValue
334  : GenericValue
335  {
339  attribute short asShort;
340  };
341 #pragma terminal-interface
342 
346  interface LongValue
347  : GenericValue
348  {
352  attribute long asLong;
353  };
354 #pragma terminal-interface
355 
359  interface LongLongValue
360  : GenericValue
361  {
365  attribute long long asLongLong;
366  };
367 #pragma terminal-interface
368 
372  interface UShortValue
373  : GenericValue
374  {
378  attribute unsigned short asUShort;
379  };
380 #pragma terminal-interface
381 
385  interface ULongValue
386  : GenericValue
387  {
391  attribute unsigned long asULong;
392  };
393 #pragma terminal-interface
394 
398  interface ULongLongValue
399  : GenericValue
400  {
404  attribute unsigned long long asULongLong;
405  };
406 #pragma terminal-interface
407 
411  interface FloatValue
412  : GenericValue
413  {
417  attribute float asFloat;
418  };
419 #pragma terminal-interface
420 
424  interface DoubleValue
425  : GenericValue
426  {
430  attribute double asDouble;
431  };
432 #pragma terminal-interface
433 
437  interface BooleanValue
438  : GenericValue
439  {
443  attribute boolean asBoolean;
444  };
445 #pragma terminal-interface
446 
450  interface CharValue
451  : GenericValue
452  {
456  attribute char asChar;
457  };
458 #pragma terminal-interface
459 
463  interface OctetValue
464  : GenericValue
465  {
469  attribute octet asOctet;
470  };
471 #pragma terminal-interface
472 
476  interface ObjectValue
477  : GenericValue
478  {
483  };
484 #pragma terminal-interface
485 
492  : GenericValue
493  {
510  GenericValue invokeOnInterface(in string interfaceName, in string methodName,
511  in ValueSequence inValues, out ValueSequence outValues,
512  out boolean wasException);
513  };
514 #pragma user-callback
515 
520  interface SequenceValue
521  : GenericValue
522  {
526  readonly attribute long valueCount;
527 
532  GenericValue getValueByIndex(in long index) raises(CGRSError);
533 
538  void appendValue(in GenericValue v) raises(CGRSError);
539  };
540 #pragma terminal-interface
541 
545  interface EnumValue
546  : GenericValue
547  {
551  attribute string asString;
552 
556  attribute long asLong;
557  };
558 #pragma terminal-interface
559 
565  {
569  readonly attribute boolean isReadonly;
570 
574  readonly attribute string name;
575 
579  readonly attribute GenericType type;
580 
584  readonly attribute GenericMethod getter;
585 
590  readonly attribute GenericMethod setter;
591  };
592 #pragma terminal-interface
593 
599  {
604  readonly attribute boolean isIn;
605 
611  readonly attribute boolean isOut;
612 
616  readonly attribute string name;
617 
621  readonly attribute GenericType type;
622  };
623 #pragma terminal-interface
624 
628  typedef sequence<GenericParameter> ParameterSequence;
629 
633  interface GenericMethod
635  {
639  readonly attribute ParameterSequence parameters;
640 
644  readonly attribute GenericType returnType;
645 
656  GenericValue invoke(in ObjectValue invokeOn, in ValueSequence inValues, out ValueSequence outValues, out boolean wasException);
657  };
658 #pragma terminal-interface
659 };
660 #endif