aboutsummaryrefslogblamecommitdiffstats
path: root/lib/ic/test/ic_SUITE_data/Coss.idl
blob: c84d4a8247bf2fdfa8763417046f9aabe0bde1f0 (plain) (tree)
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                        
// This file contains OMG IDL and PIDL for the Common Object Services.
// CosNaming Module, p 3-6 CORBAservices, Naming Service V1.0, 3/94

// A few minor changes for the JacORB distribution:
//
// added am enclosing COSS module and changed scoped names accordingly
//
// corrected a few syntax errors
//
// commented out:
//	#includes
//	forward declaration of Object

#include "Corba.idl"

module COSS {

module CosNaming {

        typedef string Istring;
        struct NameComponent {
                Istring id;
                Istring kind;
        };

        typedef sequence <NameComponent> Name;

        enum BindingType {nobject, ncontext};

        struct Binding {
                Name    binding_name;
                BindingType binding_type;                                  
        };

        typedef sequence <Binding> BindingList;                                       
        interface BindingIterator;

        interface NamingContext {

                enum NotFoundReason { missing_node, not_context, not_object};
        
                exception NotFound { 
                                NotFoundReason why;
                                Name rest_of_name;
                };

                exception CannotProceed {
                                NamingContext cxt;
                                Name rest_of_name;
                };
                                                                                                        
                exception InvalidName{};                                                                        
                exception AlreadyBound {};
                exception NotEmpty{};

                void bind(in Name n, in Object obj)             
                         raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
                void rebind(in Name n, in Object obj)   
                         raises(NotFound, CannotProceed, InvalidName);
                void bind_context(in Name n, in NamingContext nc)               
                         raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
                void rebind_context(in Name n, in NamingContext nc)     
                         raises(NotFound, CannotProceed, InvalidName);
                Object resolve (in Name n)
                         raises(NotFound, CannotProceed, InvalidName);
                void unbind(in Name n)
                         raises(NotFound, CannotProceed, InvalidName);
                NamingContext new_context();
                NamingContext bind_new_context(in Name n)
                         raises(NotFound, AlreadyBound, CannotProceed, InvalidName);
                void destroy( )
                         raises(NotEmpty);
                void list (in unsigned long how_many, 
                                        out BindingList bl, out BindingIterator bi);
        };

        interface BindingIterator {
                boolean next_one(out Binding b);
                boolean next_n(in unsigned long how_many, 
                                        out BindingList bl);
                void destroy();
        };
};

// Names Library interface in PIDL,   CORBAservices p 3- 14, Naming Service V1.0 3/94 
/*
interface LNameComponent {                                                              // PIDL
        exception NotSet{};
        string get_id() 
                raises(NotSet);
        void set_id(in string i);
        string get_kind() 
                raises(NotSet);
        void set_kind(in string k);
        void destroy();
};

interface LName {                                                                                               // PIDL
        exception NoComponent{};
        exception OverFlow{};
        exception InvalidName{};                                
        LName insert_component(in unsigned long i, 
                                        in LNameComponent n) 
                        raises(NoComponent, OverFlow);
        LNameComponent get_component(in unsigned long i)
                 raises(NoComponent);                           
        LNameComponent delete_component(in unsigned long i)
                 raises(NoComponent);                           
        unsigned long num_components();
        boolean equal(in LName ln);
        boolean less_than(in LName ln);
        Name to_idl_form()
                        raises(InvalidName);                             
        void from_idl_form(in Name n);
        void destroy();
};

LName create_lname();                      // C/C++
LNameComponent create_lname_component();   // C/C++
*/

// CosEventComm Module, CORBAservices p 4-8, Event Service V1.0 3/94

module CosEventComm {

        exception Disconnected{};

        interface PushConsumer {
                void push (in any data) raises(Disconnected);
                void disconnect_push_consumer(); 
        };

    interface PushSupplier {
                void disconnect_push_supplier();
        };

        interface PullSupplier {
                any pull () raises(Disconnected);
                any try_pull (out boolean has_event) 
                        raises(Disconnected);
                void     disconnect_pull_supplier(); 
        };

        interface PullConsumer {
                void disconnect_pull_consumer();
        };

};

// CosEventChannelAdmin Module, p 4-15 CORBAservices, Event
// Service V1.0, 3/94

// #include "CosEventComm.idl"

module CosEventChannelAdmin {

        exception AlreadyConnected {};
        exception TypeError {};

        interface ProxyPushConsumer: ::COSS::CosEventComm::PushConsumer {
                void connect_push_supplier(
                                in ::COSS::CosEventComm::PushSupplier push_supplier)
                        raises(AlreadyConnected);
        };

        interface ProxyPullSupplier: ::COSS::CosEventComm::PullSupplier {
                void connect_pull_consumer(
                                in ::COSS::CosEventComm::PullConsumer pull_consumer)
                        raises(AlreadyConnected);
        };

        interface ProxyPullConsumer: ::COSS::CosEventComm::PullConsumer {
                void connect_pull_supplier(
                                in ::COSS::CosEventComm::PullSupplier pull_supplier)
                        raises(AlreadyConnected,TypeError);
        };

        interface ProxyPushSupplier: ::COSS::CosEventComm::PushSupplier {
	  void connect_push_consumer(
				     in ::COSS::CosEventComm::PushConsumer 
				     push_consumer)
	    raises(AlreadyConnected, TypeError);
        };

	
        interface ConsumerAdmin {
	  ProxyPushSupplier obtain_push_supplier();
	  ProxyPullSupplier obtain_pull_supplier();
        };

        interface SupplierAdmin {
                ProxyPushConsumer obtain_push_consumer();
                ProxyPullConsumer obtain_pull_consumer();
        };

        interface EventChannel {
                ConsumerAdmin for_consumers();
                SupplierAdmin for_suppliers();
                void destroy();
        };

};


// CosTyped Event Module, p 4-22 CORBAservices, Event Service
// V1.0, 3/94

// // #include "CosEventComm.idl" 

module CosTypedEventComm {

        interface TypedPushConsumer : ::COSS::CosEventComm::PushConsumer {
                Object get_typed_consumer(); 
        };

        interface TypedPullSupplier : ::COSS::CosEventComm::PullSupplier {               
                Object get_typed_supplier();
        };

}; 

// CosTypedEventChannelAdmin Module, p 4- 25 CORBAservices,
// Event Service V1.0, 3/94

// // #include "CosEventChannel.idl" 
// // #include "CosTypedEventComm.idl"
module CosTypedEventChannelAdmin {       
        exception InterfaceNotSupported {}; 
        exception NoSuchImplementation {}; 
        typedef string Key; 

        interface TypedProxyPushConsumer :      
                        ::COSS::CosEventChannelAdmin::ProxyPushConsumer,        
                        ::COSS::CosTypedEventComm::TypedPushConsumer  { }; 

        interface TypedProxyPullSupplier :
                        ::COSS::CosEventChannelAdmin::ProxyPullSupplier,        
                        ::COSS::CosTypedEventComm::TypedPullSupplier { }; 

        interface TypedSupplierAdmin :                  
                        ::COSS::CosEventChannelAdmin::SupplierAdmin { 
                TypedProxyPushConsumer obtain_typed_push_consumer(
                                in Key supported_interface)                 
                        raises(InterfaceNotSupported); 
                ::COSS::CosEventChannelAdmin::ProxyPullConsumer obtain_typed_pull_consumer ( 
                                in Key uses_interface)             
                         raises(NoSuchImplementation); 
        }; 

        interface TypedConsumerAdmin : 
                        ::COSS::CosEventChannelAdmin::ConsumerAdmin { 
                TypedProxyPullSupplier obtain_typed_pull_supplier( 
                                in Key supported_interface)                 
                        raises (InterfaceNotSupported); 
                ::COSS::CosEventChannelAdmin::ProxyPushSupplier obtain_typed_push_supplier(                   
                                in Key uses_interface)              
                        raises(NoSuchImplementation); 
        }; 

        interface TypedEventChannel { 
                TypedConsumerAdmin for_consumers();             
                TypedSupplierAdmin for_suppliers();                
                void destroy (); 
        }; 
};


// CosPersistencePID Module, p 5-20 CORBAservices, 
// Persistent Object Service V1.0, 3/94

//#ifndef __COSPERSISTENCE
//#define __COSPERSISTENCE

module CosPersistencePID {

        interface PID {
                attribute string datastore_type;
                string get_PIDString();
        };
};


// CosPersistencePDS Module, p 5-20 CORBAservices, 
// Persistent Object Service V1.0, 3/94

// #include "CosPersistencePID.idl"

module CosPersistencePDS {

// interface Object;
        interface PDS {
                PDS     connect (in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void disconnect (in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void store (in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void restore (in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void delete (in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
        };
};


// CosPersistencePO Module, p 5-12 CORBAservices,
// Persistent Object Service V1.0, 3/94

// // #include "CosPersistencePDS.idl"
// CosPersistencePDS.idl 
// // #includes CosPersistencePID.idl

module CosPersistencePO {

        interface PO {
                attribute ::COSS::CosPersistencePID::PID p;
                ::COSS::CosPersistencePDS::PDS connect (
                        in ::COSS::CosPersistencePID::PID p);
                void disconnect (in ::COSS::CosPersistencePID::PID p);
                void store (in ::COSS::CosPersistencePID::PID p);
                void restore (in ::COSS::CosPersistencePID::PID p);
                void delete (in ::COSS::CosPersistencePID::PID p);
        };

        interface SD {
                void pre_store();
                void post_restore();
        };
};


// CosPersistencePOM Module, p 5-15 CORBAservices,
// Persistent Object Service V1.0, 3/94

// #include "CosPersistencePDS.idl"

// CosPersistencePDS.idl // #includes CosPersistencePID.idl

module CosPersistencePOM {

// interface Object;        

	interface POM {
                ::COSS::CosPersistencePDS::PDS connect (
                        in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void disconnect (
                        in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void store (
                        in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void restore (
                        in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
                void delete (
                        in Object obj, 
                        in ::COSS::CosPersistencePID::PID p);
 	       };
	};

// CosPersistencePDS_DA Module, p 5-22 CORBAservices,
// Persistent Object Service, V1.0, 3/94

// #include "CosPersistencePDS.idl"
// CosPersistencePDS.idl // #includes CosPersistencePID.idl

module CosPersistencePDS_DA {

        typedef string DAObjectID;

        interface PID_DA : ::COSS::CosPersistencePID::PID {
                attribute DAObjectID oid;
        };
        
        interface DAObject {
                boolean dado_same(in DAObject d);
                DAObjectID dado_oid();
                PID_DA dado_pid();
                void dado_remove();
                void dado_free();
        };

        interface DAObjectFactory {
                DAObject create();
        };

        interface DAObjectFactoryFinder {
                DAObjectFactory find_factory(in string key);
        };

        interface PDS_DA : ::COSS::CosPersistencePDS::PDS {
                DAObject get_data();
                void set_data(in DAObject new_data);
                DAObject lookup(in DAObjectID id);
                PID_DA get_pid();
                PID_DA get_object_pid(in DAObject dao);
                DAObjectFactoryFinder data_factories();
        };

        typedef sequence<string> AttributeNames;
        interface DynamicAttributeAccess {
                AttributeNames attribute_names();
                any attribute_get(in string name);
                void attribute_set(in string name, in any value);
        };

        typedef string ClusterID;
        typedef sequence<ClusterID> ClusterIDs;
        interface PDS_ClusteredDA : PDS_DA{
                ClusterID cluster_id();
                string cluster_kind();
                ClusterIDs clusters_of();
                PDS_ClusteredDA create_cluster(in string kind);
                PDS_ClusteredDA open_cluster(in ClusterID cluster);
                PDS_ClusteredDA copy_cluster(
                        in PDS_DA source);
        };
};

// CosPersistenceDDO Module, p 5-32 CORBAservices, Persistent Object Service V1.0, 3/94

// #include "CosPersistencePID.idl"
module CosPersistenceDDO {

        interface DDO {
                attribute string object_type;
                attribute ::COSS::CosPersistencePID::PID p;
                short add_data();
                short add_data_property (in short data_id);
                short get_data_count();
                short get_data_property_count (in short data_id);
                void get_data_property (in short data_id,
                        in short property_id,
                        out string property_name,
                        out any property_value);
                void set_data_property (in short data_id,
                        in short property_id,
                        in string property_name,
                        in any property_value);
                void get_data (in short data_id,
                        out string data_name,
                        out any data_value);
                void set_data (in short data_id,
                        in string data_name,
                        in any data_value);
        };
};

// CosPersistenceDS_CLI module, p 5-34 CORBAservices,
// Persistent Object Service V1.0, 3/94

// #include "CosPersistenceDDO.idl"
// CosPersistenceDDO.idl // #includes CosPersistencePID.idl

module CosPersistenceDS_CLI {
        interface UserEnvironment {
                void set_option (in long option,in any value);
                void get_option (in long option,out any value);
                void release();
        };

        interface Connection {
                void set_option (in long option,in any value);
                void get_option (in long option,out any value);
        };

        interface ConnectionFactory {
                Connection create_object (
                        in UserEnvironment user_envir);
        };

        interface Cursor { 
                void set_position (in long position,in any value);
                ::COSS::CosPersistenceDDO::DDO fetch_object();
        };

        interface CursorFactory {
                Cursor create_object (
                        in Connection connection);
        };

        interface PID_CLI : ::COSS::CosPersistencePID::PID {
                attribute string datastore_id;
                attribute string id;
        };



        interface Datastore_CLI {
                void connect (in Connection connection,
                        in string datastore_id,
                        in string user_name,
                        in string authentication);
                void disconnect (in Connection connection);
                Connection get_connection (
                        in string datastore_id,
                        in string user_name);
                void add_object (in Connection connection,
                        in ::COSS::CosPersistenceDDO::DDO data_obj);
                void delete_object (
                        in Connection connection,
                        in ::COSS::CosPersistenceDDO::DDO data_obj);
                void update_object (
                        in Connection connection,
                        in ::COSS::CosPersistenceDDO::DDO data_obj);
                void retrieve_object(
                        in Connection connection,
                        in ::COSS::CosPersistenceDDO::DDO data_obj);
                Cursor select_object(
                        in Connection connection,
                        in string key);
                void transact (in UserEnvironment user_envir,
                        in short completion_type);
                void assign_PID (in PID_CLI p);
                void assign_PID_relative (
                        in PID_CLI source_pid,
                        in PID_CLI target_pid);
                boolean is_identical_PID (
                        in PID_CLI pid_1,
                        in PID_CLI pid_2);
                string get_object_type (in PID_CLI p);
                void register_mapping_schema (in string schema_file); 
                Cursor execute (in Connection connection,
                        in string command); 
        };

};


// CosLifeCycle Module, p 6-10 CORBAservices, LifeCycle Service V1.0, 3/94

// #include "Naming.idl"

module CosLifeCycle 
{
        typedef ::COSS::CosNaming::Name Key; 
        typedef Object Factory;
        typedef sequence <Factory> Factories;
        typedef struct NVP {     
                ::COSS::CosNaming::Istring  name; 
                any     value; 
        } NameValuePair;
        typedef sequence <NameValuePair> Criteria;

        exception NoFactory {
                Key search_key;
        };
        exception NotCopyable { string reason; };
        exception NotMovable { string reason; };
        exception NotRemovable { string reason; };
        exception InvalidCriteria{ 
                Criteria invalid_criteria;
        };
        exception CannotMeetCriteria {
                Criteria unmet_criteria;
        };


        interface FactoryFinder {
                Factories find_factories(in Key factory_key)
                        raises(NoFactory);
        };

        interface LifeCycleObject {
                LifeCycleObject copy(in FactoryFinder there, 
                                in Criteria the_criteria)
                        raises(NoFactory, NotCopyable, InvalidCriteria,
                                 CannotMeetCriteria);
                void move(in FactoryFinder there, 
                                in Criteria the_criteria)
                        raises(NoFactory, NotMovable, InvalidCriteria,
                                 CannotMeetCriteria);
                void remove()
                        raises(NotRemovable);
        };

        interface GenericFactory {              
                boolean supports(in Key k);
                Object create_object(                   
                                in Key k, 
                                in Criteria the_criteria)                          
                        raises (NoFactory, InvalidCriteria,                                                                             
                                CannotMeetCriteria);
        };
};



// LifeCycleService Module, p 6- 55 CORBAservices, Life Cycle
// Service V1.0, 3/94

// #include "LifeCycle.idl" 

module LifeCycleService {

        typedef sequence <::COSS::CosLifeCycle::NameValuePair> PolicyList;
        typedef sequence <::COSS::CosLifeCycle::Key> Keys;
        typedef sequence <::COSS::CosLifeCycle::NameValuePair> PropertyList; 
        typedef sequence <::COSS::CosNaming::NameComponent> NameComponents;

        interface LifeCycleServiceAdmin {

                attribute PolicyList policies;

                void bind_generic_factory(
                                in ::COSS::CosLifeCycle::GenericFactory gf,
                                in ::COSS::CosNaming::NameComponent name,
                                in Keys key_set,
                                in PropertyList other_properties)
                        raises (::COSS::CosNaming::NamingContext::AlreadyBound, ::COSS::CosNaming::NamingContext::InvalidName);

                void unbind_generic_factory(
                                in ::COSS::CosNaming::NameComponent name)
                        raises (::COSS::CosNaming::NamingContext::NotFound, ::COSS::CosNaming::NamingContext::InvalidName);

               ::COSS::CosLifeCycle::GenericFactory resolve_generic_factory(
                                in ::COSS::CosNaming::NameComponent name)
                        raises (::COSS::CosNaming::NamingContext::NotFound, ::COSS::CosNaming::NamingContext::InvalidName);

                NameComponents list_generic_factories();

                boolean match_service (in ::COSS::CosLifeCycle::GenericFactory f);

                string get_hint();

                void get_link_properties(
                                in ::COSS::CosNaming::NameComponent name,
                                out Keys key_set,
                                out PropertyList other_properties)
                        raises (::COSS::CosNaming::NamingContext::NotFound, ::COSS::CosNaming::NamingContext::InvalidName);
        };
};

// CosTransactions Module, p 10-66
// CORBAservices, Transaction Service V1.0, 3/94

module CosTransactions {
// DATATYPES
enum Status {
        StatusActive,
        StatusMarkedRollback,
        StatusPrepared,
        StatusCommitted,
        StatusRolledBack,
        StatusUnknown,
        StatusNoTransaction
};

enum Vote {
        VoteCommit,
        VoteRollback,
        VoteReadOnly
};

// Standard exceptions
exception TransactionRequired {};
exception TransactionRolledBack {};
exception InvalidTransaction {};

// Heuristic exceptions
exception HeuristicRollback {};
exception HeuristicCommit {};
exception HeuristicMixed {};
exception HeuristicHazard {};

// Exception from Orb operations
exception WrongTransaction {};

// Other transaction-specific exceptions
exception SubtransactionsUnavailable {};
exception NotSubtransaction {};
exception Inactive {};
exception NotPrepared {};
exception NoTransaction {};
exception InvalidControl {};
exception Unavailable {};

// Forward references for interfaces defined later in module
interface Control;
interface Terminator;
interface Coordinator;
interface Resource;
interface RecoveryCoordinator;
interface SubtransactionAwareResource;
interface TransactionFactory; 
interface TransactionalObject; 
interface Current;

// Current transaction pseudo object (PIDL)
	interface Current {
        void begin()
                raises(SubtransactionsUnavailable);
        void commit(in boolean report_heuristics)
                raises(
                        NoTransaction,
                        HeuristicMixed,
                        HeuristicHazard
                );
        void rollback()
                raises(NoTransaction);
        void rollback_only()
                raises(NoTransaction);

        Status get_status();
        string get_transaction_name();
        void set_timeout(in unsigned long seconds);

        Control get_control();
        Control suspend();
        void resume(in Control which)
                raises(InvalidControl);
	};

	interface TransactionFactory {
	        Control create(in unsigned long time_out);
	};

	interface Control {
 	       Terminator get_terminator()
  	              raises(Unavailable);
   	     Coordinator get_coordinator()
    	            raises(Unavailable);
	};

	interface Terminator {
	        void commit(in boolean report_heuristics)
                raises(
                        HeuristicMixed,
                        HeuristicHazard
                );
     	   void rollback();
	};


	interface Coordinator {

        Status get_status();
        Status get_parent_status();
        Status get_top_level_status();

        boolean is_same_transaction(in Coordinator tc);
        boolean is_related_transaction(in Coordinator tc);
        boolean is_ancestor_transaction(in Coordinator tc);
        boolean is_descendant_transaction(in Coordinator tc);
        boolean is_top_level_transaction();

        unsigned long hash_transaction();
        unsigned long hash_top_level_tran();

        RecoveryCoordinator register_resource(in Resource r)
                raises(Inactive);

        void register_subtran_aware(in SubtransactionAwareResource r)
                raises(Inactive, NotSubtransaction);

        void rollback_only()
                raises(Inactive);

        string get_transaction_name();

        Control create_subtransaction()
                raises(SubtransactionsUnavailable, Inactive);
	};

	interface RecoveryCoordinator {
     	   Status replay_completion(in Resource r)
                raises(NotPrepared);
	};

}; // end module CosTransactions


// CosConcurrency Control Module, p 7-8 CORBAservices, 
// Concurrency Control Service V1.0, 3/94

// #include <CosTransactions.idl>
module CosConcurrencyControl {

    enum lock_mode {
        read,
        write,
        upgrade,
        intention_read,
        intention_write
    };

    exception LockNotHeld{};

    interface LockCoordinator
    {
                void drop_locks();
    };

    interface LockSet
    {
        void lock(in lock_mode mode);
        boolean try_lock(in lock_mode mode);

        void unlock(in lock_mode mode)
            raises(LockNotHeld);
        void change_mode(in lock_mode held_mode,
                         in lock_mode new_mode)
           raises(LockNotHeld);
        LockCoordinator get_coordinator(
            in ::COSS::CosTransactions::Coordinator which);
    };

    interface TransactionalLockSet
    {
        void lock(in ::COSS::CosTransactions::Coordinator current,
                  in lock_mode mode);
        boolean try_lock(in ::COSS::CosTransactions::Coordinator current,
                         in lock_mode mode);
        void unlock(in ::COSS::CosTransactions::Coordinator current,
                    in lock_mode mode)
           raises(LockNotHeld);
        void change_mode(in ::COSS::CosTransactions::Coordinator current,
                         in lock_mode held_mode,
                         in lock_mode new_mode)
           raises(LockNotHeld);
        LockCoordinator get_coordinator(
            in ::COSS::CosTransactions::Coordinator which);
    };

    interface LockSetFactory
    {
        LockSet create();
        LockSet create_related(in LockSet which);
        TransactionalLockSet create_transactional();
        TransactionalLockSet create_transactional_related(in
            TransactionalLockSet which);
    };
};

// CosObjectIdentity Module, p 9-19 CORBAservices, Relationship
// Service V1.0, 3/94


module CosObjectIdentity {

        typedef unsigned long ObjectIdentifier;

        interface IdentifiableObject {
                        readonly attribute ObjectIdentifier constant_random_id;
                        boolean is_identical (
                                in IdentifiableObject other_object);
        };

};


// CosRelationships Module, p 9-21 CORBAservices, Relationship
// Service V1.0, 3/94

// #include <ObjectIdentity.idl>

module CosRelationships {

        interface RoleFactory; 
        interface RelationshipFactory; 
        interface Relationship; 
        interface Role;
        interface RelationshipIterator;

        typedef Object RelatedObject;
        typedef sequence<Role> Roles;
        typedef string RoleName;
        typedef sequence<RoleName> RoleNames;

        struct NamedRole {RoleName name; Role aRole;};
        typedef sequence<NamedRole> NamedRoles;

        struct RelationshipHandle {
                        Relationship the_relationship;
                        ::COSS::CosObjectIdentity::ObjectIdentifier constant_random_id;
        };
        typedef sequence<RelationshipHandle> RelationshipHandles;

        interface RelationshipFactory {
                        struct NamedRoleType {
                                RoleName name;
                                        ::CORBA::InterfaceDef named_role_type;
                        };
                        typedef sequence<NamedRoleType> NamedRoleTypes;
                        readonly attribute ::CORBA::InterfaceDef relationship_type;
                        readonly attribute unsigned short degree;
                        readonly attribute NamedRoleTypes named_role_types;
                        exception RoleTypeError {NamedRoles culprits;};
                        exception MaxCardinalityExceeded {
                                NamedRoles culprits;};
                        exception DegreeError {unsigned short required_degree;};
                        exception DuplicateRoleName {NamedRoles culprits;};
                        exception UnknownRoleName {NamedRoles culprits;};

                        Relationship create (in NamedRoles named_roles)
                                        raises (RoleTypeError,
                                                MaxCardinalityExceeded,
                                                DegreeError,
                                                DuplicateRoleName,
                                                UnknownRoleName);
        };

        interface Relationship :                                                
                                ::COSS::CosObjectIdentity::IdentifiableObject {
                        exception CannotUnlink {
                                Roles offending_roles;
                        };
                        readonly attribute NamedRoles named_roles;
                        void destroy () raises(CannotUnlink);
        };

        interface Role {
                        exception UnknownRoleName {};
                        exception UnknownRelationship {};
                        exception RelationshipTypeError {};
                        exception CannotDestroyRelationship {
                                RelationshipHandles offenders;
                        };
                        exception ParticipatingInRelationship {
                                RelationshipHandles the_relationships;
                        };
                        readonly attribute RelatedObject related_object;
                        RelatedObject get_other_related_object (
                                                in RelationshipHandle rel,
                                                in RoleName target_name)
                                raises (UnknownRoleName,
                                                UnknownRelationship);
                        Role get_other_role (in RelationshipHandle rel, 
                                                in RoleName target_name)
                                raises (UnknownRoleName, UnknownRelationship);
                        void get_relationships (
                                                in unsigned long how_many,
                                                out RelationshipHandles rels,
                                                out RelationshipIterator iterator);
                        void destroy_relationships()
                                raises(CannotDestroyRelationship);
                        void destroy() raises(ParticipatingInRelationship);
                        boolean check_minimum_cardinality ();
                        void link (in RelationshipHandle rel,
                                                in NamedRoles named_roles)
                                        raises(RelationshipFactory::MaxCardinalityExceeded,
                                                RelationshipTypeError);
                        void unlink (in RelationshipHandle rel)
                                raises (UnknownRelationship);
        };

        interface RoleFactory {
                        exception NilRelatedObject {};
                        exception RelatedObjectTypeError {};
                        readonly attribute ::CORBA::InterfaceDef role_type;
                        readonly attribute unsigned long max_cardinality;
                        readonly attribute unsigned long min_cardinality;
// the following isn't allowed in IDL,
//  readonly attribute sequence <::CORBA::InterfaceDef> related_object_types;
			typedef sequence <::CORBA::InterfaceDef> InterfaceDefSeq;
			readonly attribute InterfaceDefSeq related_object_types;
                        Role create_role (in RelatedObject related_object)
                                raises (NilRelatedObject, RelatedObjectTypeError);
        };

        interface RelationshipIterator {
                        boolean next_one (out RelationshipHandle rel);
                        boolean next_n (in unsigned long how_many,
                                                out RelationshipHandles rels);
                        void destroy ();
        };

};

// CosCompoundExternalization Module, p 8-20 CORBAservices,
// Externalization Service V1.0, 3/94

// #include <Graphs.idl>
// #include <Stream.idl>

// CosGraphs Module, p 9-39 CORBAservices, Relationship Service
// V1.0, 3/94

// #include <Relationships.idl>
// #include <ObjectIdentity.idl>

module CosGraphs {

                interface TraversalFactory; 
                interface Traversal;
                interface TraversalCriteria;
                interface Node;
                interface NodeFactory;
                interface Role; 
                interface EdgeIterator; 
                                
                struct NodeHandle {
                        Node the_node;
                        ::COSS::CosObjectIdentity::ObjectIdentifier constant_random_id;
                };
                typedef sequence<NodeHandle> NodeHandles;
                                
                struct NamedRole {
                        Role the_role;  
		  ::COSS::CosRelationships::RoleName the_name;
                };
                typedef sequence<NamedRole> NamedRoles;

                struct EndPoint {
                        NodeHandle the_node;
                        NamedRole the_role;
                };
                typedef sequence<EndPoint> EndPoints;

                struct Edge {
                        EndPoint from;
                        ::COSS::CosRelationships::RelationshipHandle the_relationship;
                        EndPoints relatives;
                };
                typedef sequence<Edge> Edges;

                enum PropagationValue {deep, shallow, none, inhibit};
                enum Mode {depthFirst, breadthFirst, bestFirst};

                interface TraversalFactory {
                        Traversal create_traversal_on (
                                        in NodeHandle root_node,
                                        in TraversalCriteria the_criteria,
                                        in Mode how);
                };

                interface Traversal {
                        typedef unsigned long TraversalScopedId;
                        struct ScopedEndPoint {
                                EndPoint point;
                                TraversalScopedId id;
                        };
                        typedef sequence<ScopedEndPoint> ScopedEndPoints;
                        struct ScopedRelationship {
                                ::COSS::CosRelationships::RelationshipHandle
                                        scoped_relationship;
                                TraversalScopedId id;
                        };
                        struct ScopedEdge {
                                ScopedEndPoint from;
                                ScopedRelationship the_relationship;
                                ScopedEndPoints relatives;
                        };
                        typedef sequence<ScopedEdge> ScopedEdges;
                        boolean next_one (out ScopedEdge the_edge);
                        boolean next_n (in short how_many,
                                        out ScopedEdges the_edges);
                        void destroy ();
                };
                                
                interface TraversalCriteria {
                        struct WeightedEdge {
                                Edge the_edge;
                                unsigned long weight;
                                sequence<NodeHandle> next_nodes;
                        };
                        typedef sequence<WeightedEdge> WeightedEdges;
                        void visit_node(in NodeHandle a_node,
                                        in Mode search_mode);
                        boolean next_one (out WeightedEdge the_edge);
                        boolean next_n (in short how_many, 
                                        out WeightedEdges the_edges);
                        void destroy();
                };
                                
                interface Node: ::COSS::CosObjectIdentity::IdentifiableObject {
                        typedef sequence<Role> Roles;
                        exception NoSuchRole {};
                        exception DuplicateRoleType {};
                                
                        readonly attribute ::COSS::CosRelationships::RelatedObject
                                 related_object;
                        readonly attribute Roles roles_of_node;
                        Roles roles_of_type ( 
                                        in ::CORBA::InterfaceDef role_type);
                        void add_role (in Role a_role)
                                        raises (DuplicateRoleType);
                        void remove_role (in ::CORBA::InterfaceDef of_type)
                                raises (NoSuchRole);
                };
                                
                interface NodeFactory {
                        Node create_node (in Object related_object);
                };
                                
                interface Role : ::COSS::CosRelationships::Role {
                        void get_edges ( in long how_many,
                                        out Edges the_edges,
                                        out EdgeIterator the_rest);
                };
                                
                interface EdgeIterator {
                        boolean next_one (out Edge the_edge);
                        boolean next_n ( in unsigned long how_many,
                                        out Edges the_edges);
                        void destroy ();
                };
                                
};



// CosStream Module, 8-15 CORBAservices, 
// Externalization Service V1.0, 3/94

// #include <LifeCycle.idl>
// #include <ObjectIdentity.idl>
// #include <CompoundExternalization.idl>
module CosStream {
                exception ObjectCreationError{};
                exception StreamDataFormatError{};
                interface StreamIO;

                interface Streamable: ::COSS::CosObjectIdentity::IdentifiableObject
		{
                        readonly attribute ::COSS::CosLifeCycle::Key external_form_id;
                        void externalize_to_stream(
                                        in StreamIO targetStreamIO);
                        void internalize_from_stream(
                                        in StreamIO sourceStreamIO,
                                        in ::COSS::CosLifeCycle::FactoryFinder there)
				raises( ::COSS::CosLifeCycle::NoFactory,
                                        ObjectCreationError,
                                        StreamDataFormatError );
                };

                interface StreamableFactory {
                        Streamable create_uninitialized();
                };


                interface StreamIO {
                        void write_string(in string aString);
                        void write_char(in char aChar);
                        void write_octet(in octet anOctet);
                        void write_unsigned_long(
                                        in unsigned long anUnsignedLong);
                        void write_unsigned_short(
                                        in unsigned short anUnsignedShort);
                        void write_long(in long aLong);
                        void write_short(in short aShort);
                        void write_float(in float aFloat);
                        void write_double(in double aDouble);
                        void write_boolean(in boolean aBoolean);
                        void write_object(in Streamable aStreamable);
			//                        void write_graph(in ::COSS::CosCompoundExternalization::Node aNode);
                        string read_string() 
                                raises(StreamDataFormatError);
                        char read_char()                        
                                raises(StreamDataFormatError );
                        octet read_octet()
                                raises(StreamDataFormatError );
                        unsigned long read_unsigned_long() 
                                        raises(StreamDataFormatError );
                        unsigned short read_unsigned_short()
                                raises(         StreamDataFormatError );
                        long read_long()                
                                raises(StreamDataFormatError );
                        short read_short()
                                raises(StreamDataFormatError );
                        float read_float()
                                raises(StreamDataFormatError );
                        double read_double()
                                raises(StreamDataFormatError );
                        boolean read_boolean()
                                raises(StreamDataFormatError );
                        Streamable read_object(
                                        in ::COSS::CosLifeCycle::FactoryFinder there,
                                        in Streamable aStreamable)
                                raises(StreamDataFormatError );
//                         void read_graph(
//                                         in ::COSS::CosCompoundExternalization::Node starting_node,
//                                         in ::COSS::CosLifeCycle::FactoryFinder there)
//                                 raises(StreamDataFormatError );
                };
};

module CosCompoundExternalization {
        interface Node;
        interface Role;
        interface Relationship;
        interface PropagationCriteriaFactory;
        
        struct RelationshipHandle {
                        Relationship theRelationship;
                        ::COSS::CosObjectIdentity::ObjectIdentifier constantRandomId;
        };

        interface Node : ::COSS::CosGraphs::Node, ::COSS::CosStream::Streamable{
                        void externalize_node (in ::COSS::CosStream::StreamIO sio);
                        void internalize_node (in ::COSS::CosStream::StreamIO sio,
                                                in ::COSS::CosLifeCycle::FactoryFinder there,
                                                out ::COSS::CosGraphs::Node::Roles rolesOfNode)
                                raises (::COSS::CosLifeCycle::NoFactory);
                };

        interface Role : ::COSS::CosGraphs::Role {
                        void externalize_role (in ::COSS::CosStream::StreamIO sio); 
                        void internalize_role (in ::COSS::CosStream::StreamIO sio); 
                        ::COSS::CosGraphs::PropagationValue externalize_propagation (
                                                in RelationshipHandle rel,
                                                in ::COSS::CosRelationships::RoleName toRoleName,
                                                out boolean sameForAll);
                };

        interface Relationship : 
                                ::COSS::CosRelationships::Relationship {
                  void externalize_relationship (
			in ::COSS::CosStream::StreamIO sio);
			void internalize_relationship(
				in ::COSS::CosStream::StreamIO sio,
				in ::COSS::CosGraphs::NamedRoles newRoles);
                        ::COSS::CosGraphs::PropagationValue externalize_propagation (
				in ::COSS::CosRelationships::RoleName fromRoleName,
				in ::COSS::CosRelationships::RoleName toRoleName,
				out boolean sameForAll);
        };

        interface PropagationCriteriaFactory {
                        ::COSS::CosGraphs::TraversalCriteria create_for_externalize( );
        };

};

// CosExternalization Module, 8-12 CORBAservices,
// Externalization Service V1.0, 3/94


// #include <LifeCycle.idl>
// #include <Stream.idl>
module CosExternalization {
                exception InvalidFileNameError{};
                exception ContextAlreadyRegistered{};
                interface Stream: ::COSS::CosLifeCycle::LifeCycleObject{
                        void externalize(
                                        in ::COSS::CosStream::Streamable theObject);
                        ::COSS::CosStream::Streamable internalize( 
                                        in ::COSS::CosLifeCycle::FactoryFinder there)
                                raises( ::COSS::CosLifeCycle::NoFactory,
                                        ::COSS::CosStream::StreamDataFormatError );
                        void begin_context()
                                raises( ContextAlreadyRegistered);
                        void end_context(); 
                        void flush();
                };
                interface StreamFactory {
                        Stream create();
                };
                interface FileStreamFactory {
                        Stream create(
                                        in string theFileName) 
                                raises( InvalidFileNameError );
                };
};

// CosContainment Module, p 9- 48 CORBAservices, Relationship
// Service V1.0, 3/94

// #include <Graphs.idl>

module CosContainment {

        interface Relationship :
                        ::COSS::CosRelationships::Relationship {};

        interface ContainsRole : ::COSS::CosGraphs::Role {};

        interface ContainedInRole : ::COSS::CosGraphs::Role {};

};

//  CosExternalizationContainment Module, p 8-26 CORBAservices,
// Externalization Service V1.0, 3/94

// #include <Containment.idl>
// #include <CompoundExternalization.idl>

module CosExternalizationContainment {

        interface Relationship : 
                        ::COSS::CosCompoundExternalization::Relationship,
                        ::COSS::CosContainment::Relationship {};

        interface ContainsRole : 
                        ::COSS::CosCompoundExternalization::Role,
                        ::COSS::CosContainment::ContainsRole {};

        interface ContainedInRole : 
                        ::COSS::CosCompoundExternalization::Role,
                        ::COSS::CosContainment::ContainedInRole {};
};

// CosReference Module, p 9-50 CORBAservices,
//  Relationship Service V1.0, 3/94

// #include <Graphs.idl>

module CosReference {

        interface Relationship : 
                        ::COSS::CosRelationships::Relationship {};

        interface ReferencesRole : ::COSS::CosGraphs::Role {};

        interface ReferencedByRole : ::COSS::CosGraphs::Role {};

};

// CosExternalizationReference Module, p 8-28 CORBAservices, 
// Externalization Service V1.0, 3/94

// #include <Reference.idl>
// #include <CompoundExternalization.idl>

module CosExternalizationReference {

        interface Relationship : 
                        ::COSS::CosCompoundExternalization::Relationship,
                        ::COSS::CosReference::Relationship {};

        interface ReferencesRole : 
                        ::COSS::CosCompoundExternalization::Role,
                        ::COSS::CosReference::ReferencesRole {};

        interface ReferencedByRole : 
                        ::COSS::CosCompoundExternalization::Role,
                        ::COSS::CosReference::ReferencedByRole {};
};

// PIDL for CosTSInteroperation Module, p 10-59 
// CORBAservices, Transaction Service V1.0, 3/94
module CosTSInteroperation { // PIDL
        struct otid_t {
                long formatID; /*format identifier. 0 is OSI TP */
                long bequal_length;
                sequence <octet> tid;
	};
        struct TransIdentity {
                ::COSS::CosTransactions::Coordinator coordinator;
                ::COSS::CosTransactions::Terminator terminator;
                otid_t otid;
	};
        struct PropagationContext {
                unsigned long timeout;
                TransIdentity current;
                sequence <TransIdentity> parents;
                any implementation_specific_data;
        };
};

// PIDL for CosTSPortability Module, p 10-63 
// CORBAservices, Transaction Service V1.0, 3/94

module CosTSPortability { // PIDL
        typedef long ReqId;

        interface Sender {
                void sending_request(in ReqId id,
                        out ::COSS::CosTSInteroperation::PropagationContext ctx);
                void received_reply(in ReqId id,
                        in ::COSS::CosTSInteroperation::PropagationContext ctx, 
                        in ::CORBA::Environment env);
        };

        interface Receiver {
                void received_request(in ReqId id,
                        in ::COSS::CosTSInteroperation::PropagationContext ctx);
                void sending_reply(in ReqId id,
                        out::COSS::CosTSInteroperation::PropagationContext ctx);
        };
};

// CosCompoundLifeCycle Module, p 6-30 CORBAservices,
// Life Cycle Service V1.0, 3/94

// #include <LifeCycle.idl>
// #include <Relationships.idl>
// #include <Graphs.idl>

module CosCompoundLifeCycle {
        interface OperationsFactory; 
        interface Operations;
        interface Node;
        interface Role;
        interface Relationship;
        interface PropagationCriteriaFactory;
        
        enum Operation {copy, move, remove};

        struct RelationshipHandle {
                        Relationship the_relationship;
                        ::COSS::CosObjectIdentity::ObjectIdentifier constant_random_id;
        };

        interface OperationsFactory {
                        Operations create_compound_operations();
        };

        interface Operations {
                        Node copy (
                                                in Node starting_node,
                                                in ::COSS::CosLifeCycle::FactoryFinder there,
                                                in ::COSS::CosLifeCycle::Criteria the_criteria)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotCopyable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        void move (
                                                in Node starting_node,
                                                in ::COSS::CosLifeCycle::FactoryFinder there,
                                                in ::COSS::CosLifeCycle::Criteria the_criteria)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotMovable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        void remove (in Node starting_node)
                                raises (::COSS::CosLifeCycle::NotRemovable);
                        void destroy();
                };

        interface Node : ::COSS::CosGraphs::Node {
                        exception NotLifeCycleObject {};
                        void copy_node ( in ::COSS::CosLifeCycle::FactoryFinder there,
                                                in ::COSS::CosLifeCycle::Criteria the_criteria,
                                                out Node new_node,
                                                out ::COSS::CosGraphs::Node::Roles roles_of_new_node)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotCopyable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        void move_node (in ::COSS::CosLifeCycle::FactoryFinder there, 
                                                in ::COSS::CosLifeCycle::Criteria the_criteria)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotMovable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        void remove_node ()
                                raises (::COSS::CosLifeCycle::NotRemovable);
                        ::COSS::CosLifeCycle::LifeCycleObject get_life_cycle_object()
                                raises (NotLifeCycleObject);
                };

        interface Role : ::COSS::CosGraphs::Role {
                        Role copy_role (in ::COSS::CosLifeCycle::FactoryFinder there, 
                                                in ::COSS::CosLifeCycle::Criteria the_criteria)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotCopyable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        void move_role (in ::COSS::CosLifeCycle::FactoryFinder there, 
                                                in ::COSS::CosLifeCycle::Criteria the_criteria)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotMovable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        ::COSS::CosGraphs::PropagationValue life_cycle_propagation (
                                                in Operation op,
                                                in RelationshipHandle rel,
                                                in ::COSS::CosRelationships::RoleName to_role_name,
                                                out boolean same_for_all);
                };

        interface Relationship : 
                                ::COSS::CosRelationships::Relationship {
                        Relationship copy_relationship (
                                                in ::COSS::CosLifeCycle::FactoryFinder there,
                                                in ::COSS::CosLifeCycle::Criteria the_criteria,
                                                in ::COSS::CosGraphs::NamedRoles new_roles)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotCopyable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        void move_relationship (
                                                in ::COSS::CosLifeCycle::FactoryFinder there,
                                                in ::COSS::CosLifeCycle::Criteria the_criteria)
                                raises (::COSS::CosLifeCycle::NoFactory,
                                                ::COSS::CosLifeCycle::NotMovable,
                                                ::COSS::CosLifeCycle::InvalidCriteria,
                                                ::COSS::CosLifeCycle::CannotMeetCriteria);
                        ::COSS::CosGraphs::PropagationValue life_cycle_propagation (
                                                in Operation op,
                                                in ::COSS::CosRelationships::RoleName from_role_name,
                                                in ::COSS::CosRelationships::RoleName to_role_name,
                                                out boolean same_for_all);
        };

        interface PropagationCriteriaFactory {
                        ::COSS::CosGraphs::TraversalCriteria create(in Operation op);
        };

};

//  CosLifeCycleContainment Module, p 6-42 CORBAservices,
//  Life Cycle Service V1.0, 3/94

// #include <Containment.idl>
// #include <CompoundLifeCycle.idl>

module CosLifeCycleContainment {

        interface Relationship : 
                        ::COSS::CosCompoundLifeCycle::Relationship,
                        ::COSS::CosContainment::Relationship {};

        interface ContainsRole : 
                        ::COSS::CosCompoundLifeCycle::Role,
                        ::COSS::CosContainment::ContainsRole {};

        interface ContainedInRole : 
                        ::COSS::CosCompoundLifeCycle::Role,
                        ::COSS::CosContainment::ContainedInRole {};
};

// CosLifeCycleReference Module, p 6-44 CORBAservices,
// Life Cycle Service V1.0, 3/94

// #include <Reference.idl>
// #include <CompoundLifeCycle.idl>

module CosLifeCycleReference {

        interface Relationship : 
                        ::COSS::CosCompoundLifeCycle::Relationship,
                        ::COSS::CosReference::Relationship {};

        interface ReferencesRole : 
                        ::COSS::CosCompoundLifeCycle::Role,
                        ::COSS::CosReference::ReferencesRole {};

        interface ReferencedByRole : 
                        ::COSS::CosCompoundLifeCycle::Role,
                        ::COSS::CosReference::ReferencedByRole {};
};


}; // end module COSS