summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-26 23:24:00 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-26 23:24:00 +0000
commitedc0808e2d272a74522f8f480a433396f7b0897f (patch)
tree5e44c350c6aab15a314f4543a1c0abf56b6c3208 /TAO/orbsvcs
parent3ed5ed3ee7f8824466cf3534e639904976178c7d (diff)
downloadATCD-ACE-4_4_36.tar.gz
This commit was manufactured by cvs2svn to create tag 'ACE-4_4_36'.ACE-4_4_36
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp72
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp99
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsw29
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Makefile235
-rw-r--r--TAO/orbsvcs/Dump_Schedule/svc.conf49
-rw-r--r--TAO/orbsvcs/Event_Service/Event_Service.cpp119
-rw-r--r--TAO/orbsvcs/Event_Service/Event_Service.dsp147
-rw-r--r--TAO/orbsvcs/Event_Service/Event_Service.dsw29
-rw-r--r--TAO/orbsvcs/Event_Service/Makefile277
-rw-r--r--TAO/orbsvcs/Event_Service/svc.conf49
-rw-r--r--TAO/orbsvcs/Makefile27
-rw-r--r--TAO/orbsvcs/Naming_Service/Makefile48
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Service.cpp100
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Service.dsp111
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Service.dsw29
-rw-r--r--TAO/orbsvcs/Naming_Service/Naming_Service.h59
-rw-r--r--TAO/orbsvcs/Naming_Service/README76
-rw-r--r--TAO/orbsvcs/Naming_Service/svc.conf49
-rw-r--r--TAO/orbsvcs/README1
-rw-r--r--TAO/orbsvcs/Scheduling_Service/Makefile240
-rw-r--r--TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp81
-rw-r--r--TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsp112
-rw-r--r--TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsw29
-rw-r--r--TAO/orbsvcs/Scheduling_Service/svc.conf49
-rw-r--r--TAO/orbsvcs/Trading_Service/Makefile76
-rw-r--r--TAO/orbsvcs/Trading_Service/svc.conf49
-rw-r--r--TAO/orbsvcs/Trading_Service/trader.cpp124
-rw-r--r--TAO/orbsvcs/orbsvcs.dsw89
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp771
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h498
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/sfp.cpp360
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/sfp.h96
-rw-r--r--TAO/orbsvcs/orbsvcs/AVStreams.idl502
-rw-r--r--TAO/orbsvcs/orbsvcs/AVStreams_Full.idl250
-rw-r--r--TAO/orbsvcs/orbsvcs/Channel_Clients.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/Channel_Clients.h26
-rw-r--r--TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp31
-rw-r--r--TAO/orbsvcs/orbsvcs/Channel_Clients_T.h88
-rw-r--r--TAO/orbsvcs/orbsvcs/Channel_Clients_T.i17
-rw-r--r--TAO/orbsvcs/orbsvcs/CosConcurrencyControl.idl187
-rw-r--r--TAO/orbsvcs/orbsvcs/CosLifeCycle.idl114
-rw-r--r--TAO/orbsvcs/orbsvcs/CosNaming.idl207
-rw-r--r--TAO/orbsvcs/orbsvcs/CosPropertyService.idl405
-rw-r--r--TAO/orbsvcs/orbsvcs/CosTimeBase.idl62
-rw-r--r--TAO/orbsvcs/orbsvcs/CosTrading.idl711
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/BCU.cpp31
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/BCU.h36
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.cpp349
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.h236
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i75
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Channel_Clients.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Channel_Clients_T.i35
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Debug_Macros.h11
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.cpp616
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h486
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.i267
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp2779
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Channel.h1305
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Channel.i892
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h53
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/GPlot_File.cpp179
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/GPlot_File.h97
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/GPlot_File.i70
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.cpp9
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h62
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.i5
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp43
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h107
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i54
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp408
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/RT_Task.h178
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/RT_Task.i8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ReactorTask.cpp113
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ReactorTask.h76
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Task_Manager.cpp45
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Task_Manager.h56
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Task_Manager.i30
-rw-r--r--TAO/orbsvcs/orbsvcs/Event_Service_Constants.h98
-rw-r--r--TAO/orbsvcs/orbsvcs/Event_Utilities.cpp131
-rw-r--r--TAO/orbsvcs/orbsvcs/Event_Utilities.h222
-rw-r--r--TAO/orbsvcs/orbsvcs/Event_Utilities.i99
-rw-r--r--TAO/orbsvcs/orbsvcs/Logger.idl21
-rw-r--r--TAO/orbsvcs/orbsvcs/Makefile6308
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp751
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h189
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Entries.cpp106
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Entries.h108
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.cpp105
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.h83
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp150
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h75
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp656
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h363
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.cpp96
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h93
-rw-r--r--TAO/orbsvcs/orbsvcs/RtecEventChannelAdmin.idl70
-rw-r--r--TAO/orbsvcs/orbsvcs/RtecEventComm.idl87
-rw-r--r--TAO/orbsvcs/orbsvcs/RtecScheduler.idl222
-rw-r--r--TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp172
-rw-r--r--TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h96
-rw-r--r--TAO/orbsvcs/orbsvcs/Runtime_Scheduler.i5
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp267
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h94
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.i5
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp1710
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/DynSched.h491
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/DynSched.i112
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp864
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h592
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i397
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Scheduler.cpp279
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Scheduler.h272
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Scheduler.i20
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.cpp262
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h129
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i21
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.cpp1228
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h474
-rw-r--r--TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.i21
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp251
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Factory.h98
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Factory.i6
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Utilities.cpp14
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h46
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Utilities.i32
-rw-r--r--TAO/orbsvcs/orbsvcs/Sequences.idl26
-rw-r--r--TAO/orbsvcs/orbsvcs/Time_Utilities.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/Time_Utilities.h74
-rw-r--r--TAO/orbsvcs/orbsvcs/Time_Utilities.i106
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Admin.cpp322
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Admin.h195
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Attributes.cpp589
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Attributes.h403
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint.cpp49
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint.h66
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.cpp627
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.h166
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.cpp77
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.h70
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.cpp917
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h310
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Tokens.h34
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.cpp469
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.h143
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitor.h79
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp1782
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Constraint_y.cpp907
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.cpp84
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.h90
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Interpreter.cpp54
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Interpreter.h45
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Link.cpp214
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Link.h199
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Locking.h57
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Lookup.cpp775
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Lookup.h311
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Monitor.h86
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.cpp82
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.h87
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.cpp110
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.h92
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.cpp60
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.h92
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.cpp132
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.h85
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.cpp136
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.h79
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Policies.cpp509
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Policies.h289
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.cpp134
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.h77
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.cpp131
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h87
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.cpp223
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.h142
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Property_Filter.cpp98
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Property_Filter.h58
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Proxy.cpp93
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Proxy.h88
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.cpp74
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.h67
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/README60
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Register.cpp384
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Register.h314
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.cpp109
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.h80
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.cpp438
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.h224
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp528
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h305
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Trader.cpp134
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Trader.h112
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Trader_T.cpp114
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Trader_T.h103
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/constraint.l130
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/constraint.y135
-rw-r--r--TAO/orbsvcs/orbsvcs/orbsvcs.dsp619
-rw-r--r--TAO/orbsvcs/orbsvcs/orbsvcs.dsw41
-rw-r--r--TAO/orbsvcs/orbsvcs/orbsvcs_export.h33
-rw-r--r--TAO/orbsvcs/orbsvcs/orbsvcs_lib.dsp519
-rw-r--r--TAO/orbsvcs/orbsvcs/sfp.idl83
-rw-r--r--TAO/orbsvcs/orbsvcs/tmplinst-orbsvcs.cpp24
-rw-r--r--TAO/orbsvcs/tests/AVStreams/Makefile66
-rw-r--r--TAO/orbsvcs/tests/AVStreams/client.cpp599
-rw-r--r--TAO/orbsvcs/tests/AVStreams/client.h117
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/ANNOUNCE45
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/BUGS21
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/COPYING339
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL231
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB105
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel12
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/README142
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/README.MI39
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB105
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/VERSION1
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile37
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO57
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile78
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp472
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h588
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp213
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp372
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp293
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h97
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile374
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp475
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp490
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp3100
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp933
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h475
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h36
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp146
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp394
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h28
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2fast.cpp295
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp308
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h30
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.cpp92
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h67
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp81
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybrid.cpp231
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybriderr.cpp355
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp60
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib78
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib229
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib324
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm9
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib305
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp1457
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp512
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h155
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp252
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp192
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h110
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp285
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered2.cpp323
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/para.cpp371
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp446
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp916
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h128
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp989
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h18
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp461
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h363
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp77
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp1034
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp929
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp3756
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h285
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp916
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile284
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp172
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp118
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp179
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp163
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp163
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp247
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp207
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp201
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp161
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp144
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp130
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp190
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp801
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h168
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h225
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp2026
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h309
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile1371
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp409
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h192
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp529
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h259
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp705
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp249
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp410
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h63
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp2205
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile670
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl105
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.cpp99
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.h53
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp1635
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h111
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp406
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h100
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp367
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h85
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp506
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h54
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp137
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h32
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile258
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp604
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h201
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp261
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1610
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.11
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server.cpp106
-rw-r--r--TAO/orbsvcs/tests/AVStreams/server.h57
-rw-r--r--TAO/orbsvcs/tests/AVStreams/sfp/Makefile66
-rw-r--r--TAO/orbsvcs/tests/AVStreams/sfp/client.cpp48
-rw-r--r--TAO/orbsvcs/tests/AVStreams/sfp/svc.conf49
-rw-r--r--TAO/orbsvcs/tests/AVStreams/svc.conf49
-rw-r--r--TAO/orbsvcs/tests/CosPropertyService/Makefile60
-rw-r--r--TAO/orbsvcs/tests/CosPropertyService/main.cpp591
-rw-r--r--TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp612
-rw-r--r--TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h156
-rw-r--r--TAO/orbsvcs/tests/EC_Multiple/Makefile266
-rw-r--r--TAO/orbsvcs/tests/EC_Multiple/README34
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp926
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp103
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw29
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.h250
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Makefile270
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/svc.conf49
-rw-r--r--TAO/orbsvcs/tests/Logger/Logger.dsw41
-rw-r--r--TAO/orbsvcs/tests/Logger/Makefile271
-rw-r--r--TAO/orbsvcs/tests/Logger/client.dsp89
-rw-r--r--TAO/orbsvcs/tests/Logger/clnt.cpp249
-rw-r--r--TAO/orbsvcs/tests/Logger/clnt.h72
-rw-r--r--TAO/orbsvcs/tests/Logger/logger_i.cpp32
-rw-r--r--TAO/orbsvcs/tests/Logger/logger_i.h35
-rw-r--r--TAO/orbsvcs/tests/Logger/server.dsp93
-rw-r--r--TAO/orbsvcs/tests/Logger/svc.conf49
-rw-r--r--TAO/orbsvcs/tests/Logger/svr.cpp109
-rw-r--r--TAO/orbsvcs/tests/Makefile31
-rw-r--r--TAO/orbsvcs/tests/Sched/DynSched_Test.cpp235
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/Makefile225
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw29
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/client.dsp88
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/clnt.cpp128
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/clnt.h58
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/svc.conf49
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/Makefile92
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.cpp407
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.h101
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/Offer_Importer.cpp123
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/Offer_Importer.h63
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/TT_Info.cpp306
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/TT_Info.h147
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/TTest.idl28
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/export_test.cpp128
-rw-r--r--TAO/orbsvcs/tests/Trading_Service/import_test.cpp47
370 files changed, 0 insertions, 102922 deletions
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp
deleted file mode 100644
index 18be67cb507..00000000000
--- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// $Id$
-//
-
-#include "ace/Sched_Params.h"
-#include "ace/Get_Opt.h"
-#include "tao/corba.h"
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/Scheduler_Factory.h"
-
-// This program dumps the results of one scheduling in a C++ file.
-
-
-
-int main (int argc, char *argv[])
-{
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil(poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil(naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_Scheduler_Factory::use_config (naming_context.in ());
-
- RtecScheduler::RT_Info_Set_var infos;
- ACE_Scheduler_Factory::server ()->compute_scheduling
- (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO,
- ACE_SCOPE_THREAD),
- ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
- ACE_SCOPE_THREAD),
- infos.out (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_Scheduler_Factory::dump_schedule (infos.in (),
- "Scheduler_Runtime.cpp");
- }
- TAO_CATCH (CORBA::SystemException, sys_ex)
- {
- TAO_TRY_ENV.print_exception ("SYS_EX");
- }
- TAO_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp
deleted file mode 100644
index adadaf485c2..00000000000
--- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsp
+++ /dev/null
@@ -1,99 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Dump_Schedule" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Dump_Schedule - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Dump_Schedule.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Dump_Schedule.mak" CFG="Dump_Schedule - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Dump_Schedule - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Dump_Schedule - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Dump_Schedule - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\.." /I "..\..\.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 orbsvcs.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Dump_Schedule - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /I "..\.." /I "..\..\.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Dump_Schedule - Win32 Release"
-# Name "Dump_Schedule - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Dump_Schedule.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsw b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsw
deleted file mode 100644
index 7ac8698103e..00000000000
--- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Dump_Schedule"=.\Dump_Schedule.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/Dump_Schedule/Makefile b/TAO/orbsvcs/Dump_Schedule/Makefile
deleted file mode 100644
index 2a6a1b0b741..00000000000
--- a/TAO/orbsvcs/Dump_Schedule/Makefile
+++ /dev/null
@@ -1,235 +0,0 @@
-# $Id$
-
-BIN = Dump_Schedule
-BUILD = $(BIN)
-
-DUMP_SRCS = \
- Dump_Schedule.cpp
-
-LSRC = $(DUMP_SRCS)
-
-SCHEDULE_OBJS=$(SCHEDULE_SRCS:.cpp=.o)
-DUMP_OBJS=$(DUMP_SRCS:.cpp=.o)
-
-LDLIBS = -lorbsvcs -lTAO
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-Dump_Schedule: $(addprefix $(VDIR),$(DUMP_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/Dump_Schedule.o .obj/Dump_Schedule.so .shobj/Dump_Schedule.o .shobj/Dump_Schedule.so: Dump_Schedule.cpp \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/Dump_Schedule/svc.conf b/TAO/orbsvcs/Dump_Schedule/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/Dump_Schedule/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/Event_Service/Event_Service.cpp b/TAO/orbsvcs/Event_Service/Event_Service.cpp
deleted file mode 100644
index 5d20ba57242..00000000000
--- a/TAO/orbsvcs/Event_Service/Event_Service.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// $Id$
-//
-
-#include "ace/Get_Opt.h"
-#include "tao/corba.h"
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/Scheduler_Factory.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event/Event_Channel.h"
-
-
-
-const char* service_name = "EventService";
-
-int
-parse_args (int argc, char *argv [])
-{
- ACE_Get_Opt get_opt (argc, argv, "n:");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'n':
- service_name = get_opt.optarg;
- break;
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-n service_name "
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
-
-
-int main (int argc, char *argv[])
-{
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (parse_args (argc, argv) == -1)
- return 1;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_Scheduler_Factory::use_config (naming_context.in ());
-
- // Register Event_Service with Naming Service.
- ACE_EventChannel ec_impl;
-
- RtecEventChannelAdmin::EventChannel_var ec =
- ec_impl._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::String_var str =
- orb->object_to_string (ec.in (), TAO_TRY_ENV);
-
- ACE_DEBUG ((LM_DEBUG, "The EC IOR is <%s>\n", str.in ()));
-
- CosNaming::Name channel_name (1);
- channel_name.length (1);
- channel_name[0].id = CORBA::string_dup (service_name);
- naming_context->bind (channel_name, ec.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "running event service\n"));
- if (orb->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1);
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("EC");
- }
- TAO_ENDTRY;
-
-
- return 0;
-}
diff --git a/TAO/orbsvcs/Event_Service/Event_Service.dsp b/TAO/orbsvcs/Event_Service/Event_Service.dsp
deleted file mode 100644
index b2cccaa3eee..00000000000
--- a/TAO/orbsvcs/Event_Service/Event_Service.dsp
+++ /dev/null
@@ -1,147 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Event_Service" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Event_Service - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Service.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Service.mak" CFG="Event_Service - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Event_Service - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Event_Service - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Event_Service - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\.." /I "..\..\.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 orbsvcs.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Event_Service - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /I "..\.." /I "..\..\.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Event_Service - Win32 Release"
-# Name "Event_Service - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Service.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\BCU.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Utils_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Debug_Macros.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dispatching_Modules.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Channel.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Fast_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\GPlot_File.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_ESTypes.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pools.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorTask.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\RT_Task.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_Manager.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/Event_Service/Event_Service.dsw b/TAO/orbsvcs/Event_Service/Event_Service.dsw
deleted file mode 100644
index 2b2901a9725..00000000000
--- a/TAO/orbsvcs/Event_Service/Event_Service.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Event_Service"=.\Event_Service.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/Event_Service/Makefile b/TAO/orbsvcs/Event_Service/Makefile
deleted file mode 100644
index 924545a6a4a..00000000000
--- a/TAO/orbsvcs/Event_Service/Makefile
+++ /dev/null
@@ -1,277 +0,0 @@
-#
-# $Id$
-#
-
-BIN = Event_Service
-BUILD = $(BIN)
-
-LSRC = \
- Event_Service.cpp \
-
-ES_OBJS=$(LSRC:.cpp=.o)
-
-LDLIBS = -lorbsvcs -lTAO
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-ifeq ($(probe),1)
- CCFLAGS += -DACE_ENABLE_TIMEPROBES
-endif # probe
-
-
-Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/Event_Service.o .obj/Event_Service.so .shobj/Event_Service.o .shobj/Event_Service.so: Event_Service.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(TAO_ROOT)/tao/Timeprobe.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/CORBA_Utils_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Task_Manager.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Task_Manager.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/Event_Service/svc.conf b/TAO/orbsvcs/Event_Service/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/Event_Service/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/Makefile b/TAO/orbsvcs/Makefile
deleted file mode 100644
index 1f4bb7b8d64..00000000000
--- a/TAO/orbsvcs/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-DIRS = orbsvcs \
- Naming_Service \
- Scheduling_Service \
- Event_Service \
- Dump_Schedule \
- tests \
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU
-
diff --git a/TAO/orbsvcs/Naming_Service/Makefile b/TAO/orbsvcs/Naming_Service/Makefile
deleted file mode 100644
index 783e0720cea..00000000000
--- a/TAO/orbsvcs/Naming_Service/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = Naming_Service
-
-SVR_SRCS=Naming_Service.cpp
-
-LDLIBS = -lorbsvcs -lTAO
-
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VLIB) $(VSHLIB) $(SHLIBA) $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-#TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp
deleted file mode 100644
index c5d6a3baf4d..00000000000
--- a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// orbsvcs/Naming_Service/Naming_Service
-//
-// = FILENAME
-// Naming_Service.cpp
-//
-// = DESCRIPTION
-// This class implements a Naming_Service object.
-//
-// = AUTHORS
-// Nagarajan Surendran (naga@cs.wustl.edu)
-//
-// ============================================================================
-
-#include "Naming_Service.h"
-
-// Default Constructor.
-
-Naming_Service::Naming_Service (void)
-{
-}
-
-// Constructor taking command-line arguments
-
-Naming_Service::Naming_Service (int argc,
- char** argv)
-{
- this->init (argc,argv);
-}
-
-// Initialize the state of the Naming_Service object
-
-int
-Naming_Service::init (int argc,
- char** argv)
-{
- TAO_TRY
- {
- this->init_child_poa (argc,
- argv,
- "child_poa",
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->my_naming_server_.init (this->orb_,
- this->child_poa_);
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Naming_Service::init");
- return -1;
- }
- TAO_ENDTRY;
- return 0;
-}
-
-// Run the ORB event loop
-
-int
-Naming_Service::run (CORBA_Environment& env)
-{
- return TAO_ORB_Manager::run (env);
-}
-
-// Destructor.
-
-Naming_Service::~Naming_Service (void)
-{
-}
-
-
-int
-main (int argc, char ** argv)
-{
- int init_result;
-
- Naming_Service naming_service;
-
- init_result = naming_service.init (argc,argv);
- if (init_result < 0)
- return init_result;
-
- TAO_TRY
- {
- naming_service.run (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("NamingService");
- return -1;
- }
- TAO_ENDTRY;
- return 0;
-}
-
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.dsp b/TAO/orbsvcs/Naming_Service/Naming_Service.dsp
deleted file mode 100644
index 2635de8e1a1..00000000000
--- a/TAO/orbsvcs/Naming_Service/Naming_Service.dsp
+++ /dev/null
@@ -1,111 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Naming_Service" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Naming_Service - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Naming_Service.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Naming_Service.mak" CFG="Naming_Service - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Naming_Service - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Naming_Service - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Naming_Service - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\.." /I "..\..\.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 orbsvcs.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Naming_Service - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /I "..\.." /I "..\..\.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Naming_Service - Win32 Release"
-# Name "Naming_Service - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Naming_Service.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\CosNaming_i.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming_Service.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\NS_CosNaming.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.dsw b/TAO/orbsvcs/Naming_Service/Naming_Service.dsw
deleted file mode 100644
index e324e70ecc8..00000000000
--- a/TAO/orbsvcs/Naming_Service/Naming_Service.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Naming_Service"=.\Naming_Service.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.h b/TAO/orbsvcs/Naming_Service/Naming_Service.h
deleted file mode 100644
index 161eaedf2a7..00000000000
--- a/TAO/orbsvcs/Naming_Service/Naming_Service.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// orbsvcs/Naming_Service/Naming_Service
-//
-// = FILENAME
-// Naming_Service.h
-//
-// = DESCRIPTION
-// This class implements the functionality of a Naming_Service.
-//
-// = AUTHORS
-// Nagarajan Surendran (naga@cs.wustl.edu)
-//
-// ============================================================================
-
-#if !defined (_NAMING_SERVICE_H)
-#define _NAMING_SERVICE_H
-
-#include "tao/TAO.h"
-#include "orbsvcs/Naming/Naming_Utils.h"
-
-class Naming_Service:public TAO_ORB_Manager
-{
- // =TITLE
- // Defines a class that encapsulates the implementation of a
- // naming service.
- // =DESCRIPTION
- // This class makes use of the TAO_Naming_Server and
- // TAO_ORB_Manager class to implement the Naming_Service.
-
-public:
- Naming_Service (void);
- // Default Constructor.
-
- Naming_Service (int argc,
- char** argv);
- // Constructor taking the command-line arguments.
-
-
- int
- init (int argc,
- char** argv);
- // Initialize the Naming Service with the arguments.
-
- int
- run (CORBA_Environment& env);
- // Run the Naming_Service
-
- ~Naming_Service (void);
- // Destructor.
-
-private:
- TAO_Naming_Server my_naming_server_;
- // Naming Server instance.
-};
-
-#endif /* _NAMING_SERVICE_H */
diff --git a/TAO/orbsvcs/Naming_Service/README b/TAO/orbsvcs/Naming_Service/README
deleted file mode 100644
index 1fa3fe11f0b..00000000000
--- a/TAO/orbsvcs/Naming_Service/README
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-README:
-======
- This directory consists of the files implementing the TAO
-NamingService.
-
- The TAO NamingService makes use of IP Multicast to process
-requests to the Naming Service.
-
-To Run:
-======
-
- % Naming_Service [-ORBport port] [-ORBobjrefstyle url]
- [-ORBnameserviceport nsport]
-
-Arguments:
-==========
- port - The ORB port
- nsport - Multicast port.
-
-Environment Variables:
-=====================
-
- NameServicePort - Multicast port.
-
-Sample Run:
-==========
-
- % Naming_Service -ORBport 20000 -ORBobjrefstyle url -ORBnameserviceport 19999
-starting up daemon <unknown>
-opening dynamic service Resource_Factory
-did dynamic on Resource_Factory, error = 0
-opening dynamic service Client_Strategy_Factory
-did dynamic on Client_Strategy_Factory, error = 0
-opening dynamic service Server_Strategy_Factory
-did dynamic on Server_Strategy_Factory, error = 0
-listening as object <iiop:1.0//tango:20000/P35194c690003809cRootPOA/child_poa/NameService>
-The multicast server setup is done.
-
-NameService Client:
-==================
-
- A client of the TAO Naming Service will use the ORB
-resolve_initial_references to resolve the NamingService object. This
-will be done using Multicast by default. This behavior can be
-overridden by these 2 ways.
-
- 1. passing the argument -ORBnameserviceior ior.
- This ior is got from the output of the Naming_Service from
- line 'listening as object <iiop:..>'.
-
- 2. setting the env. variable 'NameService'.
-
-For example if a client wants to use the Naming_Service from the
-sample run it would be like,
-
- %client -ORBnameserviceior
- <iiop:1.0//tango:20000/P35194c690003809cRootPOA/child_poa/NameService>
-
-or set the environment variable,
-
- in a tcsh ,
-
- % setenv NameService <iiop:1.0//tango:20000/P35194c690003809cRootPOA/child_poa/NameService>
-
- and then run the client,
-
- % client <.. client's arguments>
-
- These methods might be needed in an environment where there is
-more than one NamingService to avoid the confusion of a server
-registering its object with one NamingService and the client getting
-the reply from some other NamingService.
-
-
diff --git a/TAO/orbsvcs/Naming_Service/svc.conf b/TAO/orbsvcs/Naming_Service/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/Naming_Service/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/README b/TAO/orbsvcs/README
deleted file mode 100644
index bffd4dbd907..00000000000
--- a/TAO/orbsvcs/README
+++ /dev/null
@@ -1 +0,0 @@
-Further documentation can be found in ../docs/orbsvcs.html
diff --git a/TAO/orbsvcs/Scheduling_Service/Makefile b/TAO/orbsvcs/Scheduling_Service/Makefile
deleted file mode 100644
index 9aa00056628..00000000000
--- a/TAO/orbsvcs/Scheduling_Service/Makefile
+++ /dev/null
@@ -1,240 +0,0 @@
-#
-# $Id$
-#
-
-BIN = Scheduling_Service
-BUILD = $(BIN)
-
-SCHEDULE_SRCS = \
- Scheduling_Service.cpp
-
-LSRC = $(SCHEDULE_SRCS)
-
-SCHEDULE_OBJS=$(SCHEDULE_SRCS:.cpp=.o)
-
-LDLIBS = -lorbsvcs -lTAO
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-Scheduling_Service: $(addprefix $(VDIR),$(SCHEDULE_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/Scheduling_Service.o .obj/Scheduling_Service.so .shobj/Scheduling_Service.o .shobj/Scheduling_Service.so: Scheduling_Service.cpp \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp
deleted file mode 100644
index 1bc1b03710b..00000000000
--- a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// $Id$
-//
-
-#include "tao/corba.h"
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/Sched/Config_Scheduler.h"
-
-int main (int argc, char *argv[])
-{
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Create an Scheduling service servant...
- ACE_Config_Scheduler scheduler_impl;
- TAO_CHECK_ENV;
-
- RtecScheduler::Scheduler_var scheduler =
- scheduler_impl._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::String_var str =
- orb->object_to_string (scheduler.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "The scheduler IOR is <%s>\n", str.in ()));
-
- // Register the servant with the Naming Context....
- CosNaming::Name schedule_name (1);
- schedule_name.length (1);
- schedule_name[0].id = CORBA::string_dup ("ScheduleService");
- naming_context->bind (schedule_name, scheduler.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "running scheduling service\n"));
- if (orb->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1);
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("schedule_service");
- }
- TAO_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsp b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsp
deleted file mode 100644
index ffb8479c780..00000000000
--- a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Scheduling_Service" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Scheduling_Service - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Scheduling_Service.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Scheduling_Service.mak"\
- CFG="Scheduling_Service - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Scheduling_Service - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Scheduling_Service - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Scheduling_Service - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\.." /I "..\..\.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 orbsvcs.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Scheduling_Service - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /I "..\.." /I "..\..\.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\orbsvcs" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Scheduling_Service - Win32 Release"
-# Name "Scheduling_Service - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Scheduling_Service.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Config_Scheduler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Generic.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsw b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsw
deleted file mode 100644
index ab63039796a..00000000000
--- a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Scheduling_Service"=.\Scheduling_Service.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/Scheduling_Service/svc.conf b/TAO/orbsvcs/Scheduling_Service/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/Scheduling_Service/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/Trading_Service/Makefile b/TAO/orbsvcs/Trading_Service/Makefile
deleted file mode 100644
index 3f18ff891ba..00000000000
--- a/TAO/orbsvcs/Trading_Service/Makefile
+++ /dev/null
@@ -1,76 +0,0 @@
-#--------------------------------------------------------------------------
-# $Id$
-# Build the TAO Trading Service
-#--------------------------------------------------------------------------
-
-#---------------
-# STL (start)
-#---------------
-
-include $(STL_ROOT)/config/local.cfg
-
-CC_INCLUDES += -I$(STD)
-CC_INCLUDES += -pta
-
-CPPFLAGS += \
- -I$(TOOLKIT) \
- $(CC_INCLUDES) \
- $(CC_FLAGS) \
- $(CC_DEFINES) \
- $(CC_EH) \
- $(CC_MT)
-
-ifndef exceptions
-CPPFLAGS += -DOS_NO_EXCEPTION_SPECIFIER
-else
-CPPFLAGS += -DOS_STL_ASSERT
-endif
-
-LDFLAGS += -L$(STL_ROOT)/lib
-
-#---------------
-# STL (end)
-#---------------
-
-#--------------------------------------------------------------------------
-# Local macros
-#--------------------------------------------------------------------------
-
-BIN = trader
-
-SVR_SRCS= trader.cpp
-
-LDLIBS = -lorbsvcs -lTAO -lospace
-
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VLIB) $(VSHLIB) $(SHLIBA) $(VBIN)
-
-#--------------------------------------------------------------------------
-# Include macros and targets
-#--------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-#TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG) #-H
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/Trading_Service/svc.conf b/TAO/orbsvcs/Trading_Service/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/Trading_Service/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/Trading_Service/trader.cpp b/TAO/orbsvcs/Trading_Service/trader.cpp
deleted file mode 100644
index 532bf5e0dee..00000000000
--- a/TAO/orbsvcs/Trading_Service/trader.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-// ========================================================================
-//
-// = BINARY
-// trader
-//
-// = FILENAME
-// trader.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#include "tao/corba.h"
-#include "tao/orbobj.h"
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/Naming/Ior_Multicast.h"
-#include "orbsvcs/Trader/Trader.h"
-#include "orbsvcs/Trader/Service_Type_Repository.h"
-
-const char* service_name = "TradingService";
-
-typedef TAO_Trader<ACE_Null_Mutex, ACE_Null_Mutex> TRADER;
-typedef TAO_Service_Type_Repository<ACE_Null_Mutex> TYPE_REPOS;
-
-int main(int argc, char * const *argv)
-{
- TAO_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Create a Service Type Repository and a Trader Object.
- TYPE_REPOS type_repos;
- TRADER trader ((TRADER::Trader_Components)
- (TRADER::LOOKUP | TRADER::REGISTER | TRADER::ADMIN));
- TAO_Support_Attributes_Impl& sup_attr = trader.support_attributes ();
- TAO_Trading_Components_Impl& trd_comp = trader.trading_components ();
-
- // Set the service type repository
- sup_attr.type_repos (type_repos._this (TAO_TRY_ENV));
- TAO_CHECK_ENV;
-
-#if defined (ACE_HAS_IP_MULTICAST)
- // Get reactor instance from TAO.
- ACE_Reactor *reactor =
- TAO_ORB_Core_instance ()->reactor ();
-
- // First, see if the user has given us a multicast port number
- // for the name service on the command-line;
- u_short port =
- TAO_ORB_Core_instance ()->orb_params ()->name_service_port ();
-
- if (port == 0)
- {
- const char *port_number =
- ACE_OS::getenv ("NameServicePort");
-
- if (port_number != 0)
- port = ACE_OS::atoi (port_number);
- else
- port = TAO_DEFAULT_TRADING_SERVER_REQUEST_PORT;
- }
-
- // The Spec says: return a reference to the Lookup interface
- // from the resolve_initial_references method.
- CosTrading::Lookup_var lookup = trd_comp.lookup_if ();
- CORBA::String_var trading_ior =
- orb->object_to_string (lookup.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Instantiate a server which will receive requests for an ior
- IOR_Multicast ior_multicast ((char *) trading_ior.in (),
- port,
- ACE_DEFAULT_MULTICAST_ADDR,
- TAO_SERVICEID_TRADINGSERVICE);
-
- // Register event handler for the ior multicast.
- if (reactor->register_handler (&ior_multicast,
- ACE_Event_Handler::READ_MASK) == -1)
- ACE_DEBUG ((LM_DEBUG,
- "cannot register Event handler\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "The multicast server setup is done.\n"));
-#endif /* ACE_HAS_IP_MULTICAST */
-
-
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Begin trading!
- if (orb->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1);
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("EC");
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
diff --git a/TAO/orbsvcs/orbsvcs.dsw b/TAO/orbsvcs/orbsvcs.dsw
deleted file mode 100644
index d75c2d36bed..00000000000
--- a/TAO/orbsvcs/orbsvcs.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Dump_Schedule"=.\Dump_Schedule\Dump_Schedule.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name orbsvcs
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Event_Service"=.\Event_Service\Event_Service.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name orbsvcs
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Naming_Service"=.\Naming_Service\Naming_Service.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name orbsvcs
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Scheduling_Service"=.\Scheduling_Service\Scheduling_Service.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name orbsvcs
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "orbsvcs"=.\orbsvcs\orbsvcs.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
deleted file mode 100644
index ec7171ca5fe..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
+++ /dev/null
@@ -1,771 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// AVStreams_i.cpp
-//
-// = AUTHOR
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-//
-// ============================================================================
-
-#include "orbsvcs/AV/AVStreams_i.h"
-
-// ----------------------------------------------------------------------
-// TAO_Basic_StreamCtrl
-// ----------------------------------------------------------------------
-
-// Constructor
-TAO_Basic_StreamCtrl::TAO_Basic_StreamCtrl (CORBA::ORB_var orb)
- : orb_ (orb)
-{
-}
-
-TAO_Basic_StreamCtrl::~TAO_Basic_StreamCtrl (void)
-{
-}
-
-// Stop the transfer of data of the stream
-// Empty the_spec means apply operation to all flows
-void
-TAO_Basic_StreamCtrl::stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (stream_endpoint_a_.in ()))
- return;
-
- // Make the upcall into the application
- this->stream_endpoint_a_->stop (the_spec, env);
-}
-
-// Start the transfer of data in the stream.
-// Empty the_spec means apply operation to all flows
-void
-TAO_Basic_StreamCtrl::start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (this->stream_endpoint_a_.in ()))
- return;
-
- // Make the upcall into the application
- this->stream_endpoint_a_->start (the_spec, env);
-}
-
-// Tears down the stream. This will close the connection, and delete
-// the streamendpoint and vdev associated with this stream
-// Empty the_spec means apply operation to all flows
-void
-TAO_Basic_StreamCtrl::destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (this->stream_endpoint_a_.in ()))
- return;
-
- // Make the upcall into the application
- this->stream_endpoint_a_->destroy (the_spec, env);
-}
-
-// Changes the QoS associated with the stream
-// Empty the_spec means apply operation to all flows
-CORBA::Boolean
-TAO_Basic_StreamCtrl::modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (new_qos);
- ACE_UNUSED_ARG (the_spec);
- ACE_UNUSED_ARG (env);
- return 0;
-}
-
-// Used by StreamEndPoint and VDev to inform StreamCtrl of events.
-// E.g., loss of flow, reestablishment of flow, etc..
-void
-TAO_Basic_StreamCtrl::push_event (const char *the_event,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) Recieved event \"%s\"",
- the_event));
- ACE_UNUSED_ARG (env);
-}
-
-// Used to control the flow protocol parameters.
-void
-TAO_Basic_StreamCtrl::set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (the_spec);
- ACE_UNUSED_ARG (fp_name);
- ACE_UNUSED_ARG (fp_settings);
- ACE_UNUSED_ARG (env);
-}
-
-// @@ Need to throw not-supported exception here
-CORBA::Object_ptr
-TAO_Basic_StreamCtrl::get_flow_connection (const char *flow_name,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (flow_name);
- ACE_UNUSED_ARG (env);
- return 0;
-}
-
-// @@ Need to throw not-supported exception here
-void
-TAO_Basic_StreamCtrl::set_flow_connection (const char *flow_name,
- CORBA::Object_ptr flow_connection,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (flow_name);
- ACE_UNUSED_ARG (flow_connection);
- ACE_UNUSED_ARG (env);
-}
-
-// ----------------------------------------------------------------------
-// TAO_StreamCtrl
-// ----------------------------------------------------------------------
-
-TAO_StreamCtrl::TAO_StreamCtrl (CORBA::ORB_var orb)
- : TAO_Basic_StreamCtrl (orb)
-{
-}
-
-TAO_StreamCtrl::~TAO_StreamCtrl (void)
-{
-}
-
-// request the two MMDevices to create vdev and stream endpoints. save
-// the references returned.
-
-// The interaction diagram for this method is on page 13 of the spec
-CORBA::Boolean
-TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party,
- AVStreams::MMDevice_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- // Check to see if we have non-nil parties to bind!
- if (CORBA::is_nil (a_party) ||
- CORBA::is_nil (b_party))
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n(%P|%t) TAO_StreamCtrl::bind_devs: "
- "a_party or b_party is null!\n"),
- 1);
-
- // Request a_party to create the endpoint and vdev
- CORBA::Boolean met_qos;
- CORBA::String_var named_vdev;
-
- this->stream_endpoint_a_ =
- a_party-> create_A (this->_this (env),
- this->vdev_a_.out (),
- the_qos,
- met_qos,
- named_vdev.inout (),
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_StreamCtrl::create_A: succeeded"));
-
- // Request b_party to create the endpoint and vdev
-
- this->stream_endpoint_b_ =
- b_party-> create_B (this->_this (env),
- this->vdev_b_.out (),
- the_qos,
- met_qos,
- named_vdev.inout (),
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_StreamCtrl::create_B: succeeded"));
-
- ACE_DEBUG ((LM_DEBUG,
- "\nstream_endpoint_b_ = %s",
- this->orb_->object_to_string (this->stream_endpoint_b_,
- env)));
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Tell the 2 VDev's about one another
- this->vdev_a_->set_peer (this->_this (env),
- this->vdev_b_.in (),
- the_qos,
- the_flows,
- env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-
- this->vdev_b_->set_peer (this->_this (env),
- this->vdev_a_.in (),
- the_qos,
- the_flows,
- env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-
-
- // Now connect the streams together. This will
- // establish the connection
- this->stream_endpoint_a_->connect (this->stream_endpoint_b_,
- the_qos,
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-// Used to establish a connection between two endpoints
-// directly, i.e. without a MMDevice
-CORBA::Boolean
-TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr a_party,
- AVStreams::StreamEndPoint_B_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (a_party) ||
- CORBA::is_nil (b_party))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) TAO_StreamCtrl::bind:"
- "a_party or b_party null!"),
- 1);
-
- this->stream_endpoint_a_ = a_party;
- this->stream_endpoint_b_ = b_party;
- // Now connect the streams together
- this->stream_endpoint_a_->connect (this->stream_endpoint_b_,
- the_qos,
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-void
-TAO_StreamCtrl::unbind (CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (env);
-}
-
-void
-TAO_StreamCtrl::unbind_party (AVStreams::StreamEndPoint_ptr the_ep,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (the_ep);
- ACE_UNUSED_ARG (the_spec);
- ACE_UNUSED_ARG (env);
-}
-
-// ----------------------------------------------------------------------
-// TAO_StreamEndPoint
-// ----------------------------------------------------------------------
-
-TAO_StreamEndPoint::TAO_StreamEndPoint (void)
-{
-}
-
-// Stop the physical flow of data on the stream
-// Empty the_spec --> apply to all flows
-void
-TAO_StreamEndPoint::stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Make the upcall into the app
- this->handle_stop (the_spec, env);
-}
-
-// Start the physical flow of data on the stream
-// Empty the_spec --> apply to all flows
-void
-TAO_StreamEndPoint::start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Make the upcall into the app
- this->handle_start (the_spec, env);
-}
-
-// Close the connection
-void
-TAO_StreamEndPoint::destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Make the upcall into the app
- this->handle_destroy (the_spec, env);
-}
-
-// Called by streamctrl, requesting us to call request_connection
-// on the responder (to initiate a connection)
-CORBA::Boolean
-TAO_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) In TAO_StreamEndPoint::connect\n"));
- responder->request_connection (this->_this (env),
- 0,
- qos_spec,
- the_spec,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-}
-
-// Called by our peer endpoint, requesting us to establish
-// a connection
-CORBA::Boolean
-TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) TAO_StreamEndPoint::request_connection called"));
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_StreamEndPoint::request_connection: "
- "flowspec has length = %d"
- "and the strings are:",
- the_spec.length ()));
- for (int i = 0; i < the_spec.length (); i++)
- ACE_DEBUG ((LM_DEBUG,
- the_spec [i]));
-
- return 0;
-}
-
-CORBA::Boolean
-TAO_StreamEndPoint::modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-CORBA::Boolean
-TAO_StreamEndPoint::set_protocol_restriction (const AVStreams::protocolSpec &the_pspec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_StreamEndPoint::disconnect (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env)
-{
-}
-
-CORBA::Object_ptr
-TAO_StreamEndPoint::get_fep (const char *flow_name,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-char *
-TAO_StreamEndPoint::add_fep (CORBA::Object_ptr the_fep,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_StreamEndPoint::remove_fep (const char *fep_name,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_negotiator (AVStreams::Negotiator_ptr new_negotiator,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_key (const char *flow_name,
- const encryption_key & the_key,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_source_id (CORBA::Long source_id,
- CORBA::Environment &env)
-{
-}
-
-TAO_StreamEndPoint::~TAO_StreamEndPoint (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_Client_StreamEndPoint
-// ----------------------------------------------------------------------
-
-TAO_Client_StreamEndPoint::TAO_Client_StreamEndPoint (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_Client_StreamEndPoint::TAO_Client_StreamEndPoint: created"));
-}
-
-CORBA::Boolean
-TAO_Client_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Use the base class implementation of connect
- TAO_StreamEndPoint::connect (responder,
- qos_spec,
- the_spec,
- env);
-
- // Make the upcall to the app
- return this->handle_connection_established (responder,
- qos_spec,
- the_spec,
- env);
-
-}
-
-
-CORBA::Boolean
-TAO_Client_StreamEndPoint::multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-CORBA::Boolean
-TAO_Client_StreamEndPoint::connect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_Client_StreamEndPoint::disconnect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- const AVStreams::flowSpec &theSpec,
- CORBA::Environment &env)
-{
-}
-
-TAO_Client_StreamEndPoint::~TAO_Client_StreamEndPoint (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_Server_StreamEndPoint
-// ----------------------------------------------------------------------
-
-TAO_Server_StreamEndPoint::TAO_Server_StreamEndPoint (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_Server_StreamEndPoint::TAO_Server_StreamEndPoint: created"));
-}
-
-CORBA::Boolean
-TAO_Server_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-
-{
- // Use the base class implementation of request_connection
- TAO_StreamEndPoint::request_connection (initiator,
- is_mcast,
- qos,
- the_spec,
- env);
-
- // Make the upcall to the app
- return this->handle_connection_requested (initiator,
- is_mcast,
- qos,
- the_spec,
- env);
-
-}
-CORBA::Boolean
-TAO_Server_StreamEndPoint::multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-TAO_Server_StreamEndPoint::~TAO_Server_StreamEndPoint (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_VDev
-// ----------------------------------------------------------------------
-
-TAO_VDev::TAO_VDev (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_VDev::TAO_VDev: created"));
-}
-
-// StreamCtrl will call this to give us a reference to itself, and to
-// our peer vdev..
-CORBA::Boolean
-TAO_VDev::set_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::VDev_ptr the_peer_dev,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) TAO_VDev::set_peer: called"));
- this->streamctrl_ = the_ctrl;
- this->peer_ = the_peer_dev;
- return 0;
-}
-
-CORBA::Boolean
-TAO_VDev::set_Mcast_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::MCastConfigIf_ptr a_mcastconfigif,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_VDev::configure (const CosPropertyService::Property &the_config_mesg,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_VDev::set_format (const char *flowName,
- const char *format_name,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_VDev::set_dev_params (const char *flowName,
- const CosPropertyService::Properties &new_params,
- CORBA::Environment &env)
-{
-}
-
-CORBA::Boolean
-TAO_VDev::modify_QoS (AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-TAO_VDev::~TAO_VDev (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_MMDevice
-// ----------------------------------------------------------------------
-
-
-
-TAO_MMDevice::TAO_MMDevice ()
-{
-}
-
-// create a streamctrl which is colocated with me, use that streamctrl
-// to bind the peer_device with me.
-AVStreams::StreamCtrl_ptr
-TAO_MMDevice ::bind (AVStreams::MMDevice_ptr peer_device,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-#if 0
- TAO_TRY
- {
- TAO_StreamCtrl *stream_ctrl = new TAO_StreamCtrl ();
- if (stream_ctrl == 0)
- return 0;
- stream_ctrl->bind_devs (peer_device,
- AVStreams::StreamCtrl::_duplicate
- (this->_this (TAO_TRY_ENV)),
- the_qos,
- the_spec,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- return stream_ctrl;
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- TAO_TRY_ENV.print_exception ("System Exception");
- return -1;
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- TAO_TRY_ENV.print_exception ("User Exception");
- return -1;
- }
- TAO_ENDTRY;
-#endif
- return 0;
-}
-
-AVStreams::StreamCtrl_ptr
-TAO_MMDevice::bind_mcast (AVStreams::MMDevice_ptr first_peer,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_MMDevice::destroy (AVStreams::StreamEndPoint_ptr the_ep,
- const char *vdev_name,
- CORBA::Environment &env)
-{
-}
-
-// need to throw notsupported exception
-char *
-TAO_MMDevice::add_fdev (CORBA::Object_ptr the_fdev,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-// need to throw notsupported exception
-CORBA::Object_ptr
-TAO_MMDevice::get_fdev (const char *flow_name,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-// need to throw notsupported exception
-void
-TAO_MMDevice::remove_fdev (const char *flow_name,
- CORBA::Environment &env)
-{
-}
-
-TAO_MMDevice::~TAO_MMDevice (void)
-{
-}
-
-template <class T>
-TAO_Client_MMDevice <T>::TAO_Client_MMDevice ()
-{
-}
-
-// We have been asked to create a new stream_endpoint and a vdev.
-template <class T>
-AVStreams::StreamEndPoint_A_ptr
-TAO_Client_MMDevice <T>::create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_MMDevice::create_A: called"));
-
- TAO_VDev *vdev = new TAO_VDev;
- the_vdev = AVStreams::VDev::_duplicate (vdev->_this (env));
-
- TAO_Client_StreamEndPoint *stream_endpoint_a =
- new T;
- return AVStreams::StreamEndPoint_A::_duplicate
- (stream_endpoint_a->_this (env));
-}
-
-template <class T>
-AVStreams::StreamEndPoint_B_ptr
-TAO_Client_MMDevice <T>::create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot create a B device on the client side!\n"),
- 0);
-}
-
-template <class T>
-TAO_Server_MMDevice <T>::TAO_Server_MMDevice ()
-{
-}
-
-template <class T>
-AVStreams::StreamEndPoint_A_ptr
-TAO_Server_MMDevice <T>::create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot create a A device on the server side!\n"),
- 0);
-}
-
-// We have been asked to create a new stream_endpoint and a vdev.
-template <class T>
-AVStreams::StreamEndPoint_B_ptr
-TAO_Server_MMDevice <T>::create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_MMDevice::create_B: called"));
-
- TAO_VDev *vdev = new TAO_VDev;
- the_vdev = AVStreams::VDev::_duplicate (vdev->_this (env));
-
- TAO_Server_StreamEndPoint *stream_endpoint_b =
- new T;
- return AVStreams::StreamEndPoint_B::_duplicate
- (stream_endpoint_b->_this (env));
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h
deleted file mode 100644
index 0f36063f158..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/* -*- C++ -*- */
-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// AVStreams_i.h
-//
-// = AUTHOR
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-//
-// ============================================================================
-
-#if !defined (AVSTREAMS_I_H)
-#define AVSTREAMS_I_H
-
-#include "orbsvcs/orbsvcs_export.h"
-#include "orbsvcs/CosPropertyServiceS.h"
-#include "orbsvcs/AVStreamsS.h"
-#include "orbsvcs/Property/CosPropertyService_i.h"
-
-class TAO_ORBSVCS_Export TAO_Basic_StreamCtrl
- : public virtual POA_AVStreams::Basic_StreamCtrl
-// = DESCRIPTION
-// Base class for StreamCtrl, implements basic stream start
-// and stop functionality
-{
- public:
- TAO_Basic_StreamCtrl (CORBA::ORB_var orb);
- // Constructor
-
- virtual void stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Stop the transfer of data of the stream
- // Empty the_spec means apply operation to all flows
-
-
- virtual void start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Start the transfer of data in the stream.
- // Empty the_spec means apply operation to all flows
-
- virtual void destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Tears down the stream. This will close the connection, and delete
- // the streamendpoint and vdev associated with this stream
- // Empty the_spec means apply operation to all flows
-
- virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Changes the QoS associated with the stream
- // Empty the_spec means apply operation to all flows
-
- virtual void push_event (const char *the_event,
- CORBA::Environment &env);
- // Used by StreamEndPoint and VDev to inform StreamCtrl of events.
- // E.g., loss of flow, reestablishment of flow, etc..
-
- virtual void set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env);
- // Used to control the flow protocol parameters.
-
- virtual CORBA::Object_ptr get_flow_connection (const char *flow_name,
- CORBA::Environment &env);
- // Not implemented in the light profile, will raise the notsupported
- // exception
-
- virtual void set_flow_connection (const char *flow_name,
- CORBA::Object_ptr flow_connection,
- CORBA::Environment &env);
- // Not implemented in the light profile, will raise the notsupported
- // exception
-
- virtual ~TAO_Basic_StreamCtrl (void);
- // Destructor
-
- protected:
- CORBA::ORB_var orb_;
- // ORB reference
-
- AVStreams::VDev_var vdev_a_;
- AVStreams::VDev_var vdev_b_;
- // The Virtual Devices for this stream
-
- AVStreams::StreamEndPoint_A_var stream_endpoint_a_;
- AVStreams::StreamEndPoint_B_var stream_endpoint_b_;
- // The Endpoints for this stream
-};
-
-class TAO_ORBSVCS_Export TAO_StreamCtrl
- : public virtual POA_AVStreams::StreamCtrl,
- public virtual TAO_Basic_StreamCtrl
-// = DESCRIPTION
-// Implementation the A/V StreamCtrl class. this class
-// is used to control the stream. It should be subclassed
-// by applications that want to provide more control features.
-{
-public:
- TAO_StreamCtrl (CORBA::ORB_var orb);
- // Constructor
-
- virtual CORBA::Boolean bind_devs (AVStreams::MMDevice_ptr a_party,
- AVStreams::MMDevice_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Establish a stream between a_party and b_party,
- // with qos the_qos, and for the flows in the_flows
- // if the_flows is empty, bind all the flows
- // Causes a connection to be established between the StreamEndpoints.
- // Returns success/failure
-
- virtual CORBA::Boolean bind (AVStreams::StreamEndPoint_A_ptr a_party,
- AVStreams::StreamEndPoint_B_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Establish a connection between two streamendpoints. This can
- // be used if the streamendpoints have been created independent of
- // a MMDevice
-
- virtual void unbind_party (AVStreams::StreamEndPoint_ptr the_ep,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Unbind the_ep from the stream. Empty the_spec means apply to all flows.
-
- virtual void unbind (CORBA::Environment &env);
- // unbind the stream. Same effect as Basic_StreamCtrl::destroy ()
-
- virtual ~TAO_StreamCtrl (void);
- // Destructor
-
-};
-
-
-class TAO_ORBSVCS_Export TAO_Base_StreamEndPoint
-// = DESCRIPTION
-// Base class for the A/V StreamEndPoint class. this class
-// is used to control the stream. It should be subclassed
-// by applications that want to provide more control features.
-{
-
-public:
-
- virtual void handle_stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-
- virtual void handle_start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-
-
- virtual void handle_destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-};
-
-class TAO_ORBSVCS_Export TAO_Client_Base_StreamEndPoint
- : public virtual TAO_Base_StreamEndPoint
-{
-public:
- virtual CORBA::Boolean handle_connection_established (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-};
-
-class TAO_ORBSVCS_Export TAO_Server_Base_StreamEndPoint
- : public virtual TAO_Base_StreamEndPoint
-{
-public:
- virtual CORBA::Boolean handle_connection_requested (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-};
-
-class TAO_ORBSVCS_Export TAO_StreamEndPoint
- : public virtual POA_AVStreams::StreamEndPoint, // The POA class
- public virtual TAO_Base_StreamEndPoint
-{
- // = DESCRIPTION
- // The Stream EndPoint. Used to implement one endpoint of a stream
- // that implements the transport layer.
-public:
- TAO_StreamEndPoint (void);
- // Constructor
-
- virtual void stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Stop the stream. Empty the_spec means, for all the flows
-
- virtual void start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Start the stream, Empty the_spec means, for all the flows
-
- virtual void destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Destroy the stream, Empty the_spec means, for all the flows
-
-
- virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl. responder is the peer to connect to
-
- virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by the peer StreamEndPoint. The flow_spec indicates the
- // flows (which contain transport addresses etc.)
-
- virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Change the transport qos on a stream
-
- virtual CORBA::Boolean set_protocol_restriction (const AVStreams::protocolSpec &the_pspec,
- CORBA::Environment &env);
- // Used to restrict the set of protocols
-
- virtual void disconnect (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // disconnect the flows
-
- virtual void set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env);
- // Used to control the flow
-
- virtual CORBA::Object_ptr get_fep (const char *flow_name,
- CORBA::Environment &env);
- // Not implemented in the light profile, throws notsupported
-
- virtual char * add_fep (CORBA::Object_ptr the_fep,
- CORBA::Environment &env);
- // Not implemented in the light profile, throws notsupported
-
- virtual void remove_fep (const char *fep_name,
- CORBA::Environment &env);
- // Not implemented in the light profile, throws notsupported
-
- virtual void set_negotiator (AVStreams::Negotiator_ptr new_negotiator,
- CORBA::Environment &env);
- // Used to "attach" a negotiator to the endpoint
-
- virtual void set_key (const char *flow_name,
- const encryption_key & the_key,
- CORBA::Environment &env);
- // Used for public key encryption.
-
- virtual void set_source_id (CORBA::Long source_id,
- CORBA::Environment &env);
- // Used to set a unique id for packets sent by this streamendpoint
-
- virtual ~TAO_StreamEndPoint (void);
- // Destructor
-
-};
-
-class TAO_ORBSVCS_Export TAO_Client_StreamEndPoint :
- public virtual POA_AVStreams::StreamEndPoint_A,
- public virtual TAO_StreamEndPoint,
- public virtual TAO_Client_Base_StreamEndPoint
-{
- // = DESCRIPTION
- // The "A" side of a streamendpoint
-public:
- TAO_Client_StreamEndPoint (void);
- // Constructor
-
- virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl. responder is the peer to connect to
-
- virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Used for ATM-style multicast
-
- virtual CORBA::Boolean connect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Used for ATM-style multicast
-
- virtual void disconnect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- const AVStreams::flowSpec &theSpec,
- CORBA::Environment &env);
- // Used to remove a multicast leaf
-
- virtual ~TAO_Client_StreamEndPoint (void);
- // Destructor
-
-};
-
-class TAO_ORBSVCS_Export TAO_Server_StreamEndPoint :
- public virtual POA_AVStreams::StreamEndPoint_B,
- public virtual TAO_StreamEndPoint,
- public virtual TAO_Server_Base_StreamEndPoint // Abstract interface
-{
- // = DESCRIPTION
- // The "B" side of a streamendpoint
-public:
- TAO_Server_StreamEndPoint (void);
- // Constructor
-
- virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by the peer StreamEndPoint. The flow_spec indicates the
- // flows (which contain transport addresses etc.)
-
- virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Used for internet-style multicast
-
- virtual ~TAO_Server_StreamEndPoint (void);
- // Destructor
-};
-
-class TAO_ORBSVCS_Export TAO_VDev
- : public virtual POA_AVStreams::VDev
-// = DESCRIPTION
-// Implements the VDev interface. One of these is created per connection,
-// and represents device-specific parameters
-{
- public:
- TAO_VDev (void);
- // Constructor
-
- virtual CORBA::Boolean set_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::VDev_ptr the_peer_dev,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called to tell the vdev who the streamctrl, peer vdev is
-
- virtual CORBA::Boolean set_Mcast_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::MCastConfigIf_ptr a_mcastconfigif,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Used to set the streamctrl and multicast device
-
- virtual void configure (const CosPropertyService::Property &the_config_mesg,
- CORBA::Environment &env);
- // Called by the peer VDev to configure the device (catch all)
-
- virtual void set_format (const char *flowName,
- const char *format_name,
- CORBA::Environment &env);
- // Used to set a format on a flowname
-
- virtual void set_dev_params (const char *flowName,
- const CosPropertyService::Properties &new_params,
- CORBA::Environment &env);
- // Used to set device parameters
-
- virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called to change QoS of the device
-
- virtual ~TAO_VDev (void);
- // Destructor
-
- private:
- AVStreams::StreamCtrl_var streamctrl_;
- // My stream controller
-
- AVStreams::VDev_var peer_;
- // My peer
-};
-
-class TAO_ORBSVCS_Export TAO_MMDevice
- : public virtual TAO_PropertySet,
- public virtual POA_AVStreams::MMDevice
-// = DESCRIPTION
-// Implements a factory to create Endpoints and VDevs
-{
- protected:
- TAO_MMDevice (void);
- // Constructor
-
- public:
-
- virtual AVStreams::StreamCtrl_ptr bind (AVStreams::MMDevice_ptr peer_device,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Can be used to request the MMDevice to create a new StreamCtrl,
- // and call bind_devs on it
-
- virtual AVStreams::StreamCtrl_ptr bind_mcast (AVStreams::MMDevice_ptr first_peer,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Multicast bind
-
- virtual void destroy (AVStreams::StreamEndPoint_ptr the_ep,
- const char *vdev_name,
- CORBA::Environment &env);
- // Remove the StreamEndPoint and the related vdev
-
- virtual char * add_fdev (CORBA::Object_ptr the_fdev,
- CORBA::Environment &env);
- // Not supported in the light profile, raises notsupported
-
- virtual CORBA::Object_ptr get_fdev (const char *flow_name,
- CORBA::Environment &env);
- // Not supported in the light profile, raises notsupported
-
- virtual void remove_fdev (const char *flow_name,
- CORBA::Environment &env);
- // Not supported in the light profile, raises notsupported
-
- virtual ~TAO_MMDevice (void);
- // Destructor
-};
-
-template<class T>
-class TAO_ORBSVCS_Export TAO_Client_MMDevice
- : public virtual TAO_MMDevice
-{
-public:
- TAO_Client_MMDevice ();
- // Constructor
-
- virtual AVStreams::StreamEndPoint_A_ptr create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "A" type streamandpoint and vdev
-
- virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "B" type streamandpoint and vdev
-};
-
-template<class T>
-class TAO_ORBSVCS_Export TAO_Server_MMDevice
- : public virtual TAO_MMDevice
-{
-public:
- TAO_Server_MMDevice (void);
-
- virtual AVStreams::StreamEndPoint_A_ptr create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "A" type streamandpoint and vdev
-
- virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "B" type streamandpoint and vdev
-
-};
-#endif /* AVSTREAMS_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp b/TAO/orbsvcs/orbsvcs/AV/sfp.cpp
deleted file mode 100644
index e75e732a148..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-#include "orbsvcs/AV/sfp.h"
-#include "ace/ARGV.h"
-
-// $Id$
-
-// constructor.
-SFP_Encoder::SFP_Encoder ()
- : orb_ (0),
- encoder_ (0)
-{
- // We need to initialize the ORB!
-
- TAO_TRY
- {
- ACE_ARGV orb_args (TAO_SFP_ORB_ARGUMENTS);
- int argc = orb_args.argc ();
- this->orb_ = CORBA::ORB_init (argc,
- orb_args.argv (),
- 0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Encoder::ORB_init");
- return;
- }
- TAO_ENDTRY;
- ACE_NEW (encoder_,
- CDR ());
-
-}
-
-ACE_Message_Block *
-SFP_Encoder::encode_start_message ()
-{
- this->encoder_->reset ();
- TAO_TRY
- {
- // construct the start message
- SFP::start_message start;
-
- // copy the magic number into the message
- start.magic_number = 4;
-
- // put the version number into the field
- start.major_version = TAO_SFP_MAJOR_VERSION;
- start.minor_version = TAO_SFP_MINOR_VERSION;
-
- // flags field is all zeroes
- start.flags = 0;
-
- // encode the start frame
- if (encoder_->encode (SFP::_tc_start_message,
- &start,
- 0,
- TAO_TRY_ENV)
- == CORBA_TypeCode::TRAVERSE_CONTINUE)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) encode of start message succeeded:"
- "length == %d\n",
- encoder_->length ()));
-
- }
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Source_Endpoint::"
- "start_message");
- return 0;
- }
- TAO_ENDTRY;
-
- return this->create_message_block ();
-}
-
-// Encodes a simple frame, i.e. just frameheader and data
-ACE_Message_Block *
-SFP_Encoder::encode_simple_frame (ACE_Message_Block *data)
-{
- this->encoder_->reset ();
- TAO_TRY
- {
- // construct the frame header
- SFP::frame_header frame_header;
- // copy the magic number into the message
- frame_header.magic_number = 4;
-
- // flags field is all zeroes
- frame_header.flags = 0;
-
- // put the message type
- frame_header.message_type = SFP::SIMPLEFRAME;
-
- // size
- frame_header.message_size = data->length ();
-
- // encode the frame
- if (encoder_->encode (SFP::_tc_frame_header,
- &frame_header,
- 0,
- TAO_TRY_ENV)
- == CORBA_TypeCode::TRAVERSE_CONTINUE)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) encode of simple frameheader succeeded:"
- "length == %d\n",
- encoder_->length ()));
-
- }
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Encoder::"
- "start_message");
- return 0;
- }
- TAO_ENDTRY;
-
- ACE_Message_Block *mb = this->create_message_block ();
-
- // set the next pointer to point to the data
- mb->next (data);
-
- return mb;
-}
-
-ACE_Message_Block *
-SFP_Encoder::encode_start_reply_message ()
-{
- // Reset the internal buffer of the CDR stream
- this->encoder_->reset ();
-
- TAO_TRY
- {
- // construct the stop message
- SFP::start_reply start_reply_message;
-
-
- // flags field is all zeroes
- start_reply_message.flags = 0;
-
- // encode the start frame
- if (encoder_->encode (SFP::_tc_start_reply,
- &start_reply_message,
- 0,
- TAO_TRY_ENV)
- == CORBA_TypeCode::TRAVERSE_CONTINUE)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) encode of start_reply message succeeded:"
- "length == %d\n",
- encoder_->length ()));
-
- }
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Encoder::"
- "encode_start_reply_message");
- return 0;
- }
- TAO_ENDTRY;
-
- return this->create_message_block ();
-}
-
-SFP_Encoder::~SFP_Encoder ()
-{
-
-}
-
-// This method copies the CDR buffer into a new
-// ACE_Message_Block and returns it.
-ACE_Message_Block *
-SFP_Encoder::create_message_block (void)
-{
- // put the cdr encoded buffer into the message block
- ACE_Message_Block *message;
-
- ACE_NEW_RETURN (message,
- ACE_Message_Block (encoder_->length ()),
- 0);
-
- if (message->copy ((char *) encoder_->buffer (),
- (size_t) encoder_->length ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "SFP_Encoder: Could not copy"
- "CDR::buffer () into "
- "ACE_Message_Block"),
- 0);
-
- return message;
-}
-
-
-// ----------------------------------------------------------------------
-
-SFP_Decoder::SFP_Decoder ()
-{
- ACE_NEW (decoder_,
- CDR ());
-
-}
-
-// Attempts to decode the message as an SFP start message
-// returns 0 on success, -1 on failure
-int
-SFP_Decoder::decode_start_message (ACE_Message_Block *message)
-{
-
- this->decoder_->reset ();
-
- SFP::start_message start;
-
- TAO_TRY
- {
- this->create_cdr_buffer (message->rd_ptr (),
- message->length ());
-
- decoder_->decode (SFP::_tc_start_message,
- &start,
- 0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Decoder::"
- "decode_start_message");
- return -1;
- }
- TAO_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "Decoded start message,"
- "version number == %d . %d\n",
- start.major_version,
- start.minor_version));
-
- return 0;
-}
-
-// Attempts to decode the message as an SFP simple frame.
-// On success, message->rd_ptr () points to the data
-// Returns 0 on success, -1 on failure
-int
-SFP_Decoder::decode_simple_frame (ACE_Message_Block *message)
-{
-
- this->decoder_->reset ();
-
- if (message->length () < TAO_SFP_FRAME_HEADER_LEN)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) SFP_Decoder::decode_simple_frame: "
- "Message too small to be a valid header!"),
- -1);
-
- SFP::frame_header header;
-
- TAO_TRY
- {
- this->create_cdr_buffer (message->rd_ptr (),
- TAO_SFP_FRAME_HEADER_LEN);
-
- decoder_->decode (SFP::_tc_frame_header,
- &header,
- 0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Decoder::"
- "decode_frame_header");
- return -1;
- }
- TAO_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "Decoded frame header, "
- "magic number == %d "
- "message length == %d",
- header.magic_number,
- header.message_size));
-
- // Make the message read pointer point to the data
- message->rd_ptr (message->rd_ptr () +
- TAO_SFP_FRAME_HEADER_LEN);
-
- return 0;
-
-}
-
-// Attempts to decode the message as an SFP start message
-// returns 0 on success, -1 on failure
-int
-SFP_Decoder::decode_start_reply_message (ACE_Message_Block *message)
-{
-
- this->decoder_->reset ();
-
- SFP::start_reply start_reply_message;
-
- TAO_TRY
- {
- this->create_cdr_buffer (message->rd_ptr (),
- message->length ());
-
- decoder_->decode (SFP::_tc_start_reply,
- &start_reply_message,
- 0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Decoder::"
- "decode_start_message");
- return -1;
- }
- TAO_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "Decoded start_reply message\n"));
-
- return 0;
-}
-
-
-// Copies length bytes from the given message into the
-// CDR buffer. Returns 0 on success, -1 on failure
-int
-SFP_Decoder::create_cdr_buffer (char *message,
- size_t length)
-{
- this->decoder_->grow (length);
-
- char *bufptr = this->decoder_->buffer ();
-
- ACE_OS::memcpy (bufptr,
- message,
- length);
-
- return 0;
-}
-
-
-
-SFP_Decoder::~SFP_Decoder ()
-{
-
-}
diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.h b/TAO/orbsvcs/orbsvcs/AV/sfp.h
deleted file mode 100644
index 800e5dc6d4c..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/sfp.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if !defined (TAO_AV_SFP_H)
-#define TAO_AV_SFP_H
-
-#include "orbsvcs/sfpC.h"
-
-// default arguments to pass to use for the ORB
-const char *TAO_SFP_ORB_ARGUMENTS = "-ORBobjrefstyle URL";
-
-// SFP magic numbers
-const char *TAO_SFP_MAGIC_NUMBER = "=SFP";
-const char *TAO_SFP_FRAGMENT_MAGIC_NUMBER = "FRAG";
-const char *TAO_SFP_START_MAGIC_NUMBER = "=STA";
-
-// SFP version 1.0
-const unsigned char TAO_SFP_MAJOR_VERSION = 1;
-const unsigned char TAO_SFP_MINOR_VERSION = 0;
-
-// lengths of various SFP headers
-const unsigned char TAO_SFP_FRAME_HEADER_LEN = 12;
-
-class SFP_Encoder
-// = DESCRIPTION
-// Encodes frames for the SFP protocol
-// This class uses the CDR encoding format internally.
-{
- public:
- SFP_Encoder (void);
- // Default Constructor
-
- ACE_Message_Block *encode_start_message (void);
- // returns a SFP start message. it is the users responsibility
- // to delete this message block after using it.
-
- ACE_Message_Block *encode_simple_frame (ACE_Message_Block *data);
- // Encodes the message_block in an SFP frame
-
- ACE_Message_Block *encode_start_reply_message (void);
- // returns a start-reply message. it is the users responsibility to
- // delete this message block after using it.
-
- ~SFP_Encoder (void);
- // Destructor
-
- protected:
- ACE_Message_Block *create_message_block (void);
- // Helper method - copies the buffer in encoder_
- // into a new ACE_Message_Block and returns it.
- // Returns 0 on failure
-
- private:
-
- CDR *encoder_;
- // Use the TAO CDR encoder to encode everything
-
- CORBA::ORB_var orb_;
- // Need the ORB to initialize the CDR encoder
-};
-
-class SFP_Decoder
-{
-public:
- SFP_Decoder (void);
- // Default constructor
-
- int decode_start_message (ACE_Message_Block *message);
- // returns 0 if the message is a valid SFP start message
- // returns -1 otherwise.
-
- int decode_simple_frame (ACE_Message_Block *message);
- // decodes the message and returns the data in the message.
- // Returns the message type.
-
- int decode_start_reply_message (ACE_Message_Block *message);
- // returns 0 if the message is a valid SFP stop message
- // returns -1 otherwise.
-
- ~SFP_Decoder (void);
-
-protected:
- int create_cdr_buffer (char *message,
- size_t length);
- // Helper - copies length bytes from the given message into the CDR
- // buffer. Returns 0 on success, -1 on failure
-
-private:
- CDR *decoder_;
- // Use the TAO CDR encoder to encode everything
-
- CORBA::ORB_var orb_;
- // Need the ORB to initialize the CDR encoder
-};
-
-#endif /* !defined (TAO_SFP_H) */
diff --git a/TAO/orbsvcs/orbsvcs/AVStreams.idl b/TAO/orbsvcs/orbsvcs/AVStreams.idl
deleted file mode 100644
index 6b13d7674bf..00000000000
--- a/TAO/orbsvcs/orbsvcs/AVStreams.idl
+++ /dev/null
@@ -1,502 +0,0 @@
-/* -*- C++ -*- */
-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// AVStreams.idl
-//
-// = AUTHOR
-// OMG
-//
-//
-// ============================================================================
-
-#include "CosPropertyService.idl"
-
-module AVStreams
-// = DESCRIPTION
-// IDL for Control and Management of Audio/Video Streams
-// Revised Submission
-{
- struct QoS
- // This structure represents QoS for a given type.
- // E.g. {"video_qos", <"video_framerate", 26>,
- // <"video_depth", 9>}
- {
- string QoSType;
- // Name of the Qos type, e.g. "video_qos"
- string QoSParams;
- // @@
- // CosPropertyService::Properties QoSParams;
- // Sequence of name value pairs, see e.g. above.
- };
-
- typedef sequence<QoS> streamQoS;
- // The QoS of a stream is a sequence of QoS structs (defined above)
-
- typedef sequence<string> flowSpec;
- // flowSpec is used to keep transport protocol information
- // Each string is one endpoint.
-
- typedef sequence<string> protocolSpec;
- // List of protocols supported
- // protocol names registered by OMG.
- // e.g., TCP, UDP, AAL5, IPX, RTP
-
- typedef sequence<octet> encryption_key;
- // Used as a key for public-key encryption
-
- struct SFPStatus
- // This structure is defined for SFP1.0
- // Subsequent versions of the protocol may
- // specify new structures
- {
- // = TITLE
- // This structure is defined for SFP1.0 Subsequent versions of
- // the protocol may specify new structures
- boolean isFormatted;
- boolean isSpecialFormat;
- boolean seqNums;
- boolean timestamps;
- boolean sourceIndicators;
- };
-
- enum flowState {stopped, started, dead};
- // represents the state of a flow
-
- enum dirType {dir_in, dir_out};
- // the direction of a flow
-
- struct flowStatus
- // Used to store the status of a flow
- {
- string flowName;
- dirType directionality;
- flowState status;
- SFPStatus theFormat;
- QoS theQoS;
- };
-
- // @@
- // typedef CosPropertyService::Property streamEvent;
- typedef string streamEvent;
- // Used to convey events, in Basic_StreamCtrl::push_event
-
- exception notSupported {};
- // Used to indicate that an operation is not supported
-
- exception PropertyException {};
- // Property exception: raised by VDev::configure ()
-
- exception FPError { string flow_name; };
- // An flow protocol related error
-
- exception streamOpFailed
- // Raised by operations on streams
- {
- string reason;
- };
-
- exception streamOpDenied
- // Raised by operations on streams
- {
- string reason;
- };
-
- exception noSuchFlow {};
- // Used to indicate that an invalid flow name was used for the operation
-
- exception QoSRequestFailed
- // Used to indicate failure in changing QoS
- {
- string reason;
- };
-
- // @@
- // interface Basic_StreamCtrl : CosPropertyService::PropertySet {
- interface Basic_StreamCtrl
- // = DESCRIPTION
- // Base class for StreamCtrl, implements basic stream start
- // and stop functionality
- {
- // Empty flowSpec => apply operation to all flows
- void stop (in flowSpec the_spec) raises (noSuchFlow);
- // Stop the transfer of data of the stream
- // Empty the_spec means apply operation to all flows
-
- void start (in flowSpec the_spec) raises (noSuchFlow);
- // Start the transfer of data in the stream.
- // Empty the_spec means apply operation to all flows
-
- void destroy (in flowSpec the_spec) raises (noSuchFlow);
- // Tears down the stream. This will close the connection, and delete
- // the streamendpoint and vdev associated with this stream
- // Empty the_spec means apply operation to all flows
-
- boolean modify_QoS (inout streamQoS new_qos,
- in flowSpec the_spec)
- raises (noSuchFlow,
- QoSRequestFailed);
- // Changes the QoS associated with the stream
- // Empty the_spec means apply operation to all flows
-
- oneway void push_event (in streamEvent the_event);
- // Called by StreamEndPoint when something goes wrong
- // with a flow
-
- void set_FPStatus (in flowSpec the_spec,
- in string fp_name,
- in any fp_settings)
- raises (noSuchFlow,
- FPError);
- // Used to control the flow protocol parameters.
-
-
- Object get_flow_connection (in string flow_name)
- raises (noSuchFlow,
- notSupported);
- // Not implemented in the light profile, will raise the notsupported
- // exception
-
-
- void set_flow_connection (in string flow_name,
- in Object flow_connection)
- raises (noSuchFlow,
- notSupported);
- };
- // Not implemented in the light profile, will raise the notsupported
- // exception
-
- interface Negotiator
- // = DESCRIPTION
- // This class is used to negotiate QoS between two stream endpoints
- {
- boolean negotiate (in Negotiator remote_negotiator,
- in streamQoS qos_spec);
- // initiates the process of negotiating the qos_spec
- };
-
- // forward declarations
- interface VDev;
- interface MMDevice;
- interface StreamEndPoint;
- interface StreamEndPoint_A;
- interface StreamEndPoint_B;
-
- interface StreamCtrl : Basic_StreamCtrl
- // = DESCRIPTION
- // Implementation the A/V StreamCtrl class. this class
- // is used to control the stream. It should be subclassed
- // by applications that want to provide more control features.
- {
-
- boolean bind_devs (in MMDevice a_party, in MMDevice b_party,
- inout streamQoS the_qos,
- in flowSpec the_flows)
- raises (streamOpFailed,
- noSuchFlow,
- QoSRequestFailed);
- // Establish a stream between a_party and b_party,
- // with qos the_qos, and for the flows in the_flows
- // if the_flows is empty, bind all the flows
- // Causes a connection to be established between the StreamEndpoints.
- // Returns success/failure
-
- boolean bind (in StreamEndPoint_A a_party,
- in StreamEndPoint_B b_party,
- inout streamQoS the_qos,
- in flowSpec the_flows)
- raises (streamOpFailed,
- noSuchFlow,
- QoSRequestFailed);
- // Establish a connection between two streamendpoints. This can
- // be used if the streamendpoints have been created independent of
- // a MMDevice
-
- void unbind_party (in StreamEndPoint the_ep,
- in flowSpec the_spec)
- raises (streamOpFailed, noSuchFlow);
- // Unbind the_ep from the stream. Empty the_spec means apply to all flows.
-
- void unbind ()
- raises (streamOpFailed);
- // unbind the stream. Same effect as Basic_StreamCtrl::destroy ()
- };
-
- // @@
- // interface MCastConfigIf : CosPropertyService::PropertySet{
- interface MCastConfigIf
- // multicasting operations are not supported yet
- {
- boolean set_peer (in Object peer,
- inout streamQoS the_qos,
- in flowSpec the_spec)
- raises (QoSRequestFailed,
- streamOpFailed);
- // multicasting operations are not supported yet
-
- void configure (in CosPropertyService::Property a_configuration);
- // multicasting operations are not supported yet
-
- void set_initial_configuration (in CosPropertyService::Properties initial);
- // multicasting operations are not supported yet
-
- // Uses <format_name> standardised by OMG and IETF
- void set_format (in string flowName,
- in string format_name)
- raises (notSupported);
- // multicasting operations are not supported yet
-
- // Note, some of these device params are standardised by OMG
- void set_dev_params (in string flowName,
- in CosPropertyService::Properties new_params)
- raises (CosPropertyService::PropertyException,
- streamOpFailed);
- // multicasting operations are not supported yet
-
- };
-
- // @@
- // interface StreamEndPoint : CosPropertyService::PropertySet{
- interface StreamEndPoint
- // = DESCRIPTION
- // The Stream EndPoint. Used to implement one endpoint of a stream
- // that implements the transport layer.
- {
- void stop (in flowSpec the_spec)
- raises (noSuchFlow);
- // Stop the stream. Empty the_spec means, for all the flows
-
- void start (in flowSpec the_spec)
- raises (noSuchFlow);
- // Start the stream, Empty the_spec means, for all the flows
-
- void destroy (in flowSpec the_spec)
- raises (noSuchFlow);
- // Destroy the stream, Empty the_spec means, for all the flows
-
- boolean connect (in StreamEndPoint responder,
- inout streamQoS qos_spec,
- in flowSpec the_spec)
- raises (noSuchFlow,
- QoSRequestFailed,
- streamOpFailed);
- // Called by StreamCtrl. responder is the peer to connect to
-
- boolean request_connection (in StreamEndPoint initiator,
- in boolean is_mcast,
- inout streamQoS qos,
- inout flowSpec the_spec)
- raises (streamOpDenied, noSuchFlow,
- QoSRequestFailed, FPError);
- // Called by the peer StreamEndPoint. The flow_spec indicates the
- // flows (which contain transport addresses etc.)
-
- boolean modify_QoS (inout streamQoS new_qos,
- in flowSpec the_flows)
- raises (noSuchFlow,
- QoSRequestFailed);
- // Change the transport qos on a stream
-
- boolean set_protocol_restriction (in protocolSpec the_pspec);
- // Used to restrict the set of protocols
-
- void disconnect(in flowSpec the_spec)
- raises (noSuchFlow,
- streamOpFailed);
- // disconnect the flows
-
- void set_FPStatus (in flowSpec the_spec,
- in string fp_name,
- in any fp_settings)
- raises (noSuchFlow,
- FPError);
- // Used to control the SFP parameters
-
- Object get_fep (in string flow_name)
- raises (notSupported,
- noSuchFlow);
- // Not implemented in the light profile, throws notsupported
-
- string add_fep (in Object the_fep)
- // Can fail for reasons {duplicateFepName, duplicateRef}
- raises (notSupported,
- streamOpFailed);
- // Not implemented in the light profile, throws notsupported
-
- void remove_fep (in string fep_name)
- raises (notSupported,
- streamOpFailed);
- // Not implemented in the light profile, throws notsupported
-
- void set_negotiator (in Negotiator new_negotiator);
- // Used to "attach" a negotiator to the endpoint
-
- void set_key (in string flow_name,
- in encryption_key the_key);
- // Used for public key encryption.
-
- void set_source_id (in long source_id);
- // Used to set a unique id for packets sent by this streamendpoint
- };
-
- interface StreamEndPoint_A : StreamEndPoint
- // = DESCRIPTION
- // The "A" side of a streamendpoint
- {
-
- boolean multiconnect (inout streamQoS the_qos,
- inout flowSpec the_spec)
- raises (noSuchFlow, QoSRequestFailed, streamOpFailed);
- // Used for ATM-style multicast
-
- boolean connect_leaf (in StreamEndPoint_B the_ep,
- inout streamQoS the_qos,
- in flowSpec the_flows)
- raises (streamOpFailed, noSuchFlow,
- QoSRequestFailed, notSupported);
- // Used for ATM-style multicast
-
- void disconnect_leaf (in StreamEndPoint_B the_ep,
- in flowSpec theSpec)
- raises(streamOpFailed, noSuchFlow);
- // Used for ATM-style multicast
- };
-
- interface StreamEndPoint_B : StreamEndPoint
- {
-
- boolean multiconnect (inout streamQoS the_qos,
- inout flowSpec the_spec)
- raises (streamOpFailed, noSuchFlow,
- QoSRequestFailed, FPError);
- // Used for ATM-style multicast
- };
-
- // @@
- // interface VDev : CosPropertyService::PropertySet{
- interface VDev
- // = DESCRIPTION
- // Implements the VDev interface. One of these is created per connection,
- // and represents device-specific parameters
- {
- boolean set_peer (in StreamCtrl the_ctrl,
- in VDev the_peer_dev,
- inout streamQoS the_qos,
- in flowSpec the_spec)
- raises (noSuchFlow,
- QoSRequestFailed,
- streamOpFailed);
- // Called to tell the vdev who the streamctrl, peer vdev is
-
- boolean set_Mcast_peer (in StreamCtrl the_ctrl,
- in MCastConfigIf a_mcastconfigif,
- inout streamQoS the_qos,
- in flowSpec the_spec)
- raises (noSuchFlow,
- QoSRequestFailed,
- streamOpFailed);
- // Used to set the streamctrl and multicast device
-
- void configure (in CosPropertyService::Property the_config_mesg)
- raises (PropertyException,
- streamOpFailed);
- // Called by the peer VDev to configure the device (catch all)
-
- // Uses <formatName> standardised by OMG and IETF
- void set_format (in string flowName,
- in string format_name)
- raises (notSupported);
- // Used to set a format on a flowname
-
- // Note, some of these device params are standardised by OMG
- void set_dev_params (in string flowName,
- in CosPropertyService::Properties new_params)
- raises (PropertyException,
- streamOpFailed);
- // Used to set device parameters
-
- boolean modify_QoS (inout streamQoS the_qos,
- in flowSpec the_spec)
- raises (noSuchFlow,
- QoSRequestFailed);
- // Called to change QoS of the device
-
- };
-
- interface MMDevice : CosPropertyService::PropertySet
- // = DESCRIPTION
- // Implements a factory to create Endpoints and VDevs
- {
- StreamEndPoint_A create_A (in StreamCtrl the_requester,
- out VDev the_vdev,
- inout streamQoS the_qos,
- out boolean met_qos,
- inout string named_vdev,
- in flowSpec the_spec)
- raises (streamOpFailed,
- streamOpDenied,
- notSupported,
- QoSRequestFailed,
- noSuchFlow);
- // Called by StreamCtrl to create a "A" type streamendpoint and vdev
-
- StreamEndPoint_B create_B(in StreamCtrl the_requester,
- out VDev the_vdev,
- inout streamQoS the_qos,
- out boolean met_qos,
- inout string named_vdev,
- in flowSpec the_spec)
- raises (streamOpFailed,
- streamOpDenied,
- notSupported,
- QoSRequestFailed,
- noSuchFlow);
- // Called by StreamCtrl to create a "B" type streamendpoint and vdev
-
- StreamCtrl bind (in MMDevice peer_device,
- inout streamQoS the_qos,
- out boolean is_met,
- in flowSpec the_spec)
- raises (streamOpFailed,
- noSuchFlow,
- QoSRequestFailed);
- // Can be used to request the MMDevice to create a new StreamCtrl,
- // and call bind_devs on it
-
- StreamCtrl bind_mcast (in MMDevice first_peer,
- inout streamQoS the_qos,
- out boolean is_met,
- in flowSpec the_spec)
- raises (streamOpFailed,
- noSuchFlow,
- QoSRequestFailed);
- // Multicast bind
-
- void destroy (in StreamEndPoint the_ep,
- in string vdev_name)
- // ie VDev not found
- raises (notSupported);
- // Remove the StreamEndPoint and the related vdev
-
- string add_fdev (in Object the_fdev)
- raises (notSupported,
- streamOpFailed);
- // Not supported in the light profile, raises notsupported
-
- Object get_fdev (in string flow_name)
- raises (notSupported,
- noSuchFlow);
- // Not supported in the light profile, raises notsupported
-
- void remove_fdev (in string flow_name)
- raises (notSupported,
- noSuchFlow);
- // Not supported in the light profile, raises notsupported
- };
-};
diff --git a/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl b/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl
deleted file mode 100644
index 952301d7091..00000000000
--- a/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl
+++ /dev/null
@@ -1,250 +0,0 @@
-// $Id$
-
-// IDL for Control and Management of Audio/Video Streams
-// Revised Submission
-
-// Additional IDL for full profile
-#include "AVStreams.idl"
-
-module AVStreams_Full
-{
- exception protocolNotSupported{};
- exception formatNotSupported{};
- exception formatMismatch{};
- exception FEPMismatch{};
- exception alreadyConnected{};
- exception invalidSettings{string settings;};
- exception notConnected{};
- exception deviceQosMismatch{};
- exception failedToConnect{string reason;};
- exception failedToListen{string reason;};
-
-
- interface FlowProducer;
- interface FlowConsumer;
- interface FlowEndPoint;
- interface FDev;
-
- interface FlowConnection : PropertyService::PropertySet
- {
- void stop();
- void start();
- void destroy();
-
- boolean modify_QoS(
-
- inout AVStreams::QoS new_qos)
- raises (AVStreams::QoSRequestFailed);
-
- boolean use_flow_protocol(
- in string fp_name,
- in any fp_settings)
- raises (AVStreams::FPError, AVStreams::notSupported);
-
- oneway void push_event(in AVStreams::streamEvent the_event);
-
- boolean connect_devs(in FDev a_party, in FDev b_party,
- inout AVStreams::QoS the_qos)
- raises (AVStreams::streamOpFailed,
- AVStreams::streamOpDenied,
- AVStreams::QoSRequestFailed);
-
- boolean connect(
- in FlowProducer flow_producer,
- in FlowConsumer flow_consumer,
- inout AVStreams::QoS the_qos)
- raises (formatMismatch, FEPMismatch, alreadyConnected);
-
- boolean disconnect();
-
- // The notSupported exception is raised where
- // flow cannot have multiple producers
- boolean add_producer(in FlowProducer flow_producer,
- inout AVStreams::QoS the_qos)
- raises (alreadyConnected, AVStreams::notSupported);
-
- boolean add_consumer(in FlowConsumer flow_consumer,
- inout AVStreams::QoS the_qos)
- raises (alreadyConnected);
-
- boolean drop(in FlowEndPoint target)
- raises (notConnected);
- };
-
- interface FlowEndPoint : PropertyService::PropertySet
- {
- boolean lock();
- void unlock();
-
- void stop();
- void start();
- void destroy();
-
- // Default is a nil object reference
- attribute AVStreams::StreamEndPoint related_sep;
- attribute FlowConnection related_flow_connection;
-
- FlowEndPoint get_connected_fep()
- raises (notConnected,
- AVStreams::notSupported);
-
- // syntax of fp_name is <flowProtocol>
- boolean use_flow_protocol(in string fp_name,
- in any fp_settings)
- raises (AVStreams::FPError, AVStreams::notSupported);
-
- // set_format() initializes 'format'
- // as current media format e.g. MPEG.
- void set_format(in string format)
- raises (AVStreams::notSupported);
-
- void set_dev_params(
- in PropertyService::Properties new_settings)
- raises (PropertyService::PropertyException,
- AVStreams::streamOpFailed);
-
- void set_protocol_restriction(in AVStreams::protocolSpec
- the_spec)
- raises (AVStreams::notSupported);
-
- boolean is_fep_compatible(in FlowEndPoint fep)
- raises (formatMismatch, deviceQosMismatch);
-
- boolean set_peer(
- in FlowConnection the_fc,
-
- in FlowEndPoint the_peer_fep,
- inout AVStreams::QoS the_qos)
- raises (AVStreams::QoSRequestFailed,
- AVStreams::streamOpFailed);
-
- boolean set_Mcast_peer(
- in FlowConnection the_fc,
- in AVStreams::MCastConfigIf a_mcastconfigif,
- inout AVStreams::QoS the_qos)
- raises (AVStreams::QoSRequestFailed);
-
- };
-
- interface FlowProducer : FlowEndPoint
- {
- boolean connect_to_peer(inout AVStreams::QoS the_qos,
- in string address,
-
- in string use_flow_protocol) // syntax <flowProtocol>
- raises(failedToConnect,
- AVStreams::FPError, AVStreams::QoSRequestFailed);
-
- string connect_mcast(inout AVStreams::QoS the_qos,
- out boolean is_met,
- in string address,
- in string use_flow_protocol)
- raises (failedToConnect,
- AVStreams::notSupported,
- AVStreams::FPError,
- AVStreams::QoSRequestFailed);
-
- string get_rev_channel(in string pcol_name);
-
- void set_key(in AVStreams::key the_key);
- void set_source_id(in long source_id);
- };
-
- interface FlowConsumer : FlowEndPoint
- {
-
-
- // Needs to know its peer to choose its protocol correctly
- // Also to ask for a reverse channel for credit-based flow
- // control, if one is required
- string go_to_listen(
- inout AVStreams::QoS the_qos,
- in boolean is_mcast,
- in FlowProducer peer,
- inout string flowProtocol)// syntax <flowProtocol>
- raises(failedToListen, AVStreams::FPError,
- AVStreams::QoSRequestFailed);
- };
-
- interface FDev : PropertyService::PropertySet {
- FlowProducer create_producer(
- in FlowConnection the_requester,
- inout AVStreams::QoS the_qos,
- out boolean met_qos,
- inout string named_fdev)
- raises(AVStreams::streamOpFailed,
- AVStreams::streamOpDenied,
- AVStreams::notSupported,
- AVStreams::QoSRequestFailed);
-
- FlowConsumer create_consumer(
- in FlowConnection the_requester,
- inout AVStreams::QoS the_qos,
- out boolean met_qos,
- inout string named_fdev)
- raises(AVStreams::streamOpFailed,
- AVStreams::streamOpDenied,
- AVStreams::notSupported,
- AVStreams::QoSRequestFailed);
-
- FlowConnection bind(in FDev peer_device,
- inout AVStreams::QoS the_qos,
- out boolean is_met)
- raises (AVStreams::streamOpFailed,
- AVStreams::QoSRequestFailed);
-
- FlowConnection bind_mcast(in FDev first_peer,
- inout AVStreams::QoS the_qos,
- out boolean is_met)
- raises (AVStreams::streamOpFailed,
- AVStreams::QoSRequestFailed);
-
- void destroy(in FlowEndPoint the_ep, in string fdev_name)
- // ie FDev not found
- raises (AVStreams::notSupported);
- };
-
- enum PositionOrigin {
- AbsolutePosition, RelativePosition, ModuloPosition
- };
-
- enum PositionKey {
- ByteCount, SampleCount, MediaTime
- };
-
- struct Position {
- PositionOrigin origin;
- PositionKey key;
- long value;
- };
-
- exception PostionKeyNotSupported { PositionKey key;};
- exception InvalidPosition { PositionKey key;};
-
- // MediaControl interface is similar to
- // ControlledStream interface in MSS.
- // It can be inherited by flow endpoints or
- // FlowConnection interfaces.
- interface MediaControl{
-
- exception PostionKeyNotSupported { PositionKey key;};
-
- Position get_media_position(
- in PositionOrigin an_origin,
- in PositionKey a_key)
- raises (PostionKeyNotSupported);
-
- void set_media_position(in Position a_position)
- raises (PostionKeyNotSupported, InvalidPosition);
-
- void start(in Position a_position)
- raises(InvalidPosition);
- void pause(in Position a_position)
- raises(InvalidPosition);
- void resume(in Position a_position)
- raises(InvalidPosition);
- void stop(in Position a_position)
- raises(InvalidPosition);
- };
-};
-
diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients.cpp b/TAO/orbsvcs/orbsvcs/Channel_Clients.cpp
deleted file mode 100644
index cfa1da318d3..00000000000
--- a/TAO/orbsvcs/orbsvcs/Channel_Clients.cpp
+++ /dev/null
@@ -1 +0,0 @@
-// $Id$
diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients.h b/TAO/orbsvcs/orbsvcs/Channel_Clients.h
deleted file mode 100644
index 487e688eb2c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Channel_Clients.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Channel_Clients
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_CHANNEL_CLIENTS_H
-#define ACE_CHANNEL_CLIENTS_H
-
-#include "orbsvcs/Channel_Clients_T.h"
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Channel_Clients.i"
-#endif /* __ACE_INLINE__ */
-#endif /* ACE_CHANNEL_CLIENTS_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp b/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp
deleted file mode 100644
index cc1d2ea78b9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id$
-
-#ifndef ACE_CHANNEL_CLIENTS_T_C
-#define ACE_CHANNEL_CLIENTS_T_C
-
-#include "orbsvcs/Channel_Clients_T.h"
-
-#if !defined (__ACE_INLINE__)
-#include "orbsvcs/Channel_Clients_T.i"
-#endif /* __ACE_INLINE__ */
-
-template<class TARGET> void
-ACE_PushConsumer_Adapter<TARGET>::push (const RtecEventComm::EventSet& events,
- CORBA::Environment &_env)
-{
- target_->push (events, _env);
-}
-
-template<class TARGET> void
-ACE_PushConsumer_Adapter<TARGET>::disconnect_push_consumer (CORBA::Environment &_env)
-{
- target_->disconnect_push_consumer (_env);
-}
-
-template<class TARGET> void
-ACE_PushSupplier_Adapter<TARGET>::disconnect_push_supplier (CORBA::Environment &_env)
-{
- target_->disconnect_push_supplier (_env);
-}
-
-#endif /* ACE_CHANNEL_CLIENTS_T_C */
diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.h b/TAO/orbsvcs/orbsvcs/Channel_Clients_T.h
deleted file mode 100644
index 09002a8ebaa..00000000000
--- a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Channel_Clients_T
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu) and
-// Douglas Schmidt (schmidt@cs.wustl.edu)
-//
-// = DESCRIPTION
-// These classes allow applications to be consumer, suppliers, and
-// consumer suppliers, as well as being active objects. This is
-// accomplished with adapters to prevent the use of multiple
-// inheritence (which is this root of all evil.)
-//
-// ============================================================================
-
-#ifndef ACE_CHANNEL_CLIENTS_T_H
-#define ACE_CHANNEL_CLIENTS_T_H
-
-#include "orbsvcs/RtecEventCommS.h"
-
-// @@ TODO: Add throw specs to this classes.
-
-template <class TARGET>
-class ACE_PushConsumer_Adapter : public POA_RtecEventComm::PushConsumer
-// = TITLE
-// ACE Push Consumer Adapter
-//
-// = DESCRIPTION
-// Forwards all calls to the owner_.
-{
-public:
- ACE_PushConsumer_Adapter (TARGET *target);
- // Forwards all calls to <owner>.
-
- virtual void push (const RtecEventComm::EventSet& events,
- CORBA::Environment &_env);
- // Forwards to target_.
-
- virtual void disconnect_push_consumer (CORBA::Environment &);
- // Forwards to target_.
-
-private:
- TARGET *target_;
-};
-
-// ************************************************************
-
-template <class TARGET>
-class ACE_PushSupplier_Adapter : public POA_RtecEventComm::PushSupplier
-// = TITLE
-// ACE Push Supplier Adapter
-//
-// = DESCRIPTION
-// Forwards all calls to disconnect_push_supplier the target_.
-{
-public:
- ACE_PushSupplier_Adapter (TARGET *target);
- // Forwards all calls to <owner>.
-
- virtual void disconnect_push_supplier (CORBA::Environment &);
- // Forwards to target_.
-
-private:
- TARGET *target_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Channel_Clients_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "orbsvcs/Channel_Clients_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Channel_Clients_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_CHANNEL_CLIENTS_T_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.i b/TAO/orbsvcs/orbsvcs/Channel_Clients_T.i
deleted file mode 100644
index 620b6fd04a8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.i
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// $Id$
-//
-
-template<class TARGET> ACE_INLINE
-ACE_PushConsumer_Adapter<TARGET>::ACE_PushConsumer_Adapter (TARGET *t)
- : target_ (t)
-{
-}
-
-template<class TARGET> ACE_INLINE
-ACE_PushSupplier_Adapter<TARGET>::ACE_PushSupplier_Adapter (TARGET *t)
- : target_ (t)
-{
-}
-
-
diff --git a/TAO/orbsvcs/orbsvcs/CosConcurrencyControl.idl b/TAO/orbsvcs/orbsvcs/CosConcurrencyControl.idl
deleted file mode 100644
index 7c6b7fe83d0..00000000000
--- a/TAO/orbsvcs/orbsvcs/CosConcurrencyControl.idl
+++ /dev/null
@@ -1,187 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosTransaction.idl
-//
-// = DESCRIPTION
-// Described in CORBAservices: Common Object Services
-// Specification, chapter 7 The concurrency service description can
-// be downloaded from
-// ftp://www.omg.org/pub/docs/formal/97-11-02.idl
-//
-// = AUTHOR
-// OMG and Torben Worm <tworm@cs.wustl.edu>
-//
-// ============================================================================
-
-//CosConcurrencyControl Module, page 7-8
-//Includes the following interfaces:
-// LockCoordinator, LockSet, TransactionalLockSet, LockSetFactory
-
-// The part depending on the transaction service may be included by defining
-// TAO_HAS_TRANSACTION_CONTROL_SERVICE
-
-#if defined (TAO_HAS_TRANSACTION_CONTROL_SERVICE)
-#include <CosTransactions.idl>
-#endif /* TAO_HAS_TRANSACTION_CONTROL_SERVICE */
-
-module CosConcurrencyControl
-// = TITLE
-// CosConcurrencyControl
-//
-// = DESCRIPTION
-// This idl file describes the concurrency control service.
-// The purpose of the concurrency control service is to mediate
-// concurrent access to an pbject such that the consistency of
-// the object is not compromised when accessed by concurrently
-// executing computations.
-{
- enum lock_mode
- {
- read,
- write,
- upgrade,
- intention_read,
- intention_write
- };
- // This is the different lock types supported by this module. For a
- // description of the compatability between the different lock types
- // please consult the service description (OMG).
-
- exception LockNotHeld {};
- // The LockNotHeld exception is is raised when an operation to unlock
- // or change the mode of a lock is called and the specified lock is not
- // held
-
-#if defined (TAO_HAS_TRANSACTION_CONTROL_SERVICE)
- // @@TAO I'm in doubt here. The lock coordinator is designed for
- // transactional lock sets?? - tworm
- interface LockCoordinator
- {
- // = TITLE
- // LockCoordinator drops all locks associated with a transaction.
- // = DESCRIPTION
- // The LockCoordinator interface enables a transaction service to
- // drop all locks held by a transaction.
-
- void drop_locks ();
- // Releases all the locks held by the transaction. Designet to be
- // used by transaction service when a transaction commits or aborts.
- };
-#endif /* TAO_HAS_TRANSACTION_CONTROL_SERVICE */
-
- interface LockSet
- {
- // = TITLE
- // LockSet inteface to the concurrency service in implicit mode
- // = DESCRIPTION
- // Clients operating in the implicit mode (i.e. non-transactional
- // mode) acquire and release locks in lock sets throug this
- // interface. The interface only provides operations to acquire
- // and release locks on behalf of the calling thread or transaction.
-
- void lock (in lock_mode mode);
- // Acquires a lock on the specified lock set in the specified mode.
- // Blocks until lock is obtained
-
- boolean try_lock (in lock_mode mode);
- // Tries to acquire a lock on the specified lock set. If it is not
- // possible to acquire the lock false is returned
-
- void unlock (in lock_mode mode)
- raises (LockNotHeld);
- // Releases a single lock on the specified lock set. A lock can be
- // held multiple times in the same mode. If the lock is not held the
- // exception LockNotHeld is raised
-
- void change_mode (in lock_mode held_mode,
- in lock_mode new_mode)
- raises (LockNotHeld);
- // Changes the mode of the lock on the specified lock set. If a
- // conflicting lock is held by another client the call blocks until
- // the new mode can be granted. If the lock is not held in the
- // specified mode the exception LockNotHeld is raised.
-
-#if defined (TAO_HAS_TRANSACTION_CONTROL_SERVICE)
- LockCoordinator get_coordinator (in CosTransactions::Coordinator which);
- // Returns the lock coordinator associated with the specified
- // transaction.
-#endif /* TAO_HAS_TRANSACTION_CONTROL_SERVICE */
- };
-
-#if defined (TAO_HAS_TRANSACTION_CONTROL_SERVICE)
- interface TransactionalLockSet
- {
- // = TITLE
- // TransactionalLockSet interface to the concurrency service
- // in transactional mode
- // = DESCRIPTION
- // Clients operating in the transactional mode acquire and
- // release locks in lock sets through this interface. The
- // interface provides operations identical to the operations
- // described in the LockSet interface section. The difference
- // beeing that the coordinator for the transaction is explicitly
- // passed as a reference to the operations. Please see the
- // description of the LockSet interface for a detailed description.
-
- void lock (in CosTransactions::Coordinator current,
- in lock_mode mode);
- // See LockSet::lock
-
- boolean try_lock (in CosTransactions::Coordinator current,
- in lock_mode mode);
- // See LockSet::try_lock
-
- void unlock (in CosTransactions::Coordinator current,
- in lock_mode mode)
- raises (LockNotHeld);
- // See LockSet::unlock
-
- void change_mode (in CosTransactions::Coordinator current,
- in lock_mode held_mode,
- in lock_mode new_mode)
- raises (LockNotHeld);
- // See LockSet::change_mode
-
- LockCoordinator get_coordinator (in CosTransactions::Coordinator which);
- // See LockSet::get_coordinator
- };
-#endif /* TAO_HAS_TRANSACTION_CONTROL_SERVICE */
-
- interface LockSetFactory
- {
- // = TITLE
- // Factory interface for the LockSet and TransactionalLockSet
- // interfaces
- // = DESCRIPTION
- // Factory for creating the lock sets
-
- LockSet create ();
- // Creates a new LockSet and lock coordinator
- // @@TAO ??? is this correct? Lock coordinators are associated with
- // transactions. - tworm
-
- LockSet create_related (in LockSet which);
- // Creates a lock set related to the specified lock set. Related lock
- // sets drop their locks together.
-
-#if defined (TAO_HAS_TRANSACTION_CONTROL_SERVICE)
- TransactionalLockSet create_transactional ();
- // Creates a new TransactionalLockSet and lock coordinator for
- // transactional mode clients.
-
- TransactionalLockSet
- create_transactional_related (in TransactionalLockSet which);
- // Creates a new transactional lock set related to the specified lock
- // set. Related lock sets drop locks together.
-#endif /* TAO_HAS_TRANSACTION_CONTROL_SERVICE */
- };
-};
-
-
diff --git a/TAO/orbsvcs/orbsvcs/CosLifeCycle.idl b/TAO/orbsvcs/orbsvcs/CosLifeCycle.idl
deleted file mode 100644
index e687b08fcd5..00000000000
--- a/TAO/orbsvcs/orbsvcs/CosLifeCycle.idl
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosLifeCycle.idl
-//
-// = DESCRIPTION
-// Described in CORBAservices: Common Object Services Specification,
-// chapter 6.
-// The life cycle service description can be downloaded from:
-// ftp://www.omg.org/pub/docs/formal/97-12-13.pdf
-// The original IDL file can be downloaede from:
-// ftp://www.omg.org/pub/docs/formal/97-11-02.idl
-//
-// = AUTHOR
-// OMG and Torben Worm <tworm@cs.wustl.edu>
-//
-// ============================================================================
-
-
-// OMG IDL for CosLifeCycle Module, page 6-10 in
-// Includes the following interfaces:
-// FactoryFinder, LifeCycleObject, GenericFactory
-
-#include "CosNaming.idl"
-
-module CosLifeCycle{
- // = TITLE
- // CosLifeCycle
- //
- // = DESCRIPTION
- // This idl file describes the life cycle service.
- // The purpose of the life cycle service is to
- //
-
- typedef CosNaming::Name Key;
- typedef Object Factory;
- typedef sequence <Factory> Factories;
- typedef struct NVP {
- 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 {
- // = TITLE
- //
- // = DESCRIPTION
- //
- //
-
- Factories find_factories(in Key factory_key)
- raises(NoFactory);
- };
-
- interface LifeCycleObject {
- // = TITLE
- //
- // = DESCRIPTION
- //
- //
-
- 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 {
- // = TITLE
- //
- // = DESCRIPTION
- //
- //
-
- boolean supports(in Key k);
- Object create_object(in Key k,
- in Criteria the_criteria)
- raises (NoFactory, InvalidCriteria, CannotMeetCriteria);
- };
-};
-
-
-
-// Criteria, page 6-17:
-
-typedef struct NVP {
- CosNaming::Istring name;
- any value;
-} NameValuePair;
-
-typedef sequence <NameValuePair> Criteria;
diff --git a/TAO/orbsvcs/orbsvcs/CosNaming.idl b/TAO/orbsvcs/orbsvcs/CosNaming.idl
deleted file mode 100644
index e9064eec131..00000000000
--- a/TAO/orbsvcs/orbsvcs/CosNaming.idl
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosNaming.idl
-//
-// = AUTHOR
-// Marina Spivak
-//
-// ============================================================================
-
-module CosNaming
- // = TITLE
- // This module provides interface for using COS Naming Service.
-{
- typedef string Istring;
- struct NameComponent
- {
- Istring id;
- // This is the name that is used to identify object references.
-
- Istring kind;
- // Stores any addtional info about the object reference.
- };
- // This is a 'simple' name.
- // NOTE: both id and kind fields are used in resolving names.
-
- typedef sequence <NameComponent> Name;
- // This is a compound name: <c1; c2; c3; cn> where c1 to cn-1 are
- // the names of the nested contexts, and cn is the name of the
- // object bound in cn-1.
-
- enum BindingType
- {
- nobject,
- // object binding.
-
- ncontext
- // naming context binding.
- };
-
- struct Binding
- {
- Name binding_name;
- BindingType binding_type;
- };
-
- typedef sequence <Binding> BindingList;
-
- interface BindingIterator;
- // Forward declaration.
-
- interface NamingContext
- // = TITLE
- // Interface for managing name bindings and naming contexts.
- {
- // = Exceptions.
-
- enum NotFoundReason
- {
- missing_node,
- not_context,
- not_object
- };
-
- exception NotFound
- {
- NotFoundReason why;
- Name rest_of_name;
- };
- // Indicates that the name does not identify a binding.
-
- exception CannotProceed
- {
- //Commented out due to the bug in Orbix compiler
- NamingContext cxt;
- Name rest_of_name;
- };
- // Implementation has given up for some reason. The client,
- // however, may be able to continue operation at the returned
- // naming context.
-
- exception InvalidName {};
- // A name of length 0 is invalid.
- // Implementations may place further restrictions.
-
- exception AlreadyBound {};
- // Indicates that the specified name is already bound to some
- // object. Only one object can be bound to a particular name in
- // a context. To change the binding, <rebind> and
- // <rebind_context> can be used.
-
- exception NotEmpty {};
- // Indicates that the context is not empty.
-
- // = Binding operations.
-
- void bind (in Name n, in Object obj)
- raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
- // create a binding for name <n> and object <obj> in the naming
- // context. Compound names are treated as follows: ctx->bind
- // (<c1; c2; c3; cn>, obj) = (ctx->resolve (<c1; c2;
- // cn-1>))->bind (<cn>, obj) if the there already exists a
- // binding for the specified name, <AlreadyBound> exception is
- // thrown. Naming contexts should be bound using <bind_context>
- // and <rebind_context> in order to participate in name
- // resolution later.
-
- void rebind (in Name n, in Object obj)
- raises(NotFound, CannotProceed, InvalidName);
- // this is similar to <bind> operation above, except for when
- // the binding for the specified name already exists in the
- // specified context. In that case, the existing binding is
- // replaced with the new one.
-
- void bind_context (in Name n, in NamingContext nc)
- raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
- // This is the version of <bind> specifically for binding naming
- // contexts, so that they will participate in name resolution
- // when compound names are passed to be resolved.
-
- void rebind_context (in Name n, in NamingContext nc)
- raises(NotFound, CannotProceed, InvalidName);
- // This is a version of <rebind> specifically for naming
- // contexts, so that they can participate in name resolution
- // when compound names are passed.
-
- // = Resolving names.
-
- Object resolve (in Name n)
- raises(NotFound, CannotProceed, InvalidName);
- // Return object reference that is bound to the name. Compound
- // name resolve is defined as follows: ctx->resolve (<c1; c2;
- // cn>) = ctx->resolve (<c1; c2 cn-1>)->resolve (<cn>) The
- // naming service does not return the type of the object.
- // Clients are responsible for "narrowing" the object to the
- // appropriate type.
-
- // = Unbinding names.
-
- void unbind (in Name n)
- raises(NotFound, CannotProceed, InvalidName);
- // Remove the name binding from the context. When compound
- // names are used, unbind is defined as follows: ctx->unbind
- // (<c1; c2; cn>) = (ctx->resolve (<c1; c2; cn-1>))->unbind
- // (<cn>)
-
- // = Creating Naming Contexts.
-
- NamingContext new_context ();
- // This operation returns a new naming context implemented by
- // the same naming server in which the operation was invoked.
- // The context is not bound.
-
- NamingContext bind_new_context (in Name n)
- raises(NotFound, AlreadyBound, CannotProceed, InvalidName);
- // This operation creates a new context and binds it to the name
- // supplied as an argument. The newly-created context is
- // implemented by the same server as the context in which it was
- // bound (the name argument excluding the last component).
-
- // = Deleting contexts.
-
- void destroy ()
- raises (NotEmpty);
- // Delete the naming context. NOTE: the user should <unbind>
- // any bindings in which the given context is bound to some
- // names before invoking <destroy> operation on it. Ignoring
- // this rule may cause unexpected behaviour. <destroy> deletes
- // the context object if it is not bound to any names in the
- // given address space. <destroys> decrements the reference
- // count of the context if bindings to it exist.
-
- // = Listing the naming context.
-
- void list (in unsigned long how_many,
- out BindingList bl, out BindingIterator bi);
- // Returns at most the requested number of bindings <how_many>
- // in <bl>. If the naming context contains additional bindings,
- // they are returned with a BindingIterator. In the naming
- // context does not contain any additional bindings <bi>
- // returned as null.
- };
-
- interface BindingIterator
- // = TITLE
- // Interface for iterating over Bindings returned with the <list>
- // operation.
- {
- boolean next_one (out Binding b);
- // This operation returns the next binding. If there are no
- // more bindings false is returned.
-
- boolean next_n (in unsigned long how_many,
- out BindingList bl);
- // This operation returns at most the requested number of
- // bindings.
-
- void destroy ();
- // This operation destroys the iterator.
- };
-};
diff --git a/TAO/orbsvcs/orbsvcs/CosPropertyService.idl b/TAO/orbsvcs/orbsvcs/CosPropertyService.idl
deleted file mode 100644
index f38224143f3..00000000000
--- a/TAO/orbsvcs/orbsvcs/CosPropertyService.idl
+++ /dev/null
@@ -1,405 +0,0 @@
-// -*-c++-*-
-
-// $Id$
-
-// ===================================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosPropertyService.idl
-//
-// = DESCRITION
-// The property service, downloaded from ftp://ftp.omg.org/pub/docs/1995/95-06-01.ps
-//
-// = AUTHOR
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ======================================================================================
-
-module CosPropertyService
-{
- // = TITLE
- // CosPropertyService : To support properties (that are typed
- // named values dynamically associated with an object, outside
- // of the type system.
- //
- // = DESCRIPTION
- // The data types and interfaces to deal with property names, property values,
- // property modes etc.
-
- // = Data Types.
-
- typedef string PropertyName;
-
- struct Property
- {
- PropertyName property_name;
- any property_value;
- };
-
- enum PropertyModeType
- {
- normal,
- read_only,
- fixed_normal,
- fixed_readonly,
- undefined
- };
-
- struct PropertyDef
- {
- PropertyName property_name;
- any property_value;
- PropertyModeType property_mode;
- };
-
- struct PropertyMode
- {
- PropertyName property_name;
- PropertyModeType property_mode;
- };
-
- typedef sequence<PropertyName> PropertyNames;
- typedef sequence<Property> Properties;
- typedef sequence<PropertyDef> PropertyDefs;
- typedef sequence<PropertyMode> PropertyModes;
- typedef sequence<TypeCode> PropertyTypes;
-
- interface PropertyNamesIterator;
- interface PropertiesIterator;
- interface PropertySetFactory;
- interface PropertySetDef;
- interface PropertySet;
-
- // = Exceptions
-
- exception ConstraintNotSupported {};
- exception InvalidPropertyName {};
- exception ConflictingProperty {};
- exception PropertyNotFound {};
- exception UnsupportedTypeCode {};
- exception UnsupportedProperty {};
- exception UnsupportedMode {};
- exception FixedProperty {};
- exception ReadOnlyProperty {};
-
- enum ExceptionReason
- {
- invalid_property_name,
- conflicting_property,
- property_not_found,
- unsupported_type_code,
- unsupported_property,
- unsupported_mode,
- fixed_property,
- read_only_property
- };
-
- exception PropertyException
- {
- ExceptionReason reason;
- PropertyName failing_property_name;
- };
-
- // @@
- // typedef sequence<PropertyException> PropertyExceptions;
-
- exception MultipleExceptions
- {
- // @@
- // PropertyExceptions exceptions;
- };
-
- // = Interface Definitions.
-
- interface PropertySetFactory
- {
- // = TITLE
- // Factory class for PropertySet interface.
- // = DESCRIPTION
- // Support for creating PropertySets with initial
- // constraints and properties.
-
- PropertySet create_propertyset ();
- // The create_propertyset operation returns a new
- // PropertySet. It is considered an implementation issue as to
- // whether the PropertySet contains any initial properties or
- // has constraints.
-
- PropertySet create_constrained_propertyset (in PropertyTypes allowed_property_types,
- in Properties allowed_properties)
- raises (ConstraintNotSupported);
- // The create_constrained_propertyset operation allows a client
- // to create a new PropertySet with specific constraints.
-
- PropertySet create_initial_propertyset (in Properties initial_properties)
- raises (MultipleExceptions);
- // The create_initial_propertyset operation allows a client to
- // create a new PropertySet with specific initial properties.
- };
-
- interface PropertySetDefFactory
- {
- // = TITLE
- // Factory class for PropertySetDef interface.
- // = DESCRIPTION
- // Support for creating Propsetdefs with initial constraints
- // and properties.
-
- PropertySetDef create_propertysetdef ();
- // The create_propertysetdef operation returns a new
- // PropertySetDef.
-
- PropertySetDef create_constrained_propertysetdef (in PropertyTypes allowed_property_types,
- in PropertyDefs allowed_property_defs)
- raises (ConstraintNotSupported);
- // The create_constrained_propertysetdef operation allows a
- // client to create a new PropertySetDef with specific
- // constraints, including property modes.
-
- PropertySetDef create_initial_propertysetdef (in PropertyDefs initial_property_defs)
- raises (MultipleExceptions);
- // The create_initial_propertysetdef operation allows a client
- // to create a new PropertySetDef with specific initial
- // properties, including property modes.
- };
-
- interface PropertySet
- {
- // = TITLE
- // The PropertySet interface provides operations to define
- // and modify properties, list and get properties, and
- // delete properties.
- //
- // = DESCRIPTION
- // Provides support for defining and modifying properties,
- // getting properties and their names and deleting properties.
-
- // = Support for defining and modifying properties.
-
- void define_property (in PropertyName property_name,
- in any property_value)
- raises (InvalidPropertyName,
- ConflictingProperty,
- UnsupportedTypeCode,
- UnsupportedProperty,
- ReadOnlyProperty);
- // Will modify or add a property to the PropertySet. If the
- // property already exists, then the property type is checked
- // before the value is overwritten. If the property does not
- // exist, then the property is added to the PropertySet.
-
- void define_properties (in Properties nproperties)
- raises (MultipleExceptions);
- // Will modify or add each of the properties in Properties
- // parameter to the PropertySet. For each property in the list,
- // if the property already exists, then the property type is
- // checked before overwriting the value. If the property does
- // not exist, then the property is added to the PropertySet.
-
- // = Support for Getting Properties and their Names.
-
- unsigned long get_number_of_properties ();
- // Returns the current number of properties associated with this
- // PropertySet.
-
- void get_all_property_names (in unsigned long how_many,
- out PropertyNames property_names,
- out PropertyNamesIterator rest);
- // Returns all of the property names currently defined in the
- // PropertySet. If the PropertySet contains more than how_many
- // property names, then the remaining property names are put
- // into the PropertyNamesIterator.
-
- any get_property_value (in PropertyName property_name)
- raises (PropertyNotFound,
- InvalidPropertyName);
- // Returns the value of a property in the PropertySet.
-
- boolean get_properties (in PropertyNames property_names,
- out Properties nproperties);
- // Returns the values of the properties listed in
- // property_names.
-
- void get_all_properties (in unsigned long how_many,
- out Properties nproperties,
- out PropertiesIterator rest);
- // Returns all of the property names currently defined in the
- // PropertySet. If the PropertySet contains more than how_many
- // property names, then the remaining property names are put
- // into the PropertyNamesIterator.
-
- // = Support for Deleting Properties.
-
- void delete_property (in PropertyName property_name)
- raises (PropertyNotFound,
- InvalidPropertyName,
- FixedProperty);
- // Deletes the specified property if it exists from a
- // PropertySet.
-
-
- void delete_properties (in PropertyNames property_names)
- raises (MultipleExceptions);
- // Deletes the properties defined in the property_names
- // parameter. This is a batch operation that returns the
- // MultipleExceptions exception if any delete failed.
-
- boolean delete_all_properties ();
- // Variation of delete_properties. Applies to all properties.
-
- // = Support for Existence Check.
-
- boolean is_property_defined (in PropertyName property_name)
- raises (InvalidPropertyName);
- // The is_property_defined operation returns true if the
- // property is defined in the PropertySet, and returns false
- // otherwise.
- };
-
- interface PropertySetDef:PropertySet
- {
- // = TITLE
- // Interface to deal with the Property Modes.
- //
- // = DESCRIPTION
- // The PropertySetDef interface is a specialization
- // (subclass) of the PropertySet interface. The
- // PropertySetDef interface provides operations to retrieve
- // PropertySet constraints, define and modify properties
- // with modes, and to get or set property modes.
-
- void get_allowed_property_types (out PropertyTypes property_types);
- // Indicates which types of properties are supported by this
- // PropertySet. If the output sequence is empty, then there is
- // no restrictions on the any TypeCode portion of the
- // property_value field of a Property in this PropertySet,
- // unless the get_allowed_properties output sequence is not empty.
-
- void get_allowed_properties (out PropertyDefs property_defs);
- // Indicates which properties are supported by this
- // PropertySet. If the output sequence is empty, then there is
- // no restrictions on the properties that can be in this
- // PropertySet, unless the get_allowed_property_types output
- // sequence is not empty.
-
- void define_property_with_mode (in PropertyName property_name,
- in any property_value,
- in PropertyModeType property_mode)
- raises (InvalidPropertyName,
- ConflictingProperty,
- UnsupportedTypeCode,
- UnsupportedProperty,
- UnsupportedMode,
- ReadOnlyProperty);
- // This operation will modify or add a property to the
- // PropertySet. If the property already exists, then the
- // property type is checked before the value is overwritten. The
- // property mode is also checked to be sure a new value may be
- // written. If the property does not exist, then the property is
- // added to the PropertySet. To change the any TypeCode portion
- // of the property_value of a property, a client must first
- // delete_property, then invoke the define_property_with_mode.
-
- void define_properties_with_modes (in PropertyDefs property_defs)
- raises (MultipleExceptions);
- // This operation will modify or add each of the properties in
- // the Properties parameter to the PropertySet. For each
- // property in the list, if the property already exists, then
- // the property type is checked before overwriting the
- // value. The property mode is also checked to be sure a new
- // value may be written. If the property does not exist, then
- // the property is added to the PropertySet. This is a batch
- // operation that returns the MultipleExceptions exception if
- // any define operation failed.
-
- // = Support for Getting and Setting Property Modes.
-
- PropertyModeType get_property_mode (in PropertyName property_name)
- raises (PropertyNotFound,
- InvalidPropertyName);
- // Support for Getting and Setting Property Modes.
-
- boolean get_property_modes (in PropertyNames property_names,
- out PropertyModes property_modes);
- // Support for Getting and Setting Property Modes.
-
- void set_property_mode (in PropertyName property_name,
- in PropertyModeType property_mode)
- raises (InvalidPropertyName,
- PropertyNotFound,
- UnsupportedMode);
- // Sets the mode of a property in the PropertySet.
-
- void set_property_modes (in PropertyModes property_modes)
- raises (MultipleExceptions);
- // Sets the mode for each property in the property_modes
- // parameter. This is a batch operation that returns the
- // MultipleExceptions exception if any set failed.
-
- };
-
- interface PropertyNamesIterator
- {
- // = TITLE
- // Interface for iterating thru the Property Names.
- //
- // = DESCRIPTION
- // The PropertyNamesIterator interface allows a client to
- // iterate through the names using the next_one or next_n operations.
-
- void reset ();
- // The reset operation resets the position in an iterator to the
- // first property, if one exists.
-
- boolean next_one (out PropertyName property_name);
- // The next_one operation returns true if an item exists at the
- // current position in the iterator with an output parameter of
- // a property name. A return of false signifies no more items in
- // the iterator.
-
- boolean next_n (in unsigned long how_many,
- out PropertyNames property_names);
- // The next_n operation returns true if an item exists at the
- // current position in the iterator and the how_many parameter
- // was set greater than zero. The output is a PropertyNames
- // sequence with at most the how_many number of names. A return
- // of false signifies no more items in the iterator.
-
- void destroy ();
- // The destroy operation destroys the iterator.
- };
-
- interface PropertiesIterator
- {
- // = TITLE
- // Interface for iterating thru the Properties.
- //
- // = DESCRIPTION
- // allows a client to through the name-value pairs using the
- // next_one or next_n operations.
-
- void reset ();
- // The reset operation resets the position in an iterator to the
- // first property, if one exists.
-
- boolean next_one (out Property aproperty);
- // The next_one operation returns true if an item exists at the
- // current position in the iterator with an output parameter of
- // a property. A return of false signifies no more items in the
- // iterator.
-
- boolean next_n (in unsigned long how_many,
- out Properties nproperties);
- // The next_n operation returns true if an item exists at the
- // current position in the iterator and the how_many parameter
- // was set greater than zero. The output is a properties
- // sequence with at most the how_many number of properties. A
- // return of false signifies no more items in the iterator.
-
- void destroy ();
- // The destroy operation destroys the iterator.
- };
-};
diff --git a/TAO/orbsvcs/orbsvcs/CosTimeBase.idl b/TAO/orbsvcs/orbsvcs/CosTimeBase.idl
deleted file mode 100644
index 280031306f0..00000000000
--- a/TAO/orbsvcs/orbsvcs/CosTimeBase.idl
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// $Id$
-//
-
-#ifndef COS_TIME_BASE_IDL
-#define COS_TIME_BASE_IDL
-
-module TimeBase {
- // = TITLE
- // COS Time Service basic types.
- //
- // = DESCRIPTION
- // The standard CORBA Time Service defines a number of data
- // structures to manipulate and express time.
- // TAO does not implement this standard service (yet), but we use
- // the standard types.
- //
-
-#if 1
- // interim definition of type ulonglong pending the
- // adoption of the type extension RFP.
- // @@ We also need support for 64-bit integers in TAO IDL compiler.
- struct ulonglong {
- unsigned long low;
- unsigned long high;
- };
- typedef ulonglong TimeT;
-#else
- typedef unsigned long long TimeT;
-#endif
- // As yet the IDL compiler does not support 64-bit quantities, we
- // resort to the original definition of TimeT before long long
- // numbers were added to IDL.
- //
- // Time in TimeT is expressed in units of 100 nano seconds (in
- // other words 10^-7 seconds), and are relative to October 15, 1582;
- // please read the spec for further details.
-
- typedef TimeT InaccuracyT;
- // To express an error estimate for time.
-
- typedef short TdfT;
- // Minutes of displacement from the Greenwich time.
-
- struct UtcT {
- // = TITLE
- // The UTC time structure.
- TimeT time;
- unsigned long inacclo;
- unsigned short inacchi;
- TdfT tdf;
- };
-
- struct IntervalT {
- // = TITLE
- // A time interval
- TimeT lower_bound;
- TimeT upper_bound;
- };
-};
-
-#endif /* COS_TIME_BASE_IDL */
diff --git a/TAO/orbsvcs/orbsvcs/CosTrading.idl b/TAO/orbsvcs/orbsvcs/CosTrading.idl
deleted file mode 100644
index bfdd695fe31..00000000000
--- a/TAO/orbsvcs/orbsvcs/CosTrading.idl
+++ /dev/null
@@ -1,711 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = FILENAME
-// CosTrading.idl
-//
-// = DESCRIPTION
-// Trader Service v1.0 described in CORBAservices: Common Object
-// Services Specification, chapter 16 OMG IDL for Trading Function
-// Module, p 16-74
-//
-// ========================================================================
-
-
-module CosTrading {
-
- // forward references to our interfaces
-
- interface Lookup;
- interface Register;
- interface Link;
- interface Proxy;
- interface Admin;
- interface OfferIterator;
- interface OfferIdIterator;
-
- // type definitions used in more than one interface
-
- typedef string Istring;
- typedef Object TypeRepository;
-
- typedef Istring PropertyName;
- typedef sequence<PropertyName> PropertyNameSeq;
- typedef any PropertyValue;
- struct Property {
- PropertyName name;
- PropertyValue value;
- };
- typedef sequence<Property> PropertySeq;
-
- struct Offer {
- Object reference;
- PropertySeq properties;
- };
- typedef sequence<Offer> OfferSeq;
-
- typedef string OfferId;
- typedef sequence<OfferId> OfferIdSeq;
-
- typedef Istring ServiceTypeName; // similar structure to IR::Identifier
-
- typedef Istring Constraint;
-
- enum FollowOption {
- local_only,
- if_no_local,
- always
- };
-
- typedef Istring LinkName;
- typedef sequence<LinkName> LinkNameSeq;
- typedef LinkNameSeq TraderName;
-
- typedef string PolicyName; // policy names restricted to Latin1
- typedef sequence<PolicyName> PolicyNameSeq;
- typedef any PolicyValue;
- struct Policy {
- PolicyName name;
- PolicyValue value;
- };
- typedef sequence<Policy> PolicySeq;
-
- // exceptions used in more than one interface
-
- exception UnknownMaxLeft {};
-
- exception NotImplemented {};
-
- exception IllegalServiceType {
- ServiceTypeName type;
- };
-
- exception UnknownServiceType {
- ServiceTypeName type;
- };
-
- exception IllegalPropertyName {
- PropertyName name;
- };
-
- exception DuplicatePropertyName {
- PropertyName name;
- };
- exception PropertyTypeMismatch {
- ServiceTypeName type;
- Property prop;
- };
-
- exception MissingMandatoryProperty {
- ServiceTypeName type;
- PropertyName name;
- };
-
- exception ReadonlyDynamicProperty {
- ServiceTypeName type;
- PropertyName name;
- };
-
- exception IllegalConstraint {
- Constraint constr;
- };
-
- exception InvalidLookupRef {
- Lookup target;
- };
-
- exception IllegalOfferId {
- OfferId id;
- };
-
- exception UnknownOfferId {
- OfferId id;
- };
-
- exception DuplicatePolicyName {
- PolicyName name;
- };
-
- // the interfaces
-
- interface TraderComponents {
-
- readonly attribute Lookup lookup_if;
- readonly attribute Register register_if;
- readonly attribute Link link_if;
- readonly attribute Proxy proxy_if;
- readonly attribute Admin admin_if;
- };
-
- interface SupportAttributes {
-
- readonly attribute boolean supports_modifiable_properties;
- readonly attribute boolean supports_dynamic_properties;
- readonly attribute boolean supports_proxy_offers;
- readonly attribute TypeRepository type_repos;
- };
-
- interface ImportAttributes {
-
- readonly attribute unsigned long def_search_card;
- readonly attribute unsigned long max_search_card;
- readonly attribute unsigned long def_match_card;
- readonly attribute unsigned long max_match_card;
- readonly attribute unsigned long def_return_card;
- readonly attribute unsigned long max_return_card;
- readonly attribute unsigned long max_list;
- readonly attribute unsigned long def_hop_count;
- readonly attribute unsigned long max_hop_count;
- readonly attribute FollowOption def_follow_policy;
- readonly attribute FollowOption max_follow_policy;
- };
-
- interface LinkAttributes {
-
- readonly attribute FollowOption max_link_follow_policy;
- };
-
- interface Lookup:TraderComponents,SupportAttributes,ImportAttributes {
-
- typedef Istring Preference;
-
- enum HowManyProps { none, some, all };
-
- union SpecifiedProps switch ( HowManyProps ) {
- case some: PropertyNameSeq prop_names;
- };
-
- exception IllegalPreference {
- Preference pref;
- };
-
- exception IllegalPolicyName {
- PolicyName name;
- };
-
- exception PolicyTypeMismatch {
- Policy the_policy;
- };
-
- exception InvalidPolicyValue {
- Policy the_policy;
- };
-
- void query (
- in ServiceTypeName type,
- in Constraint constr,
- in Preference pref,
- in PolicySeq policies,
- in SpecifiedProps desired_props,
- in unsigned long how_many,
- out OfferSeq offers,
- out OfferIterator offer_itr,
- out PolicyNameSeq limits_applied
- ) raises (
- IllegalServiceType,
- UnknownServiceType,
- IllegalConstraint,
- IllegalPreference,
- IllegalPolicyName,
- PolicyTypeMismatch,
- InvalidPolicyValue,
- IllegalPropertyName,
- DuplicatePropertyName,
- DuplicatePolicyName
- );
- };
-
- interface Register : TraderComponents, SupportAttributes {
-
- struct OfferInfo {
- Object reference;
- ServiceTypeName type;
- PropertySeq properties;
- };
-
- exception InvalidObjectRef {
- Object ref;
- };
-
- exception UnknownPropertyName {
- PropertyName name;
- };
-
- exception InterfaceTypeMismatch {
- ServiceTypeName type;
- Object reference;
- };
-
- exception ProxyOfferId {
- OfferId id;
- };
-
- exception MandatoryProperty {
- ServiceTypeName type;
- PropertyName name;
- };
-
- exception ReadonlyProperty {
- ServiceTypeName type;
- PropertyName name;
- };
-
- exception NoMatchingOffers {
- Constraint constr;
- };
-
- exception IllegalTraderName {
- TraderName name;
- };
-
- exception UnknownTraderName {
- TraderName name;
- };
-
- exception RegisterNotSupported {
- TraderName name;
- };
-
- OfferId export (
- in Object reference,
- in ServiceTypeName type,
- in PropertySeq properties
- ) raises (
- InvalidObjectRef,
- IllegalServiceType,
- UnknownServiceType,
- InterfaceTypeMismatch,
- IllegalPropertyName, // e.g. prop_name = "<foo-bar"
- PropertyTypeMismatch,
- ReadonlyDynamicProperty,
- MissingMandatoryProperty,
- DuplicatePropertyName
- );
-
- void withdraw (
- in OfferId id
- ) raises (
- IllegalOfferId,
- UnknownOfferId,
- ProxyOfferId
- );
-
- OfferInfo describe (
- in OfferId id
- ) raises (
- IllegalOfferId,
- UnknownOfferId,
- ProxyOfferId
- );
-
- void modify (
- in OfferId id,
- in PropertyNameSeq del_list,
- in PropertySeq modify_list
- ) raises (
- NotImplemented,
- IllegalOfferId,
- UnknownOfferId,
- ProxyOfferId,
- IllegalPropertyName,
- UnknownPropertyName,
- PropertyTypeMismatch,
- ReadonlyDynamicProperty,
- MandatoryProperty,
- ReadonlyProperty,
- DuplicatePropertyName
- );
-
- void withdraw_using_constraint (
- in ServiceTypeName type,
- in Constraint constr
- ) raises (
- IllegalServiceType,
- UnknownServiceType,
- IllegalConstraint,
- NoMatchingOffers
- );
-
- Register resolve (
- in TraderName name
- ) raises (
- IllegalTraderName,
- UnknownTraderName,
- RegisterNotSupported
- );
- };
-
- interface Link : TraderComponents, SupportAttributes, LinkAttributes {
-
- struct LinkInfo {
- Lookup target;
- Register target_reg;
- FollowOption def_pass_on_follow_rule;
- FollowOption limiting_follow_rule;
- };
-
- exception IllegalLinkName {
- LinkName name;
- };
-
- exception UnknownLinkName {
- LinkName name;
- };
-
- exception DuplicateLinkName {
- LinkName name;
- };
- exception DefaultFollowTooPermissive {
- FollowOption def_pass_on_follow_rule;
- FollowOption limiting_follow_rule;
- };
-
- exception LimitingFollowTooPermissive {
- FollowOption limiting_follow_rule;
- FollowOption max_link_follow_policy;
- };
-
- void add_link (
- in LinkName name,
- in Lookup target,
- in FollowOption def_pass_on_follow_rule,
- in FollowOption limiting_follow_rule
- ) raises (
- IllegalLinkName,
- DuplicateLinkName,
- InvalidLookupRef, // e.g. nil
- DefaultFollowTooPermissive,
- LimitingFollowTooPermissive
- );
-
- void remove_link (
- in LinkName name
- ) raises (
- IllegalLinkName,
- UnknownLinkName
- );
-
- LinkInfo describe_link (
- in LinkName name
- ) raises (
- IllegalLinkName,
- UnknownLinkName
- );
-
- LinkNameSeq list_links ( );
-
- void modify_link (
- in LinkName name,
- in FollowOption def_pass_on_follow_rule,
- in FollowOption limiting_follow_rule
- ) raises (
- IllegalLinkName,
- UnknownLinkName,
- DefaultFollowTooPermissive,
- LimitingFollowTooPermissive
- );
- };
-
- interface Proxy : TraderComponents, SupportAttributes {
-
- typedef Istring ConstraintRecipe;
-
- struct ProxyInfo {
- ServiceTypeName type;
- Lookup target;
- PropertySeq properties;
- boolean if_match_all;
- ConstraintRecipe recipe;
- PolicySeq policies_to_pass_on;
- };
-
- exception IllegalRecipe {
- ConstraintRecipe recipe;
- };
-
- exception NotProxyOfferId {
- OfferId id;
- };
-
- OfferId export_proxy (
- in Lookup target,
- in ServiceTypeName type,
- in PropertySeq properties,
- in boolean if_match_all,
- in ConstraintRecipe recipe,
- in PolicySeq policies_to_pass_on
- ) raises (
- IllegalServiceType,
- UnknownServiceType,
- InvalidLookupRef, // e.g. nil
- IllegalPropertyName,
- PropertyTypeMismatch,
- ReadonlyDynamicProperty,
- MissingMandatoryProperty,
- IllegalRecipe,
- DuplicatePropertyName,
- DuplicatePolicyName
- );
-
- void withdraw_proxy (
- in OfferId id
- ) raises (
- IllegalOfferId,
- UnknownOfferId,
- NotProxyOfferId
- );
-
- ProxyInfo describe_proxy (
- in OfferId id
- ) raises (
- IllegalOfferId,
- UnknownOfferId,
- NotProxyOfferId
- );
- };
-
- interface Admin : TraderComponents, SupportAttributes, ImportAttributes,
- LinkAttributes {
-
- typedef sequence<octet> OctetSeq;
-
- readonly attribute OctetSeq request_id_stem;
-
- unsigned long set_def_search_card (in unsigned long value);
- unsigned long set_max_search_card (in unsigned long value);
-
- unsigned long set_def_match_card (in unsigned long value);
- unsigned long set_max_match_card (in unsigned long value);
-
- unsigned long set_def_return_card (in unsigned long value);
- unsigned long set_max_return_card (in unsigned long value);
-
- unsigned long set_max_list (in unsigned long value);
-
- boolean set_supports_modifiable_properties (in boolean value);
- boolean set_supports_dynamic_properties (in boolean value);
- boolean set_supports_proxy_offers (in boolean value);
-
- unsigned long set_def_hop_count (in unsigned long value);
- unsigned long set_max_hop_count (in unsigned long value);
-
- FollowOption set_def_follow_policy (in FollowOption policy);
- FollowOption set_max_follow_policy (in FollowOption policy);
-
- FollowOption set_max_link_follow_policy (in FollowOption policy);
-
- TypeRepository set_type_repos (in TypeRepository repository);
-
- OctetSeq set_request_id_stem (in OctetSeq stem);
-
- void list_offers (
- in unsigned long how_many,
- out OfferIdSeq ids,
- out OfferIdIterator id_itr
- ) raises (
- NotImplemented
- );
-
- void list_proxies (
- in unsigned long how_many,
- out OfferIdSeq ids,
- out OfferIdIterator id_itr
- ) raises (
- NotImplemented
- );
- };
-
- interface OfferIterator {
-
- unsigned long max_left (
- ) raises (
- UnknownMaxLeft
- );
-
- boolean next_n (
- in unsigned long n,
- out OfferSeq offers
- );
-
- void destroy ();
- };
-
- interface OfferIdIterator {
- unsigned long max_left (
- ) raises (
- UnknownMaxLeft
- );
-
- boolean next_n (
- in unsigned long n,
- out OfferIdSeq ids
- );
-
- void destroy ();
- };
-
-}; /* end module CosTrading */
-
-
-// OMG IDL for Dynamic Property Module, p 16-88
-
-module CosTradingDynamic {
-
- exception DPEvalFailure {
- CosTrading::PropertyName name;
- TypeCode returned_type;
- any extra_info;
- };
-
- interface DynamicPropEval {
-
- any evalDP (
- in CosTrading::PropertyName name,
- in TypeCode returned_type,
- in any extra_info
- ) raises (
- DPEvalFailure
- );
- };
-
- struct DynamicProp {
- DynamicPropEval eval_if;
- TypeCode returned_type;
- any extra_info;
- };
-}; /* end module CosTradingDynamic */
-
-
-// OMG IDL for Service Type Repository Module, p 16-89
-
-module CosTradingRepos {
-
- interface ServiceTypeRepository {
-
- // local types
- typedef sequence<CosTrading::ServiceTypeName> ServiceTypeNameSeq;
- enum PropertyMode {
- PROP_NORMAL, PROP_READONLY,
- PROP_MANDATORY, PROP_MANDATORY_READONLY
- };
- struct PropStruct {
- CosTrading::PropertyName name;
- TypeCode value_type;
- PropertyMode mode;
- };
- typedef sequence<PropStruct> PropStructSeq;
-
- typedef CosTrading::Istring Identifier; // IR::Identifier
- struct IncarnationNumber {
- unsigned long high;
- unsigned long low;
- };
- struct TypeStruct {
- Identifier if_name;
- PropStructSeq props;
- ServiceTypeNameSeq super_types;
- boolean masked;
- IncarnationNumber incarnation;
- };
-
- enum ListOption { all, since };
- union SpecifiedServiceTypes switch ( ListOption ) {
- case since: IncarnationNumber incarnation;
- };
-
- // local exceptions
- exception ServiceTypeExists {
- CosTrading::ServiceTypeName name;
- };
- exception InterfaceTypeMismatch {
- CosTrading::ServiceTypeName base_service;
- Identifier base_if;
- CosTrading::ServiceTypeName derived_service;
- Identifier derived_if;
- };
- exception HasSubTypes {
- CosTrading::ServiceTypeName the_type;
- CosTrading::ServiceTypeName sub_type;
- };
- exception AlreadyMasked {
- CosTrading::ServiceTypeName name;
- };
- exception NotMasked {
- CosTrading::ServiceTypeName name;
- };
- exception ValueTypeRedefinition {
- CosTrading::ServiceTypeName type_1;
- PropStruct definition_1;
- CosTrading::ServiceTypeName type_2;
- PropStruct definition_2;
- };
- exception DuplicateServiceTypeName {
- CosTrading::ServiceTypeName name;
- };
-
- // attributes
- readonly attribute IncarnationNumber incarnation;
-
- // operation signatures
- IncarnationNumber add_type (
- in CosTrading::ServiceTypeName name,
- in Identifier if_name,
- in PropStructSeq props,
- in ServiceTypeNameSeq super_types
- ) raises (
- CosTrading::IllegalServiceType,
- ServiceTypeExists,
- InterfaceTypeMismatch,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- ValueTypeRedefinition,
- CosTrading::UnknownServiceType,
- DuplicateServiceTypeName
- );
-
- void remove_type (
- in CosTrading::ServiceTypeName name
- ) raises (
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- HasSubTypes
- );
-
- ServiceTypeNameSeq list_types (
- in SpecifiedServiceTypes which_types
- );
-
- TypeStruct describe_type (
- in CosTrading::ServiceTypeName name
- ) raises (
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType
- );
-
- TypeStruct fully_describe_type (
- in CosTrading::ServiceTypeName name
- ) raises (
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType
- );
-
- void mask_type (
- in CosTrading::ServiceTypeName name
- ) raises (
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- AlreadyMasked
- );
-
- void unmask_type (
- in CosTrading::ServiceTypeName name
- ) raises (
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- NotMasked
- );
-
- };
-}; /* end module CosTradingRepos */
diff --git a/TAO/orbsvcs/orbsvcs/Event/BCU.cpp b/TAO/orbsvcs/orbsvcs/Event/BCU.cpp
deleted file mode 100644
index 374fe783ef9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/BCU.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// $Id$
-
-#include "ace/ACE.h"
-#include "BCU.h"
-
-
-u_long
-ACE_BCU (u_long n)
-{
- const u_long ACE_BCU_PRIME_NUMBER = 9619;
-
- u_long retval = 0;
-
- while (n-- > 0)
- retval = ACE::is_prime (ACE_BCU_PRIME_NUMBER, 2, ACE_BCU_PRIME_NUMBER / 2);
-
- return retval;
-}
-
-
-u_long
-ACE_BCU (u_long number,
- u_long n)
-{
- u_long retval = 0;
-
- while (n-- > 0)
- retval = ACE::is_prime (number, 2, number);
-
- return retval;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/BCU.h b/TAO/orbsvcs/orbsvcs/Event/BCU.h
deleted file mode 100644
index 07d64c46271..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/BCU.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ace ORB
-//
-// = FILENAME
-// Benchmark Computation Units
-//
-// = AUTHOR
-// David Levine and Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-//
-// Times how long it takes to generate each of the first N prime
-// numbers.
-// ============================================================================
-
-#if !defined (ACE_BCU_H)
-#define ACE_BCU_H
-
-#include "ace/OS.h"
-#include "orbsvcs/orbsvcs_export.h"
-
-
-TAO_ORBSVCS_Export u_long ACE_BCU (u_long n);
-// Check if a specific, hardcoded number is prime (via ACE::is_prime) <n>
-// times.
-
-
-TAO_ORBSVCS_Export u_long ACE_BCU (u_long number, u_long n);
-// Check if <number> is prime (via ACE::is_prime ()) <n> times.
-
-#endif /* ACE_BCU_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.cpp b/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.cpp
deleted file mode 100644
index cdffb8aa443..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.cpp
+++ /dev/null
@@ -1,349 +0,0 @@
-// $Id$
-
-#if !defined (ACE_CORBA_UTILS_C)
-#define ACE_CORBA_UTILS_C
-
-#include "ace/Log_Msg.h"
-#include "CORBA_Utils_T.h"
-
-#if !defined (__ACE_INLINE__)
-#include "CORBA_Utils_T.i"
-#endif /* __ACE_INLINE__ */
-
-template <class TYPE>
-ACE_CORBA_Sequence<TYPE>::ACE_CORBA_Sequence (const ACE_CORBA_Sequence<TYPE> &source)
- : maximum_ (0),
- length_ (0),
- buffer_ (0),
- release_ (0)
-{
- (*this) = source;
-}
-
-template <class TYPE>
-ACE_CORBA_Sequence<TYPE>::ACE_CORBA_Sequence (void)
- : maximum_ (0),
- length_ (0),
- buffer_ (0),
- release_ (0)
-{
-}
-
-template <class TYPE>
-ACE_CORBA_Sequence<TYPE>::~ACE_CORBA_Sequence (void)
-{
- if (release_)
- {
- this->delete_array (buffer_, maximum_);
- }
-}
-
-template <class TYPE>
-ACE_CORBA_Sequence<TYPE>::ACE_CORBA_Sequence (CORBA::ULong max)
- : maximum_ (max),
- length_ (0),
- buffer_ (0),
-
- release_ (0)
-{
- if (maximum_ > 0)
- {
- buffer_ = this->new_array (maximum_);
- release_ = 1;
- }
-}
-
-template <class TYPE> TYPE *
-ACE_CORBA_Sequence<TYPE>::new_array (size_t len)
-{
- return new TYPE[len];
-}
-
-template <class TYPE> void
-ACE_CORBA_Sequence<TYPE>::delete_array (TYPE *buf, size_t)
-{
- delete [] buf;
-}
-
-template <class TYPE>
-ACE_CORBA_Sequence<TYPE>::ACE_CORBA_Sequence (CORBA::ULong max,
- CORBA::ULong length,
- TYPE* data,
- CORBA::Boolean release)
- : maximum_ (max),
- length_ (length),
- buffer_ (data),
- release_ (release)
-{
- if ((buffer_ == 0) && (max > 0))
- {
- // @@ What should we do here?
- errno = ENOMEM;
- ACE_ERROR ((LM_ERROR, "No memory.\n"));
- }
-}
-
-// @@ This makes a deep copy, dig?
-template <class TYPE> ACE_CORBA_Sequence<TYPE> &
-ACE_CORBA_Sequence<TYPE>::operator= (const ACE_CORBA_Sequence<TYPE> &source)
-{
- if (source.length () > 0)
- {
- // If our buffer is too small, release it and allocate one just big
- // enough. If buffer_ == 0, this works fine.
- if (this->maximum () < source.length ())
- {
- if (release_)
- {
- this->delete_array (buffer_, maximum_);
- }
- maximum_ = source.length ();
- buffer_ = this->new_array (maximum_);
- release_ = 1;
- }
-
- // Copy each of the items from the source.
- for (CORBA::ULong index=0; index < source.length (); index++)
- (*this)[index] = source[index];
-
- this->length (source.length ());
- }
-
- return *this;
-}
-
-template <class TYPE> void
-ACE_CORBA_Sequence<TYPE>::length (CORBA::ULong len)
-{
- if (len > maximum_)
- {
- // Allocate the space that we need.
- TYPE* tmp = this->new_array (len);
- // Copy over the old sequence.
- for (CORBA::ULong i = 0; i < maximum_; ++i)
- {
- tmp[i] = buffer_[i];
- }
- if (release_)
- {
- this->delete_array (buffer_, maximum_);
- }
- buffer_ = tmp;
- release_ = 1;
- maximum_ = len;
- // The destructor of -old- will release the old buffer_ if
- // necessary.
- }
-
- length_ = len;
-}
-
-
-// g++ can't handle these operator [] functions if they're inline
-template <class TYPE> TYPE&
-ACE_CORBA_Sequence<TYPE>::operator [] (CORBA::ULong i)
-{
- // @@ Should we do bounds checking?
- if (i >= maximum_)
- {
- ACE_ERROR ((LM_ERROR, "Trying to write past maximum.\n"));
- return buffer_[maximum_ - 1];
- }
- else
- return buffer_[i];
-}
-
-template <class TYPE> const TYPE&
-ACE_CORBA_Sequence<TYPE>::operator [] (CORBA::ULong i) const
-{
- if (i >= length_)
- {
- ACE_ERROR ((LM_ERROR, "Trying to read past length.\n"));
- return buffer_[length_ - 1];
- }
-
- return buffer_[i];
-}
-
-// ********************
-
-/*
-template <class TYPE> void
-dump (const ACE_CORBA_Sequence<TYPE> &seq)
-{
- for (CORBA::ULong index=0; index < seq.length (); index++)
- dump (seq[index]);
-}
-*/
-
-/*
-template <class TYPE> ACE_INLINE void
-operator += (ACE_CORBA_Sequence<TYPE> &seq,
- const TYPE &item)
-{
- CORBA::ULong length = seq.length ();
- seq.length (length + 1);
- seq[length] = item;
-}
-*/
-
-template <class TYPE> ACE_INLINE void
-operator += (ACE_CORBA_Sequence<TYPE> &dest,
- const ACE_CORBA_Sequence<TYPE> &source)
-{
- int old_length = dest.length ();
- int new_length = old_length + source.length ();
- dest.length (new_length);
-
- int difference = new_length - old_length;
-
- for (int x=0; x < difference; x++)
- dest[old_length + x] = source[x];
-}
-
-/*
-template <class TYPE> ACE_INLINE void
-remove_item (TYPE &seq, CORBA::ULong index)
-{
- int new_length = seq.length () - 1;
-
- // Shift the set back one, starting at <index>.
- for (int x = index; x < new_length; x++)
- seq[x] = seq[x+1];
-
- // Set the new length.
- seq.length (new_length);
-}
-*/
-
-// ************************************************************
-// ************************************************************
-// ************************************************************
-
-template<class TYPE>
-ACE_CORBA_var<TYPE>::ACE_CORBA_var (const ACE_CORBA_var<TYPE> &source)
-{
- if (source.me_ != 0)
- me_ = (TYPE *) source.me_->_duplicate ();
- // CORBA::duplicate (source.me_);
-}
-
-template<class TYPE>
-ACE_CORBA_var<TYPE>::ACE_CORBA_var (void)
- : me_ (0)
-{
-}
-
-template<class TYPE>
-ACE_CORBA_var<TYPE>::ACE_CORBA_var (TYPE *source)
-{
- me_ = (TYPE *) source->_duplicate ();
- // CORBA::duplicate (source);
-}
-
-template<class TYPE>
-ACE_CORBA_var<TYPE>::~ACE_CORBA_var (void)
-{
- if (me_ != 0)
- me_->_release ();
- //CORBA::release (me_);
-}
-
-template<class TYPE> ACE_CORBA_var<TYPE> &
-ACE_CORBA_var<TYPE>::operator= (TYPE *source)
-{
- if (me_ != source &&
- me_ != 0)
- me_->_release ();
- //CORBA::release (me_);
-
- me_ = (TYPE *) source->_duplicate ();
- // CORBA::duplicate (source);
- return *this;
-}
-
-template<class TYPE> ACE_CORBA_var<TYPE> &
-ACE_CORBA_var<TYPE>::operator= (const ACE_CORBA_var<TYPE> &source)
-{
- if (me_ != source.me_ &&
- me_ != 0)
- me_->_release ();
- // CORBA::release (me_);
-
- me_ = (TYPE *) source.me_->_duplicate ();
- // CORBA::duplicate (source.me_);
- return *this;
-}
-
-template<class TYPE> TYPE *
-ACE_CORBA_var<TYPE>::operator->(void)
-{
- return me_;
-}
-
-template<class TYPE>
-ACE_CORBA_var<TYPE>::operator TYPE *(void) const
-{
- return me_;
-}
-
-/*
-template<class TYPE>
-ACE_CORBA_var<TYPE>::operator TYPE *&(void)
-{
- return me_;
-}
-*/
-
-template<class TYPE>
-ACE_CORBA_var<TYPE>::operator TYPE &(void) const
-{
- return *me_;
-}
-
-// ************************************************************
-// ************************************************************
-
-/*
-ACE_CORBA_Object_Ref<IMPL>::ACE_CORBA_Object_Ref (void)
- : impl_ (0)
-{
-}
-
-ACE_CORBA_Object_Ref<IMPL>::ACE_CORBA_Object_Ref (IMPL *impl)
- : impl_ (impl)
-{
-}
-
-ACE_CORBA_Object_Ref<IMPL>::~ACE_CORBA_Object_Ref (void)
- : impl_ (0)
-{
-}
-
-ACE_CORBA_Object_Ref<IMPL> &
-ACE_CORBA_Object_Ref<IMPL>::operator= (const ACE_CORBA_Object_Ref<IMPL> &source)
-{
- return *this;
-}
-
-IMPL *
-ACE_CORBA_Object_Ref<IMPL>::operator->(void)
-{
- return impl_;
-}
-
-IMPL *
-ACE_CORBA_Object_Ref<IMPL>::operator IMPL *(void)
-{
- return impl_;
-}
-
-ACE_CORBA_Object_Ref<IMPL> *
-ACE_CORBA_Object_Ref<IMPL>::_duplicate (ACE_CORBA_Object_Ref<IMPL> *source)
-{
- source->ref_count_++;
- return source;
-}
-
-*/
-#endif /* ACE_CORBA_UTILS_C */
diff --git a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.h b/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.h
deleted file mode 100644
index 8abf180d9e1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ace_orb
-//
-// = FILENAME
-// CORBA_Utilities.h
-//
-// = AUTHORS
-// Tim Harrison.
-//
-// = NOTE
-// This class is a bit ackward when using a real ORB, but we cannot
-// easily remove it since some of the types are used in the
-// implementation of the EC. TODO
-//
-// ============================================================================
-
-#if !defined (ACE_CORBA_UTILS_H)
-#define ACE_CORBA_UTILS_H
-
-#include "ace/Time_Value.h"
-#include "tao/corba.h"
-
-template <class TYPE>
-class ACE_CORBA_Sequence// : public CORBA::Object
-// = TITLE
-//
-// = DESCRIPTION
-{
-public:
-
- ACE_CORBA_Sequence (const ACE_CORBA_Sequence<TYPE> &source);
- // Copy construction.
-
- ACE_CORBA_Sequence (CORBA::ULong max);
- ACE_CORBA_Sequence (CORBA::ULong max,
- CORBA::ULong length,
- TYPE* data,
- CORBA::Boolean release = 0);
- ACE_CORBA_Sequence (void);
-
- virtual ~ACE_CORBA_Sequence (void);
-
- ACE_CORBA_Sequence<TYPE> &operator= (const ACE_CORBA_Sequence<TYPE> &);
-
- // static TYPE* allocbuf(CORBA::ULong nelems);
- // static void freebuf(TYPE* data);
-
- CORBA::ULong maximum (void) const;
- CORBA::ULong length (void) const;
- void length (CORBA::ULong len);
-
- TYPE& operator [] (CORBA::ULong IT_i);
-
- const TYPE& operator [] (CORBA::ULong IT_i) const;
-
- virtual TYPE *new_array (size_t len);
- // Allocates TYPE[len]. This facilitates template methods through
- // template specialization to allow the use of different memory
- // pools.
-
- virtual void delete_array (TYPE *buf, size_t len);
- // delete [] <buf>.
-
-protected:
- CORBA::ULong maximum_;
- CORBA::ULong length_;
- TYPE* buffer_;
- unsigned char release_;
-};
-
-// Utility for debugging sequences.
-//template <class TYPE>
-//void dump (const ACE_CORBA_Sequence<TYPE> &seq);
-
-// Utility for appending single items. Increases the length of <set>
-// and adds <event> to the end of <set>.
-template <class TYPE> void
-operator += (ACE_CORBA_Sequence<TYPE> &seq,
- const TYPE &item)
-{
- CORBA::ULong length = seq.length ();
- seq.length (length + 1);
- seq[length] = item;
-}
-
-// Utility for appending sequences.
-template <class TYPE> void
-operator += (ACE_CORBA_Sequence<TYPE> &dest,
- const ACE_CORBA_Sequence<TYPE> &source);
-
-template <class TYPE> void
-remove_item (TYPE &seq, CORBA::ULong index)
-{
- int new_length = seq.length () - 1;
-
- // Shift the set back one, starting at <index>.
- for (int x = index; x < new_length; x++)
- seq[x] = seq[x+1];
-
- // Set the new length.
- seq.length (new_length);
-}
-// Removes seq[index] by moving everything after <index> back and
-// decrementing the length.
-
-// ************************************************************
-
-template <class TYPE>
-class ACE_CORBA_var
-// = TITLE
-//
-// = DESCRIPTION
-{
-public:
- ACE_CORBA_var (const ACE_CORBA_var<TYPE> &source);
- ACE_CORBA_var (void);
- ACE_CORBA_var (TYPE *source);
- ~ACE_CORBA_var (void);
- ACE_CORBA_var<TYPE> &operator= (TYPE *source);
- ACE_CORBA_var<TYPE> &operator= (const ACE_CORBA_var<TYPE> &source);
- TYPE *operator->(void);
- operator TYPE *(void) const;
- // operator TYPE *&(void);
- operator TYPE &(void) const;
-private:
- TYPE *me_;
-};
-
-// ************************************************************
-
-/*
-template <class IMPL>
-class ACE_CORBA_Object_Ref : public CORBA::Object
-// = TITLE
-// ACE CORBA Object Reference
-//
-// = DESCRIPTION
-// A wrapper for making CORBA Object References. For a single
-// address space ORB, this points directly to the IMPL
-// class. This is supposed to look like a pointer to
-// IMPL with an additional static _duplicate method.
-{
-public:
- // ACE_CORBA_Object_Ref (ACE_CORBA_Object_Ref<IMPL> &obj);
- ACE_CORBA_Object_Ref (void);
- ACE_CORBA_Object_Ref (IMPL *impl);
- ~ACE_CORBA_Object_Ref (void);
- // ACE_CORBA_Object_Ref<IMPL> &operator= (IMPL *source);
- ACE_CORBA_Object_Ref<IMPL> &operator=
- (const ACE_CORBA_Object_Ref<IMPL> &source);
-
- IMPL *operator->(void);
- // A distributed ORB would require that the CORBA Object Reference
- // implement all IMPL interfaces, marshall the parameters,
- // and transmit over IIOP. For this single address space ORB, we'll
- // just delegate method calls to the IMPL directly.
-
- operator IMPL *(void) const;
- // operator IMPL *&(void);
- // operator IMPL &(void) const;
-
- static ACE_CORBA_Object_Ref<IMPL> *_duplicate
- (ACE_CORBA_Object_Ref<IMPL> *source);
-
-private:
- IMPL *impl_;
-};
-*/
-
-// ************************************************************
-
-template <class ITEM, size_t SIZE>
-class ACE_ES_Simple_Array
-// = TITLE
-// Simple Array
-//
-// = DESCRIPTION
-// Wraps ITEM[SIZE] with insert and an iterator. There is no
-// remove. It allows duplicates. It is truly very simple.
-{
- public:
- ACE_ES_Simple_Array (void);
- int insert (const ITEM &copy_me);
- size_t size (void);
- ITEM *data (void);
- protected:
- ITEM data_[SIZE];
- size_t size_;
-};
-
-template <class ITEM>
-class ACE_ES_Array_Iterator
-// = TITLE
-// Simple Iterator
-//
-// = DESCRIPTION
-// Iterates through an array of ITEMs.
-{
-public:
- ACE_ES_Array_Iterator (ITEM *data, size_t size);
-
- int next (ITEM *&next_item);
- // Returns 0 when all items have been seen, else 1. Sets
- // <next_item> to point at the next ITEM.
-
- int advance (void);
- // Move forward by one element in the Stack. Returns 0 when all the
- // items in the Stack have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
-private:
- ITEM *data_;
- size_t size_;
- size_t index_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "CORBA_Utils_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "CORBA_Utils_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("CORBA_Utils_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_CORBA_UTILS_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i b/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i
deleted file mode 100644
index d9ebb9247ad..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template <class TYPE> ACE_INLINE CORBA::ULong
-ACE_CORBA_Sequence<TYPE>::maximum (void) const
-{
- return maximum_;
-}
-
-template <class TYPE> ACE_INLINE CORBA::ULong
-ACE_CORBA_Sequence<TYPE>::length() const
-{
- return length_;
-}
-
-
-// ************************************************************
-
-template <class ITEM, size_t SIZE> ACE_INLINE
-ACE_ES_Simple_Array<ITEM, SIZE>::ACE_ES_Simple_Array (void) :
- size_ (0)
-{
-}
-
-template <class ITEM, size_t SIZE> ACE_INLINE int
-ACE_ES_Simple_Array<ITEM, SIZE>::insert (const ITEM &copy_me)
-{
- if (size_ >= SIZE)
- return -1;
-
- data_[size_++] = copy_me;
- return 0;
-}
-
-template <class ITEM, size_t SIZE> ACE_INLINE size_t
-ACE_ES_Simple_Array<ITEM, SIZE>::size (void)
-{
- return size_;
-}
-
-template <class ITEM, size_t SIZE> ACE_INLINE ITEM *
-ACE_ES_Simple_Array<ITEM, SIZE>::data (void)
-{
- return data_;
-}
-
-// ************************************************************
-
-template <class ITEM> ACE_INLINE
-ACE_ES_Array_Iterator<ITEM>::ACE_ES_Array_Iterator (ITEM *data, size_t size) :
- data_ (data),
- size_ (size),
- index_ (0)
-{
-}
-
-template <class ITEM> ACE_INLINE int
-ACE_ES_Array_Iterator<ITEM>::next (ITEM *&next_item)
-{
- next_item = &data_[index_];
- return index_ < (size_ - 1);
-}
-
-template <class ITEM> ACE_INLINE int
-ACE_ES_Array_Iterator<ITEM>::advance (void)
-{
- index_++;
- return index_ < size_;
-}
-
-template<class ITEM> ACE_INLINE int
-ACE_ES_Array_Iterator<ITEM>::done (void) const
-{
- return index_ < size_;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/Channel_Clients.i b/TAO/orbsvcs/orbsvcs/Event/Channel_Clients.i
deleted file mode 100644
index 6318deb79a0..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Channel_Clients.i
+++ /dev/null
@@ -1,2 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
diff --git a/TAO/orbsvcs/orbsvcs/Event/Channel_Clients_T.i b/TAO/orbsvcs/orbsvcs/Event/Channel_Clients_T.i
deleted file mode 100644
index f7c0760fd86..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Channel_Clients_T.i
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template <class TARGET> ACE_INLINE
-ACE_PushConsumer_Adapter<TARGET>::ACE_PushConsumer_Adapter (TARGET *target)
- : target_ (target)
-{
-}
-
-template <class TARGET> ACE_INLINE void
-ACE_PushConsumer_Adapter<TARGET>::push (const RtecEventComm::EventSet& events,
- CORBA::Environment &_env)
-{
- target_->_push (events, _env);
-}
-
-template <class TARGET> ACE_INLINE void
-ACE_PushConsumer_Adapter<TARGET>::disconnect_push_consumer (CORBA::Environment &_env)
-{
- target_->_disconnect_push_consumer (_env);
-}
-
-// ************************************************************
-
-template <class TARGET> ACE_INLINE
-ACE_PushSupplier_Adapter<TARGET>::ACE_PushSupplier_Adapter (TARGET *target)
- : target_ (target)
-{
-}
-
-template <class TARGET> ACE_INLINE void
-ACE_PushSupplier_Adapter<TARGET>::disconnect_push_supplier (CORBA::Environment &_env)
-{
- target_->_disconnect_push_supplier (_env);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/Debug_Macros.h b/TAO/orbsvcs/orbsvcs/Event/Debug_Macros.h
deleted file mode 100644
index 8db3d169082..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Debug_Macros.h
+++ /dev/null
@@ -1,11 +0,0 @@
-
-#if defined (ACE_ES_NOLOGGING)
-#define ACE_ES_DEBUG(X)
-#define ACE_ES_DEBUG_ST(X)
-#else
-#define ACE_ES_DEBUG(X) \
- do { \
- ACE_Log_Msg::instance ()->log X; \
- } while (0)
-#define ACE_ES_DEBUG_ST(X) X
-#endif /* ACE_ES_NOLOGGING */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.cpp b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.cpp
deleted file mode 100644
index 3e2e717f143..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.cpp
+++ /dev/null
@@ -1,616 +0,0 @@
-// $Id$
-
-#include "ace/Sched_Params.h"
-#include "orbsvcs/Scheduler_Factory.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "Memory_Pools.h"
-
-#include "Dispatching_Modules.h"
-
-#if !defined (__ACE_INLINE__)
-#include "Dispatching_Modules.i"
-#endif /* __ACE_INLINE__ */
-
-// ************************************************************
-
-void
-ACE_ES_Dispatch_Request::make_copy (RtecEventComm::EventSet &dest) const
-{
- if (use_single_event_)
- {
- dest.length (1);
- dest[0] = single_event_;
- }
- else
- {
- dest.length (event_set_.length ());
-
- for (CORBA::ULong index=0; index < event_set_.length (); index++)
- {
- RtecEventComm::Event &dest_event = dest[index];
- ACE_ES_Event_Container_var &source_event_var = ((ACE_ES_Event_Container_var &) event_set_[index]);
- dest_event = *(source_event_var.operator->());
- }
- }
-}
-
-int
-ACE_ES_Dispatch_Request::execute (u_long &command_action)
-{
- ACE_TIMEPROBE (" dispatch (dequeue) the event");
-
- return dispatching_module_->dispatch_event (this, command_action);
-}
-
-#if 0
-void *
-ACE_ES_Dispatch_Request::operator new (size_t nbytes)
-{
- if (nbytes > sizeof (ACE_ES_Dispatch_Request))
- {
- ACE_ERROR ((LM_ERROR, "nbytes = %d, sizeof (ACE_ES_Dispatch_Request_Chunk) = %d.\n",
- sizeof (ACE_ES_Dispatch_Request)));
- ACE_ASSERT (nbytes <= sizeof (ACE_ES_Dispatch_Request));
- }
-
- return ACE_ES_Memory_Pools::new_Dispatch_Request ();
-}
-
-void
-ACE_ES_Dispatch_Request::operator delete (void *mem)
-{
- ACE_ES_Memory_Pools::delete_Dispatch_Request (mem);
-}
-#endif /* 0 */
-
-// ************************************************************
-
-ACE_ES_Priority_Dispatching::ACE_ES_Priority_Dispatching (ACE_EventChannel *channel,
- int threads_per_queue)
- : ACE_ES_Dispatching_Base (channel),
- notification_strategy_ (this),
- highest_priority_ (0),
- shutdown_ (0),
- threads_per_queue_ (threads_per_queue)
-{
- // If we're single threaded, then we need to use the notification strategy.
- if ((threads_per_queue_ == 0) &&
- (notification_strategy_.open () == -1))
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ES_Priority_Dispatching"));
-
- // Initialize the queues.
- for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
- {
- queues_[x] = 0;
- delete_me_queues_[x] = 0;
- }
-
- this->initialize_queues ();
-}
-
-ACE_ES_Priority_Dispatching::~ACE_ES_Priority_Dispatching (void)
-{
- // Delete the queues.
- for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
- delete delete_me_queues_[x];
-}
-
-
-void
-ACE_ES_Priority_Dispatching::initialize_queues (void)
-{
- for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
- {
- // Convert ACE_Scheduler_Rate (it's really a period, not a rate!)
- // to a form we can easily work with.
- ACE_Time_Value period_tv;
- ORBSVCS_Time::TimeT_to_Time_Value (period_tv, ACE_Scheduler_Rates[x]);
-
- RtecScheduler::Period period = period_tv.sec () * 10000000 +
- period_tv.usec () * 10;
-
- queues_[x] = new ACE_ES_Dispatch_Queue (this, &notification_strategy_);
- if (queues_[x] == 0 ||
- queues_[x]->open_queue (period,
- threads_per_queue_) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ES_Priority_Dispatching::initialize_queues"));
- return;
- }
-
- queue_count_[x] = 1;
- }
-
- highest_priority_ = ACE_Scheduler_MAX_PRIORITIES - 1;
-}
-
-void
-ACE_ES_Priority_Dispatching::connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &_env)
-{
- down_->connected (consumer, _env);
-
- // This code does dynamic allocation of channel dispatch threads.
- // It requires that consumer's priorities are known at connection
- // time and that threads can request priorities from the scheduler
- // at run-time. These are both antithetical to static scheduling.
- // The constructor now allocates a thread per rate group.
-#if 0
- // We have to tell the lower portions of the channel about the
- // consumer first. This is so that any changes to the consumer's
- // qos will take effect when we get the dispatch priority.
- down_->connected (consumer, _env);
-
- RtecScheduler::OS_Priority priority =
- ACE_Scheduler::instance ().preemption_priority (consumer->qos ().rt_info_);
-
- {
- ACE_ES_GUARD ace_mon (lock_);
-
- // If a queue has not been created for the consumer's priority,
- // create one.
- if (queues_[priority] == 0)
- {
- // Allocate a new dispatch queue.
- queues_[priority] = new ACE_ES_Dispatch_Queue (this, &notification_strategy_);
- if (queues_[priority] == 0)
- TAO_THROW (CORBA::NO_MEMORY (0, CORBA::COMPLETED_NO,
- "ACE_ES_Priority_Dispatching::connected"));
-
- // Initialize the dispatch queue corresponding to the
- // consumer's priority. With a full implementation of the
- // run-time scheduler, the dispatch queue can find it's
- // scheduling qos online. However, we pass the rate in case
- // one is not found. The rate can be used to obtain the
- // proper priority. If threads_per_queue_ == 0, then these
- // queues will be passive. Otherwise, they will be active.
- // This switches us between MT_ORB and ST_ORB. If we're
- // single-threaded, this registers us with the ReactorEx using
- // our notification_strategy_. If we're multi-threaded, this
- // spawns the threads.
- if (queues_[priority]->open_queue (priority,
- threads_per_queue_) == -1)
- TAO_THROW (DISPATCH_ERROR (0, CORBA::COMPLETED_NO,
- "ACE_ES_Priority_Dispatching::connected:"
- "queue open failed.\n"));
-
- // When this goes down to 0, we will shutdown the queue.
- queue_count_[priority] = 1;
-
- // Keep track of this to optimize handle_signal.
- if (priority > highest_priority_)
- highest_priority_ = priority;
-
- ACE_DEBUG ((LM_DEBUG, "Created queue priority = %d.\n", priority));
- }
- else
- queue_count_[priority]++;
- }
-#endif
-}
-
-void
-ACE_ES_Priority_Dispatching::disconnected (ACE_Push_Consumer_Proxy *consumer)
-{
- // We'll not dynamically close down queues.
- ACE_UNUSED_ARG (consumer);
-
-#if 0
- RtecScheduler::OS_Priority priority =
- ACE_Scheduler::instance ().preemption_priority (consumer->qos ().rt_info_);
-
- {
- ACE_ES_GUARD ace_mon (lock_);
-
- // If there are no more users of this queue, then we *could* shut
- // it down. However, we will not.
- if (--queue_count_[priority] <= 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) unused dispatch queue priority = %d, "
- "is_empty = %d.\n",
- priority, queues_[priority]->msg_queue ()->is_empty ()));
-
- queues_[priority]->shutdown_task ();
- }
- }
-#endif
-}
-
-// @@ This method could have a bypass optimization.
-// <request> has been dynamically allocated by the filtering module.
-void
-ACE_ES_Priority_Dispatching::push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &_env)
-{
- ACE_TIMEPROBE (" push_source_type: Correlation Module");
-
- RtecScheduler::OS_Priority thread_priority;
- RtecScheduler::Sub_Priority subpriority;
- RtecScheduler::Preemption_Priority preemption_priority;
-
- if (request->rt_info () != 0)
- {
- // @@ TODO use TAO_TRY&friends
- ACE_TIMEPROBE (" Priority_Dispatching::push - priority requested");
- ACE_Scheduler_Factory::server ()->priority
- (request->rt_info (),
- thread_priority,
- subpriority,
- preemption_priority,
- _env);
- ACE_TIMEPROBE (" Priority_Dispatching::push - priority obtained");
- if (_env.exception ())
- {
- return;
- }
- }
- else
- {
- thread_priority =
- ACE_Sched_Params::priority_min (ACE_SCHED_FIFO,
- ACE_SCOPE_PROCESS);
- subpriority = ACE_Scheduler_MIN_SUB_PRIORITY;
- preemption_priority = ACE_Scheduler_MIN_PREEMPTION_PRIORITY;
- }
-
- // If it's a request to forward an event, it needs a reference to us
- // to call dispatch_event.
- request->set (this, preemption_priority, subpriority);
-
- // Make sure that a queue exists for this priority.
- if (queues_[preemption_priority] == 0)
- {
- ACE_ERROR ((LM_ERROR, "Push to closed queue %d, dropping event.\n", preemption_priority));
- return;
-#if 0
- TAO_THROW (SYNC_ERROR (0, CORBA::COMPLETED_NO, "ACE_ES_Priority_Dispatching::push"));
-#endif /* 0 */
- }
-
- // Enqueue the request. If we're multi-threaded, this request is a
- // command object that will be called by the threads in the queue,
- // or will be dequeued by this->handle_signal if we're
- // single-threaded.
- if (queues_[preemption_priority]->try_put (request) == -1)
- {
- if (ACE_ES_Dispatch_Request::release (request) != 0)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Priority_Dispatching::push"
- " release failed.\n"));
- if (errno != EPIPE)
- {
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- // @@ Orbix parameters
- // 0, CORBA::COMPLETED_NO,
- // "ACE_ES_Priority_Dispatching::push enqueue failed"));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "Request rejected from closed queue %d.\n",
- preemption_priority));
- }
- }
-}
-
-// Start at highest priority queue checking for queued events
-// continuing to lowest priority queue. If an event is ever found,
-// dispatch it and then start back at the highest priority queue
-// again.
-int
-ACE_ES_Priority_Dispatching::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- int done;
-
- do
- {
- done = 1;
- for (int x = 0; x <= highest_priority_; x++)
- {
- // If the queue is not empty, dispatch the request and then
- // start the for loop from the beginning.
- if ((queues_[x] != 0) && (!queues_[x]->msg_queue ()->is_empty ()))
- {
- // Dequeue and service the request.
- queues_[x]->svc_one ();
-
- // Exit the for loop and start over.
- done = 0;
- break;
- }
-
- // If we get through the whole for loop without dispatching
- // anything, then we're done.
- }
- }
- while (!done);
-
-
- return 0;
-}
-
-// This is only for the non-win32 single-threaded implementation.
-int
-ACE_ES_Priority_Dispatching::handle_input (ACE_HANDLE)
-{
- return this->handle_signal (0, 0, 0);
-}
-
-// Shutdown each queue. When each queue exits, they will call back
-// this->dispatch_queue_closed which allows us to free up resources.
-// When the last queue has closed, we'll delete ourselves.
-void
-ACE_ES_Priority_Dispatching::shutdown (void)
-{
- if (shutdown_)
- return;
-
- ACE_DEBUG ((LM_DEBUG, "(%t) ACE_ES_Priority_Dispatching "
- "module shutting down.\n"));
-
- shutdown_ = 1;
-
- // If we're single threaded, then we need to shut down the
- // notification strategy so it can remove itself from the reactor.
- if (threads_per_queue_ == 0)
- notification_strategy_.shutdown ();
-
- // Whether these are active or not, they must be shut down.
- for (int x = 0; x <= highest_priority_; x++)
- if (queues_[x] != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "shutting down dispatch queue %d.\n", x));
- queues_[x]->shutdown_task ();
- }
-}
-
-// This gets called every time a Dispatch Queue closes down. We
-// search for <queue> and delete it. If we have been told to delete
-// ourself, after the last queue has been deleted, we delete
-// ourselves.
-void
-ACE_ES_Priority_Dispatching::dispatch_queue_closed (ACE_ES_Dispatch_Queue *queue)
-{
- ACE_ES_GUARD ace_mon (lock_);
-
- // Find the queue.
- for (int x = 0; x <= highest_priority_; x++)
- {
- if (queues_[x] == queue)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) Dispatch queue %d is closed.\n", x));
-
- // Store the queue for deleting in this object's destructor.
- delete_me_queues_[x] = queues_[x];
- queues_[x] = 0;
-
- // Reset highest_priority_.
- if (x == highest_priority_)
- {
- while ((--highest_priority_ >= 0) &&
- (queues_[highest_priority_] == 0));
-
- if (highest_priority_ < 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Dispatching module shut down.\n"));
- up_->shutdown ();
- return;
- }
- }
-
- // If we found the queue, we can exit the for loop.
- break;
- }
- }
-}
-
-/*
-ACE_HANDLE
-ACE_ES_Priority_Dispatching::get_handle (void) const
-{
- ACE_ES_Priority_Dispatching *fake_this = (ACE_ES_Priority_Dispatching *) this;
- return fake_this->notification_strategy_.get_handle ();
-}
-*/
-
-// ************************************************************
-
-ACE_ES_Dispatch_Queue::ACE_ES_Dispatch_Queue (ACE_ES_Dispatching_Base *dispatching_module,
- ACE_ES_Notification_Strategy *notification_strategy)
- : dispatching_module_ (dispatching_module),
- notification_strategy_ (notification_strategy)
-{
-}
-
-int
-ACE_ES_Dispatch_Queue::open_queue (RtecScheduler::Period &period,
- int threads)
-{
- // First set up the correct message queue according to whether the
- // dispatch queue will be active or not.
-
- // If there are no threads specified, we'll register with the
- // reactor to be called back when someone queues a message.
- if (threads == 0)
- {
- // Allocate a message queue that notifies a reactor when events
- // arrive via the msg_queue call. If that succeeds, set the
- // notification strategy in our message queue via the open call.
- if (this->msg_queue () == 0 ||
- this->msg_queue ()->open (ACE_ES_QUEUE::DEFAULT_HWM,
- ACE_ES_QUEUE::DEFAULT_LWM,
- notification_strategy_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p msg_queue.open failed.\n",
- "ACE_ES_Dispatch_Queue::open_queue"), -1);
- }
- else
- {
- // Allocate a message queue that does not notify.
- ACE_ES_MQ *mq = new ACE_ES_MQ;
- if (mq == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Dispatch_Queue::open_queue"), -1);
- else
- {
- // This deletes previous message queue.
- this->msg_queue (mq);
- // Set this so that the destructor of ACE_Task deletes our
- // message queue. Note, this must be after the call to
- // msg_queue.
- delete_msg_queue_ = 1;
- }
- }
-
- // Create a name for ourselves using the period. The period is
- // in 100 ns units; first convert to usec by dividing by 10.
- char temp[64];
- ACE_OS::sprintf (temp, "ACE_ES_Dispatch_Queue-%u.us", period / 10);
-
- // Open the task. This will query the scheduler for our qos
- // structure. It will also synch_threads if it succeeds.
- int result = this->open_task (temp);
-
- switch (result)
- {
- case -1:
- // Error.
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Dispatch_Queue::open_queue"), -1);
- case 0:
- TAO_TRY
- {// @@ TODO: Handle exceptions...
- ACE_Scheduler_Factory::server()->set (rt_info_,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- 0,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_ES_Display_Queue::exception"), -1);
- }
- TAO_ENDTRY;
- case 1:
- // Found.
- break;
- }
-
- // Spawn threads.
- return this->synch_threads (threads);
-}
-
-// This is called back by ACE_RT_Task when all the threads have
-// exited. We're going to forward this event to the dispatching
-// module so it can clean up any resources.
-void
-ACE_ES_Dispatch_Queue::threads_closed (void)
-{
- dispatching_module_->dispatch_queue_closed (this);
-}
-
-// ************************************************************
-
-ACE_ES_EFD_Dispatching::ACE_ES_EFD_Dispatching (ACE_EventChannel *channel)
- : ACE_ES_Dispatching_Base (channel)
-{
-}
-
-void
-ACE_ES_EFD_Dispatching::push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &)
-{
- // If it's a request to forward an event, it needs a reference to us
- // to call dispatch_event.
- request->set (this, 0, ACE_Scheduler_MIN_SUB_PRIORITY);
-
- u_long command_action = ACE_RT_Task_Command::RELEASE;
-
- // This may be a request to delete a push consumer proxy, so we
- // should execute it instead of just forwarding it.
- request->execute (command_action);
-
- switch (command_action)
- {
- case ACE_RT_Task_Command::RELEASE:
- // Free the request.
- if (ACE_ES_Dispatch_Request::release (request) != 0)
- ACE_ERROR ((LM_ERROR, "ACE_ES_EFD_Dispatching::push"
- " release failed.\n"));
- break;
-
- default:
- ACE_ERROR ((LM_ERROR, "ACE_ES_EFD_Dispatching::push: unknown command action.\n"));
- }
-}
-
-// ************************************************************
-
-ACE_ES_RTU_Dispatching::ACE_ES_RTU_Dispatching (ACE_EventChannel *channel)
- : ACE_ES_Priority_Dispatching (channel, 0)
-{
-}
-
-// We're called from a dispatch queue, so we can not release the request.
-int
-ACE_ES_RTU_Dispatching::dispatch_event (ACE_ES_Dispatch_Request *request,
- u_long &command_action)
-{
- // Store the priority of the task currently running.
- channel_->rtu_manager ()->priority (request->priority ());
-
- TAO_TRY
- {
- // Forward the request.
- up_->push (request, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "ACE_ES_RTU_Dispatching::dispatch_event unknown exception.\n"));
- }
- TAO_ENDTRY;
-
- // Reset the priority.
- channel_->rtu_manager ()->priority (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, ACE_SCOPE_PROCESS));
-
- // If the task was preempted, enqueue the request on the head of the
- // dispatch queue.
- if (channel_->rtu_manager ()->not_done ())
- command_action = ACE_RT_Task_Command::UNGETQ;
- else
- // We're done with it.
- command_action = ACE_RT_Task_Command::RELEASE;
-
- return 0;
-}
-
-void
-ACE_ES_RTU_Dispatching::push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &_env)
-{
- // First enqueue the message in the proper queue.
- ACE_ES_Priority_Dispatching::push (request, _env);
-
- // If the current event is higher priority (lower value) than the
- // current running task, then tell the task to preempt itself.
- int request_priority = request->priority ();
- int running_priority = channel_->rtu_manager ()->priority ();
- if (request_priority < running_priority)
- channel_->rtu_manager ()->should_preempt (1);
- return;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_CORBA_Sequence<ACE_CORBA_var<ACE_ES_Event_Container> >;
-template void operator+=(ACE_CORBA_Sequence<ACE_CORBA_var<ACE_ES_Event_Container> > &, ACE_CORBA_var<ACE_ES_Event_Container> const &);
-
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_CORBA_Sequence<ACE_CORBA_var<ACE_ES_Event_Container> >
-#pragma instantiate void operator+=(ACE_CORBA_Sequence<ACE_CORBA_var<ACE_ES_Event_Container> > &, ACE_CORBA_var<ACE_ES_Event_Container> const &)
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h
deleted file mode 100644
index 3ec2c40da06..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h
+++ /dev/null
@@ -1,486 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Dispatching_Module
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// This file holds the different Event Service dispatching
-// mechanisms. These include null-dispatching (EFD),
-// single-threaded with (RTU) and without preemption (LAME), and a
-// multithreaded implementation.
-//
-// ============================================================================
-
-#ifndef ACE_DISPATCHING_MODULES_H
-#define ACE_DISPATCHING_MODULES_H
-
-#include "tao/Timeprobe.h"
-#include "ReactorTask.h"
-#include "Event_Channel.h"
-
-// ************************************************************
-
-// Forward declarations.
-class ACE_ES_Dispatch_Queue;
-class ACE_ES_Dispatch_Request;
-
-// ************************************************************
-
-// Forward declarations.
-class ACE_ES_Consumer_Module;
-
-class TAO_ORBSVCS_Export ACE_ES_Dispatching_Base : public ACE_Event_Handler
-// = TITLE
-// Event Service Dispatch Module base class
-//
-// = DESCRIPTION
-// We inherit from ACE_Event_Handler so that we can be called back
-// by the ReactorEx when requests are queued. The virtual
-// dispatch_event method allows ACE_ES_Dispatch_Requests to call
-// back the dispatching module when acting as command objects. When
-// this implementation is used by the Event Channel it forwards all
-// dispatch calls without any queuing. Therefore, it can be
-// used to build an EFD. It is also inherited by the Priority
-// Dispatching module.
-{
-public:
- ACE_ES_Dispatching_Base (ACE_EventChannel *channel);
- // Default construction.
-
- virtual void open (ACE_ES_Consumer_Module *up,
- ACE_ES_Correlation_Module *down);
- // Link to adjacent modules.
-
- virtual void connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Forward down_.
-
- virtual void disconnecting (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Forward down_.
-
- virtual void disconnected (ACE_Push_Consumer_Proxy *consumer);
- // Release any unneeded dispatching resources.
-
- // = Not needed.
- // void connected (ACE_Push_Supplier_Proxy *supplier);
- // void disconnecting (ACE_Push_Supplier_Proxy *supplier);
-
- virtual void push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &) = 0;
- // Forward up_.
-
- virtual int dispatch_event (ACE_ES_Dispatch_Request *request,
- u_long &command_action);
- // Called by ACE_ES_Dispatch_Requests when dequeued by RT_Tasks.
-
- virtual void dispatch_queue_closed (ACE_ES_Dispatch_Queue *q);
- // Called when all the threads of a <q> have exited.
-
- virtual void shutdown (void);
- // This is called by the Event Channel. This will attempt to shut
- // down all of its threads gracefully. Wish it luck.
-
-protected:
- ACE_EventChannel *channel_;
- // Dat der channel.
-
- ACE_ES_MUTEX lock_;
- // To synchronize thr_count_.
-
- int thr_count_;
- // The total number of threads in the Dispatching Module. This will
- // be the sum of all the Dispatch Queue threads.
-
- ACE_ES_Consumer_Module *up_;
- // Next module up.
-
- ACE_ES_Correlation_Module *down_;
- // Next module down.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Dispatch_Request : public ACE_RT_Task_Command
-// = TITLE
-// ACE Event Service Dispatch Request
-//
-// = DESCRIPTION
-// Encapsulates a consumer and the events that will be sent to the
-// consumer. Right now, this class keeps a single_event_ that can
-// be used when only one event is sent to the consumer. Since this
-// is frequently the case (except for correlations), this
-// optimization reduces the amount of dynamic memory allocation is
-// necessary. This class is also a GOF Command object since it can
-// be dequeued by an RT_Task to call back the dispatching module
-// for request dispatching.
-{
-public:
- typedef ACE_CORBA_Sequence<ACE_ES_Event_Container_var> Event_Set;
-
- ACE_ES_Dispatch_Request (void);
- // Default construction.
-
- virtual ~ACE_ES_Dispatch_Request (void);
- // Default destruction.
-
- ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- RtecScheduler::handle_t rt_info);
- // All the events must be added after construction to the
- // event_set.
-
- ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- const Event_Set &event_set,
- RtecScheduler::handle_t rt_info);
- // Set consumer_ to <consumer> and copy <event_set> to event_set_.
- // <rt_info> describes the method receiving this dispatch.
-
- ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- const RtecEventComm::Time &time,
- RtecScheduler::handle_t rt_info);
- // Set consumer_ to <consumer> and sets single_event_.creation_time_
- // to <time>. Sets use_single_event_ to 1. <rt_info> describes the
- // method receiving this dispatch.
-
- ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- ACE_ES_Event_Container *event,
- RtecScheduler::handle_t rt_info);
- // Sets consumer_ and the first slot of event_set_. We use the
- // event_set_ instead of the single_event_ so that we can just carry
- // around the pointer to <event>. <rt_info> describes the method
- // receiving this dispatch.
-
- RtecScheduler::handle_t rt_info (void);
- // Description of the method receiving this request.
-
- void set (ACE_ES_Dispatching_Base *dispatching_module,
- RtecScheduler::OS_Priority priority,
- RtecScheduler::Sub_Priority sub_priority);
- // For multi-threaded implementations, <dispatching_module> is
- // called back when a request is dequeued. <priority> is the
- // dispatch priority of the event. <sub_priority> is the enqueue
- // priority of the event and will be forwarded to
- // ACE_Message_Block.
-
- ACE_Push_Consumer_Proxy *consumer (void) const;
- // Consumer accessor.
-
- const Event_Set &event_set (void) const;
- // If accessed, make_copy will use event_set_.
-
- Event_Set &event_set (void);
- // If accessed, make_copy will use event_set_.
-
- CORBA::ULong number_of_events (void) const;
- // Returns 1 if we're using single_event, or event_set_.size ().
-
- void make_copy (RtecEventComm::EventSet &dest) const;
- // Copy single_event or event_set into <dest>.
-
- virtual int execute (u_long &command_action);
- // Calls dispatching_module_->dispatch_event.
-
- RtecScheduler::OS_Priority priority (void);
- // Priority accessor.
-
-#if 0
- // @@ This cannot be done: the object would be allocated using this
- // class operator new, but it will be removed using the
- // ACE_Message_Block operator delete!
- void *operator new (size_t nbytes);
- // Allocates memory from a thread-specific memory pool.
-
- void operator delete (void *);
- // Returns memory to a thread-specific memory pool.
-#endif
-
-protected:
- RtecScheduler::OS_Priority priority_;
-
- RtecScheduler::handle_t rt_info_;
- // Describes the method receiving this dispatch.
-
- ACE_ES_Dispatching_Base *dispatching_module_;
- // The dispatching module called back when we're dequeued by a
- // thread.
-
- int use_single_event_;
- // Is true if we're using a single event. Is 0 is we're using
- // event_set_.
-
- ACE_Push_Consumer_Proxy *consumer_;
- // The final destination for single_event_ or event_set_.
-
- ACE_ES_Event_Container single_event_;
- // This is used for single event dispatches.
-
- Event_Set event_set_;
- // This is used for event sets that need to be dispatched.
-};
-
-// ************************************************************
-
-#if defined (ACE_WIN32)
-class TAO_ORBSVCS_Export ACE_ES_ReactorEx_NS : public ACE_Notification_Strategy
-// = TITLE
-// Event Service ReactorEx Notification Strategy
-//
-// = DESCRIPTION
-// Integrates the ACE_Message_Queue notification to signal a
-// handle that will wake up the ACE_ES_Priority_Dispatching
-// module. This is used in place of the
-// ACE_ReactorEx_Notification_Strategy to avoid any queueing by
-// the ReactorEx::notify mechanism.
-{
-public:
- ACE_ES_ReactorEx_NS (ACE_Event_Handler *eh);
- // Stores away <eh> for when this->open is called.
-
- int open (void);
- // Registers eh_ with the ReactorEx to be notified when this->notify
- // is called.
-
- void shutdown (void);
- // Removes self from the reactor.
-
- // = These result in eh_->handle_signal getting called. eh_ should
- // point to a dispatching module.
- virtual int notify (void);
- virtual int notify (ACE_Event_Handler *,
- ACE_Reactor_Mask mask);
-
- // ACE_HANDLE get_handle (void);
- // Returns event_.handle ().
-
-private:
- ACE_Auto_Event event_;
- // Registered with the ReactorEx.
-};
-
-typedef ACE_ES_ReactorEx_NS ACE_ES_Notification_Strategy;
-
-#else // *******************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Reactor_NS : public ACE_Reactor_Notification_Strategy
-// = TITLE
-// Event Service Reactor Notification Strategy
-//
-// = DESCRIPTION
-// Maps to the ACE_Reactor_Notification_Strategy interface. This
-// version is for non WIN32 platforms.
-{
-public:
- ACE_ES_Reactor_NS (ACE_Event_Handler *eh);
- // Calls ACE_Reactor_Notification_Strategy with the ORB's reactor
- // and signal mask.
-
- int open (void);
- // Does nothing.
-
- void shutdown (void);
- // Does nothing.
-};
-
-typedef ACE_ES_Reactor_NS ACE_ES_Notification_Strategy;
-
-#endif /* ACE_WIN32 */
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_MQ : public ACE_ES_QUEUE
-// = TITLE
-// Event Service Message Queue
-{
- virtual int notify (void) { return 0;}
- // Does nothing.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Dispatch_Queue : public ACE_RT_Task
-// = TITLE
-// Event Service Dispatch Queue
-//
-// = DESCRIPTION
-// An encapsulation of a dispatch queue. By inheriting from
-// ACE_RT_Task, we can make this zero-threaded or multi-threaded.
-{
-public:
- ACE_ES_Dispatch_Queue (ACE_ES_Dispatching_Base *dispatching_module,
- ACE_ES_Notification_Strategy *notification_strategy);
- // Stores <dispatching_module> for this->threads_closed. Stores
- // away <notification_strategy> for this->synch_threads.
-
- int open_queue (RtecScheduler::Period &period,
- int threads);
- // This is a hack to get the channel to work with the new
- // scheduler.
-
-#if 0
- int open_queue (RtecScheduler::OS_Priority priority,
- int threads);
- // Creates a name from the <priority> and tries to find a scheduling
- // qos structure. If one is not found, but created, qos_ is set
- // with default values. Either way, if qos_->thread_ > 0, it calls
- // this->synch_threads. Otherwise, our message queue will use
- // notification_strategy_. This will cause the ReactorEx to call
- // back the dispatching_module_ when requests are queued on our
- // message queue. Returns 0 on success, -1 on failure.
-#endif
-
- virtual void threads_closed (void);
- // Called when every thread has exited. This will call
- // dispatching_module_->dispatch_queue_closed.
-
-private:
- ACE_ES_Dispatching_Base *dispatching_module_;
- // Used in threads_closed.
-
- ACE_ES_Notification_Strategy *notification_strategy_;
- // Notifies the Dispatching Module when a request has been queued on
- // our message queue.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Priority_Dispatching : public ACE_ES_Dispatching_Base
-// = TITLE
-// Event Service Priority Dispatching Module
-//
-// = DESCRIPTION
-// Inherits from ACE_Event_Handler to utilitize the
-// ACE_Message_Queue notification strategy. This implementation
-// does priority dispatching without preemption.
-{
-public:
- ACE_ES_Priority_Dispatching (ACE_EventChannel *channel,
- int threads_per_queue);
- // Store <channel>. Spawns <threads_per_queue> thread for each
- // dispatch queue. If != 0, then the channel is an MT_CHANNEL. If
- // == 0, then the channel is an ST_CHANNEL.
-
- ~ACE_ES_Priority_Dispatching (void);
- // Delete queues.
-
- void connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Allocate any needed dispatching resources for this consumers
- // priority.
-
- void disconnected (ACE_Push_Consumer_Proxy *consumer);
- // Release unneeded dispatch queues.
-
- // = Not needed.
- // void connected (ACE_Push_Supplier_Proxy *supplier);
- // void disconnecting (ACE_Push_Supplier_Proxy *supplier);
-
- virtual void push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &);
- // Enqueues the request on the appropriate Dispatch Queue.
-
- virtual void shutdown (void);
- // Closes all queues "asynchronously." When all queues are closed,
- // deletes them all and then deletes itself.
-
- virtual void dispatch_queue_closed (ACE_ES_Dispatch_Queue *q);
- // Called when all the threads of a <q> have exited. Deletes <q>.
-
- // virtual ACE_HANDLE get_handle (void) const;
- // Get the I/O handle.
-
-protected:
- virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0);
- // Called when input has arrived on a message queue. This is used
- // for single-threaded implementations.
-
- virtual int handle_input (ACE_HANDLE);
- // For single-threaded implementations on non-win32 platforms that
- // use the ACE_Reactor_Notification_Strategy. This just forwards
- // all calls to this->handle_signal ().
-
- ACE_ES_Notification_Strategy notification_strategy_;
- // Shared between all dispatch queues.
-
- void initialize_queues (void);
- // This is a hack to create a queue for each of the 4 rate groups.
-
- ACE_ES_Dispatch_Queue *queues_[ACE_Scheduler_MAX_PRIORITIES];
- // Pointers to dispatch queues.
-
- ACE_ES_Dispatch_Queue *delete_me_queues_[ACE_Scheduler_MAX_PRIORITIES];
- // Pointers to dispatch queues that want to die.
-
- int queue_count_[ACE_Scheduler_MAX_PRIORITIES];
- // The number of consumers using each queue.
-
- int highest_priority_;
- // The highest priority queue in queues_. This allows us to
- // optimize the handle_signal method.
-
- int shutdown_;
- // Make sure to only shutdown the dispatching module once.
-
- int threads_per_queue_;
- // The number of threads to spawn for each dispatch queue.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_EFD_Dispatching : public ACE_ES_Dispatching_Base
-// = TITLE
-// Event Service EFD Dispatching Module
-//
-// = DESCRIPTION
-// Implements a zero-threaded dispatcher with no preemption.
-{
-public:
- ACE_ES_EFD_Dispatching (ACE_EventChannel *channel);
- // Acquires the proper qos structure and passes <channel> onto to
- // the dispatching base constructor.
-
- virtual void push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &);
- // Forward up_.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_RTU_Dispatching : public ACE_ES_Priority_Dispatching
-// = TITLE
-// Event Service RTU Dispatching Module
-//
-// = DESCRIPTION
-// Implements a single-threaded dispatcher with delayed preemption.
-{
-public:
- ACE_ES_RTU_Dispatching (ACE_EventChannel *channel);
- // Store <channel>.
-
- virtual int dispatch_event (ACE_ES_Dispatch_Request *request,
- u_long &command_action);
- // Called by ACE_Dispatch_Queues and handle_signal when an event
- // needs to be dequeued. Implements an RTU-like delayed preemption
- // policy.
-
- virtual void push (ACE_ES_Dispatch_Request *request,
- CORBA::Environment &);
- // Calls ACE_ES_Priority_Dispatching::push and then checks if
- // preemption is necessary.
-};
-
-#if defined (__ACE_INLINE__)
-#include "Dispatching_Modules.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_DISPATCHING_MODULES_H */
-
-
diff --git a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.i b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.i
deleted file mode 100644
index 7148766c9b7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.i
+++ /dev/null
@@ -1,267 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_ES_Dispatch_Request::ACE_ES_Dispatch_Request (void) :
- priority_ (0),
- rt_info_ (0),
- dispatching_module_ (0),
- use_single_event_ (0),
- consumer_ (0),
- single_event_ (),
- event_set_ ()
-{
-}
-
-ACE_INLINE
-ACE_ES_Dispatch_Request::~ACE_ES_Dispatch_Request (void)
-{
-}
-
-ACE_INLINE
-ACE_ES_Dispatch_Request::ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- RtecScheduler::handle_t rt_info) :
- priority_ (0),
- rt_info_ (rt_info),
- dispatching_module_ (0),
- use_single_event_ (0),
- consumer_ (consumer),
- single_event_ (),
- event_set_ ()
-{
-}
-
-ACE_INLINE
-ACE_ES_Dispatch_Request::ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- const Event_Set &event_set,
- RtecScheduler::handle_t rt_info) :
- priority_ (0),
- rt_info_ (rt_info),
- dispatching_module_ (0),
- use_single_event_ (0),
- consumer_ (consumer),
- single_event_ (),
- event_set_ (event_set)
-{
-}
-
-ACE_INLINE
-ACE_ES_Dispatch_Request::ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- ACE_ES_Event_Container *event,
- RtecScheduler::handle_t rt_info) :
- priority_ (0),
- rt_info_ (rt_info),
- dispatching_module_ (0),
- use_single_event_ (0),
- consumer_ (consumer),
- single_event_ (),
- event_set_ ()
-{
- event_set_ += event;
-}
-
-ACE_INLINE
-ACE_ES_Dispatch_Request::ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer,
- const RtecEventComm::Time &time,
- RtecScheduler::handle_t rt_info) :
- priority_ (0),
- rt_info_ (rt_info),
- dispatching_module_ (0),
- use_single_event_ (1),
- consumer_ (consumer),
- single_event_ (),
- event_set_ ()
-{
- single_event_.creation_time_ = time;
- single_event_.type_ = ACE_ES_EVENT_TIMEOUT;
-}
-
-ACE_INLINE void
-ACE_ES_Dispatch_Request::set (ACE_ES_Dispatching_Base *dispatching_module,
- RtecScheduler::OS_Priority preemption_priority,
- RtecScheduler::Sub_Priority sub_priority)
-{
- dispatching_module_ = dispatching_module;
- priority_ = preemption_priority;
- ACE_Message_Block::msg_priority (sub_priority);
-}
-
-ACE_INLINE ACE_Push_Consumer_Proxy *
-ACE_ES_Dispatch_Request::consumer (void) const
-{
- return consumer_;
-}
-
-ACE_INLINE const ACE_ES_Dispatch_Request::Event_Set &
-ACE_ES_Dispatch_Request::event_set (void) const
-{
- return event_set_;
-}
-
-ACE_INLINE ACE_ES_Dispatch_Request::Event_Set &
-ACE_ES_Dispatch_Request::event_set (void)
-{
- return event_set_;
-}
-
-ACE_INLINE CORBA::ULong
-ACE_ES_Dispatch_Request::number_of_events (void) const
-{
- if (use_single_event_)
- return 1;
- else
- return event_set_.length ();
-}
-
-ACE_INLINE RtecScheduler::OS_Priority
-ACE_ES_Dispatch_Request::priority (void)
-{
- return priority_;
-}
-
-ACE_INLINE RtecScheduler::handle_t
-ACE_ES_Dispatch_Request::rt_info (void)
-{
- return rt_info_;
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_Dispatching_Base::ACE_ES_Dispatching_Base (ACE_EventChannel *channel)
- : channel_ (channel),
- thr_count_ (0),
- up_ (0),
- down_ (0)
-{
-}
-
-ACE_INLINE void
-ACE_ES_Dispatching_Base::open (ACE_ES_Consumer_Module *up,
- ACE_ES_Correlation_Module *down)
-{
- up_ = up;
- down_ = down;
- // 1 == 2.
-}
-
-ACE_INLINE void
-ACE_ES_Dispatching_Base::connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &_env)
-{
- down_->connected (consumer, _env);
-}
-
-ACE_INLINE void
-ACE_ES_Dispatching_Base::disconnected (ACE_Push_Consumer_Proxy *consumer)
-{
- // Do nothing.
- ACE_UNUSED_ARG (consumer);
-}
-
-ACE_INLINE void
-ACE_ES_Dispatching_Base::disconnecting (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &_env)
-{
- down_->disconnecting (consumer, _env);
-}
-
-ACE_INLINE void
-ACE_ES_Dispatching_Base::dispatch_queue_closed (ACE_ES_Dispatch_Queue *q)
-{
- ACE_UNUSED_ARG (q);
-}
-
-// Just forward the request. This is basically a hook for the RTU
-// stuff.
-ACE_INLINE int
-ACE_ES_Dispatching_Base::dispatch_event (ACE_ES_Dispatch_Request *request,
- u_long &command_action)
-{
- ACE_TIMEPROBE (" decode the event");
-
- TAO_TRY
- {
- // Forward the request.
- up_->push (request, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "ACE_ES_Dispatching_Base::dispatch_event unknown exception.\n"));
- }
- TAO_ENDTRY;
-
- // Tell our caller to release the request.
- command_action = ACE_RT_Task_Command::RELEASE;
-
- // Return zero so our calling thread does not exit.
- return 0;
-}
-
-ACE_INLINE void
-ACE_ES_Dispatching_Base::shutdown (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) ACE_ES_Dispatching_Base module shutting down.\n"));
-}
-
-// ************************************************************
-
-#if defined (ACE_WIN32)
-ACE_INLINE
-ACE_ES_ReactorEx_NS::ACE_ES_ReactorEx_NS (ACE_Event_Handler *eh)
- : ACE_Notification_Strategy (eh, ACE_Event_Handler::NULL_MASK)
-{
-}
-
-ACE_INLINE int
-ACE_ES_ReactorEx_NS::open (void)
-{
- return ACE_Task_Manager::instance ()->
- GetReactorTask (0)->get_reactor ().register_handler (eh_, event_.handle ());
-}
-
-ACE_INLINE void
-ACE_ES_ReactorEx_NS::shutdown (void)
-{
- ACE_Task_Manager::instance ()->GetReactorTask (0)->
- get_reactor ().remove_handler (eh_, ACE_Event_Handler::DONT_CALL);
-}
-
-ACE_INLINE int
-ACE_ES_ReactorEx_NS::notify (void)
-{
- return event_.signal ();
-}
-
-ACE_INLINE int
-ACE_ES_ReactorEx_NS::notify (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
-{
- return event_.signal ();
-}
-
-#else /* !defined (ACE_WIN32) */
-// This class is only necessary on non-win32 platforms.
-ACE_INLINE
-ACE_ES_Reactor_NS::ACE_ES_Reactor_NS (ACE_Event_Handler *eh)
- : ACE_Reactor_Notification_Strategy (&(ACE_Task_Manager::instance ()->
- GetReactorTask (0)->get_reactor ()),
- eh, ACE_Event_Handler::READ_MASK)
-{
-}
-
-ACE_INLINE int
-ACE_ES_Reactor_NS::open (void)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_ES_Reactor_NS::shutdown (void)
-{
-}
-
-#endif /* ACE_WIN32 */
-
-// ************************************************************
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp
deleted file mode 100644
index 90ac54a7743..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp
+++ /dev/null
@@ -1,2779 +0,0 @@
-// $Id$
-
-
-
-#include "ace/Service_Config.h"
-#include "orbsvcs/Scheduler_Factory.h"
-
-#include "Dispatching_Modules.h"
-#include "Memory_Pools.h"
-#include "Event_Channel.h"
-
-// These are to save space.
-#define WRITE_GUARD ACE_ES_WRITE_GUARD
-#define READ_GUARD ACE_ES_READ_GUARD
-
-#if !defined (__ACE_INLINE__)
-#include "Event_Channel.i"
-#endif /* __ACE_INLINE__ */
-
-// ************************************************************
-
-static RtecScheduler::OS_Priority
-Preemption_Priority (RtecScheduler::handle_t rtinfo)
-{
- RtecScheduler::OS_Priority thread_priority;
- RtecScheduler::Sub_Priority subpriority;
- RtecScheduler::Preemption_Priority preemption_priority;
-
- TAO_TRY
- {
- ACE_TIMEPROBE (" Preemption_Priority - priority requested");
- ACE_Scheduler_Factory::server ()->priority
- (rtinfo,
- thread_priority,
- subpriority,
- preemption_priority,
- TAO_TRY_ENV);
- TAO_CHECK_ENV
- ACE_TIMEPROBE (" connected - priority obtained");
- }
- TAO_CATCH (RtecScheduler::UNKNOWN_TASK, ex_ut)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "UNKNOWN_TASK %p.\n",
- "Preemption_Priority"), 0);
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "Unexpected exception %p.\n",
- "Preemption_Priority"), 0);
-
- }
- TAO_ENDTRY;
- return preemption_priority;
-}
-
-static RtecScheduler::OS_Priority
-IntervalToPriority (RtecScheduler::Time interval)
-{
- for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
- if (interval <= ACE_Scheduler_Rates[x])
- return x;
-
- return ACE_Scheduler_MIN_PREEMPTION_PRIORITY;
-}
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export Shutdown_Consumer : public ACE_ES_Dispatch_Request
-// = TITLE
-// Shutdown Consumer command
-//
-// = DESCRIPTION
-// This command object is sent through the system when a consumer
-// disconnects. When the Dispatching Module dequeues this request,
-// it calls execute which execute calls back to the Consumer
-// Module. At that point, the Consumer Module can tell the rest of
-// the system that the consumer has disconnected and delete the
-// consumer proxy. This allows all events queued for the consumer
-// to be flushed to the consumer proxy (which will drop them).
-// Events can be queued in the ReactorEx (in a dispatch set), or in
-// the Dispatching Module.
-{
-public:
- // When executed, tells <consumer_module> that <consumer> has shut
- // down.
- Shutdown_Consumer (ACE_ES_Consumer_Module *consumer_module,
- ACE_Push_Consumer_Proxy *consumer)
- : consumer_module_ (consumer_module)
- {
- consumer_ = consumer;
-
- // Set rt_info_ to the lowest priority rt_info in consumer_.
- // This is so the dispatching module can query us as a dispatch
- // request to get the appropriate preemption priority.
- ACE_ES_Dependency_Iterator iter (consumer->qos ().dependencies);
- while (iter.advance_dependency () == 0)
- {
- RtecEventComm::EventType &type = (*iter).event_.type_;
- if (type != ACE_ES_GLOBAL_DESIGNATOR &&
- type != ACE_ES_CONJUNCTION_DESIGNATOR &&
- type != ACE_ES_DISJUNCTION_DESIGNATOR)
- {
- if (rt_info_ == 0 ||
- ::Preemption_Priority ((*iter).rt_info) <
- ::Preemption_Priority (rt_info_))
- rt_info_ = (*iter).rt_info;
- }
- }
- }
-
- // Report to the consumer module that consumer_ has shutdown.
- virtual int execute (u_long &command_action)
- {
- consumer_module_->shutdown_request (this);
- command_action = ACE_RT_Task_Command::RELEASE;
- return 0;
- }
-
- void *operator new (size_t /* nbytes */)
- { return ::new char[sizeof (Shutdown_Consumer)]; }
-
- void operator delete (void *buf)
- { ::delete [] buf; }
-
- // The module that we report to.
- ACE_ES_Consumer_Module *consumer_module_;
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export Shutdown_Channel : public ACE_ES_Dispatch_Request
-{
-public:
- Shutdown_Channel (ACE_EventChannel *channel) :
- channel_ (channel) {}
-
- // Report to the consumer module that consumer_ has shutdown.
- virtual int execute (u_long &command_action)
- {
-#if 0
- channel_->destroy_i ();
-#endif
- command_action = ACE_RT_Task_Command::RELEASE;
- return 0;
- }
-
- void *operator new (size_t /* nbytes */)
- { return ::new char[sizeof (Shutdown_Channel)]; }
-
- void operator delete (void *buf)
- { ::delete [] buf; }
-
- ACE_EventChannel *channel_;
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Priority_Timer : public ACE_Event_Handler
-// = TITLE
-// Event Service Timer
-//
-// = DESCRIPTION
-// Manages a thread per priority, each of which sits on its own
-// ReactorEx dispatching the timers for its given priority.
-{
-public:
- ACE_ES_Priority_Timer (void);
- // Default construction.
-
- int connected (RtecScheduler::handle_t rt_info);
- // This allows the Priority Timer to prespawn threads. Returns 0 on
- // success, -1 on failure.
-
- int schedule_timer (RtecScheduler::handle_t rt_info,
- const ACE_ES_Timer_ACT *act,
- RtecScheduler::OS_Priority preemption_priority,
- const RtecScheduler::Time& delta,
- const RtecScheduler::Time& interval = ORBSVCS_Time::zero);
- // Schedule a timer at the appropriate priority for <preemption_priority>.
- // Returns the preemption priority used on success, -1 on failure.
-
- int cancel_timer (RtecScheduler::OS_Priority preemption_priority,
- int id, ACE_ES_Timer_ACT *&act);
- // Cancel the timer associated with the priority of
- // <preemption_priority> and <id>. <act> is filled in with the
- // Timer_ACT used when scheduling the timer. Returns 0 on success,
- // -1 on failure.
-
-private:
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *act);
- // Casts <act> to ACE_ES_Timer_ACT and calls execute.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export Flush_Queue_ACT : public ACE_ES_Timer_ACT
-// = TITLE
-// Flush Queue Asynchronous Completion Token
-//
-// = DESCRIPTION
-// Carries a single dispatch request through the ReactorEx.
-// Deletes itself when execute is called.
-{
-public:
- Flush_Queue_ACT (ACE_ES_Dispatch_Request *request,
- ACE_ES_Dispatching_Module *dispatching_module) :
- request_ (request),
- dispatching_module_ (dispatching_module) { }
-
- virtual void execute (void)
- {
- TAO_TRY
- {
- ACE_ES_Dispatch_Request *request = request_;
- dispatching_module_->push (request, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- delete this;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "(%t) Flush_Queue_ACT::execute: "
- "Unknown exception..\n"));
- }
- TAO_ENDTRY;
- }
-
- ACE_ES_Dispatch_Request *request_;
- ACE_ES_Dispatching_Module *dispatching_module_;
-};
-
-// ************************************************************
-
-// Since this class is *defined* in the cpp file, the INLINE
-// definitions must also be in the cpp file. The should go here
-// before any use of these methods.
-
-ACE_INLINE int
-ACE_ES_Priority_Timer::schedule_timer (RtecScheduler::handle_t rt_info,
- const ACE_ES_Timer_ACT *act,
- RtecScheduler::OS_Priority preemption_priority,
- const RtecScheduler::Time &delta,
- const RtecScheduler::Time &interval)
-{
- if (rt_info != 0)
- {
- // Add the timer to the task's dependency list.
- RtecScheduler::handle_t timer_rtinfo =
- ACE_Task_Manager::instance()->GetReactorTask (preemption_priority)->rt_info ();
-
- TAO_TRY
- {
- ACE_Scheduler_Factory::server()->add_dependency
- (rt_info, timer_rtinfo, 1, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "add dependency failed"));
- }
- TAO_ENDTRY;
- }
-
- // @@ We're losing resolution here.
- ACE_Time_Value tv_delta;
- ORBSVCS_Time::TimeT_to_Time_Value (tv_delta, delta);
-
- ACE_Time_Value tv_interval;
- ORBSVCS_Time::TimeT_to_Time_Value (tv_interval, interval);
-
- return ACE_Task_Manager::instance()->
- GetReactorTask (preemption_priority)->
- get_reactor ().schedule_timer (this,
- (void *) act,
- tv_delta, tv_interval);
-}
-
-ACE_INLINE int
-ACE_ES_Priority_Timer::cancel_timer (RtecScheduler::OS_Priority preemption_priority,
- int id, ACE_ES_Timer_ACT *&act)
-{
- const void *vp;
-
- int result = ACE_Task_Manager::instance()->
- GetReactorTask (preemption_priority)->
- get_reactor ().cancel_timer (id, &vp);
-
- if (result == 0)
- {
- ACE_ERROR ((LM_ERROR, "ACE_ES_Priority_Timer::cancel_timer: "
- "Tried to cancel nonexistent timer.\n"));
- act = 0;
- }
- else
- act = (ACE_ES_Timer_ACT *) vp;
-
- return result;
-}
-
-// ************************************************************
-
-ACE_ES_Event_Container::ACE_ES_Event_Container (void) :
- // ACE_ES_Event (),
- ref_count_ (1)
-{
-}
-
-ACE_ES_Event_Container::~ACE_ES_Event_Container (void)
-{
-}
-
-ACE_ES_Event_Container::ACE_ES_Event_Container (const ACE_ES_Event_Container &ec)
- : RtecEventComm_Event (ec),
- ref_count_ (1)
-{
-}
-
-ACE_ES_Event_Container::ACE_ES_Event_Container (const RtecEventComm_Event &e)
- : RtecEventComm_Event (e),
- ref_count_ (1)
-{
-}
-
-ACE_ES_Event_Container *
-ACE_ES_Event_Container::_duplicate (void)
-{
- ref_count_++;
- return this;
-}
-
-void
-ACE_ES_Event_Container::_release (void)
-{
- if (--ref_count_ == 0)
- delete this;
-}
-
-int
-ACE_ES_Event_Container::operator== (const ACE_ES_Event_Container &event)
-{
- RtecEventComm::Event &event1 = (RtecEventComm::Event &) *this;
- RtecEventComm::Event &event2 = (RtecEventComm::Event &) event;
- return event1 == event2;
-}
-
-void *
-ACE_ES_Event_Container::operator new (size_t nbytes)
-{
- ACE_ASSERT (nbytes <= sizeof (ACE_ES_Event_Container));
- return ACE_ES_Memory_Pools::new_Event_Container ();
-}
-
-void
-ACE_ES_Event_Container::operator delete (void *mem)
-{
- ACE_ES_Memory_Pools::delete_Event_Container (mem);
-}
-
-void
-ACE_ES_Event_Container::dump (void)
-{
- ::dump_event ((RtecEventComm::Event &) *this);
-}
-
-// ************************************************************
-
-ACE_Push_Supplier_Proxy::ACE_Push_Supplier_Proxy (ACE_ES_Supplier_Module *sm)
- : supplier_module_ (sm),
- push_supplier_ (0)
-{
-}
-
-void
-ACE_Push_Supplier_Proxy::connect_push_supplier (RtecEventComm::PushSupplier_ptr push_supplier,
- const RtecEventChannelAdmin::SupplierQOS &qos,
- CORBA::Environment &_env)
-{
- if (this->connected ())
- TAO_THROW (RtecEventChannelAdmin::AlreadyConnected);
-
- push_supplier_ =
- RtecEventComm::PushSupplier::_duplicate(push_supplier);
-
- // ACE_SupplierQOS_Factory::debug (qos);
-
- // Copy by value.
- qos_ = qos;
-
- // ACE_SupplierQOS_Factory::debug (qos_);
-
- // @@ TODO: The SupplierQOS should have a more reasonable interface to
- // obtain the supplier_id(), BTW, a callback to push_supplier will
- // not work: it usually results in some form of dead-lock.
- source_id_ = qos_.publications_[0].event_.source_;
-
- supplier_module_->connected (this, _env);
-}
-
-void
-ACE_Push_Supplier_Proxy::push (const RtecEventComm::EventSet &event,
- CORBA::Environment &_env)
-{
- ACE_TIMEPROBE (" enter Push_Supplier_Proxy::push");
-
- // @@ TOTAL HACK
- ACE_hrtime_t ec_recv = ACE_OS::gethrtime ();
- for (CORBA::ULong i = 0; i < event.length (); ++i)
- {
- RtecEventComm::Event& ev =
- ACE_const_cast(RtecEventComm::Event&,event[i]);
- ORBSVCS_Time::hrtime_to_TimeT (ev.ec_recv_time_, ec_recv);
- }
- supplier_module_->push (this, event, _env);
-}
-
-void
-ACE_Push_Supplier_Proxy::disconnect_push_consumer (CORBA::Environment &_env)
-{
- ACE_TIMEPROBE_PRINT;
- if (this->connected ())
- {
- push_supplier_ = 0;
- supplier_module_->disconnecting (this, _env);
- }
-}
-
-void
-ACE_Push_Supplier_Proxy::shutdown (void)
-{
- TAO_TRY
- {
- push_supplier_->disconnect_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "ACE_Push_Supplier_Proxy::shutdown failed.\n"));
- }
- TAO_ENDTRY;
-}
-
-// ************************************************************
-
-ACE_Push_Consumer_Proxy::ACE_Push_Consumer_Proxy (ACE_ES_Consumer_Module *cm)
- : push_consumer_ (0),
- consumer_module_ (cm)
-{
-}
-
-ACE_Push_Consumer_Proxy::~ACE_Push_Consumer_Proxy (void)
-{
-}
-
-
-void
-ACE_Push_Consumer_Proxy::connect_push_consumer (RtecEventComm::PushConsumer_ptr push_consumer,
- const RtecEventChannelAdmin::ConsumerQOS &qos,
- CORBA::Environment &_env)
-{
- if (this->connected ())
- TAO_THROW (RtecEventChannelAdmin::AlreadyConnected);
-
- push_consumer_ =
- RtecEventComm::PushConsumer::_duplicate(push_consumer);
- // @@ TODO Find out why are two duplicates needed...
- RtecEventComm::PushConsumer::_duplicate(push_consumer);
-
- // ACE_ConsumerQOS_Factory::debug (qos);
-
- // Copy by value.
- qos_ = qos;
-
- // ACE_ConsumerQOS_Factory::debug (qos_);
-
- consumer_module_->connected (this, _env);
-}
-
-void
-ACE_Push_Consumer_Proxy::disconnect_push_supplier (CORBA::Environment &_env)
-{
- ACE_TIMEPROBE_PRINT;
- consumer_module_->disconnecting (this, _env);
- push_consumer_ = 0;
-}
-
-void
-ACE_Push_Consumer_Proxy::suspend (CORBA::Environment &)
-{
- correlation_.suspend ();
-}
-
-void
-ACE_Push_Consumer_Proxy::resume (CORBA::Environment &)
-{
- correlation_.resume ();
-}
-
-void
-ACE_Push_Consumer_Proxy::shutdown (void)
-{
- TAO_TRY
- {
- push_consumer_->disconnect_push_consumer (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "ACE_Push_Consumer_Proxy::shutdown failed.\n"));
- }
- TAO_ENDTRY;
-}
-
-// ************************************************************
-
-ACE_EventChannel::ACE_EventChannel (u_long type)
- : rtu_manager_ (0),
- type_ (type),
- state_ (INITIAL_STATE),
- destroyed_ (0)
-{
- consumer_module_ = new ACE_ES_Consumer_Module (this);
- // RtecEventChannelAdmin::ConsumerAdmin_duplicate(consumer_module_);
-
- ACE_NEW(dispatching_module_,
- ACE_ES_Priority_Dispatching(this, THREADS_PER_DISPATCH_QUEUE));
-
- correlation_module_ = new ACE_ES_Correlation_Module (this);
- subscription_module_ = new ACE_ES_Subscription_Module (this);
- supplier_module_ = new ACE_ES_Supplier_Module (this);
- timer_ = new ACE_ES_Priority_Timer;
-
- consumer_module_->open (dispatching_module_);
- dispatching_module_->open (consumer_module_, correlation_module_);
- correlation_module_->open (dispatching_module_, subscription_module_);
- subscription_module_->open (correlation_module_, supplier_module_);
- supplier_module_->open (subscription_module_);
-}
-
-ACE_EventChannel::~ACE_EventChannel (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) ACE_EventChannel deleting all modules.\n"));
-
- TAO_TRY
- {
- this->destroy (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_EventChannel::~ACE_EventChannel"));
- }
- TAO_ENDTRY;
- // @@ TODO: Shouldn't we use _release() instead?
- delete rtu_manager_;
- delete consumer_module_;
- delete dispatching_module_;
- delete correlation_module_;
- delete subscription_module_;
- delete supplier_module_;
- delete timer_;
-}
-
-void
-ACE_EventChannel::destroy (CORBA::Environment &_env)
-{
- ACE_UNUSED_ARG (_env);
-
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR ((LM_ERROR, "ACE_EventChannel::destroy"));
-
- if (destroyed_ != 0)
- return;
-
- destroyed_ = 1;
- ACE_DEBUG ((LM_DEBUG, "(%t) Event Channel shutting down.\n"));
-
- // Send a shutdown message through the modules.
- supplier_module_->shutdown ();
-
-#if 0
- // Flush all messages in the channel.
- Shutdown_Channel *sc = new Shutdown_Channel (this);
- if (sc == 0)
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- // Create a wrapper around the dispatch request.
- Flush_Queue_ACT *act = new Flush_Queue_ACT (sc, dispatching_module_);
- if (act == 0)
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- // Set a 100ns timer.
- if (this->timer ()->schedule_timer (0, // no rt-info
- act,
- ACE_Scheduler_MIN_PREEMPTION_PRIORITY,
- 100, // 10 usec delta
- 0) == -1) // no interval
- {
- ACE_ERROR ((LM_ERROR, "%p queue_request failed.\n", "ACE_ES_Consumer_Module"));
- delete sc;
- delete act;
- }
-#endif
-}
-
-void
-ACE_EventChannel::shutdown (void)
-{
- // @@ TODO: Find a portable way to shutdown the ORB, on Orbix we have
- // to call deactive_impl () on a CORBA::POA is that the portable
- // way?
- // With TAO we need access to the ORB (to call shutdown() on it).
- TAO_ORB_Core_instance ()->orb ()->shutdown ();
-}
-
-void
-ACE_EventChannel::report_connect (u_long event)
-{
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR ((LM_ERROR, "ACE_EventChannel::report_connect"));
-
- ACE_CLR_BITS (state_, event);
-}
-
-void
-ACE_EventChannel::report_disconnect (u_long event)
-{
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR ((LM_ERROR, "ACE_EventChannel::report_disconnect"));
-
- ACE_SET_BITS (state_, event);
- if (state_ == SHUTDOWN)
- ACE_DEBUG ((LM_DEBUG, "(%t) Event Channel has no consumers or suppliers.\n"));
-}
-
-ACE_ES_Disjunction_Group::~ACE_ES_Disjunction_Group (void)
-{
-}
-
-ACE_ES_Conjunction_Group::~ACE_ES_Conjunction_Group (void)
-{
-}
-
-// ************************************************************
-
-ACE_ES_Subscription_Info::~ACE_ES_Subscription_Info (void)
-{
- Subscriber_Map_Iterator iter (type_subscribers_);
-
- // Delete all type collections.
- for (Subscriber_Map_Entry *temp = 0;
- iter.next (temp) != 0;
- iter.advance ())
- {
- delete temp->int_id_;
- }
-}
-
-/*
-void
-ACE_ES_Subscription_Info::Type_Subscribers::operator=
-(const ACE_ES_Subscription_Info::Type_Subscribers &rhs)
-{
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (rhs.subscribers_);
-
- for (ACE_ES_Consumer_Rep **consumer = 0;
- iter.next (consumer) != 0;
- iter.advance ())
- {
- if (subscribers_.insert (consumer) != 0)
- ACE_ERROR ((LM_ERROR, "%p insert failed.\n",
- "ACE_ES_Subscription_Info::Type_Subscribers::operator="));
- }
-
- // Pointer copy.
- dependency_info_ = rhs.dependency_info_;
-}
-*/
-
-// Remove <consumer> from the consumer set in <type_map> set
-// corresponding to <type>.
-int
-ACE_ES_Subscription_Info::remove (Subscriber_Map &type_map,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type)
-{
- Type_Subscribers *subscribers;
-
- // Find the type set within the type collection.
- if (type_map.find (type, subscribers) == -1)
- // type_map does not contain the type.
- return -1;
-
- // Remove the consumer from the type set.
- if (subscribers->consumers_.remove (consumer) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p remove failed.\n",
- "ACE_ES_Subscriber_Info::remove"), -1);
- // @@ Should probably remove the supplier from the consumers caller
- // list.
-
- // If the set is empty, remove it from the type collection.
- if (subscribers->consumers_.size () == 0)
- {
- Type_Subscribers *removed_subscribers;
- if (type_map.unbind (type, removed_subscribers) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p unbind failed.\n",
- "ACE_ES_Subscriber_Info::remove"), -1);
-
- // Sanity check.
- if (removed_subscribers != subscribers)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscriber_Info::remove: "
- "removed wrong set!\n"), -1);
-
- // Free up the set removed.
- delete removed_subscribers;
- }
-
- return 0;
-}
-
-
-int
-ACE_ES_Subscription_Info::remove (SourceID_Map &source_subscribers,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID sid)
-{
- Subscriber_Set *subscribers;
-
- // Find the subscribers of <sid>.
- if (source_subscribers.find (sid, subscribers) == -1)
- // does not contain the <sid>.
- return -1;
-
- // Remove the consumer from the subscriber set.
- if (subscribers->remove (consumer) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p remove failed.\n",
- "ACE_ES_Subscriber_Info::remove"), -1);
- // @@ Should probably remove the supplier from the consumers caller
- // list.
-
- // If the set is empty, remove it from the type collection.
- if (subscribers->size () == 0)
- {
- Subscriber_Set *removed_subscribers;
- if (source_subscribers.unbind (sid, removed_subscribers) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p unbind failed.\n",
- "ACE_ES_Subscriber_Info::remove"), -1);
-
- // Sanity check.
- if (removed_subscribers != subscribers)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscriber_Info::remove: "
- "removed wrong set!\n"), -1);
-
- // Free up the set removed.
- delete removed_subscribers;
- }
-
- return 0;
-}
-
-
-void
-ACE_ES_Subscription_Info::append_subscribers (Subscriber_Set &dest,
- Subscriber_Set &src)
-{
- Subscriber_Set_Iterator src_iter (src);
-
- // Iterate through the source set. Add each source proxy to the
- // destination set.
- for (ACE_ES_Consumer_Rep **proxy = 0;
- src_iter.next (proxy) != 0;
- src_iter.advance ())
- {
- if (dest.insert (*proxy) == -1)
- ACE_ERROR ((LM_ERROR, "%p: insert failed.\n", "append_subscribers"));
- }
-}
-
-int
-ACE_ES_Subscription_Info::insert_or_allocate (SourceID_Map &sid_map,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID sid)
-{
- Subscriber_Set *subscribers;
-
- if (sid_map.find (sid, subscribers) == -1)
- {
- // If the correct type set does not exist, make one with a null
- // dependency info (since there is no supplier of this event).
- subscribers = new Subscriber_Set;
-
- if (sid_map.bind (sid, subscribers) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p bind failed.\n",
- "ACE_ES_Subscription_Info::insert_or_allocate"));
- delete subscribers;
- return -1;
- }
- }
-
- // 0 and 1 are success for insert.
- return subscribers->insert (consumer) == -1 ? -1 : 0;
-}
-
-int
-ACE_ES_Subscription_Info::insert_or_allocate (Subscriber_Map &type_map,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type)
-{
- Type_Subscribers *subscribers;
-
- if (type_map.find (type, subscribers) == -1)
- {
- // If the correct type set does not exist, make one with a null
- // dependency info (since there is no supplier of this event).
- subscribers = new Type_Subscribers (0);
-
- if (type_map.bind (type, subscribers) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p bind failed.\n",
- "ACE_ES_Subscription_Info::insert_or_allocate"));
- delete subscribers;
- return -1;
- }
- }
-
- return subscribers->consumers_.insert (consumer);
-}
-
-int
-ACE_ES_Subscription_Info::insert_or_fail (Subscriber_Map &type_map,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type,
- RtecScheduler::Dependency_Info *&dependency)
-{
- Type_Subscribers *subscribers;
-
- // Get the subscriber set for <type>.
- if (type_map.find (type, subscribers) == -1)
- return -1;
-
- // Pass back the description of the method generating <type>.
- dependency = subscribers->dependency_info_;
-
- // Insert the new consumer into the subscriber set.
- return subscribers->consumers_.insert (consumer);
-}
-
-// ************************************************************
-
-ACE_ES_Consumer_Module::ACE_ES_Consumer_Module (ACE_EventChannel* channel)
- : lock_ (),
- all_consumers_ (),
- channel_ (channel),
- down_ (0)
-{
-}
-
-void
-ACE_ES_Consumer_Module::open (ACE_ES_Dispatching_Module *down)
-{
- down_ = down;
-}
-
-void
-ACE_ES_Consumer_Module::connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &_env)
-{
- channel_->report_connect (ACE_EventChannel::CONSUMER);
- down_->connected (consumer, _env);
-}
-
-void
-ACE_ES_Consumer_Module::shutdown_request (ACE_ES_Dispatch_Request *request)
-{
- Shutdown_Consumer *sc = (Shutdown_Consumer *) request;
-
- // Tell everyone else that the consumer is disconnected. This means
- // that *nothing* is left in the system for the consumer, so
- // everyone can free up any resources.
- down_->disconnected (sc->consumer ());
-
- ACE_DEBUG ((LM_DEBUG, "Deleting proxy for consumer\n"));
-
- // Delete the consumer proxy.
- delete sc->consumer ();
-
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- return;
-
- // Tell the channel that we may need to shut down.
- if (all_consumers_.size () <= 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) No more consumers connected.\n"));
- channel_->report_disconnect (ACE_EventChannel::CONSUMER);
- }
-}
-
-void
-ACE_ES_Consumer_Module::shutdown (void)
-{
- Consumers copy;
-
- {
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- goto DONE;
-
- if (all_consumers_.size () == 0)
- goto DONE;
-
- // Make a copy so that the consumers can disconnect without the
- // lock being held.
- copy = all_consumers_;
- }
-
- // This scope is just to thwart the compiler. It was complaining
- // about the above goto's bypassing variable initializations. Yadda
- // yadda.
- {
- Consumer_Iterator iter (copy);
-
- CORBA::Environment env;
-
- for (ACE_Push_Consumer_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- (*proxy)->shutdown ();
- // @@ Cannnot use CORBA::release (*proxy), since it is a servant.
- delete *proxy;
-
- // Remove the consumer from our list.
- {
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR ((LM_ERROR, "%p Failed to acquire lock.\n", "ACE_ES_Consumer_Module::shutdown"));
-
- if (all_consumers_.remove (*proxy) == -1)
- ACE_ERROR ((LM_ERROR, "%p Failed to remove consumer.\n", "ACE_ES_Consumer_Module::shutdown"));
- }
- }
- }
-
-DONE:
- channel_->shutdown ();
-}
-
-void
-ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &_env)
-{
- {
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR);
-
- if (all_consumers_.remove (consumer) == -1)
- return;
- }
-
- // Tell everyone else that the consumer is disconnecting. This
- // allows them to remove the consumer from any subscription lists
- // etc. However, messages may still be queued in the ReactorEx or
- // in the Dispatching Module for this consumer, so no queues or
- // proxies can be deleted just yet.
- down_->disconnecting (consumer, _env);
-
- // Send a shutdown message through the system. When this is
- // dispatched, the consumer proxy will be deleted. <request> is
- // queued in the Priority_Timer at <priority> level. It will be
- // scheduled for dispatching in 1 nanosecond. This gives components
- // a hook into the first queueing point in the channel.
-
- // Create a shutdown message. When this is dispatched, it will
- // delete the proxy.
- Shutdown_Consumer *sc = new Shutdown_Consumer (this, consumer);
- if (sc == 0)
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- // Create a wrapper around the dispatch request.
- Flush_Queue_ACT *act = new Flush_Queue_ACT (sc, channel_->dispatching_module_);
- if (act == 0)
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- ACE_DEBUG ((LM_DEBUG, "(%t) initiating consumer disconnect.\n"));
-
- // Set a 100ns timer.
- TimeBase::TimeT ns100;
- ORBSVCS_Time::hrtime_to_TimeT (ns100, 100);
- if (channel_->timer ()->schedule_timer (0, // no rt_info
- act,
- // ::Preemption_Priority (consumer->qos ().rt_info_),
- ACE_Scheduler_MIN_PREEMPTION_PRIORITY,
- ns100,
- ORBSVCS_Time::zero) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p queue_request failed.\n", "ACE_ES_Consumer_Module"));
- delete sc;
- delete act;
- }
-}
-
-// This method executes in the same thread of control that will hand
-// the event set to the consumer (or it's proxy). A network proxy may
-// copy the event set to the network buffer. An active client may
-// copy the event set to be queued. Or a same address-space consumer
-// can read the set we allocated off the stack.
-void
-ACE_ES_Consumer_Module::push (const ACE_ES_Dispatch_Request *request,
- CORBA::Environment &_env)
-{
- ACE_TIMEPROBE (" enter ES_Consumer_Module::push");
- // We'll create a temporary event set with the size of the incoming
- // request.
- RtecEventComm::EventSet event_set (request->number_of_events ());
- request->make_copy (event_set);
-
- // Forward the event set.
- ACE_hrtime_t ec_send = ACE_OS::gethrtime ();
- for (CORBA::ULong i = 0; i < event_set.length (); ++i)
- {
- RtecEventComm::Event& ev =
- ACE_const_cast(RtecEventComm::Event&,event_set[i]);
- ORBSVCS_Time::hrtime_to_TimeT (ev.ec_send_time_, ec_send);
- }
- request->consumer ()->push (event_set, _env);
- ACE_TIMEPROBE (" leave ES_Consumer_Module::push");
-}
-
-RtecEventChannelAdmin::ProxyPushSupplier_ptr
-ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env)
-{
- ACE_Push_Consumer_Proxy *new_consumer = new ACE_Push_Consumer_Proxy (this);
-
- // Get a new supplier proxy object.
- if (new_consumer == 0)
- {
- ACE_ERROR ((LM_ERROR, "ACE_EventChannel"
- "::obtain_push_supplier failed.\n"));
- TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0);
- }
-
- {
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- {
- delete new_consumer;
- TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, 0);
- }
-
- if (all_consumers_.insert (new_consumer) == -1)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Module insert failed.\n"));
- }
-
- // Return the CORBA object reference to the new supplier proxy.
- return new_consumer->get_ref ();
-}
-
-// ************************************************************
-
-ACE_ES_Correlation_Module::ACE_ES_Correlation_Module (ACE_EventChannel *channel)
- : channel_ (channel),
- up_ (0),
- subscription_module_ (0)
-{
-}
-
-void
-ACE_ES_Correlation_Module::open (ACE_ES_Dispatching_Module *up,
- ACE_ES_Subscription_Module *sm)
-{
- up_ = up;
- subscription_module_ = sm;
-}
-
-void
-ACE_ES_Correlation_Module::connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &_env)
-{
- // Initialize the consumer correlation filter.
- if (consumer->correlation ().connected (consumer, this) == -1)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::CORRELATION_ERROR);
-}
-
-void
-ACE_ES_Correlation_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &)
-{
- if (consumer->correlation ().disconnecting () == -1)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Correlation_Module::disconnecting failed.\n"));
-}
-
-int
-ACE_ES_Correlation_Module::subscribe (ACE_ES_Consumer_Rep *consumer)
-{
- return subscription_module_->subscribe (consumer);
-}
-
-/*
-int
-ACE_ES_Correlation_Module::unsubscribe (ACE_ES_Consumer_Rep *cr)
-{
- return subscription_module_->unsubscribe (cr);
-}
-*/
-
-void
-ACE_ES_Correlation_Module::push (ACE_ES_Consumer_Rep *consumer,
- ACE_ES_Event_Container *event,
- CORBA::Environment &_env)
-{
- ACE_TIMEPROBE (" enter ACE_ES_Correlation_Module::push");
- ACE_ES_Dispatch_Request *request =
- consumer->correlation ()->push (consumer, event);
- ACE_TIMEPROBE (" pushed to Correlation_Module");
-
- // If request == 0, then the event was queued for later. Otherwise,
- // we need to push the event now.
- if (request != 0)
- up_->push (request, _env);
-
- ACE_TIMEPROBE (" push_source_type: Dispatch Module enqueuing");
-}
-
-// Must check consumer->qos ().use_timeout () before calling this.
-// This method is supposed properly schedule a timer with respect to
-// the consumer's priority AND the correlation that should receive the
-// timeout event.
-int
-ACE_ES_Correlation_Module::schedule_timeout (ACE_ES_Consumer_Rep_Timeout *consumer)
-{
- RtecEventComm::Time &interval =
- consumer->dependency ()->event_.creation_time_;
- RtecEventComm::Time &delay =
- consumer->dependency ()->event_.creation_time_;
-
- // Store the preemption priority so we can cancel the correct timer.
- // The priority values may change during the process lifetime (e.g.,
- // after the scheduler has been run).
- consumer->preemption_priority (::IntervalToPriority (interval));
-
- // Register the timer.
- int id = channel_->timer ()->schedule_timer (consumer->dependency ()->rt_info,
- consumer,
- consumer->preemption_priority (),
- delay, interval);
-
- // Store the timer id for canceling.
- consumer->timer_id (id);
-
- if (id == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p schedule timer failed.\n",
- "ACE_ES_Correlation_Module::schedule_timeout"), -1);
-
- return 0;
-}
-
-// Must check consumer->qos ().timeout_ before calling this.
-int
-ACE_ES_Correlation_Module::cancel_timeout (ACE_ES_Consumer_Rep_Timeout *consumer)
-{
- // Cancel the timer from the Priority Timer.
- ACE_ES_Timer_ACT *act;
- channel_->timer ()->cancel_timer (consumer->preemption_priority (),
- consumer->timer_id (),
- act);
-
- ACE_ASSERT (consumer == act);
-
- // Free up the Timer ACT.
- // delete act;
-
- return 0;
-}
-
-
-int
-ACE_ES_Correlation_Module::reschedule_timeout (ACE_ES_Consumer_Rep_Timeout *consumer)
-{
- if (this->cancel_timeout (consumer) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Disjunction_Group::reschedule_deadline"), -1);
- else
- {
- RtecEventComm::Time &interval =
- consumer->dependency ()->event_.creation_time_;
- RtecEventComm::Time &delay =
- consumer->dependency ()->event_.creation_time_;
-
- // Store the preemption priority so we can cancel the correct timer.
- // The priority values may change during the process lifetime (e.g.,
- // after the scheduler has been run).
- consumer->preemption_priority (::IntervalToPriority (interval));
-
- // Register the timer.
- int id = channel_->timer ()->schedule_timer (0, // Do not pass an RT_Info.
- consumer,
- consumer->preemption_priority (),
- delay, interval);
-
- // Store the timer id for canceling.
- consumer->timer_id (id);
-
- if (id == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p schedule timer failed.\n",
- "ACE_ES_Correlation_Module::reschedule_timeout"), -1);
-
- return 0;
- }
-}
-
-void
-ACE_ES_Correlation_Module::shutdown (void)
-{
- // Perhaps this should call disconnecting on all the consumers?
- // We'll opt to just forward this message for now.
- up_->shutdown ();
-}
-
-// ************************************************************
-
-ACE_ES_Consumer_Correlation::ACE_ES_Consumer_Correlation (void) :
- correlation_module_ (0),
- type_id_index_ (0),
- channel_ (0),
- qos_ (),
- pending_events_ (0),
- lock_ (),
- consumer_ (0),
- pending_flags_ (0),
- consumer_reps_ (0),
- n_consumer_reps_ (0),
- timer_reps_ (0),
- n_timer_reps_ (0),
- conjunction_groups_ (0),
- n_conjunction_groups_ (0),
- disjunction_groups_ (0),
- n_disjunction_groups_ (0),
- connected_ (0)
-{
-}
-
-ACE_ES_Consumer_Correlation::~ACE_ES_Consumer_Correlation (void)
-{
- delete [] timer_reps_;
- for (int cr = 0; cr < n_consumer_reps_; cr++)
- consumer_reps_[cr]->_release ();
- delete [] consumer_reps_;
- delete [] conjunction_groups_;
- delete [] disjunction_groups_;
- delete [] pending_events_;
-}
-
-void
-ACE_ES_Consumer_Correlation::disconnect_push_supplier (CORBA::Environment &)
-{
- connected_ = 0;
-}
-
-int
-ACE_ES_Consumer_Correlation::allocate_correlation_resources (ACE_ES_Dependency_Iterator &iter)
-{
- n_conjunction_groups_ = iter.n_conjunctions ();
- if (n_conjunction_groups_ > 0)
- {
- conjunction_groups_ = new ACE_ES_Conjunction_Group[n_conjunction_groups_];
- if (conjunction_groups_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1);
- for (int n=0; n < n_conjunction_groups_; n++)
- conjunction_groups_[n].set_correlation_module (correlation_module_);
- }
-
- n_disjunction_groups_ = iter.n_disjunctions ();
- if (n_disjunction_groups_ > 0)
- {
- disjunction_groups_ = new ACE_ES_Disjunction_Group[n_disjunction_groups_];
- if (disjunction_groups_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1);
- for (int n=0; n < n_disjunction_groups_; n++)
- disjunction_groups_[n].set_correlation_module (correlation_module_);
- }
-
- n_consumer_reps_ = iter.n_events ();
- if (n_consumer_reps_ > 0)
- {
- // This allocates more than is needed if there are repeats:
- // (A+B)|(B+C). We allocate these individually so that they can
- // be deleted individually.
-
- typedef ACE_ES_Consumer_Rep *reparray;
- consumer_reps_ = new reparray[n_consumer_reps_];
-
- for (int cr = 0; cr < n_consumer_reps_; cr++)
- {
- consumer_reps_[cr] = new ACE_ES_Consumer_Rep;
- if (consumer_reps_[cr] == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1);
- }
- }
-
- n_timer_reps_ = iter.n_timeouts ();
- if (n_timer_reps_ > 0)
- {
- timer_reps_ = new ACE_ES_Consumer_Rep_Timeout[n_timer_reps_];
- if (timer_reps_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1);
- }
-
- // This allocates more than is needed.
- pending_events_ = new Event_Set[n_consumer_reps_ + n_timer_reps_];
- if (pending_events_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1);
-
- return 0;
-}
-
-// We don't need synchronization until after we've been connected and
-// subscribed to events.
-int
-ACE_ES_Consumer_Correlation::connected (ACE_Push_Consumer_Proxy *consumer,
- ACE_ES_Correlation_Module *correlation_module)
-{
- correlation_module_ = correlation_module;
- consumer_ = consumer;
-
- // for (CORBA_Types::ULong index=0; index < consumer->qos ().dependencies_.length (); index++)
- // consumer->qos ().dependencies_[index].event_.dump ();
-
- ACE_ES_Dependency_Iterator iter (consumer->qos ().dependencies);
- iter.parse ();
- if (this->allocate_correlation_resources (iter) == -1)
- return -1;
-
-
- int cgroup_index = -1;
- int dgroup_index = -1;
- int crep_index = 0;
- int trep_index = 0;
- RtecEventComm::EventType group_type = 0;
-
- while (iter.advance_dependency () == 0)
- {
- // Keep track of how many conjunction and disjunction groups are
- // registered. Update the index pointers so that the helper
- // functions can update the appropriate group objects.
- switch ((*iter).event_.type_)
- {
- case ACE_ES_CONJUNCTION_DESIGNATOR:
- cgroup_index++;
- ACE_ASSERT (cgroup_index < n_conjunction_groups_);
- group_type = ACE_ES_CONJUNCTION_DESIGNATOR;
- continue;
-
- case ACE_ES_DISJUNCTION_DESIGNATOR:
- dgroup_index++;
- ACE_ASSERT (dgroup_index < n_disjunction_groups_);
- group_type = ACE_ES_DISJUNCTION_DESIGNATOR;
- continue;
-
- case ACE_ES_GLOBAL_DESIGNATOR:
- group_type = ACE_ES_GLOBAL_DESIGNATOR;
- continue;
-
- // These Delegate to the appropriate registration method.
-#if 0
- // @@ TODO rt_info_ is a handle_t now, does checking against
- // 0 still make sense?
- // Check for a null rt_info.
- if ((*iter).rt_info_ == 0)
- {
- ACE_ERROR ((LM_ERROR, "Found a ConsumerQOS::dependencies[].rt_info_ == 0.\n"));
- continue;
- }
-#endif /* 0 */
-
- case ACE_ES_EVENT_TIMEOUT:
- // For backwards compatibility.
- case ACE_ES_EVENT_DEADLINE_TIMEOUT:
- if (this->register_deadline_timeout (*iter,
- group_type,
- cgroup_index,
- dgroup_index,
- trep_index) == -1)
- return -1;
- break;
-
- case ACE_ES_EVENT_INTERVAL_TIMEOUT:
- if (this->register_interval_timeout (*iter,
- group_type,
- cgroup_index,
- dgroup_index,
- trep_index) == -1)
- return -1;
- break;
-
- case ACE_ES_EVENT_ACT:
- // Store the ACT in the current conjunction or disjunction
- // group.
- switch (group_type)
- {
- case ACE_ES_CONJUNCTION_DESIGNATOR:
- conjunction_groups_[cgroup_index].set_act ((*iter).event_);
- break;
- case ACE_ES_DISJUNCTION_DESIGNATOR:
- disjunction_groups_[cgroup_index].set_act ((*iter).event_);
- break;
- case ACE_ES_GLOBAL_DESIGNATOR:
- default:
- ACE_ERROR ((LM_ERROR, "Warning: ACTs not implemented for Global.\n"));
- }
- break;
-
- default:
- // Non-timer event subscription.
- if (this->register_event (*iter,
- group_type,
- cgroup_index,
- dgroup_index,
- crep_index) == -1)
- return -1;
- break;
- }
- }
-
- // We may not use all of the consumer reps if there are repeats:
- // (A+B)|(B+C). Must update n_consumer_reps_ so we don't try to
- // unsubscribe a blank rep during disconnect.
- if (crep_index < n_consumer_reps_)
- n_consumer_reps_ = crep_index;
-
- return 0;
-}
-
-int
-ACE_ES_Consumer_Correlation::register_deadline_timeout (RtecEventChannelAdmin::Dependency &dependency,
- RtecEventComm::EventType group_type,
- int cgindex,
- int dgindex,
- int &trep_index)
-{
- // new_timeout will be returned as an ACT. When executed, it will
- // forward *iter.event_ to the consumer.
- ACE_ES_Consumer_Rep_Timeout *new_timeout = &timer_reps_[trep_index++];
- new_timeout->init (this, dependency);
- new_timeout->correlation_type (ACE_ES_Consumer_Rep::DEADLINE_TIMEOUT);
- // Deadline timers do not need type ids.
-
- switch (group_type)
- {
- case ACE_ES_CONJUNCTION_DESIGNATOR:
- // Reps keep pointers back to the groups that they're deadlines for.
- new_timeout->add_disjunction_group (conjunction_groups_[cgindex]);
- // Groups keep references to the deadline timers for rescheduling.
- if (conjunction_groups_[cgindex].set_deadline_timeout (new_timeout) == -1)
- return -1;
- break;
-
- case ACE_ES_DISJUNCTION_DESIGNATOR:
- new_timeout->add_disjunction_group (disjunction_groups_[dgindex]);
- if (disjunction_groups_[dgindex].set_deadline_timeout (new_timeout) == -1)
- return -1;
- break;
-
- case ACE_ES_GLOBAL_DESIGNATOR:
- ACE_ERROR_RETURN ((LM_ERROR, "No global deadline timeouts, yet!\n"), -1);
- }
-
- return 0;
-}
-
-int
-ACE_ES_Consumer_Correlation::register_interval_timeout (RtecEventChannelAdmin::Dependency &dependency,
- RtecEventComm::EventType group_type,
- int cgindex,
- int /* dgindex */,
- int &trep_index)
-{
- // new_timeout will be returned as an ACT. When executed, it will
- // forward *iter.event_ to the consumer.
- ACE_ES_Consumer_Rep_Timeout *new_timeout = &timer_reps_[trep_index++];
- new_timeout->init (this, dependency);
- new_timeout->type_id (this->new_type_id ());
-
- switch (group_type)
- {
- case ACE_ES_CONJUNCTION_DESIGNATOR:
- // If it's a conjunction, then we need to perform correlations
- // on the timeout.
- new_timeout->correlation_type (ACE_ES_Consumer_Rep::CORRELATE);
- conjunction_groups_[cgindex].add_type (new_timeout->type_id ());
- break;
-
- case ACE_ES_DISJUNCTION_DESIGNATOR:
- case ACE_ES_GLOBAL_DESIGNATOR:
- new_timeout->correlation_type (ACE_ES_Consumer_Rep::NO_CORRELATION);
- break;
- }
-
- // Schedule the timeout.
- if (correlation_module_->schedule_timeout (new_timeout) == -1)
- return -1;
- else
- return 0;
-}
-
-// Search <creps> for a rep matching <dependency>. If one is not
-// found, allocate one. All returned reps should have the appropriate
-// type_id set.
-ACE_ES_Consumer_Rep *
-ACE_ES_Consumer_Correlation::get_consumer_rep (RtecEventChannelAdmin::Dependency &dependency,
- int &crep_index)
-{
- ACE_ES_Consumer_Rep *rep = 0;
-
- // Step through all existing consumer reps.
- for (int x=0; x < crep_index; x++)
- {
- RtecEventComm::Event& e = consumer_reps_[x]->dependency ()->event_;
- // If <dependency> matches any previously subscribed consumer
- // reps, we'll reuse it.
- if (e.type_ == dependency.event_.type_
- && e.source_ == dependency.event_.source_ )
- {
- rep = consumer_reps_[x];
- break;
- }
- }
-
- // Check if we didn't find it.
- if (rep == 0)
- {
- if (crep_index >= n_consumer_reps_)
- ACE_ERROR_RETURN ((LM_ERROR, "Too many event registrations.\n"), 0);
- // Allocate a new rep and set its type id.
- rep = consumer_reps_[crep_index];
- crep_index++;
- rep->init (this, dependency);
- rep->type_id (this->new_type_id ());
- }
-
- return rep;
-}
-
-int
-ACE_ES_Consumer_Correlation::new_type_id (void)
-{
- int type_id = type_id_index_;
- if (++type_id_index_ >= ACE_ES_MAX_SUBSCRIPTIONS)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_MAX_SUBSCRIPTIONS exceeded.\n"),0);
- else
- return type_id;
-}
-
-int
-ACE_ES_Consumer_Correlation::register_event (RtecEventChannelAdmin::Dependency &dependency,
- RtecEventComm::EventType group_type,
- int cgindex,
- int dgindex,
- int &crep_index)
-{
- // These are stored in the subscription module data structures.
- ACE_ES_Consumer_Rep *consumer_rep = this->get_consumer_rep (dependency, crep_index);
-
- if (consumer_rep == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Consumer_Correlation::register_event"), -1);
-
- switch (group_type)
- {
- case ACE_ES_CONJUNCTION_DESIGNATOR:
- // If it's a conjunction, then we need to perform correlations
- // on the object. Otherwise, NO_CORRELATION is set by default.
- consumer_rep->correlation_type (ACE_ES_Consumer_Rep::CORRELATE);
- conjunction_groups_[cgindex].add_type (consumer_rep->type_id ());
- break;
-
- case ACE_ES_DISJUNCTION_DESIGNATOR:
- consumer_rep->add_disjunction_group (disjunction_groups_[dgindex]);
- break;
-
- case ACE_ES_GLOBAL_DESIGNATOR:
- ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Correlation::register_event: "
- "ACE_ES_GLOBAL_DESIGNATOR not implemented.\n"));
- break;
- }
-
- // Subscribe the consumer_rep to the suppliers.
- if (correlation_module_->subscribe (consumer_rep) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_ES_Consumer_Correlation::disconnecting (void)
-{
- // If we were forwarding events, disconnect as a supplier.
- if (connected_)
- {
- CORBA::Environment env;
- channel_->disconnect_push_consumer (env);
- if (env.exception () != 0)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Correlation::disconnecting failed.\n"));
- }
-
- for (int x=0; x < n_timer_reps_; x++)
- correlation_module_->cancel_timeout (&timer_reps_[x]);
-
- for (int y=0; y < n_consumer_reps_; y++)
- if (consumer_reps_[y] != 0)
- consumer_reps_[y]->disconnect ();
-
- return 0;
-}
-
-ACE_ES_Dispatch_Request *
-ACE_ES_Consumer_Correlation::push (ACE_ES_Consumer_Rep *cr,
- ACE_ES_Event_Container *event)
-{
- ACE_TIMEPROBE (" ACE_ES_Consumer_Correlation::push, enter");
-
- // Check if this event needs any correlating, or if it should just
- // be forwarded real fast-like.
- switch (cr->correlation_type ())
- {
- case ACE_ES_Consumer_Rep::NO_CORRELATION:
- {
- // Calls reschedule on all disjunction groups it belongs to.
- cr->reschedule_deadlines ();
-
- ACE_TIMEPROBE (" Consumer_Correlation::push, determine NO CORR.");
- ACE_ES_Dispatch_Request *request =
- new ACE_ES_Dispatch_Request (consumer_, event, cr->dependency ()->rt_info);
- ACE_TIMEPROBE (" Consumer_Correlation::push, NO_CORR: alloc");
-
- if (request == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Consumer_Correlation::push"), 0);
-
- return request;
- }
-
- case ACE_ES_Consumer_Rep::CORRELATE:
- return this->correlate (cr, event);
-
- case ACE_ES_Consumer_Rep::DEADLINE_TIMEOUT:
- {
- ACE_ES_Dispatch_Request *request =
- new ACE_ES_Dispatch_Request (consumer_, cr->dependency ()->rt_info);
-
- if (request == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Consumer_Correlation::push"), 0);
-
- // Add the deadline timeout to the outbox.
- request->event_set () += event;
-
- // Add any pending events to the outbox.
- cr->top_group ()->add_events (&(request->event_set ()),
- pending_events_, pending_flags_);
-
- return request;
- }
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Consumer_Correlation::push:"
- " unknown correlation type\n"), 0);
- }
-}
-
-// @@ If we're just event forwarding, then no pending_events_ need to
-// be kept! I'll add this optimization later.
-ACE_ES_Dispatch_Request *
-ACE_ES_Consumer_Correlation::correlate (ACE_ES_Consumer_Rep *cr,
- ACE_ES_Event_Container *event)
-{
- // If the consumer has specified correlation criteria, then we must
- // first acquire the mutex.
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Consumer_Correlation::push"), 0);
-
- // Add the new event to the pending events.
- pending_events_[cr->type_id ()] += event;
-
- // Set the bit corresponding to the arrived event.
- // This should be pending_flags_->event_arrived (index);
- ACE_SET_BITS (pending_flags_, ACE_INT2BIT[cr->type_id ()]);
-
- ACE_ES_Dispatch_Request *request = 0;
- Event_Set *outbox = 0;
- // Since add_events changes pending_flags_, we need to keep this
- // for all iterations through the conjunction groups.
- u_long freeze_pending_flags = pending_flags_;
-
- for (int x=0; x < n_conjunction_groups_; x++)
- {
- if (conjunction_groups_[x].should_forward (freeze_pending_flags))
- {
- // If there is a deadline timer for this conjunction group,
- // this will reschedule them.
- conjunction_groups_[x].reschedule_deadline ();
-
- // First time in, allocate the new dispatch request.
- if (request == 0)
- {
- request =
- new ACE_ES_Dispatch_Request (consumer_,
- cr->dependency ()->rt_info);
- if (request == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Consumer_Correlation::correlate"), 0);
- outbox = &(request->event_set ());
- }
-
- // Add each of the pending events for this correlation to
- // the outgoing dispatch request. If outbox == 0, then
- // this will just clear any pending events.
- conjunction_groups_[x].add_events (outbox,
- pending_events_,
- pending_flags_);
- }
- }
-
- return request;
-}
-
-
-// ************************************************************
-
-ACE_ES_Consumer_Rep::~ACE_ES_Consumer_Rep (void)
-{
-}
-
-void
-ACE_ES_Consumer_Rep::execute (void)
-{
- ACE_ERROR ((LM_ERROR, "Warning! ACE_ES_Consumer_Rep::execute called.\n"));
-}
-
-// ************************************************************
-
-void
-ACE_ES_Consumer_Rep_Timeout::execute (void)
-{
- ACE_TIMEPROBE (" Consumer_Rep_Timeout::execute");
- if (this->receiving_events ())
- {
- CORBA::Environment __env;
- ACE_Time_Value tv = ACE_OS::gettimeofday ();
- ORBSVCS_Time::Time_Value_to_TimeT
- (timeout_event_->creation_time_, tv);
- correlation_->correlation_module_->push (this, timeout_event_, __env);
- if (__env.exception () != 0)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Rep_Timeout::execute: unexpected exception.\n"));
- }
-}
-
-// ************************************************************
-
-ACE_ES_Subscription_Module::ACE_ES_Subscription_Module (ACE_EventChannel *channel)
- : channel_ (channel),
- up_ (0),
- down_ (0)
-{
-}
-
-void
-ACE_ES_Subscription_Module::open (ACE_ES_Correlation_Module *up,
- ACE_ES_Supplier_Module *down)
-{
- // Brilliant.
- up_ = up;
- down_ = down;
-}
-
-ACE_ES_Subscription_Module::~ACE_ES_Subscription_Module (void)
-{
-}
-
-// When a supplier connects, we step through each of its
-// publications. For each event type published, we allocate a set in
-// the suppliers type collection. Then we build a subscribers list
-// starting with any consumers having a type-based subscription in the
-// global type collection.
-void
-ACE_ES_Subscription_Module::connected (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &_env)
-{
- RtecEventComm::EventSourceID sid = 0;
- // We will record the source_id for later usage.
- {
- ACE_ES_WGUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR);
-
- if (all_suppliers_.insert (supplier) == -1)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Subscription_Module insert failed.\n"));
-
- // For every type that this supplier generates, bind a new
- // Type_Subscribers to the type in the supplier proxy's type
- // collection.
- RtecEventChannelAdmin::PublicationSet &publications = supplier->qos ().publications_;
-
- sid = publications[0].event_.source_;
- for (CORBA::ULong index=0; index < publications.length (); index++)
- {
- // Check to make sure an RT_Info was specified.
-#if 0
- // @@ TODO: We should check if rt_info is a valid handle_t.
- if (publications[index].dependency_info_.rt_info.value() == 0)
- {
- ACE_ERROR ((LM_ERROR, "Found a SupplierQOS::dependency_info_.rt_info_ == 0\n"));
- continue;
- }
-#endif
-
- RtecEventComm::EventType &event_type =
- publications[index].event_.type_;
-
- // Check to make sure a type was specified.
- if (event_type == ACE_ES_EVENT_ANY)
- {
- ACE_ERROR ((LM_ERROR, "ACE_ES_Subscription_Module::connected: "
- "source is publishing ACE_ES_EVENT_ANY.\n"));
- continue;
- }
-
- // Make a new set for the proxy. Include the dependency
- // info describing the RT_Method that generates this event.
- // This object will hold all the consumers that subscribe to
- // this publication.
- ACE_ES_Subscription_Info::Type_Subscribers *new_subscribers =
- new ACE_ES_Subscription_Info::Type_Subscribers (&(publications[index].dependency_info_));
-
- if (new_subscribers == 0)
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ES_Subscription_Module::connected"));
- return;
- }
-
- // Check the global type collection for consumers that register
- // before suppliers.
- ACE_ES_Subscription_Info::Type_Subscribers *existing_subscribers;
- if (type_subscribers_.find (event_type, existing_subscribers) == 0)
- {
- // Iterate through existing subscribers.
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (existing_subscribers->consumers_);
-
- for (ACE_ES_Consumer_Rep **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- // Each existing subscriber will get appended to the
- // new subscribers list. Dependencies are updated.
-
- // @@ TODO: Handle exceptions.
- ACE_Scheduler_Factory::server()->add_dependency
- ((*proxy)->dependency()->rt_info,
- new_subscribers->dependency_info_->rt_info,
- new_subscribers->dependency_info_->number_of_calls,
- _env);
- if (_env.exception () != 0)
- return;
- // @@ TODO use the TAO_TRY macros.
-
- if (new_subscribers->consumers_.insert (*proxy) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "%p: add_dependency/insert failed.\n",
- "ACE_ES_Subscription_Module::connected"));
- continue;
- }
- }
- }
-
- // Put the new subscribers for this event type in the supplier
- // proxy's type map.
- if (supplier->subscription_info ().type_subscribers_.
- bind (event_type, new_subscribers) != 0)
- {
- // This may occur with a double bind, I think.
- ACE_ERROR ((LM_ERROR, "%p can't initialize type.\n",
- "ACE_ES_Subscription_Module::connected"));
- delete new_subscribers;
- continue;
- }
- }
- } // release lock
-
- // Reregister any consumers that tried to subscribe before this
- // supplier connected.
- // NOTE: We used to call back the supplier here (using
- // supplier->source_id()), this is ineffective and leads to all kind
- // of dead-locks (the supplier is blocked and waiting for us).
- // We use the information on the publications to get the source_id.
- this->reregister_consumers (sid);
-}
-
-// Step through each of the source_subscribers looking for consumers
-// that registered for <source> before <source> connected.
-void
-ACE_ES_Subscription_Module::reregister_consumers (RtecEventComm::EventSourceID source_id)
-{
- ACE_ES_Subscription_Info::Subscriber_Set *subscribers = 0;
- if (source_subscribers_.find (source_id, subscribers) == -1)
- // Not found.
- return;
-
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (*subscribers);
-
- // Try to reregister all consumers.
- for (ACE_ES_Consumer_Rep **consumer = 0;
- iter.next (consumer) != 0;
- iter.advance ())
- if (this->subscribe (*consumer) == -1)
- ACE_ERROR ((LM_ERROR, "%p.\n" "ACE_ES_Subscription_Module::reregister_consumers"));
-}
-
-
-void
-ACE_ES_Subscription_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &_env)
-{
- ACE_ES_WGUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR);
-
- if (all_suppliers_.remove (supplier) == -1)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR);
-
- // Remove all consumers from the supplier's source-based subscription lists.
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator source_iterator
- (supplier->subscription_info ().source_subscribers_);
-
- for (ACE_ES_Consumer_Rep **consumer;
- source_iterator.next (consumer) != 0;
- source_iterator.advance ())
- (*consumer)->_release ();
-
- // Get the subscriber list for each type.
- ACE_ES_Subscription_Info::Subscriber_Map_Iterator type_map_iterator
- (supplier->subscription_info ().type_subscribers_);
-
- for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *entry;
- type_map_iterator.next (entry) != 0;
- type_map_iterator.advance ())
- {
- // Remove all consumers from the supplier's source-based subscription lists.
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator type_iterator
- (entry->int_id_->consumers_);
-
- for (ACE_ES_Consumer_Rep **c;
- type_iterator.next (c) != 0;
- type_iterator.advance ())
- (*c)->_release ();
- }
-}
-
-int
-ACE_ES_Subscription_Module::subscribe_all (ACE_ES_Consumer_Rep *)
-{
- ACE_ERROR_RETURN ((LM_ERROR, "Consumer tried to register for all"
- "events! This is not implemented.\n"), -1);
-}
-
-int
-ACE_ES_Subscription_Module::subscribe_source (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source)
-{
- // Step through all Supplier Proxies looking for a match to
- // -supplier-. Add the -consumer- to the correct supplier proxy.
- Supplier_Iterator iter (all_suppliers_);
-
- int success = -1;
-
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- // Operator == checks if <proxy> is a proxy for <supplier>.
- if ((**proxy) == source)
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
-
- ACE_ES_Subscription_Info::Subscriber_Set &set =
- (*proxy)->subscription_info ().source_subscribers_;
-
- // Insert the consumer to the supplier's subscription set for
- // the type.
- int insert_result = set.insert (consumer);
- switch (insert_result)
- {
- case -1:
- // Error.
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "Subscription Module::subscribe_source"), -1);
- case 0:
- default:
- {
- // Increment the consumer rep's reference count.
- consumer->_duplicate ();
- // Success.
- // Add each of the supplier's dependency infos to the
- // consumer's dependency list.
- ACE_ES_Subscription_Info::Subscriber_Map_Iterator iter2
- ((*proxy)->subscription_info ().type_subscribers_);
-
- // Delete all type collections.
- for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *temp = 0;
- iter2.next (temp) != 0;
- iter2.advance ())
- {
- TAO_TRY
- {
- ACE_Scheduler_Factory::server()->add_dependency
- (consumer->dependency()->rt_info,
- temp->int_id_->dependency_info_->rt_info,
- temp->int_id_->dependency_info_->number_of_calls,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("error adding dependency");
- return -1;
- }
- TAO_ENDTRY;
- }
- }
-
- case 1:
- // Already there.
- success = 0;
- break;
- }
- }
- }
-
- // Add the consumer to the global source subscribers list.
- if (success == -1)
- return ACE_ES_Subscription_Info::insert_or_allocate (source_subscribers_,
- consumer,
- source);
- else
- return success;
-}
-
-// Step through all Supplier Proxies. For each proxy, if it generates
-// <type>, add <consumer> to its subscription info.
-int
-ACE_ES_Subscription_Module::subscribe_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type)
-{
- // First insert <consumer> into the global type collection set
- // corresponding to <type>. The type collection will only be used
- // when suppliers register late.
- if (ACE_ES_Subscription_Info::insert_or_allocate (type_subscribers_,
- consumer, type) == -1)
- return -1;
-
- consumer->_duplicate ();
-
- Supplier_Iterator iter (all_suppliers_);
-
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
- // Insert the consumer to the supplier's subscription set for
- // the type. If the supplier does not publish this type, the
- // operation will fail. If this succeeds, dependency_info will
- // be added to the consumer.
- RtecScheduler::Dependency_Info *dependency_info;
- if (ACE_ES_Subscription_Info::insert_or_fail
- ((*proxy)->subscription_info ().type_subscribers_,
- consumer, type, dependency_info) == 0)
- {
- consumer->_duplicate ();
- // Success. Add the supplier dependency info to the
- // consumer's dependency list.
- // @@ TODO handle exceptions.
- TAO_TRY
- {
- ACE_Scheduler_Factory::server()->add_dependency
- (consumer->dependency ()->rt_info,
- dependency_info->rt_info,
- dependency_info->number_of_calls,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "Subscription_Module::subscribe_type:"
- " add_dependency failed.\n"));
- return -1;
- }
- TAO_ENDTRY;
- }
- }
-
- return 0;
-}
-
-int
-ACE_ES_Subscription_Module::subscribe_source_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source,
- RtecEventComm::EventType type)
-{
- // Step through all Supplier Proxies looking for a match to
- // <supplier>. Once we find one, find the correct set for the
- // specified type. Add the <consumer> to that set.
- Supplier_Iterator iter (all_suppliers_);
-
- int success = -1;
-
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
-
- if ((**proxy) == source)
- {
- // Insert the consumer to the supplier's subscription set for
- // the type.
- RtecScheduler::Dependency_Info *dependency_info;
- int insert_result = ACE_ES_Subscription_Info::insert_or_fail
- ((*proxy)->subscription_info().type_subscribers_,
- consumer, type, dependency_info);
-
- switch (insert_result)
- {
- case -1:
- // Error.
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "Subscription Module::subscribe_source_type"), -1);
- case 0:
- default:
- {
- // Success.
- // Add the supplier to the consumer's dependency list.
- // @@ TODO handle exceptions.
- TAO_TRY
- {
- ACE_Scheduler_Factory::server()->add_dependency
- (consumer->dependency ()->rt_info,
- dependency_info->rt_info,
- dependency_info->number_of_calls,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "Subscription_Module::subscribe_source_type:"
- " add_dependency failed.\n"),
- -1);
- }
- TAO_ENDTRY;
- consumer->_duplicate ();
- }
- /* FALLTHROUGH */
- case 1:
- success = 0;
-
- // Already there.
- break;
- }
-
- }
- }
-
- if (success == -1)
- // If we failed to find a source, insert this consumer in the
- // global source subscriber list.
- {
- if (ACE_ES_Subscription_Info::insert_or_allocate (source_subscribers_,
- consumer,
- source) == 0)
- {
- consumer->_duplicate ();
- return 0;
- }
- else
- return -1;
- }
- else
- return success;
-}
-
-// <consumer> contains information for one type of subscription.
-// Delegate to the appropriate method for subscription.
-int
-ACE_ES_Subscription_Module::subscribe (ACE_ES_Consumer_Rep *consumer)
-{
- // We could have finer granularity by putting RGUARDs in some of the
- // subscribe methods.
- ACE_ES_WGUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Subscription_Module::subscribe"), -1);
-
- int result = 0;
- RtecEventComm::Event &event = consumer->dependency ()->event_;
-
- if (event.source_ == 0)
- // Not source-based subscription.
- {
- if (event.type_ == ACE_ES_EVENT_ANY)
- result = this->subscribe_all (consumer);
- else
- result = this->subscribe_type (consumer, event.type_);
- }
- else
- // Source-based subscription.
- {
- if (event.type_ == ACE_ES_EVENT_ANY)
- result = this->subscribe_source (consumer, event.source_);
- else
- result = this->subscribe_source_type (consumer,
- event.source_,
- event.type_);
- }
-
- return result;
-}
-
-int
-ACE_ES_Subscription_Module::unsubscribe (ACE_ES_Consumer_Rep *consumer)
-{
- // We could have finer granularity by putting RGUARDs in some of the
- // unsubscribe methods.
- ACE_ES_WGUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Subscription_Module::unsubscribe"), -1);
-
- RtecEventComm::Event &event = consumer->dependency ()->event_;
-
- if (event.type_ != ACE_ES_EVENT_ANY)
- {
- // Remove the consumer from the global type-based subscription list.
- if (ACE_ES_Subscription_Info::remove (type_subscribers_,
- consumer,
- event.type_) == 0)
- consumer->_release ();
- }
- else
- // Remove the consumer from the global source-based subscription list.
- if (ACE_ES_Subscription_Info::remove (source_subscribers_,
- consumer,
- event.source_) == 0)
- consumer->_release ();
-
- return 0;
-
- /*
-
- This old code manually removed the consumer from the subscription
- lists. Now we do lazy removal.
-
- int result = 0;
-
- if (CORBA::is_nil (event.source_))
- {
- if (event.type_ == ACE_ES_EVENT_ANY)
- result = this->unsubscribe_all (consumer);
- else
- result = this->unsubscribe_type (consumer, event.type_);
- }
- else
- {
- if (event.type_ == ACE_ES_EVENT_ANY)
- result = this->unsubscribe_source (consumer, event.source_);
- else
- result = this->unsubscribe_source_type (consumer, event.source_, event.type_);
- }
- return result;
- */
-}
-
-int
-ACE_ES_Subscription_Module::unsubscribe_all (ACE_ES_Consumer_Rep *)
-{
- return 0;
-}
-
-int
-ACE_ES_Subscription_Module::unsubscribe_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type)
-{
- // Step through all Supplier Proxies trying to remove the
- // consumer-type pair. ACE_ES_Subscription_Info::remove will fail
- // if the supplier does not generate <type>, but that's ok.
- Supplier_Iterator iter (all_suppliers_);
-
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
-
- // This remove will be harmless if the supplier does not
- // generate <type>.
- ACE_ES_Subscription_Info::remove ((*proxy)->subscription_info ().type_subscribers_,
- consumer, type);
- }
-
- return 0;
-}
-
-int
-ACE_ES_Subscription_Module::unsubscribe_source (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source)
-{
- Supplier_Iterator iter (all_suppliers_);
-
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
-
- if ((**proxy) == source)
- {
- ACE_ES_Subscription_Info::Subscriber_Set &set =
- (*proxy)->subscription_info ().source_subscribers_;
- if (set.remove (consumer) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "Subscription Module::unsubscribe_source"), -1);
- }
- }
-
- return 0;
-}
-
-int
-ACE_ES_Subscription_Module::unsubscribe_source_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source,
- RtecEventComm::EventType type)
-
-{
- Supplier_Iterator iter (all_suppliers_);
-
- // Step through all supplier proxies looking for a match to the
- // consumer's event.source_. This is the same as unsubscribe_type,
- // only we can check the source first.
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- // If the proxy matches the source id we're looking for, try to
- // remove <consumer> from the proxy's <event.type_> set.
- if ((**proxy) == source)
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
-
- // Continue in spite of errors.
- ACE_ES_Subscription_Info::remove ((*proxy)->subscription_info ().type_subscribers_,
- consumer, type);
- }
-
- return 0;
-}
-
-void
-ACE_ES_Subscription_Module::push (ACE_Push_Supplier_Proxy *source,
- ACE_ES_Event_Container *event,
- CORBA::Environment &)
-{
- ACE_TIMEPROBE (" deliver to Subscription Module");
- // These are all inline function calls.
- if (this->push_source (source, event) == -1)
- return;
-
- ACE_TIMEPROBE (" begin push_source_type");
-
- if (this->push_source_type (source, event) == -1)
- return;
-
- ACE_TIMEPROBE (" end push_source_type");
-}
-
-void
-ACE_ES_Subscription_Module::shutdown (void)
-{
- ACE_ES_WGUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR ((LM_ERROR, "%p.\n",
- "ACE_ES_Subscription_Module::unsubscribe"));
-
- // Remove all type_subscribers_ and source_subscribers_.
-
- ACE_ES_Subscription_Info::Subscriber_Map_Iterator type_iter (type_subscribers_);
- for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *entry;
- type_iter.next (entry) != 0;
- type_iter.advance ())
- {
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator ts_iter (entry->int_id_->consumers_);
-
- for (ACE_ES_Consumer_Rep **consumer = 0;
- ts_iter.next (consumer) != 0;
- ts_iter.advance ())
- (*consumer)->_release ();
-
- delete entry->int_id_;
- }
-
- ACE_ES_Subscription_Info::SourceID_Map_Iterator source_iter (source_subscribers_);
-
- for (ACE_ES_Subscription_Info::SourceID_Map_Entry *entry2;
- source_iter.next (entry2) != 0;
- source_iter.advance ())
- {
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator ss_iter (*entry2->int_id_);
-
- for (ACE_ES_Consumer_Rep **consumer = 0;
- ss_iter.next (consumer) != 0;
- ss_iter.advance ())
- (*consumer)->_release ();
-
- delete entry2->int_id_;
- }
-
- // We don't need to do anything to all_suppliers_ since the supplier
- // module should have disconnected all suppliers. To be more
- // independent from the supplier module, this method should iterate
- // through all suppliers and call this->disconnecting.
- up_->shutdown ();
-}
-
-// ************************************************************
-
-ACE_ES_Supplier_Module::ACE_ES_Supplier_Module (ACE_EventChannel *channel) :
- all_suppliers_ (),
- lock_ (),
- up_ (0),
- channel_ (channel)
-{
-}
-
-void
-ACE_ES_Supplier_Module::open (ACE_ES_Subscription_Module *up)
-{
- // There is the theory of the Mobius, a twist, in the fabric of
- // space, where time becomes a loop, where time becomes a loop.
- up_ = up;
-}
-
-void
-ACE_ES_Supplier_Module::connected (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &_env)
-{
- channel_->report_connect (ACE_EventChannel::SUPPLIER);
- up_->connected (supplier, _env);
-}
-
-void
-ACE_ES_Supplier_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &_env)
-{
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR);
-
- if (all_suppliers_.remove (supplier) == -1)
- TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR);
-
- up_->disconnecting (supplier, _env);
-
- if (all_suppliers_.size () <= 0)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) No more suppliers connected.\n"));
- channel_->report_disconnect (ACE_EventChannel::SUPPLIER);
- }
-
- // IMHO this release is broken: supplier is a parameter, we never
- // actually increased its reference count, so we shouldn't decrease
- // it.
- // CORBA::release (supplier);
-}
-
-void
-ACE_ES_Supplier_Module::shutdown (void)
-{
- Suppliers copy;
-
- {
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- return;
-
- copy = all_suppliers_;
- }
-
- if (copy.size () > 0)
- {
- Supplier_Iterator iter (copy);
-
- CORBA::Environment env;
-
- for (ACE_Push_Supplier_Proxy **proxy = 0;
- iter.next (proxy) != 0;
- iter.advance ())
- {
- (*proxy)->shutdown ();
- this->disconnecting (*proxy, env);
- }
- }
-
- up_->shutdown ();
-}
-
-RtecEventChannelAdmin::ProxyPushConsumer_ptr
-ACE_ES_Supplier_Module::obtain_push_consumer (CORBA::Environment &_env)
-{
- ACE_Push_Supplier_Proxy *new_supplier = new ACE_Push_Supplier_Proxy (this);
-
- if (new_supplier == 0)
- TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0);
-
- {
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- {
- delete new_supplier;
- TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, 0);
- }
-
- if (all_suppliers_.insert (new_supplier) == -1)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Supplier_Module insert failed.\n"));
- }
-
- return new_supplier->get_ref ();
-}
-
-void
-ACE_ES_Supplier_Module::push (ACE_Push_Supplier_Proxy *proxy,
- const RtecEventComm::EventSet &event,
- CORBA::Environment &_env)
-{
- TAO_TRY
- {
- for (CORBA::ULong i = 0; i < event.length(); ++i)
- {
- ACE_ES_Event_Container *temp =
- new ACE_ES_Event_Container (event[i]);
- //RtecEventComm::Event *temp = new RtecEventComm::Event (event);
-
- if (temp == 0)
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- // This will guarantee that release gets called when we exit
- // the scope.
- ACE_ES_Event_Container_var event_copy (temp);
- temp->_release ();
- ACE_TIMEPROBE (" deliver to Supplier Module (thru Supplier Proxy)");
- up_->push (proxy, event_copy, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCH (RtecEventChannelAdmin::TypeError, t)
- {
- ACE_ERROR ((LM_ERROR, "%p Type Error.\n",
- "ACE_ES_Supplier_Module::push"));
- TAO_RETHROW;
- }
- TAO_CATCH (CORBA::NO_MEMORY, e)
- {
- ACE_ERROR ((LM_ERROR, "%p No Memory.\n",
- "ACE_ES_Supplier_Module::push"));
- TAO_RETHROW;
- }
- TAO_CATCH (CORBA::SystemException, e)
- {
- ACE_ERROR ((LM_ERROR, "%p CORBA System Exception.\n",
- "ACE_ES_Supplier_Module::push"));
- TAO_RETHROW;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "ACE_ES_Supplier_Module::push: "
- "Unknown exception.\n"));
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
-
-// ************************************************************
-
-ACE_ES_Priority_Timer::ACE_ES_Priority_Timer (void)
-{
-}
-
-int
-ACE_ES_Priority_Timer::connected (RtecScheduler::handle_t rt_info)
-{
- RtecScheduler::OS_Priority thread_priority;
- RtecScheduler::Sub_Priority subpriority;
- RtecScheduler::Preemption_Priority preemption_priority;
-
- TAO_TRY
- {
- ACE_TIMEPROBE (" connected - priority requested");
- ACE_Scheduler_Factory::server ()->priority
- (rt_info, thread_priority,
- subpriority, preemption_priority, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- ACE_TIMEPROBE (" connected - priority obtained");
-#if 0
- ACE_ERROR_RETURN ((LM_ERROR, "%p RtecScheduler::Scheduler::priority failed.\n",
- "ACE_ES_Priority_Timer::connected"), -1);
-#endif /* 0 */
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p RtecScheduler::Scheduler::priority failed.\n",
- "ACE_ES_Priority_Timer::connected"), -1);
- }
- TAO_ENDTRY;
-
- // Just make sure the ORB allocates resources for this priority.
- if (ACE_Task_Manager::instance()->GetReactorTask (preemption_priority) == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "ACE_ES_Priority_Timer::connected"), -1);
-
- return 0;
-}
-
-int
-ACE_ES_Priority_Timer::handle_timeout (const ACE_Time_Value &,
- const void *vp)
-{
- ACE_ES_Timer_ACT *act = (ACE_ES_Timer_ACT *) vp;
-
- if (act == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Priority_Timer::handle_timeout: "
- "received act == 0!!!.\n"), 0);
-
- ACE_TIMEPROBE ("ES_Priority_Queue - start execute");
-
- act->execute ();
-
- ACE_TIMEPROBE ("ES_Priority_Queue - end execute");
-
- return 0;
-}
-
-// ************************************************************
-
-const char *
-ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos)
-{
- // The first dependency should designate a correlation group.
-
- TAO_TRY
- {
- ACE_TIMEPROBE (" Consumer_Name - priority requested");
- RtecScheduler::RT_Info* rt_info = ACE_Scheduler_Factory::server ()->get
- (qos.dependencies[1].rt_info, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- ACE_TIMEPROBE (" Consumer_Name - priority obtained");
-
- return rt_info->entry_point;
- }
- TAO_CATCHANY
- {
- return "no-name";
- }
- TAO_ENDTRY;
- return "no-name";
-}
-
-// ************************************************************
-
-void
-dump_event (const RtecEventComm::Event &event)
-{
- ACE_DEBUG ((LM_DEBUG, "source_ = %d "
- "type_ = %d "
- "time_ = %u.\n",
- (void*)event.source_,
- event.type_,
- // The divide-by-1 is for ACE_U_LongLong support.
- ORBSVCS_Time::to_hrtime (event.creation_time_) / 1));
-}
-
-// ************************************************************
-
-#if defined(ACE_ES_LACKS_ORB)
-void
-dump_sequence (const ACE_CORBA_Sequence<ACE_ES_Event> &seq)
-{
- for (CORBA::ULong index=0; index < seq.length (); index++)
- ::dump_event (seq[index]);
-}
-#endif /* ACE_ES_LACKS_ORB */
-
-// ************************************************************
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Atomic_Op<ACE_ES_MUTEX, int>;
-template class ACE_Map_Entry<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT>;
-template class ACE_Map_Entry<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT>;
-template class ACE_Map_Manager<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Manager<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>;
-template class ACE_Node<ACE_ES_Consumer_Rep *>;
-template class ACE_Node<ACE_Push_Consumer_Proxy *>;
-template class ACE_Node<ACE_Push_Supplier_Proxy *>;
-template class ACE_Unbounded_Set<ACE_ES_Consumer_Rep *>;
-template class ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *>;
-template class ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *>;
-template class ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *>;
-template class ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *>;
-template class ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *>;
-
-// For ACE_ES_Event_Container_Allocator.
-template class ACE_Cached_Allocator<ACE_ES_Event_Container_Chunk, ACE_Null_Mutex>;
-template class ACE_Cached_Allocator<ACE_ES_Dispatch_Request_Chunk, ACE_Null_Mutex>;
-template class ACE_Cached_Mem_Pool_Node<ACE_ES_Event_Container_Chunk>;
-template class ACE_Cached_Mem_Pool_Node<ACE_ES_Dispatch_Request_Chunk>;
-template class ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Event_Container_Chunk>, ACE_Null_Mutex>;
-template class ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Dispatch_Request_Chunk>, ACE_Null_Mutex>;
-template class ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Event_Container_Chunk> >;
-template class ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Dispatch_Request_Chunk> >;
-
-template class ACE_ES_Array_Iterator<ACE_ES_Consumer_Rep *>;
-template class ACE_ES_Simple_Array<ACE_ES_Consumer_Rep *, 100>;
-
-template class ACE_CORBA_var<ACE_ES_Event_Container>;
-
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Atomic_Op<ACE_ES_MUTEX, int>
-#pragma instantiate ACE_Map_Entry<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT>
-#pragma instantiate ACE_Map_Entry<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT>
-#pragma instantiate ACE_Map_Manager<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Manager<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>
-#pragma instantiate ACE_Node<ACE_ES_Consumer_Rep *>
-#pragma instantiate ACE_Node<ACE_Push_Consumer_Proxy *>
-#pragma instantiate ACE_Node<ACE_Push_Supplier_Proxy *>
-#pragma instantiate ACE_Unbounded_Set<ACE_ES_Consumer_Rep *>
-#pragma instantiate ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *>
-#pragma instantiate ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *>
-#pragma instantiate ACE_Cached_Allocator<ACE_ES_Event_Container_Chunk, ACE_Null_Mutex>
-#pragma instantiate ACE_Cached_Allocator<ACE_ES_Dispatch_Request_Chunk, ACE_Null_Mutex>
-#pragma instantiate ACE_Cached_Mem_Pool_Node<ACE_ES_Event_Container_Chunk>
-#pragma instantiate ACE_Cached_Mem_Pool_Node<ACE_ES_Dispatch_Request_Chunk>
-#pragma instantiate ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Event_Container_Chunk>, ACE_Null_Mutex>
-#pragma instantiate ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Dispatch_Request_Chunk>, ACE_Null_Mutex>
-#pragma instantiate ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Event_Container_Chunk> >
-#pragma instantiate ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_ES_Dispatch_Request_Chunk> >
-#pragma instantiate ACE_ES_Array_Iterator<ACE_ES_Consumer_Rep *>
-#pragma instantiate ACE_ES_Simple_Array<ACE_ES_Consumer_Rep *, 100>
-#pragma instantiate ACE_CORBA_var<ACE_ES_Event_Container>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
deleted file mode 100644
index 9e2e458a01a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
+++ /dev/null
@@ -1,1305 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ace ORB
-//
-// = FILENAME
-// Event_Channel
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// TAO implementation of the Real Time Event Services. For more
-// detailed information, see
-// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
-//
-// = NAMING CONVENTIONS
-// Some of the naming might be confusing. For instance
-// ACE_Push_Consumer_Proxy "is-a" ProxyPushSupplier. To the
-// channel, ACE_Push_Consumer_Proxy is a proxy to push consumers.
-// To a push consumer, ACE_Push_Consumer_Proxy is a proxy to push
-// suppliers. I chose to name classes relative to the Event
-// Channel.
-//
-// ============================================================================
-
-#ifndef ACE_EVENT_CHANNEL_H
-#define ACE_EVENT_CHANNEL_H
-
-#include "ace/Containers.h"
-#include "ace/Map_Manager.h"
-
-#include "tao/Timeprobe.h"
-#include "Local_ESTypes.h"
-#include "CORBA_Utils_T.h"
-#include "Task_Manager.h"
-#include "ReactorTask.h"
-
-//ACE_INLINE void operator += (ACE_CORBA_Sequence<RtecEventComm::Event_var> &dest,
-// RtecEventComm::Event *item);
-
-ACE_INLINE int operator == (const RtecEventComm::Event &event1,
- const RtecEventComm::Event &event2);
-// This operation could be part of the classes, but in order to stay
-// CORBA compliant, we're adding them as global operators.
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Event_Container : public RtecEventComm_Event
-// = TITLE
-// Event Container
-//
-// = DESCRIPTION
-// Basically an ACE_ES_Event with reference counting and
-// thread-specific memory allocation.
-{
-public:
- ACE_ES_Event_Container (void);
- // Default construction.
-
- ~ACE_ES_Event_Container (void);
- // Destruction.
-
- ACE_ES_Event_Container (const ACE_ES_Event_Container &);
- // Copy construction.
-
- ACE_ES_Event_Container (const RtecEventComm::Event &);
- // Construction with an event.
-
- ACE_ES_Event_Container *_duplicate (void);
- // Increments ref_count_ and returns this.
-
- void _release (void);
- // Decrements ref_count_ and deletes if 0.
-
- int operator== (const ACE_ES_Event_Container &event);
- // Returns 1 if the two are "equal," 0 otherwise. Determines
- // equality using source_ and type_ only. A 0 source_ is a wildcard
- // (always equal). A type_ of ACE_ES_EVENT_ANY is also a wildcard.
-
- void *operator new (size_t nbytes);
- // Allocates memory from a thread-specific memory pool.
-
- void operator delete (void *);
- // Returns memory to a thread-specific memory pool.
-
- void dump (void);
-
-private:
- int ref_count_;
-};
-
-typedef ACE_CORBA_var<ACE_ES_Event_Container> ACE_ES_Event_Container_var;
-
-ACE_INLINE void operator += (ACE_CORBA_Sequence<ACE_ES_Event_Container_var> &dest,
- ACE_ES_Event_Container *item);
-
-#if defined(ACE_ES_LACKS_ORB)
-// Utility for debugging sequences.
-ACE_Svc_Export void dump_sequence (const ACE_CORBA_Sequence<RtecEventComm::Event> &seq);
-#endif /* ACE_ES_LACKS_ORB */
-
-// Utility for debugging events.
-void TAO_ORBSVCS_Export dump_event (const RtecEventComm::Event &event);
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_RTU_Manager
-// = TITLE
-// ACE RTU Manager
-//
-// = DESCRIPTION
-{
-public:
- ACE_RTU_Manager (int active);
- // If <active> == 0, everything returns 0. If <active> != 0, RTUs
- // galore.
-
- int should_preempt (void);
- // Returns 1 if the current task should preempt itself. Otherwise,
- // returns 0. Resets should_preempt to zero.
-
- void should_preempt (int s);
- // Called by the dispatching module when the current task should
- // preempt itself.
-
- void not_done (int nd);
- // If <nd> != 0, the current running task will be enqueued at the
- // head of its dispatch tail.
-
- int not_done (void);
- // Returns 1 if the current task needs to be dispatched again.
- // Resets not_done_ to 0;
-
- // = Get/set the priority of the current running task.
- RtecScheduler::OS_Priority priority (void);
- void priority (RtecScheduler::OS_Priority priority);
-
-private:
- int active_;
- int should_preempt_;
- int not_done_;
- RtecScheduler::OS_Priority priority_;
-};
-
-// ************************************************************
-
-// Chesire cat.
-class ACE_ES_Priority_Timer;
-// Forward declarations.
-class ACE_ES_Consumer_Module;
-class ACE_ES_Correlation_Module;
-class ACE_ES_Subscription_Module;
-class ACE_ES_Supplier_Module;
-// This forward decl and typedef allow us to remove inheritence later
-// on without changing any code.
-class ACE_ES_Dispatching_Base;
-typedef ACE_ES_Dispatching_Base ACE_ES_Dispatching_Module;
-
-// ec..
-class TAO_ORBSVCS_Export ACE_EventChannel : public RtecEventChannelAdmin_EventChannelBOAImpl
-// = TITLE
-// ACE Event Channel.
-//
-// = DESCRIPTION
-// Implementation of COSS Event Channel. For more detailed
-// information, see http://www.cs.wustl.edu/~mda/event.html.
-{
-public:
- enum { INITIAL_STATE = 0,
- CONSUMER = 1, SUPPLIER = 2,
- SHUTDOWN = CONSUMER | SUPPLIER };
-
- ACE_EventChannel (u_long type = ACE_DEFAULT_EVENT_CHANNEL_TYPE);
- // Construction of the given <type>. Check the **_CHANNEL
- // enumerations defined below.
-
- virtual ~ACE_EventChannel (void);
- // Calls destroy.
-
- // = Accessor methods to Event Channel objects. The Event Channel
- // acts as a sort of service repository of object references. All
- // objects in the Event Service come to this interface to obtain
- // object references during initialization.
-
- virtual RtecEventChannelAdmin::ConsumerAdmin_ptr for_consumers (CORBA::Environment &);
- // Consumer administration factory method.
-
- virtual RtecEventChannelAdmin::SupplierAdmin_ptr for_suppliers (CORBA::Environment &);
- // Supplier administration factory method.
-
- virtual void destroy (CORBA::Environment &);
- // Explicitly shut down the channel.
-
- RtecEventChannelAdmin::EventChannel_ptr get_ref (void);
- // Allow transformations to RtecEventChannelAdmin::EventChannel.
-
- ACE_RTU_Manager *rtu_manager (void);
- // Returns a reference to the RTU manager.
-
- ACE_ES_Priority_Timer *timer (void);
- // Timer accessor.
-
- // = These should be private.
- ACE_ES_Consumer_Module *consumer_module_;
- ACE_ES_Dispatching_Module *dispatching_module_;
- ACE_ES_Correlation_Module *correlation_module_;
- ACE_ES_Subscription_Module *subscription_module_;
- ACE_ES_Supplier_Module *supplier_module_;
-
- ACE_ES_Priority_Timer *timer_;
-
- void report_connect (u_long);
- // Consumer or supplier connected.
-
- void report_disconnect (u_long);
- // Consumer or supplier disconnected.
-
- void shutdown (void);
- // Do not call this. The last module has shut down.
-
-private:
- ACE_RTU_Manager *rtu_manager_;
- // The RTU manager dude!
-
- u_long type_;
- // Can be any **_CHANNEL. (well, except NO_CHANNEL).
-
- u_long state_;
- // Can be INITIAL_STATE, NO_CONSUMERS, NO_SUPPLIERS, or SHUTDOWN.
-
- ACE_ES_MUTEX lock_;
- // Used to lock shared state.
-
- int destroyed_;
- // Ensures this->destory is executed only once.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Dependency_Iterator
-// = TITLE
-// ConsumerQOS Iterator
-//
-// = DESCRIPTION
-// This is used by the Event Channel to parse ConsumerDependency objects.
-{
-public:
- ACE_ES_Dependency_Iterator (RtecEventChannelAdmin::DependencySet &rep);
- // Construct and iterator for <rep>.
-
- int advance_dependency (void);
- // Returns 0 if the advance succeeded. Returns -1 if there are no
- // more dependencies in the group.
-
- int parse (void);
- // Cache values for n_** methods.
-
- int n_conjunctions (void);
- // Returns the number of conjunction groups in the dependency set.
-
- int n_disjunctions (void);
- // Returns the number of disjunction groups in the dependency set.
-
- int n_timeouts (void);
- // Returns the number of timeouts registered.
-
- int n_events (void);
- // Returns the number of events registered.
-
- RtecEventChannelAdmin::Dependency &operator *(void);
- // Accessor to the current ConsumerDependency pointed to by the
- // iterator.
-
- RtecScheduler::handle_t first_rt_info (void);
- // Returns the first RT_Info in the dependencies.
-
-protected:
- RtecScheduler::handle_t rt_info_;
- // The first rt_info in the dependencies.
-
- RtecEventChannelAdmin::DependencySet &rep_;
- // Reference to the dependency array.
-
- int index_;
- // Index into rep_.
-
- RtecEventComm::EventType group_type_;
- // The type of the current correlation group.
-
- int n_conjunctions_;
- // Number of conjunction groups.
-
- int n_disjunctions_;
- // Number of disjunction groups.
-
- int n_timeouts_;
- // Number of timeouts registered.
-
- int n_events_;
- // Number of events registered.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Timer_ACT
-// = TITLE
-// Timer Asynchronous Completion Token
-//
-// = DESCRIPTION
-// Implements Command pattern with timers.
-{
-public:
- virtual void execute (void) = 0;
-};
-
-// ************************************************************
-// Forward decl.
-class ACE_ES_Consumer_Rep_Timeout;
-
-class TAO_ORBSVCS_Export ACE_ES_Disjunction_Group
-// = TITLE
-// Disjunction Group
-//
-// = DESCRIPTION
-// Represents a disjunction group, such as (A|B|C).
-{
-public:
- ACE_ES_Disjunction_Group (void);
- // Default construction.
-
- virtual ~ACE_ES_Disjunction_Group (void);
- // Destructor.
-
- void set_correlation_module (ACE_ES_Correlation_Module *cm);
- // <cm> is needed for rescheduling deadlines.
-
- void reschedule_deadline (void);
- // If deadline_timer_rep_ is set, it is cancelled and rescheduled.
-
- int set_deadline_timeout (ACE_ES_Consumer_Rep_Timeout *cr);
- // Set the group's reference to the deadline timer. Returns 0 on
- // success, -1 on failure.
-
- typedef ACE_CORBA_Sequence<ACE_ES_Event_Container_var> Event_Set;
-
- virtual void add_events (Event_Set *outbox,
- Event_Set *pending_events,
- u_long &pending_flags);
- // Does nothing. This is the only virtual method in this little
- // heirarchy with the conjunction group.
-
- void set_act (RtecEventComm::Event &act);
- // Set the ACT for this group.
-
-protected:
- ACE_ES_Event_Container_var act_;
- // To be sent with this group.
-
-private:
- ACE_ES_Consumer_Rep_Timeout *deadline_timer_rep_;
- // The disjunction group keeps a reference to the deadline timer.
-
- ACE_ES_Correlation_Module *correlation_module_;
- // Used for cancelling and scheduling deadline_timer_rep_.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Conjunction_Group : public ACE_ES_Disjunction_Group
-// = TITLE
-// Conjunction Group
-//
-// = DESCRIPTION
-// Represents a conjunction group, such as (A+B+C).
-{
-public:
- ACE_ES_Conjunction_Group (void);
- // Default construction.
-
- virtual ~ACE_ES_Conjunction_Group (void);
- // Destructor.
-
- int add_type (int type_id);
- // Set the <type_id>th bit in the forward_value_.
-
- int should_forward (u_long pending_flags);
- // Returns 1 if this conjunction group's dependencies have been
- // satisfied. Returns 0 otherwise.
-
- typedef ACE_CORBA_Sequence<ACE_ES_Event_Container_var> Event_Set;
-
- virtual void add_events (Event_Set *outbox,
- Event_Set *pending_events,
- u_long &pending_flags);
- // For each bit set in forward_value_, the corresponding events in
- // <pending_events> is added to <outbox>. Each bit set in
- // <forward_value_> is cleared in <pending_flags>. If <oubox> == 0,
- // then add_events just clears the pending events and flags.
-
-private:
- u_long forward_value_;
-};
-
-// ************************************************************
-
-// Forward decl.
-class ACE_ES_Consumer_Correlation;
-
-class TAO_ORBSVCS_Export ACE_ES_Consumer_Rep : public ACE_ES_Timer_ACT
-// = TITLE
-// Consumer Representation.
-//
-// = DESCRIPTION
-// These are stored in the subscription module. They store
-// information that allows optimized correlations. It represents
-// the consumer that will handle *one* type of event. This
-// probably shouldn't inherit from ACE_ES_Timer_ACT since it's used
-// only by ACE_ES_Consumer_Rep_Timeout. However, this allows me to
-// minimize dynamic allocation.
-{
-public:
- ACE_ES_Consumer_Rep (void);
- // Default construction.
-
- void init (ACE_ES_Consumer_Correlation *correlation,
- RtecEventChannelAdmin::Dependency &dep);
- // <dep> describes the event subscribed to and the method handling
- // the event. <correlation> is the parent correlation object.
-
- virtual ~ACE_ES_Consumer_Rep (void);
- // Virtual destruction.
-
- RtecEventChannelAdmin::Dependency *dependency (void);
- // The event subscribed to and the method that will handle this
- // event.
-
- int type_id (void);
- // Get the correlation group index of this consumer rep's event
- // type.
-
- void type_id (int);
- // Set the correlation group index of this consumer rep's event
- // type.
-
- enum Correlation_Type
- {
- NO_CORRELATION,
- CORRELATE,
- DEADLINE_TIMEOUT,
- GLOBAL_DEADLINE
- };
-
- u_long correlation_type (void);
- // If this returns 0, then the event associated with this consumer
- // should be forwarded without running any correlations.
-
- void correlation_type (u_long ct);
- // Set whether the event should be correlated. <ct> is a
- // Correlation_Type.
-
- int add_disjunction_group (ACE_ES_Disjunction_Group &);
- // Add a disjunction group.
-
- ACE_ES_Disjunction_Group *top_group (void);
- // Returns the first disjunction group added via
- // this->add_disjunction_group.
-
- void reschedule_deadlines (void);
- // Calls reschedule_deadline on all disjunction groups added through
- // this->add_disjunction_group.
-
- int receiving_events (void);
- // Returns 1 if events should be sent to this consumer. Returns 0
- // if they should not (suspended or disconnected).
-
- void suspend (void);
- // Stop forwarding events to the calling consumer.
-
- void resume (void);
- // Resume forwarding events to the calling consumer.
-
- ACE_ES_Consumer_Correlation *correlation (void);
- // Returns the Consumer_Correlation object for the target consumer.
-
- void disconnect (void);
- // Schedules the consumer rep to be removed from all subscription
- // lists.
-
- int disconnected (void);
- // Returns 1 if the consumer rep should be removed from all
- // subscription lists.
-
- void _duplicate (void);
- // Increments ref_count_.
-
- void _release (void);
- // Decrements ref_count_ and deletes this if 0.
-
-protected:
- int disconnected_;
- // Whether the rep should be removed from all subscription lists.
-
- virtual void execute (void);
- // This is called when timeouts occur. This implementation prints
- // out an error message (since it really shouldn't be implemented in
- // this class).
-
- int suspended_;
- // Whether events should be dropped or forwarded.
-
- u_long correlation_type_;
- // Whether any correlating should be done for this event.
-
- RtecEventChannelAdmin::Dependency *dependency_;
- // Event subscribed to.
-
- ACE_ES_Consumer_Correlation *correlation_;
- // The target consumer of events.
-
- int type_id_;
- // Correlation group index of event_->type_.
-
- ACE_ES_Disjunction_Group *disjunction_group_;
- // This should be a set. We'll just have room for one now.
-
- ACE_Atomic_Op<ACE_ES_MUTEX, int> ref_count_;
- // Lock for reference count.
-};
-
-class TAO_ORBSVCS_Export ACE_ES_Consumer_Rep_Timeout : public ACE_ES_Consumer_Rep
-// = TITLE
-// Consumer Representation.
-//
-// = DESCRIPTION
-// These are stored in the subscription module. They store
-// information that allows optimized correlations. It represents
-// the consumer that will handle *one* type of event.
-{
-public:
- ACE_ES_Consumer_Rep_Timeout (void);
- // Default construction.
-
- void init (ACE_ES_Consumer_Correlation *correlation,
- RtecEventChannelAdmin::Dependency &dep);
- // <dep> describes the event subscribed to and the method handling
- // the event. <correlation> is the parent correlation object.
-
- // = Get/set timer returned from the reactor.
- int timer_id (void);
- void timer_id (int);
-
- // = Get/set preemption priority.
- RtecScheduler::OS_Priority preemption_priority (void);
- void preemption_priority (RtecScheduler::OS_Priority pp);
-
-protected:
- virtual void execute (void);
- // This is called when timeouts occur. Calls correlation_->
-
- int timer_id_;
- // For cancelling timers.
-
- RtecScheduler::OS_Priority preemption_priority_;
- // Store the preemption priority so we can cancel the correct timer.
- // The priority values may change during the life.
-
- ACE_ES_Event_Container_var timeout_event_;
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Subscription_Info
-// = TITLE
-// Event Service Subscription Info
-//
-// = DESCRIPTION
-// Contains information on all consumers subscribed to a supplier.
-// Each Push_Supplier_Proxy has an instance of this class. This
-// should really be defined in Channel_Modules.h, but I want to
-// have an instance of it in each ACE_Push_Supplier_Proxy. This
-// allows us to reduce the amount of dynamic memory allocation.
-{
-public:
- ~ACE_ES_Subscription_Info (void);
- // Free up dynamic resources.
-
- typedef ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *> Subscriber_Set_Iterator;
- typedef ACE_Unbounded_Set<ACE_ES_Consumer_Rep *> Subscriber_Set;
-
- class Type_Subscribers
- // = DESCRIPTION
- // There is one of these for each event type generated by the
- // supplier. It contains the subscribers and the
- // dependency_info_ describing the method that generates this
- // event type.
- {
- public:
- Type_Subscribers (RtecScheduler::Dependency_Info *d)
- : dependency_info_ (d) {}
- // Construction requires a dependency info describing the method
- // that generates events for the consumers_. We use a pointer so
- // that a null can be passed in this->insert_or_allocate.
-
- // void operator= (const Subscriber_Set &);
- // Copy.
-
- Subscriber_Set consumers_;
- // All the consumers that have registered for this event.
-
- RtecScheduler::Dependency_Info *dependency_info_;
- // Description of the method that generates this event.
- };
-
- typedef RtecEventComm::EventType EXT;
- typedef Type_Subscribers *INT;
- typedef ACE_Null_Mutex SYNCH;
- typedef ACE_Map_Manager<EXT, INT, SYNCH> Subscriber_Map;
- typedef ACE_Map_Iterator<EXT, INT, SYNCH> Subscriber_Map_Iterator;
- typedef ACE_Map_Entry<EXT, INT> Subscriber_Map_Entry;
-
- Subscriber_Set source_subscribers_;
- // Source-based subscribers.
-
- Subscriber_Map type_subscribers_;
- // Type-based subscribers.
-
- // = These are just typedefs for source-based subscriptions.
- typedef RtecEventComm::EventSourceID sEXT;
- typedef Subscriber_Set *sINT;
- typedef ACE_Map_Manager<sEXT, sINT, SYNCH> SourceID_Map;
- typedef ACE_Map_Iterator<sEXT, sINT, SYNCH> SourceID_Map_Iterator;
- typedef ACE_Map_Entry<sEXT, sINT> SourceID_Map_Entry;
-
- ACE_ES_RW_LOCK lock_;
- // Serializes writes to source_subscribers_ and type_subscribers_.
-
- static int insert_or_allocate (SourceID_Map &source_subscribers,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID sid);
- // <source_subscribers> contains a mapping of source id to consumer
- // list. Insert <consumer> into the list of consumers subscribed to
- // <sid>. Allocate a list for <sid> if necessary.
-
- static int insert_or_allocate (Subscriber_Map &type_subscribers,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type);
- // Add <consumer> to the set of consumers bound to <type> in
- // <type_subscribers>. If there is consumer set for <type>, one is
- // allocated. Returns -1 on failure, 0 otherwise.
-
- static int insert_or_fail (Subscriber_Map &type_subscribers,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type,
- RtecScheduler::Dependency_Info *&dependency);
- // Add <consumer> to the set of consumers bound to <type> in
- // <type_subscribers>. If there is consumer set for <type>, the
- // operation fails. Returns -1 on failure, 0 otherwise.
-
- static int remove (Subscriber_Map &type_map,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type);
- // Remove <consumer> from the consumer set in <type_map> set
- // corresponding to <type>.
-
- static int remove (SourceID_Map &source_subscribers,
- ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID sid);
- // Remove <consumer> from the consumer set in the
- // <source_subscribers> set corresponding to <sid>.
-
- static void append_subscribers (Subscriber_Set &dest,
- Subscriber_Set &src);
- // Insert all elements of <src> into <dest>.
-};
-
-// ************************************************************
-
-// Forward declarations.
-class ACE_ES_Dispatch_Request;
-class ACE_Push_Consumer_Proxy;
-
-class TAO_ORBSVCS_Export ACE_ES_Consumer_Correlation : public RtecEventComm_PushSupplierBOAImpl
-// = TITLE
-// Event Service Consumer_Correlation
-//
-// = DESCRIPTION
-// There is one Consumer Correlation object per call to
-// connect_push_consumer. It handles all the consumer's
-// correlation dependencies including timeouts. This is also a
-// PushSupplier to support event forwarding.
-{
-public:
- ACE_ES_Consumer_Correlation (void);
- // Default construction.
-
- virtual ~ACE_ES_Consumer_Correlation (void);
- // Deletes lock_.
-
- int connected (ACE_Push_Consumer_Proxy *consumer,
- ACE_ES_Correlation_Module *correlation_module);
- // Initialization. <correlation_module> is stored for delegating
- // channel operations. <consumer> is stored to access the consumers
- // qos and filterin data. Returns 0 on success, -1 on failure.
-
- int disconnecting (void);
- // Shutdown.
-
- ACE_ES_Dispatch_Request *push (ACE_ES_Consumer_Rep *consumer,
- ACE_ES_Event_Container *event);
- // Takes <event> and adds it to the correlation. Returns the
- // dispatch request that should be forwarded.
-
- void suspend (void);
- // Stop forwarding events to the calling consumer.
-
- void resume (void);
- // Resume forwarding events to the calling consumer.
-
- ACE_ES_Correlation_Module *correlation_module_;
- // Pointer back to the main correlation module. This is public so
- // that ACE_ES_Consumer_Rep_Timeout::execute can access it.
-
- typedef ACE_CORBA_Sequence<ACE_ES_Event_Container_var> Event_Set;
-
-private:
- virtual void disconnect_push_supplier (CORBA::Environment &);
- // Called when the channel disconnects us.
-
- int allocate_correlation_resources (ACE_ES_Dependency_Iterator &iter);
- // Dynamically allocates structures needed for correlations. 0 on
- // success, -1 on failure.
-
- ACE_ES_Dispatch_Request * correlate (ACE_ES_Consumer_Rep *cr,
- ACE_ES_Event_Container *event);
- // Helper function for this->push.
-
- // = Registration helper functions.
- int register_deadline_timeout (RtecEventChannelAdmin::Dependency &dependency,
- RtecEventComm::EventType group_type,
- int cgindex,
- int dgindex,
- int &trep_index);
- int register_interval_timeout (RtecEventChannelAdmin::Dependency &dependency,
- RtecEventComm::EventType group_type,
- int cgindex,
- int dgindex,
- int &trep_index);
- int register_event (RtecEventChannelAdmin::Dependency &dependency,
- RtecEventComm::EventType group_type,
- int cgindex,
- int dgindex,
- int &crep_index);
-
- ACE_ES_Consumer_Rep *get_consumer_rep (RtecEventChannelAdmin::Dependency &dependency,
- int &crep_index);
- int new_type_id (void);
-
- int type_id_index_;
-
- RtecEventChannelAdmin::ProxyPushConsumer_ptr channel_;
- // For event forwarding.
-
- RtecEventChannelAdmin::SupplierQOS qos_;
- // Supplier QOS specifications.
-
- // Events waiting to be forwarded.
- Event_Set *pending_events_;
-
- // Used to synchronize pending_events_ and by the correlation module.
- ACE_ES_MUTEX lock_;
- // Used to lock shared state.
-
- ACE_Push_Consumer_Proxy *consumer_;
-
- u_long pending_flags_;
- // A bit is set for each dependency satisfied.
-
- ACE_ES_Consumer_Rep **consumer_reps_;
- // Array of consumer rep pointers.
- int n_consumer_reps_;
- ACE_ES_Consumer_Rep_Timeout *timer_reps_;
- int n_timer_reps_;
-
- ACE_ES_Conjunction_Group *conjunction_groups_;
- int n_conjunction_groups_;
- ACE_ES_Disjunction_Group *disjunction_groups_;
- int n_disjunction_groups_;
-
- int connected_;
- // True when we're connected to the channel for forwarding.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_ACT
-// = TITLE
-// Event Service ACT
-//
-// = DESCRIPTION
-//
-{
-public:
- ACE_ES_ACT (void);
- int has_act_;
- RtecEventComm::Event act_;
-};
-
-// ************************************************************
-
-// Forward declarations.
-class ACE_ES_Dispatch_Request;
-
-class TAO_ORBSVCS_Export ACE_ES_Consumer_Module : public RtecEventChannelAdmin_ConsumerAdminBOAImpl
-// = TITLE
-// Event Service Consumer Module
-//
-// = DESCRIPTION
-// ProxyPushSupplier factory.
-{
-public:
- ACE_ES_Consumer_Module (ACE_EventChannel *channel);
- // Default construction.
-
- void open (ACE_ES_Dispatching_Module *down);
- // Link to the next module.
-
- virtual RtecEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier (CORBA::Environment &);
- // Factory method for push consumer proxies.
-
- void connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Register the consumer with the Event Service. This handles all
- // the details regarding Correlation_Module and Subscription_Module.
-
- void disconnecting (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Unregister the consumer from the Event Service.
-
- void push (const ACE_ES_Dispatch_Request *request,
- CORBA::Environment &);
-
- RtecEventChannelAdmin::ConsumerAdmin_ptr get_ref (void);
- // Allow transformations to RtecEventChannelAdmin::ConsumerAdmin.
-
- void shutdown_request (ACE_ES_Dispatch_Request *request);
- // This is called by Shutdown_Consumer command objects when a
- // consumer proxy is ready to be deleted.
-
- void shutdown (void);
- // Actively disconnect from all consumers.
-
-private:
- typedef ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *> Consumer_Iterator;
- typedef ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *> Consumers;
-
- ACE_ES_MUTEX lock_;
- // Protects access to all_consumers_.
-
- Consumers all_consumers_;
-
- ACE_EventChannel *channel_;
- // Used to test for shutdown.
-
- ACE_ES_Dispatching_Module *down_;
- // Next module down.
-};
-
-// ************************************************************
-
-// Forward declaration.
-class ACE_ES_Subscription_Module;
-
-class TAO_ORBSVCS_Export ACE_ES_Correlation_Module
-// = TITLE
-// Event Service Correlation Module
-//
-// = DESCRIPTION
-//
-{
-public:
- ACE_ES_Correlation_Module (ACE_EventChannel *channel);
- // Default construction.
-
- void open (ACE_ES_Dispatching_Module *up,
- ACE_ES_Subscription_Module *down);
- // Link to adjacent modules.
-
- void connected (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Create the consumers filter object.
-
- void disconnecting (ACE_Push_Consumer_Proxy *consumer,
- CORBA::Environment &);
- // Release the consumers filter object.
-
- void push (ACE_ES_Consumer_Rep *consumer,
- ACE_ES_Event_Container *event,
- CORBA::Environment &);
- // Take in an event and its subscriber. Apply consumer-specific
- // filters to each event and forward any dispatch requests to the
- // Dispatching Module.
-
- // = These are called by ACE_ES_Consumer_Reps.
-
- int subscribe (ACE_ES_Consumer_Rep *consumer);
- // Forwards to the subscription module.
-
- //int unsubscribe (ACE_ES_Consumer_Rep *consumer);
- // Forwards to the subscription module.
-
- int schedule_timeout (ACE_ES_Consumer_Rep_Timeout *consumer);
- // Schedule consumer timeout. Return 0 on success, -1 on failure.
-
- int cancel_timeout (ACE_ES_Consumer_Rep_Timeout *consumer);
- // Cancel consumer timeout. Return 0 on success, -1 on failure.
-
- int reschedule_timeout (ACE_ES_Consumer_Rep_Timeout *consumer);
- // Reschedule consumer timeout. Return 0 on success, -1 on failure.
-
- ACE_EventChannel *channel_;
- // The master channel. This is public so that Consumer_Correlation
- // objects can access it.
-
- void shutdown (void);
- // Does nothing.
-
-private:
- ACE_ES_Dispatching_Module *up_;
- // Next module up.
-
- ACE_ES_Subscription_Module *subscription_module_;
- // Next module down.
-};
-
-// ************************************************************
-
-// Forward declaration.
-class ACE_ES_Supplier_Module;
-class ACE_Push_Supplier_Proxy;
-
-class TAO_ORBSVCS_Export ACE_ES_Subscription_Module
-// = TITLE
-// Event Service Subscription Module
-//
-// = DESCRIPTION
-//
-// = SYNCHRONIZATION
-// This is currently implemented with very coarse-grain
-// synchronization. Basically, there is a single readers/writer
-// lock. All operations acquire the writer lock to change any
-// subscription record. All operations acquire a reader lock to
-// read any subscription record. This is fine for normal
-// operations (which are *all* read operations). However, the
-// initialization and shutdown periods might benefit from the
-// potential increase in concurrency if we used finer grain locks
-// (e.g., lock-per-source).
-{
-public:
- ACE_ES_Subscription_Module (ACE_EventChannel *channel);
- // Default construction.
-
- void open (ACE_ES_Correlation_Module *up,
- ACE_ES_Supplier_Module *down);
- // Link to the adjacent modules.
-
- ~ACE_ES_Subscription_Module (void);
- // Deletes the lock_.
-
- int subscribe (ACE_ES_Consumer_Rep *consumer);
- // Register a new consumer. Calls into <consumer> to figure out the
- // subscription options. Returns 0 on success, -1 on failure.
-
- int unsubscribe (ACE_ES_Consumer_Rep *consumer);
- // Removes the -consumer- from any subscription lists.
-
- void connected (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &);
- void disconnecting (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &);
-
- void push (ACE_Push_Supplier_Proxy *source,
- ACE_ES_Event_Container *event,
- CORBA::Environment &);
- // Takes in a set of events and pushes subscriber sets to the
- // Correlation Module.
-
- // void push (ACE_Push_Supplier_Proxy *source,
- // const RtecEventComm::Event event);
- // This doesn't need one of these since it will never be called.
-
- void shutdown (void);
- // Unsubscribes all consumers from the suppliers.
-
-private:
- void reregister_consumers (RtecEventComm::EventSourceID source_id);
- // Reregister any consumers that registered for <source_id> before
- // it actually connected to the channel.
-
- ACE_EventChannel *channel_;
- // The channel of all channels.
-
- /*
- typedef ACE_ES_Subscription_Info::Subscriber_Set INT;
- typedef ACE_Null_Mutex SYNCH;
- typedef ACE_Map_Manager<EXT, INT, SYNCH> Source_Collection;
- typedef ACE_Map_Iterator<EXT, INT, SYNCH> Source_Collection_Iterator;
- typedef ACE_Map_Entry<EXT, INT> Source_Collection_Entry;
- Source_Collection source_subscription_info_;
- // Source-only subscribers.
- */
-
- // = Subscribe helper methods. Returns 0 on success, -1 on failure.
-
- int subscribe_all (ACE_ES_Consumer_Rep *consumer);
-
- int subscribe_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type);
-
- int subscribe_source (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source);
-
- int subscribe_source_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source,
- RtecEventComm::EventType type);
-
- int unsubscribe_all (ACE_ES_Consumer_Rep *consumer);
-
- int unsubscribe_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventType type);
-
- int unsubscribe_source (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source);
-
- int unsubscribe_source_type (ACE_ES_Consumer_Rep *consumer,
- RtecEventComm::EventSourceID source,
- RtecEventComm::EventType type);
-
- // = Push helper methods.
-
- int push_source (ACE_Push_Supplier_Proxy *source,
- ACE_ES_Event_Container *event);
- // Push <event> to all consumers subscribed to all events from
- // <source>. Returns 0 on success, -1 on failure.
-
- int push_source_type (ACE_Push_Supplier_Proxy *source,
- ACE_ES_Event_Container *event);
- // Push <event> to all consumers subscribed to <event>.type_ from
- // <source>. Returns 0 on success, -1 on failure.
-
- void push_all (ACE_ES_Event_Container *event,
- CORBA::Environment &);
- // Push <event> to all_suppliers_.
-
- ACE_ES_Correlation_Module *up_;
- // Next module up stream.
-
- ACE_ES_Supplier_Module *down_;
- // Next module down stream.
-
- typedef ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *> Supplier_Iterator;
- typedef ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *> Suppliers;
-
- Suppliers all_suppliers_;
- // All suppliers.
-
- ACE_ES_Subscription_Info::Subscriber_Map type_subscribers_;
- // Type-based subscribers.
-
- ACE_ES_Subscription_Info::SourceID_Map source_subscribers_;
- // Source-based subscribers.
-
- ACE_ES_RW_LOCK lock_;
- // Protects access to all_suppliers_ and type_suppliers_;
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_ES_Supplier_Module : public RtecEventChannelAdmin_SupplierAdminBOAImpl
-// = TITLE
-// Event Service Supplier Proxy Module
-//
-// = DESCRIPTION
-// ProxyPushConsumer factory.
-{
-public:
- ACE_ES_Supplier_Module (ACE_EventChannel *channel);
- // Default construction.
-
- void open (ACE_ES_Subscription_Module *up);
- // Associate the module to a channel.
-
- virtual RtecEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer (CORBA::Environment &);
- // Factory method for push supplier proxies.
-
- void push (ACE_Push_Supplier_Proxy *proxy,
- const RtecEventComm::EventSet &event,
- CORBA::Environment &);
- // The supplier module acts on behalf of the supplier proxy to
- // forward events through the channel.
-
- void connected (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &);
- // Register the consumer with the Event Service. This handles all
- // the details regarding Correlation_Module and Subscription_Module.
-
- void disconnecting (ACE_Push_Supplier_Proxy *supplier,
- CORBA::Environment &);
- // Unregister the consumer from the Event Service.
-
- RtecEventChannelAdmin::SupplierAdmin_ptr get_ref (void);
- // Allow transformations to RtecEventComm::PushConsumer.
-
- void shutdown (void);
- // Actively disconnect from all suppliers.
-
-private:
- typedef ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *> Supplier_Iterator;
- typedef ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *> Suppliers;
-
- Suppliers all_suppliers_;
- // All suppliers.
-
- ACE_ES_MUTEX lock_;
- // Protects access to all_suppliers_ and type_suppliers_;
-
- ACE_ES_Subscription_Module *up_;
-
- ACE_EventChannel *channel_;
- // Used to test for shutdown.
-};
-
-// ************************************************************
-
-// Forward declarations.
-class ACE_EventChannel;
-
-// = Event Channel interfaces.
-
-class TAO_ORBSVCS_Export ACE_Push_Supplier_Proxy : public RtecEventChannelAdmin_ProxyPushConsumerBOAImpl
-// = TITLE
-// Push Supplier Proxy.
-//
-// = DESCRIPTION
-// To the channel, this is a proxy to suppliers. To suppliers, it
-// exports a PushConsumer interface. It is a
-// RtecEventChannelAdmin::ProxyPushConsumer. Suppliers use this
-// interface to connect to the channel, push events to consumers,
-// and to disconnect from the channel.
-{
-public:
- ACE_Push_Supplier_Proxy (ACE_ES_Supplier_Module *supplier_module);
- // Must be created with an owning supplier admin.
-
- // = Operations public to suppliers.
-
- virtual void connect_push_supplier (RtecEventComm::PushSupplier_ptr push_supplier,
- const RtecEventChannelAdmin::SupplierQOS& qos,
- CORBA::Environment &);
- // Suppliers connect via this interface. <push_supplier> is a
- // reference to the supplier. <qos> represents the publish types of
- // the supplier.
-
- virtual void push (const RtecEventComm::EventSet &event,
- CORBA::Environment &);
- // Data arriving from a PushSupplier that must be sent to
- // consumers. This is the entry point of all events.
-
- virtual void disconnect_push_consumer (CORBA::Environment &);
- // Disconnect the supplier from the channel.
-
- // = Operations for the Event Channel.
-
- RtecEventChannelAdmin::ProxyPushConsumer_ptr get_ref (void);
- // Allow transformations to RtecEventChannelAdmin::ProxyPushConsumer.
-
- int connected (void);
- // Returns 1 if the proxy has been connected to a "remote" client.
-
- void shutdown (void);
- // Actively disconnect from the supplier.
-
- // This is a hook so that the Subscription Module can associate
- // state with supplier proxies.
- ACE_ES_Subscription_Info &subscription_info (void);
-
- RtecEventChannelAdmin::SupplierQOS &qos (void);
- // Filtering criteria.
-
- int operator== (const RtecEventComm::EventSourceID rhs);
- // Is this object a proxy for -rhs-. Simple pointer comparison for now.
-
- RtecEventComm::EventSourceID source_id (void);
- // Returns underlying supplier object ref.
-
-private:
- RtecEventChannelAdmin::SupplierQOS qos_;
- // Reference to the supplier's qos params.
-
- ACE_ES_Subscription_Info subscription_info_;
-
- ACE_ES_Supplier_Module *supplier_module_;
-
- RtecEventComm::EventSourceID source_id_;
- // We keep a proxy of the Supplier source_id_;
-
- RtecEventComm::PushSupplier_ptr push_supplier_;
- // CORBA reference to remote push supplier.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_Push_Consumer_Proxy : public RtecEventChannelAdmin_ProxyPushSupplierBOAImpl
-// = TITLE
-// Push Consumer Proxy.
-//
-// = DESCRIPTION
-// This is the channels proxy to a push consumer. It implements
-// the RtecEventChannelAdmin::ProxyPushSupplier IDL interface.
-// Consumers use this interface to connect and disconnect from the
-// channel.
-{
-public:
- ACE_Push_Consumer_Proxy (ACE_ES_Consumer_Module *cm);
- // Must be created with an consumer admin.
-
- virtual ~ACE_Push_Consumer_Proxy (void);
- // Default destruction
-
- // = Interfaces exported to consumers.
-
- virtual void connect_push_consumer (RtecEventComm::PushConsumer_ptr push_consumer,
- const RtecEventChannelAdmin::ConsumerQOS& qos,
- CORBA::Environment &);
- // A push consumer is connecting. <push_consumer> is a reference to
- // the consumer. <qos> is the subscription types for the consumer.
-
- virtual void disconnect_push_supplier (CORBA::Environment &);
- // The consumer is disconnecting.
-
- virtual void suspend (CORBA::Environment &);
- // Stop forwarding events to the calling consumer.
-
- virtual void resume (CORBA::Environment &);
- // Resume forwarding events to the calling consumer.
-
- // = Event Channel operations.
-
- void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
- // Push <events> to push_consumer_.
-
- int connected (void);
- // Returns 1 if the proxy has been connected to a "remote" client.
-
- void shutdown (void);
- // Actively disconnect from the consumer.
-
- RtecEventChannelAdmin::ProxyPushSupplier_ptr get_ref (void);
- // Allow transformations to RtecEventChannelAdmin::ProxyPushSupplier.
-
- ACE_ES_Consumer_Correlation &correlation (void);
- // Access the consumer-specific Consumer_Correlation.
-
- RtecEventChannelAdmin::ConsumerQOS &qos (void);
- // Filtering criteria.
-
-private:
- RtecEventChannelAdmin::ConsumerQOS qos_;
- // A reference to the consumers Quality of Service parameters.
-
- ACE_ES_Consumer_Correlation correlation_;
- // A hook so that the Correlation Module can associate correlation
- // information with the consumer.
-
- RtecEventComm::PushConsumer_ptr push_consumer_;
- // Reference to our push consumer.
-
- ACE_ES_Consumer_Module *consumer_module_;
- // TODO: Maybe this should be a _var or _duplicate/_release should
- // be used
-};
-
-// ************************************************************
-
-// Helper function that returns
-// qos.dependencies_[0].rt_info_->entry_point or "no-name".
-const TAO_ORBSVCS_Export char *
-ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos);
-
-// ************************************************************
-
-typedef ACE_ES_Simple_Array <ACE_ES_Consumer_Rep *,
- ACE_ES_MAX_CONSUMERS_PER_SUPPLIER> ACE_ES_CRSet;
-
-typedef ACE_ES_Array_Iterator <ACE_ES_Consumer_Rep *> ACE_ES_CRSet_Iterator;
-
-#if defined (__ACE_INLINE__)
-#include "Event_Channel.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_EVENT_CHANNEL_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i
deleted file mode 100644
index 584ee95d69f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i
+++ /dev/null
@@ -1,892 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-const unsigned int ACE_INT2BIT[32] =
-{
- 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192,
- 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152,
- 4194304, 8388608, 16777216, 33554432, 67108864, 134217728,
- 268435456, 536870912, 1073741824, 2147483648u,
-};
-
-// **************************************************
-
-ACE_INLINE RtecEventChannelAdmin::ProxyPushConsumer_ptr
-ACE_Push_Supplier_Proxy::get_ref (void)
-{
- CORBA::Environment env;
- return this->_this (env);
-}
-
-ACE_INLINE int
-ACE_Push_Supplier_Proxy::connected (void)
-{
- return !CORBA::is_nil((CORBA::Object*) push_supplier_);
-}
-
-ACE_INLINE ACE_ES_Subscription_Info &
-ACE_Push_Supplier_Proxy::subscription_info (void)
-{
- return subscription_info_;
-}
-
-ACE_INLINE RtecEventChannelAdmin::SupplierQOS &
-ACE_Push_Supplier_Proxy::qos (void)
-{
- return qos_;
-}
-
-ACE_INLINE int
-ACE_Push_Supplier_Proxy::operator== (const RtecEventComm::EventSourceID rhs)
-{
- // Pointer comparison is fine for now.
- return (source_id_ == rhs);
-}
-
-ACE_INLINE RtecEventComm::EventSourceID
-ACE_Push_Supplier_Proxy::source_id (void)
-{
- return source_id_;
-}
-
-// **************************************************
-
-ACE_INLINE RtecEventChannelAdmin::ProxyPushSupplier_ptr
-ACE_Push_Consumer_Proxy::get_ref (void)
-{
- CORBA::Environment env;
- return this->_this (env);
-}
-
-ACE_INLINE RtecEventChannelAdmin::ConsumerQOS &
-ACE_Push_Consumer_Proxy::qos (void)
-{
- return qos_;
-}
-
-ACE_INLINE int
-ACE_Push_Consumer_Proxy::connected (void)
-{
- return !CORBA::is_nil(push_consumer_);
-}
-
-ACE_INLINE void
-ACE_Push_Consumer_Proxy::push (const RtecEventComm::EventSet &events,
- CORBA::Environment &_env)
-{
- ACE_TIMEPROBE (" deliver event to consumer proxy");
-
- if (push_consumer_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "Push to disconnected consumer %s: ",
- ::ACE_ES_Consumer_Name (this->qos ())));
- // ACE_ES_DEBUG_ST (::dump_sequence (events));
- return;
- }
-
- TAO_TRY
- {
- push_consumer_->push (events, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (CORBA::SystemException, se)
- {
- ACE_ERROR ((LM_ERROR, "system exception.\n"));
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
-
-ACE_INLINE ACE_ES_Consumer_Correlation &
-ACE_Push_Consumer_Proxy::correlation (void)
-{
- return correlation_;
-}
-
-ACE_INLINE RtecEventChannelAdmin::ConsumerAdmin_ptr
-ACE_ES_Consumer_Module::get_ref (void)
-{
- CORBA::Environment env;
- return this->_this (env);
-}
-
-ACE_INLINE RtecEventChannelAdmin::SupplierAdmin_ptr
-ACE_ES_Supplier_Module::get_ref (void)
-{
- CORBA::Environment env;
- return this->_this (env);
-}
-
-// **************************************************
-
-ACE_INLINE RtecEventChannelAdmin::EventChannel_ptr
-ACE_EventChannel::get_ref (void)
-{
- CORBA::Environment env;
- return this->_this (env);
-}
-
-ACE_INLINE RtecEventChannelAdmin::SupplierAdmin_ptr
-ACE_EventChannel::for_suppliers (CORBA::Environment &)
-{
- return supplier_module_->get_ref ();
-}
-
-ACE_INLINE RtecEventChannelAdmin::ConsumerAdmin_ptr
-ACE_EventChannel::for_consumers (CORBA::Environment &)
-{
- return consumer_module_->get_ref ();
-}
-
-ACE_INLINE ACE_ES_Priority_Timer *
-ACE_EventChannel::timer (void)
-{
- return timer_;
-}
-
-// ************************************************************
-
-// Makes a temporary Event_var and appends it to the <dest>.
-ACE_INLINE void
-operator += (ACE_CORBA_Sequence<ACE_ES_Event_Container_var> &dest,
- ACE_ES_Event_Container *item)
-{
- int length = dest.length ();
- dest.length (length + 1);
- dest[length] = item;
-}
-
-/*
-// Makes a temporary Event_var and appends it to the <dest>.
-ACE_INLINE void
-operator += (ACE_CORBA_Sequence<RtecEventComm::Event_var> &dest,
- RtecEventComm::Event *item)
-{
- // RtecEventComm::Event_var event (item);
- int length = dest.length ();
- dest.length (length + 1);
- dest[length] = item;
-}
-*/
-
-ACE_INLINE int
-operator == (const RtecEventComm::Event &event1,
- const RtecEventComm::Event &event2)
-{
- // Check if the sources are equal. 0 is a wildcard.
- if ((event1.source_ != 0)
- && (event2.source_ != 0)
- && (event1.source_ != event2.source_))
- return 0;
-
- // Check if the types are equal. ACE_ES_EVENT_ANY is a wildcard.
- if ((event1.type_ != ACE_ES_EVENT_ANY) &&
- (event2.type_ != ACE_ES_EVENT_ANY) &&
- (event1.type_ != event2.type_))
- return 0;
-
- return 1;
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_ACT::ACE_ES_ACT (void)
- : has_act_ (0)
-{
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_Disjunction_Group::ACE_ES_Disjunction_Group (void) :
- act_ (),
- deadline_timer_rep_ (0),
- correlation_module_ (0)
-{
-}
-
-ACE_INLINE void
-ACE_ES_Disjunction_Group::set_correlation_module (ACE_ES_Correlation_Module *cm)
-{
- correlation_module_ = cm;
-}
-
-ACE_INLINE void
-ACE_ES_Disjunction_Group::reschedule_deadline (void)
-{
- if (deadline_timer_rep_ != 0)
- {
- if (correlation_module_->reschedule_timeout (deadline_timer_rep_) == -1)
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ES_Disjunction_Group::reschedule_deadline"));
- }
-}
-
-ACE_INLINE int
-ACE_ES_Disjunction_Group::set_deadline_timeout (ACE_ES_Consumer_Rep_Timeout *cr)
-{
- deadline_timer_rep_ = cr;
- // Schedule the timeout.
- if (correlation_module_->schedule_timeout (deadline_timer_rep_) == -1)
- return -1;
- else
- return 0;
-}
-
-ACE_INLINE void
-ACE_ES_Disjunction_Group::add_events (Event_Set *outbox,
- Event_Set *pending_events,
- u_long &pending_flags)
-{
- ACE_UNUSED_ARG (pending_events);
- ACE_UNUSED_ARG (pending_flags);
-
- // Append the act.
- if (act_ != 0)
- *outbox += act_;
-}
-
-ACE_INLINE void
-ACE_ES_Disjunction_Group::set_act (RtecEventComm::Event &act)
-{
- ACE_ES_Event_Container *temp = new ACE_ES_Event_Container (act);
- if (temp == 0)
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ES_Disjunction_Group::set_act"));
- return;
- }
-
- act_ = temp;
- temp->_release ();
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_Consumer_Rep::ACE_ES_Consumer_Rep (void) :
- disconnected_ (0),
- suspended_ (0),
- correlation_type_ (ACE_ES_Consumer_Rep::NO_CORRELATION),
- dependency_ (0),
- correlation_ (0),
- type_id_ (0),
- disjunction_group_ (0),
- ref_count_ (1)
-{
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::init (ACE_ES_Consumer_Correlation *correlation,
- RtecEventChannelAdmin::Dependency& dependency)
-{
- dependency_ = &dependency;
- correlation_ = correlation;
-}
-
-ACE_INLINE RtecEventChannelAdmin::Dependency*
-ACE_ES_Consumer_Rep::dependency (void)
-{
- return dependency_;
-}
-
-ACE_INLINE int
-ACE_ES_Consumer_Rep::type_id (void)
-{
- return type_id_;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::type_id (int id)
-{
- type_id_ = id;
-}
-
-ACE_INLINE ACE_ES_Consumer_Correlation *
-ACE_ES_Consumer_Rep::correlation (void)
-{
- return correlation_;
-}
-
-ACE_INLINE u_long
-ACE_ES_Consumer_Rep::correlation_type (void)
-{
- return correlation_type_;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::correlation_type (u_long ct)
-{
- correlation_type_ = ct;
-}
-
-ACE_INLINE int
-ACE_ES_Consumer_Rep::add_disjunction_group (ACE_ES_Disjunction_Group &dg)
-{
- if (disjunction_group_ != 0)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Rep::add_disjunction_group: "
- "disjunction_group already set!\n"));
- disjunction_group_ = &dg;
- return 0;
-}
-
-ACE_INLINE ACE_ES_Disjunction_Group *
-ACE_ES_Consumer_Rep::top_group (void)
-{
- return disjunction_group_;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::reschedule_deadlines (void)
-{
- if (disjunction_group_ != 0)
- disjunction_group_->reschedule_deadline ();
-}
-
-ACE_INLINE int
-ACE_ES_Consumer_Rep::receiving_events (void)
-{
- return suspended_ == 0 && disconnected_ == 0;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::suspend (void)
-{
- suspended_ = 1;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::resume (void)
-{
- suspended_ = 0;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::_duplicate (void)
-{
- // This is atomic.
- ref_count_++;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::_release (void)
-{
- // This is atomic. rc is because we want to avoid Atomic_Op's
- // operator==. Don't change this code unless you think you're more
- // studly than ACE_Atomic_Op.
- int rc = --ref_count_;
-
- if (rc == 0)
- delete this;
-}
-
-ACE_INLINE int
-ACE_ES_Consumer_Rep::disconnected (void)
-{
- return disconnected_;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep::disconnect (void)
-{
- disconnected_ = 1;
-}
-
-// ************************************************************
-
-// Forward <events> to all consumers subscribed to <source> only.
-ACE_INLINE int
-ACE_ES_Subscription_Module::push_source (ACE_Push_Supplier_Proxy *source,
- ACE_ES_Event_Container *event)
-{
- ACE_TIMEPROBE (" enter ACE_ES_Subscription_Module::push");
- // If there are now source-based subscribers for this supplier,
- // return.
- if (source->subscription_info ().source_subscribers_.size () == 0)
- return 0;
-
- ACE_ES_Subscription_Info::Subscriber_Set &set =
- source->subscription_info ().source_subscribers_;
-
- // List of consumers that need to be disconnected.
- ACE_ES_CRSet disconnect_list;
-
- {
- // Acquire a read lock.
- ACE_ES_RGUARD ace_mon (source->subscription_info ().lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source.\n"), -1);
-
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (set);
-
- TAO_TRY
- {
- // Iterate through all subscribers.
- for (ACE_ES_Consumer_Rep **consumer = 0;
- iter.next (consumer) != 0;
- iter.advance ())
- {
- // Only push the event if the consumer is not suspended
- // and not disconnected.
- if ((*consumer)->receiving_events ())
- {
- up_->push (*consumer, event, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- // If the consumer has disconnected, schedule it for
- // disconnection. We can not modify our list now. It
- // would mess up the iterator.
- if ((*consumer)->disconnected ())
- disconnect_list.insert (*consumer);
- }
- }
- TAO_CATCHANY
- {
- return -1;
- }
- TAO_ENDTRY;
-
- // Release the read lock.
- }
-
- // If there are consumers scheduled for disconnect, acquire a write
- // lock and disconnect them.
- if (disconnect_list.size () != 0)
- {
- ACE_ES_WGUARD ace_mon (source->subscription_info ().lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source.\n"), -1);
-
- ACE_ES_CRSet_Iterator iter (disconnect_list.data (), disconnect_list.size ());
-
- // Iterate through the disconnecting consumers.
- for (ACE_ES_Consumer_Rep **consumer = 0;
- iter.next (consumer) != 0;
- iter.advance ())
- {
- // Remove the consumer from subscriber list.
- if (set.remove (*consumer) == -1)
- ACE_ERROR ((LM_ERROR, "%p remove failed.\n",
- "ACE_ES_Subscription_Module::push_source.\n"));
- else
- // Decrement the consumer rep's reference count.
- (*consumer)->_release ();
- }
- }
-
- return 0;
-}
-
-// 1. figure out why we're going through the subscription module,
-// instead of just passing through.
-// 2. where is lock_? Is there only one per module!?
-
-ACE_INLINE int
-ACE_ES_Subscription_Module::push_source_type (ACE_Push_Supplier_Proxy *source,
- ACE_ES_Event_Container *event)
-{
- // Step through each event in the set. For each event type, find
- // the corresponding set in the type collection. Push the single
- // event to each consumer in the set.
-
- ACE_ES_Subscription_Info::Subscriber_Map &supplier_map =
- source->subscription_info ().type_subscribers_;
-
- ACE_ES_CRSet disconnect_list;
-
- ACE_ES_Subscription_Info::Subscriber_Set *set;
-
- {
- ACE_ES_RGUARD ace_mon (source->subscription_info ().lock_);
- if (ace_mon.locked () == 0)
- {
- ACE_TIMEPROBE (" push_source_type");
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source_type.\n"), -1);
- }
-
- ACE_ES_Subscription_Info::Type_Subscribers *subscribers;
-
- if (supplier_map.current_size () == 0)
- {
- ACE_TIMEPROBE (" push_source_type");
- return 0;
- }
-
- if (supplier_map.find (event->type_, subscribers) == -1)
- {
- ACE_DEBUG ((LM_ERROR, "ACE_ES_Subscription_Module::push_source_type"
- " Warning: event type %d not registered.\n",
- event->type_));
- ACE_TIMEPROBE (" push_source_type");
- return 0; // continue anyway
- }
-
- if (subscribers->consumers_.size () == 0)
- {
- ACE_TIMEPROBE (" push_source_type");
- return 0;
- }
-
- set = &subscribers->consumers_;
-
- // We've found the set of consumers subscribed to this type
- // of event from this supplier. Forward the event to each.
- ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (*set);
-
- TAO_TRY
- {
- for (ACE_ES_Consumer_Rep **consumer = 0;
- iter.next (consumer) != 0;
- iter.advance ())
- {
- if ((*consumer)->receiving_events ())
- {
- up_->push (*consumer, event, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- if ((*consumer)->disconnected ())
- disconnect_list.insert (*consumer);
- }
- }
- TAO_CATCHANY
- {
- ACE_TIMEPROBE (" push_source_type");
- return -1;
- }
- TAO_ENDTRY;
- }
-
- if (disconnect_list.size () != 0)
- // Acquire a write lock and remove all disconnected consumers.
- {
- ACE_ES_WGUARD ace_mon (source->subscription_info ().lock_);
- if (ace_mon.locked () == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source.\n"), -1);
-
- ACE_ES_CRSet_Iterator iter (disconnect_list.data (), disconnect_list.size ());
-
- for (ACE_ES_Consumer_Rep **consumer = 0;
- iter.next (consumer) != 0;
- iter.advance ())
- {
- if (set->remove (*consumer) == -1)
- ACE_ERROR ((LM_ERROR, "%p remove failed.\n",
- "ACE_ES_Subscription_Module::push_source.\n"));
- else
- (*consumer)->_release ();
- }
- }
-
- ACE_TIMEPROBE (" push_source_type");
- return 0;
-}
-
-// ************************************************************
-
-ACE_INLINE ACE_RTU_Manager *
-ACE_EventChannel::rtu_manager (void)
-{
- return rtu_manager_;
-}
-
-ACE_INLINE
-ACE_RTU_Manager::ACE_RTU_Manager (int active)
- : active_ (active),
- should_preempt_ (0),
- not_done_ (0),
- priority_ (ACE_Scheduler_MIN_PREEMPTION_PRIORITY)
-{
-}
-
-ACE_INLINE int
-ACE_RTU_Manager::should_preempt (void)
-{
- if (!active_)
- return 0;
- else
- {
- // Expire any timers. Am I evil for putting this here?
- ACE_Time_Value tv;
- if (ACE_Task_Manager::instance ()->
- GetReactorTask (0)->get_reactor ().handle_events (&tv) == -1)
- ACE_ERROR ((LM_ERROR, "%p.\n",
- "ACE_RTU_Manager::should_preempt"));
-
- int should_preempt = should_preempt_;
- should_preempt_ = 0;
- return should_preempt;
- }
-}
-
-ACE_INLINE void
-ACE_RTU_Manager::should_preempt (int s)
-{
- should_preempt_ = s;
-}
-
-ACE_INLINE int
-ACE_RTU_Manager::not_done (void)
-{
- int not_done = not_done_;
- not_done_ = 0;
- return not_done;
-}
-
-ACE_INLINE void
-ACE_RTU_Manager::not_done (int nd)
-{
- not_done_ = nd;
-}
-
-ACE_INLINE RtecScheduler::OS_Priority
-ACE_RTU_Manager::priority (void)
-{
- return priority_;
-}
-
-ACE_INLINE void
-ACE_RTU_Manager::priority (RtecScheduler::OS_Priority p)
-{
- priority_ = p;
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_Consumer_Rep_Timeout::ACE_ES_Consumer_Rep_Timeout (void) :
- timer_id_ (0),
- preemption_priority_ (ACE_Scheduler_MIN_PREEMPTION_PRIORITY),
- timeout_event_ ()
-{
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep_Timeout::init (ACE_ES_Consumer_Correlation *correlation,
- RtecEventChannelAdmin::Dependency &dep)
-{
- ACE_ES_Event_Container *temp = new ACE_ES_Event_Container (dep.event_);
- if (temp == 0)
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Rep_Timeout::init"));
- return;
- }
-
- timeout_event_ = temp;
- temp->_release ();
-
- ACE_ES_Consumer_Rep::init (correlation, dep);
-}
-
-ACE_INLINE int
-ACE_ES_Consumer_Rep_Timeout::timer_id (void)
-{
- return timer_id_;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep_Timeout::timer_id (int id)
-{
- timer_id_ = id;
-}
-
-ACE_INLINE RtecScheduler::OS_Priority
-ACE_ES_Consumer_Rep_Timeout::preemption_priority (void)
-{
- return preemption_priority_;
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Rep_Timeout::preemption_priority (RtecScheduler::OS_Priority p)
-{
- preemption_priority_ = p;
-}
-
-// ************************************************************
-
-ACE_INLINE void
-ACE_ES_Consumer_Correlation::suspend (void)
-{
- for (int x=0; x < n_timer_reps_; x++)
- timer_reps_[x].suspend ();
-
- for (int y=0; y < n_consumer_reps_; y++)
- consumer_reps_[y]->suspend ();
-}
-
-ACE_INLINE void
-ACE_ES_Consumer_Correlation::resume (void)
-{
- for (int x=0; x < n_timer_reps_; x++)
- timer_reps_[x].resume ();
-
- for (int y=0; y < n_consumer_reps_; y++)
- consumer_reps_[y]->resume ();
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_Dependency_Iterator::ACE_ES_Dependency_Iterator (RtecEventChannelAdmin::DependencySet &rep) :
- rt_info_ (0),
- rep_ (rep),
- index_ (-1),
- n_conjunctions_ (0),
- n_disjunctions_ (0),
- n_timeouts_ (0),
- n_events_ (0)
-{
-}
-
-ACE_INLINE int
-ACE_ES_Dependency_Iterator::advance_dependency (void)
-{
- index_++;
- if ((CORBA::ULong) index_ >= rep_.length ())
- return -1;
- else
- return 0;
-}
-
-ACE_INLINE RtecEventChannelAdmin::Dependency &
-ACE_ES_Dependency_Iterator::operator *(void)
-{
- return rep_[index_];
-}
-
-ACE_INLINE int
-ACE_ES_Dependency_Iterator::parse (void)
-{
- for (CORBA::ULong x = 0; x < rep_.length (); x++)
- {
- if (rt_info_ == 0)
- rt_info_ = rep_[x].rt_info;
-
- switch (rep_[x].event_.type_)
- {
- case ACE_ES_CONJUNCTION_DESIGNATOR:
- n_conjunctions_++;
- break;
-
- case ACE_ES_DISJUNCTION_DESIGNATOR:
- n_disjunctions_++;
- break;
-
- case ACE_ES_EVENT_TIMEOUT:
- case ACE_ES_EVENT_INTERVAL_TIMEOUT:
- case ACE_ES_EVENT_DEADLINE_TIMEOUT:
- n_timeouts_++;
- break;
-
- default:
- n_events_++;
- break;
- }
- }
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_ES_Dependency_Iterator::n_conjunctions (void)
-{
- return n_conjunctions_;
-}
-
-ACE_INLINE int
-ACE_ES_Dependency_Iterator::n_disjunctions (void)
-{
- return n_disjunctions_;
-}
-
-ACE_INLINE int
-ACE_ES_Dependency_Iterator::n_timeouts (void)
-{
- return n_timeouts_;
-}
-
-ACE_INLINE int
-ACE_ES_Dependency_Iterator::n_events (void)
-{
- return n_events_;
-}
-
-ACE_INLINE RtecScheduler::handle_t
-ACE_ES_Dependency_Iterator::first_rt_info (void)
-{
- return rt_info_;
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_ES_Conjunction_Group::ACE_ES_Conjunction_Group (void) :
- forward_value_ (0)
-{
-}
-
-ACE_INLINE int
-ACE_ES_Conjunction_Group::add_type (int type_id)
-{
- ACE_SET_BITS (forward_value_, ACE_INT2BIT[type_id]);
- return 0;
-}
-
-/*
- // Set length bits.
- for (int x=0; x < length; x++)
- {
- forward_value_ <<= 1;
- forward_value_ |= 1;
- }
- */
-
-ACE_INLINE int
-ACE_ES_Conjunction_Group::should_forward (u_long pending_flags)
-{
- if ((forward_value_ & pending_flags) == forward_value_)
- return 1;
- else
- return 0;
-}
-
-ACE_INLINE void
-ACE_ES_Conjunction_Group::add_events (Event_Set *outbox,
- Event_Set *pending_events,
- u_long &pending_flags)
-{
- // Append the act first.
- if (act_ != 0)
- *outbox += act_;
-
- u_long fv = forward_value_;
- int x = 0;
- while (fv > 0)
- {
- // If this type_id is part of the correlation, then append each
- // event pending to the outbox.
- if (ACE_BIT_ENABLED (forward_value_, ACE_INT2BIT[x]))
- {
- // Step through each of the pending events.
- Event_Set &pending = pending_events[x];
- for (CORBA::ULong y=0; y < pending.length (); y++)
- {
- // Add the pending event to the outbox.
- if (outbox != 0)
- *outbox += pending[y];
- // Remove the event from the pending events array.
- pending[y] = 0;
- }
-
- // Reset the array length.
- pending.length (0);
- // Since we just emptied the events for this type, clear the
- // x^th bit in pending flags.
- ACE_CLR_BITS (pending_flags, ACE_INT2BIT[x]);
- // Clear the x^th bit in fv.
- ACE_CLR_BITS (fv, ACE_INT2BIT[x]);
- }
-
- x++;
- }
-}
-
-// ************************************************************
diff --git a/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h b/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h
deleted file mode 100644
index 8924cf3b9e3..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// $Id$
-//
-#if !defined (FAST_REACTOR_H)
-#define FAST_REACTOR_H
-
-#if defined (ACE_OLD_STYLE_REACTOR)
-# if defined (ACE_WIN32)
-# include "ace/ReactorEx.h"
-# define ACE_ES_FAST_REACTOR_BASE ACE_ReactorEx
-# else
-# include "ace/Reactor.h"
-# define ACE_ES_FAST_REACTOR_BASE ACE_Reactor
-# endif /* ACE_WIN32 */
-#else
-# if defined (ACE_WIN32)
-# include "ace/WFMO_Reactor.h"
-# define ACE_ES_FAST_REACTOR_BASE ACE_WFMO_Reactor
-# else
-# include "ace/Select_Reactor.h"
-# define ACE_ES_FAST_REACTOR_BASE ACE_Select_Reactor
-# endif /* ACE_WIN32 */
-#endif /* ACE_OLD_STYLE_REACTOR */
-//## end module.includes
-
-class TAO_ORBSVCS_Export ACE_ES_Fast_Reactor : public ACE_ES_FAST_REACTOR_BASE
-{
-public:
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0)
- {
- ACE_Time_Value timer_buf (0) ;
- ACE_Time_Value *this_timeout = &timer_buf ;
-
- if (this->timer_queue_->calculate_timeout (max_wait_time,
- this_timeout) == 0)
- {
- ACE_Time_Value t (0, 500000);
- ACE_OS::select (0, 0, 0, 0, &t);
- }
- else
- {
- ACE_OS::select (0, 0, 0, 0, this_timeout);
- }
-
- return this->timer_queue_->expire () == -1 ? -1 : 0;
- }
- virtual int handle_events (ACE_Time_Value &max_wait_time)
- {
- return this->handle_events (&max_wait_time);
- }
-};
-
-#endif /* FAST_REACTOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.cpp b/TAO/orbsvcs/orbsvcs/Event/GPlot_File.cpp
deleted file mode 100644
index 587d97728f5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = FILENAME
-// GPlot_File.cpp
-//
-// = AUTHOR
-// Tim Harrison
-//
-// ============================================================================
-
-#include "GPlot_File.h"
-
-#if !defined (__ACE_INLINE__)
-#include "GPlot_File.i"
-#endif /* __ACE_INLINE__ */
-
-int
-ACE_GPlot_File::open (const char *filename)
-{
- ACE_OS::strcpy (filename_, filename);
-
- FILE *read_file = ACE_OS::fopen (filename_, "r");
-
- long entry;
- char *value;
- ACE_NEW_RETURN (value, char [32], -1);
-
- if (read_file > 0)
- {
- int result;
- do
- {
- result = fscanf (read_file,
- "%ld\t%s\n",
- &entry,
- value);
-
- //if ((result == -1) && (ACE_OS::last_error () != 0))
- //ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_GPlot_File::open"), -1);
-
- if (result > 0)
- // Success.
- map_.bind (entry, value);
- else if (result != EOF)
- // Error.
- {
- ACE_OS::fclose (read_file);
- ACE_ERROR_RETURN
- ((LM_ERROR, "Error reading GPlot file %s.\n", filename_), -1);
- }
- } while (result != EOF);
-
- fclose (read_file);
- }
-
- write_file_ = ACE_OS::fopen (filename_, "w");
- if (write_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "%p: can't open\n", filename_), -1);
-
- closed_ = 0;
-
- return 0;
-}
-
-
-void
-ACE_GPlot_File::close (void)
-{
- if (closed_ == 0)
- {
- closed_ = 1;
- GPLOT_ITERATOR iterator ((GPLOT_MAP &) map_);
- for (GPLOT_ENTRY *entry; iterator.next (entry); iterator.advance ())
- {
- ACE_OS::fprintf (write_file_, "%ld\t%s\n",
- entry->ext_id_, entry->int_id_);
- delete [] entry->int_id_;
- }
-
- ACE_OS::fclose (write_file_);
- }
-}
-
-
-void
-ACE_GPlot_File::dump (void)
-{
- GPLOT_ITERATOR iterator ((GPLOT_MAP &) map_);
- for (GPLOT_ENTRY *entry; iterator.next (entry); iterator.advance ())
- {
- if (entry->int_id_ != 0)
- ACE_DEBUG ((LM_DEBUG, "%d\t%s\n", entry->ext_id_, entry->int_id_));
- else
- {
- ACE_ERROR ((LM_ERROR, "Value for entry %d is null.\n",
- entry->ext_id_));
- return;
- }
- }
-}
-
-
-int
-ACE_GPlot_File::get (long entry, long &value)
-{
- char *val;
-
- if (map_.find (entry, val) == -1)
- return -1;
- else
- {
- ::sscanf (val, "%ld", &value);
- return 0;
- }
-}
-
-
-int
-ACE_GPlot_File::get (long entry, float &value)
-{
- char *val;
-
- if (map_.find (entry, val) == -1)
- return -1;
- else
- {
- ::sscanf (val, "%f", &value);
- return 0;
- }
-}
-
-
-void
-ACE_GPlot_File::set (long entry, long value)
-{
- long old_entry;
- char *val;
- char *old_value;
-
- ACE_NEW (val, char [32]);
-
- ::sprintf (val, "%ld", value);
- map_.rebind (entry, val, old_entry, old_value);
-
- delete [] old_value;
-}
-
-
-void
-ACE_GPlot_File::set (long entry, float value)
-{
- long old_entry;
- char *val;
- char *old_value;
-
- ACE_NEW (val, char [32]);
-
- ::sprintf (val, "%f", value);
- map_.rebind (entry, val, old_entry, old_value);
-
- delete [] old_value;
-}
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Map_Entry<long, char *>;
-template class ACE_Map_Manager<long, char *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<long, char *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<long, char *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<long, char *, ACE_Null_Mutex>;
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Map_Entry<long, char *>
-#pragma instantiate ACE_Map_Manager<long, char *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<long, char *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<long, char *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<long, char *, ACE_Null_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h b/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h
deleted file mode 100644
index 8ce6e79488b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = FILENAME
-// GPlot_File.h
-//
-// = AUTHOR
-// Tim Harrison
-//
-// ============================================================================
-
-#if !defined (ACE_GPlot_File_H)
-#define ACE_GPlot_File_H
-
-#include "ace/Map_Manager.h"
-#include "ace/Synch.h"
-
-class TAO_ORBSVCS_Export ACE_GPlot_File
-// = TITLE
-// Reads and writes files in GPlot format.
-//
-// = DESCRIPTION
-// Gplot formats are as follows:
-// entry value
-// entry value
-// entry value
-// ...
-// They represent x,y pairs to be graphed by GPlot. entry's are
-// type long. value's are type long or float.
-{
-public:
- ACE_GPlot_File (void);
- // Construction.
-
- ~ACE_GPlot_File (void);
- // Destruction. Calls this->close.
-
- int open (const char *filename);
- // If the file does not exist, create it. If the file exists open
- // the file and read all the entries into map_. Returns 0 on
- // success, -1 on failure.
-
- void close (void);
- // Close the file and sync all the contents.
-
- int get (long entry, long &value);
- // Get the entry at this value. Returns 0 if a value was found.
- // Returns -1 if no value has been set for <entry>.
-
- int get (long entry, float &value);
- // Get the entry at this value. Returns 0 if a value was found.
- // Returns -1 if no value has been set for <entry>.
-
- void set (long entry, long value);
- // Set the entry at this value.
-
- void set (long entry, float value);
- // Set the entry at this value.
-
- void set_greatest (long entry, long value);
- // Compare <value> with the value at <entry>. Store the largest.
-
- void set_greatest (long entry, float value);
- // Compare <value> with the value at <entry>. Store the largest.
-
- void set_least (long entry, long value);
- // Compare <value> with the value at <entry>. Store the smallest.
-
- void set_least (long entry, float value);
- // Compare <value> with the value at <entry>. Store the smallest.
-
- void dump (void);
- // Dump state of the object.
-
-private:
- // = map_ stores all values. It is sync'ed to file when this->close
- // is called.
- typedef ACE_Map_Entry <long, char *> GPLOT_ENTRY;
- typedef ACE_Map_Manager<long, char *, ACE_Null_Mutex> GPLOT_MAP;
- typedef ACE_Map_Iterator <long, char *, ACE_Null_Mutex> GPLOT_ITERATOR;
-
- GPLOT_MAP map_;
-
- char filename_[BUFSIZ];
- FILE *write_file_;
-
- int closed_;
- // Only close once.
-};
-
-#if defined (__ACE_INLINE__)
-#include "GPlot_File.i"
-#endif /* __ACE_INLINE__ */
-
-
-#endif /* ACE_GPlot_File_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.i b/TAO/orbsvcs/orbsvcs/Event/GPlot_File.i
deleted file mode 100644
index ab9f235dc39..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.i
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id$
-
-ACE_INLINE
-ACE_GPlot_File::ACE_GPlot_File (void)
- : closed_ (1)
-{
-}
-
-
-ACE_INLINE
-ACE_GPlot_File::~ACE_GPlot_File (void)
-{
- this->close ();
-}
-
-
-ACE_INLINE
-void
-ACE_GPlot_File::set_greatest (long entry, long value)
-{
- long old_value;
-
- // If there was no previous value, or the <value> is greater than
- // the previous value, set a new value.
- if (this->get (entry, old_value) == -1 ||
- value > old_value)
- this->set (entry, value);
-}
-
-
-ACE_INLINE
-void
-ACE_GPlot_File::set_greatest (long entry, float value)
-{
- float old_value;
-
- // If there was no previous value, or the <value> is greater than
- // the previous value, set a new value.
- if (this->get (entry, old_value) == -1 ||
- value > old_value)
- this->set (entry, value);
-}
-
-
-ACE_INLINE
-void
-ACE_GPlot_File::set_least (long entry, long value)
-{
- long old_value;
-
- // If there was no previous value, or the <value> is less than
- // the previous value, set a new value.
- if (this->get (entry, old_value) == -1 ||
- value < old_value)
- this->set (entry, value);
-}
-
-
-ACE_INLINE
-void
-ACE_GPlot_File::set_least (long entry, float value)
-{
- float old_value;
-
- // If there was no previous value, or the <value> is less than
- // the previous value, set a new value.
- if (this->get (entry, old_value) == -1 ||
- value < old_value)
- this->set (entry, value);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.cpp b/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.cpp
deleted file mode 100644
index ebfd367dc9a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// $Id$
-//
-
-#include "Local_ESTypes.h"
-
-#if !defined (__ACE_INLINE__)
-#include "Local_ESTypes.i"
-#endif /* __ACE_INLINE__ */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h b/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h
deleted file mode 100644
index bf34edee6cc..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ORB Services
-//
-// = FILENAME
-// Local_ESTypes.h
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// Manual types that would otherwise be defined/implemented via an
-// IDL compiler.
-// NOTE: the file is obsolecent, we have TAO now, but we keep it
-// to speed up the porting.
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_ESTYPES_H
-#define ACE_LOCAL_ESTYPES_H
-
-#include "tao/corba.h"
-
-#include "orbsvcs/Event_Service_Constants.h"
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/RtecSchedulerC.h"
-#include "orbsvcs/RtecSchedulerS.h"
-#include "orbsvcs/RtecEventCommC.h"
-#include "orbsvcs/RtecEventCommS.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/RtecEventChannelAdminS.h"
-
-#define ACE_DEFAULT_EVENT_CHANNEL_TYPE 0
-
-// These are to help MSVC++ 4.2 deal with inheritence of nested types.
-// Not needed for Sun C++ or MSVC++ 5.0.
-
-// @@ NOTE: TAO uses the POA mapping instead of the old BOA, but all the
-// code still uses the BOA name for the skeleton classes, to speed up
-// porting we keep to old names.
-
-typedef RtecEventComm::Event RtecEventComm_Event;
-typedef POA_RtecScheduler::Scheduler RtecScheduler_SchedulerBOAImpl;
-typedef POA_RtecEventChannelAdmin::EventChannel RtecEventChannelAdmin_EventChannelBOAImpl;
-typedef POA_RtecEventComm::PushSupplier RtecEventComm_PushSupplierBOAImpl;
-typedef POA_RtecEventChannelAdmin::ConsumerAdmin RtecEventChannelAdmin_ConsumerAdminBOAImpl;
-typedef POA_RtecEventChannelAdmin::SupplierAdmin RtecEventChannelAdmin_SupplierAdminBOAImpl;
-typedef POA_RtecEventChannelAdmin::ProxyPushConsumer RtecEventChannelAdmin_ProxyPushConsumerBOAImpl;
-typedef POA_RtecEventChannelAdmin::ProxyPushSupplier RtecEventChannelAdmin_ProxyPushSupplierBOAImpl;
-typedef POA_RtecEventComm::PushConsumer RtecEventComm_PushConsumerBOAImpl;
-typedef POA_RtecEventComm::PushSupplier RtecEventComm_PushSupplierBOAImpl;
-
-#if defined (__ACE_INLINE__)
-#include "Local_ESTypes.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_LOCAL_ESTYPES_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.i b/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.i
deleted file mode 100644
index 8f8ef4cfe2d..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.i
+++ /dev/null
@@ -1,5 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-
diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp
deleted file mode 100644
index 8bda764fb41..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-
-#include "Memory_Pools.h"
-#include "Event_Channel.h"
-
-#if !defined (__ACE_INLINE__)
-#include "Memory_Pools.i"
-#endif /* __ACE_INLINE__ */
-
-//ACE_TSS<ACE_ES_Dispatch_Request_Allocator> ACE_ES_Memory_Pools::Dispatch_Request_;
-//ACE_TSS<ACE_ES_Event_Container_Allocator> ACE_ES_Memory_Pools::Event_Container_;
-//ACE_TSS<ACE_ES_Event_Allocator> ACE_ES_Memory_Pools::Event_;
-
-// ************************************************************
-
-int
-ACE_ES_Memory_Pools::thr_init (void)
-{
- // Allocate the memory pool for this thread.
- //Event_Container_.ts_object ();
- //Dispatch_Request_.ts_object ();
- //Event_.ts_object ();
- return 0;
-}
-
-// ************************************************************
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-// For ACE_ES_Memory_Pools.
-template class ACE_Singleton<ACE_ES_Dispatch_Request_Allocator,ACE_SYNCH_MUTEX>;
-template class ACE_Singleton<ACE_ES_Event_Container_Allocator,ACE_SYNCH_MUTEX>;
-template class ACE_Singleton<ACE_ES_Event_Allocator,ACE_SYNCH_MUTEX>;
-// template class ACE_TSS<ACE_ES_Event_Container_Allocator>;
-// template class ACE_TSS<ACE_ES_Dispatch_Request_Allocator>;
-// template class ACE_TSS<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_MEMORY_POOL_MUTEX> >;
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton<ACE_ES_Dispatch_Request_Allocator,ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Singleton<ACE_ES_Event_Container_Allocator,ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Singleton<ACE_ES_Event_Allocator,ACE_SYNCH_MUTEX>
-// #pragma instantiate ACE_TSS<ACE_ES_Event_Container_Allocator>
-// #pragma instantiate ACE_TSS<ACE_ES_Dispatch_Request_Allocator>
-// #pragma instantiate ACE_TSS<ACE_Malloc<ACE_Local_Memory_Pool, ACE_Local_Memory_Pool_Options, ACE_MEMORY_POOL_MUTEX> >
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h
deleted file mode 100644
index 3d4068bf94b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// ORB Services
-//
-// = FILENAME
-// Memory_Pools
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_MEMORY_POOLS_H
-#define ACE_MEMORY_POOLS_H
-
-#include "ace/Synch.h"
-#include "Event_Channel.h"
-#include "Dispatching_Modules.h"
-
-// ************************************************************
-
-#if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION) || !defined (ACE_HAS_THREADS)
- typedef ACE_Null_Mutex ACE_MEMORY_POOL_MUTEX;
-#else
- // Use the same object for each thread. Therefore, we have to use
- // real synchronization.
- typedef ACE_Thread_Mutex ACE_MEMORY_POOL_MUTEX;
-#endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION || !ACE_HAS_THREADS */
-
-typedef char
- ACE_ES_Dispatch_Request_Chunk[sizeof (ACE_ES_Dispatch_Request)];
-
-typedef ACE_Cached_Allocator<ACE_ES_Dispatch_Request_Chunk, ACE_MEMORY_POOL_MUTEX>
- _ACE_Dispatch_Request_Allocator;
-
-class TAO_ORBSVCS_Export ACE_ES_Dispatch_Request_Allocator : public _ACE_Dispatch_Request_Allocator
-// = TITLE
-// Dispatch Request Allocator
-//
-// = DESCRIPTION
-// This just sets the size of the Event Container memory pool.
-{
-public:
- ACE_ES_Dispatch_Request_Allocator (void) :
- _ACE_Dispatch_Request_Allocator (ACE_ES_DISPATCH_REQUEST_MEMORY_POOL) {}
-};
-
-// ************************************************************
-
-typedef char ACE_ES_Event_Container_Chunk[sizeof (ACE_ES_Event_Container)];
-
-typedef ACE_Cached_Allocator<ACE_ES_Event_Container_Chunk, ACE_MEMORY_POOL_MUTEX> _ACE_Event_Container_Allocator;
-
-class TAO_ORBSVCS_Export ACE_ES_Event_Container_Allocator : public _ACE_Event_Container_Allocator
-// = TITLE
-// Event Container Allocator
-//
-// = DESCRIPTION
-// This just sets the size of the Event Container memory pool.
-{
-public:
- ACE_ES_Event_Container_Allocator (void) :
- _ACE_Event_Container_Allocator (ACE_ES_EVENT_CONTAINER_MEMORY_POOL) {}
-};
-
-// ************************************************************
-
-typedef char ACE_ES_Event_Chunk[sizeof (RtecEventComm::Event)];
-
-typedef ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_MEMORY_POOL_MUTEX> ACE_ES_Event_Allocator;
-//typedef ACE_Cached_Allocator<ACE_ES_Event_Chunk, ACE_MEMORY_POOL_MUTEX> _ACE_Event_Allocator;
-
-class TAO_ORBSVCS_Export ACE_ES_Memory_Pools
-// = TITLE
-// Event Service Memory Pools.
-//
-// = DESCRIPTION
-// These have to be static in order to be accessed by operator
-// news, right?
-{
-public:
- static int thr_init (void);
- // This can be called by every thread that will access these memory
- // pools to preallocate the thread specific allocators. It is not
- // mandatory.
-
- static void *new_Event_Container (void);
- static void delete_Event_Container (void *);
- static void *new_Dispatch_Request (void);
- static void delete_Dispatch_Request (void *);
- static void *new_Event (size_t);
- static void delete_Event (void *);
-
- typedef ACE_Singleton<ACE_ES_Dispatch_Request_Allocator,ACE_SYNCH_MUTEX> Dispatch_Request_;
- typedef ACE_Singleton<ACE_ES_Event_Container_Allocator,ACE_SYNCH_MUTEX> Event_Container_;
- typedef ACE_Singleton<ACE_ES_Event_Allocator,ACE_SYNCH_MUTEX> Event_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "Memory_Pools.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_MEMORY_POOLS_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i
deleted file mode 100644
index f2d73d94ed3..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE void *
-ACE_ES_Memory_Pools::new_Event_Container (void)
-{
- return Event_Container_::instance ()->malloc (sizeof (ACE_ES_Event_Container));
-}
-
-ACE_INLINE void
-ACE_ES_Memory_Pools::delete_Event_Container (void *mem)
-{
- Event_Container_::instance ()->free (mem);
-}
-
-ACE_INLINE void *
-ACE_ES_Memory_Pools::new_Dispatch_Request (void)
-{
- return Dispatch_Request_::instance ()->malloc (sizeof (ACE_ES_Dispatch_Request));
-}
-
-ACE_INLINE void
-ACE_ES_Memory_Pools::delete_Dispatch_Request (void *mem)
-{
- Dispatch_Request_::instance ()->free (mem);
-}
-
-#define USE_MEM_POOLS 1
-
-ACE_INLINE void *
-ACE_ES_Memory_Pools::new_Event (size_t len)
-{
-#if USE_MEM_POOLS
- const u_int ev_size = sizeof (RtecEventComm::Event);
- const u_int size = (ev_size % ACE_MALLOC_ALIGN) ?
- ((ev_size / ACE_MALLOC_ALIGN) + 1) * ACE_MALLOC_ALIGN : ev_size;
-
- char *const addr = (char *) Event_::instance ()->malloc (len * size);
-#else
- char *const addr = new char[len * sizeof (ACE_ES_Event)];
-#endif
-
- return addr;
-}
-
-ACE_INLINE void
-ACE_ES_Memory_Pools::delete_Event (void *mem)
-{
-#if USE_MEM_POOLS
- Event_::instance ()->free (mem);
-#else
- delete [] mem;
-#endif
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
deleted file mode 100644
index 07e23495662..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-// $Id$
-
-#include "ace/Sched_Params.h"
-#include "orbsvcs/Scheduler_Factory.h"
-#include "RT_Task.h"
-#include "Debug_Macros.h"
-#include "Event_Channel.h"
-#include "Memory_Pools.h"
-
-#if !defined (__ACE_INLINE__)
-#include "RT_Task.i"
-#endif /* __ACE_INLINE__ */
-
-class ACE_RT_Task_Shutdown : public ACE_RT_Task_Command
-// = TITLE
-// Flush Queue Command.
-//
-// = DESCRIPTION
-// This command object will call close on task_. This is used by
-// single-threaded tasks to flush any queued messages.
-{
-public:
- ACE_RT_Task_Shutdown (ACE_ES_TASK *task)
- : task_ (task) {}
-
- virtual int execute (u_long &command_action);
-
- ACE_ES_TASK *task_;
-};
-
-int
-ACE_RT_Task_Shutdown::execute (u_long &command_action)
-{
- ACE_UNUSED_ARG (command_action);
-
- if (task_ == 0)
- return 1;
- else
- {
- task_->close (0);
- return 0;
- }
-}
-
-// ************************************************************
-// ************************************************************
-
-ACE_RT_Task::ACE_RT_Task (void)
- : closed_ (0)
-{
-}
-
-ACE_RT_Task::~ACE_RT_Task (void)
-{
- msg_queue_->deactivate ();
-}
-
-int
-ACE_RT_Task::svc (void)
-{
- int done = 0;
-
- ACE_hthread_t self;
- ACE_OS::thr_self (self);
-
- int priority;
- if (ACE_OS::thr_getprio (self, priority) == 0)
- ACE_DEBUG ((LM_DEBUG, "(%t) new thread priority = %d.\n", priority));
-
- // Initialize channel thread-specific data.
- ACE_ES_Memory_Pools::thr_init ();
-
- done = this->svc_hook (priority);
-
- while (!done)
- {
- done = this->svc_one ();
- }
-
- ACE_DEBUG ((LM_DEBUG, "(%t) thread exiting.\n"));
- return 0;
-}
-
-int
-ACE_RT_Task::svc_hook (RtecScheduler::OS_Priority)
-{
- return 0;
-}
-
-int
-ACE_RT_Task::svc_one (void)
-{
- // Dequeue the command.
- ACE_Message_Block *mb;
-
- if (this->getq (mb) == -1)
- {
- if (ACE_OS::last_error () == ESHUTDOWN)
- return 1;
- else
- // We'll continue in spite of this error.
- ACE_ERROR ((LM_ERROR, "%p (%t) getq error.\n", "ACE_RT_Task::svc_one"));
- }
-
- // Execute the command.
- ACE_RT_Task_Command *command = (ACE_RT_Task_Command *) mb;
-
- int result;
- u_long command_action = ACE_RT_Task_Command::RELEASE;
-
- ACE_TIMEPROBE (" RT_Task - start execute");
-
- // @@ Put exception handling around this!
- result = command->execute (command_action);
-
- ACE_TIMEPROBE (" RT_Task - end execute");
-
- switch (command_action)
- {
- case ACE_RT_Task_Command::RELEASE:
- // Free the message block.
- if (ACE_RT_Task_Command::release (command) != 0)
- ACE_ERROR ((LM_ERROR, "ACE_RT_Task::svc_one: "
- "ACE_RT_Task_Command::release returned != 0!\n"));
- break;
-
- case ACE_RT_Task_Command::UNGETQ:
- this->ungetq (command);
- break;
- }
-
- return result;
-}
-
-// A thread has exited.
-int
-ACE_RT_Task::close (u_long)
-{
- // If we're the last one out, call threads_closed.
- if (thr_count_ == 0)
- this->threads_closed ();
-
- return 0;
-}
-
-// All threads have exited.
-void
-ACE_RT_Task::threads_closed (void)
-{
-}
-
-int
-ACE_RT_Task::open_task (const char* name)
-{
- const char *tempname = name;
- char tempbuffer[64];
- if (tempname == 0)
- {
- ACE_OS::sprintf (tempbuffer, "unnamed task %d", (long) this);
- tempname = tempbuffer;
- }
-
- TAO_TRY
- {
- rt_info_ =
- ACE_Scheduler_Factory::server()->create (tempname,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- // @@ TODO: We do no initialization of the new rt_info, the
- // caller does, this is (IMnsHO) very error prone.
- }
- TAO_CATCH (RtecScheduler::DUPLICATE_NAME, dn_ex)
- {
- // @@ TODO: Its already registered, IMHO this should at least
- // report a warning, but I'll stick to the previous code.
- // ACE_ERROR_RETURN ((LM_WARNING,
- // "RT_Info for %s was already createn",
- // tempname), 0);
- return 0;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-int
-ACE_RT_Task::try_put (ACE_Message_Block *mb)
-{
- if (!closed_)
- {
- return this->msg_queue ()->enqueue_prio (mb);
- }
- else
- {
- errno = EPIPE;
- return -1;
- }
-}
-
-// The point of this method is to spawn or shutdown threads depending
-// on any differences between the task's RT_Info::threads_ and how
-// many threads are actually running.
-int
-ACE_RT_Task::synch_threads (size_t threads)
-{
- if (threads > this->thr_count ())
- // Add threads.
- {
- RtecScheduler::OS_Priority thread_priority;
- RtecScheduler::Sub_Priority subpriority;
- RtecScheduler::Preemption_Priority preemption_priority;
-
- TAO_TRY
- {
- // @@ TODO handle exceptions
- ACE_TIMEPROBE (" synch_threads - priority requested");
- ACE_Scheduler_Factory::server ()->priority
- (rt_info_,
- thread_priority,
- subpriority,
- preemption_priority, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- ACE_TIMEPROBE (" synch_threads - priority obtained");
-
- ACE_DEBUG ((LM_DEBUG, "(%t) spawning %d threads at os thread"
- " priority %d.\n",
- threads - this->thr_count (),
- thread_priority));
-
- // This is here so that the constructor does not call it. The
- // ORB has an instance of one of these.
- this->thr_mgr (ACE_Task_Manager::instance ()->ThrMgr ());
-
- // Add the difference.
- // First try real-time scheduling with specified priority.
- long flags = THR_BOUND | THR_SCHED_FIFO;
- if (this->activate (flags,
- threads - this->thr_count (),
- 1, // Force it to spawn more threads
- thread_priority) == -1)
- {
- // That didn't work. Try default scheduling class with
- // the requested priority.
- flags = THR_BOUND;
- if (this->activate (flags,
- threads - this->thr_count (),
- 1, // Force it to spawn more threads
- thread_priority) == -1)
- {
- // That didn't work. Finally, try default
- // scheduling class with minimum priority.
-
- // On Linux, for example, only the superuser can set
- // the policy to other than ACE_SCHED_OTHER. But
- // with ACE_SCHED_OTHER, there is only one thread
- // priority value, for example, 0. So, let the
- // superuser run an interesting test, but for other
- // users use the minimum ACE_SCHED_OTHER thread
- // priority.
-
- RtecScheduler::OS_Priority fallback_priority =
- ACE_Sched_Params::priority_min (ACE_SCHED_OTHER,
- ACE_SCOPE_THREAD);
-
- ACE_DEBUG ((LM_DEBUG, "(%t) task activation at priority %d "
- "with flags 0x%X failed; retry at priority %d "
- "with flags 0x%X\n",
- thread_priority,
- flags,
- fallback_priority,
- THR_BOUND));
-
- flags = THR_BOUND;
-
- if (this->activate (flags,
- threads - this->thr_count (),
- 1, // Force it to spawn more threads
- fallback_priority) == -1)
- {
- ACE_DEBUG ((LM_ERROR,
- "(%t) thread spawn at priority %d FAILED "
- "(errno is %d%p)!!!!\n",
- fallback_priority,
- errno,
- ""));
- }
- }
- }
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "priority failed\n"), -1);
- }
- TAO_ENDTRY;
-
- }
- else
- // Remove threads.
- {
- // kill_threads has to be off the stack in case the last thread
- // deletes this RT_Task.
- int kill_threads = this->thr_count () - threads;
-
- for (int x = kill_threads ; x > 0; x--)
- {
- // Create a new shutdown command with a task pointer of 0.
- ACE_RT_Task_Shutdown *te = new ACE_RT_Task_Shutdown (0);
-
- if (te == 0)
- return -1;
-
- ACE_DEBUG ((LM_DEBUG, "(%t) enqueueing thread exit.\n"));
- if (this->putq (te) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p putq failed.\n",
- "ACE_RT_Task::synch_threads"));
- if (ACE_RT_Task_Shutdown::release (te) != 0)
- ACE_ERROR ((LM_ERROR, "ACE_RT_Task::synch_threads: "
- "ACE_RT_Task_Shutdown::release returned != 0!\n"));
- return -1;
- }
- }
- }
-
- return 0;
-}
-
-
-// If we are not active, we will flush the queue and then call
-// this->close. Otherwise, we will send shutdown messages to each
-// thread. ~ACE_Task_Exit will call this->close when each thread
-// exits.
-int
-ACE_RT_Task::shutdown_task (void)
-{
- // Be sure to only execute this once, and only if we're active.
- if (closed_)
- return 0;
-
- // This will keep any messages from entering the queue.
- closed_ = 1;
-
- if (thr_count_ > 0)
- return this->synch_threads (0);
- else
- {
- // Create a new flush queue command. We're passive, so pass in
- // a reference to the task for which close will be called.
- ACE_RT_Task_Shutdown *fq = new ACE_RT_Task_Shutdown (this);
-
- if (fq == 0)
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_RT_Task::shutdown_threads"));
- return -1;
- }
-
- // Enqueue the command.
- ACE_DEBUG ((LM_DEBUG, "(%t) enqueueing task shutdown.\n"));
- if (this->putq (fq) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p putq failed.\n",
- "ACE_RT_Task::shutdown_task"));
- if (ACE_RT_Task_Shutdown::release (fq) != 0)
- ACE_ERROR ((LM_ERROR, "ACE_RT_Task::shutdown_task: "
- "ACE_RT_Task_Shutdown::release returned != 0!\n"));
- return -1;
- }
- }
-
- return 0;
-}
-
-// ************************************************************
-
-ACE_RT_Thread_Manager::ACE_RT_Thread_Manager (void)
- : flags_ (0)
-{
-}
-
-void
-ACE_RT_Thread_Manager::suspend_spawns (void)
-{
- flags_ |= THR_SUSPENDED;
-}
-
-void
-ACE_RT_Thread_Manager::unsuspend_spawns (void)
-{
- flags_ = 0;
- this->resume_all ();
-}
-
-int
-ACE_RT_Thread_Manager::spawn_i (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t *t_id,
- ACE_hthread_t *t_handle,
- long priority,
- int grp_id,
- void *stack,
- size_t stack_size,
- ACE_Task_Base *task)
-{
- flags |= flags_;
- return ACE_Thread_Manager::spawn_i (func, args, flags, t_id, t_handle,
- priority, grp_id, stack, stack_size, task);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.h b/TAO/orbsvcs/orbsvcs/Event/RT_Task.h
deleted file mode 100644
index a74816af215..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// RT_Task
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// Wrapper on top of ACE Task that integrates an Active Object with
-// the Event Service.
-//
-// ============================================================================
-
-#if !defined (ACE_RT_TASK_H)
-#define ACE_RT_TASK_H
-
-#include "ace/Task.h"
-#include "orbsvcs/RtecSchedulerC.h"
-
-class TAO_ORBSVCS_Export ACE_RT_Thread_Manager : public ACE_Thread_Manager
- // = TITLE
- //
- // = DESCRIPTION
-{
-public:
- ACE_RT_Thread_Manager (void);
- // Default construction.
-
- void suspend_spawns (void);
- // Any threads spawned will be suspended until <unsuspend_spawns> is
- // called.
-
- void unsuspend_spawns (void);
- // Resumes all threads.
-
-protected:
- virtual int spawn_i (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t * = 0,
- ACE_hthread_t *t_handle = 0,
- long priority = 0,
- int grp_id = -1,
- void *stack = 0,
- size_t stack_size = 0,
- ACE_Task_Base *task = 0);
-
- int flags_;
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_RT_Task_Command : public ACE_Message_Block
-// = TITLE
-//
-// = DESCRIPTION
-{
-public:
- virtual ~ACE_RT_Task_Command (void) {}
- // Guarantees that derived destructors get called.
-
- enum { RELEASE, UNGETQ };
-
- virtual int execute (u_long &command_action) = 0;
- // Execute the command. Returning 1 will make the calling thread
- // exit. Returning 0 will allow the thread to continue dispatching
- // commands. If <command_action> returns as RELEASE, the command
- // will be released. If <command_action> == UNGETQ, then the
- // command will be requeued and dispatched again.
-};
-
-// ************************************************************
-
-// In Synch_T.h:
-// #define ACE_MT_SYNCH ACE_Thread_Mutex,ACE_Condition_Thread_Mutex
-
-typedef ACE_Task<ACE_SYNCH> ACE_ES_TASK;
-typedef ACE_Message_Queue<ACE_SYNCH> ACE_ES_QUEUE;
-
-class TAO_ORBSVCS_Export ACE_RT_Task : public ACE_ES_TASK
-{
- // = TITLE
- // ACE Real-Time Task
- //
- // = DESCRIPTION
- // Real-Time Active Object that integrates with a global
- // scheduler and Event Service. For now, none of the management
- // methods are synchronized. If it turns out that multiple
- // threads will be calling the management methods, then we can
- // add synchronization. For the most part, RT_Task threads
- // should be dequeueing commands from the message queue. Only
- // one thread should be calling any management methods.
- friend ACE_RT_Thread_Manager;
-public:
- ACE_RT_Task (void);
- // Default construction.
-
- ~ACE_RT_Task (void);
- // Deactivates the queue.
-
- // = Management methods.
-
- int open_task (const char* name = 0);
- // <name> is used to look up our qos info from the scheduler. If
- // <name> == 0, then we create a "unique" name and ask the scheduler
- // for a new qos structure. If we find an existing qos structure,
- // calls this->synch_threads and returns 1. If a qos structure is not
- // found, but created returns 0 and does not call synch_threads.
- // Returns -1 on failure.
-
- int try_put (ACE_Message_Block *mb);
- // Enqueue a request. Returns 0 on success, -1 on failure. If the
- // task is shutdown, -1 is returned with errno == EPIPE.
-
- int shutdown_task (void);
- // If active, shutdown all running thread. Since this is
- // accomplished via queued shutdown messages, this has the effect of
- // flushing the queue. Once all threads exit, threads_closed will
- // be called. If this is a passive object, then the queue will be
- // flushed and threads_closed will be called.
-
- int synch_threads (size_t threads);
- // Compare <threads> with what is actually running. If there are
- // any differences, update this RT_Task. This may involve spawning
- // more threads or changing thread priorities, etc. This can be
- // used to close all threads by sending a 0.
-
- RtecScheduler::handle_t rt_info (void);
- // QOS accessor. The behavior of the task can be changed by setting
- // this and then calling this->synch_threads.
-
- virtual void threads_closed (void);
- // Called when every thread has exited. This hook allows
- // applications to specify semantics when all threads have exited.
- // For instance, the Dispatching Module uses this hook to delete
- // itself when an application is shutting down.
-
- virtual int svc_hook (RtecScheduler::OS_Priority priority);
- // This is called the first time the thread is spawned. <priority>
- // is the priority of the current thread. If this returns != 1
- // (e.g., 0), the event loop will execute (calling this->svc_one).
- // If this returns 1, the event loop will not execute.
-
- virtual int svc_one (void);
- // Call this->getq once and execute the command. Returns the result
- // of command->execute ().
-
-protected:
- RtecScheduler::handle_t rt_info_;
- // Scheduling characteristics of this active object.
-
- int closed_;
- // Set to 1 when this->shutdown_threads or this->close_queue is
- // called. Keeps us from enqueuing more that one shutdown message.
-
- virtual int svc (void);
- // Run by each thread spawned. Each thread dequeues
- // ACE_RT_Task_Commands and executes them.
-
- virtual int close (u_long flags = 0);
- // Called each time a thread exits.
-
- void close_all_threads (void);
- // Enqueues shutdown message for every thread in the task.
-};
-
-#if defined (__ACE_INLINE__)
-#include "RT_Task.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_RT_TASK_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.i b/TAO/orbsvcs/orbsvcs/Event/RT_Task.i
deleted file mode 100644
index b6b21d50494..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.i
+++ /dev/null
@@ -1,8 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE RtecScheduler::handle_t
-ACE_RT_Task::rt_info (void)
-{
- return rt_info_;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.cpp b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.cpp
deleted file mode 100644
index fdd7e894d2e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#include "ace/High_Res_Timer.h"
-#include "tao/Timeprobe.h"
-#include "orbsvcs/Scheduler_Factory.h"
-
-#include "ReactorTask.h"
-
-ACE_ES_Reactor_Task::ACE_ES_Reactor_Task() :
- // reactor_ (0, &timer_queue_),
- done_ (0)
-{
- // Change the timer mechanism used by the reactor and the timer
- // queue.
-#if defined (VXWORKS)
- timer_queue_.gettimeofday (ACE_OS::gettimeofday);
-#else
- timer_queue_.gettimeofday (ACE_High_Res_Timer::gettimeofday);
-#endif /* VXWORKS */
-}
-
-ACE_ES_Reactor_Task::~ACE_ES_Reactor_Task (void)
-{
-}
-
-int
-ACE_ES_Reactor_Task::svc_hook(RtecScheduler::OS_Priority)
-{
- // Make ourselves owner of the reactor.
- reactor_.owner (ACE_Thread::self());
- return 0;
-}
-
-int
-ACE_ES_Reactor_Task::open_reactor (RtecScheduler::Period &period)
-{
- // Create a name for ourselves using the period. The period is
- // in 100 ns units; first convert to usec by dividing by 10.
- char temp[64];
- ACE_OS::sprintf (temp, "Reactor_Task-%u.us", period / 10);
-
- // Open the task. This will query the scheduler for our qos
- // structure.
- int result = this->open_task (temp);
-
- switch (result)
- {
- case -1:
- // Error.
- ACE_ERROR ((LM_ERROR, "(%t) Scheduler could not find operation %s.\n",
- temp));
- return -1;
-
- case 0:
- // @@ TODO handle exceptions
- {
- TAO_TRY
- {
- ACE_Scheduler_Factory::server()->set(rt_info_,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- period,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "set failed\n"), -1);
- }
- TAO_ENDTRY;
- }
- break;
-
- case 1:
- // Found.
- break;
- }
-
- return this->synch_threads (1);
-}
-
-int ACE_ES_Reactor_Task::svc_one()
-{
- ACE_TIMEPROBE (" Reactor_Task - waiting for events");
- if (reactor_.handle_events() == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p.\n", "ACE_ES_Reactor_Task::svc"));
- ACE_TIMEPROBE (" Reactor_Task - events handled");
-
- if (done_)
- ACE_DEBUG ((LM_DEBUG, "(%t) Timer Task is done.\n"));
-
- return done_;
-}
-
-void ACE_ES_Reactor_Task::threads_closed()
-{
- delete this;
-}
-
-void ACE_ES_Reactor_Task::shutdown_task()
-{
- done_ = 1;
- reactor_.notify();
-}
-
-ACE_ES_Reactor_Task::Reactor&
-ACE_ES_Reactor_Task::get_reactor()
-{
- return reactor_;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h
deleted file mode 100644
index 3bd0a1c25c1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// $Id$
-
-#if !defined ACE_ReactorTask_H
-#define ACE_ReactorTask_H
-
-// BBM, moved this here from UPSingleProcessorOrb.h
-//## begin module.includes preserve=yes
-#include "Fast_Reactor.h"
-#if defined (ACE_OLD_STYLE_REACTOR)
-# define ACE_ORB_REACTOR ACE_ES_Fast_Reactor
-#endif /* ACE_OLD_STYLE_REACTOR */
-//## end module.includes
-
-// Added these.
-#include "ace/Timer_Heap.h"
-#include "ace/Timer_List.h"
-
-#include "Local_ESTypes.h"
-#include "RT_Task.h"
-
-class TAO_ORBSVCS_Export ACE_ES_Reactor_Task : public ACE_RT_Task
-// = TITLE
-// Event Service Timer Task
-//
-// = DESCRIPTION
-// An active object that dispatches timers from its own ReactorEx.
-{
-public:
- // BBM, added this.
-#if defined (ACE_OLD_STYLE_REACTOR)
- typedef ACE_ORB_REACTOR Reactor;
-#else
- typedef ACE_Reactor Reactor;
-#endif /* ACE_OLD_STYLE_REACTOR */
-
- ACE_ES_Reactor_Task();
- // Default construction.
-
- ~ACE_ES_Reactor_Task();
- // Destruction.
-
- virtual int svc_hook(RtecScheduler::OS_Priority);
- // Assume ownership of the reactor_.
-
- int open_reactor (RtecScheduler::Period &period);
- // This is a hack for now.
-
- virtual int svc_one();
- // Calls reactor_.handle_events until done_ is set.
-
- void shutdown_task();
- // Sets done_ and notifies the reactor_.
-
- Reactor &get_reactor();
- // ReactorEx accessor.
-
- virtual void threads_closed();
- // Deletes this.
-
-private:
- ACE_Timer_List timer_queue_;
- // The timer storage mechanism used by reactor_.
-
-#if !defined (ACE_OLD_STYLE_REACTOR)
- ACE_ES_Fast_Reactor fast_reactor_;
- // The timer dispatch mechanism.
-#endif /* ! ACE_OLD_STYLE_REACTOR */
-
- Reactor reactor_;
- // "Public" handle to fast_reactor_.
-
- sig_atomic_t done_;
- // When set, end the event loop.
-};
-
-#endif /* ACE_ReactorTask_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Task_Manager.cpp b/TAO/orbsvcs/orbsvcs/Event/Task_Manager.cpp
deleted file mode 100644
index fdbf2202eb1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Task_Manager.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-#include "Task_Manager.h"
-#include "ReactorTask.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "Task_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_Task_Manager::ACE_Task_Manager()
-{
- for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
- {
- reactorTasks[x] = 0;
- }
-}
-
-void ACE_Task_Manager::initialize()
-{
- for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
- {
- // Convert ACE_Scheduler_Rate (it's really a period, not a rate!)
- // to a form we can easily work with.
- ACE_Time_Value period_tv;
- ORBSVCS_Time::TimeT_to_Time_Value (period_tv, ACE_Scheduler_Rates[x]);
-
- RtecScheduler::Period period = period_tv.sec () * 10000000 +
- period_tv.usec () * 10;
-
- reactorTasks[x] = new ReactorTask;
-
- if (reactorTasks[x] == 0 ||
- reactorTasks[x]->open_reactor (period) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ORB::initialize_reactors"));
- return;
- }
- }
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Singleton<ACE_Task_Manager,ACE_SYNCH_MUTEX>;
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton<ACE_Task_Manager,ACE_SYNCH_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Task_Manager.h b/TAO/orbsvcs/orbsvcs/Event/Task_Manager.h
deleted file mode 100644
index 9e097a957e8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Task_Manager.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-
-#if !defined(TASK_MANAGER_H)
-#define TASK_MANAGER_H
-
-#include "ace/ACE.h"
-#include "ace/Singleton.h"
-#include "orbsvcs/Event_Service_Constants.h"
-#include "RT_Task.h"
-
-class ACE_ES_Reactor_Task;
-
-class TAO_ORBSVCS_Export ACE_Task_Manager
-// = TITLE
-// Singleton class for the pool of ACE_ReactorTask.
-//
-// = DESCRIPTION
-// The EventChannel uses a pool of ACE_ReactorTask to handle the
-// dispatching of Events. In real-time multi-threaded enviroments
-// this maps to a different thread per priority.
-// This class offers a centralized access point to those tasks and
-// some related services.
-//
-{
-public:
- typedef ACE_ES_Reactor_Task ReactorTask;
-
- static ACE_Task_Manager* instance();
- // Returns the singleton.
-
- ReactorTask* GetReactorTask(RtecScheduler::OS_Priority priority);
- // Obtain the ReactorTask for the given priority.
- // The Task must have been created already.
-
- ACE_RT_Thread_Manager* ThrMgr();
- // Returns a global ThreadManager for the Task pool.
-
-private:
- friend class ACE_Singleton<ACE_Task_Manager,ACE_SYNCH_MUTEX>;
- ACE_Task_Manager();
-
- void initialize();
-
-private:
- ReactorTask *reactorTasks[ACE_Scheduler_MAX_PRIORITIES];
- ACE_RT_Thread_Manager thr_mgr;
-};
-
-#if defined (__ACE_INLINE__)
-#include "Task_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TASK_MANAGER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Task_Manager.i b/TAO/orbsvcs/orbsvcs/Event/Task_Manager.i
deleted file mode 100644
index 35abcc0268c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event/Task_Manager.i
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// $Id$
-//
-
-ACE_INLINE ACE_Task_Manager::ReactorTask*
-ACE_Task_Manager::GetReactorTask(RtecScheduler::OS_Priority priority)
-{
- if (reactorTasks[priority] == 0)
- {
- initialize();
- //ACE_ERROR_RETURN ((LM_ERROR,
- //"%p no reactor task for priority %d.\n",
- //"ACE_Task_Manager::GetReactor",
- //priority), 0);
- }
-
- return reactorTasks[priority];
-}
-
-ACE_INLINE ACE_RT_Thread_Manager* ACE_Task_Manager::ThrMgr()
-{
- return &thr_mgr;
-}
-
-ACE_INLINE ACE_Task_Manager* ACE_Task_Manager::instance()
-{
- return ACE_Singleton<ACE_Task_Manager,ACE_SYNCH_MUTEX>::instance();
-}
-
-
diff --git a/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h b/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h
deleted file mode 100644
index af5900ffb46..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-//
-// = DESCRIPTION
-// Keep constants required by both Event Service implementation and
-// the Scheduling Service implementation.
-//
-
-#if !defined (ACE_ES_CONSTANTS_H)
-#define ACE_ES_CONSTANTS_H
-
-#include "ace/Message_Block.h"
-#include "ace/Synch.h"
-#include "orbsvcs/Time_Utilities.h"
-
-const int ACE_ES_MAX_SUBSCRIPTIONS = 32;
-// This is the number of events a consumer can subscribe to.
-
-//const int ACE_ES_MAX_SUPPLIERS = 100;
-// Max number of suppliers that a channel can handle.
-
-const int ACE_ES_MAX_CONSUMERS_PER_SUPPLIER = 100;
-// Max number of consumers that one supplier can have subscribed to
-// one type of event (including source-only). This restriction is
-// very lightweight since subscription lists are dynamic. This
-// constant is only used for ACE_ES_Simple_Set in Event_Channel.* for
-// disconnecting consumers. Since these objects are allocated off the
-// stack, we can increase this number without requiring more heap
-// memory.
-
-// = Predefined event types. All application defined types should be
-// relative to ACE_ES_EVENT_UNDEFINED.
-const long ACE_ES_EVENT_ANY = 0;
-const long ACE_ES_EVENT_SHUTDOWN = 1;
-const long ACE_ES_EVENT_ACT = 2;
-const long ACE_ES_EVENT_NOTIFICATION = 3;
-const long ACE_ES_EVENT_TIMEOUT = 4;
-const long ACE_ES_EVENT_INTERVAL_TIMEOUT = 5;
-const long ACE_ES_EVENT_DEADLINE_TIMEOUT = 6;
-const long ACE_ES_GLOBAL_DESIGNATOR = 7;
-const long ACE_ES_CONJUNCTION_DESIGNATOR = 8;
-const long ACE_ES_DISJUNCTION_DESIGNATOR = 9;
-const long ACE_ES_EVENT_UNDEFINED = 16;
-
-// The max number of priorities provided by the target platform.
-// TODO: This should be defined in ACE (somehow) and only mapped here
-// to some variables (and even that is doubtful).
-const long ACE_Scheduler_MAX_PRIORITIES = 5;
-
-const TimeBase::TimeT ACE_Scheduler_Rates[ACE_Scheduler_MAX_PRIORITIES] = {
- { 250000, 0}, // 40 Hz
- { 500000, 0}, // 20 Hz
- { 1000000, 0}, // 10 Hz
- { 2000000, 0}, // 5 Hz
- { 10000000, 0} // 1 Hz
-};
-
-// The minimum preemption priority.
-const long ACE_Scheduler_MIN_PREEMPTION_PRIORITY =
- ACE_Scheduler_MAX_PRIORITIES - 1;
-// Max preemption priority.
-const long ACE_Scheduler_MAX_PREEMPTION_PRIORITY = 0;
-
-// This is the maximum sub priority.
-const u_long ACE_Scheduler_MAX_SUB_PRIORITY =
- ACE_Message_Block::MB_USER - 1;
-
-// This is the minimum sub priority.
-const u_long ACE_Scheduler_MIN_SUB_PRIORITY =
- ACE_Message_Block::MB_NORMAL;
-
-typedef ACE_SYNCH_MUTEX ACE_ES_MUTEX;
-typedef ACE_Guard<ACE_ES_MUTEX> ACE_ES_GUARD;
-
-typedef ACE_SYNCH_RW_MUTEX ACE_ES_RW_LOCK;
-typedef ACE_Write_Guard<ACE_ES_RW_LOCK> ACE_ES_WGUARD;
-typedef ACE_Read_Guard<ACE_ES_RW_LOCK> ACE_ES_RGUARD;
-
-// ************************************************************
-// Channel configuration parameters.
-
-// ACE_ES_DISPATCHING_MODULE determines what Dispatching Module is
-// used by the channel. ACE_ES_Dispatching_Base is a null dispatcher
-// that can be used to build an EFD.
-#define ACE_ES_DISPATCHING_MODULE ACE_ES_Priority_Dispatching
-//#define ACE_ES_DISPATCHING_MODULE ACE_ES_Dispatching_Base
-
-// This is the number of threads spawned for *each* priority queue in
-// the channel's Dispatching Module. This is used by the channel when
-// creating the dispatch module.
-const int THREADS_PER_DISPATCH_QUEUE = 1;
-
-// This is the chunk size of the cached allocator for
-// ACE_ES_Event_Container.
-const int ACE_ES_EVENT_CONTAINER_MEMORY_POOL = 1024;
-const int ACE_ES_EVENT_MEMORY_POOL = 1024;
-const int ACE_ES_DISPATCH_REQUEST_MEMORY_POOL = 1024;
-
-#endif /* ACE_ES_CONSTANTS_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp b/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp
deleted file mode 100644
index 256f4d65b73..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// $Id$
-//
-#include "orbsvcs/Event_Utilities.h"
-
-#if !defined (__ACE_INLINE__)
-#include "orbsvcs/Event_Utilities.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ConsumerQOS_Factory::ACE_ConsumerQOS_Factory (void) :
- qos_ (),
- designator_set_ (0)
-{
-}
-
-ACE_ConsumerQOS_Factory::~ACE_ConsumerQOS_Factory (void)
-{
-}
-
-int
-ACE_ConsumerQOS_Factory::start_conjunction_group (void)
-{
- int l = qos_.dependencies.length ();
- qos_.dependencies.length (l + 1);
- qos_.dependencies[l].event_.type_ = ACE_ES_CONJUNCTION_DESIGNATOR;
- // TODO: qos_.dependencies[l].event_.data_.lval (0);
- designator_set_ = 1;
- return 0;
-}
-
-int
-ACE_ConsumerQOS_Factory::start_disjunction_group (void)
-{
- int l = qos_.dependencies.length ();
- qos_.dependencies.length (l + 1);
- qos_.dependencies[l].event_.type_ = ACE_ES_DISJUNCTION_DESIGNATOR;
- // TODO: qos_.dependencies[l].event_.data_.lval (0);
- designator_set_ = 1;
- return 0;
-}
-
-int
-ACE_ConsumerQOS_Factory::insert (const RtecEventChannelAdmin::Dependency &subscribe)
-{
- RtecScheduler::RT_Info dummy;
- // Make sure that a designator is first.
- if (designator_set_ == 0)
- {
- int l = qos_.dependencies.length ();
- qos_.dependencies.length (l + 1);
- qos_.dependencies[l].event_.type_ = ACE_ES_GLOBAL_DESIGNATOR;
- // TODO: IDL union qos_.dependencies[l].event_.data_.lval (0);
- designator_set_ = 1;
- }
-
- int l = qos_.dependencies.length ();
- qos_.dependencies.length (l + 1);
- qos_.dependencies[l] = subscribe;
- // TODO: IDL union qos_.dependencies[l].event_.data_.lval (0);
- return 0;
-}
-
-void event_debug (const char* p,
- const RtecEventComm::Event& event)
-{
- int l = ACE_OS::strlen (p);
- ACE_DEBUG ((LM_DEBUG,
- "%*.*s - event.source: %d\n"
- "%*.*s event.type: %d\n"
- "%*.*s event.time: %f\n",
- l, l, p, event.source_,
- l, l, p, event.type_,
- l, l, p, event.creation_time_));
-}
-
-void
-ACE_ConsumerQOS_Factory::debug (const RtecEventChannelAdmin::ConsumerQOS& qos)
-{
- ACE_DEBUG ((LM_DEBUG, "ConsumerQOS { \n"));
-
- for (u_int i = 0; i < qos.dependencies.length (); ++i)
- {
- char buf[128];
- ACE_OS::sprintf (buf, " dep[%d]", i);
- event_debug (buf, qos.dependencies[i].event_);
- ACE_DEBUG ((LM_DEBUG, "%s rt_info: %d\n",
- buf, qos.dependencies[i].rt_info));
- }
- ACE_DEBUG ((LM_DEBUG, "}\n"));
-}
-
-// ************************************************************
-
-ACE_SupplierQOS_Factory::ACE_SupplierQOS_Factory (void) :
- qos_ ()
-{
-}
-
-int
-ACE_SupplierQOS_Factory::insert (RtecEventComm::EventSourceID sid,
- RtecEventComm::EventType type,
- RtecScheduler::handle_t rt_info,
- u_int ncalls)
-{
- int l = qos_.publications_.length ();
- qos_.publications_.length (l + 1);
- qos_.publications_[l].event_.source_ = sid;
- qos_.publications_[l].event_.type_ = type;
- // TODO: IDL union qos_.publications_[l].event_.data_.lval (0);
- qos_.publications_[l].dependency_info_.rt_info = rt_info;
- qos_.publications_[l].dependency_info_.number_of_calls = ncalls;
- return 0;
-}
-
-void ACE_SupplierQOS_Factory::debug (const RtecEventChannelAdmin::SupplierQOS& qos)
-{
- ACE_DEBUG ((LM_DEBUG, "ConsumerQOS { \n"));
- for (u_int i = 0; i < qos.publications_.length (); ++i)
- {
- char buf[128];
- ACE_OS::sprintf (buf, " publications[%d]", i);
- event_debug (buf, qos.publications_[i].event_);
- ACE_DEBUG ((LM_DEBUG,
- "%s dependency_info.rt_info: %d\n"
- "%s dependency_info.number_of_calls: %d\n",
- buf, qos.publications_[i].dependency_info_.rt_info,
- buf, qos.publications_[i].dependency_info_.number_of_calls));
- }
- ACE_DEBUG ((LM_DEBUG, "}\n"));
-
-}
diff --git a/TAO/orbsvcs/orbsvcs/Event_Utilities.h b/TAO/orbsvcs/orbsvcs/Event_Utilities.h
deleted file mode 100644
index 687513e6b21..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event_Utilities.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-//
-// = LIBRARY
-// ace ORB
-//
-// = FILENAME
-// Event_Utilities
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// ============================================================================
-
-#ifndef ACE_EVENT_UTILITIES_H
-#define ACE_EVENT_UTILITIES_H
-
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/Event_Service_Constants.h"
-
-class TAO_ORBSVCS_Export ACE_ConsumerQOS_Factory
-// = TITLE
-// Consumer QOS Factory
-//
-// = DESCRIPTION
-//
-// This class allows easy (free from CORBA IDL constraints)
-// construction of RtecEventChannelAdmin::ConsumerQOS structures.
-//
-// = CORRELATIONS
-//
-// ACE_ConsumerQOS_Factory separates subscriptions into conjunction
-// and disjunction groups. A group can be thought of as a set of
-// events inside parenthesis: (A+B+C), where A,B, and C are
-// events.
-//
-// The following code would be used to represent (A+B) | (B+C):
-//
-// ACE_ConsumerQOS_Factor factory;
-// factory.start_conjunction_group ();
-// factory.insert (A);
-// factory.insert (B);
-// factory.start_conjunction_group ();
-// factory.insert (B);
-// factory.insert (C);
-//
-// The following code would be used to represent (A|B) | (B|C):
-//
-// ACE_ConsumerQOS_Factor factory;
-// factory.start_disjunction_group ();
-// factory.insert (A);
-// factory.insert (B);
-// factory.start_disjunction_group ();
-// factory.insert (B);
-// factory.insert (C);
-//
-// First, this may not seem to be initially useful, as (A|B) |
-// (B|C) seems the same as A|B|C. However, this form does have a
-// significant use when deadline timers are specified (described
-// below). Note that groups end with the next call to
-// start_XX_group. Groups are always OR'd together. That is,
-// there is no way to directly build (A|B|C) + (D|E|F). You can
-// always expand the previous statement to the OR of multiple ANDs.
-//
-// = TIMEOUTS
-//
-// There are two types of timeout types defined in
-// Event_Service_Constants.h.
-//
-// ACE_ES_EVENT_INTERVAL_TIMEOUT - the consumer wants to receive a
-// timeout every N seconds.
-//
-// ACE_ES_EVENT_DEADLINE_TIMEOUT - the consumer wants the timeout
-// if and only if some dependencies are not resolved first.
-//
-// Using these timeouts with the correlations discussed above, we
-// can construct four different timer semantics: Interval Timer,
-// Deadline Timer, Interval Correlation, Deadline Correlation:
-//
-// Interval Timer:
-//
-// (A+B+C) | (D+E+F) | (G+H+I) | IntervalTimeout
-//
-// This registers to receive an interval timeout regardless of
-// other dependencies. Event if events occur, the interval
-// timeout will still be sent.
-//
-// Deadline Timer:
-//
-// (A+B+C) | (D+E+F) | (G+H+I) | DeadlineTimeout
-//
-// This registers to receive the deadline timeout ONLY if no
-// other events occur. If a single event is sent to the
-// consumer, the timer is cancelled and rescheduled.
-//
-// Deadline Correlation:
-//
-// (A+B+C) | (D+E+F) | (G+H+DeadlineTimeout)
-//
-// If G and H do not occur within DeadlineTimeout time, a
-// deadline timeout is sent. It is cancelled and rescheduled if G
-// and H occur.
-//
-// Interval Correlation:
-//
-// (A+B+C) | (D+E+F) | (G+H+IntervalTimeout)
-//
-// G+H+IntervalTimeout are sent ONLY after all have occurred. If
-// G+H occur, they are queued until IntervalTimeout occurs. If
-// IntervalTimeout occurs, it is queued until G+H occur.
-{
-public:
- ACE_ConsumerQOS_Factory (void);
- // Default construction.
-
- ~ACE_ConsumerQOS_Factory (void);
- // Death and destruction.
-
- int start_conjunction_group (void);
- // This signifies that the consumer needs the AND of all following
- // insert calls (up until the next start_XX_group call). Returns 0
- // on success, -1 on failure.
-
- int start_disjunction_group (void);
- // This signifies that the consumer needs the OR of all following
- // insert calls (up until the next start_XX_group call). Returns 0
- // on success, -1 on failure.
-
- // = Insert operations add to the current conjunction or disjunction
- // group. These return 0 on success, -1 on failure. Before insert
- // is called, a start_XX_group method should be called. If a
- // start_XX_group method is not called, start_conjunction_group is
- // assumed.
-
- int insert (const RtecEventChannelAdmin::Dependency &subscribe);
- // Insert the <subscribe> structure describing the event and
- // receiving method into the current group.
-
- int insert (RtecEventComm::EventSourceID source,
- RtecEventComm::EventType type,
- RtecScheduler::handle_t rt_info);
- // Insert source/type dependency. <source> of the event (may be
- // zero), <type> of the event. <rt_info> describes the method that
- // will handle the <source>/<type> events.
-
- int insert_type (RtecEventComm::EventType type,
- RtecScheduler::handle_t rt_info);
- // Insert type-only dependency.
-
- int insert_source (RtecEventComm::EventSourceID source,
- RtecScheduler::handle_t rt_info);
- // Insert source-only dependency.
-
- int insert_time (RtecEventComm::EventType type,
- RtecEventComm::Time interval,
- RtecScheduler::handle_t rt_info);
- // Register temporal dependency. <type> designates interval or
- // deadline timeout that will occur every <interval>.
-
- int insert_act (RtecEventComm::EventData act);
- // This will be inserted as type ACE_ES_EVENT_ACT.
-
- // = Conversion operators. The Event Channel takes ConsumerQOS
- // objects.
-
- const RtecEventChannelAdmin::ConsumerQOS &get_ConsumerQOS (void);
- // Allows conversions to ConsumerQOS, which is expected by the
- // PushSupplierProxy::connect_push_consumer interface.
-
- operator const RtecEventChannelAdmin::ConsumerQOS &(void);
- // Calls this->get_ConsumerQOS.
-
- static void debug (const RtecEventChannelAdmin::ConsumerQOS& qos);
-
-private:
- RtecEventChannelAdmin::ConsumerQOS qos_;
- // The representation to be sent to the channel.
-
- int designator_set_;
- // Whether a start_XX_group has been called yet. This is to make
- // sure that a designator is placed in the subscription list first.
-};
-
-// ************************************************************
-
-class TAO_ORBSVCS_Export ACE_SupplierQOS_Factory
-{
-public:
- ACE_SupplierQOS_Factory (void);
- // Default construction.
-
- int insert (RtecEventComm::EventSourceID sid,
- RtecEventComm::EventType type,
- RtecScheduler::handle_t rtinfo,
- u_int ncalls);
- // Publish <sid> and <type> that is generate by a method described by
- // <rtinfo>. The method generates <type> <ncalls> number of times
- // per "iteration."
-
- const RtecEventChannelAdmin::SupplierQOS &get_SupplierQOS (void);
- // Allows conversions to SupplierQOS, which is expected by the
- // PushSupplierProxy::connect_push_supplier interface.
-
- operator const RtecEventChannelAdmin::SupplierQOS &(void);
- // Calls this->get_SupplierQOS.
-
- static void debug (const RtecEventChannelAdmin::SupplierQOS& qos);
-
-private:
- RtecEventChannelAdmin::SupplierQOS qos_;
- // Representation needed by channel.
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Event_Utilities.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_EVENT_UTILITIES_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Event_Utilities.i b/TAO/orbsvcs/orbsvcs/Event_Utilities.i
deleted file mode 100644
index b63b82e5404..00000000000
--- a/TAO/orbsvcs/orbsvcs/Event_Utilities.i
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- C++ -*- */
-
-ACE_INLINE int
-ACE_ConsumerQOS_Factory::insert (RtecEventComm::EventSourceID source,
- RtecEventComm::EventType type,
- RtecScheduler::handle_t rt_info)
-{
- RtecEventChannelAdmin::Dependency dependency;
- dependency.event_.source_ = source;
- dependency.event_.type_ = type;
- //dependency.event_.creation_time_ = 0;
- //dependency.event_.ec_recv_time_ = 0;
- //dependency.event_.ec_send_time_ = 0;
- dependency.rt_info = rt_info;
- return this->insert (dependency);
-}
-
-ACE_INLINE int
-ACE_ConsumerQOS_Factory::insert_type (RtecEventComm::EventType type,
- RtecScheduler::handle_t rt_info)
-{
- RtecEventChannelAdmin::Dependency dependency;
- dependency.event_.source_ = 0;
- dependency.event_.type_ = type;
- //dependency.event_.creation_time_ = 0;
- //dependency.event_.ec_recv_time_ = 0;
- //dependency.event_.ec_send_time_ = 0;
- dependency.rt_info = rt_info;
- return this->insert (dependency);
-}
-
-ACE_INLINE int
-ACE_ConsumerQOS_Factory::insert_source (RtecEventComm::EventSourceID source,
- RtecScheduler::handle_t rt_info)
-{
- RtecEventChannelAdmin::Dependency dependency;
- dependency.event_.source_ = source;
- dependency.event_.type_ = ACE_ES_EVENT_ANY;
- //dependency.event_.creation_time_ = 0;
- //dependency.event_.ec_recv_time_ = 0;
- //dependency.event_.ec_send_time_ = 0;
- dependency.rt_info = rt_info;
- return this->insert (dependency);
-}
-
-ACE_INLINE int
-ACE_ConsumerQOS_Factory::insert_time (RtecEventComm::EventType type,
- RtecEventComm::Time interval,
- RtecScheduler::handle_t rt_info)
-{
- RtecEventChannelAdmin::Dependency dependency;
- dependency.event_.source_ = 0;
- dependency.event_.type_ = type;
- dependency.event_.creation_time_ = interval;
- //dependency.event_.ec_recv_time_ = 0;
- //dependency.event_.ec_send_time_ = 0;
- dependency.rt_info = rt_info;
- return this->insert (dependency);
-}
-
-ACE_INLINE int
-ACE_ConsumerQOS_Factory::insert_act (RtecEventComm::EventData act)
-{
- RtecEventChannelAdmin::Dependency dependency;
- dependency.event_.source_ = 0;
- dependency.event_.type_ = ACE_ES_EVENT_ACT;
- //dependency.event_.creation_time_ = 0;
- //dependency.event_.ec_recv_time_ = 0;
- //dependency.event_.ec_send_time_ = 0;
- dependency.event_.data_ = act;
- return this->insert (dependency);
-}
-
-ACE_INLINE const RtecEventChannelAdmin::ConsumerQOS&
-ACE_ConsumerQOS_Factory::get_ConsumerQOS (void)
-{
- return qos_;
-}
-
-ACE_INLINE
-ACE_ConsumerQOS_Factory::operator const RtecEventChannelAdmin::ConsumerQOS& (void)
-{
- return qos_;
-}
-
-// ************************************************************
-
-ACE_INLINE const RtecEventChannelAdmin::SupplierQOS&
-ACE_SupplierQOS_Factory::get_SupplierQOS (void)
-{
- return qos_;
-}
-
-ACE_INLINE
-ACE_SupplierQOS_Factory::operator const RtecEventChannelAdmin::SupplierQOS& (void)
-{
- return qos_;
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Logger.idl b/TAO/orbsvcs/orbsvcs/Logger.idl
deleted file mode 100644
index 658859115e7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Logger.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// Simplified logger and Logger factory interfaces for
-// testing of the Name Service implementation.
-
-
-interface Logger;
-
-interface Logger_Factory
-{
- Logger make_logger (in string name);
-};
-
-
-
-
-interface Logger
-{
- // Transmit a Log_Record to the logging server.
- oneway void log (in string message);
-};
-
diff --git a/TAO/orbsvcs/orbsvcs/Makefile b/TAO/orbsvcs/orbsvcs/Makefile
deleted file mode 100644
index ef812ca52f4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Makefile
+++ /dev/null
@@ -1,6308 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif # ! TAO_ROOT
-
-MAKEFILE = Makefile
-LIBNAME = liborbsvcs
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-TAO_IDLFLAGS = -Wb,export_macro=TAO_ORBSVCS_Export -Wb,export_include=orbsvcs_export.h
-
-IDL_FILES = \
- CosNamingC \
- CosNamingS \
- CosTimeBaseC \
- CosTimeBaseS \
- RtecEventCommC \
- RtecEventCommS \
- RtecSchedulerC \
- RtecSchedulerS \
- RtecEventChannelAdminC \
- RtecEventChannelAdminS \
- LoggerC \
- LoggerS
-
-# Compile using av=1 to compile the AVStreams stuff.
-ifdef av
-## Add the IDL-compiler generated files
-IDL_FILES += \
- CosPropertyServiceS \
- CosPropertyServiceC \
- \
- AVStreamsS \
- AVStreamsC \
- sfpS \
- sfpC
-endif
-
-ifdef trader
-
-IDL_FILES += \
- CosTradingC \
- CosTradingS \
- SequencesC
-
-include $(STL_ROOT)/config/local.cfg
-
-CC_INCLUDES += -I$(STD)
-CC_INCLUDES += -pta
-
-CPPFLAGS += \
- -I$(TOOLKIT) \
- $(CC_INCLUDES) \
- $(CC_FLAGS) \
- $(CC_DEFINES) \
- $(CC_EH) \
- $(CC_MT)
-
-ifndef exceptions
-CPPFLAGS += -DOS_NO_EXCEPTION_SPECIFIER
-else
-CPPFLAGS += -DOS_STL_ASSERT
-endif #exceptions
-
-endif #trader
-
-FILES= $(IDL_FILES) \
- Event_Utilities \
- Scheduler_Factory \
- Runtime_Scheduler \
- Scheduler_Utilities \
- Time_Utilities \
- \
- Naming/CosNaming_i \
- Naming/Entries \
- Naming/Ior_Multicast \
- Naming/Naming_Utils \
- \
- Event/BCU \
- Event/CORBA_Utils_T \
- Event/Dispatching_Modules \
- Event/Event_Channel \
- Event/Local_ESTypes \
- Event/Memory_Pools \
- Event/RT_Task \
- Event/ReactorTask \
- Event/Task_Manager \
- \
- Sched/Config_Scheduler \
- Sched/Scheduler \
- Sched/Scheduler_Generic \
- \
- tmplinst-orbsvcs
-
-VPATH=.:Naming:Event:Sched:AV:Property:Trader
-
-# Compile using av=1 to compile the AVStreams stuff.
-ifdef av
-## Add the implementation files
-FILES += \
- AV/AVStreams_i \
- AV/sfp \
- Property/CosPropertyService_i \
- Property/CosProperty_Hash
-endif
-
-ifdef trader
-FILES += \
- Trader/Admin \
- Trader/Attributes \
- Trader/Constraint \
- Trader/Constraint_y \
- Trader/Constraint_l \
- Trader/Constraint_Evaluator \
- Trader/Constraint_Interpreter \
- Trader/Constraint_Nodes \
- Trader/Constraint_Validator \
- Trader/Dynamic_Property \
- Trader/Interpreter \
- Trader/Link \
- Trader/Lookup \
- Trader/Offer_Filter \
- Trader/Offer_Id_Iterator \
- Trader/Offer_Iterator \
- Trader/Offer_Iterator_Collection \
- Trader/Offer_Modifier \
- Trader/Policies \
- Trader/Policy_Manager \
- Trader/Preference_Interpreter \
- Trader/Property_Evaluator \
- Trader/Property_Filter \
- Trader/Proxy \
- Trader/Query_Only_Offer_Iterator \
- Trader/Register \
- Trader/Register_Offer_Iterator \
- Trader/Service_Type_Map \
- Trader/Service_Type_Repository \
- Trader/Trader \
- Trader/Trader_T
-endif
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-LIBS += -lTAO -lACE
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-LDFLAGS += -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG)#-H
-
-.PRECIOUS: CosNamingC.cpp CosNamingS.cpp CosNamingC.h CosNamingS.h
-.PRECIOUS: CosTradingC.cpp CosTradingS.cpp CosTradingC.h CosTradingS.h
-.PRECIOUS: RtecSchedulerC.cpp RtecSchedulerS.cpp RtecSchedulerC.h RtecSchedulerS.h
-.PRECIOUS: RtecEventCommC.cpp RtecEventCommS.cpp RtecEventCommC.h RtecEventCommS.h
-.PRECIOUS: RtecEventChannelAdminC.cpp RtecEventChannelAdminS.cpp RtecEventChannelAdminC.h RtecEventChannelAdminS.h
-.PRECIOUS: LoggerC.cpp LoggerS.cpp LoggerC.h LoggerS.h
-
-.PRECIOUS: CosPropertyServiceC.cpp CosPropertyServiceS.cpp CosPropertyServiceC.h CosPropertyServiceS.h
-.PRECIOUS: AVStreamsC.cpp AVStreamsS.cpp AVStreamsC.h AVStreamsS.h
-
-idl_stubs: $(addsuffix .h, $(IDL_FILES))
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-ifdef trader
-
-LIBS += -ll -ly
-
-Trader/Constraint_y.cpp: Trader/constraint.y
- $(YACC) -d $<
- mv y.tab.c $@
- mv y.tab.h Trader/Constraint_Tokens.h
-
-Trader/Constraint_l.cpp: Trader/constraint.l
- $(LEX) $<
- mv lex.yy.c $@
-endif
-
-#ifdef av
-#CosProperty : CosProperty_Hash.o
-# CC -g -o $@ $(LDFLAGS) $(CPPFLAGS) CosProperty_Hash.o
-#endif
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/CosNamingC.o .obj/CosNamingC.so .shobj/CosNamingC.o .shobj/CosNamingC.so: CosNamingC.cpp CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosNamingC.i CosNamingS.h CosNamingS.i
-.obj/CosNamingS.o .obj/CosNamingS.so .shobj/CosNamingS.o .shobj/CosNamingS.so: CosNamingS.cpp CosNamingS.h CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosNamingC.i CosNamingS.i
-.obj/CosTimeBaseS.o .obj/CosTimeBaseS.so .shobj/CosTimeBaseS.o .shobj/CosTimeBaseS.so: CosTimeBaseS.cpp CosTimeBaseS.h CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.i CosTimeBaseS.i
-.obj/RtecEventCommC.o .obj/RtecEventCommC.so .shobj/RtecEventCommC.o .shobj/RtecEventCommC.so: RtecEventCommC.cpp RtecEventCommC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.h CosTimeBaseC.i RtecEventCommC.i \
- RtecEventCommS.h CosTimeBaseS.h CosTimeBaseS.i RtecEventCommS.i
-.obj/RtecEventCommS.o .obj/RtecEventCommS.so .shobj/RtecEventCommS.o .shobj/RtecEventCommS.so: RtecEventCommS.cpp RtecEventCommS.h CosTimeBaseS.h \
- CosTimeBaseC.h $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.i CosTimeBaseS.i RtecEventCommC.h \
- RtecEventCommC.i RtecEventCommS.i
-.obj/RtecSchedulerC.o .obj/RtecSchedulerC.so .shobj/RtecSchedulerC.o .shobj/RtecSchedulerC.so: RtecSchedulerC.cpp RtecSchedulerC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.h CosTimeBaseC.i RtecSchedulerC.i \
- RtecSchedulerS.h CosTimeBaseS.h CosTimeBaseS.i RtecSchedulerS.i
-.obj/RtecSchedulerS.o .obj/RtecSchedulerS.so .shobj/RtecSchedulerS.o .shobj/RtecSchedulerS.so: RtecSchedulerS.cpp RtecSchedulerS.h CosTimeBaseS.h \
- CosTimeBaseC.h $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.i CosTimeBaseS.i RtecSchedulerC.h \
- RtecSchedulerC.i RtecSchedulerS.i
-.obj/RtecEventChannelAdminC.o .obj/RtecEventChannelAdminC.so .shobj/RtecEventChannelAdminC.o .shobj/RtecEventChannelAdminC.so: RtecEventChannelAdminC.cpp \
- RtecEventChannelAdminC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.h CosTimeBaseC.i RtecEventCommC.h \
- RtecEventCommC.i RtecSchedulerC.h RtecSchedulerC.i \
- RtecEventChannelAdminC.i RtecEventChannelAdminS.h CosTimeBaseS.h \
- CosTimeBaseS.i RtecEventCommS.h RtecEventCommS.i RtecSchedulerS.h \
- RtecSchedulerS.i RtecEventChannelAdminS.i
-.obj/RtecEventChannelAdminS.o .obj/RtecEventChannelAdminS.so .shobj/RtecEventChannelAdminS.o .shobj/RtecEventChannelAdminS.so: RtecEventChannelAdminS.cpp \
- RtecEventChannelAdminS.h CosTimeBaseS.h CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h CosTimeBaseC.i CosTimeBaseS.i RtecEventCommS.h \
- RtecEventCommC.h RtecEventCommC.i RtecEventCommS.i RtecSchedulerS.h \
- RtecSchedulerC.h RtecSchedulerC.i RtecSchedulerS.i \
- RtecEventChannelAdminC.h RtecEventChannelAdminC.i \
- RtecEventChannelAdminS.i
-.obj/LoggerC.o .obj/LoggerC.so .shobj/LoggerC.o .shobj/LoggerC.so: LoggerC.cpp LoggerC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h LoggerC.i LoggerS.h LoggerS.i
-.obj/LoggerS.o .obj/LoggerS.so .shobj/LoggerS.o .shobj/LoggerS.so: LoggerS.cpp LoggerS.h LoggerC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- orbsvcs_export.h LoggerC.i LoggerS.i
-.obj/Event_Utilities.o .obj/Event_Utilities.so .shobj/Event_Utilities.o .shobj/Event_Utilities.so: Event_Utilities.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i
-.obj/Scheduler_Factory.o .obj/Scheduler_Factory.so .shobj/Scheduler_Factory.o .shobj/Scheduler_Factory.so: Scheduler_Factory.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i
-.obj/Runtime_Scheduler.o .obj/Runtime_Scheduler.so .shobj/Runtime_Scheduler.o .shobj/Runtime_Scheduler.so: Runtime_Scheduler.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i
-.obj/Scheduler_Utilities.o .obj/Scheduler_Utilities.so .shobj/Scheduler_Utilities.o .shobj/Scheduler_Utilities.so: Scheduler_Utilities.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Utilities.i
-.obj/Time_Utilities.o .obj/Time_Utilities.so .shobj/Time_Utilities.o .shobj/Time_Utilities.so: Time_Utilities.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i
-.obj/CosNaming_i.o .obj/CosNaming_i.so .shobj/CosNaming_i.o .shobj/CosNaming_i.so: Naming/CosNaming_i.cpp Naming/CosNaming_i.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \
- Naming/Entries.h
-.obj/Entries.o .obj/Entries.so .shobj/Entries.o .shobj/Entries.so: Naming/Entries.cpp Naming/Entries.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i
-.obj/Ior_Multicast.o .obj/Ior_Multicast.so .shobj/Ior_Multicast.o .shobj/Ior_Multicast.so: Naming/Ior_Multicast.cpp \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \
- Naming/Ior_Multicast.h \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i
-.obj/Naming_Utils.o .obj/Naming_Utils.so .shobj/Naming_Utils.o .shobj/Naming_Utils.so: Naming/Naming_Utils.cpp \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- Naming/Naming_Utils.h Naming/CosNaming_i.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \
- Naming/Entries.h Naming/Ior_Multicast.h \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i
-.obj/BCU.o .obj/BCU.so .shobj/BCU.o .shobj/BCU.so: Event/BCU.cpp $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i Event/BCU.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h
-.obj/CORBA_Utils_T.o .obj/CORBA_Utils_T.so .shobj/CORBA_Utils_T.o .shobj/CORBA_Utils_T.so: Event/CORBA_Utils_T.cpp \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- Event/CORBA_Utils_T.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- Event/CORBA_Utils_T.i
-.obj/Dispatching_Modules.o .obj/Dispatching_Modules.so .shobj/Dispatching_Modules.o .shobj/Dispatching_Modules.so: Event/Dispatching_Modules.cpp \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- Event/Memory_Pools.h Event/Event_Channel.h \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(TAO_ROOT)/tao/Timeprobe.i \
- Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i Event/CORBA_Utils_T.h Event/CORBA_Utils_T.i \
- Event/Task_Manager.h Event/RT_Task.h Event/RT_Task.i \
- Event/Task_Manager.i Event/ReactorTask.h Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- Event/Event_Channel.i Event/Dispatching_Modules.h \
- Event/Dispatching_Modules.i Event/Memory_Pools.i
-.obj/Event_Channel.o .obj/Event_Channel.so .shobj/Event_Channel.o .shobj/Event_Channel.so: Event/Event_Channel.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- Event/Dispatching_Modules.h \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(TAO_ROOT)/tao/Timeprobe.i \
- Event/ReactorTask.h Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i Event/RT_Task.h Event/RT_Task.i \
- Event/Event_Channel.h Event/CORBA_Utils_T.h Event/CORBA_Utils_T.i \
- Event/Task_Manager.h Event/Task_Manager.i Event/Event_Channel.i \
- Event/Dispatching_Modules.i Event/Memory_Pools.h Event/Memory_Pools.i
-.obj/Local_ESTypes.o .obj/Local_ESTypes.so .shobj/Local_ESTypes.o .shobj/Local_ESTypes.so: Event/Local_ESTypes.cpp Event/Local_ESTypes.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i
-.obj/Memory_Pools.o .obj/Memory_Pools.so .shobj/Memory_Pools.o .shobj/Memory_Pools.so: Event/Memory_Pools.cpp Event/Memory_Pools.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- Event/Event_Channel.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(TAO_ROOT)/tao/Timeprobe.i \
- Event/Local_ESTypes.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i Event/CORBA_Utils_T.h Event/CORBA_Utils_T.i \
- Event/Task_Manager.h Event/RT_Task.h Event/RT_Task.i \
- Event/Task_Manager.i Event/ReactorTask.h Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- Event/Event_Channel.i Event/Dispatching_Modules.h \
- Event/Dispatching_Modules.i Event/Memory_Pools.i
-.obj/RT_Task.o .obj/RT_Task.so .shobj/RT_Task.o .shobj/RT_Task.so: Event/RT_Task.cpp \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- Event/RT_Task.h Event/RT_Task.i Event/Debug_Macros.h \
- Event/Event_Channel.h \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(TAO_ROOT)/tao/Timeprobe.i \
- Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i Event/CORBA_Utils_T.h Event/CORBA_Utils_T.i \
- Event/Task_Manager.h Event/Task_Manager.i Event/ReactorTask.h \
- Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- Event/Event_Channel.i Event/Memory_Pools.h \
- Event/Dispatching_Modules.h Event/Dispatching_Modules.i \
- Event/Memory_Pools.i
-.obj/ReactorTask.o .obj/ReactorTask.so .shobj/ReactorTask.o .shobj/ReactorTask.so: Event/ReactorTask.cpp \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(TAO_ROOT)/tao/Timeprobe.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- Event/ReactorTask.h Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i Event/RT_Task.h Event/RT_Task.i
-.obj/Task_Manager.o .obj/Task_Manager.so .shobj/Task_Manager.o .shobj/Task_Manager.so: Event/Task_Manager.cpp Event/Task_Manager.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- Event/RT_Task.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- Event/RT_Task.i Event/Task_Manager.i Event/ReactorTask.h \
- Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- Event/Local_ESTypes.i
-.obj/Config_Scheduler.o .obj/Config_Scheduler.so .shobj/Config_Scheduler.o .shobj/Config_Scheduler.so: Sched/Config_Scheduler.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- Sched/Scheduler_Generic.h Sched/Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- Sched/Scheduler.i Sched/Scheduler_Generic.i Sched/Config_Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- Sched/Config_Scheduler.i
-.obj/Scheduler.o .obj/Scheduler.so .shobj/Scheduler.o .shobj/Scheduler.so: Sched/Scheduler.cpp \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- Sched/Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- Sched/Scheduler.i
-.obj/Scheduler_Generic.o .obj/Scheduler_Generic.so .shobj/Scheduler_Generic.o .shobj/Scheduler_Generic.so: Sched/Scheduler_Generic.cpp \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.i \
- Sched/Scheduler_Generic.h Sched/Scheduler.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- Sched/Scheduler.i Sched/Scheduler_Generic.i
-.obj/tmplinst-orbsvcs.o .obj/tmplinst-orbsvcs.so .shobj/tmplinst-orbsvcs.o .shobj/tmplinst-orbsvcs.so: tmplinst-orbsvcs.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp b/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp
deleted file mode 100644
index d4528254ed4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp
+++ /dev/null
@@ -1,751 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosNaming_i.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu> &
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "CosNaming_i.h"
-
-NS_NamingContext::NS_NamingContext (void)
-{
- // Deal with faults.
- if (context_.open () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "NS_NamingContext"));
-
- // Get the lock from the orb that knows what type is appropriate.
- // @@ Nanbor, there still is an error if I use this function to get the lock.
- // this->lock_ = TAO_ORB_Core_instance ()->server_factory ()->create_servant_lock ();
-
- // if orb core returned a null lock, allocate a thread mutex by default
- // if (this->lock_ == 0)
- ACE_NEW (this->lock_, ACE_Lock_Adapter<ACE_Thread_Mutex> ());
-}
-
-NS_NamingContext::~NS_NamingContext (void)
-{
- delete this->lock_;
-}
-
-CosNaming::NamingContext_ptr
-NS_NamingContext::get_context (const CosNaming::Name &name)
-{
- // Create compound name to be resolved (<name> - last component).
- CORBA::Environment _env;
- CORBA::ULong len = name.length ();
- CosNaming::Name comp_name (name);
- comp_name.length (len - 1);
-
- // resolve
- CORBA::Object_ptr cont_ref = resolve (comp_name, _env);
-
- // Deal with exceptions in resolve: basically, add the last component
- // of the name to <rest_of_name> and rethrow.
- if (_env.exception () != 0)
- {
- _env.print_exception ("NS_NamingContext::get_context");
- return 0;
- }
-
- // Reference to a context from <resolve> cannot be nil because
- // cannot <bind> to a nil object.
-
- // Try narrowing object reference to a context type.
- CosNaming::NamingContext_ptr c;
- c = CosNaming::NamingContext::_narrow (cont_ref, _env);
- if (_env.exception () != 0)
- {
- _env.print_exception ("NS_NamingContext::get_context - _narrow");
- return 0;
- }
-
- CosNaming::Name rest;
- rest.length (2);
- rest[0] = name[len - 2];
- rest[1] = name[len - 1];
-
- if (CORBA::is_nil (c))
- {
- CosNaming::Name rest;
- rest.length (2);
- rest[0] = name[len - 2];
- rest[1] = name[len - 1];
- }
- return c;
-}
-
-void
-NS_NamingContext::bind (const CosNaming::Name& n,
- CORBA::Object_ptr obj,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- int result = 0;
- _env.clear ();
-
- // get the length of the name
- CORBA::ULong len = n.length ();
-
- // Check for invalid name.
- if (len == 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::InvalidName);
- return;
- }
-
- // If we received compound name, resolve it to get the context in
- // which the binding should take place, then perform the binding on
- // target context.
- if (len > 1)
- {
- CosNaming::NamingContext_var cont = get_context (n);
- CosNaming::Name simple_name;
- simple_name.length (1);
- simple_name[0] = n[len - 1];
- cont->bind (simple_name, obj, _env);
- }
-
- // If we received a simple name, we need to bind it in this context.
- else
- {
- NS_IntId entry (obj);
- NS_ExtId name (n[0].id, n[0].kind);
-
- // Try binding the name.
- result = context_.bind (name, entry);
- if (result == 1)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::AlreadyBound);
- return;
- }
- // Something went wrong with the internal structure
- else if (result == -1)
- {
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- return;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "bound: <%s,%s>\n",
- n[0].id.in ()==0? "nil" : n[0].id.in (),
- n[0].kind.in ()==0? "nil" : n[0].kind.in ()));
- }
-}
-
-void
-NS_NamingContext::rebind (const CosNaming::Name& n,
- CORBA::Object_ptr obj,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- int result = 0;
- _env.clear ();
-
- // Get the length of the name.
- CORBA::ULong len = n.length ();
-
- // Check for invalid name.
- if (len == 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::InvalidName);
- return;
- }
-
- // If we received compound name, resolve it to get the context in
- // which the rebinding should take place, then perform the rebinding
- // on target context.
- if (len > 1)
- {
- CosNaming::NamingContext_var cont = get_context (n);
- CosNaming::Name simple_name;
- simple_name.length (1);
- simple_name[0] = n[len - 1];
- cont->rebind (simple_name, obj, _env);
- }
-
- else
- {
- // If we received a simple name, we need to rebind it in this
- // context.
-
- NS_IntId entry (obj);
- NS_ExtId name (n[0].id, n[0].kind);
- NS_IntId oldentry;
- NS_ExtId oldname;
-
- // Try rebinding the name.
- result = context_.rebind (name, entry, oldname, oldentry);
-
- // Something went wrong with the internal structure
- if (result == -1)
- {
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- return;
- }
- }
-}
-
-void
-NS_NamingContext::bind_context (const CosNaming::Name &n,
- CosNaming::NamingContext_ptr nc,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- int result = 0;
- _env.clear ();
-
- // Get the length of the name.
- CORBA::ULong len = n.length ();
-
- // Check for invalid name.
- if (len == 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::InvalidName);
- return;
- }
-
- // If we received compound name, resolve it to get the context in
- // which the binding should take place, then perform the binding on
- // target context.
- if (len > 1)
- {
- CosNaming::NamingContext_var cont = get_context (n);
- CosNaming::Name simple_name;
- simple_name.length (1);
- simple_name[0] = n[len - 1];
- cont->bind_context (simple_name, nc, _env);
- }
-
- // If we received a simple name, we need to bind it in this context.
- else
- {
- CosNaming::NameComponent comp = n[0];
- NS_IntId entry (nc, CosNaming::ncontext);
- NS_ExtId name (n[0].id, n[0].kind);
-
- // Try binding the name.
- result = context_.bind (name, entry);
- if ( result == 1)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::AlreadyBound);
- return;
- }
- // Something went wrong with the internal structure
- else if (result == -1)
- {
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- return;
- }
- }
-}
-
-void
-NS_NamingContext::rebind_context (const CosNaming::Name &n,
- CosNaming::NamingContext_ptr nc,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- _env.clear ();
-
- // Get the length of the name.
- CORBA::ULong len = n.length ();
-
- // Check for invalid name.
- if (len == 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::InvalidName);
- return;
- }
-
- // If we received compound name, resolve it to get the context in
- // which the rebinding should take place, then perform the rebinding
- // on target context.
- if (len > 1)
- {
- CosNaming::NamingContext_var cont = get_context (n);
- CosNaming::Name simple_name;
- simple_name.length (1);
- simple_name[0] = n[len - 1];
- cont->rebind_context (simple_name, nc, _env);
- }
-
- // if we received a simple name, we need to rebind it in this context.
- else
- {
- CosNaming::NameComponent comp = n[0];
- NS_IntId entry (nc, CosNaming::ncontext);
- NS_ExtId name (n[0].id, n[0].kind);
- NS_IntId oldentry;
- NS_ExtId oldname;
-
- // try rebinding the name.
- if (context_.rebind (name, entry, oldname, oldentry) < 0);
- // deal with consequences
- }
-}
-
-CORBA::Object_ptr
-NS_NamingContext::resolve (const CosNaming::Name& n,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, CORBA::Object::_nil ());
-
- // clear the environment.
- _env.clear ();
-
- // get the length of the name
- CORBA::ULong len = n.length ();
-
- // check for invalid name.
- if (len == 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::InvalidName);
- return CORBA::Object::_nil ();
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Trying to resolve <%s,%s>\n",
- n[0].id.in (),
- n[0].kind.in ()));
-
- // Resolve the first component of the name.
- NS_ExtId name (n[0].id, n[0].kind);
- NS_IntId entry;
- if (context_.find (name, entry) == -1)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::NotFound (CosNaming::NamingContext::not_object, n));
- return CORBA::Object::_nil ();
- }
-
- CORBA::Object_ptr item = entry.ref_;
-
- // if the name we have to resolve is a compound name
- // we need to recursively resolve it.
- if (len > 1)
- {
- CosNaming::NamingContext_var cont;
- if (entry.type_ == CosNaming::ncontext)
- {
- cont = CosNaming::NamingContext::_narrow (item, _env);
- if (_env.exception () != 0)
- {
- _env.print_exception ("NS_NamingContext::resolve");
- return CORBA::Object::_nil ();
- }
- }
- else
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::NotFound (CosNaming::NamingContext::not_context, n));
- return CORBA::Object::_nil ();
- }
-
- CosNaming::Name rest_of_name (len - 1);
- rest_of_name.length (len - 1);
- for (CORBA::ULong i = 1; i < len; i++)
- rest_of_name[i-1] = n[i];
-
- return (cont->resolve (rest_of_name, _env));
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Resolved <%s,%s> to %08.8x\n",
- n[0].id.in (),
- n[0].kind.in (),
- item));
-
- // If the name we had to resolve was simple, we just need to return
- // the result.
- return CORBA::Object::_duplicate (item);
-}
-
-void
-NS_NamingContext::unbind (const CosNaming::Name& n,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- _env.clear ();
-
- // get the length of the name
- CORBA::ULong len = n.length ();
-
- // check for invalid name.
- if (len == 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::InvalidName);
- return;
- }
-
- // If we received compound name, resolve it to get the context in
- // which the unbinding should take place, then perform the unbinding
- // on target context.
- if (len > 1)
- {
- CosNaming::NamingContext_var cont = get_context (n);
- CosNaming::Name simple_name;
- simple_name.length (1);
- simple_name[0] = n[len - 1];
- cont->unbind (simple_name, _env);
- }
- else
- {
- // If we received a simple name, we need to unbind it in this
- // context.
-
- NS_ExtId name (n[0].id, n[0].kind);
- // try unbinding the name.
- if (context_.unbind (name) == -1)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::NotFound (CosNaming::NamingContext::not_object, n));
- return;
- }
- }
-}
-
-CosNaming::NamingContext_ptr
-NS_NamingContext::new_context (CORBA::Environment &_env)
-{
- NS_NamingContext * c = 0;
-
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW_RETURN (c, NS_NamingContext, CosNaming::NamingContext::_nil ());
-
- // clear the environment.
- _env.clear ();
-
- // (1) do we have to duplicate () the object reference????
- // (2) Also, how about memory leaks?
- return c->_this (_env);
-}
-
-CosNaming::NamingContext_ptr
-NS_NamingContext::bind_new_context (const CosNaming::Name& n,
- CORBA::Environment &_env)
-{
- NS_NamingContext * c = 0;
-
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW_RETURN (c, NS_NamingContext, CosNaming::NamingContext::_nil ());
-
- // clear the environment.
- _env.clear ();
-
- bind_context (n, c->_this (_env), _env);
-
- // Release object if exception occurs.
- if (_env.exception () != 0)
- {
- delete c;
- return CosNaming::NamingContext::_nil ();
- }
-
- return c->_this (_env);
-}
-
-void
-NS_NamingContext::destroy (CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- _env.clear ();
-
- if (context_.current_size () != 0)
- {
- _env.clear ();
- _env.exception (new CosNaming::NamingContext::NotEmpty);
- return;
- }
-}
-
-void
-NS_NamingContext::list (CORBA::ULong how_many,
- CosNaming::BindingList_out bl,
- CosNaming::BindingIterator_out bi,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD(ACE_Lock, ace_mon, *this->lock_);
-
- _env.clear ();
-
- // Dynamically allocate hash map iterator.
- NS_NamingContext::HASH_MAP::ITERATOR *hash_iter =
- new NS_NamingContext::HASH_MAP::ITERATOR (context_);
-
- // Number of bindings that will go into the BindingList.
- CORBA::ULong n;
-
- // Number of bindings in the context is > <how_many> so need to
- // return a BindingIterator.
- if (context_.current_size () > how_many)
- {
- NS_BindingIterator *bind_iter;
-
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW (bind_iter, NS_BindingIterator (hash_iter, this->lock_));
-
- // clear the environment.
- _env.clear ();
-
- bi = bind_iter->_this (_env);
-
- CosNaming::BindingIterator::_duplicate (bi);
-
- n = how_many;
- }
- else
- {
- // Number of bindings in the context is <= <how_many>,
- // so do not need to return a BindingIterator.
- bi = CosNaming::BindingIterator::_nil ();
- n = context_.current_size ();
- }
-
- // Use hash iterator to populate a BindingList with bindings.
- CosNaming::BindingList bindings;
- bindings.length (n);
- NS_NamingContext::HASH_MAP::ENTRY *hash_entry;
-
- for (CORBA::ULong i = 0; i < n; i++)
- {
- hash_iter->next (hash_entry);
- hash_iter->advance ();
-
- bindings[i].binding_type = hash_entry->int_id_.type_;
-
- bindings[i].binding_name.length (1);
- bindings[i].binding_name[0].id =
- CORBA::string_dup (hash_entry->ext_id_.id_.fast_rep ());
- bindings[i].binding_name[0].kind =
- CORBA::string_dup (hash_entry->ext_id_.kind_.fast_rep ());
- }
-
- // check for memory failure.
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW (bl, CosNaming::BindingList (bindings));
-
- // clear the environment.
- _env.clear ();
-
- // If did not allocate BindingIterator, deallocate hash map
- // iterator.
- if (context_.current_size () <= how_many)
- delete hash_iter;
-}
-
-NS_BindingIterator::NS_BindingIterator (NS_NamingContext::HASH_MAP::ITERATOR *hash_iter,
- ACE_Lock * lock)
- : hash_iter_ (hash_iter),
- lock_ (lock)
-{
-}
-
-NS_BindingIterator::~NS_BindingIterator (void)
-{
- delete hash_iter_;
-}
-
-CORBA::Boolean
-NS_BindingIterator::next_one (CosNaming::Binding_out b,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, 0);
-
- _env.clear ();
-
- if (hash_iter_->done ())
- {
- // We are allocating a binding here because it's an out parameter
- // and the server will try to free the memory
-
- // check for memory failure.
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW_RETURN (b, CosNaming::Binding, 0);
-
- // clear the environment.
- _env.clear ();
-
- return 0;
- }
- else
- {
- // check for memory failure.
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW_RETURN (b, CosNaming::Binding, 0);
-
- // clear the environment.
- _env.clear ();
-
- NS_NamingContext::HASH_MAP::ENTRY *hash_entry;
- hash_iter_->next (hash_entry);
- hash_iter_->advance ();
-
- b->binding_type = hash_entry->int_id_.type_;
-
- b->binding_name.length (1);
- b->binding_name[0].id =
- CORBA::string_dup (hash_entry->ext_id_.id_.fast_rep ());
- b->binding_name[0].kind =
- CORBA::string_dup (hash_entry->ext_id_.kind_.fast_rep ());
-
- return 1;
- }
-}
-
-CORBA::Boolean
-NS_BindingIterator::next_n (CORBA::ULong how_many,
- CosNaming::BindingList_out bl,
- CORBA::Environment &_env)
-{
- // if Guard fails to get the lock, the environment must be set.
- _env.clear ();
- _env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO));
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, 0);
-
- _env.clear ();
-
- if (hash_iter_->done ())
- {
- // check for memory failure.
- // if allocation fails, the environment must be set to indicate error.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
- ACE_NEW_RETURN (bl, CosNaming::BindingList, 0);
-
- // clear the environment.
- _env.clear ();
-
- return 0;
- }
- else
- {
- // Statically allocate a BindingList.
- CosNaming::BindingList bindings;
-
- // Initially assume that iterator has the requested number of
- // bindings.
- bindings.length (how_many);
-
- // Iterate and populate the BindingList.
- NS_NamingContext::HASH_MAP::ENTRY *hash_entry;
- for (CORBA::ULong i = 0; i < how_many; i++)
- {
- hash_iter_->next (hash_entry);
-
- bindings[i].binding_type = hash_entry->int_id_.type_;
-
- bindings[i].binding_name.length (1);
- bindings[i].binding_name[0].id =
- CORBA::string_dup (hash_entry->ext_id_.id_.fast_rep ());
- bindings[i].binding_name[0].kind =
- CORBA::string_dup (hash_entry->ext_id_.kind_.fast_rep ());
-
- if (hash_iter_->advance () == 0)
- {
- // If no more bindings left, reset length to the actual
- // number of bindings populated and get out of the loop.
- bindings.length (i + 1);
- break;
- }
- }
-
- // if mem allocation fails, the environment must be set to throw
- // an exception.
- _env.clear ();
- _env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- // Check for failed memory allocation.
- ACE_NEW_RETURN (bl, CosNaming::BindingList (bindings), 0);
-
- // if allocation went well, clear the exception.
- _env.clear ();
-
- return 1;
- }
-}
-
-void
-NS_BindingIterator::destroy (CORBA::Environment &_env)
-{
- // @@ Not sure if this is the correct way to do this.
- CORBA::release (this->_this (_env));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Hash_Map_Manager<NS_ExtId, NS_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Entry<NS_ExtId, NS_IntId>;
-template class ACE_Hash_Map_Iterator_Base<NS_ExtId, NS_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<NS_ExtId, NS_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<NS_ExtId, NS_IntId, ACE_Null_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Hash_Map_Manager<NS_ExtId, NS_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Entry<NS_ExtId, NS_IntId>
-#pragma instantiate ACE_Hash_Map_Iterator_Base<NS_ExtId, NS_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<NS_ExtId, NS_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<NS_ExtId, NS_IntId, ACE_Null_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h b/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h
deleted file mode 100644
index 09296a91e69..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosNaming_i.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu> &
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (COSNAMING_I_H)
-#define COSNAMING_I_H
-
-#include "orbsvcs/CosNamingS.h"
-#include "Entries.h"
-
-class TAO_ORBSVCS_Export NS_NamingContext : public POA_CosNaming::NamingContext
- // = TITLE
- // This class implements the NamingContext interface that is part of the
- // CosNaming idl module.
- //
- // = DESCRIPTION
- // Extensive comments can be found in the idl file.
-{
- public:
- typedef ACE_Hash_Map_Manager<NS_ExtId, NS_IntId, ACE_Null_Mutex>
- HASH_MAP;
-
- NS_NamingContext (void);
- // default constructor.
-
- ~NS_NamingContext (void);
- // destructor.
-
-
- virtual void bind (const CosNaming::Name &n,
- CORBA::Object_ptr obj,
- CORBA::Environment &IT_env);
-
- // create a binding for name <n> and object <obj> in the naming
- // context. Compound names are treated as follows: ctx->bind
- // (<c1; c2; c3; cn>, obj) = (ctx->resolve (<c1; c2;
- // cn-1>))->bind (<cn>, obj) if the there already exists a
- // binding for the specified name, <AlreadyBound> exception is
- // thrown. Naming contexts should be bound using <bind_context>
- // and <rebind_context> in order to participate in name
- // resolution later.
-
- virtual void rebind (const CosNaming::Name &n,
- CORBA::Object_ptr obj,
- CORBA::Environment &IT_env);
- // this is similar to <bind> operation above, except for when
- // the binding for the specified name already exists in the
- // specified context. In that case, the existing binding is
- // replaced with the new one.
-
- virtual void bind_context (const CosNaming::Name &n,
- CosNaming::NamingContext_ptr nc,
- CORBA::Environment &IT_env);
- // This is the version of <bind> specifically for binding naming
- // contexts, so that they will participate in name resolution
- // when compound names are passed to be resolved.
-
- virtual void rebind_context (const CosNaming::Name &n,
- CosNaming::NamingContext_ptr nc,
- CORBA::Environment &IT_env);
- // This is a version of <rebind> specifically for naming
- // contexts, so that they can participate in name resolution
- // when compound names are passed.
-
- virtual CORBA::Object_ptr resolve (const CosNaming::Name &n,
- CORBA::Environment &IT_env);
- // Return object reference that is bound to the name. Compound
- // name resolve is defined as follows: ctx->resolve (<c1; c2;
- // cn>) = ctx->resolve (<c1; c2 cn-1>)->resolve (<cn>) The
- // naming service does not return the type of the object.
- // Clients are responsible for "narrowing" the object to the
- // appropriate type.
-
- virtual void unbind (const CosNaming::Name &n,
- CORBA::Environment &IT_env);
- // Remove the name binding from the context. When compound
- // names are used, unbind is defined as follows: ctx->unbind
- // (<c1; c2; cn>) = (ctx->resolve (<c1; c2; cn-1>))->unbind
- // (<cn>)
-
- virtual CosNaming::NamingContext_ptr new_context (CORBA::Environment &IT_env);
- // This operation returns a new naming context implemented by
- // the same naming server in which the operation was invoked.
- // The context is not bound.
-
- virtual CosNaming::NamingContext_ptr bind_new_context (const CosNaming::Name &n,
- CORBA::Environment &IT_env);
- // This operation creates a new context and binds it to the name
- // supplied as an argument. The newly-created context is
- // implemented by the same server as the context in which it was
- // bound (the name argument excluding the last component).
-
- virtual void destroy (CORBA::Environment &IT_env);
- // Delete the naming context. NOTE: the user should <unbind>
- // any bindings in which the given context is bound to some
- // names before invoking <destroy> operation on it. Ignoring
- // this rule may cause unexpected behaviour. <destroy> deletes
- // the context object if it is not bound to any names in the
- // given address space. <destroys> decrements the reference
- // count of the context if bindings to it exist.
-
- virtual void list (CORBA::ULong how_many,
- CosNaming::BindingList_out bl,
- CosNaming::BindingIterator_out bi,
- CORBA::Environment &IT_env);
- // Returns at most the requested number of bindings <how_many>
- // in <bl>. If the naming context contains additional bindings,
- // they are returned with a BindingIterator. In the naming
- // context does not contain any additional bindings <bi>
- // returned as null.
-
-protected:
- // = These are the helper methods used by other methods.
-
- CosNaming::NamingContext_ptr get_context (const CosNaming::Name &name);
- // This is used by methods that need to resolve a compound name to
- // get the reference to the target context before performing the
- // actual operation (e.g. bind, unbind, etc.) Takes a full name
- // (including the last component that doesn't need to be resolved)
- // Returns a pointer to the target context.
-
- private:
-
- HASH_MAP context_;
- // This implementation of NamingContext uses ACE thread-safe Hash
- // Map for storage and manipulation of name-object bindings.
-
- ACE_Lock *lock_;
- // Lock to serialize access to the underlying data structure.
- // This is a lock adapter that hides the type of lock, which may be
- // a null lock, if the ORB decides it is not needed.
-
-};
-
-class TAO_ORBSVCS_Export NS_BindingIterator : public POA_CosNaming::BindingIterator
- // = TITLE
- // This class implements the BindingIterator interface
- // that is part of the CosNaming idl module.
- //
- // = DESCRIPTION
- // NS_BindingIterator constructor expects a pointer to a
- // DYNAMICALLY allocated hash map iterator. Destructor
- // deallocates hash map iterator.
-{
- public:
- // = Intialization and termination methods.
- NS_BindingIterator (NS_NamingContext::HASH_MAP::ITERATOR *hash_iter, ACE_Lock * lock);
- // constructor.
-
- ~NS_BindingIterator (void);
- // destructor.
-
- CORBA::Boolean next_one (CosNaming::Binding_out b,
- CORBA::Environment &IT_env);
- // This operation returns the next binding. If there are no
- // more bindings false is returned.
-
- CORBA::Boolean next_n (CORBA::ULong how_many,
- CosNaming::BindingList_out bl,
- CORBA::Environment &IT_env);
- // This operation returns at most the requested number of
- // bindings.
-
- void destroy (CORBA::Environment &IT_env);
- // This operation destroys the iterator.
-
- private:
- NS_NamingContext::HASH_MAP::ITERATOR *hash_iter_;
- // A pointer to the hash map iterator.
-
- ACE_Lock *lock_;
- // lock passed on from NS_NamingContext to serialize access
- // to the internal data structure.
-};
-
-#endif /* COSNAMING_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Entries.cpp b/TAO/orbsvcs/orbsvcs/Naming/Entries.cpp
deleted file mode 100644
index 9781095a35d..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/Entries.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// NS_CosNaming.C
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "Entries.h"
-
-NS_IntId::NS_IntId (void)
- : type_ (CosNaming::nobject)
-{
- ref_ = CORBA::Object::_nil ();
-}
-
-NS_IntId::NS_IntId (CORBA::Object_ptr obj,
- CosNaming::BindingType type)
- : type_ (type)
-{
- ref_ = CORBA::Object::_duplicate (obj);
-}
-
-NS_IntId::NS_IntId (const NS_IntId &rhs)
-{
- type_ = rhs.type_;
- ref_ = CORBA::Object::_duplicate (rhs.ref_);
-}
-
-NS_IntId::~NS_IntId (void)
-{
- CORBA::release (ref_);
-}
-
-void
-NS_IntId::operator= (const NS_IntId &rhs)
-{
- // check for self assignment.
- if (&rhs == this)
- return;
-
- type_ = rhs.type_;
-
- CORBA::release (ref_);
- ref_ = CORBA::Object::_duplicate (rhs.ref_);
-}
-
-NS_ExtId::NS_ExtId (void)
- : kind_ (),
- id_ ()
-{
-}
-
-NS_ExtId::NS_ExtId (const char *id,
- const char *kind)
- : kind_ (kind),
- id_ (id)
-{
-}
-
-NS_ExtId::NS_ExtId (const NS_ExtId &rhs)
-{
- id_ = rhs.id_;
- kind_ = rhs.kind_;
-}
-
-NS_ExtId::~NS_ExtId (void)
-{
-}
-
-void
-NS_ExtId::operator= (const NS_ExtId &rhs)
-{
- // Check for self assignment.
- if (&rhs == this)
- return;
-
- id_ = rhs.id_;
- kind_ = rhs.kind_;
-}
-
-int
-NS_ExtId::operator== (const NS_ExtId &rhs) const
-{
- return id_ == rhs.id_ && kind_ == rhs.kind_;
-}
-
-int
-NS_ExtId::operator!= (const NS_ExtId &rhs) const
-{
- return id_ != rhs.id_ || kind_ != rhs.kind_;
-}
-
-u_long
-NS_ExtId::hash (void) const
-{
- ACE_CString temp (id_);
- temp += kind_;
-
- return temp.hash ();
-}
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Entries.h b/TAO/orbsvcs/orbsvcs/Naming/Entries.h
deleted file mode 100644
index 7c899f5e952..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/Entries.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// NS_CosNaming.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (NS_COSNAMING_H)
-#define NS_COSNAMING_H
-
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Synch.h"
-#include "ace/SString.h"
-
-#include "tao/corba.h"
-#include "orbsvcs/CosNamingC.h"
-
-class TAO_ORBSVCS_Export NS_IntId
- // = TITLE
- // Stores information a context keeps for each bound name
- // (object reference and the type of binding).
- //
- // = DESCRIPTION
- //
- //
- //
- //
-{
-public:
- // = Initialization and termination methods.
- NS_IntId (void);
- // default constructor.
-
- NS_IntId (CORBA::Object_ptr obj,
- CosNaming::BindingType type = CosNaming::nobject);
- // constructor.
-
- NS_IntId (const NS_IntId & rhs);
- // copy constructor
-
- ~NS_IntId (void);
- // destructor
-
- void operator= (const NS_IntId & rhs);
- // Assignment operator (does copy memory).
-
- CORBA::Object_ptr ref_;
- // CORBA object reference of the bound object.
-
- CosNaming::BindingType type_;
- // Indicator of whether the object is a NamingContext that should
- // participate in name resolution when compound names are used.
-};
-
-class TAO_ORBSVCS_Export NS_ExtId
- // = TITLE
- // Stores the name to which an object is bound.
- //
- // = DESCRIPTION
- //
- //
- //
- //
-{
-public:
- // = Initialization and termination methods.
- NS_ExtId (void);
- // default constructor.
-
- NS_ExtId (const char *id,
- const char *kind);
- // constructor.
-
- NS_ExtId (const NS_ExtId & rhs);
- // copy constructor
-
- ~NS_ExtId (void);
- // destructor
-
- void operator= (const NS_ExtId & rhs);
- // Assignment operator (does copy memory).
-
- int operator== (const NS_ExtId &rhs) const;
- // Equality comparison operator (must match both id_ and kind_).
-
- int operator!= (const NS_ExtId &rhs) const;
- // Inequality comparison operator.
-
- u_long hash (void) const;
- // This class has to have a hash for use with ACE_Hash_Map_Manager.
-
- ACE_CString kind_;
- // any information user wants to store (not used by Naming Service).
-
- ACE_CString id_;
- // any information user wants to store (not used by Naming Service).
-};
-
-
-#endif /* NS_COSNAMING_H */
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.cpp b/TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.cpp
deleted file mode 100644
index 7c846b01287..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-
-#include "orbsvcs/Naming/CosNaming_i.h"
-#include "Ior_Multicast.h"
-
-// This is a startup for the naming server.
-// This is used for testing of the Naming Service.
-
-ACE_HANDLE
-IOR_Multicast::get_handle (void) const
-{
- return this->mcast_dgram_.get_handle ();
-}
-
-IOR_Multicast::IOR_Multicast (char * ior,
- u_short port,
- const char *mcast_addr,
- TAO_Service_ID service_id)
- : service_id_ (service_id),
- mcast_addr_ (port, mcast_addr),
- ior_ (ior),
- response_addr_ ((u_short) 0),
- response_ (response_addr_)
-{
- // Use ACE_SOCK_Dgram_Mcast factory to subscribe to multicast group.
- if (this->mcast_dgram_.subscribe (this->mcast_addr_) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "subscribe"));
-}
-
-// destructor
-
-IOR_Multicast::~IOR_Multicast (void)
-{
- this->mcast_dgram_.unsubscribe ();
-}
-
-int
-IOR_Multicast::handle_timeout (const ACE_Time_Value &,
- const void *)
-{
- return 0;
-}
-
-int
-IOR_Multicast::handle_input (ACE_HANDLE)
-{
- struct
- {
- u_short reply_port;
- CORBA::Short service_id;
- } mcast_info;
-
- ssize_t retcode =
- this->mcast_dgram_.recv (&mcast_info,
- sizeof (mcast_info),
- this->remote_addr_);
-
- if (retcode == -1)
- return -1;
-
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Received multicast.\n"));
-
- // @@ validate data string received is from a valid client here
- // @@ Probably not needed
-
- if (retcode != sizeof (mcast_info))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Reply to multicast not sent. Received %d bytes, expected %d.",
- retcode,
- sizeof (mcast_info)),
- -1);
-
- // Confirm that we were meant to respond to this request.
- mcast_info.service_id = ntohs (mcast_info.service_id);
- if (mcast_info.service_id == this->service_id_)
- {
- // Convert port number received to network byte order and set port
- // number to reply;
- mcast_info.reply_port = ntohs (mcast_info.reply_port);
- this->remote_addr_.set_port_number (mcast_info.reply_port);
-
- // send the object reference for the naming service
- retcode = response_.send (this->ior_,
- ACE_OS::strlen (this->ior_) + 1,
- this->remote_addr_,
- 0);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) ior_: <%s>\n"
- " sent through port %u.\n"
- "retcode=%d\n",
- this->ior_,
- this->remote_addr_.get_port_number (),
- retcode));
-
- if (retcode == -1)
- return -1;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Multicast was not for us."));
- }
-
- return 0;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.h b/TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.h
deleted file mode 100644
index 9e3aa74d287..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/Ior_Multicast.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/bin/Naming_Service
-//
-// = FILENAME
-// svr.h
-//
-// = DESCRIPTION
-// Defines a class that listens to a multicast address for client requests
-// for ior of the naming service.
-//
-// = AUTHORS
-// Sergio Flores-Gaitan
-//
-// ============================================================================
-
-#if !defined (NAMING_SERVICE_H)
-#define NAMING_SERVICE_H
-
-#include "ace/INET_Addr.h"
-#include "ace/SOCK_Dgram_Mcast.h"
-#include "ace/Reactor.h"
-
-class TAO_ORBSVCS_Export IOR_Multicast : public ACE_Event_Handler
-{
- // @@ Naga, can you please add the standard comments to this class and
- // make sure that all the comments for each method go underneath the
- // method name?
-public:
- // constructor
- IOR_Multicast (char * ior,
- u_short port,
- const char *mcast_addr,
- TAO_Service_ID service_id);
-
- // destructor
- ~IOR_Multicast (void);
-
- // call back when input is received on the handle.
- virtual int handle_input (ACE_HANDLE fd);
-
- // callback when a timeout has occurred.
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *arg);
-
- // returns the internal handle used to receive multicast
- virtual ACE_HANDLE get_handle (void) const;
-
-private:
- char buf_[BUFSIZ];
- // temporary buffer
-
- TAO_Service_ID service_id_;
- // Service id that we're waiting for.
-
- ACE_SOCK_Dgram_Mcast mcast_dgram_;
- // multicast endpoint of communication
-
- ACE_INET_Addr remote_addr_;
- // remote address that sent multicast
-
- ACE_INET_Addr mcast_addr_;
- // multicast address
-
- char * ior_;
- // object reference to send in response to the multicast
-
- ACE_INET_Addr response_addr_;
- // address of response.
-
- ACE_SOCK_Dgram response_;
- // socket for response to the multicast
-};
-
-#endif /* NAMING_SERVICE_H */
-
-
-
-
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp
deleted file mode 100644
index 0d4f35dcf6b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/Naming_Service
-//
-// = FILENAME
-// Naming_Utils.cpp
-//
-// = DESCRIPTION
-// This class implements a Naming Server wrapper class that holds
-// a Naming Context for TAO NameService.
-//
-// = AUTHOR
-// Nagarajan Surendran (naga@cs.wustl.edu)
-//
-// ============================================================================
-
-#include "orbsvcs/CosNamingC.h"
-#include "tao/corba.h"
-#include "Naming_Utils.h"
-
-// Default constructor
-
-TAO_Naming_Server::TAO_Naming_Server (void)
- : naming_context_ptr_ (0),
- ior_multicast_ (0)
-{
-}
-
-// Constructor which takes an ORB and POA.
-
-TAO_Naming_Server::TAO_Naming_Server (CORBA::ORB_var &orb,
- PortableServer::POA_var &child_poa)
-{
- this->init (orb, child_poa);
-}
-
-// Function to initialize the name server object under the passed orb
-// and poa
-
-int
-TAO_Naming_Server::init (CORBA::ORB_var &orb,
- PortableServer::POA_var &child_poa)
-{
- TAO_TRY
- {
- // Get the naming context ptr to NameService.
- naming_context_ptr_ =
- naming_context_impl_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("NameService");
-
- child_poa->activate_object_with_id (id.in (),
- &naming_context_impl_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Stringify the objref we'll be implementing, and print it to
- // stdout. Someone will take that string and give it to a
- // client. Then release the object.
- CORBA::Object_var obj =
- child_poa->id_to_reference (id.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::String_var str =
- orb->object_to_string (obj.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG,
- "listening as object <%s>\n",
- str.in ()));
-
-#if defined (ACE_HAS_IP_MULTICAST)
- // Get reactor instance from TAO.
- ACE_Reactor *reactor =
- TAO_ORB_Core_instance ()->reactor ();
-
- // First, see if the user has given us a multicast port number
- // for the name service on the command-line;
- u_short port =
- TAO_ORB_Core_instance ()->orb_params ()->name_service_port ();
-
- if (port == 0)
- {
- const char *port_number =
- ACE_OS::getenv ("NameServicePort");
-
- if (port_number != 0)
- port = ACE_OS::atoi (port_number);
- }
-
- if (port == 0)
- port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT;
-
- char *naming_ior = ACE_OS::strdup (str.in ());
-
- // Instantiate a server which will receive requests for an ior
- ACE_NEW_RETURN (ior_multicast_,
- IOR_Multicast (naming_ior,
- port,
- ACE_DEFAULT_MULTICAST_ADDR,
- TAO_SERVICEID_NAMESERVICE),
- -1);
-
- // Register event handler for the ior multicast.
- if (reactor->register_handler (ior_multicast_,
- ACE_Event_Handler::READ_MASK) == -1)
- ACE_DEBUG ((LM_DEBUG,
- "cannot register Event handler\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "The multicast server setup is done.\n"));
-#endif /* ACE_HAS_IP_MULTICAST */
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Naming Service");
- }
- TAO_ENDTRY;
- return 0;
-}
-
-// Returns the "NameService" NamingContext implementation object.
-
-NS_NamingContext &
-TAO_Naming_Server::GetNamingContext (void)
-{
- return naming_context_impl_ ;
-}
-
-// Returns a pointer to the NamingContext.
-
-CosNaming::NamingContext*
-TAO_Naming_Server::operator -> (void) const
-{
- return this->naming_context_ptr_;
-}
-
-// Destructor.
-
-TAO_Naming_Server::~TAO_Naming_Server (void)
-{
- delete ior_multicast_;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h
deleted file mode 100644
index c7288860101..00000000000
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/Naming_Service
-//
-// = FILENAME
-// Naming_Utils.h
-//
-// = DESCRIPTION
-// This class implements a Naming Server wrapper class which holds
-// a Naming Context for TAO NameService.
-//
-// = AUTHORS
-// Nagarajan Surendran (naga@cs.wustl.edu)
-//
-// ============================================================================
-
-#if !defined (_NAMING_SERVER_H)
-#define _NAMING_SERVER_H
-
-#include "tao/corba.h"
-#include "orbsvcs/CosNamingC.h"
-#include "CosNaming_i.h"
-#include "Ior_Multicast.h"
-
-class TAO_ORBSVCS_Export TAO_Naming_Server
-{
- // = TITLE
- // Defines a wrapper class which holds a Naming Context
- // implementation for TAO "NamingService" naming context.
- //
- // = DESCRIPTION
- // This class takes an orb and Poa reference and activates the
- // NamingService naming context object under that. It also
- // defines the operator -> so that NamingContext functions like
- // bind, unbind .. can be called on a NameServer object.
-public:
- TAO_Naming_Server (void);
- //Default constructor.
-
- TAO_Naming_Server (CORBA::ORB_var &orb,
- PortableServer::POA_var &root_poa);
- // Takes the POA under which to register the Naming Service
- // implementation object.
-
- int init (CORBA::ORB_var &orb,
- PortableServer::POA_var &root_poa);
- // Initialize the name server under the given ORB and POA.
-
- NS_NamingContext &GetNamingContext (void);
- // Returns the "NameService" NamingContext implementation object
- // reference.
-
- CosNaming::NamingContext *operator -> (void) const;
- // Returns a NamingContext_ptr.
-
- ~TAO_Naming_Server (void);
- // Destructor.
-
-private:
- NS_NamingContext naming_context_impl_;
- // Naming context implemetation for "NameService".
-
- CosNaming::NamingContext_ptr naming_context_ptr_;
- // NamingContext ptr.
-
- IOR_Multicast *ior_multicast_;
- // The ior_multicast event handler.
-};
-
-#endif /* _NAMING_SERVER_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
deleted file mode 100644
index 0f73dbbc76e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
+++ /dev/null
@@ -1,656 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosPropertyService_i.cpp
-//
-// = AUTHOR
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "orbsvcs/Property/CosPropertyService_i.h"
-
-TAO_PropertySetFactory::TAO_PropertySetFactory (void)
-{
-}
-
-CosPropertyService::PropertySet_ptr
-TAO_PropertySetFactory::create_propertyset (CORBA::Environment &env)
-{
- CosPropertyService::PropertySet_ptr return_val = 0;
-
- return return_val;
-}
-
-CosPropertyService::PropertySet_ptr
-TAO_PropertySetFactory::create_constrained_propertyset (const CosPropertyService::PropertyTypes &allowed_property_types,
- const CosPropertyService::Properties &allowed_properties,
- CORBA::Environment &env)
-{
- CosPropertyService::PropertySet_ptr return_val = 0;
-
- return return_val;
-}
-
-CosPropertyService::PropertySet_ptr
-TAO_PropertySetFactory::create_initial_propertyset (const CosPropertyService::Properties &initial_properties,
- CORBA::Environment &env)
-{
- CosPropertyService::PropertySet_ptr return_val = 0;
-
- return return_val;
-}
-
-TAO_PropertySetFactory::~TAO_PropertySetFactory (void)
-{
-}
-
-TAO_PropertySetDefFactory::TAO_PropertySetDefFactory (void)
-{
-}
-
-TAO_PropertySetDefFactory::~TAO_PropertySetDefFactory (void)
-{
-}
-
-CosPropertyService::PropertySetDef_ptr
-TAO_PropertySetDefFactory::create_propertysetdef (CORBA::Environment &env)
-{
- CosPropertyService::PropertySetDef_ptr return_val = 0;
-
- return return_val;
-}
-
-CosPropertyService::PropertySetDef_ptr
-TAO_PropertySetDefFactory::create_constrained_propertysetdef (const CosPropertyService::PropertyTypes &allowed_property_types,
- const CosPropertyService::PropertyDefs &allowed_property_defs,
- CORBA::Environment &env)
-{
- CosPropertyService::PropertySetDef_ptr return_val = 0;
-
- return return_val;
-}
-
-CosPropertyService::PropertySetDef_ptr
-TAO_PropertySetDefFactory::create_initial_propertysetdef (const CosPropertyService::PropertyDefs &initial_property_defs,
- CORBA::Environment &env)
-{
- CosPropertyService::PropertySetDef_ptr return_val = 0;
-
- return return_val;
-}
-
-// Makes default sized hash_table_.
-
-TAO_PropertySet::TAO_PropertySet (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "TAO_PropertySet Constructor-Hash_Map_Manager created, current_size %d, total_size %d \n",
- this->hash_table_.current_size (),
- this->hash_table_.total_size ()));
-}
-
-// Destructor.
-
-TAO_PropertySet::~TAO_PropertySet (void)
-{
-}
-
-// Function to modify or add a property to the PropertySet alex: Just
-// adds the name value to the set... Doesn't check for Typecode
-// overwriting, duplicate names, void names etc, yet. @@ Using Normal
-// mode as the default mode of properties, I need to change this based
-// on the Initial set of allowed modes, if there is anything like that
-// set by the client.
-
-void
-TAO_PropertySet::define_property (const char *property_name,
- const CORBA::Any &property_value,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Key hash_key (property_name);
- CosProperty_Hash_Value hash_value (property_value,
- CosPropertyService::normal);
-
- ACE_DEBUG ((LM_DEBUG,
- "define_property : property_name %s \n",
- property_name));
-
- int ret = this->hash_table_.bind (hash_key, hash_value);
-
- if (ret == 0)
- ACE_DEBUG ((LM_DEBUG,
- "define_property: retval : %d \n",
- ret));
-}
-
-// Defining a sequence of properties
-//
-// @@ Need to check for overwriting, duplicate names, void names etc.
-
-void
-TAO_PropertySet::define_properties (const CosPropertyService::Properties &nproperties,
- CORBA::Environment &env)
-{
- for (int pi = 0; pi < nproperties.length (); pi++)
- this->define_property (nproperties [pi].property_name.in (),
- nproperties [pi].property_value,
- env);
-}
-
-// Returns the current number of properties associated with this
-// PropertySet.
-
-CORBA::ULong
-TAO_PropertySet::get_number_of_properties ( CORBA::Environment &env)
-{
- return this->hash_table_.current_size ();
-}
-
-// Returns all of the property names currently defined in the
-// PropertySet. If the PropertySet contains more than how_many
-// property names, then the remaining property names are put into the
-// PropertyNamesIterator.
-
-void
-TAO_PropertySet::get_all_property_names (CORBA::ULong how_many,
- CosPropertyService::PropertyNames_out property_names,
- CosPropertyService::PropertyNamesIterator_out rest,
- CORBA::Environment &env)
-{
- size_t num_of_properties =
- this->get_number_of_properties (env);
-
- if (num_of_properties == 0)
- // Nothing to do.
- return;
-
- // Set the length of the property_names appropriately.
- CORBA::ULong sequence_length = 0;
-
- if (how_many > 0)
- {
- ACE_NEW (property_names,
- CosPropertyService::PropertyNames);
- if (how_many >= num_of_properties)
- sequence_length = num_of_properties;
- else
- sequence_length = how_many;
- property_names->length (sequence_length);
- }
-
- // Iterate thru names and put them in the property_names.
-
- CosProperty_Hash_Entry_ptr entry_ptr;
- CosProperty_Hash_Iterator iterator (this->hash_table_);
-
- for (int ni = 0;
- ni < sequence_length;
- ni++, iterator.advance ())
- if (iterator.next (entry_ptr) != 0)
- property_names [ni] = CORBA::string_dup (entry_ptr->ext_id_.pname_);
-
- // If there are some more properties, put them in the
- // iterator. How?? Make a new PropertSet and use that to create
- // propertyNames Iterator.
-
- if (num_of_properties > how_many)
- {
- TAO_PropertySet *property_set;
-
- ACE_NEW (property_set, TAO_PropertySet);
-
- for (size_t i = how_many;
- i < num_of_properties;
- i++, iterator.advance ())
- if (iterator.next (entry_ptr) != 0)
- if (property_set->hash_table_.bind (entry_ptr->ext_id_,
- entry_ptr->int_id_) < 0)
- ACE_DEBUG ((LM_DEBUG,
- "Err: get_all_property_names\n"));
-
- // Make the NamesIterator out of this TAO_PropertySet.
- TAO_PropertyNamesIterator *names_iterator;
- ACE_NEW (names_iterator, TAO_PropertyNamesIterator (*property_set));
-
- rest = CosPropertyService::PropertyNamesIterator::_duplicate (names_iterator->_this (env));
- }
-}
-
-// Returns the value of a property in the PropertySet.
-
-CORBA::Any *
-TAO_PropertySet::get_property_value (const char *property_name,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Key hash_key (CORBA::string_copy (property_name));
- CosProperty_Hash_Value hash_value;
-
- ACE_DEBUG ((LM_DEBUG,
- "get_prop_value: hash_key.pname_.in () : %s \n",
- hash_key.pname_.in ()));
- if (this->hash_table_.find (hash_key, hash_value) != 0)
- ACE_ERROR ((LM_ERROR,
- "Find failed: \n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Find succeeded \n"));
- return hash_value.pvalue_._retn ();
-}
-
-// Returns the values of the properties listed in property_names. When
-// the boolean flag is true, the Properties parameter contains valid
-// values for all requested property names. If false, then all
-// properties with a value of type tk_void may have failed due to
-// PropertyNotFound or InvalidPropertyName.
-
-CORBA::Boolean
-TAO_PropertySet::get_properties (const CosPropertyService::PropertyNames &property_names,
- CosPropertyService::Properties_out nproperties,
- CORBA::Environment &env)
-{
- size_t n = property_names.length ();
-
- if (n == 0)
- return CORBA::B_FALSE;
-
- CORBA::Any_ptr any_ptr = 0;
-
- ACE_NEW_RETURN (nproperties,
- CosPropertyService::Properties,
- CORBA::B_FALSE);
-
- nproperties->length (n);
-
- CORBA::Boolean ret_val = CORBA::B_TRUE;
-
- for (size_t i = 0; i < n; i++)
- {
- any_ptr = get_property_value (property_names [i], env);
-
- if (any_ptr != 0)
- {
- // Property name is valid.
- nproperties [i].property_name =
- CORBA::string_dup (property_names [i]);
- nproperties [i].property_value = *any_ptr;
- }
- else
- {
- // Invalid name. Ret value is False.
- ret_val = CORBA::B_FALSE;
- nproperties [i].property_name =
- CORBA::string_dup (property_names [i]);
-
- // @@ Make any value with tk_void type. Using replace
- // method, <<= operator doesnot exist yet for this.
- nproperties [i].property_value.replace (CORBA::_tc_void,
- 0,
- CORBA::B_FALSE,
- env);
- }
- }
- TAO_CHECK_ENV_RETURN (env, 1);
- return ret_val;
-}
-
-void
-TAO_PropertySet::get_all_properties (CORBA::ULong how_many,
- CosPropertyService::Properties_out nproperties,
- CosPropertyService::PropertiesIterator_out rest,
- CORBA::Environment &env)
-{
- size_t num_of_properties =
- hash_table_.current_size ();
-
- if (num_of_properties == 0)
- return;
-
- // Alloc memory for nproperties if how_many > 0.
- CORBA::ULong sequence_length = 0;
-
- if (how_many > 0)
- {
- ACE_NEW (nproperties,
- CosPropertyService::Properties);
- if (how_many >= num_of_properties)
- sequence_length = num_of_properties;
- else
- sequence_length = how_many;
- nproperties->length (sequence_length);
- }
-
- // Prepare an iterator and iterate thru the PropertySet. Retrive the
- // values.
- CosProperty_Hash_Iterator iterator (this->hash_table_);
- CosProperty_Hash_Entry_ptr entry_ptr = 0;
-
- for (CORBA::ULong i = 0;
- i < sequence_length;
- i++, iterator.advance ())
- if (iterator.next (entry_ptr) != 0)
- {
- nproperties[i].property_name =
- CORBA::string_dup (entry_ptr->ext_id_.pname_);
- nproperties[i].property_value =
- entry_ptr->int_id_.pvalue_.in ();
- }
-
- // If there are more properties, put them in the PropertiesIterator.
- // Make a new TAO_PropertySet and use that to create an Properties
- // iterator. put that in a iterator and assign that to the out
- // paramerter.
-
- if (num_of_properties > how_many)
- {
- TAO_PropertySet *prop_set;
-
- ACE_NEW (prop_set, TAO_PropertySet);
-
- for (size_t i = how_many;
- i < num_of_properties;
- i++)
- {
- if (iterator.next (entry_ptr) != 0)
- if (prop_set->hash_table_.bind (entry_ptr->ext_id_,
- entry_ptr->int_id_) < 0)
- ACE_DEBUG ((LM_DEBUG, "Err: get_all_properties\n"));
- iterator.advance ();
- }
-
- // Make the iterator out of the new TAO_Propset.
- ACE_NEW (TAO_PropertiesIterator *prop_iterator,
- TAO_PropertiesIterator (*prop_set));
-
- rest = CosPropertyService::PropertiesIterator::_duplicate (prop_iterator->_this (env));
- }
-}
-
-// Deletes the specified property if it exists from a PropertySet.
-
-void
-TAO_PropertySet::delete_property (const char *property_name,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Key hash_key (CORBA::string_copy (property_name));
-
- ACE_DEBUG ((LM_DEBUG, "delete_property : hash_key.pname_.in() %s \n",
- hash_key.pname_.in()));
- // Doing unbinding.. Not getting CosProperty_Hash_Value
- // back... Problem if dynamic allocation is done. @@ Is memory
- // deallocation done?
- if (this->hash_table_.unbind (hash_key) != 0)
- ACE_ERROR ((LM_ERROR,
- "Unbind failed \n"));
-}
-
-// Deletes the properties defined in the property_names
-// parameter. This is a batch operation that returns the
-// MultipleExceptions exception if any delete failed.
-
-void
-TAO_PropertySet::delete_properties (const CosPropertyService::PropertyNames &property_names,
- CORBA::Environment &env)
-{
- for (size_t pi = 0; pi < property_names.length (); pi++)
- this->delete_property (property_names[pi], env);
-}
-
-// Delete all the properties in the current ProperySet : Do it one by
-// one. close () and then open ().
-
-CORBA::Boolean
-TAO_PropertySet::delete_all_properties (CORBA::Environment &env)
-{
- if (hash_table_.close () != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "delete_all_properties:Error Closing the Hash_Map_Manager"),
- CORBA::B_FALSE);
- else if (hash_table_.open () != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Could not open Hash_Map_Manager"),
- CORBA::B_FALSE);
- else
- return CORBA::B_TRUE;
-}
-
-// Returns TRUE if the property is defined in the PropertySet.
-
-CORBA::Boolean
-TAO_PropertySet::is_property_defined (const char *property_name, CORBA::Environment &env)
-{
- CosProperty_Hash_Key hash_key (property_name);
-
- if (this->hash_table_.find (hash_key) == 0)
- ACE_DEBUG ((LM_DEBUG,
- "is_property_defined :find successfull \n"));
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "is_property_defined :find failed \n"),
- CORBA::B_FALSE);
-
- return CORBA::B_TRUE;
-}
-
-TAO_PropertySetDef::TAO_PropertySetDef (void)
-{
-}
-
-TAO_PropertySetDef::~TAO_PropertySetDef (void)
-{
-}
-
-void
-TAO_PropertySetDef::get_allowed_property_types (CosPropertyService::PropertyTypes_out property_types,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_PropertySetDef::get_allowed_properties (CosPropertyService::PropertyDefs_out property_defs,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_PropertySetDef::define_property_with_mode (const char *property_name,
- const CORBA::Any &property_value,
- CosPropertyService::PropertyModeType property_mode,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_PropertySetDef::define_properties_with_modes (const CosPropertyService::PropertyDefs &property_defs,
- CORBA::Environment &env)
-{
-}
-
-CosPropertyService::PropertyModeType
-TAO_PropertySetDef::get_property_mode (const char *property_name,
- CORBA::Environment &env)
-{
- CosPropertyService::PropertyModeType return_val = CosPropertyService::undefined;
-
- return return_val;
-}
-
-CORBA::Boolean
-TAO_PropertySetDef::get_property_modes (const CosPropertyService::PropertyNames &property_names,
- CosPropertyService::PropertyModes_out property_modes,
- CORBA::Environment &env)
-{
- CORBA::Boolean return_val = CORBA::B_FALSE;
-
- return return_val;
-}
-
-void
-TAO_PropertySetDef::set_property_mode (const char *property_name,
- CosPropertyService::PropertyModeType property_mode,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_PropertySetDef::set_property_modes (const CosPropertyService::PropertyModes &property_modes,
- CORBA::Environment &env)
-{
-}
-
-// Constructor. Construct the iterator from the PropertySet object.
-
-TAO_PropertyNamesIterator::TAO_PropertyNamesIterator (TAO_PropertySet &property_set)
- : iterator_ (property_set.hash_table_)
-{
-}
-
-// Destructor.
-
-TAO_PropertyNamesIterator::~TAO_PropertyNamesIterator (void)
-{
-}
-
-// Resets the position in an iterator to the first property name, if
-// one exists.
-
-void
-TAO_PropertyNamesIterator::reset (CORBA::Environment &env)
-{
- this->iterator_.reset ();
-}
-
-// The next_one operation returns true if an item exists at the
-// current position in the iterator with an output parameter of a
-// property name. A return of false signifies no more items in the
-// iterator.
-
-CORBA::Boolean
-TAO_PropertyNamesIterator::next_one (CORBA::String_out property_name,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Entry_ptr entry_ptr;
-
- if (this->iterator_.next (entry_ptr) != 0)
- {
- property_name =
- CORBA::string_copy (entry_ptr->ext_id_.pname_);
- this->iterator_.advance ();
- return CORBA::B_TRUE;
- }
- else
- {
- property_name = 0;
- return CORBA::B_FALSE;
- }
-}
-
-CORBA::Boolean
-TAO_PropertyNamesIterator::next_n (CORBA::ULong how_many,
- CosPropertyService::PropertyNames_out property_names,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Entry_ptr entry_ptr = 0;
-
- if (this->iterator_.next (entry_ptr) == 0 || how_many == 0)
- return CORBA::B_FALSE;
-
- ACE_NEW_RETURN (property_names,
- CosPropertyService::PropertyNames,
- CORBA::B_FALSE);
-
- size_t size = this->iterator_.map ().current_size ();
-
- property_names->length (how_many <= size ? how_many : size);
-
- for (size_t ni = 0;
- ni < property_names->length ();
- ni++, this->iterator_.advance ())
- if (this->iterator_.next (entry_ptr) != 0)
- property_names [ni] = CORBA::string_dup (entry_ptr->ext_id_.pname_);
-
- return CORBA::B_TRUE;
-}
-
-void
-TAO_PropertyNamesIterator::destroy (CORBA::Environment &env)
-{
-}
-
-TAO_PropertiesIterator::TAO_PropertiesIterator (TAO_PropertySet &property_set)
- : iterator_ (property_set.hash_table_)
-{
-}
-
-TAO_PropertiesIterator::~TAO_PropertiesIterator (void)
-{
-}
-
-void
-TAO_PropertiesIterator::reset (CORBA::Environment &env)
-{
- this->iterator_.reset ();
-}
-
-CORBA::Boolean
-TAO_PropertiesIterator::next_one (CosPropertyService::Property_out aproperty,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Entry_ptr entry_ptr;
-
- if (this->iterator_.next (entry_ptr) != 0)
- {
- aproperty = new CosPropertyService::Property ;
- aproperty->property_name = entry_ptr->ext_id_.pname_;
- aproperty->property_value = entry_ptr->int_id_.pvalue_.in ();
- this->iterator_.advance ();
- return CORBA::B_TRUE;
- }
- else
- CORBA::B_FALSE;
-}
-
-CORBA::Boolean
-TAO_PropertiesIterator::next_n (CORBA::ULong how_many,
- CosPropertyService::Properties_out nproperties,
- CORBA::Environment &env)
-{
- CosProperty_Hash_Entry_ptr entry_ptr = 0;
-
- if (this->iterator_.next (entry_ptr) == 0 || how_many == 0)
- return CORBA::B_FALSE;
-
- ACE_NEW_RETURN (nproperties,
- CosPropertyService::Properties,
- CORBA::B_FALSE);
-
- size_t size = this->iterator_.map ().current_size ();
-
- nproperties->length (how_many <= size ? how_many : size);
-
- for (size_t ni = 0;
- ni < nproperties->length ();
- ni++,
- this->iterator_.advance ())
- if (this->iterator_.next (entry_ptr) != 0)
- {
- nproperties [ni].property_name = entry_ptr->ext_id_.pname_;
- nproperties [ni].property_value =
- entry_ptr->int_id_.pvalue_.in ();
- }
- else
- // @@ Should be an exception.
- break;
- return CORBA::B_TRUE;
-}
-
-void
-TAO_PropertiesIterator::destroy (CORBA::Environment &env)
-{
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h
deleted file mode 100644
index 6aca4076f24..00000000000
--- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/* -*- C++ -*- */
-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// CosPropertyService_i.h
-//
-// = AUTHOR
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (COSPROPERTYSERVICE_I_H)
-#define COSPROPERTYSERVICE_I_H
-
-#include "ace/OS.h"
-#include "orbsvcs/orbsvcs_export.h"
-#include "orbsvcs/CosPropertyServiceS.h"
-#include "CosProperty_Hash.h"
-
-class TAO_ORBSVCS_Export TAO_PropertySetFactory : public virtual POA_CosPropertyService::PropertySetFactory
-{
- // = TITLE
- // Factory class for the TAO_PropertySet class objects.
- //
- // = DESCRIPTION
- // The object may be created with some predfined properties.
-public:
- // = Initialization and termination methods.
- TAO_PropertySetFactory (void);
- // Constructor.
-
- virtual ~TAO_PropertySetFactory (void);
- // Destructor.
-
- virtual CosPropertyService::PropertySet_ptr
- create_propertyset (CORBA::Environment &env);
- // Returns a new TAO_PropertySet object.
-
- virtual CosPropertyService::PropertySet_ptr
- create_constrained_propertyset (const CosPropertyService::PropertyTypes &allowed_property_types,
- const CosPropertyService::Properties &allowed_properties,
- CORBA::Environment &env);
- // Allows a client to create a new TAO_PropertySet with specific
- // constraints.
-
- virtual CosPropertyService::PropertySet_ptr
- create_initial_propertyset (const CosPropertyService::Properties &initial_properties,
- CORBA::Environment &env) ;
- // Allows a client to create a new TAO_PropertySet with specific
- // initial properties.
-};
-
-class TAO_ORBSVCS_Export TAO_PropertySetDefFactory : public virtual POA_CosPropertyService::PropertySetDefFactory
-{
- // = TITLE
- // Factory class for the TAO_PropertySetDef objects.
- //
- // = DESCRIPTION
- // The object creation may be done with some predefined properties.
-public:
- // = Initialization and termination methods.
- TAO_PropertySetDefFactory(void);
- // Constructor.
-
- virtual ~TAO_PropertySetDefFactory (void);
- // Destructor.
-
- virtual CosPropertyService::PropertySetDef_ptr create_propertysetdef (CORBA::Environment &env);
- // Returns a new TAO_PropertySetDef object.
-
- virtual CosPropertyService::PropertySetDef_ptr
- create_constrained_propertysetdef (const CosPropertyService::PropertyTypes &allowed_property_types,
- const CosPropertyService::PropertyDefs &allowed_property_defs,
- CORBA::Environment &env);
- // Allows a client to create a new TAO_PropertySet with specific
- // constraints.
-
-
- virtual CosPropertyService::PropertySetDef_ptr
- create_initial_propertysetdef (const CosPropertyService::PropertyDefs &initial_property_defs,
- CORBA::Environment &env);
- // Allows a client to create a new TAO_PropertySet with specific
- // initial properties.
-};
-
-class TAO_ORBSVCS_Export TAO_PropertySet : public virtual POA_CosPropertyService::PropertySet
-{
- // = TITLE
- // Gives operations for defining, deleting, enumerating and
- // checking of properties.
- //
- // = DESCRIPTION
- // Uses a HashTable to manage the properties.
-public:
- friend class TAO_PropertyNamesIterator;
- friend class TAO_PropertiesIterator;
-
- // = Initialization and termination methods.
- TAO_PropertySet (void);
- // Default constructor.
-
- virtual ~TAO_PropertySet (void);
- // Destructor function.
-
- virtual void define_property (const char *property_name,
- const CORBA::Any &property_value,
- CORBA::Environment &env);
- // Store the property in the hash after checking for validity of the
- // property name, duplicate name, type code over writing etc.
-
- virtual void define_properties (const CosPropertyService::Properties &nproperties,
- CORBA::Environment &env);
- // Define a sequence of properties at a time.
-
- virtual CORBA::ULong get_number_of_properties (CORBA::Environment &env);
- // Get the number of properties that are currently defined in the
- // PropertySet.
-
- virtual void get_all_property_names (CORBA::ULong how_many,
- CosPropertyService::PropertyNames_out property_names,
- CosPropertyService::PropertyNamesIterator_out rest,
- CORBA::Environment &env);
- // Get the names of all the properties that are currently defined in
- // the property set.
-
- virtual CORBA::Any *get_property_value (const char *property_name,
- CORBA::Environment &env);
- // Get the value of the property, given the name.
-
- virtual CORBA::Boolean get_properties (const CosPropertyService::PropertyNames &property_names,
- CosPropertyService::Properties_out nproperties,
- CORBA::Environment &env);
- // Get all names and their property values.
-
- virtual void get_all_properties (CORBA::ULong how_many,
- CosPropertyService::Properties_out nproperties,
- CosPropertyService::PropertiesIterator_out rest,
- CORBA::Environment &env);
- // Returns all of the property names currently defined in the
- // PropertySet. If the PropertySet contains more than how_many
- // property names, then the remaining property names are put into the PropertyNamesIterator.
-
- virtual void delete_property (const char *property_name,
- CORBA::Environment &env);
- // Delete a property given a name.
-
- virtual void delete_properties (const CosPropertyService::PropertyNames &property_names,
- CORBA::Environment &env);
- // Delete all the these properties from this property set.
-
- virtual CORBA::Boolean delete_all_properties (CORBA::Environment &env);
- // Delete everything from this property set.
-
- virtual CORBA::Boolean is_property_defined (const char *property_name,
- CORBA::Environment &env);
- // Tell whether this property is defined or no. Forget about the
- // value.
-private:
- typedef ACE_Hash_Map_Manager<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Map;
- typedef ACE_Hash_Map_Entry<CosProperty_Hash_Key, CosProperty_Hash_Value>
- CosProperty_Hash_Entry;
- typedef CosProperty_Hash_Entry *
- CosProperty_Hash_Entry_ptr;
- typedef ACE_Hash_Map_Iterator<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Iterator;
- // Typedefs are useful.
-
- CosProperty_Hash_Map hash_table_;
- // This Hash_Table manages storage for our properties.
-};
-
-class TAO_ORBSVCS_Export TAO_PropertySetDef : public virtual TAO_PropertySet
-{
- // = TITLE
- // This class implements PropertySetDef interface, which is
- // specialization (subclass) of PropertySet interface. This
- // class provides operations to PropertySet constraints, define
- // and modify with modes, and to get or set property modes.
- //
- // = DESCRIPTION
- // It should be noted that a TAO_PropertySetDef is still considered
- // a PropertySet. The specialization operations are simply to
- // provide more client access and control of the characteristics
- // (metadata) of a PropertySet.
-public:
- // = Initialization and termination methods.
- TAO_PropertySetDef (void);
- // Constructor.
-
- virtual ~TAO_PropertySetDef (void);
- // Destructor.
-
- virtual void get_allowed_property_types (CosPropertyService::PropertyTypes_out property_types,
- CORBA::Environment &env);
- // Indicates which types of properties are supported by this
- // PropertySet. If the output sequence is empty, then there is no
- // restrictions on the any TypeCode portion of the property_value
- // field of a Property in this PropertySet, unless the
- // get_allowed_properties output sequence is not empty.
-
- virtual void get_allowed_properties (CosPropertyService::PropertyDefs_out property_defs,
- CORBA::Environment &env);
- // Indicates which properties are supported by this PropertySet. If
- // the output sequence is empty, then there is no restrictions on
- // the properties that can be in this PropertySet, unless the
- // get_allowed_property_types output sequence is not empty.
-
- virtual void define_property_with_mode (const char *property_name,
- const CORBA::Any &property_value,
- CosPropertyService::PropertyModeType property_mode,
- CORBA::Environment &env);
- // This operation will modify or add a property to the
- // PropertySet. If the property already exists, then the property
- // type is checked before the value is overwritten. The property
- // mode is also checked to be sure a new value may be written. If
- // the property does not exist, then the property is added to the
- // PropertySet.
-
- virtual void define_properties_with_modes (const CosPropertyService::PropertyDefs &property_defs,
- CORBA::Environment &env);
- // This operation will modify or add each of the properties in the
- // Properties parameter to the PropertySet.
-
- virtual CosPropertyService::PropertyModeType get_property_mode (const char *property_name,
- CORBA::Environment &env);
- // Get the mode of a property.
-
- virtual CORBA::Boolean get_property_modes (const CosPropertyService::PropertyNames &property_names,
- CosPropertyService::PropertyModes_out property_modes,
- CORBA::Environment &env);
- // Batch operation for getting the property.
-
- virtual void set_property_mode (const char *property_name,
- CosPropertyService::PropertyModeType property_mode,
- CORBA::Environment &env);
- // Set the mode of a property.
-
- virtual void set_property_modes (const CosPropertyService::PropertyModes &property_modes,
- CORBA::Environment &env);
- // Batch operation for setting the property.
-};
-
-class TAO_ORBSVCS_Export TAO_PropertyNamesIterator : public virtual POA_CosPropertyService::PropertyNamesIterator
-{
- // = TITLE
- // The PropertyNamesIterator interface allows a client to
- // iterate through the names using the next_one or next_n operations.
- //
- // = DESCRIPTION
- // A PropertySet maintains a set of name-value pairs. The
- // get_all_property_names operation returns a sequence of names
- // (PropertyNames). If there are additional names, the
- // get_all_property_names operation returns an object supporting
- // the PropertyNamesIterator interface with the additional names.
-public:
- // = Initialization and termination methods.
- TAO_PropertyNamesIterator (TAO_PropertySet &property_set);
- // Constructor.
-
- virtual ~TAO_PropertyNamesIterator (void);
- // Destructor.
-
- virtual void reset (CORBA::Environment &env);
- // The reset operation resets the position in an iterator to the
- // first property name, if one exists.
-
- virtual CORBA::Boolean next_one (CORBA::String_out property_name,
- CORBA::Environment &env);
- // The next_one operation returns true if an item exists at the
- // current position in the iterator with an output parameter of a
- // property name. A return of false signifies no more items in the iterator.
-
-
- virtual CORBA::Boolean next_n (CORBA::ULong how_many,
- CosPropertyService::PropertyNames_out property_names,
- CORBA::Environment &env);
- // The next_n operation returns true if an item exists at the
- // current position in the iterator and the how_many parameter was
- // set greater than zero. The output is a PropertyNames sequence
- // with at most the how_many number of names. A return of false
- // signifies no more items in the iterator.
-
- virtual void destroy (CORBA::Environment &env);
- // Destroys the iterator.
-private:
- typedef ACE_Hash_Map_Manager<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Map;
- typedef ACE_Hash_Map_Iterator<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Iterator;
- typedef ACE_Hash_Map_Entry<CosProperty_Hash_Key, CosProperty_Hash_Value>
- CosProperty_Hash_Entry;
- typedef CosProperty_Hash_Entry * CosProperty_Hash_Entry_ptr;
-
- CosProperty_Hash_Iterator iterator_;
- // The Iterator object.
-};
-
-class TAO_ORBSVCS_Export TAO_PropertiesIterator : public virtual POA_CosPropertyService::PropertiesIterator
-{
- // = TITLE
- // Thid class implements PropertiesIterator interface allows a client to
- // iterate through the name-value pairs using the next_one or
- // next_n operations.
- //
- // = DESCRIPTION
- // A PropertySet maintains a set of name-value pairs. The
- // get_all_properties operation of the PropertySet interface
- // returns a sequence of Property structures (Properties). If
- // there are additional properties, the get_all_properties
- // operation returns an object supporting the PropertiesIterator
- // interface with the additional properties.
-public:
- // = Initialization and termination methods.
- TAO_PropertiesIterator (TAO_PropertySet &property_set);
- // Constructor.
-
- virtual ~TAO_PropertiesIterator (void);
- // Destructor.
-
- virtual void reset (CORBA::Environment &env);
- // Resets the position in an iterator to the first property, if one exists.
-
- virtual CORBA::Boolean next_one (CosPropertyService::Property_out aproperty,
- CORBA::Environment &env);
- // The next_one operation returns true if an item exists at the
- // current position in the iterator with an output parameter of a
- // property. A return of false signifies no more items in the
- // iterator.
-
- virtual CORBA::Boolean next_n (CORBA::ULong how_many,
- CosPropertyService::Properties_out nproperties,
- CORBA::Environment &env);
- // The next_n operation returns true if an item exists at the
- // current position in the iterator and the how_many parameter was
- // set greater than zero. The output is a properties sequence with
- // at most the how_many number of properties. A return of false
- // signifies no more items in the iterator.
-
- virtual void destroy (CORBA::Environment &env);
- // Destroys the iterator.
-
-private:
- typedef ACE_Hash_Map_Manager<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Map;
- typedef ACE_Hash_Map_Iterator<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Iterator;
- typedef ACE_Hash_Map_Entry<CosProperty_Hash_Key, CosProperty_Hash_Value>
- CosProperty_Hash_Entry;
- typedef CosProperty_Hash_Entry * CosProperty_Hash_Entry_ptr;
-
-
- CosProperty_Hash_Iterator iterator_;
- // The iterator object.
-};
-
-#endif /* COSPROPERTYSERVICE_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.cpp b/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.cpp
deleted file mode 100644
index c0138c527cb..00000000000
--- a/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-// $Id$
-
-// ===============================================================================================
-//
-// = FILE
-// CosProperty_Hash.cpp
-//
-// = Description
-// Defines equal and hash functions for the Hash_Property_Map class.
-//
-// = Author
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ================================================================================================
-
-#include "CosProperty_Hash.h"
-
-CosProperty_Hash_Key::CosProperty_Hash_Key (void)
-{
-}
-
-CosProperty_Hash_Key::CosProperty_Hash_Key (const char * &name)
-{
- pname_ = CORBA::string_dup (name);
-}
-
-CosProperty_Hash_Key::CosProperty_Hash_Key (const CosPropertyService::PropertyName &name)
- : pname_ (CORBA::string_dup (name))
-{
-}
-
-CosProperty_Hash_Key::CosProperty_Hash_Key (const CosProperty_Hash_Key &src)
- : pname_ (src.pname_)
-{
-}
-
-int
-CosProperty_Hash_Key::operator == (const CosProperty_Hash_Key &hash_key) const
-{
- ACE_DEBUG ((LM_DEBUG,
- "CosProperty_Hash_Key::operator == : %s == %s \n",
- this->pname_.in (),
- hash_key.pname_.in ()));
- return ACE_OS::strcmp (this->pname_.in (),
- hash_key.pname_.in ()) == 0;
-}
-
-u_long
-CosProperty_Hash_Key::hash (void) const
-{
- u_long ret = ACE::hash_pjw (this->pname_.in ());
-
- ACE_DEBUG ((LM_DEBUG,
- "CosProperty_Hash_Key::hash : hashing %s : val : %d \n",
- this->pname_.in (),
- ret));
- return ret;
-}
-
-CosProperty_Hash_Key::~CosProperty_Hash_Key (void)
-{
-}
-
-CosProperty_Hash_Value::CosProperty_Hash_Value (void)
-{
-}
-
-#if 0
-CosProperty_Hash_Value::CosProperty_Hash_Value (const CORBA::Any &any)
- : pvalue_ (new CORBA::Any (any))
-{
-}
-#endif /* 0 */
-
-CosProperty_Hash_Value::CosProperty_Hash_Value (const CORBA::Any &any,
- const CosPropertyService::PropertyModeType &mode)
- : pvalue_ (new CORBA::Any (any)),
- pmode_ (mode)
-{
-}
-
-CosProperty_Hash_Value::CosProperty_Hash_Value (const CosProperty_Hash_Value &src)
- : pvalue_ (src.pvalue_),
- pmode_ (src.pmode_)
-{
-}
-
-CosProperty_Hash_Value::~CosProperty_Hash_Value (void)
-{
-}
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h b/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h
deleted file mode 100644
index 892404f0b51..00000000000
--- a/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- C++ -*- */
-
-//$Id$
-
-// ===================================================================================================
-//
-// = FILE
-// CosProperty_Hash.h
-//
-// = DESCRITION
-// Defines CosProperty_Hash_Value and CosProperty_Hash_Key classes for the Hash_Map_Manager to
-// be used in the CosPropertyService.
-//
-// = AUTHOR
-// Alexander B. Arulanthu <alex@cs.wustl.edu>
-//
-// ===================================================================================================
-
-#if !defined (COSPROPERTY_HASH_H)
-#define COSPROPERTY_HASH_H
-
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Synch.h"
-#include "orbsvcs/CosPropertyServiceS.h"
-#include "orbsvcs/orbsvcs_export.h"
-
-class TAO_ORBSVCS_Export CosProperty_Hash_Key
-{
- // = TITLE
- // Key for the Hash Table.
-public:
- // = Initialization and termination methods.
- CosProperty_Hash_Key (void);
- // Default constructor.
-
- CosProperty_Hash_Key (const char * &name);
- // Constructor from a const string.
-
- CosProperty_Hash_Key (const CosPropertyService::PropertyName &name);
- // Costructor that takes PropertyName.
-
- CosProperty_Hash_Key (const CosProperty_Hash_Key &hash_key);
- // Copy constructor.
-
- virtual ~CosProperty_Hash_Key (void);
- // Destructor.
-
- virtual int operator == (const CosProperty_Hash_Key &hash_key) const;
- // The operator for hash binding and "find"ing.
-
- virtual u_long hash (void) const;
- // The function that computes a hash value.
-
- CosPropertyService::PropertyName_var pname_;
- // This is still the public variable.
-};
-
-class TAO_ORBSVCS_Export CosProperty_Hash_Value
-{
- // = TITLE
- // This will be the value part in the Hash_Table.
-public:
- // = Initialization and termination methods.
-
- CosProperty_Hash_Value (void);
- // Default constructor.
-
- //CosProperty_Hash_Value (const CORBA::Any &any);
- // Constructor with Any value.
-
- CosProperty_Hash_Value (const CORBA::Any &any,
- const CosPropertyService::PropertyModeType &mode);
- // Constructor with the property_value and the property_mode.
-
- CosProperty_Hash_Value (const CosProperty_Hash_Value &hash_value);
- // Copy constructor.
-
- virtual ~CosProperty_Hash_Value (void);
- // Destructor.
-
- CORBA::Any_var pvalue_;
- // property value.
-
- CosPropertyService::PropertyModeType pmode_;
- // Property Mode.
-};
-
-#endif /* COSPROPERTY_HASH_H */
-
-
-
-
-
diff --git a/TAO/orbsvcs/orbsvcs/RtecEventChannelAdmin.idl b/TAO/orbsvcs/orbsvcs/RtecEventChannelAdmin.idl
deleted file mode 100644
index 9ba626ba73e..00000000000
--- a/TAO/orbsvcs/orbsvcs/RtecEventChannelAdmin.idl
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// $Id$
-//
-#include "RtecEventComm.idl"
-#include "RtecScheduler.idl"
-
-module RtecEventChannelAdmin {
-
- exception AlreadyConnected {};
- exception TypeError {};
-
- struct Dependency {
- RtecEventComm::Event event_;
- RtecScheduler::handle_t rt_info;
- };
- typedef sequence<Dependency> DependencySet;
-
- struct ConsumerQOS {
- DependencySet dependencies;
- };
-
- struct Publication {
- RtecEventComm::Event event_;
- RtecScheduler::Dependency_Info dependency_info_;
- };
- typedef sequence<Publication> PublicationSet;
-
- struct SupplierQOS {
- PublicationSet publications_;
- };
-
- interface ProxyPushConsumer: RtecEventComm::PushConsumer {
- oneway void connect_push_supplier(
- in RtecEventComm::PushSupplier push_supplier,
- in SupplierQOS qos);
- // raises(AlreadyConnected);
- };
-
- interface ProxyPushSupplier: RtecEventComm::PushSupplier {
- oneway void connect_push_consumer(
- in RtecEventComm::PushConsumer push_consumer,
- in ConsumerQOS qos);
- // raises(AlreadyConnected, TypeError);
- };
-
- // TODO: Find out the exception specs for the following interface's
- // methods.
- interface ConsumerAdmin {
- ProxyPushSupplier obtain_push_supplier();
- };
- interface SupplierAdmin {
- ProxyPushConsumer obtain_push_consumer();
- };
-
- interface EventChannel {
- exception SYNCHRONIZATION_ERROR {};
- exception QOS_ERROR {};
- exception SUBSCRIPTION_ERROR {};
- exception CORRELATION_ERROR {};
- exception DISPATCH_ERROR {};
-
- ConsumerAdmin for_consumers();
- SupplierAdmin for_suppliers();
-
- void destroy();
- };
-
-};
-
-
diff --git a/TAO/orbsvcs/orbsvcs/RtecEventComm.idl b/TAO/orbsvcs/orbsvcs/RtecEventComm.idl
deleted file mode 100644
index 732a0cfb6ed..00000000000
--- a/TAO/orbsvcs/orbsvcs/RtecEventComm.idl
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// $Id$
-//
-
-#include "CosTimeBase.idl"
-
-module RtecEventComm {
-
- // = TITLE
- // User defined Event Data.
- //
- // = DESCRIPTION
- // The Event payload is defined by this type.
- // Users wanting maximum flexibility can use an Any,
- // users that only have one type of event may use structures,
- // other users may preffer union, trying to strike a balance
- // between performance and flexibility.
- // Users willing to implement their own marshalling may use a
- // sequence of octet.
-
-#if 0
- union EventData switch(long) {
- case 1: double dval;
- case 2: string sval;
- case 3: sequence<octet> bval;
- default: long lval;
- };
-#else
- struct EventData {
- long x;
- long y;
- };
-#endif
-
- typedef TimeBase::TimeT Time;
-
- typedef long EventSourceID;
- typedef long EventType;
-
- struct Event
- {
- // = TITLE
- // The Event structure.
- //
- // = DESCRIPTION
- // Events are represented by this structure, it is simply a
- // header,data pair.
- //
-
- EventType type_;
- // The event type.
- // This may be different from the discriminator in the EventData
- // union above, the motivation is to allow filtering by data
- // contents: different event types are assigned to different data
- // contents though they use the same discriminator.
-
- EventSourceID source_;
- // Some way to identify the supplier.
-
- long ttl_;
- // The "Time To Live" count, each time an EC process the event it
- // decreases the TTL field, when it gets to zero the message is no
- // longer forwarded.
-
- Time creation_time_;
- Time ec_recv_time_;
- Time ec_send_time_;
- // Some timestamps, they actually belong in the payload, for some
- // kind of measument event.
-
- EventData data_;
- // The event payload.
- };
- typedef sequence<Event> EventSet;
-
- interface PushConsumer {
- oneway void push (in EventSet data);
- oneway void disconnect_push_consumer();
- };
-
- interface PushSupplier {
- oneway void disconnect_push_supplier();
- };
-
-};
-
-
diff --git a/TAO/orbsvcs/orbsvcs/RtecScheduler.idl b/TAO/orbsvcs/orbsvcs/RtecScheduler.idl
deleted file mode 100644
index 998e856cb8e..00000000000
--- a/TAO/orbsvcs/orbsvcs/RtecScheduler.idl
+++ /dev/null
@@ -1,222 +0,0 @@
-// $Id$
-
-#include "CosTimeBase.idl"
-
-module RtecScheduler
-{
- // Module TimeBase defines the OMG Time Service.
- typedef TimeBase::TimeT Time; // 100 nanoseconds
- typedef Time Quantum;
-
- typedef long Period; // 100 nanoseconds
-
- enum Importance
- // Defines the importance of the operation,
- // which can be used by the Scheduler as a
- // "tie-breaker" when other scheduling
- // parameters are equal.
- {
- VERY_LOW_IMPORTANCE,
- LOW_IMPORTANCE,
- MEDIUM_IMPORTANCE,
- HIGH_IMPORTANCE,
- VERY_HIGH_IMPORTANCE
- };
-
- typedef long handle_t;
- // RT_Info's are assigned per-application
- // unique identifiers.
-
- struct Dependency_Info
- {
- long number_of_calls;
- handle_t rt_info;
- // Notice the reference to the RT_Info we
- // depend on.
- };
-
- typedef sequence<Dependency_Info> Dependency_Set;
-
- typedef long OS_Priority;
- typedef long Sub_Priority;
- typedef long Preemption_Priority;
-
- struct RT_Info
- // = TITLE
- // Describes the QoS for an "RT_Operation".
- //
- // = DESCRIPTION
- // The CPU requirements and QoS for each
- // "entity" implementing an application
- // operation is described by the following
- // information.
- {
- // Application-defined string that uniquely
- // identifies the operation.
- string entry_point;
-
- // The scheduler-defined unique identifier.
- handle_t handle;
-
- // Execution times.
- Time worst_case_execution_time;
- Time typical_execution_time;
-
- // To account for server data caching.
- Time cached_execution_time;
-
- // For rate-base operations, this expresses
- // the rate. 0 means "completely pasive",
- // i.e., this operation only executes when
- // called.
- Period period;
-
- // Operation importance, used to "break ties".
- Importance importance;
-
- // For time-slicing (for BACKGROUND operations only).
- Quantum quantum;
-
- // The number of internal threads contained by
- // the operation.
- long threads;
-
- // The following attributes are defined by
- // the Scheduler once the off-line schedule
- // is computed.
-
- // The operations we depend upon.
- Dependency_Set dependencies;
-
- // The OS por processing the events generated
- // from this RT_Info.
- OS_Priority priority;
-
- // For ordering RT_Info's with equal priority.
- Sub_Priority subpriority;
-
- // The queue number for this RT_Info.
- Preemption_Priority preemption_priority;
- };
-
- exception DUPLICATE_NAME {};
- // The application is trying to register the same task again.
-
- exception UNKNOWN_TASK {};
- // The RT_Info handle was not valid.
-
- exception NOT_SCHEDULED {};
- // The application is trying to obtain scheduling information, but
- // none is available.
-
- exception UTILIZATION_BOUND_EXCEEDED {};
- exception INSUFFICIENT_THREAD_PRIORITY_LEVELS {};
- exception TASK_COUNT_MISMATCH {};
- // Problems while computing off-line scheduling.
-
- typedef sequence<RT_Info> RT_Info_Set;
-
- // TODO: Find a reasonable name for this interface, maybe we should
- // change the name of the module to RtecSchedulerAdmin and name this
- // Scheduler
- interface Scheduler
- // = DESCRIPTION
- // This class holds all the RT_Info's for a single application.
- // During the configuration run this will be implemented as a
- // single remote object, whose services are used by the
- // suppliers, consumers and the EC.
- // At run-time each process will hold a copy of the compiled
- // version of the Scheduler, using the precomputed data to
- // resolve requests (avoiding any remote calls) and ignoring any
- // requests for modifying its state.
- // A Factory class will be used to choose the proper
- // implementation.
- //
- // This class must be registered with the naming service using a
- // well known name ("Scheduler" seems the obvious choice), the
- // Naming Context will account for different applications and
- // modes.
- //
- // Once the scheduling data is computed it can be retrieved
- // remotely to generate the code for the run-time version.
- {
- handle_t create (in string entry_point) raises (DUPLICATE_NAME);
- // Creates a new RT_Info entry for the function identifier
- // "entry_point", it can be any string, but the fully qualified
- // name function name is suggested.
- // Returns a handle to the RT_Info.
-
- handle_t lookup (in string entry_point);
- // Lookups a handle for entry_point.
- // TODO: Should we add INVALID_HANDLE or raise an exception?
-
- RT_Info get (in handle_t handle) raises (UNKNOWN_TASK);
- // Retrieve information about an RT_Info.
-
- void set (in handle_t handle,
- in Time time,
- in Time typical_time,
- in Time cached_time,
- in Period period,
- in Importance importance,
- in Quantum quantum,
- in long threads)
- raises (UNKNOWN_TASK);
- // Set the attributes of an RT_Info.
- // Notice that some values may not be modified (like priority).
-
- void add_dependency (in handle_t handle,
- in handle_t dependency,
- in long number_of_calls)
- raises (UNKNOWN_TASK);
- // Adds <dependency> to <handle>
-
- void priority (in handle_t handle,
- out OS_Priority priority,
- out Sub_Priority subpriority,
- out Preemption_Priority p_priority)
- raises (UNKNOWN_TASK, NOT_SCHEDULED);
- void entry_point_priority (in string entry_point,
- out OS_Priority priority,
- out Sub_Priority subpriority,
- out Preemption_Priority p_priority)
- raises (UNKNOWN_TASK, NOT_SCHEDULED);
- // Obtain the run time priorities.
- // TODO: Do we need the two interfaces or is it simply confusing?
- // If we should to keep only the <handle> version: Are the extra
- // round-trips too expensive?
- // If we choose only the <entry_point> version: Are the copies for
- // the string affordable?
-
- void compute_scheduling (in long minimum_priority,
- in long maximum_priority,
- out RT_Info_Set infos)
- raises (UTILIZATION_BOUND_EXCEEDED,
- INSUFFICIENT_THREAD_PRIORITY_LEVELS,
- TASK_COUNT_MISMATCH);
- // Computes the scheduling priorities, returns the RT_Info's with
- // their priorities properly filled.
- // This info can be cached by a Run_Time_Scheduler service or
- // dumped into a C++ file for compilation and even faster (static)
- // lookup.
-
- // TODO: The dependencies field can be removed from the RT_Info
- // and made part of the secrets of "Application", adding the
- // following to satisfy curious clients:
- //
- // struct Dependency {
- // long number_of_calls;
- // handle_t dependency;
- // };
- // typedef sequence<Dependency> Dependency_Set;
- //
- // Dependency_Set dependencies (in handle_t handle)
- // raises (UNKNOWN_TASK);
- // Returns the list of dependencies
- //
- // long number_of_dependencies (in handle_t handle)
- // raises (UNKNOWN_TASK);
- // Returns the number of dependencies.
-
- };
-};
diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp
deleted file mode 100644
index 2ed70747815..00000000000
--- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#include "orbsvcs/Time_Utilities.h"
-#include "orbsvcs/Runtime_Scheduler.h"
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Runtime_Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_Runtime_Scheduler::
-ACE_Runtime_Scheduler (int entry_count,
- RtecScheduler::RT_Info* rt_info[])
-: entry_count_ (entry_count),
- rt_info_ (rt_info)
-{
-}
-
-RtecScheduler::handle_t
-ACE_Runtime_Scheduler::create (const char * entry_point,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::DUPLICATE_NAME))
-{
- // Just make sure its there and returns its handle (position).
- int i;
- for (i = 0; i < entry_count_; ++i)
- {
- if (strcmp (entry_point, rt_info_[i]->entry_point) == 0)
- {
- return i;
- }
- }
- // TODO: throw an exception or print an error.
- return -1;
-}
-
-RtecScheduler::handle_t
-ACE_Runtime_Scheduler::lookup (const char * entry_point,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return create (entry_point, _env);
-}
-
-RtecScheduler::RT_Info*
-ACE_Runtime_Scheduler::get (RtecScheduler::handle_t handle,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK))
-{
- if (handle < 0 || handle > entry_count_)
- {
- TAO_THROW_RETURN (RtecScheduler::UNKNOWN_TASK(), 0);
- }
- return rt_info_[handle];
-}
-
-void ACE_Runtime_Scheduler::set (RtecScheduler::handle_t handle,
- const RtecScheduler::Time &time,
- const RtecScheduler::Time &typical_time,
- const RtecScheduler::Time &cached_time,
- RtecScheduler::Period period,
- RtecScheduler::Importance importance,
- const RtecScheduler::Quantum &quantum,
- CORBA::Long threads,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK))
-{
- // We compare the values with the ones stored and print a message on
- // any differences.
- if (handle < 0 || handle > entry_count_)
- {
- TAO_THROW (RtecScheduler::UNKNOWN_TASK);
- ACE_NOTREACHED (return);
- }
- if (rt_info_[handle]->worst_case_execution_time != time
- || rt_info_[handle]->typical_execution_time != typical_time
- || rt_info_[handle]->cached_execution_time != cached_time
- || rt_info_[handle]->period != period
- || rt_info_[handle]->importance != importance
- || rt_info_[handle]->quantum != quantum
- || rt_info_[handle]->threads != threads)
- {
- ACE_ERROR ((LM_ERROR, "invalid data for RT_Info: %s\n",
- (const char*)rt_info_[handle]->entry_point));
- // TODO: throw something here.
- }
-}
-
-
-void ACE_Runtime_Scheduler::priority (RtecScheduler::handle_t handle,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED))
-{
- if (handle < 0 || handle > entry_count_)
- {
- TAO_THROW (RtecScheduler::UNKNOWN_TASK());
- ACE_NOTREACHED (return);
- }
- priority = rt_info_[handle]->priority;
- subpriority = rt_info_[handle]->subpriority;
- p_priority = rt_info_[handle]->preemption_priority;
-}
-
-void ACE_Runtime_Scheduler::entry_point_priority (const char * entry_point,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED))
-{
- RtecScheduler::handle_t handle = lookup (entry_point, _env);
- if (handle < -1)
- {
- // The exception was thrown or is in _env already.
- return;
- }
- this->priority (handle, priority, subpriority, p_priority, _env);
-}
-
-void ACE_Runtime_Scheduler::add_dependency (RtecScheduler::handle_t handle,
- RtecScheduler::handle_t dependency,
- CORBA::Long number_of_calls,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK))
-{
- if (handle < 0 || handle > entry_count_)
- {
- TAO_THROW (RtecScheduler::UNKNOWN_TASK);
- ACE_NOTREACHED (return);
- }
- // Just check that the information is consistent.
- RtecScheduler::Dependency_Set& deps = rt_info_[handle]->dependencies;
- for (CORBA::ULong i = 0; i < deps.length (); ++i)
- {
- if (deps[i].rt_info == dependency
- && deps[i].number_of_calls == number_of_calls)
- {
- return;
- }
- }
- ACE_ERROR ((LM_ERROR, "unmatched dependency on %s\n",
- (const char*)rt_info_[handle]->entry_point));
-}
-
-void ACE_Runtime_Scheduler::compute_scheduling (CORBA::Long minimum_priority,
- CORBA::Long maximum_priority,
- RtecScheduler::RT_Info_Set_out infos,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UTILIZATION_BOUND_EXCEEDED,
- RtecScheduler::INSUFFICIENT_THREAD_PRIORITY_LEVELS,
- RtecScheduler::TASK_COUNT_MISMATCH))
-{
- // TODO: Right now just do nothing, later we could validate the
- // priorities (without recomputing).
- // TODO: fill up the infos.
- return;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h
deleted file mode 100644
index 23c0221a8f0..00000000000
--- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#ifndef ACE_RUNTIME_SCHEDULER_H
-#define ACE_RUNTIME_SCHEDULER_H
-
-#include "ace/OS.h"
-
-#include "orbsvcs/RtecSchedulerS.h"
-
-class TAO_ORBSVCS_Export ACE_Runtime_Scheduler
- : public POA_RtecScheduler::Scheduler
- // = TITLE
- // A proxy server for RtecScheduler::Scheduler.
- //
- // = DESCRIPTION
- // This class offers the services of the scheduler, but based on
- // precomputed and precompiled information. This results in a
- // highly optimized execution after the configuration runs.
-{
-public:
- ACE_Runtime_Scheduler (int entry_count,
- RtecScheduler::RT_Info* rt_info[]);
- // Initialize the data from the RT_Info array.
- // Only basic validation is done.
-
- virtual RtecScheduler::handle_t create (const char * entry_point,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::DUPLICATE_NAME));
-
- virtual RtecScheduler::handle_t lookup (const char * entry_point,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException));
-
- virtual RtecScheduler::RT_Info* get (RtecScheduler::handle_t handle,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::UNKNOWN_TASK));
-
- virtual void set (RtecScheduler::handle_t handle,
- const RtecScheduler::Time &time,
- const RtecScheduler::Time &typical_time,
- const RtecScheduler::Time &cached_time,
- RtecScheduler::Period period,
- RtecScheduler::Importance importance,
- const RtecScheduler::Quantum &quantum,
- CORBA::Long threads,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::UNKNOWN_TASK));
-
- virtual void priority (RtecScheduler::handle_t handle,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED));
-
- virtual void entry_point_priority (const char * entry_point,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED));
-
- virtual void add_dependency (RtecScheduler::handle_t handle,
- RtecScheduler::handle_t dependency,
- CORBA::Long number_of_calls,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK));
-
- virtual void compute_scheduling (CORBA::Long minimum_priority,
- CORBA::Long maximum_priority,
- RtecScheduler::RT_Info_Set_out infos,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException,
- RtecScheduler::UTILIZATION_BOUND_EXCEEDED,
- RtecScheduler::INSUFFICIENT_THREAD_PRIORITY_LEVELS,
- RtecScheduler::TASK_COUNT_MISMATCH));
-
-private:
- int entry_count_;
- RtecScheduler::RT_Info** rt_info_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Runtime_Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_RUNTIME_SCHEDULER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.i b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.i
deleted file mode 100644
index a21ea7f9897..00000000000
--- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.i
+++ /dev/null
@@ -1,5 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp
deleted file mode 100644
index 9ebcd6f5cc3..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#include "orbsvcs/Time_Utilities.h"
-#include "orbsvcs/Scheduler_Factory.h"
-
-#include "Scheduler_Generic.h"
-#include "Config_Scheduler.h"
-
-#if defined (__ACE_INLINE__)
-#include "Config_Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_Config_Scheduler::ACE_Config_Scheduler (void)
- : impl(new Scheduler_Generic)
-{
- // impl->output_level (10);
-}
-
-ACE_Config_Scheduler::~ACE_Config_Scheduler (void)
-{
- delete impl;
-}
-
-RtecScheduler::handle_t
-ACE_Config_Scheduler::create (const char * entry_point,
- CORBA::Environment &)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::DUPLICATE_NAME))
-{
- typedef RtecScheduler::RT_Info* RT_Info_ptr;
-
- RtecScheduler::RT_Info** rt_info;
- ACE_NEW_RETURN (rt_info, RT_Info_ptr[1], -1);
-
- ACE_NEW_RETURN (rt_info[0], RtecScheduler::RT_Info, -1);
-
- rt_info[0]->entry_point = CORBA::string_dup(entry_point);
- rt_info[0]->handle = -1;
- rt_info[0]->worst_case_execution_time = ORBSVCS_Time::zero;
- rt_info[0]->typical_execution_time = ORBSVCS_Time::zero;
- rt_info[0]->cached_execution_time = ORBSVCS_Time::zero;
- rt_info[0]->period = 0;
- rt_info[0]->importance = RtecScheduler::VERY_LOW_IMPORTANCE;
- rt_info[0]->quantum = ORBSVCS_Time::zero;
- rt_info[0]->threads = 0;
- rt_info[0]->priority = 0;
- rt_info[0]->subpriority = 0;
- rt_info[0]->preemption_priority = 0;
-
- RtecScheduler::handle_t handle = -1;
- switch (impl->register_task (rt_info, 1, handle))
- {
- case ACE_Scheduler::SUCCEEDED:
- break;
- case ACE_Scheduler::ST_VIRTUAL_MEMORY_EXHAUSTED:
- case ACE_Scheduler::ST_TASK_ALREADY_REGISTERED:
- default:
- delete rt_info[0];
- delete[] rt_info;
- ACE_ERROR ((LM_ERROR,
- "Config_Scheduler::create - register_task failed\n"));
- // @@ TODO: throw something.
- break;
- }
- return handle;
-}
-
-RtecScheduler::handle_t
-ACE_Config_Scheduler::lookup (const char * entry_point,
- CORBA::Environment &)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- RtecScheduler::RT_Info* rt_info = 0;
- switch (impl->get_rt_info (entry_point, rt_info))
- {
- case ACE_Scheduler::SUCCEEDED:
- return rt_info->handle;
- ACE_NOTREACHED (break);
- case ACE_Scheduler::FAILED:
- case ACE_Scheduler::ST_UNKNOWN_TASK:
- default:
- ACE_ERROR ((LM_ERROR,
- "Config_Scheduler::lookup - get_rt_info failed\n"));
- // @@ TODO: throw something.
- break;
- }
- return -1;
-}
-
-RtecScheduler::RT_Info*
-ACE_Config_Scheduler::get (RtecScheduler::handle_t handle,
- CORBA::Environment &)
- TAO_THROW_SPEC((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK))
-{
- RtecScheduler::RT_Info* rt_info = 0;
- switch (impl->lookup_rt_info (handle, rt_info))
- {
- case ACE_Scheduler::SUCCEEDED:
- {
- // IDL memory managment semantics require the we return a copy
- RtecScheduler::RT_Info* copy;
- ACE_NEW_RETURN (copy, RtecScheduler::RT_Info (*rt_info), 0);
- return copy;
- }
- ACE_NOTREACHED (break);
- case ACE_Scheduler::FAILED:
- case ACE_Scheduler::ST_UNKNOWN_TASK:
- default:
- ACE_ERROR ((LM_ERROR,
- "Config_Scheduler::get - lookup_rt_info failed\n"));
- // @@ TODO: throw something.
- break;
- }
- return 0;
-}
-
-void ACE_Config_Scheduler::set (RtecScheduler::handle_t handle,
- const RtecScheduler::Time &time,
- const RtecScheduler::Time &typical_time,
- const RtecScheduler::Time &cached_time,
- RtecScheduler::Period period,
- RtecScheduler::Importance importance,
- const RtecScheduler::Quantum &quantum,
- CORBA::Long threads,
- CORBA::Environment &)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK))
-{
- RtecScheduler::RT_Info* rt_info = 0;
- switch (impl->lookup_rt_info (handle, rt_info))
- {
- case ACE_Scheduler::SUCCEEDED:
- rt_info->worst_case_execution_time = time;
- rt_info->typical_execution_time = typical_time;
- rt_info->cached_execution_time = cached_time;
- rt_info->period = period;
- rt_info->importance = importance;
- rt_info->quantum = quantum;
- rt_info->threads = threads;
- break;
- case ACE_Scheduler::FAILED:
- case ACE_Scheduler::ST_UNKNOWN_TASK:
- default:
- ACE_ERROR ((LM_ERROR,
- "Config_Scheduler::set - lookup_rt_info failed\n"));
- // @@ TODO: throw something.
- break;
- }
-}
-
-void ACE_Config_Scheduler::priority (RtecScheduler::handle_t handle,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED))
-{
- ACE_UNUSED_ARG (_env);
-
- if (impl->priority (handle, priority, subpriority, p_priority) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "Config_Scheduler::priority - priority failed\n"));
- // TODO: throw something.
- }
-}
-
-void ACE_Config_Scheduler::entry_point_priority (const char * entry_point,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED))
-{
- this->priority (lookup (entry_point, _env),
- priority, subpriority, p_priority,
- _env);
-}
-
-void ACE_Config_Scheduler::add_dependency (RtecScheduler::handle_t handle,
- RtecScheduler::handle_t dependency,
- CORBA::Long number_of_calls,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK))
-{
- ACE_UNUSED_ARG (_env);
-
- RtecScheduler::RT_Info* rt_info = 0;
- switch (impl->lookup_rt_info (handle, rt_info))
- {
- case ACE_Scheduler::SUCCEEDED:
- {
- RtecScheduler::Dependency_Info dep;
- dep.rt_info = dependency;
- dep.number_of_calls = number_of_calls;
- ACE_Scheduler::add_dependency(rt_info, dep);
- }
- break;
- case ACE_Scheduler::FAILED:
- case ACE_Scheduler::ST_UNKNOWN_TASK:
- default:
- ACE_ERROR ((LM_ERROR,
- "cannot find %d to add dependency", handle));
- // TODO: throw something.
- break;
- }
-}
-
-void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority,
- CORBA::Long maximum_priority,
- RtecScheduler::RT_Info_Set_out infos,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UTILIZATION_BOUND_EXCEEDED,
- RtecScheduler::INSUFFICIENT_THREAD_PRIORITY_LEVELS,
- RtecScheduler::TASK_COUNT_MISMATCH))
-{
- ACE_UNUSED_ARG (_env);
-
- impl->init (minimum_priority, maximum_priority);
- if (impl->schedule () != ACE_Scheduler::SUCCEEDED)
- {
- // TODO: throw something.
- ACE_ERROR ((LM_ERROR, "schedule failed\n"));
- return;
- }
- if (infos == 0)
- {
- infos = new RtecScheduler::RT_Info_Set(impl->tasks ());
- }
- infos->length (impl->tasks ());
- for (RtecScheduler::handle_t handle = 1;
- handle <= (RtecScheduler::handle_t) impl->tasks ();
- ++handle)
- {
- RtecScheduler::RT_Info* rt_info = 0;
- switch (impl->lookup_rt_info (handle, rt_info))
- {
- case ACE_Scheduler::SUCCEEDED:
- // We know that handles start at 1.
- infos[CORBA::ULong(handle - 1)] = *rt_info;
- break;
- case ACE_Scheduler::FAILED:
- case ACE_Scheduler::ST_UNKNOWN_TASK:
- default:
- ACE_ERROR ((LM_ERROR,
- "Config_Scheduler::schedule - lookup_rt_info failed\n"));
- // TODO: throw something.
- break;
- }
- }
- ACE_DEBUG ((LM_DEBUG, "schedule prepared\n"));
-
- ACE_DEBUG ((LM_DEBUG, "dumping to stdout\n"));
- ACE_Scheduler_Factory::dump_schedule (*(infos.ptr()), 0);
- ACE_DEBUG ((LM_DEBUG, "dump done\n"));
-}
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h
deleted file mode 100644
index f2889963e32..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#ifndef ACE_CONFIG_SCHEDULER_H
-#define ACE_CONFIG_SCHEDULER_H
-
-#include "ace/OS.h"
-
-#include "orbsvcs/RtecSchedulerS.h"
-#include "orbsvcs/Event_Service_Constants.h"
-
-class TAO_ORBSVCS_Export ACE_Config_Scheduler
-: public POA_RtecScheduler::Scheduler
- // = TITLE
- // A (local) implementation for the RtecScheduler::Scheduler service.
- //
- // = DESCRIPTION
- // This class implements a servant for the
- // RtecScheduler::Scheduler service, using the Scheduler classes
- // distributed with the EC.
-{
-public:
- ACE_Config_Scheduler (void);
- virtual ~ACE_Config_Scheduler (void);
-
- virtual RtecScheduler::handle_t create (const char * entry_point,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::DUPLICATE_NAME));
-
- virtual RtecScheduler::handle_t lookup (const char * entry_point,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException));
-
- virtual RtecScheduler::RT_Info* get (RtecScheduler::handle_t handle,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::UNKNOWN_TASK));
-
- virtual void set (RtecScheduler::handle_t handle,
- const RtecScheduler::Time &time,
- const RtecScheduler::Time &typical_time,
- const RtecScheduler::Time &cached_time,
- RtecScheduler::Period period,
- RtecScheduler::Importance importance,
- const RtecScheduler::Quantum &quantum,
- CORBA::Long threads,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::UNKNOWN_TASK));
-
- virtual void priority (RtecScheduler::handle_t handle,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED));
-
- virtual void entry_point_priority (const char * entry_point,
- RtecScheduler::OS_Priority& priority,
- RtecScheduler::Sub_Priority& subpriority,
- RtecScheduler::Preemption_Priority& p_priority,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK,
- RtecScheduler::NOT_SCHEDULED));
-
- virtual void add_dependency (RtecScheduler::handle_t handle,
- RtecScheduler::handle_t dependency,
- CORBA::Long number_of_calls,
- CORBA::Environment &_env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- RtecScheduler::UNKNOWN_TASK));
-
- virtual void compute_scheduling (CORBA::Long minimum_priority,
- CORBA::Long maximum_priority,
- RtecScheduler::RT_Info_Set_out infos,
- CORBA::Environment &_env)
- TAO_THROW_SPEC((CORBA::SystemException,
- RtecScheduler::UTILIZATION_BOUND_EXCEEDED,
- RtecScheduler::INSUFFICIENT_THREAD_PRIORITY_LEVELS,
- RtecScheduler::TASK_COUNT_MISMATCH));
-
-private:
- class ACE_Scheduler* impl;
-};
-
-#if defined (__ACE_INLINE__)
-#include "Config_Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_CONFIG_SCHEDULER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.i b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.i
deleted file mode 100644
index a21ea7f9897..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.i
+++ /dev/null
@@ -1,5 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
diff --git a/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp b/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp
deleted file mode 100644
index 95b19655431..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp
+++ /dev/null
@@ -1,1710 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// DynSched.cpp
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#include "math.h"
-#include "float.h"
-
-#include "ace/Sched_Params.h"
-#include "DynSched.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "DynSched.i"
-#endif /* __ACE_INLINE__ */
-
-//////////////////////
-// Helper functions //
-//////////////////////
-
-// compare the DFS finish times of two task entries, order higher time *first*
-extern "C" int compare_entry_finish_times (const void *first, const void *second)
-{
- // sort blank entries to the end
- if (! first)
- {
- return (second) ? 1 : 0;
- }
- else if (! second)
- {
- return -1;
- }
-
- Task_Entry *first_entry =
- * ACE_static_cast (Task_Entry **, first);
- Task_Entry *second_entry =
- * ACE_static_cast (Task_Entry **, second);
-
- // sort blank entries to the end
- if (! first_entry)
- {
- return (second_entry) ? 1 : 0;
- }
- else if (! second_entry)
- {
- return -1;
- }
-
- if (first_entry->finished () > second_entry->finished ())
- {
- return -1;
- }
- else if (first_entry->finished () < second_entry->finished ())
- {
- return 1;
- }
-
- return 0;
-}
-
-//////////////////////////////////////////
-// class ACE_Scheduler member functions //
-//////////////////////////////////////////
-
-const char *
-ACE_Scheduler::status_message (ACE_Scheduler::status_t status)
-{
- switch (status)
- {
- case NOT_SCHEDULED :
- return "NOT_SCHEDULED";
- case SUCCEEDED :
- return "SUCCEEDED";
- case ST_TASK_ALREADY_REGISTERED :
- return "TASK_ALREADY_REGISTERED";
- case ST_BAD_DEPENDENCIES_ON_TASK :
- return "BAD_DEPENDENCIES_ON_TASK";
- case ST_BAD_INTERNAL_POINTER :
- return "BAD_INTERNAL_POINTER";
- case ST_VIRTUAL_MEMORY_EXHAUSTED :
- return "VIRTUAL_MEMORY_EXHAUSTED";
- case ST_UNKNOWN_TASK :
- return "UNKNOWN_TASK";
- case TASK_COUNT_MISMATCH :
- return "TASK_COUNT_MISMATCH";
- case INVALID_PRIORITY :
- return "INVALID_PRIORITY";
-
- // The following are only used during scheduling (in the case of
- // off-line scheduling, they are only used prior to runtime).
- // To save a little code space (280 bytes on g++ 2.7.2/Solaris 2.5.1),
- // we could conditionally compile them so that they're not in the
- // runtime version.
- case ST_UTILIZATION_BOUND_EXCEEDED :
- return "UTILIZATION_BOUND_EXCEEDED";
- case ST_INSUFFICIENT_THREAD_PRIORITY_LEVELS :
- return "INSUFFICIENT_THREAD_PRIORITY_LEVELS";
- case ST_CYCLE_IN_DEPENDENCIES :
- return "CYCLE_IN_DEPENDENCIES";
- case ST_INVALID_PRIORITY_ORDERING :
- return "INVALID_PRIORITY_ORDERING";
- case UNABLE_TO_OPEN_SCHEDULE_FILE :
- return "UNABLE_TO_OPEN_SCHEDULE_FILE";
- case UNABLE_TO_WRITE_SCHEDULE_FILE :
- return "UNABLE_TO_WRITE_SCHEDULE_FILE";
- // End of config-only status values.
-
- default:
- break;
- }
-
- return "UNKNOWN STATUS";
-}
-
-
-ACE_Scheduler::ACE_Scheduler ()
- // Set the minimum and maximum priority to those for the current platform.
- // This shouldn't be necessary, but UPSingleProcessorOrb::initialize_reactors
- // creates threads before the Event Channel calls Scheduler::init ().
- : minimum_priority_ (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO,
- ACE_SCOPE_PROCESS))
- , maximum_priority_ (ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
- ACE_SCOPE_PROCESS))
- , task_entries_ (0)
- , ordered_task_entries_ (0)
- , thread_delineators_ (0)
- , ordered_thread_dispatch_entries_ (0)
- , dispatch_entries_ (0)
- , expanded_dispatches_ (0)
- , ordered_dispatch_entries_ (0)
- , dispatch_entry_count_ (0)
- , threads_ (0)
- , rt_info_entries_ ()
- , lock_ ()
- , handles_ (0)
- , runtime_filename_ (0)
- , rt_info_filename_ (0)
- , timeline_filename_ (0)
- , tasks_ (0)
- , status_ (NOT_SCHEDULED)
- , output_level_ (0)
- , frame_size_ (1)
- , critical_set_frame_size_ (0)
- , utilization_ (0.0)
- , critical_set_utilization_ (0.0)
- , minimum_priority_queue_ (0)
- , minimum_guaranteed_priority_queue_ (-1)
- , timeline_ (0)
- , up_to_date_ (0)
- , min_dispatch_id_ (0)
- , max_dispatch_id_ (0)
-{
-}
-
-
-ACE_Scheduler::~ACE_Scheduler ()
-{
- // release all resources used for the most recent schedule
- reset ();
-}
-
-
-void
-ACE_Scheduler::init (const OS_Priority minimum_priority,
- const OS_Priority maximum_priority,
- const char *runtime_filename,
- const char *rt_info_filename,
- const char *timeline_filename)
-{
- minimum_priority_ = minimum_priority;
- maximum_priority_ = maximum_priority;
- runtime_filename_ = runtime_filename;
- rt_info_filename_ = rt_info_filename;
- timeline_filename_ = timeline_filename;
-}
- // = initializes the scheduler.
-
-ACE_Scheduler::status_t
-ACE_Scheduler::register_task (RT_Info *rt_info, handle_t &handle)
-{
- ACE_Scheduler::status_t ret;
-
- // try to store the new task's information . . .
- switch (rt_info_entries_.insert (rt_info))
- {
- case 0 : // successfully inserted
- {
- rt_info->handle = (handle = ++handles_);
-
- ret = SUCCEEDED;
-
- // zero out the task entry ACT used by the scheduler
- rt_info->volatile_token = 0;
-
- // make sure the schedule is reset when a new task is registered
- reset ();
-
- if (output_level () >= 5)
- {
- ACE_OS::printf ("registered task \"%s\" with RT_Info at %X\n",
- (const char*)rt_info->entry_point,
- (void *) rt_info);
- }
- }
- break;
-
- case 1 : // the entry had already been inserted
- handle = 0;
- ret = ST_TASK_ALREADY_REGISTERED;
- break;
-
- default :
- // case -1 : insert failed, probably because virtual memory exhaused
- handle = 0;
- ret = ST_VIRTUAL_MEMORY_EXHAUSTED;
- break;
- }
-
- return ret;
-}
- // = registers a task.
-
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::get_rt_info (Object_Name name,
- RT_Info* &rtinfo)
-{
- handle_t handle;
-
- // This makes a copy. We can optimize this with our own string
- // class.
- ACE_CString lookup (name);
- // Search the map for the <name>. If found, return the RT_Info.
- if (info_collection_.find (lookup, rtinfo) >= 0)
- {
- // If we find it, return.
- return SUCCEEDED;
- }
- else
- // Otherwise, make one, bind it, and register it.
- {
- rtinfo = new RT_Info;
- rtinfo->info_type = RtecScheduler::OPERATION;
- rtinfo->entry_point = name;
- // Bind the rtinfo to the name.
- if (info_collection_.bind (lookup, rtinfo) != 0)
- {
- delete rtinfo;
- rtinfo = 0;
- return FAILED; // Error!
- }
- else
- {
- // Register the task
- status_t result = this->register_task (rtinfo, handle);
- if (result == SUCCEEDED)
- {
- rtinfo->handle = handle;
- return ST_UNKNOWN_TASK; // Didn't find it, but made one!
- }
- else
- {
- rtinfo->handle = 0;
- return FAILED;
- }
- }
- }
-}
-
-
-
-int ACE_Scheduler::number_of_dependencies(RT_Info* rt_info)
-{
- return rt_info->dependencies.length();
-}
-
-int ACE_Scheduler::number_of_dependencies(RT_Info& rt_info)
-{
- return rt_info.dependencies.length();
-}
-
-int ACE_Scheduler::add_dependency(RT_Info* rt_info,
- Dependency_Info& d)
-{
- RT_Info *temp_info = 0; // temporary pointer to the caller's RT_Info
-
- switch (d.dependency_type)
- {
- case RtecScheduler::TWO_WAY_CALL:
-
- temp_info = rt_info;
- break;
-
- case RtecScheduler::ONE_WAY_CALL:
-
- // swap the handles and point to the caller instead of the called operation
- if (lookup_rt_info (d.rt_info, temp_info) != SUCCEEDED)
- {
- ACE_ERROR ((LM_ERROR, "cannot find %d to add dependency\n", d.rt_info));
- return -1;
- }
-
- d.rt_info = temp_info->handle;
-
- default:
-
- ACE_ERROR ((LM_ERROR, "unrecognized dependency type %d for %s\n",
- d.dependency_type, rt_info->entry_point));
- return -1;
- break;
- }
-
- ACE_DEBUG ((LM_DEBUG, "adding dependecy to: %s\n",
- (const char*)temp_info->entry_point));
-
- RtecScheduler::Dependency_Set& set = temp_info->dependencies;
- int l = set.length();
- set.length(l + 1);
- set[l] = d;
- return 0;
-}
-
-void ACE_Scheduler::export(RT_Info* info, FILE* file)
-{
- export(*info, file);
-}
-
-void ACE_Scheduler::export(RT_Info& info, FILE* file)
-{
- // The divide-by-1 is for ACE_U_LongLong support.
- (void) ACE_OS::fprintf (file,
- "%s\n%d\n%ld\n%ld\n%ld\n%ld\n%d\n%d\n%ld\n%u\n"
- "# begin calls\n%d\n",
- (const char*)info.entry_point,
- info.handle,
- info.worst_case_execution_time / 1,
- info.typical_execution_time / 1,
- info.cached_execution_time / 1,
- info.period,
- info.criticality,
- info.importance,
- info.quantum / 1,
- info.threads,
- number_of_dependencies(info));
-
- for (int i = 0; i < number_of_dependencies(info); ++i)
- {
- RT_Info tmp;
- (void) ACE_OS::fprintf (file, "%s, %d\n",
- (const char*)tmp.entry_point,
- info.dependencies[i].number_of_calls);
-
- }
-
-// TBD - we'll need to update this to use the information aggregated
-// within the task entry pointed to by the RT_Info's volatile_token
-// ACT (in fact, there is now more than one
-// priority assignment per RT_Info, w/ disjunction on multiple
-// priority levels, rates, etc. - iterate through and show each dispatch)
-
- (void) ACE_OS::fprintf (file, "# end calls\n%d\n%d\n%d\n\n",
- info.priority,
- info.dynamic_subpriority,
- info.static_subpriority);
-
-
-}
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::lookup_rt_info (handle_t handle,
- RT_Info*& rtinfo)
-{
- if (handle < 0 || (size_t) handle > rt_info_entries_.size ())
- {
- return ST_UNKNOWN_TASK;
- }
-
- RT_Info** entry;
- ACE_Unbounded_Set_Iterator <RT_Info *> i (rt_info_entries_);
- while (i.next (entry) != 0)
- {
- i.advance ();
- RT_Info* info_ptr = *entry;
- if (info_ptr->handle == handle)
- {
- rtinfo = info_ptr;
- return SUCCEEDED;
- }
- }
-
- return ST_UNKNOWN_TASK;
-}
- // obtains an RT_Info based on its "handle".
-
-
-void
-ACE_Scheduler::reset ()
-{
- // if the schedule is up to date, free resources
- // and mark schedule as not being up to date
- if (up_to_date_)
- {
- delete [] task_entries_;
- task_entries_ = 0;
-
- delete [] ordered_task_entries_;
- ordered_task_entries_ = 0;
-
- delete thread_delineators_;
- thread_delineators_ = 0;
-
- delete [] ordered_thread_dispatch_entries_;
- ordered_thread_dispatch_entries_ = 0;
-
- if (dispatch_entries_)
- {
- // free all the dispatch entries in the list, then the list itself
- ACE_Unbounded_Set_Iterator <Dispatch_Entry *> iter (*dispatch_entries_);
- Dispatch_Entry **entry = 0;
- for (iter.first (); ! iter.done (); iter.advance (), entry = 0)
- {
- if ((iter.next (entry) != 0) && (entry) && (*entry))
- {
- delete (*entry);
- }
- }
- delete dispatch_entries_;
- dispatch_entries_ = 0;
- }
-
- if (expanded_dispatches_)
- {
- // free all the dispatch entries in the list, then the list itself
- ACE_Unbounded_Set_Iterator <Dispatch_Entry *> expanded_iter (*expanded_dispatches_);
- Dispatch_Entry **expanded_entry = 0;
- for (expanded_iter.first (); ! expanded_iter.done ();
- expanded_iter.advance (), expanded_entry = 0)
- {
- if ((expanded_iter.next (expanded_entry) != 0) &&
- (expanded_entry) && (*expanded_entry))
- {
- delete (*expanded_entry);
- }
- }
- delete expanded_dispatches_;
- expanded_dispatches_ = 0;
- }
-
- delete [] ordered_dispatch_entries_;
- ordered_dispatch_entries_ = 0;
-
- dispatch_entry_count_ = 0;
- threads_ = 0;
-
- status_ = NOT_SCHEDULED;
-
- frame_size_ = 1;
- critical_set_frame_size_ = 0;
- utilization_ = 0.0;
- critical_set_utilization_ = 0.0;
- minimum_priority_queue_ = 0;
- minimum_guaranteed_priority_queue_ = -1;
-
- if (timeline_)
- {
- // iterate over and delete the set of timeline entries
- ACE_Ordered_MultiSet_Iterator <TimeLine_Entry_Link> t_iter (*timeline_);
- TimeLine_Entry_Link *t_entry = 0;
- for (t_iter.first (); ! t_iter.done (); t_iter.advance (), t_entry = 0)
- {
- if ((t_iter.next (t_entry) != 0) && (t_entry))
- {
- delete &(t_entry->entry ());
- }
- }
- delete timeline_;
- timeline_ = 0;
- }
-
- up_to_date_ = 0;
- }
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::schedule (void)
-{
- status_t temp_status = SUCCEEDED;
-
- ACE_Guard<LOCK> ace_mon (lock_);
-
- if (up_to_date_)
- {
- // do nothing if the RT_Infos have not changed
- // since the last valid schedule was generated
- return SUCCEEDED;
- }
- else
- {
- // save the total number of registered RT_Infos
- tasks (rt_info_entries_.size ());
- }
-
- // set up the task entry data structures, check for call cycles
- status_ = setup_task_entries ();
-
- if (status_ == SUCCEEDED)
- {
- // check for cycles in the dependency graph: as a side effect, leaves
- // the ordered_task_entries_ pointer array sorted in topological order,
- // which is used by propagate_dispatches () to ensure that dispatches
- // are propagated top down in the call graph.
- status_ = check_dependency_cycles ();
- }
-
- if (status_ == SUCCEEDED)
- {
- // task entries are related, now threads can be found
- status_ = identify_threads ();
- }
-
- if (status_ == SUCCEEDED)
- {
- // invokes the internal thread scheduling method of the strategy
- status_ = schedule_threads ();
- }
-
- if (status_ == SUCCEEDED)
- {
- // propagate the dispatch information from the
- // threads throughout the call graph
- status_ = propagate_dispatches ();
- }
-
- if (status_ == SUCCEEDED)
- {
- // invokes the internal dispatch scheduling method of the strategy
- status_ = schedule_dispatches ();
- }
-
- // calculate utilization, total frame size, critical set
- if (status_ == SUCCEEDED)
- {
- status_ = calculate_utilization_params ();
- }
-
- // generate the scheduling timeline over the total frame size
- if ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED))
- {
- temp_status = create_timeline ();
- }
-
- if (temp_status != SUCCEEDED)
- {
- status_ = temp_status;
- }
-
- // store the timeline to a file if one was given
- if ((timeline_filename_ != 0) &&
- ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED)))
- {
- temp_status = output_timeline (timeline_filename_, 0);
- }
-
- if (temp_status != SUCCEEDED)
- {
- status_ = temp_status;
- }
-
- // if a valid schedule was not generated, clean up from the attempt
- switch (status_)
- {
- // these are statuses that indicate a reasonable schedule was generated
- case SUCCEEDED:
- case ST_UTILIZATION_BOUND_EXCEEDED:
-
- // if we made it here, the schedule is done
- up_to_date_ = 1;
-
-
- break;
-
- default:
-
- // (try to) remove the output files
- if (timeline_filename_ && unlink ((char *) timeline_filename_) &&
- errno != ENOENT)
- {
- ACE_OS::perror ("ACE_Scheduler::schedule (); "
- "unable to remove timeline file");
- }
- if (runtime_filename_ && unlink ((char *) runtime_filename_) &&
- errno != ENOENT)
- {
- ACE_OS::perror ("ACE_Scheduler::schedule (); "
- "unable to remove schedule file");
- }
- if (rt_info_filename_ && unlink ((char *) rt_info_filename_) &&
- errno != ENOENT)
- {
- ACE_OS::perror ("ACE_Scheduler::schedule (); "
- "unable to remove rt_info file");
- }
-
- // free resources and remove "up_to_date" mark
- reset ();
-
- break;
- }
-
-
- return status_;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::propagate_dispatches ()
-{
- u_long i;
- frame_size_ = 1;
-
- // iterate through the ordered_task_entries_ array in order
- // from highest DFS finishing time to lowest, so that every
- // calling dispatch is accessed before those it calls:
- // the dispatches propagate top down through the call DAG
- for (i = 0; i < tasks (); ++i)
- {
- if (ordered_task_entries_ [i]->merge_dispatches (*dispatch_entries_) < 0)
- {
- return ST_UNKNOWN_TASK;
- }
-
- if (ordered_task_entries_ [i]->effective_period () > 0)
- {
- frame_size_ =
- minimum_frame_size (frame_size_,
- ordered_task_entries_ [i]->effective_period ());
- }
- else
- {
- return ST_UNKNOWN_TASK;
- }
-
- }
-
- return SUCCEEDED;
-}
-// propagate the dispatch information from the
-// threads throughout the call graph
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::calculate_utilization_params (void)
-{
- critical_set_frame_size_ = 0;
- utilization_ = 0.0;
- critical_set_utilization_ = 0.0;
-
- minimum_priority_queue_ =
- ordered_dispatch_entries_ [0]->priority ();
-
- minimum_guaranteed_priority_queue_ = -1;
-
- // iterate through ordered task entries, calculating frame size, utilization
- for (u_int i = 0; i < dispatch_entry_count_; ++i)
- {
- // if we've just finished examining another priority level
- if (minimum_priority_queue_ != ordered_dispatch_entries_ [i]->priority ())
- {
- // update parameters for the previous priority level
- update_priority_level_params ();
-
- // update the minimum priority queue
- minimum_priority_queue_ = ordered_dispatch_entries_ [i]->priority ();
- }
-
- // only consider computation times of dispatches on OPERATION descriptors
- if ((ordered_dispatch_entries_ [i]->task_entry ().info_type () ==
- RtecScheduler::OPERATION) &&
- (ordered_dispatch_entries_ [i]->task_entry ().effective_period () > 0))
- {
- utilization_ +=
- ACE_static_cast(double,
- ordered_dispatch_entries_ [i]->
- task_entry ().rt_info ()->
- worst_case_execution_time) /
- ACE_static_cast(double,
- ordered_dispatch_entries_ [i]->
- task_entry ().effective_period ());
-
- }
- }
-
- // update parameters for the lowest priority level
- update_priority_level_params ();
-
- // if the critical set is schedulable, return success
- return (1.0 - critical_set_utilization_ > DBL_EPSILON)
- ? SUCCEEDED : ST_UTILIZATION_BOUND_EXCEEDED;
-}
-
-
-
-void
-ACE_Scheduler::update_priority_level_params ()
-{
- // if we've just finished examining a critical priority level
- if (minimum_priority_queue_ <= minimum_critical_priority ())
- {
- // update the information about the critical set
- critical_set_frame_size_ = frame_size_;
- critical_set_utilization_ = utilization_;
- }
-
- // if the lowest priority level considered is schedulable
- if (1.0 - utilization_ > DBL_EPSILON)
- {
- // the minimum guaranteed priority queue is the minimum considered so far
- minimum_guaranteed_priority_queue_ = minimum_priority_queue_;
- }
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::setup_task_entries (void)
-{
- // store number of tasks, based on registrations
- tasks (rt_info_entries_.size ());
-
- // clear the decks of any previous scheduling information
- reset ();
-
- // allocate new table of task entries (wrappers for rt_infos)
- ACE_NEW_RETURN (task_entries_, Task_Entry [tasks ()],
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- // allocate new table of pointers to task entries (for sorting)
- ACE_NEW_RETURN (ordered_task_entries_, Task_Entry *[tasks ()],
- ST_VIRTUAL_MEMORY_EXHAUSTED);
- ACE_OS::memset (ordered_task_entries_, 0,
- sizeof (Task_Entry *) * tasks ());
-
- // allocate new unbounded set for pointers to
- // task entries that delineate threads
- ACE_NEW_RETURN (thread_delineators_, ACE_Unbounded_Set <Dispatch_Entry *>,
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- // allocate new unbounded set for pointers to dispatch entries
- ACE_NEW_RETURN (dispatch_entries_,
- ACE_Unbounded_Set <Dispatch_Entry *>,
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
-
- // set up links between rt_info_entries_, task_entries_,
- // and ordered_task_entries_ tables
- ACE_Unbounded_Set_Iterator <RT_Info *> iter (rt_info_entries_);
- for (u_int i = 0; i < tasks (); ++i, iter.advance ())
- {
- RT_Info** info_entry;
-
- // tie task entry to corresponding rt_info
- if (! iter.next (info_entry))
- {
- return ST_UNKNOWN_TASK;
- }
- task_entries_ [i].rt_info (*info_entry);
-
- // tie rt_info to corresponding task entry
- task_entries_ [i].rt_info ()->volatile_token = (u_long) &(task_entries_ [i]);
-
- // tie ordered task entry pointer to corresponding task entry
- ordered_task_entries_ [i] = &(task_entries_ [i]);
- }
-
- // set up bidirectional links between task entries
- return relate_task_entries ();
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::relate_task_entries (void)
-{
- status_t status = SUCCEEDED;
-
- // do DFS traversal of the entire RT_Info handle dependency DAG, replicating
- // the handle dependency DAG as a calls DAG of pointers between task
- // entries (and creating its transpose, the callers DAG). This is done
- // to avoid the O(n) cost of handle lookups in the RT_Infos for further
- // traversal of the graph during schedule sorting. One useful side effect
- // of this traversal is that is produces a topological ordering of dependencies
- // in the traversal finishing times, which can be used to detect call cycles.
- long time = 0;
-
- for (u_int i = 0; i < tasks (); ++i)
- {
- if ((status = relate_task_entries_recurse (time, task_entries_[i]))
- != SUCCEEDED)
- {
- break;
- }
- }
-
- return status;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::relate_task_entries_recurse (long &time, Task_Entry &entry)
-{
-
- // may have entered at a non-root node previously, so this does
- // not necessarily indicate a cycle in the dependency graph
- if (entry.dfs_status () != Task_Entry::NOT_VISITED)
- {
- return SUCCEEDED;
- }
-
- // when a node is discovered, mark it as visited, increment "time" and
- // store as the entry's discovery time. This is not currently used in
- // the scheduling algorithms, but is left in for possible future use
- // as it shows full parenthetization of entry discovery/finishing.
- entry.dfs_status (Task_Entry::VISITED);
- entry.discovered (++time);
-
- u_int dependency_count = number_of_dependencies (*entry.rt_info ());
- if (dependency_count > 0)
- {
- // traverse dependencies of underlying RT_Info
- for (u_int i = 0; i < dependency_count; ++i)
- {
- // obtain a pointer to the corresponding Task_Entry for each dependency
-
- RT_Info* dependency_info = 0;
- lookup_rt_info(entry.rt_info ()->dependencies[i].rt_info, dependency_info);
-
- if (! dependency_info)
- {
- return ST_UNKNOWN_TASK;
- }
-
- // obtain a pointer to the Task_Entry from the dependency RT_Info
- Task_Entry *dependency_entry_ptr =
- (Task_Entry *) dependency_info->volatile_token;
-
- if (! dependency_entry_ptr)
- {
- return ST_UNKNOWN_TASK;
- }
-
- // relate the entries according to the direction of the dependency
- Task_Entry_Link *link;
- ACE_NEW_RETURN (link,
- Task_Entry_Link (entry,
- *dependency_entry_ptr,
- entry.rt_info ()->dependencies[i].number_of_calls,
- entry.rt_info ()->dependencies[i].dependency_type),
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- dependency_entry_ptr->callers ().insert (link);
- entry.calls ().insert (link);
-
- // depth first recursion on the newly identified entry
- relate_task_entries_recurse (time, *dependency_entry_ptr);
- }
- }
-
- // when a node is finished, mark it as finished, increment "time" and
- // store as the entry's finish time. This produces a topological ordering
- // based on dependencies, which is used to check for call cycles.
- entry.dfs_status (Task_Entry::FINISHED);
- entry.finished (++time);
-
- return SUCCEEDED;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::identify_threads (void)
-{
- u_int i, j;
-
- // walk array of task entries, picking out thread delineators
- for (i = 0; i < tasks_; i++)
- {
- // if entry has exposed threads or no callers, it may be a thread
- if ((task_entries_ [i].rt_info ()->threads > 0) ||
- (task_entries_ [i].callers ().is_empty ()))
- {
- // if its period is valued, it's a thread delineator
- if (task_entries_ [i].rt_info ()->period > 0)
- {
- task_entries_ [i].effective_period (task_entries_ [i].rt_info ()->period);
- task_entries_ [i].is_thread_delineator (1);
-
- // create a Dispatch_Entry for each thread of the delimiting Task_Entry
- u_int thread_count = (task_entries_ [i].rt_info ()->threads > 0)
- ? task_entries_ [i].rt_info ()->threads : 1;
- for (j = 0; j < thread_count; j++)
- {
- Dispatch_Entry *dispatch_ptr;
- ACE_NEW_RETURN(dispatch_ptr,
- Dispatch_Entry (0, task_entries_ [i].effective_period (),
- task_entries_ [i].rt_info ()->preemption_priority,
- task_entries_ [i]),
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- if ((task_entries_ [i].dispatches ().insert (Dispatch_Entry_Link (*dispatch_ptr)) < 0) ||
- (dispatch_entries_->insert (dispatch_ptr) < 0) ||
- (thread_delineators_->insert (dispatch_ptr) < 0))
- {
- return ST_VIRTUAL_MEMORY_EXHAUSTED;
- }
-
- // increase the count of thread dispatches
- ++ threads_;
- }
- }
- else
- {
- // node that no one calls and has neither rate nor threads is suspect
- ACE_ERROR_RETURN (
- (LM_ERROR,
- "An operation identified by \"%s\" does not specify a period or\n"
- "visible threads, and is not called by any other operation. "
- "Are there backwards dependencies?\n",
- (const char*) task_entries_ [i].rt_info ()->entry_point),
- ST_BAD_DEPENDENCIES_ON_TASK);
- }
- }
- }
-
- return SUCCEEDED;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::check_dependency_cycles (void)
-{
- status_t return_status = SUCCEEDED;
-
- // sort the pointers to entries in order of descending finish time
- ::qsort ((void *) ordered_task_entries_,
- tasks (),
- sizeof (Task_Entry *),
- compare_entry_finish_times);
-
- // set all the dfs_status indicators to NOT_VISITED
- u_int i;
- for (i = 0; i < tasks (); ++i)
- {
- ordered_task_entries_ [i]->dfs_status (Task_Entry::NOT_VISITED);
- }
-
- // recurse on each entry, saving most recent status if it is not SUCCEEDED
- for (i = 0; i < tasks (); ++i)
- {
- status_t status =
- check_dependency_cycles_recurse (*ordered_task_entries_ [i]);
-
- if (status != SUCCEEDED)
- {
- return_status = status;
- }
- }
-
- return return_status;
-}
- // uses strongly connected components algorithm: consider entries
- // in order of finishing time from dependency DAG traversal,
- // but traverse transpose graph: any entry that has a dependant
- // that was not previously visited in this traversal is part
- // of a dependency cycle
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::check_dependency_cycles_recurse (Task_Entry &entry)
-{
- status_t return_status = SUCCEEDED;
-
- // halt DFS recursion on callers graph if entry has already been visited
- if (entry.dfs_status () != Task_Entry::NOT_VISITED)
- {
- return return_status;
- }
-
- // mark the entry as visited
- entry.dfs_status (Task_Entry::VISITED);
-
- // check all the calling operations: if there is one that has not already been
- // visited, mark the return status indicating there is a cycle, print
- // an error message to that effect, and recurse on that dependant
- Task_Entry_Link **calling_entry_link;
- ACE_Unbounded_Set_Iterator <Task_Entry_Link *> i (entry.callers ());
- while (i.next (calling_entry_link) != 0)
- {
- i.advance ();
- if ((*calling_entry_link)->caller ().dfs_status () == Task_Entry::NOT_VISITED)
- {
- // indicate the two tasks are in (the same) dependency cycle
- ACE_ERROR ((LM_ERROR,
- "Tasks \"%s\" and \"%s\" are part of a call cycle.\n",
- (*calling_entry_link)->caller ().rt_info ()->entry_point,
- entry.rt_info ()->entry_point));
-
- // set return status, ignore status returned by recursive call:
- // we already know there are cycles in the dependencies
- return_status = ST_CYCLE_IN_DEPENDENCIES;
- check_dependency_cycles_recurse ((*calling_entry_link)->caller ());
- }
- }
-
- // mark the entry as finished
- entry.dfs_status (Task_Entry::FINISHED);
-
- return return_status;
-}
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::schedule_threads (void)
-{
- // make sure there are as many thread delineator
- // entries in the set as the counter indicates
- if (threads_ != thread_delineators_->size ())
- {
- return THREAD_COUNT_MISMATCH;
- }
-
- // allocate an array of pointers to the thread delineators
- ACE_NEW_RETURN (ordered_thread_dispatch_entries_,
- Dispatch_Entry * [threads_],
- ST_VIRTUAL_MEMORY_EXHAUSTED);
- ACE_OS::memset (ordered_thread_dispatch_entries_, 0,
- sizeof (Dispatch_Entry *) * threads_);
-
-
- // copy pointers to the thread delineators from the set to the array
- ACE_Unbounded_Set_Iterator <Dispatch_Entry *> iter (*thread_delineators_);
- for (u_int i = 0; i < threads_; ++i, iter.advance ())
- {
- Dispatch_Entry** dispatch_entry;
-
- if (! iter.next (dispatch_entry))
- {
- return ST_UNKNOWN_TASK;
- }
-
- ordered_thread_dispatch_entries_ [i] = *dispatch_entry;
- }
-
- // sort the thread dispatch entries into priority order
- status_t status = sort_dispatches (ordered_thread_dispatch_entries_, threads_);
-
- if (status == SUCCEEDED)
- {
- // assign priorities to the thread dispatch entries
- status == assign_priorities (ordered_thread_dispatch_entries_, threads_);
- }
-
- return status;
-}
- // thread scheduling method: sets up array of pointers to task
- // entries that are threads, calls internal thread scheduling method
-
-ACE_Scheduler::status_t
-ACE_Scheduler::schedule_dispatches (void)
-{
- dispatch_entry_count_ = dispatch_entries_->size ();
-
- ACE_NEW_RETURN (ordered_dispatch_entries_,
- Dispatch_Entry * [dispatch_entry_count_],
- ST_VIRTUAL_MEMORY_EXHAUSTED);
- ACE_OS::memset (ordered_dispatch_entries_, 0,
- sizeof (Dispatch_Entry *) * dispatch_entry_count_);
-
-
-
- ACE_Unbounded_Set_Iterator <Dispatch_Entry *> iter (*dispatch_entries_);
- for (u_int i = 0; i < dispatch_entry_count_; ++i, iter.advance ())
- {
- Dispatch_Entry** dispatch_entry;
-
- if (! iter.next (dispatch_entry))
- {
- return ST_UNKNOWN_TASK;
- }
-
- ordered_dispatch_entries_ [i] = *dispatch_entry;
- }
-
- // sort the entries in order of priority and subpriority
- sort_dispatches (ordered_dispatch_entries_, dispatch_entry_count_);
-
- // assign dynamic and static subpriorities to the thread dispatch entries
- return assign_subpriorities (ordered_dispatch_entries_, dispatch_entry_count_);
-}
- // dispatch scheduling method: sets up an array of dispatch entries,
- // calls internal dispatch scheduling method.
-
-ACE_Scheduler::status_t
-ACE_Scheduler::create_timeline ()
-{
- // queue of previously scheduled entries that need to be rescheduled
- ACE_Unbounded_Queue <Dispatch_Entry *> reschedule_queue;
-
- status_t status = SUCCEEDED;
-
- ACE_NEW_RETURN(timeline_, ACE_Ordered_MultiSet <TimeLine_Entry_Link>,
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- ACE_NEW_RETURN(expanded_dispatches_, ACE_Unbounded_Set <Dispatch_Entry *>,
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- // start with the id of the first entry in the array
- min_dispatch_id_ = ordered_dispatch_entries_[0]->dispatch_id ();
- max_dispatch_id_ = ordered_dispatch_entries_[0]->dispatch_id ();
-
- for (u_long i = 0; i < dispatch_entry_count_; ++i)
- {
- // update the minimal and maximal id values for the schedule
- if (ordered_dispatch_entries_[i]->dispatch_id () < min_dispatch_id_)
- {
- min_dispatch_id_ = ordered_dispatch_entries_[i]->dispatch_id ();
- }
- if (ordered_dispatch_entries_[i]->dispatch_id () > max_dispatch_id_)
- {
- max_dispatch_id_ = ordered_dispatch_entries_[i]->dispatch_id ();
- }
-
- // only put OPERATION dispatches into the timeline.
- if (ordered_dispatch_entries_[i]->task_entry().info_type () !=
- RtecScheduler::OPERATION)
- {
- continue;
- }
-
- // schedule the current dispatch entry into the timeline
- status = schedule_timeline_entry (*(ordered_dispatch_entries_[i]),
- reschedule_queue);
- if (status != SUCCEEDED)
- {
- break;
- }
-
- // iterate through the set of dispatch entries that need to be rescheduled
- Dispatch_Entry *rescheduled_entry;
- while (reschedule_queue.is_empty () == 0)
- {
-
- if (reschedule_queue.dequeue_head (rescheduled_entry) < 0)
- {
- status = ST_UNKNOWN_TASK;
- break;
- }
-
- status = schedule_timeline_entry (*rescheduled_entry, reschedule_queue);
- if (status != SUCCEEDED)
- {
- break;
- }
- }
- if (status != SUCCEEDED)
- {
- break;
- }
-
-
- // schedule additional dispatcheds of the entry
- // over the total frame size into the timeline
- u_long current_frame_offset = 0;
- u_long task_period =
- ordered_dispatch_entries_[i]->task_entry ().effective_period ();
- for (current_frame_offset = task_period;
- current_frame_offset < frame_size_;
- current_frame_offset += task_period)
- {
- Dispatch_Entry *new_dispatch_entry;
-
- // create a new dispatch entry at the current sub-frame offset
- ACE_NEW_RETURN (
- new_dispatch_entry,
- Dispatch_Entry (ordered_dispatch_entries_[i]->arrival () +
- current_frame_offset,
- ordered_dispatch_entries_[i]->deadline () +
- current_frame_offset,
- ordered_dispatch_entries_[i]->priority (),
- ordered_dispatch_entries_[i]->task_entry (),
- ordered_dispatch_entries_[i]),
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- // add the new dispatch entry to the set of expanded dispatches
- expanded_dispatches_->insert (new_dispatch_entry);
-
- // schedule the new dispatch entry into the timeline
- status = schedule_timeline_entry (*new_dispatch_entry, reschedule_queue);
- if (status != SUCCEEDED)
- {
- break;
- }
-
- while (reschedule_queue.is_empty () == 0)
- {
-
- if (reschedule_queue.dequeue_head (rescheduled_entry) < 0)
- {
- status = ST_UNKNOWN_TASK;
- break;
- }
- status = schedule_timeline_entry (*rescheduled_entry, reschedule_queue);
- if (status != SUCCEEDED)
- {
- break;
- }
- }
- if (status != SUCCEEDED)
- {
- break;
- }
- }
-
- if (status != SUCCEEDED)
- {
- break;
- }
- }
-
- return status;
-}
- // Create a timeline.
-
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_dispatch_priorities (const char *filename)
-{
- status_t status = UNABLE_TO_OPEN_SCHEDULE_FILE;
-
- // open the file
- FILE *file = ACE_OS::fopen (filename, "w");
- if (file)
- {
- status = output_dispatch_priorities (file);
- fclose (file);
- }
-
- return status;
-}
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_dispatch_priorities (FILE *file)
-{
-
- u_long dispatch_count = 0;
- u_long i = 0;
- for (i = 0; i < dispatch_entry_count_; ++i)
- {
- dispatch_count += frame_size_ / ordered_dispatch_entries_[i]->task_entry ().effective_period ();
- }
-
- if (ACE_OS::fprintf (
- file, "\n\nSCHEDULING RESULTS:\n\n"
- "Number of dispatches: %3u\n"
- "Number of threads: %3u\n"
- "Number of tasks: %3u\n"
- "Scheduler Status: [%d] %s\n"
- "Total Frame Size: %lu nsec (%lf Hz)\n"
- "Critical Set Frame Size: %lu nsec (%lf Hz)\n"
- "Utilization: %lf\n"
- "Critical Set Utilization: %lf\n"
- "Minimum Priority Queue: %3ld\n"
- "Minimum Guaranteed Priority Queue: %3ld\n"
- "Minimum Critical Priority: %3ld\n\n\n"
-
- "DISPATCH PRIORITIES:\n\n"
- " (critical \n"
- " instant) \n"
- " dispatch dynamic static \n"
- "operation ID priority subpriority subpriority\n"
- "--------- -------- -------- ----------- -----------\n",
- dispatch_count, threads_, tasks_, status_,
- status_message(status_), frame_size_, (double) (10000000.0 / ((double) frame_size_)),
- critical_set_frame_size_, (double) (10000000.0 / ((double) critical_set_frame_size_)),
- utilization_, critical_set_utilization_, minimum_priority_queue_,
- minimum_guaranteed_priority_queue_, minimum_critical_priority ()) < 0)
-
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
-
- for (i = 0; i < dispatch_entry_count_; ++i)
- {
- if (ACE_OS::fprintf (file, "%-11s %8lu %8lu %11lu %11lu\n",
- ordered_dispatch_entries_[i]->task_entry ().rt_info ()->entry_point,
- ordered_dispatch_entries_[i]->dispatch_id (),
- ordered_dispatch_entries_[i]->priority (),
- ordered_dispatch_entries_[i]->dynamic_subpriority (),
- ordered_dispatch_entries_[i]->static_subpriority ()) < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
-
- return SUCCEEDED;
-}
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_dispatch_timeline (const char *filename)
-{
- status_t status = UNABLE_TO_OPEN_SCHEDULE_FILE;
-
- // open the file
- FILE *file = ACE_OS::fopen (filename, "w");
- if (file)
- {
- status = output_dispatch_timeline (file);
- fclose (file);
- }
-
- return status;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_dispatch_timeline (FILE *file)
-{
- if (ACE_OS::fprintf (
- file, "\n\nDISPATCH TIMELINE:\n\n"
- " dispatch arrival deadline start stop execution latency laxity\n"
- "operation ID (nsec) (nsec) (nsec) (nsec) time (nsec) (nsec) (nsec)\n"
- "--------- ----------- ------- -------- ----- ------ ----------- ------- ------\n") < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
-
- // iterate through timeline, picking out entries whose prev_ pointer
- // is null (i.e. those representing the start of a dispatch), find end
- // of dispatch, output the operation, dispatch, priority, and time info
- ACE_Ordered_MultiSet_Iterator <TimeLine_Entry_Link> iter (*timeline_);
- for (iter.first (); iter.done () == 0; iter.advance ())
- {
- TimeLine_Entry_Link *link;
- if ((iter.next (link) == 0) || (! link))
- {
- return ST_BAD_INTERNAL_POINTER;
- }
-
- // for each timeline entry that starts a dispatch
- if (link->entry ().prev () == 0)
- {
- // find the last time slice for the dispatch
- TimeLine_Entry *last_entry = &(link->entry ());
- while (last_entry->next ())
- {
- last_entry = last_entry->next ();
- }
-
- if (link->entry ().dispatch_entry ().original_dispatch ())
- {
- if (ACE_OS::fprintf (
- file, "%-11s [%4lu] %4lu %7lu %8lu %8lu %10lu %11lu %10ld %10ld\n",
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- entry_point,
- link->entry ().dispatch_entry ().original_dispatch ()->dispatch_id (),
- link->entry ().dispatch_entry ().dispatch_id (),
- link->entry ().arrival (),
- link->entry ().deadline (),
- link->entry ().start (), last_entry->stop (),
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- worst_case_execution_time,
- last_entry->stop () - link->entry ().arrival () -
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- worst_case_execution_time,
- link->entry ().deadline () - last_entry->stop ()) < 0)
-
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
- else
- {
- if (ACE_OS::fprintf (
- file, "%-11s %11lu %7lu %8lu %8lu %10lu %11lu %10ld %10ld\n",
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- entry_point,
- link->entry ().dispatch_entry ().dispatch_id (),
- link->entry ().arrival (),
- link->entry ().deadline (),
- link->entry ().start (), last_entry->stop (),
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- worst_case_execution_time,
- last_entry->stop () - link->entry ().arrival () -
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- worst_case_execution_time,
- link->entry ().deadline () - last_entry->stop ()) < 0)
-
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
- }
- }
-
- return SUCCEEDED;
-}
- // this prints the entire set of timeline outputs to the specified file
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_preemption_timeline (const char *filename)
-{
- status_t status = UNABLE_TO_OPEN_SCHEDULE_FILE;
-
- // open the file
- FILE *file = ACE_OS::fopen (filename, "w");
- if (file)
- {
- status = output_preemption_timeline (file);
- fclose (file);
- }
-
- return status;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_preemption_timeline (FILE *file)
-{
- if (ACE_OS::fprintf (
- file, "\n\nPREEMPTION TIMELINE:\n\n"
- " dispatch start stop \n"
- "operation ID (nsec) (nsec)\n"
- "--------- ----------- ------ ------\n") < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
-
- ACE_Ordered_MultiSet_Iterator <TimeLine_Entry_Link> iter (*timeline_);
-
- TimeLine_Entry_Link *link;
- for (iter.first (); iter.done () == 0; iter.advance ())
- {
- if ((iter.next (link) == 0) || (! link))
- {
- return ST_BAD_INTERNAL_POINTER;
- }
-
- if (link->entry ().dispatch_entry ().original_dispatch ())
- {
- if (ACE_OS::fprintf (
- file, "%-9s [%4lu] %4lu %8lu %8lu\n",
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- entry_point,
- link->entry ().dispatch_entry ().original_dispatch ()->dispatch_id (),
- link->entry ().dispatch_entry ().dispatch_id (),
- link->entry ().start (),
- link->entry ().stop ()) < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
- else
- {
- if (ACE_OS::fprintf (
- file, "%-9s %11lu %8lu %8lu\n",
- link->entry ().dispatch_entry ().task_entry ().rt_info ()->
- entry_point,
- link->entry ().dispatch_entry ().dispatch_id (),
- link->entry ().start (),
- link->entry ().stop ()) < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
- }
-
- return SUCCEEDED;
-}
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_viewer_timeline (const char *filename)
-{
- status_t status = UNABLE_TO_OPEN_SCHEDULE_FILE;
-
- // open the file
- FILE *file = ACE_OS::fopen (filename, "w");
- if (file)
- {
- status = output_dispatch_timeline (file);
- fclose (file);
- }
-
- return status;
-}
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_viewer_timeline (FILE *file)
-{
- if (ACE_OS::fprintf (
- file, "\n\nVIEWER TIMELINE:\n\n"
- " arrival deadline completion execution \n"
- "operation utilization overhead (nsec) (nsec) time (nsec) time (nsec)\n"
- "--------- ----------- -------- ------- -------- ----------- -----------\n") < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
-
- // iterate through timeline, picking out dispatches in chronological
- // order of operation completion time
- int entries_remain = 1;
- u_long accumulated_execution = 0;
- u_long current_accumulated_execution = 0;
- u_long last_completion = 0;
- u_long current_completion = 0;
- TimeLine_Entry *current_entry = 0;
- TimeLine_Entry *current_last_entry = 0;
-
- while (entries_remain)
- {
- last_completion = current_completion;
-
- accumulated_execution = 0;
- current_accumulated_execution = 0;
- current_completion = 0;
- current_entry = 0;
- current_last_entry = 0;
-
- ACE_Ordered_MultiSet_Iterator <TimeLine_Entry_Link> iter (*timeline_);
- for (iter.first (); iter.done () == 0; iter.advance ())
- {
- TimeLine_Entry_Link *link;
- if ((iter.next (link) == 0) || (! link))
- {
- return ST_BAD_INTERNAL_POINTER;
- }
-
- accumulated_execution += link->entry ().stop () -
- link->entry ().start ();
-
- // for each timeline entry that starts a dispatch
- if (link->entry ().prev () == 0)
- {
- // find the last time slice for the dispatch
- TimeLine_Entry *last_entry = &(link->entry ());
- while (last_entry->next ())
- {
- last_entry = last_entry->next ();
- }
-
- if ((last_entry->stop () > last_completion) &&
- ((last_entry->stop () < current_completion) ||
- (current_completion == 0)))
- {
- current_completion = last_entry->stop ();
- current_entry = &(link->entry ());
- current_last_entry = last_entry;
- }
- }
-
- // save the accumulated execution if we're at
- // the last entry for the current dispatch
- if (current_last_entry == &(link->entry ()))
- {
- current_accumulated_execution = accumulated_execution;
- }
- }
-
- // if we found another entry, print it (otherwise we're done)
- if (current_entry)
- {
- if (ACE_OS::fprintf (
- file, "%-11s %9lf %9lf %8lu %8lu %11lu %11lu\n",
- current_entry->dispatch_entry ().task_entry ().rt_info ()->
- entry_point,
- (double) (((double) current_accumulated_execution) /
- ((double) current_completion)),
- 0.0,
- current_entry->arrival (),
- current_entry->deadline (),
- current_last_entry->stop (),
- current_entry->dispatch_entry ().task_entry ().rt_info ()->
- worst_case_execution_time) < 0)
- {
- return UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
- else
- {
- entries_remain = 0;
- }
- }
-
- return SUCCEEDED;
-}
-
-
-ACE_Scheduler::status_t
-ACE_Scheduler::output_timeline (const char *filename, const char *heading)
-{
- status_t status = SUCCEEDED;
- FILE *file;
-
- // bail out if we're not up to date or there is no timeline
- if ((! up_to_date_) || (! timeline_))
- {
- status = NOT_SCHEDULED;
- }
-
- if (status == SUCCEEDED)
- {
- // open the file
- file = ACE_OS::fopen (filename, "w");
- if (! file)
- {
- status = UNABLE_TO_OPEN_SCHEDULE_FILE;
- }
- }
-
- if ((status == SUCCEEDED) && (heading))
- {
- if (ACE_OS::fprintf (file, "%s\n\n", heading) < 0)
- {
- status = UNABLE_TO_WRITE_SCHEDULE_FILE;
- }
- }
-
- if (status == SUCCEEDED)
- {
- status = output_dispatch_priorities (file);
- }
-
- if (status == SUCCEEDED)
- {
- status = output_dispatch_timeline (file);
- }
-
- if (status == SUCCEEDED)
- {
- status = output_preemption_timeline (file);
- }
-
- if (status == SUCCEEDED)
- {
- status = output_viewer_timeline (file);
- }
-
- if (file)
- {
- fclose (file);
- }
-
- return status;
-}
- // this prints the entire set of timeline outputs to the specified file
-
-
-
-// CDG - TBD - need to compile on Sun OS5 and make sure
-// the correct template instantiations are present
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>;
-template class ACE_Map_Entry<ACE_CString, ACE_Scheduler::RT_Info **>;
-
- template class ACE_Lock_Adapter<ACE_SYNCH_RW_MUTEX>;
- template class ACE_Lock_Adapter<ACE_SYNCH_MUTEX>;
- template class ACE_Map_Manager<ACE_CString,
- ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
- template class ACE_Map_Iterator_Base<ACE_CString, ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
- template class ACE_Map_Iterator<ACE_CString, ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
- template class ACE_Map_Reverse_Iterator<ACE_CString, ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
- template class ACE_Read_Guard<ACE_SYNCH_MUTEX>;
- template class ACE_Write_Guard<ACE_SYNCH_MUTEX>;
-
- template class ACE_Ordered_MultiSet<Dispatch_Entry_Link>;
- template class ACE_Ordered_MultiSet_Iterator<Dispatch_Entry_Link>;
- template class ACE_DNode<Dispatch_Entry_Link>;
-
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>
-#pragma instantiate ACE_Map_Entry<ACE_CString, ACE_Scheduler::RT_Info **>
-
-#pragma instantiate ACE_Lock_Adapter<ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Lock_Adapter<ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Manager<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Iterator<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Read_Guard<ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Write_Guard<ACE_SYNCH_MUTEX>
-
-#pragma instantiate ACE_Ordered_MultiSet<Dispatch_Entry_Link>;
-#pragma instantiate ACE_Ordered_MultiSet_Iterator<Dispatch_Entry_Link>;
-#pragma instantiate ACE_DNode<Dispatch_Entry_Link>;
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-// EOF
-
diff --git a/TAO/orbsvcs/orbsvcs/Sched/DynSched.h b/TAO/orbsvcs/orbsvcs/Sched/DynSched.h
deleted file mode 100644
index b88a6829196..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/DynSched.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// DynSched.h
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#if ! defined (SCHEDULER_H)
-#define SCHEDULER_H
-
-#include "ace/ACE.h"
-#include "ace/Map_Manager.h"
-#include "ace/Message_Block.h"
-#include "ace/Synch.h"
-#include "ace/SString.h"
-#include "SchedEntry.h"
-
-class TAO_ORBSVCS_Export ACE_Scheduler
- // = TITLE
- // dispatch scheduling interface.
- //
- // = DESCRIPTION
- // This abstract base class provides the majority of the
- // implementation of either an off-line scheduler, or the
- // necessary on-line component of the Scheduler.
-{
-public:
-
- //////////////////////////////
- // public type declarations //
- //////////////////////////////
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- typedef ACE_Map_Entry <ACE_CString, RT_Info *> Thread_Map_Entry;
- typedef ACE_Map_Manager <ACE_CString, RT_Info *, ACE_Null_Mutex>
- Thread_Map;
- typedef ACE_Map_Iterator <ACE_CString, RT_Info *, ACE_Null_Mutex>
- Thread_Map_Iterator;
-
- typedef const char *Object_Name;
- // Objects are named by unique strings.
-
- enum status_t {
- // The following are used both by the runtime Scheduler and during
- // scheduling.
- NOT_SCHEDULED = -1 // the schedule () method has not been called yet
- , FAILED = -1
- , SUCCEEDED
- , ST_UNKNOWN_TASK
- , ST_TASK_ALREADY_REGISTERED
- , ST_BAD_DEPENDENCIES_ON_TASK
- , ST_BAD_INTERNAL_POINTER
- , ST_VIRTUAL_MEMORY_EXHAUSTED
-
- // The following are only used by the runtime Scheduler.
- , TASK_COUNT_MISMATCH // only used by schedule ()
- , THREAD_COUNT_MISMATCH // only used by schedule ()
- , INVALID_PRIORITY // only used by schedule (): mismatch of
- // (off-line, maybe) Scheduler output to
- // the runtime Scheduler component.
-
- // The following are only used during scheduling (in the case of
- // off-line scheduling, they are only used prior to runtime).
- , ST_UTILIZATION_BOUND_EXCEEDED
- , ST_INSUFFICIENT_THREAD_PRIORITY_LEVELS
- , ST_CYCLE_IN_DEPENDENCIES
- , ST_INVALID_PRIORITY_ORDERING
- , UNABLE_TO_OPEN_SCHEDULE_FILE
- , UNABLE_TO_WRITE_SCHEDULE_FILE
- };
-
-
-
- /////////////////////////////
- // public member functions //
- /////////////////////////////
-
- virtual ~ACE_Scheduler ();
- // public dtor
-
- // = Utility function for outputting the textual
- // representation of a status_t value.
- static const char * status_message (status_t status);
-
- // = Initialize the scheduler.
- void init (const OS_Priority minimum_priority,
- const OS_Priority maximum_priority,
- const char *runtime_filename = 0,
- const char *rt_info_filename = 0,
- const char *timeline_filename = 0);
- // The minimum and maximum priority are the OS-specific priorities that
- // are used when creating the schedule (assigning priorities). The
- // minimum_priority is the priority value of the lowest priority.
- // It may be numerically higher than the maximum_priority, on OS's such
- // as VxWorks that use lower values to indicate higher priorities.
- //
- // When Scheduler::schedule is called, the schedule is output to the
- // file named by "runtime_filename" if it is non-zero.
- // This file is compilable; it is linked into the runtime executable
- // to provide priorities to the runtime scheduling component.
- // If the "rt_info_filename" is non-zero, the RT_Info for
- // every task is exported to it. It is not used at runtime.
- // If the "timeline_filename" is non-zero, the timeline output
- // file is created. It is not used at runtime.
- //
- // The runtime scheduling component ignores these filenames. It just
- // uses the priorities that were linked in to the executable, after
- // converting them to platform-specific values.
-
- void reset ();
- // Prepare for another schedule computation: once a reasonable schedule
- // has been generated, a new schedule will not be computed unless an
- // RT_Info is added, or this method is invoked to clear the previous
- // schedule (allows fault correcting alteration of RT_Infos outside the
- // scheduler implementation, followed by generation of a new schedule).
-
- // = Registers a task.
- status_t register_task (RT_Info *, handle_t &handle);
- // If the Task registration succeeds, this function returns SUCCEEDED
- // and sets "handle" to a unique identifier for the task.
- // Otherwise, it returns either VIRTUAL_MEMORY_EXHAUSTED or
- // TASK_ALREADY_REGISTERED sets the handle to 0. (A task may
- // only be registered once.)
-
- status_t get_rt_info (Object_Name name, RT_Info* &rtinfo);
- // Tries to find the RT_Info corresponding to <name> in the RT_Info
- // database. Returns SUCCEEDED if <name> was found and <rtinfo> was
- // set. Returns UNKNOWN_TASK if <name> was not found, but <rtinfo>
- // was set to a newly allocated RT_Info. In this UNKNOWN_TASK case,
- // the task must call RT_Info::set to fill in execution properties.
- // In the SUCCEEDED and UNKNOWN_TASK cases, this->register_task
- // (rtinfo, 0, handle) is called. Returns FAILED if an error
- // occurs.
- //
- // One motivation for allocating RT_Info's from within the Scheduler
- // is to allow RT_Infos to persist after the tasks that use them.
- // For instance, we may want to call this->schedule right before the
- // application exits a configuration run. If the tasks have been
- // deleted (deleting their RT_Infos with them), this->schedule will
- // fail.
-
- status_t lookup_rt_info (handle_t handle, RT_Info* &rtinfo);
- // Obtains an RT_Info based on its "handle".
-
- status_t schedule (void);
- // This sets up the data structures, invokes the internal scheduling method.
-
- status_t output_timeline (const char *filename, const char *heading);
- // this prints the entire set of timeline outputs to the specified file
-
-
- // = Access a thread priority.
-// TBD - put this back in, but with dynamic subpriority as well as static
-// int priority (const handle_t handle,
-// OS_Priority &OS_priority,
-// Preemption_Priority &preemption_priority,
-// Sub_Priority &dynamic_subpriority,
-// Sub_Priority &static_subpriority);
- // Defines "priority" as the priority that was assigned to the Task that
- // was assigned "handle". Defines "dynamic subpriority" as the strategy
- // specific assignment of dynamic subpriority within a priority level, and
- // "static subpriority" as the minimal importance and topological ordering.
- // Returns 0 on success, or -1 if an invalid handle was supplied.
- // Queue numbers are platform-independent priority values, ranging from
- // a highest priority value of 0 to the lowest priority value, which is
- // returned by "minimum_priority_queue ()".
-
- // = Access the platform-independent priority value of the lowest-priority
- // thread.
-
- Preemption_Priority minimum_priority_queue () const;
- // This is intended for use by the Event Channel, so it can determine the
- // number of priority dispatch queues to create.
-
- // = Access the number of tasks.
- u_int tasks () const;
-
- // = Access the number of threads.
- u_int threads () const;
-
- // = Access the current scheduler status.
- status_t status () const;
-
- // = Access the current output (debugging) level.
- u_int output_level () const;
- // Default is 0; set to 1 to print out schedule, by task. Set
- // to higher than one for debugging info.
-
- // = Set the scheduler output (debugging) level.
- void output_level (const u_int level);
- // the only supported levels are 0 (quiet), 1 (verbose) and 2 (debug)
-
- int add_dependency(RT_Info* rt_info,
- Dependency_Info& d);
-
- static int number_of_dependencies(RT_Info* rt_info);
- static int number_of_dependencies(RT_Info& rt_info);
-
- // TBD - modify these to take a Task_Entry and show all its dispatches
- static void export(RT_Info*, FILE* file);
- static void export(RT_Info&, FILE* file);
-
- // accessors for the minimal and maximal dispatch entry id in the schedule
- u_long min_dispatch_id () const;
- u_long max_dispatch_id () const;
-
-protected:
-
- ////////////////////////////////
- // protected member functions //
- ////////////////////////////////
-
- ACE_Scheduler ();
-
-
- status_t schedule_threads (void);
- // thread scheduling method: sets up array of pointers to task
- // entries that are threads, calls internal thread scheduling method
-
- status_t schedule_dispatches (void);
- // dispatch scheduling method: sets up an array of dispatch entries,
- // calls internal dispatch scheduling method.
-
- // = Set the minimum priority value.
- void minimum_priority_queue (const Preemption_Priority minimum_priority_queue_number);
-
- // = Set the number of tasks.
- void tasks (const u_int tasks);
-
- // = Set the number of threads.
- void threads (const u_int threads);
-
- // = Set the current scheduler status.
- void status (const status_t new_status);
-
- /////////////////////////////////////////////
- // protected pure virtual member functions //
- /////////////////////////////////////////////
-
- virtual Preemption_Priority minimum_critical_priority () = 0;
- // = determine the minimum critical priority number
-
- virtual status_t sort_dispatches (Dispatch_Entry **, u_int) = 0;
- // internal sorting method: this orders the dispatches by
- // static priority and dynamic and static subpriority.
-
- virtual status_t assign_priorities (Dispatch_Entry **dispatches,
- u_int count) = 0;
- // = assign priorities to the sorted dispatches
-
- virtual status_t assign_subpriorities (Dispatch_Entry **dispatches,
- u_int count) = 0;
- // = assign dynamic and static sub-priorities to the sorted dispatches
-
- virtual status_t
- schedule_timeline_entry (Dispatch_Entry &dispatch_entry,
- ACE_Unbounded_Queue <Dispatch_Entry *>
- &reschedule_queue) = 0;
- // = schedule a dispatch entry into the timeline being created
-
- ////////////////////////////
- // protected data members //
- ////////////////////////////
-
- OS_Priority minimum_priority_;
- // The minimum OS thread priority value that the application specified (in
- // its call to init ()).
-
- OS_Priority maximum_priority_;
- // The maximum OS thread priority value that the application specified (in
- // its call to init ()).
-
- Task_Entry *task_entries_;
- // Collection of known tasks.
-
- Task_Entry **ordered_task_entries_;
- // An array of pointers to task entries which wrap RT_Infos. It is
- // sorted by the DFS finishing time and then the resulting topological
- // over the call graph is used both to check for call chain cycles and
- // to correctly propagate scheduling information away from the threads.
-
- ACE_Unbounded_Set <Dispatch_Entry *> *thread_delineators_;
- // identifies dispatch entries whose underlying
- // Task Entries delineate threads
-
- Dispatch_Entry **ordered_thread_dispatch_entries_;
- // An array of pointers to task entries which initiate call chains.
- // It is sorted by the schedule_threads method defined in the derived class.
-
- ACE_Unbounded_Set <Dispatch_Entry *> *dispatch_entries_;
- // the set of dispatch entries
-
- ACE_Unbounded_Set <Dispatch_Entry *> *expanded_dispatches_;
- // expanded set of dispatch entries (all dispatch entries produced by
- // expanding sub-frames to the total frame size during timeline creation)
-
- Dispatch_Entry **ordered_dispatch_entries_;
- // An array of pointers to dispatch entries. It is
- // sorted by the schedule_dispatches method.
-
- u_int dispatch_entry_count_;
- // the number of dispatch entries in the schedule
-
- u_int threads_;
- // the number of dispatch entries in the schedule
-
- ACE_Ordered_MultiSet <TimeLine_Entry_Link> *timeline_;
- // Ordered MultiSet of timeline entries.
-
-private:
-
- ///////////////////////////////
- // private type declarations //
- ///////////////////////////////
-
- typedef ACE_CString EXT;
- typedef RT_Info *INT;
-
-#if defined (ACE_HAS_THREADS)
- typedef ACE_Thread_Mutex SYNCH;
- typedef ACE_Recursive_Thread_Mutex LOCK;
-#else
- typedef ACE_Null_Mutex SYNCH;
- typedef ACE_Null_Mutex LOCK;
-#endif /* ACE_HAS_THREADS */
-
- typedef ACE_Map_Manager<EXT, INT, ACE_SYNCH_MUTEX> Info_Collection;
- typedef ACE_Map_Iterator<EXT, INT, ACE_SYNCH_MUTEX> Info_Collection_Iterator;
- typedef ACE_Map_Entry<EXT, INT> Info_Collection_Entry;
-
- //////////////////////////////
- // private member functions //
- //////////////////////////////
-
- status_t create_timeline ();
- // Create a timeline.
-
- status_t output_dispatch_timeline (const char *filename);
- status_t output_dispatch_timeline (FILE *file);
- // this prints a dispatch timeline to the specified file
-
- status_t output_preemption_timeline (const char *filename);
- status_t output_preemption_timeline (FILE *file);
- // this prints a preemption timeline to the specified file
-
- status_t output_viewer_timeline (const char *filename);
- status_t output_viewer_timeline (FILE *file);
- // this prints a scheduling viewer timeline to the specified file
-
- status_t output_dispatch_priorities (const char *filename);
- status_t output_dispatch_priorities (FILE *file);
- // this prints the scheduling parameters and assigned priorities to the specified file
-
- // = Set up the task entry data structures
- status_t setup_task_entries (void);
-
- // = Relate the task entries according to the
- // dependencies of the underlying RT_Infos
- status_t relate_task_entries (void);
-
- // recursively traverse dependency graph, relating
- // task entries and performing DFS start/end marking
- status_t relate_task_entries_recurse (long &time, Task_Entry &entry);
-
- // identify thread delimiters
- status_t identify_threads (void);
-
- // checks for cycles in the dependency graph
- status_t check_dependency_cycles (void);
-
- // recursion used to check for cycles in the dependency graph
- status_t check_dependency_cycles_recurse (Task_Entry &entry);
-
- // = Aggregate the scheduling parameters of the threads
- status_t aggregate_thread_parameters (void);
-
- // = recursion over oneway dependencies used to aggregate thread parameters
- status_t aggregate_oneways_recurse (Task_Entry &entry);
-
- // = recursion over twoway dependencies used to aggregate thread parameters
- status_t aggregate_twoways_recurse (Task_Entry &entry);
-
- // update the scheduling parameters for the previous priority level
- void update_priority_level_params ();
-
- status_t propagate_dispatches ();
- // propagate the dispatch information from the
- // threads throughout the call graph
-
- status_t calculate_utilization_params ();
- // calculate utilization, frame size, etc.
-
- // the following functions are not implememented
- ACE_UNIMPLEMENTED_FUNC(ACE_Scheduler (const ACE_Scheduler &))
- ACE_UNIMPLEMENTED_FUNC(ACE_Scheduler &operator= (const ACE_Scheduler &))
-
- //////////////////////////
- // private data members //
- //////////////////////////
-
- LOCK lock_;
- // This protects access to the scheduler during configuration runs.
-
- ACE_Unbounded_Set <RT_Info *> rt_info_entries_;
- // Collection of known tasks.
-
- u_int handles_;
- // The number of task handles dispensed so far.
-
- const char *runtime_filename_;
- // Destination file of Scheduler output from the configuration run.
-
- const char *rt_info_filename_;
- // Destination file of all rt_info data from the configuration run.
-
- const char *timeline_filename_;
- // The destination of the timeline.
-
- Info_Collection info_collection_;
- // A binding of name to rt_info. This is the mapping for every
- // rt_info in the process.
-
- u_int tasks_;
-
- status_t status_;
-
- u_int output_level_;
-
- u_long frame_size_; /* 100 nanosec */
- // minimum frame size for all tasks
-
- u_long critical_set_frame_size_; /* 100 nanosec */
- // minimum frame size for guaranteed schedulable tasks
-
- double utilization_;
- // total utilization for all tasks
-
- double critical_set_utilization_;
- // minimum frame size for guaranteed schedulable tasks
-
- Preemption_Priority minimum_priority_queue_;
- // The platform-independent priority value of the Event Channel's
- // minimum priority dispatch queue. The value of the maximum priority
- // dispatch queue is always 0.
-
- Preemption_Priority minimum_guaranteed_priority_queue_;
- // The platform-independent priority value of the minimum priority dispatch
- // queue whose operations are guaranteed to be schedulable. The value of
- // the maximum priority dispatch queue is always 0, -1 indicates none can
- // be guaranteed.
-
- u_int up_to_date_;
- // indicates whether the a valid schedule has been generated since the last
- // relevant change (addition, alteration or removal of an RT_Info, etc.)
-
- u_long min_dispatch_id_;
-
- u_long max_dispatch_id_;
-
-};
-
-#if defined (__ACE_INLINE__)
-#include "DynSched.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* SCHEDULER_H */
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/DynSched.i b/TAO/orbsvcs/orbsvcs/Sched/DynSched.i
deleted file mode 100644
index 32e3e859983..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/DynSched.i
+++ /dev/null
@@ -1,112 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// DynSched.i
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-
-
-/////////////////////////
-// Class ACE_Scheduler //
-/////////////////////////
-
-ACE_INLINE ACE_Scheduler::Preemption_Priority
-ACE_Scheduler::minimum_priority_queue () const
-{
- return minimum_priority_queue_;
-}
- // This is intended for use by the Event Channel, so it can determine the
- // number of priority dispatch queues to create.
-
-// = Access the number of tasks.
-ACE_INLINE u_int
-ACE_Scheduler::tasks () const
-{
- return tasks_;
-}
-
- // = Access the number of threads.
-ACE_INLINE u_int
-ACE_Scheduler::threads () const
-{
- return threads_;
-}
-
- // = Access the current scheduler status.
-ACE_INLINE ACE_Scheduler::status_t
-ACE_Scheduler::status () const
-{
- return status_;
-}
-
- // = Access the current output (debugging) level.
-ACE_INLINE u_int
-ACE_Scheduler::output_level () const {
- return output_level_;
-}
- // Default is 0; set to 1 to print out schedule, by task. Set
- // to higher than one for debugging info.
-
- // = Set the scheduler output (debugging) level.
-ACE_INLINE void
-ACE_Scheduler::output_level (const u_int level)
-{
- output_level_ = level;
-}
- // the only supported levels are 0 (quiet), 1 (verbose) and 2
- // (debug)
-
-ACE_INLINE void
-ACE_Scheduler::minimum_priority_queue (const Preemption_Priority minimum_priority_queue_number)
-{
- minimum_priority_queue_ = minimum_priority_queue_number;
-}
-
- // = Set the number of tasks.
-ACE_INLINE void
-ACE_Scheduler::tasks (const u_int tasks)
-{
- tasks_ = tasks;
-}
-
- // = Set the number of threads.
-// TBD - remove this - allowing the application to modify this is *not* good
-ACE_INLINE void
-ACE_Scheduler::threads (const u_int threads)
-{
- threads_ = threads;
-}
-
- // = Set the current scheduler status.
-ACE_INLINE void
-ACE_Scheduler::status (const status_t new_status)
-{
- status_ = new_status;
-}
-
-ACE_INLINE u_long
-ACE_Scheduler::min_dispatch_id () const
-{
- return min_dispatch_id_;
-}
-
-ACE_INLINE u_long
-ACE_Scheduler::max_dispatch_id () const
-{
- return max_dispatch_id_;
-}
-
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp
deleted file mode 100644
index 503ef93719b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp
+++ /dev/null
@@ -1,864 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// SchedEntry.cpp
-//
-// = CREATION DATE
-// 7 February 1998
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#include "SchedEntry.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "SchedEntry.i"
-#endif /* __ACE_INLINE__ */
-
-//////////////////////
-// Helper Functions //
-//////////////////////
-
-// TBD - move this to the ACE class
-// Euclid's greatest common divisor algorithm
-u_long gcd (u_long x, u_long y)
-{
- if (y == 0)
- {
- return x;
- }
- else
- {
- return gcd (y, x % y);
- }
-}
-
-
-// TBD - move this to the ACE class
-// calculate the minimum frame size that
-u_long minimum_frame_size (u_long period1, u_long period2)
-{
- // first, find the greatest common divisor of the two periods
- u_long greatest_common_divisor = gcd (period1, period2);
-
- // explicitly consider cases to reduce risk of possible overflow errors
- if (greatest_common_divisor == 1)
- {
- // periods are relative primes: just multiply them together
- return period1 * period2;
- }
- else if (greatest_common_divisor == period1)
- {
- // the first period divides the second: return the second
- return period2;
- }
- else if (greatest_common_divisor == period2)
- {
- // the second period divides the first: return the first
- return period1;
- }
- else
- {
- // the current frame size and the entry's effective period
- // have a non-trivial greatest common divisor: return the
- // product of factors divided by those in their gcd.
- return (period1 * period2) / greatest_common_divisor;
- }
-}
-
-
-//////////////////////
-// Class Task_Entry //
-//////////////////////
-
-Task_Entry::Task_Entry ()
- : rt_info_ (0)
- , effective_period_(0)
- , dfs_status_ (NOT_VISITED)
- , discovered_ (-1)
- , finished_ (-1)
- , is_thread_delineator_ (0)
- , calls_ ()
- , callers_ ()
-{
-}
-
-Task_Entry::~Task_Entry ()
-{
- // zero out the task entry ACT in the corresponding rt_info
- rt_info_->volatile_token = 0;
-
- // iterate through the "calls" set of Task Entry Links and free each one
- ACE_Unbounded_Set_Iterator <Task_Entry_Link *> iter(calls_);
- Task_Entry_Link **link = 0;
- for (iter.first (); ! iter.done (); iter.advance (), link = 0)
- {
- if ((iter.next (link) != 0) && (link) && (*link))
- {
- // remove the link object pointer from the calling
- // entry's "callers" set and destroy the link object
- (*link)->called ().callers_.remove (*link);
- delete (*link);
- }
- }
-}
-
-// merge dispatches according to info type and type of call,
-// update relevant scheduling characteristics for this entry
-int
-Task_Entry::merge_dispatches (ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries)
-{
- int result = 0;
- switch (info_type ())
- {
- case RtecScheduler::DISJUNCTION:
-
- // prohibit two-way dispatches of a disjunction group,
- // and disjunctively merge its one-way dispatches.
- // NOTE: one interpretation of disjunction for two-way calls
- // is that the caller calls one OR the other, but this
- // is problematic: how do we map the dispatches for this ?
- result = prohibit_dispatches (RtecScheduler::TWO_WAY_CALL);
- if (result == 0)
- {
- result = disjunctive_merge (RtecScheduler::ONE_WAY_CALL, dispatch_entries);
- }
-
- break;
-
- case RtecScheduler::CONJUNCTION:
-
- // prohibit two-way dispatches of a conjunction group,
- // and conjunctively merge its one-way dispatches.
- // NOTE: one interpretation of disjunction for two-way calls
- // is that the caller calls BOTH, so that there is a
- // disjunctive merge of each two-way, as for the OPERATION
- // (prohibit for now, as the additional complexity of allowing
- // conjunctions of two-ways, but not disjunctions does not
- // buy us anything, anyway).
- result = prohibit_dispatches (RtecScheduler::TWO_WAY_CALL);
- if (result == 0)
- {
- result = conjunctive_merge (RtecScheduler::ONE_WAY_CALL, dispatch_entries);
- }
-
- break;
-
- case RtecScheduler::OPERATION:
-
- // disjunctively merge the operation's two-way dispatches,
- // and conjunctively merge its one-way dispatches.
- result = disjunctive_merge (RtecScheduler::TWO_WAY_CALL, dispatch_entries);
- if (result == 0)
- {
- result = conjunctive_merge (RtecScheduler::ONE_WAY_CALL, dispatch_entries);
- }
-
- break;
-
-
- default:
-
- // there should not be any other kind of RT_Info, or if
- // there is, the above switch logic is in need of repair.
- result -1;
- break;
- }
-
- return result;
-}
-
-
-
-// prohibit calls of the given type: currently used to enforce
-// the notion that two-way calls to disjunctive or conjunctive
-// RT_Infos do not have any defined meaning, and thus should be
-// considered dependency specification errors: if these constraints
-// are removed in the future, this method should be removed as well
-// Returns 0 if all is well, or -1 if an error has occurred.
-int
-Task_Entry::prohibit_dispatches (Dependency_Type dt)
-{
- // iterate over the set of dependencies, ensuring
- // none of them has the given dependency type
- ACE_Unbounded_Set_Iterator <Task_Entry_Link *> iter (callers_);
- while (! iter.done ())
- {
- Task_Entry_Link **link;
- if ((iter.next (link) == 0) || (! link) || (! (*link)) ||
- ((*link)->dependency_type () == dt))
- {
- return -1;
- }
-
- iter.advance ();
- }
-
- return 0;
-}
-
-
-// perform disjunctive merge of arrival times of oneway calls:
-// all arrival times of all dependencies are duplicated by the
-// multiplier and repetition over the new frame size and merged
-int
-Task_Entry::disjunctive_merge (
- Dependency_Type dt,
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries)
-{
- // iterate over the set of dependencies, ensuring
- // none of them has the given dependency type
- ACE_Unbounded_Set_Iterator <Task_Entry_Link *> iter (callers_);
- while (! iter.done ())
- {
- Task_Entry_Link **link;
- if ((iter.next (link) == 0) || (! link) || (! (*link)))
- {
- return -1;
- }
-
- // the link matches the dependency type given
- if ((*link)->dependency_type () == dt)
- {
- // merge the caller's dispatches into the current set
- if (merge_frames (dispatch_entries, *this, dispatches_,
- (*link)->caller ().dispatches_, effective_period_,
- (*link)->caller ().effective_period_,
- (*link)->number_of_calls ()) < 0)
- {
- return -1;
- }
- }
-
- iter.advance ();
- }
-
- return 0;
-}
-
-// perform conjunctive merge of arrival times of calls:
-// all arrival times of all dependencies are duplicated by the
-// multiplier and repetition over the new frame size and then
-// iteratively merged by choosing the maximal arrival time at
-// the current position in each queue (iteration is in lockstep
-// over all queues, and ends when any queue ends).
-int
-Task_Entry::conjunctive_merge (
- Dependency_Type dt,
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries)
-{
- int result = 0;
-
- // iterate over the dependencies, and determine the total frame size
- u_long frame_size = 1;
- ACE_Unbounded_Set_Iterator <Task_Entry_Link *> dep_iter (callers_);
- for (dep_iter.first (); dep_iter.done () == 0; dep_iter.advance ())
- {
- Task_Entry_Link **link;
- if ((dep_iter.next (link) == 0) || (! link) || (! (*link)))
- {
- return -1;
- }
-
- // the link matches the dependency type given
- if ((*link)->dependency_type () == dt)
- {
- frame_size = minimum_frame_size (frame_size, (*link)->caller ().effective_period_);
- }
- }
-
- // reframe dispatches in the set to the new frame size
- // (expands the set's effective period to be the new enclosing frame)
- if (reframe (dispatch_entries, *this, dispatches_,
- effective_period_, frame_size) < 0)
- {
- return -1;
- }
-
- // A set and iterator for virtual dispatch sets
- // over which the conjunction will iterate
- ACE_Ordered_MultiSet <Dispatch_Proxy_Iterator *> conj_set;
- ACE_Ordered_MultiSet_Iterator <Dispatch_Proxy_Iterator *> conj_set_iter (conj_set);
-
- // iterate over the dependencies, and for each of the given call type,
- // create a Dispatch_Proxy_Iterator for the caller's dispatch set, using
- // the caller's period, the total frame size, and the number of calls:
- // if any of the sets is empty, just return 0;
- for (dep_iter.first (); dep_iter.done () == 0; dep_iter.advance ())
- {
- Task_Entry_Link **link;
- if ((dep_iter.next (link) == 0) || (! link) || (! (*link)))
- {
- return -1;
- }
-
- // the link matches the dependency type given
- if ((*link)->dependency_type () == dt)
- {
- Dispatch_Proxy_Iterator *proxy_ptr;
- ACE_NEW_RETURN (proxy_ptr,
- Dispatch_Proxy_Iterator (
- (*link)->caller ().dispatches_,
- (*link)->caller ().effective_period_,
- frame_size, (*link)->number_of_calls ()),
- -1);
-
- // if there are no entries in the virtual set, we're done
- if (proxy_ptr->done ())
- {
- return 0;
- }
- if (conj_set.insert (proxy_ptr, conj_set_iter) < 0)
- {
- return -1;
- }
- }
- }
-
- // loop, adding conjunctive dispatches, until one of the conjunctive
- // dispatch sources runs out of entries over the total frame
- conj_set_iter.first ();
- int more_dispatches = (conj_set_iter.done ()) ? 0 : 1;
- while (more_dispatches)
- {
- u_long arrival = 0;
- u_long deadline = 0;
- long priority = 0;
-
- for (conj_set_iter.first ();
- conj_set_iter.done () == 0;
- conj_set_iter.advance ())
- {
- // initialize to earliest arrival and deadline, and highest priority
- arrival = 0;
- deadline = 0;
- priority = 0;
-
- // Policy: conjunctively dispatched operations get the latest deadline of any
- // of the dispatches in the conjunction at the time they were dispatched
- // - when and if it is useful to change any of the merge policies, this
- // should be one of the decisions factored out into the conjunctive merge
- // strategy class.
-
- // Policy: conjunctively dispatched operations get the lowest priority of any
- // of the dispatches in the conjunction at the time they were dispatched
- // - when and if it is useful to change any of the merge policies, this
- // should be one of the decisions factored out into the conjunctive merge
- // strategy class.
-
- // obtain a pointer to the current dispatch proxy iterator
- Dispatch_Proxy_Iterator **proxy_iter;
- if ((conj_set_iter.next (proxy_iter) == 0) || (! proxy_iter) || (! (*proxy_iter)))
- {
- return -1;
- }
-
- // use latest arrival, latest deadline, lowest priority (0 is highest)
- arrival = (arrival < (*proxy_iter)->arrival ())
- ? arrival : (*proxy_iter)->arrival ();
- deadline = (deadline < (*proxy_iter)->deadline ())
- ? deadline : (*proxy_iter)->deadline ();
- priority = (priority < (*proxy_iter)->priority ())
- ? priority : (*proxy_iter)->priority ();
-
- (*proxy_iter)->advance ();
- if ((*proxy_iter)->done ())
- {
- more_dispatches = 0;
- }
- }
-
- Dispatch_Entry *entry_ptr;
- ACE_NEW_RETURN (entry_ptr,
- Dispatch_Entry (arrival, deadline, priority, *this),
- -1);
-
- // if even one new dispatch was inserted, result is "something happened".
- result = 1;
-
- // add the new dispatch entry to the set of all dispatches, and
- // a link to it to the dispatch links for this task entry
- if (dispatch_entries.insert (entry_ptr) < 0)
- {
- return -1;
- }
-
- // use iterator for efficient insertion into the dispatch set
- ACE_Ordered_MultiSet_Iterator <Dispatch_Entry_Link> insert_iter (dispatches_);
- if (dispatches_.insert (Dispatch_Entry_Link (*entry_ptr), insert_iter) < 0)
- {
- return -1;
- }
-
- // TBD - Clients are not assigned priority, but rather obtain it from
- // their call dependencies. We could complain here if there is a
- // priority specified that doesn't match (or is lower QoS?)
- }
-
- return result;
-}
-
-// this static method is used to reframe an existing dispatch set
-// to the given new period multiplier, creating new instances of
-// each existing dispatch (with adjusted arrival and deadline)
-// in each successive sub-frame. Returns 1 if the set was reframed
-// to a new period, 0 if the set was not changed (the new period
-// was not a multiple of the old one), or -1 if an error occurred.
-int
-Task_Entry::reframe (
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries,
- Task_Entry &owner,
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> &set,
- u_long &set_period, u_long new_period)
-{
- // make sure the new period is greater than the current
- // set period, and that they are harmonically related
- if (new_period <= set_period)
- {
- // return an error if they're not harmonically related,
- // do nothing if set's frame is a multiple of the new frame
- return (set_period % new_period) ? -1 : 0;
- }
- else if (new_period % set_period)
- {
- return -1;
- }
-
- // make a shallow copy of the set in a new ordered
- // multiset using the Dispatch_Entry_Link smart pointers
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> new_set;
- ACE_Ordered_MultiSet_Iterator <Dispatch_Entry_Link> new_iter (new_set);
- ACE_Ordered_MultiSet_Iterator <Dispatch_Entry_Link> set_iter (set);
-
- for (set_iter.first (); set_iter.done () == 0; set_iter.advance ())
- {
- Dispatch_Entry_Link *link;
- if (set_iter.next (link) == 0)
- {
- return -1;
- }
-
- if (new_set.insert (*link, new_iter) < 0)
- {
- return -1;
- }
- }
-
- // do a deep copy merge back into the set using the new period and starting
- // after the 0th sub-frame: this puts all dispatches after the 0th
- // sub-frame of the new period into the set, and leaves existing dispatches
- // in the 0th sub-frame of the new period in the set as well.
- int result = merge_frames (dispatch_entries, owner, set,
- new_set, new_period, set_period, 1, 1);
-
- // update the set's period to be the new frame
- set_period = new_period;
-
- return result;
-}
-
-
-// this static method is used to merge an existing dispatch set,
-// multiplied by the given multipliers for the period and number of
-// instances in each period of each existing dispatch, into the
-// given "into" set, without affecting the "from set".
-int
-Task_Entry::merge_frames (
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries,
- Task_Entry &owner,
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> &dest,
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> &src,
- u_long &dest_period,
- u_long src_period,
- u_long number_of_calls,
- u_long starting_dest_sub_frame)
-{
- int status = 0;
-
- // reframe dispatches in the destination set to the new frame size
- // (expands the destination set's period to be the new enclosing frame)
- if (reframe (dispatch_entries, owner, dest, dest_period,
- minimum_frame_size (dest_period, src_period)) < 0)
- {
- return -1;
- }
-
- // use iterator for efficient insertion into the destination set
- ACE_Ordered_MultiSet_Iterator <Dispatch_Entry_Link> dest_iter (dest);
-
- // do virutal iteration over the source set in the new frame,
- // adding adjusted dispatch entries to the destination
- Dispatch_Proxy_Iterator src_iter (src, src_period, dest_period,
- number_of_calls,
- starting_dest_sub_frame);
-
- for (src_iter.first (starting_dest_sub_frame); src_iter.done () == 0; src_iter.advance ())
- {
-
- // Policy: disjunctively dispatched operations get their deadline and
- // priority from the original dispatch - when and if it is useful
- // to change any of the merge policies, this should be one of the
- // decisions factored out into the disjunctive merge strategy
- // class.
-
- Dispatch_Entry *entry_ptr;
- ACE_NEW_RETURN (entry_ptr,
- Dispatch_Entry (src_iter.arrival (),
- src_iter.deadline (),
- src_iter.priority (), owner),
- -1);
-
- // if even one new dispatch was inserted, status is "something happened".
- status = 1;
-
- // add the new dispatch entry to the set of all dispatches, and
- // a link to it to the dispatch links for this task entry
- if (dispatch_entries.insert (entry_ptr) < 0)
- {
- return -1;
- }
-
- if (dest.insert (Dispatch_Entry_Link (*entry_ptr), dest_iter) < 0)
- {
- return -1;
- }
-
- // TBD - Clients are not assigned priority, but rather obtain it from
- // their call dependencies. We could complain here if there is a
- // priority specified that doesn't match (or is lower QoS?)
- }
-
- return status;
-}
-
-
-///////////////////////////
-// Class Task_Entry_Link //
-///////////////////////////
-
-
-Task_Entry_Link::Task_Entry_Link (
- Task_Entry &caller,
- Task_Entry &called,
- CORBA::Long number_of_calls,
- RtecScheduler::Dependency_Type dependency_type)
- : caller_ (caller)
- , called_ (called)
- , dependency_type_ (dependency_type)
- , number_of_calls_ (number_of_calls)
-{
-}
-
-
-//////////////////////////
-// Class Dispatch_Entry //
-//////////////////////////
-
-Dispatch_Entry::Dispatch_Id Dispatch_Entry::next_id_ = 0;
-
-Dispatch_Entry::Dispatch_Entry (
- Time arrival,
- Time deadline,
- Preemption_Priority priority,
- Task_Entry &task_entry,
- Dispatch_Entry *original_dispatch)
-
- : priority_ (priority)
- , OS_priority_ (0)
- , dynamic_subpriority_ (0)
- , static_subpriority_ (0)
- , arrival_ (arrival)
- , deadline_ (deadline)
- , task_entry_ (task_entry)
- , original_dispatch_ (original_dispatch)
-{
- // obtain, increment the next id
- dispatch_id_ = next_id_++;
-}
-
-Dispatch_Entry::Dispatch_Entry (const Dispatch_Entry &d)
- : priority_ (d.priority_)
- , OS_priority_ (d.OS_priority_)
- , dynamic_subpriority_ (d.dynamic_subpriority_)
- , static_subpriority_ (d.static_subpriority_)
- , arrival_ (d.arrival_)
- , deadline_ (d.deadline_)
- , task_entry_ (d.task_entry_)
- , original_dispatch_ (d.original_dispatch_)
-{
- // obtain, increment the next id
- dispatch_id_ = next_id_++;
-}
-
-
-ACE_INLINE int
-Dispatch_Entry::operator < (const Dispatch_Entry &d) const
-{
- // for positioning in the ordered dispatch multiset
-
- // lowest arrival time first
- if (this->arrival_ != d.arrival_)
- {
- return (this->arrival_ < d.arrival_) ? 1 : 0;
- }
-
- // highest priority second
- if (this->priority_ != d.priority_)
- {
- return (this->priority_ > d.priority_) ? 1 : 0;
- }
-
- // lowest laxity (highest dynamic sub-priority) third
- Time this_laxity = deadline_ -
- task_entry ().rt_info ()->worst_case_execution_time;
- Time that_laxity = d.deadline_ -
- d.task_entry ().rt_info ()->worst_case_execution_time;
- if (this_laxity != that_laxity)
- {
- return (this_laxity < that_laxity) ? 1 : 0;
- }
-
- // finally, by higher importance
- return (task_entry ().rt_info ()->importance >
- d.task_entry ().rt_info ()->importance) ? 1 : 0;
-}
-
-
-///////////////////////////////
-// Class Dispatch_Entry_Link //
-///////////////////////////////
-
-
-Dispatch_Entry_Link::Dispatch_Entry_Link (Dispatch_Entry &d)
- : dispatch_entry_ (d)
-{
-}
- // ctor
-
-Dispatch_Entry_Link::Dispatch_Entry_Link (
- const Dispatch_Entry_Link &d)
- : dispatch_entry_ (d.dispatch_entry_)
-{
-}
- // copy ctor
-
-
-///////////////////////////////////
-// Class Dispatch_Proxy_Iterator //
-///////////////////////////////////
-
-Dispatch_Proxy_Iterator::Dispatch_Proxy_Iterator
- (ACE_Ordered_MultiSet <Dispatch_Entry_Link> &set,
- u_long actual_frame_size,
- u_long virtual_frame_size,
- u_long number_of_calls,
- u_long starting_sub_frame)
- : number_of_calls_ (number_of_calls)
- , current_call_ (0)
- , actual_frame_size_ (actual_frame_size)
- , virtual_frame_size_ (virtual_frame_size)
- , current_frame_offset_ (actual_frame_size * starting_sub_frame)
- , iter_ (set)
-{
- first (starting_sub_frame);
-}
- // ctor
-
-int
-Dispatch_Proxy_Iterator::first (u_int sub_frame)
-{
- if (actual_frame_size_ * (sub_frame) >= virtual_frame_size_)
- {
- // can not position the virtual iterator
- // in the given range: do nothing
- return 0;
- }
-
- // restart the call counter
- current_call_ = 0;
-
- // use the given sub-frame offset if it's valid
- current_frame_offset_ = actual_frame_size_ * sub_frame;
-
- // restart the iterator
- return iter_.first ();
-}
- // positions the iterator at the first entry of the passed
- // sub-frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
-int
-Dispatch_Proxy_Iterator::last ()
-{
- // use the last call
- current_call_ = number_of_calls_ - 1;
-
- // use the last sub-frame
- current_frame_offset_ = virtual_frame_size_ - actual_frame_size_;
-
- // position the iterator at the last dispatch
- return iter_.first ();
-}
- // positions the iterator at the last entry of the total
- // frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
-int
-Dispatch_Proxy_Iterator::advance ()
-{
- int result = 1;
-
- if (iter_.done ())
- {
- result = 0; // cannot retreat if we're out of bounds
- }
- else if (current_call_ < number_of_calls_ - 1)
- {
- // if we're still in the same set of calls, increment the call counter
- ++current_call_;
- }
- else
- {
- // roll over the call counter
- current_call_ = 0;
-
- // advance the iterator in the current sub-frame
- if (! iter_.advance ())
- {
- // if we're not already in the last sub_frame
- if (current_frame_offset_ + actual_frame_size_ < virtual_frame_size_)
- {
- // increment the sub-frame offset
- current_frame_offset_ += actual_frame_size_;
-
- // restart the iterator at the front of the sub-frame
- result = iter_.first ();
- }
- else
- {
- result = 0; // cannot advance if we're already at the end
- }
- }
- }
-
- return result;
-}
- // positions the iterator at the next entry of the total
- // frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
-int
-Dispatch_Proxy_Iterator::retreat ()
-{
- int result = 1;
-
- if (iter_.done ())
- {
- result = 0; // cannot retreat if we're out of bounds
- }
- else if (current_call_ > 0)
- {
- // if we're still in the same set of calls, decrement the call counter
- --current_call_;
- }
- else
- {
- // roll over the call counter
- current_call_ = number_of_calls_ - 1;
-
- // back up the iterator in the current sub-frame
- if (!iter_.retreat ())
- {
- // if we're not already in the 0th sub_frame
- if (current_frame_offset_ > 0)
- {
- // decrement the sub-frame offset
- current_frame_offset_ -= actual_frame_size_;
-
- // restart the iterator at the tail of the sub-frame
- result = iter_.last ();
- }
- else
- {
- result = 0; // cannot retreat if we're already at the start
- }
- }
- }
-
- return result;
-}
- // positions the iterator at the previous entry of the total
- // frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
-u_long
-Dispatch_Proxy_Iterator::arrival () const
-{
- Dispatch_Entry_Link *link;
- if ((iter_.done ()) || (iter_.next(link) == 0) || (! link))
- {
- return 0;
- }
-
- return link->dispatch_entry ().arrival () + current_frame_offset_;
-}
- // returns the adjusted arrival time of the virtual entry
-
-u_long
-Dispatch_Proxy_Iterator::deadline () const
-{
- Dispatch_Entry_Link *link;
- if ((iter_.done ()) || (iter_.next(link) == 0) || (! link))
- {
- return 0;
- }
-
- return link->dispatch_entry ().deadline () + current_frame_offset_;
-}
- // returns the adjusted deadline time of the virtual entry
-
-Dispatch_Proxy_Iterator::Preemption_Priority
-Dispatch_Proxy_Iterator::priority () const
-{
- Dispatch_Entry_Link *link;
- if ((iter_.done ()) || (iter_.next(link) == 0) || (! link))
- {
- return 0;
- }
-
- return link->dispatch_entry ().priority ();
-}
- // returns the scheduler priority of the virtual entry
-
-
-
-//////////////////////////
-// Class TimeLine_Entry //
-//////////////////////////
-
-
- // time slice constructor
-TimeLine_Entry::TimeLine_Entry (Dispatch_Entry &dispatch_entry,
- u_long start, u_long stop,
- u_long arrival, u_long deadline,
- TimeLine_Entry *next,
- TimeLine_Entry *prev)
- : dispatch_entry_ (dispatch_entry)
- , start_ (start)
- , stop_ (stop)
- , arrival_ (arrival)
- , deadline_ (deadline)
- , next_ (next)
- , prev_ (prev)
-{
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h
deleted file mode 100644
index c6887cfaea8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h
+++ /dev/null
@@ -1,592 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// SchedEntry.h
-//
-// = CREATION DATE
-// 7 February 1998
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#if ! defined (SCHEDENTRY_H)
-#define SCHEDENTRY_H
-
-#include "orbsvcs/RtecSchedulerC.h"
-#include "orbsvcs/Event_Service_Constants.h"
-
-
-//////////////////////
-// Helper Functions //
-//////////////////////
-
-// TBD - move this to the ACE class
-// Euclid's greatest common divisor algorithm
-u_long gcd (u_long x, u_long y);
-
-// TBD - move this to the ACE class
-// calculate the minimum frame size
-u_long minimum_frame_size (u_long period1, u_long period2);
-
-// forward declaration of classes
-class Task_Entry;
-class Task_Entry_Link;
-class Dispatch_Entry;
-class Dispatch_Entry_Link;
-class Dispatch_Proxy_Iterator;
-
-
-// Wrapper for the RT_Info, which aggregates all its dispatches
-class TAO_ORBSVCS_Export Task_Entry
-{
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- // info for DFS traversal, topological sort of call graph
- enum DFS_Status {NOT_VISITED, VISITED, FINISHED};
-
- // ctor
- Task_Entry ();
-
- // dtor
- ~Task_Entry ();
-
- // merge dispatches according to info type, update
- // relevant scheduling characteristics for this entry.
- // Returns 0 if all is well, or -1 if an error occurred
- int merge_dispatches (
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries);
-
- // get, set pointer to underlying RT_Info
- RT_Info *rt_info () const;
- void rt_info (RT_Info *info);
-
-
- // get effective period for the task entry
- Period effective_period () const;
- void effective_period (Period p);
-
- // set/get time when node was discovered in DFS traversal
- void discovered (long l);
- long discovered () const;
-
- // set/get time when node was finished in DFS traversal
- void finished (long l);
- long finished () const;
-
- // set/get DFS traversal status of node
- void dfs_status (DFS_Status ds);
- DFS_Status dfs_status () const;
-
- // set/get flag indicating whether node is a thread delineator
- void is_thread_delineator (int i);
- int is_thread_delineator () const;
-
- // get set of links to Task Entries which this entry calls
- ACE_Unbounded_Set <Task_Entry_Link *> & calls ();
-
- // get set of links to Task Entries which call this entry
- ACE_Unbounded_Set <Task_Entry_Link *> & callers ();
-
- // get set of arrivals in the effective period
- ACE_Ordered_MultiSet<Dispatch_Entry_Link> &dispatches ();
-
- // get the type of Info the entry wraps
- Info_Type info_type () const;
-
- // effective execution time for the task entry
- u_long effective_execution_time () const;
-
-private:
-
- // prohibit calls of the given type: currently used to enforce
- // the notion that two-way calls to disjunctive or conjunctive
- // RT_Infos do not have any defined meaning, and thus should be
- // considered dependency specification errors: if these constraints
- // are removed in the future, this method should be removed as well
- // Returns 0 if all is well, or -1 if an error has occurred.
- int prohibit_dispatches (Dependency_Type dt);
-
- // performs disjunctive merge of arrival times of calls of the given
- // type: all arrival times of all callers of that type are duplicated by
- // the multiplier and repetition over the new frame size and merged.
- // Returns 0 if all is well, or -1 if an error has occurred.
- int disjunctive_merge (
- Dependency_Type dt,
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries);
-
- // perform conjunctive merge of arrival times of calls of the given
- // type: all arrival times of all callers of that type are duplicated
- // by the multiplier and repetition over the new frame size and then
- // iteratively merged by choosing the maximal arrival time at
- // the current position in each queue (iteration is in lockstep
- // over all queues, and ends when any queue ends). Returns 0 if
- // all is well, or -1 if an error has occurred.
- int conjunctive_merge (
- Dependency_Type dt,
- ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries);
-
-
- // this static method is used to reframe an existing dispatch set
- // to the given new period multiplier, creating new instances of
- // each existing dispatch (with adjusted arrival and deadline)
- // in each successive sub-frame. Returns 1 if the set was reframed
- // to a new period, 0 if the set was not changed (the new period
- // was not a multiple of the old one), or -1 if an error occurred.
- static int reframe (ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries,
- Task_Entry &owner,
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> &set,
- u_long &set_period, u_long new_period);
-
- // this static method is used to merge an existing dispatch set,
- // multiplied by the given multipliers for the period and number of
- // instances in each period of each existing dispatch, into the
- // given "into" set, without affecting the "from set". Returns 1 if
- // the source set was correctly merged into the destination set,
- // 0 if nothing happened, and -1 if an error occurred.
- static int merge_frames (ACE_Unbounded_Set <Dispatch_Entry *> &dispatch_entries,
- Task_Entry &owner,
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> &dest,
- ACE_Ordered_MultiSet <Dispatch_Entry_Link> &src,
- u_long &dest_period,
- u_long src_period,
- u_long number_of_calls = 1,
- u_long starting_dest_sub_frame = 0);
-
- // pointer to the underlying RT_Info
- RT_Info *rt_info_;
-
- // effective period for the task entry
- u_long effective_period_;
-
- // set of arrivals in the effective period
- ACE_Ordered_MultiSet<Dispatch_Entry_Link> dispatches_;
-
- // count of the arrivals in the effective period
- u_long arrival_count_;
-
- DFS_Status dfs_status_;
- long discovered_;
- long finished_;
-
- // info for identifying threads in the oneway call graph
- int is_thread_delineator_;
-
- // get set of links to Task Entries which this entry calls
- ACE_Unbounded_Set <Task_Entry_Link *> calls_;
-
- // get set of links to Task Entries which call this entry
- ACE_Unbounded_Set <Task_Entry_Link *> callers_;
-};
-
-
-class TAO_ORBSVCS_Export Task_Entry_Link
-{
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- // ctor
- Task_Entry_Link (Task_Entry &caller,
- Task_Entry &called,
- CORBA::Long number_of_calls,
- Dependency_Type dependency_type);
-
- // accessor: number of calls
- CORBA::Long number_of_calls () const;
-
- // accessor: dependency type
- Dependency_Type dependency_type () const;
-
- // accessor: calling task entry
- Task_Entry &caller () const;
-
- // accessor: called task entry
- Task_Entry &called () const;
-
-private:
-
- // the number of calls of the operation
- CORBA::Long number_of_calls_;
-
- // the calling operation
- Task_Entry &caller_;
-
- // the called operation
- Task_Entry &called_;
-
- // the type of call dependency
- Dependency_Type dependency_type_;
-};
-
-
-class TAO_ORBSVCS_Export Dispatch_Entry
-{
-// = TITLE
-// Dispatch Entry
-//
-// = DESCRIPTION
-// Descriptor object for a single dispatch of an operation.
-//
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- typedef u_long Dispatch_Id;
-
- // ctor
- Dispatch_Entry (Time arrival,
- Time deadline,
- Preemption_Priority priority,
- Task_Entry &task_entry,
- Dispatch_Entry *original_dispatch = 0);
-
- // copy ctor
- Dispatch_Entry (const Dispatch_Entry &d);
-
- // id accessor
- Dispatch_Id dispatch_id () const;
-
- // arrival accessor
- Time arrival () const;
-
- // deadline accessor
- Time deadline () const;
-
- // scheduler priority accessor and mutator
- Preemption_Priority priority () const;
- void priority (Preemption_Priority p);
-
- // scheduler priority accessor and mutator
- OS_Priority Dispatch_Entry::OS_priority () const;
- void Dispatch_Entry::OS_priority (OS_Priority p);
-
- // dynamic subpriority accessor and mutator
- Sub_Priority dynamic_subpriority () const;
- void dynamic_subpriority (Sub_Priority p);
-
- // static subpriority accessor and mutator
- Sub_Priority static_subpriority () const;
- void static_subpriority (Sub_Priority p);
-
- // task entry accessor
- Task_Entry &task_entry () const;
-
- // LT comparator
- // TBD - make this a global comparison operator
- // instead of a class member function
- int operator < (const Dispatch_Entry &d) const;
-
- // accessor for pointer to original dispatch
- Dispatch_Entry *original_dispatch ();
-
-private:
- // TBD - add reference counting to Dispatch Entry class,
- // make the link a friend, up/down count as links come and go,
- // and call entry dtor when ref count drops to 0
-
- // stores the next dispatch entry id to be used
- static Dispatch_Id next_id_;
-
- // the id of the current dispatch entry
- Dispatch_Id dispatch_id_;
-
- // scheduler priority of the current dispatch entry
- Preemption_Priority priority_;
-
- // OS priority of the current dispatch entry
- OS_Priority OS_priority_;
-
- // scheduler dynamic subpriority of the current dispatch entry
- Sub_Priority dynamic_subpriority_;
-
- // scheduler static subpriority of the current dispatch entry
- Sub_Priority static_subpriority_;
-
- // the arrival time of the current dispatch entry
- Time arrival_;
-
- // the deadline of the current dispatch entry
- Time deadline_;
-
- // stores the id of the related task entry
- Task_Entry &task_entry_;
-
- // stores a pointer to the original dispatch entry if this
- // is a dispatch generated by expanding the original frame
- Dispatch_Entry *original_dispatch_;
-
-};
-
-class TAO_ORBSVCS_Export Dispatch_Entry_Link
-// = TITLE
-// Dispatch Entry Link
-//
-// = DESCRIPTION
-// Light-weight sortable "smart pointer" to a dispatch entry.
-//
-{
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- Dispatch_Entry_Link (Dispatch_Entry &d);
- // ctor
-
- Dispatch_Entry_Link (const Dispatch_Entry_Link &d);
- // copy ctor
-
- ~Dispatch_Entry_Link ();
- // dtor
-
- // TBD - make this a global comparison operator
- // instead of a class member function
- int operator < (const Dispatch_Entry_Link &d) const;
- // LT comparator
-
- Dispatch_Entry &dispatch_entry () const;
- // accessor for reference to dispatch entry
-
-private:
-
- Dispatch_Entry &dispatch_entry_;
-};
-
-class TAO_ORBSVCS_Export Dispatch_Proxy_Iterator
-// = TITLE
-// This class implements an iterator abstraction over a virtual
-// frame size and number of calls, using an actual ordered
-// multiset of dispatch entries over an actual frame size.
-// It also serves as a proxy for the virtual dispatch to which
-// it refers. Rhetorical question: is it possible to separate
-// the iterator and proxy abstractions here without defeating the
-// purpose of the design, which is to avoid constructing
-// superfluous dispatch entries (per the conjunctive merge use case) ?
-{
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- Dispatch_Proxy_Iterator (ACE_Ordered_MultiSet <Dispatch_Entry_Link> &set,
- u_long actual_frame_size,
- u_long virtual_frame_size,
- u_long number_of_calls_ = 1,
- u_long starting_sub_frame = 0);
- // ctor
-
- ////////////////////////
- // iterator interface //
- ////////////////////////
-
- int done () const;
- // returns 0 if there are more entries to see, 1 if not
-
- int first (u_int sub_frame = 0);
- // positions the iterator at the first entry of the passed
- // sub-frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
- int last ();
- // positions the iterator at the last entry of the total
- // frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
- int advance ();
- // positions the iterator at the next entry of the total
- // frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
- int retreat ();
- // positions the iterator at the previous entry of the total
- // frame, returns 1 if it could position the iterator
- // correctly, 0 if not, and -1 if an error occurred.
-
- /////////////////////
- // proxy interface //
- /////////////////////
-
- u_long arrival () const;
- // returns the adjusted arrival time of the virtual entry
-
- u_long deadline () const;
- // returns the adjusted deadline time of the virtual entry
-
- Preemption_Priority priority () const;
- // returns the scheduler priority of the virtual entry
-
-
-private:
-
- u_long number_of_calls_;
- // the number of calls corresponding to each actual dispatch
-
- u_long current_call_;
- // the current call number for this dispatch (zero based)
-
- u_long actual_frame_size_;
- // the frame size of the actual dispatches
-
- u_long virtual_frame_size_;
- // the virtaul frame size over which to iterate
-
- u_long current_frame_offset_;
- // the current offset into the virtual frame
- // (should be a multiple of the actual frame size)
-
- ACE_Ordered_MultiSet_Iterator <Dispatch_Entry_Link> iter_;
-};
-
-
-
-class TAO_ORBSVCS_Export TimeLine_Entry
-{
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- // time slice constructor
- TimeLine_Entry (Dispatch_Entry &dispatch_entry,
- u_long start,
- u_long stop,
- u_long arrival,
- u_long deadline,
- TimeLine_Entry *next = 0,
- TimeLine_Entry *prev = 0);
-
- // dispatch entry accessor
- Dispatch_Entry &dispatch_entry () const;
-
- // accessors for time slice start and stop times (100 nanoseconds)
- u_long start () const;
- u_long stop () const;
- u_long arrival () const;
- u_long deadline () const;
-
- // accessor and mutator for next and prev slices for this dispatch
- TimeLine_Entry *next (void) const;
- void next (TimeLine_Entry *);
- TimeLine_Entry *prev (void) const;
- void prev (TimeLine_Entry *);
-
- int operator < (const TimeLine_Entry&) const;
-
-private:
-
- // the dispatch entry to which the time slice corresponds
- Dispatch_Entry &dispatch_entry_;
-
- // priority time slice times (100 nanoseconds)
- u_long start_;
- u_long stop_;
- u_long arrival_;
- u_long deadline_;
-
- // next and previous priority time slices for this dispatch entry
- TimeLine_Entry *next_;
- TimeLine_Entry *prev_;
-
-};
-
-class TAO_ORBSVCS_Export TimeLine_Entry_Link
-{
-public:
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- typedef RtecScheduler::Time Time;
- typedef RtecScheduler::Period Period;
- typedef RtecScheduler::Info_Type Info_Type;
- typedef RtecScheduler::Dependency_Type Dependency_Type;
-
- TimeLine_Entry_Link (TimeLine_Entry &t);
- // ctor
-
- TimeLine_Entry &entry () const;
- // accessor for the underlying entry
-
- int operator < (const TimeLine_Entry_Link&) const;
- // comparison operator
-
-private:
-
- TimeLine_Entry &entry_;
- // the underlying entry
-
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "SchedEntry.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* SCHEDENTRY_H */
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i
deleted file mode 100644
index 58255004fb5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i
+++ /dev/null
@@ -1,397 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// SchedEntry.i
-//
-// = CREATION DATE
-// 7 February 1998
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-//////////////////////
-// Class Task_Entry //
-//////////////////////
-
-// return a pointer to the underlying RT_Info
-ACE_INLINE Task_Entry::RT_Info *
-Task_Entry::rt_info () const
-{
- return rt_info_;
-}
-
-// set the underlying RT_Info pointer
-ACE_INLINE void
-Task_Entry::rt_info (Task_Entry::RT_Info *info)
-{
- rt_info_ = info;
-}
-
-// get effective period for the task entry
-ACE_INLINE Task_Entry::Period
-Task_Entry::effective_period () const
-{
- return effective_period_;
-}
-
-// set effective period for the task entry
-ACE_INLINE void
-Task_Entry::effective_period (Task_Entry::Period p)
-{
- effective_period_ = p;
-}
-
-ACE_INLINE void
-Task_Entry::discovered (long l)
-{
- discovered_ = l;
- dfs_status_ = VISITED;
-}
-
-ACE_INLINE long
-Task_Entry::discovered () const
-{
- return discovered_;
-}
-
-ACE_INLINE void
-Task_Entry::finished (long l)
-{
- finished_ = l;
- dfs_status_ = FINISHED;
-}
-
-ACE_INLINE long
-Task_Entry::finished () const
-{
- return finished_;
-}
-
-ACE_INLINE Task_Entry::DFS_Status
-Task_Entry::dfs_status () const
-{
- return dfs_status_;
-}
-
-ACE_INLINE void
-Task_Entry::dfs_status (Task_Entry::DFS_Status ds)
-{
- dfs_status_ = ds;
-}
-
-ACE_INLINE void
-Task_Entry::is_thread_delineator (int i)
-{
- is_thread_delineator_ = i;
-}
-
-ACE_INLINE int
-Task_Entry::is_thread_delineator () const
-{
- return is_thread_delineator_;
-}
-
-// access set of Task Entries on which this entry depends
-ACE_INLINE ACE_Unbounded_Set <Task_Entry_Link *> &
-Task_Entry::calls ()
-{
- return calls_;
-}
-
-// access set of Task Entries which depend on this entry
-ACE_INLINE ACE_Unbounded_Set <Task_Entry_Link *> &
-Task_Entry::callers ()
-{
- return callers_;
-}
-
-// get set of arrivals in the effective period
-ACE_Ordered_MultiSet<Dispatch_Entry_Link> &
-Task_Entry::dispatches ()
-{
- return dispatches_;
-}
-
-
-ACE_INLINE Task_Entry::Info_Type
-Task_Entry::info_type () const
-{
- return rt_info_->info_type;
-}
-
-ACE_INLINE u_long
-Task_Entry::effective_execution_time () const
-{
- return (rt_info_->info_type == RtecScheduler::OPERATION)
- ? rt_info_->worst_case_execution_time * arrival_count_
- : 0;
-}
-
-
-///////////////////////////
-// Class Task_Entry_Link //
-///////////////////////////
-
-
-// accessor: number of calls of dependency by dependant
-ACE_INLINE CORBA::Long
-Task_Entry_Link::number_of_calls () const
-{
- return number_of_calls_;
-}
-
-ACE_INLINE Task_Entry_Link::Dependency_Type
-Task_Entry_Link::dependency_type () const
-{
- return dependency_type_;
-}
-
-// accessor: dependant task entry
-ACE_INLINE Task_Entry &
-Task_Entry_Link::caller () const
-{
- return caller_;
-}
-
-// accessor: dependency task entry
-ACE_INLINE Task_Entry &
-Task_Entry_Link::called () const
-{
- return called_;
-}
-
-//////////////////////////
-// Class Dispatch Entry //
-//////////////////////////
-
-ACE_INLINE u_long
-Dispatch_Entry::dispatch_id () const
-{
- return dispatch_id_;
-}
-
-ACE_INLINE Dispatch_Entry::Preemption_Priority
-Dispatch_Entry::priority () const
-{
- return priority_;
-}
-
-ACE_INLINE void
-Dispatch_Entry::priority (Dispatch_Entry::Preemption_Priority p)
-{
- priority_ = p;
-}
-
-ACE_INLINE Dispatch_Entry::OS_Priority
-Dispatch_Entry::OS_priority () const
-{
- return OS_priority_;
-}
-
-ACE_INLINE void
-Dispatch_Entry::OS_priority (Dispatch_Entry::OS_Priority p)
-{
- OS_priority_ = p;
-}
-
-ACE_INLINE Dispatch_Entry::Sub_Priority
-Dispatch_Entry::dynamic_subpriority () const
-{
- return dynamic_subpriority_;
-}
-
-ACE_INLINE void
-Dispatch_Entry::dynamic_subpriority (Dispatch_Entry::Sub_Priority p)
-{
- dynamic_subpriority_ = p;
-}
-
-ACE_INLINE Dispatch_Entry::Sub_Priority
-Dispatch_Entry::static_subpriority () const
-{
- return static_subpriority_;
-}
-
-ACE_INLINE void
-Dispatch_Entry::static_subpriority (Dispatch_Entry::Sub_Priority p)
-{
- static_subpriority_ = p;
-}
-
-
-ACE_INLINE Dispatch_Entry::Time
-Dispatch_Entry::arrival () const
-{
- return arrival_;
-}
-
-ACE_INLINE Dispatch_Entry::Time
-Dispatch_Entry::deadline () const
-{
- return deadline_;
-}
-
-ACE_INLINE Task_Entry &
-Dispatch_Entry::task_entry () const
-{
- return task_entry_;
-}
-
-
-// accessor for pointer to original dispatch
-Dispatch_Entry *
-Dispatch_Entry::original_dispatch ()
-{
- return original_dispatch_;
-}
-
-
-///////////////////////////////
-// Class Dispatch_Entry_Link //
-///////////////////////////////
-
-ACE_INLINE
-Dispatch_Entry_Link::~Dispatch_Entry_Link ()
-{
-}
- // dtor
-
-Dispatch_Entry_Link::operator < (const Dispatch_Entry_Link &d) const
-{
- return (this->dispatch_entry_ < d.dispatch_entry_);
-}
- // GT comparator
-
-
-ACE_INLINE Dispatch_Entry &
-Dispatch_Entry_Link::dispatch_entry () const
-{
- return dispatch_entry_;
-}
- // accessor for reference to dispatch entry
-
-
-///////////////////////////////////
-// Class Dispatch_Proxy_Iterator //
-///////////////////////////////////
-
-ACE_INLINE int
-Dispatch_Proxy_Iterator::done () const
-{
- return iter_.done ();
-}
- // returns 0 if there are more entries to see, 1 if not
-
-
-//////////////////////////
-// Class TimeLine_Entry //
-//////////////////////////
-
- // dispatch entry accessor
-ACE_INLINE Dispatch_Entry &
-TimeLine_Entry::dispatch_entry () const
-{
- return dispatch_entry_;
-}
-
-
-// accessor for time slice start time (100 nanoseconds)
-ACE_INLINE u_long
-TimeLine_Entry::start () const
-{
- return start_;
-}
-
-// accessor for time slice stop time (100 nanoseconds)
-ACE_INLINE u_long
-TimeLine_Entry::stop () const
-{
- return stop_;
-}
-
-// accessor for time slice stop time (100 nanoseconds)
-ACE_INLINE u_long
-TimeLine_Entry::arrival () const
-{
- return arrival_;
-}
-
-// accessor for time slice stop time (100 nanoseconds)
-ACE_INLINE u_long
-TimeLine_Entry::deadline () const
-{
- return deadline_;
-}
-
-
-// accessor for next slice for this dispatch
-ACE_INLINE TimeLine_Entry *
-TimeLine_Entry::next (void) const
-{
- return next_;
-}
-
-// mutator for next slice for this dispatch
-ACE_INLINE void
-TimeLine_Entry::next (TimeLine_Entry *t)
-{
- next_ = t;
-}
-
-// accessor for previous slice for this dispatch
-ACE_INLINE TimeLine_Entry *
-TimeLine_Entry::prev (void) const
-{
- return prev_;
-}
-
-// mutator for previous slice for this dispatch
-ACE_INLINE void
-TimeLine_Entry::prev (TimeLine_Entry *t)
-{
- prev_ = t;
-}
-
-
-ACE_INLINE int
-TimeLine_Entry::operator < (const TimeLine_Entry &t) const
-{
- return (start_ < t.start_) ? 1 : 0;
-}
- // comparison operator
-
-
-///////////////////////////////
-// Class TimeLine_Entry_Link //
-///////////////////////////////
-
-
-ACE_INLINE TimeLine_Entry_Link::TimeLine_Entry_Link (TimeLine_Entry &t)
- : entry_ (t)
-{
-}
- // ctor
-
-ACE_INLINE TimeLine_Entry &
-TimeLine_Entry_Link::entry () const
-{
- return entry_;
-}
- // accessor for the underlying entry
-
-ACE_INLINE int
-TimeLine_Entry_Link::operator < (const TimeLine_Entry_Link &l) const
-{
- return (entry_ < l.entry_) ? 1 : 0;
-}
- // comparison operator
-
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Sched/Scheduler.cpp
deleted file mode 100644
index dacea4c5230..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Scheduler.cpp
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-#include "ace/Sched_Params.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "Scheduler.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// class Scheduler static members
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-const ACE_Scheduler::mode_t ACE_Scheduler::CURRENT_MODE = 0xFFFFFFFF;
-
-ACE_Scheduler *ACE_Scheduler::instance_ = 0;
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// class ACE_Scheduler static functions
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-void
-ACE_Scheduler::output (FILE *file, const status_t status)
-{
- switch (status)
- {
- case NOT_SCHEDULED :
- ACE_OS::fprintf (file, "NOT_SCHEDULED");
- break;
- case SUCCEEDED :
- ACE_OS::fprintf (file, "SUCCEEDED");
- break;
- case ST_TASK_ALREADY_REGISTERED :
- ACE_OS::fprintf (file, "TASK_ALREADY_REGISTERED");
- break;
- case ST_VIRTUAL_MEMORY_EXHAUSTED :
- ACE_OS::fprintf (file, "VIRTUAL_MEMORY_EXHAUSTED");
- break;
- case ST_UNKNOWN_TASK :
- ACE_OS::fprintf (file, "UNKNOWN_TASK");
- break;
- case INVALID_MODE :
- ACE_OS::fprintf (file, "INVALID_MODE");
- break;
- case MODE_COUNT_MISMATCH :
- ACE_OS::fprintf (file, "MODE_COUNT_MISMATCH");
- break;
- case TASK_COUNT_MISMATCH :
- ACE_OS::fprintf (file, "TASK_COUNT_MISMATCH");
- break;
- case INVALID_PRIORITY :
- ACE_OS::fprintf (file, "INVALID_PRIORITY");
- break;
-
- // The following are only used during scheduling (in the case of
- // off-line scheduling, they are only used prior to runtime).
- // To save a little code space (280 bytes on g++ 2.7.2/Solaris 2.5.1),
- // we could conditionally compile them so that they're not in the
- // runtime version.
- case ST_UTILIZATION_BOUND_EXCEEDED :
- ACE_OS::fprintf (file, "UTILIZATION_BOUND_EXCEEDED");
- break;
- case ST_INSUFFICIENT_THREAD_PRIORITY_LEVELS :
- ACE_OS::fprintf (file, "INSUFFICIENT_THREAD_PRIORITY_LEVELS");
- break;
- case ST_CYCLE_IN_DEPENDENCIES :
- ACE_OS::fprintf (file, "CYCLE_IN_DEPENDENCIES");
- break;
- case UNABLE_TO_OPEN_SCHEDULE_FILE :
- ACE_OS::fprintf (file, "UNABLE_TO_OPEN_SCHEDULE_FILE");
- break;
- case UNABLE_TO_WRITE_SCHEDULE_FILE :
- ACE_OS::fprintf (file, "UNABLE_TO_WRITE_SCHEDULE_FILE");
- break;
- // End of config-only status values.
-
- default:
- ACE_OS::fprintf (file, "UNKNOWN STATUS: %d", status);
- }
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// class ACE_Scheduler member functions
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-ACE_Scheduler::ACE_Scheduler () :
- minimum_priority_queue_ (0), // Could initialize this to -1, but it's
- // unsigned and we don't really need to
- // distinguish between no queues and one
- // queue.
- modes_ (0),
- tasks_ (0),
- threads_ (0),
- mode_ (0),
- status_ (NOT_SCHEDULED),
- output_level_ (0)
-{
-}
-
-
-ACE_Scheduler::~ACE_Scheduler ()
-{
-}
-
-
-// ************************************************************
-
-ACE_Scheduler::status_t
-ACE_Scheduler::get_rt_info (Object_Name name,
- RT_Info* &rtinfo)
-{
- handle_t handle;
-
- // This makes a copy. We can optimize this with our own string
- // class.
- ACE_CString lookup (name);
- // Search the map for the <name>. If found, return the RT_Info.
- RT_Info **info_array = 0;
- if (info_collection_.find (lookup, info_array) >= 0)
- {
- rtinfo = info_array[0];
- // If we find it, return.
- return SUCCEEDED;
- }
- else
- // Otherwise, make one, bind it, and register it.
- {
- rtinfo = new RT_Info;
- rtinfo->entry_point = name;
- // Create and array (size one) of RT_Info*
- info_array = new RT_Info*[1];
- info_array[0] = rtinfo;
- // Bind the rtinfo to the name.
- if (info_collection_.bind (lookup, info_array) != 0)
- {
- delete rtinfo;
- delete info_array;
- rtinfo = 0;
- return FAILED; // Error!
- }
- else
- {
- // Register the array.
- status_t result = this->register_task (info_array, 1, handle);
- if (result == SUCCEEDED)
- {
- rtinfo->handle = handle;
- return ST_UNKNOWN_TASK; // Didn't find it, but made one!
- }
- else
- {
- rtinfo->handle = 0;
- return FAILED;
- }
- }
- }
-}
-
-
-
-int ACE_Scheduler::number_of_dependencies(RT_Info* rt_info)
-{
- return rt_info->dependencies.length();
-}
-
-int ACE_Scheduler::number_of_dependencies(RT_Info& rt_info)
-{
- return rt_info.dependencies.length();
-}
-
-int ACE_Scheduler::add_dependency(RT_Info* rt_info,
- const Dependency_Info& d)
-{
- ACE_DEBUG ((LM_DEBUG, "adding dependecy to: %s\n",
- (const char*)rt_info->entry_point));
- RtecScheduler::Dependency_Set& set = rt_info->dependencies;
- int l = set.length();
- set.length(l + 1);
- set[l] = d;
- return 0;
-}
-
-void ACE_Scheduler::export(RT_Info* info, FILE* file)
-{
- export(*info, file);
-}
-
-void ACE_Scheduler::export(RT_Info& info, FILE* file)
-{
- // The divide-by-1 is for ACE_U_LongLong support.
- (void) ACE_OS::fprintf (file,
- "%s\n%d\n%ld\n%ld\n%ld\n%ld\n%d\n%ld\n%u\n"
- "# begin dependencies\n%d\n",
- (const char*)info.entry_point,
- info.handle,
- ORBSVCS_Time::to_hrtime (info.worst_case_execution_time) / 1,
- ORBSVCS_Time::to_hrtime (info.typical_execution_time) / 1,
- ORBSVCS_Time::to_hrtime (info.cached_execution_time) / 1,
- info.period,
- info.importance,
- ORBSVCS_Time::to_hrtime (info.quantum) / 1,
- info.threads,
- number_of_dependencies(info));
-
- for (int i = 0; i < number_of_dependencies(info); ++i)
- {
- RT_Info tmp;
- // TODO: info.dependencies [i].rt_info >>= &tmp;
- (void) ACE_OS::fprintf (file, "%s, %d\n",
- (const char*)tmp.entry_point,
- info.dependencies[i].number_of_calls);
-
- }
-
- (void) ACE_OS::fprintf (file, "# end dependencies\n%d\n%d\n\n",
- info.priority,
- info.subpriority);
-
-
-}
-
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Map_Entry<ACE_CString, ACE_Scheduler::RT_Info **>;
-
-template class ACE_Lock_Adapter<ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Manager<ACE_CString,
- ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
-template class ACE_Map_Iterator_Base<ACE_CString, ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
-template class ACE_Map_Iterator<ACE_CString, ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
-template class ACE_Map_Reverse_Iterator<ACE_CString, ACE_Scheduler::RT_Info **,
- ACE_SYNCH_MUTEX>;
-template class ACE_Read_Guard<ACE_SYNCH_MUTEX>;
-template class ACE_Write_Guard<ACE_SYNCH_MUTEX>;
-
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Map_Entry<ACE_CString, ACE_Scheduler::RT_Info **>
-
-#pragma instantiate ACE_Lock_Adapter<ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Manager<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Iterator<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_CString, ACE_Scheduler::RT_Info **, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Read_Guard<ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Write_Guard<ACE_SYNCH_MUTEX>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h b/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h
deleted file mode 100644
index 8cd1cd53054..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Scheduler.h
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-#if ! defined (SCHEDULER_H)
-#define SCHEDULER_H
-
-#include "ace/ACE.h"
-#include "ace/Map_Manager.h"
-#include "ace/Message_Block.h"
-#include "ace/Synch.h"
-#include "ace/SString.h"
-
-#include "orbsvcs/RtecSchedulerC.h"
-#include "orbsvcs/Event_Service_Constants.h"
-
-class TAO_ORBSVCS_Export ACE_Scheduler
- // = TITLE
- // Thread scheduler interface.
- //
- // = DESCRIPTION
- // This virtual base class is the interface to either an off-line
- // scheduler, or to the necessary on-line component of the Scheduler.
-{
-public:
- typedef u_int mode_t;
-
- typedef RtecScheduler::handle_t handle_t;
- typedef RtecScheduler::Dependency_Info Dependency_Info;
- typedef RtecScheduler::Preemption_Priority Preemption_Priority;
- typedef RtecScheduler::OS_Priority OS_Thread_Priority;
- typedef RtecScheduler::Sub_Priority Sub_Priority;
- typedef RtecScheduler::RT_Info RT_Info;
- // Map some types to simplify re-use.
-
- typedef const char *Object_Name;
- // Objects are named by unique strings.
-
- static const mode_t CURRENT_MODE;
-
- enum status_t {
- // The following are used both by the runtime Scheduler and during
- // scheduling.
- NOT_SCHEDULED = -1 // the schedule () method has not been called yet
- , FAILED = -1
- , SUCCEEDED
- , ST_UNKNOWN_TASK
- , ST_TASK_ALREADY_REGISTERED
- , ST_VIRTUAL_MEMORY_EXHAUSTED
-
- // The following are only used by the runtime Scheduler.
- , INVALID_MODE
- , MODE_COUNT_MISMATCH // only used by schedule ()
- , TASK_COUNT_MISMATCH // only used by schedule ()
- , INVALID_PRIORITY // only used by schedule (): mismatch of
- // (off-line, maybe) Scheduler output to
- // the runtime Scheduler component.
-
- // The following are only used during scheduling (in the case of
- // off-line scheduling, they are only used prior to runtime).
- , ST_UTILIZATION_BOUND_EXCEEDED
- , ST_INSUFFICIENT_THREAD_PRIORITY_LEVELS
- , ST_CYCLE_IN_DEPENDENCIES
- , UNABLE_TO_OPEN_SCHEDULE_FILE
- , UNABLE_TO_WRITE_SCHEDULE_FILE
- };
-
- virtual ~ACE_Scheduler ();
-
- // = Utility function for outputting the textual representation of a
- // status_t value to a FILE.
- static void output (FILE *, const status_t);
-
- // = Initialize the scheduler.
- virtual void init (const int minimum_priority,
- const int maximum_priority,
- const char *runtime_filename = 0,
- const char *rt_info_filename = 0,
- const char *timeline_filename = 0) = 0;
- // The minimum and maximum priority are the OS-specific priorities that
- // are used when creating the schedule (assigning priorities). The
- // minimum_priority is the priority value of the lowest priority.
- // It may be numerically higher than the maximum_priority, on OS's such
- // as VxWorks that use lower values to indicate higher priorities.
- //
- // When Scheduler::schedule is called, the schedule is output to the
- // file named by "runtime_filename" if it is non-zero.
- // This file is compilable; it is linked into the runtime executable
- // to provide priorities to the runtime scheduling component.
- // If the "rt_info_filename" is non-zero, the RT_Info for
- // every task is exported to it. It is not used at runtime.
- // If the "timeline_filename" is non-zero, the timeline output
- // file is created. It is not used at runtime.
- //
- // The runtime scheduling component ignores these filenames. It just
- // uses the priorities that were linked in to the executable, after
- // converting them to platform-specific values.
-
- // = Registers a task.
- virtual status_t register_task (RT_Info *[],
- const u_int number_of_modes,
- handle_t &handle) = 0;
- // If the Task registration succeeds, this function returns SUCCEEDED
- // and sets "handle" to a unique identifier for the task.
- // Otherwise, it returns either VIRTUAL_MEMORY_EXHAUSTED or
- // TASK_ALREADY_REGISTERED sets the handle to 0. (A task may
- // only be registered once.)
- // The RT_Info * array is indexed by mode; there must be one element for
- // each mode, as specified by number_of_modes. If a task does not
- // run in a mode, then its entry in the array for that mode must
- // be 0.
-
- virtual status_t get_rt_info (Object_Name name,
- RT_Info* &rtinfo);
- // Tries to find the RT_Info corresponding to <name> in the RT_Info
- // database. Returns SUCCEEDED if <name> was found and <rtinfo> was
- // set. Returns UNKNOWN_TASK if <name> was not found, but <rtinfo>
- // was set to a newly allocated RT_Info. In this UNKNOWN_TASK case,
- // the task must call RT_Info::set to fill in execution properties.
- // In the SUCCEEDED and UNKNOWN_TASK cases, this->register_task
- // (rtinfo, 0, handle) is called. Returns FAILED if an error
- // occurs.
- //
- // One motivation for allocating RT_Info's from within the Scheduler
- // is to allow RT_Infos to persist after the tasks that use them.
- // For instance, we may want to call this->schedule right before the
- // application exits a configuration run. If the tasks have been
- // deleted (deleting their RT_Infos with them), this->schedule will
- // fail.
-
- virtual status_t lookup_rt_info (handle_t handle,
- RT_Info* &rtinfo) = 0;
- // Obtains an RT_Info based on its "handle".
-
- // = Computes the schedule.
- virtual status_t schedule (void) = 0;
- // This actually generates the files.
-
- // = Access a thread priority.
- virtual int priority (const handle_t handle,
- OS_Thread_Priority &priority,
- Sub_Priority &subpriority,
- Preemption_Priority &preemption_prio,
- const mode_t = CURRENT_MODE) const = 0;
- // Defines "priority" as the priority that was assigned to the Task that
- // was assigned "handle", for the specified mode. Defines "subpriority"
- // as the relative ordering (due to dependencies) within the priority.
- // Returns 0 on success, or -1 if an invalid mode or handle are supplied.
- // Queue numbers are platform-independent priority values, ranging from
- // a highest priority value of 0 to the lowest priority value, which is
- // returned by "minimum_priority_queue ()".
-
- // = Access the platform-independent priority value of the lowest-priority
- // thread.
- u_int minimum_priority_queue () const { return minimum_priority_queue_; }
- // This is intended for use by the Event Channel, so it can determine the
- // number of priority dispatch queues to create.
-
- // = Access the number of modes.
- u_int modes () const { return modes_; }
-
- // = Access the number of tasks.
- u_int tasks () const { return tasks_; }
-
- // = Access the number of threads.
- u_int threads () const { return threads_; }
-
- // = Access the current mode.
- mode_t mode () const { return mode_; }
-
- // = Set the current mode.
- void mode (const mode_t mode) { mode_ = mode; }
-
- // = Access the current scheduler status.
- status_t status () const { return status_; }
-
- // = Access the current output (debugging) level.
- u_int output_level () const { return output_level_; }
- // Default is 0; set to 1 to print out schedule, by task. Set
- // to higher than one for debugging info.
-
- // = Set the scheduler output (debugging) level.
- void output_level (const u_int level) { output_level_ = level; }
- // the only supported levels are 0 (quiet), 1 (verbose) and 2
- // (debug)
-
- static int add_dependency(RT_Info* rt_info,
- const Dependency_Info& d);
-
- static int number_of_dependencies(RT_Info* rt_info);
- static int number_of_dependencies(RT_Info& rt_info);
-
- static void export(RT_Info*, FILE* file);
- static void export(RT_Info&, FILE* file);
-
-protected:
- ACE_Scheduler ();
-
- // = Set the minimum priority value.
- void minimum_priority_queue (const u_int minimum_priority_queue_number)
- { minimum_priority_queue_ = minimum_priority_queue_number; }
-
- // = Set the number of modes.
- void modes (const u_int modes) { modes_ = modes; }
-
- // = Set the number of tasks.
- void tasks (const u_int tasks) { tasks_ = tasks; }
-
- // = Set the number of threads.
- void threads (const u_int threads) { threads_ = threads; }
-
- // = Set the current scheduler status.
- void status (const status_t new_status) { status_ = new_status; }
-
-private:
- typedef ACE_CString EXT;
- typedef RT_Info **INT;
-
- typedef ACE_Map_Manager<EXT, INT, ACE_SYNCH_MUTEX> Info_Collection;
- typedef ACE_Map_Iterator<EXT, INT, ACE_SYNCH_MUTEX> Info_Collection_Iterator;
- typedef ACE_Map_Entry<EXT, INT> Info_Collection_Entry;
-
- Info_Collection info_collection_;
- // A binding of name to rt_info. This is the mapping for every
- // rt_info in the process.
-
- static ACE_Scheduler *instance_;
-
- u_int minimum_priority_queue_;
- // The platform-independent priority value of the Event Channel's
- // minimum priority dispatch queue. The value of the maximum priority
- // dispatch queue is always 0.
-
- u_int modes_;
- u_int tasks_;
- u_int threads_;
-
- mode_t mode_;
- status_t status_;
- u_int output_level_;
-
- // the following functions are not implememented
- ACE_UNIMPLEMENTED_FUNC(ACE_Scheduler (const ACE_Scheduler &))
- ACE_UNIMPLEMENTED_FUNC(ACE_Scheduler &operator= (const ACE_Scheduler &))
-};
-
-typedef ACE_Scheduler Scheduler;
-
-#if defined (__ACE_INLINE__)
-#include "Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* SCHEDULER_H */
-
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.i b/TAO/orbsvcs/orbsvcs/Sched/Scheduler.i
deleted file mode 100644
index 57875ae26d1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.i
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Scheduler.i
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-// EOF
-
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.cpp b/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.cpp
deleted file mode 100644
index 1b36d49e1d6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.cpp
+++ /dev/null
@@ -1,262 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Scheduler_Generic.cpp
-//
-// = CREATION DATE
-// 19 November 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-#include "ace/Sched_Params.h"
-
-#include "Scheduler_Generic.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "Scheduler_Generic.i"
-#endif /* __ACE_INLINE__ */
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// static functions
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-// Structure for storing the RT_Info information for each task, per mode.
-struct Mode_Entry
-{
- RtecScheduler::RT_Info *rt_info_;
- u_long start_time_; // microseconds
- u_long stop_time_; // microseconds
-
- Mode_Entry() :
- rt_info_ (0),
- start_time_ (0),
- stop_time_ (0)
- {
- }
-
- Mode_Entry(RtecScheduler::RT_Info *const rt_info,
- const u_long start_time = 0,
- const u_long stop_time = 0) :
- rt_info_ (rt_info),
- start_time_ (start_time),
- stop_time_ (stop_time)
- {
- }
-
- ~Mode_Entry () {}
-
- Mode_Entry &operator= (const Mode_Entry &entry)
- {
- if (this != &entry)
- {
- rt_info_ = entry.rt_info_;
- start_time_ = entry.start_time_;
- stop_time_ = entry.stop_time_;
- }
-
- return *this;
- }
-};
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// class Scheduler_Generic member functions
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-Scheduler_Generic::Scheduler_Generic () :
- Scheduler (),
- handles_ (0),
- // Set the minimum priority to that for the current platform. This
- // shouldn't be necessary, but UPSingleProcessorOrb::initialize_reactors
- // creates threads before the Event Channel calls Scheduler::init ().
- minimum_priority_ (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO,
- ACE_SCOPE_THREAD)),
- increasing_priority_ (-1),
- task_entries_ ()
-{
-}
-
-
-Scheduler_Generic::~Scheduler_Generic ()
-{
- reset ();
-}
-
-
-void
-Scheduler_Generic::reset ()
-{
-}
-
-Scheduler::status_t
-Scheduler_Generic::lookup_rt_info (handle_t handle,
- RT_Info*& rtinfo)
-{
- if (handle < 0 || (size_t) handle > task_entries_.size ())
- {
- return ST_UNKNOWN_TASK;
- }
- RT_Info*** entry;
- ACE_Unbounded_Set_Iterator <RT_Info **> i (task_entries_);
- while (i.next (entry) != 0)
- {
- i.advance ();
- RT_Info** array = *entry;
- if (array[0]->handle == handle)
- {
- rtinfo = array[0];
- return SUCCEEDED;
- }
- }
-
- return ST_UNKNOWN_TASK;
-}
-
-
-Scheduler::status_t
-Scheduler_Generic::register_task (RT_Info *rt_info [],
- const u_int number_of_modes,
- handle_t &handle)
-{
- status_t ret;
-
- // try to store the new task's information . . .
- switch (task_entries_.insert (rt_info))
- {
- case 0 : // successfully inserted
- {
- rt_info [0]->handle = (handle = ++handles_);
-
- // assigned the same handle to the RT_Info for each of its modes
- for (u_int i = 1; i < number_of_modes; ++i)
- {
- if (rt_info [i] != 0)
- rt_info [i]->handle = handle;
- }
-
- if (number_of_modes > modes ())
- {
- modes (number_of_modes);
- }
-
- ret = SUCCEEDED;
-
- if (output_level () >= 5)
- {
- ACE_OS::printf ("registered task \"%s\" with RT_Info starting "
- "at %X\n",
- (const char*)rt_info[0]->entry_point,
- (void *) rt_info[0]);
- }
- }
- break;
-
- case 1 : // the entry had already been inserted
- handle = 0;
- ret = ST_TASK_ALREADY_REGISTERED;
- break;
-
- default :
- // case -1 : insert failed, probably because virtual memory exhaused
- handle = 0;
- ret = ST_VIRTUAL_MEMORY_EXHAUSTED;
- break;
- }
-
- return ret;
-}
-
-
-void
-Scheduler_Generic::init (const int minimum_priority,
- const int maximum_priority,
- const char *runtime_filename,
- const char *rt_info_filename,
- const char *timeline_filename)
-{
- minimum_priority_ = minimum_priority;
- maximum_priority_ = maximum_priority;
- runtime_filename_ = runtime_filename;
- rt_info_filename_ = rt_info_filename;
- timeline_filename_ = timeline_filename;
-}
-
-
-Scheduler::status_t
-Scheduler_Generic::schedule (void)
-{
- ACE_Guard<LOCK> ace_mon (lock_);
-
- // here goes . . .
-
- increasing_priority_ = maximum_priority_ >= minimum_priority_;
-
- status_t status = ACE_Scheduler::SUCCEEDED;
-
- // store number of tasks, based on registrations
- tasks (task_entries_.size ());
-
- if (output_level () > 0)
- {
- print_schedule ();
- }
-
- return status;
-}
-
-
-int
-Scheduler_Generic::priority (const handle_t handle,
- OS_Thread_Priority &priority,
- Sub_Priority &subpriority,
- Preemption_Priority &preemption_prio,
- const mode_t requested_mode) const
-{
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (requested_mode);
-
- priority = minimum_priority_;
- subpriority = ACE_Scheduler_MIN_SUB_PRIORITY;
- preemption_prio = ACE_Scheduler_MAX_PREEMPTION_PRIORITY;
-
- if (output_level () >= 3)
- {
- ACE_OS::printf ("preemption_prio %d: min %d, pri %d, min_pri %d\n",
- preemption_prio, minimum_priority_queue (),
- priority, minimum_priority_);
- }
-
- return 0;
-}
-
-
-void
-Scheduler_Generic::print_schedule ()
-{
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node<RtecScheduler::RT_Info **>;
-template class ACE_Unbounded_Set<RtecScheduler::RT_Info **>;
-template class ACE_Unbounded_Set_Iterator<RtecScheduler::RT_Info **>;
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Node<RtecScheduler::RT_Info **>
-#pragma instantiate ACE_Unbounded_Set<RtecScheduler::RT_Info **>
-#pragma instantiate ACE_Unbounded_Set_Iterator<RtecScheduler::RT_Info **>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h b/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h
deleted file mode 100644
index 4e27a9999ce..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Scheduler_Generic.h
-//
-// = CREATION DATE
-// 19 November 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-#if ! defined (SCHEDULER_INTERNAL_H)
-#define SCHEDULER_INTERNAL_H
-
-#include "Scheduler.h"
-
-class TAO_ORBSVCS_Export Scheduler_Generic : public ACE_Scheduler
- // = TITLE
- // Implementation of an off-line scheduler.
- //
- // = DESCRIPTION
- // Schedules tasks, assigning the same priority to all of them.
-{
-public:
- Scheduler_Generic ();
- virtual ~Scheduler_Generic ();
-
- // = Initialize the scheduler.
- virtual void init (const int minimum_priority,
- const int maximum_priority,
- const char *runtime_filename = 0,
- const char *rt_info_filename = 0,
- const char *timeline_filename = 0);
-
- // = Registers a task.
- virtual status_t register_task (RT_Info *[],
- const u_int number_of_modes,
- handle_t &handle);
-
- virtual status_t lookup_rt_info (handle_t handle,
- RT_Info* &rtinfo);
- // Obtains an RT_Info based on its "handle".
-
- // = Computes the schedule.
- virtual status_t schedule (void);
-
- // = Access a thread priority.
- virtual int priority (const handle_t handle,
- OS_Thread_Priority &priority,
- Sub_Priority &subpriority,
- Preemption_Priority &preemption_prio,
- const mode_t = CURRENT_MODE) const;
- // Defines "priority" as the priority that was assigned to the Task that
- // was assigned "handle", for the specified mode. Defines "subpriority"
- // as the relative ordering (due to dependencies) within the priority.
- // Returns 0 on success, or 1 if an invalid mode or handle are supplied.
-
-private:
- u_int handles_;
- // The number of task handles dispensed so far.
-
- int minimum_priority_;
- // The minimum priority value that the application specified (in
- // its call to init ()).
-
- int maximum_priority_;
- // The maximum priority value that the application specified (in
- // its call to init ()).
-
- const char *runtime_filename_;
- // Destination file of Scheduler output from the configuration run.
-
- const char *rt_info_filename_;
- // Destination file of all rt_info data from the configuration run.
-
- const char *timeline_filename_;
- // The destination of the timeline.
-
- int increasing_priority_;
- // Set to 1 if priority values increase with increasing priority,
- // such as on Solaris and Win32, or 0 if they decrease, such as on
- // VxWorks.
-
- ACE_Unbounded_Set <RT_Info **> task_entries_;
- // Collection of known tasks.
-
-#if defined (ACE_HAS_THREADS)
- typedef ACE_Recursive_Thread_Mutex LOCK;
-#else
- typedef ACE_Null_Mutex LOCK;
-#endif /* ACE_HAS_THREADS */
-
- LOCK lock_;
- // This protects access to the scheduler during configuration runs.
-
-
- ///////////////////////////////////////
- // member functions for internal use //
- ///////////////////////////////////////
-
- void reset ();
- // Prepare for another schedule computation, but do not
- // disturb the "output" (priorities that have already been assigned).
-
- void print_schedule ();
- // Display the schedule, task-by-task.
-
- ACE_UNIMPLEMENTED_FUNC (Scheduler_Generic (const Scheduler_Generic &))
- ACE_UNIMPLEMENTED_FUNC (Scheduler_Generic &operator= (
- const Scheduler_Generic &))
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "Scheduler_Generic.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* SCHEDULER_INTERNAL_H */
-
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i b/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i
deleted file mode 100644
index 71e3695dc35..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Scheduler_Generic.i
-//
-// = CREATION DATE
-// 23 January 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-
-// EOF
-
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.cpp
deleted file mode 100644
index 63a45837a22..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.cpp
+++ /dev/null
@@ -1,1228 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Strategy_Scheduler.cpp
-//
-// = CREATION DATE
-// 22 December 1997
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#include "math.h"
-#include "float.h"
-
-#include "ace/Sched_Params.h"
-
-#include "Strategy_Scheduler.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "Strategy_Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-//////////////////////////////////////////////
-// helper function type definition for sort //
-//////////////////////////////////////////////
-
-// this is awkward, but it makes MSVC++ happy
-extern "C"
-{
-typedef int (*COMP_FUNC) (const void*, const void*);
-}
-
-///////////////////////////////////////////////////
-// class ACE_Strategy_Scheduler member functions //
-///////////////////////////////////////////////////
-
-ACE_Strategy_Scheduler::ACE_Strategy_Scheduler (ACE_Scheduler_Strategy &strategy)
- : ACE_Scheduler (),
- strategy_ (strategy)
-{
-}
- // = ctor
-
-
-ACE_Strategy_Scheduler::~ACE_Strategy_Scheduler ()
-{
-}
- // = virtual dtor
-
-
-ACE_Scheduler::status_t
-ACE_Strategy_Scheduler::sort_dispatches (Dispatch_Entry **dispatches,
- u_int count)
-{
- // sort the entries in order of priority and subpriority
- strategy_.sort (dispatches, count);
-
- return ACE_Scheduler::SUCCEEDED;
-}
- // = sets up the schedule in the order generated
- // by the strategy's comparison operators
-
-ACE_Scheduler::status_t
-ACE_Strategy_Scheduler::assign_priorities (Dispatch_Entry **dispatches,
- u_int count)
-{
- // start with happy status
- ACE_Scheduler::status_t status = ACE_Scheduler::SUCCEEDED;
-
- // start with the highest OS priority in the given range and work downward:
- // if we run out of values to assign, return an error.
- int current_OS_priority = maximum_priority_;
-
- // start scheduler priority at 0 (highest priority queue number)
- // NOTE: 0 is highest for priority, lowest for dynamic and static subpriority
- Preemption_Priority current_scheduler_priority = 0;
-
- // value the OS and scheduler priorities in 0th dispatch entry
- dispatches[0]->OS_priority (current_OS_priority);
- dispatches[0]->priority (current_scheduler_priority);
-
- // traverse ordered dispatch entry array, assigning priority
- // (array is sorted from highest to lowest priority)
- for (u_int i = 1; i < count; ++i)
- {
- switch (strategy_.priority_comp (*(dispatches[i-1]),
- *(dispatches[i])))
- {
- case -1: // the current entry is at lower priority than the previous
- {
- // decrease priority by incrementing the current scheduling priority
- // number: 0 is the highest priority number.
- ++current_scheduler_priority;
-
- // check for OS priority level boundaries: because OS priority values
- // can run in either increasing or decreasing order, there is no easy,
- // portable way to check other than exact comparison to the bounds
- // that were given in init () or that came from the platform itself.
- if ((current_OS_priority == minimum_priority_) ||
- (current_OS_priority == ACE_Sched_Params::previous_priority (
- ACE_SCHED_FIFO,
- current_OS_priority,
- ACE_SCOPE_PROCESS)))
- {
- // if we have run out of priority levels to assign, indicate
- // this in the return status, but keep right on assigning the
- // minimum OS priority in the range to the remaining tasks.
- status = ACE_Scheduler::ST_INSUFFICIENT_THREAD_PRIORITY_LEVELS;
- }
- else
- {
- // we're still in range, so decrement the current OS priority level
- current_OS_priority =
- ACE_Sched_Params::previous_priority (ACE_SCHED_FIFO,
- current_OS_priority,
- ACE_SCOPE_PROCESS);
- }
-
- break;
- }
- case 0: // still at the same priority level
-
- break;
-
- default: // should never reach here: something *bad* has happened
-
- ACE_ERROR_RETURN ((
- LM_ERROR,
- "Priority assignment failure: tasks"
- " \"%s\" and \"%s\" are out of order.\n",
- dispatches [i-1]->task_entry ().rt_info ()->entry_point,
- dispatches [i]->task_entry ().rt_info ()->entry_point),
- ACE_Scheduler::ST_INVALID_PRIORITY_ORDERING);
- }
-
- // set OS priority of the current dispatch entry
- dispatches[i]->OS_priority (current_OS_priority);
-
- // set scheduler priority of the current dispatch entry
- dispatches[i]->priority (current_scheduler_priority);
- }
-
- return status;
-}
- // = assigns priorities and sub-priorities to the sorted schedule,
- // according to the strategy's priority comparison operator.
-
-ACE_Scheduler::status_t
-ACE_Strategy_Scheduler::assign_subpriorities (Dispatch_Entry **dispatches,
- u_int count)
-{
- // start subpriority levels and element counts at 1, set level values in
- // the first entry, increment the static subpriority level,
- Sub_Priority dynamic_subpriority_level = 0;
- Sub_Priority static_subpriority_level = 0;
- u_int dynamic_subpriority_elements = 1;
- u_int static_subpriority_elements = 1;
- dispatches[0]->dynamic_subpriority (dynamic_subpriority_level);
- dispatches[0]->static_subpriority (static_subpriority_level++);
-
- u_int i,j;
- // traverse ordered dispatch entry array, assigning priority
- // (array is sorted from highest to lowest priority)
- for (i = 1; i < count; ++i)
- {
- switch (strategy_.priority_comp (*(dispatches[i-1]),
- *(dispatches[i])))
- {
- case -1: // the current entry is at lower priority than the previous
- {
- // fill in the high to low dynamic subpriority values by subtracting
- // the previously assigned subpriority value of each of element in the
- // current priority level from the value of last subpriority level
- for (j = 1; j <= dynamic_subpriority_elements; ++j)
- {
- dispatches[i - j]->
- dynamic_subpriority (dynamic_subpriority_level -
- dispatches[i - j]->
- dynamic_subpriority ());
- }
- for (j = 1; j <= static_subpriority_elements; ++j)
- {
- dispatches[i - j]->
- static_subpriority (static_subpriority_level -
- dispatches[i - j]->
- static_subpriority () - 1);
- }
-
- // reset the subpriority counters, set these values in the
- // current entry, and increment the static subpriority counter
- dynamic_subpriority_elements = 1;
- static_subpriority_elements = 1;
- dynamic_subpriority_level = 0;
- static_subpriority_level = 0;
- dispatches[i]->dynamic_subpriority (dynamic_subpriority_level);
- dispatches[i]->static_subpriority (static_subpriority_level++);
-
- break;
- }
-
- case 0: // still at the same priority level
-
- // compare the dynamic subpriorities
- switch (strategy_.dynamic_subpriority_comp (*(dispatches[i-1]),
- *(dispatches[i])))
- {
- case -1: // the current entry is at lower dynamic subpriority
-
- // increment dynamic subpriority level
- ++dynamic_subpriority_level;
-
- // update the static subpriority as well: this avoids problems
- // with non-determinism if due to run-time conditions, two
- // dispatches line up with identical dynamic subpriority that
- // were considered different with respect to the critical instant
- dispatches[i]->static_subpriority (static_subpriority_level++);
- static_subpriority_elements++;
- break;
-
- case 0: // still at the same dynamic subpriority level
-
- {
- switch (strategy_.static_subpriority_comp (*(dispatches[i-1]),
- *(dispatches[i])))
- {
- case -1:
- case 0:
-
- // assign and then increment the static subpriority: even if
- // still at the same dynamic or static subpriority level as
- // far as the scheduling strategy is concerned, assign a new
- // one anyway, to give a completely deterministic schedule
- // even if the dynamic subpriorities happen to align due to
- // run-time variation
- dispatches[i]->static_subpriority (static_subpriority_level++);
- static_subpriority_elements++;
- break;
-
- default: // should never reach here: something *bad* has happened
-
- ACE_ERROR_RETURN ((
- LM_ERROR,
- "Static subpriority assignment failure: tasks"
- " \"%s\" and \"%s\" are out of order.\n",
- dispatches[i-1]->task_entry ().rt_info ()->entry_point,
- dispatches[i]->task_entry ().rt_info ()->entry_point),
- ACE_Scheduler::ST_INVALID_PRIORITY_ORDERING);
- }
-
- break;
- }
-
- default: // should never reach here: something *bad* has happened
-
- ACE_ERROR_RETURN ((
- LM_ERROR,
- "Dynamic subpriority assignment failure: tasks"
- " \"%s\" and \"%s\" are out of order.\n",
- dispatches[i-1]->task_entry ().rt_info ()->entry_point,
- dispatches[i]->task_entry ().rt_info ()->entry_point),
- ACE_Scheduler::ST_INVALID_PRIORITY_ORDERING);
- }
-
- dispatches[i]->dynamic_subpriority (dynamic_subpriority_level);
- dynamic_subpriority_elements++;
- break;
-
- default: // should never reach here: something *bad* has happened
-
- ACE_ERROR_RETURN ((
- LM_ERROR,
- "Priority assignment failure: tasks"
- " \"%s\" and \"%s\" are out of order.\n",
- dispatches[i-1]->task_entry ().rt_info ()->entry_point,
- dispatches[i]->task_entry ().rt_info ()->entry_point),
- ACE_Scheduler::ST_INVALID_PRIORITY_ORDERING);
- }
- }
-
- // fill in the high to low subpriority values for the last priority
- // level by subtracting the previously assigned subpriorities from
- // the total number of subpriorities
- for (j = 1; j <= dynamic_subpriority_elements; ++j)
- {
- dispatches[i - j]->
- dynamic_subpriority (dynamic_subpriority_level -
- dispatches[i - j]->dynamic_subpriority ());
- }
- for (j = 1; j <= static_subpriority_elements; ++j)
- {
- dispatches[i - j]->
- static_subpriority (static_subpriority_level -
- dispatches[i - j]->static_subpriority () - 1);
- }
-
- return ACE_Scheduler::SUCCEEDED;
-}
-
-
-ACE_Scheduler::Preemption_Priority
-ACE_Strategy_Scheduler::minimum_critical_priority ()
-{
- return strategy_.minimum_critical_priority ();
-}
- // = determine the minimum critical priority number
-
-
-ACE_Scheduler::status_t
-ACE_Strategy_Scheduler::schedule_timeline_entry (
- Dispatch_Entry &dispatch_entry,
- ACE_Unbounded_Queue <Dispatch_Entry *> &reschedule_queue)
-{
- status_t status = SUCCEEDED;
-
- // timeline entries cover the execution time of the dispatch
- u_long remaining_time =
- dispatch_entry.task_entry().rt_info ()->worst_case_execution_time;
-
- // initialize last stop time to arrival time of the dispatch
- u_long last_stop = dispatch_entry.arrival ();
-
- TimeLine_Entry *last_entry = 0;
- TimeLine_Entry *current_entry = 0;
- ACE_Ordered_MultiSet_Iterator <TimeLine_Entry_Link> iter (*timeline_);
- for (iter.first (); (remaining_time > 0) && (iter.done () == 0);
- iter.advance ())
- {
- TimeLine_Entry_Link *link;
- if ((iter.next (link) == 0) || (! link))
- {
- return ST_BAD_INTERNAL_POINTER;
- }
-
- // for each entry already in the timeline that is the first one for a
- // dispatch, and has lower dynamic subpriority and does not have greater
- // static priority, and starts in the period in which the new entry would
- // execute, then advance the iterator to the next timeline entry
- // having a different dispatch entry (if there is such), add its dispatch
- // entry to the reschedule set, remove all TimeLine_Entry_Links that
- // correspond to that dispatch entry, and delete all its TimeLine_Entry
- // objects as well. NOTE: 0 is highest priority, 1 next, etc.
- while ((iter.done () == 0) &&
- (link->entry ().start() < last_stop + remaining_time) &&
- (link->entry ().start() >= last_stop) &&
- (link->entry ().prev () == 0) &&
- (link->entry ().dispatch_entry().priority () >=
- dispatch_entry.priority ()) &&
- (strategy_.dynamic_subpriority (dispatch_entry, link->entry ().start ()) >
- strategy_.dynamic_subpriority (link->entry ().dispatch_entry (),
- link->entry ().start ())))
- {
- // point to the dispatch entry whose timeline entries will be removed and
- // rescheduled, and to the timeline entry heading the bilinked list of
- // timeline entries to be removed
- Dispatch_Entry *removed_dispatch_entry
- = &(link->entry ().dispatch_entry());
- TimeLine_Entry *remove_entry = & (link->entry ());
-
- // put the dispatch entry into the set of entries that will be
- // rescheduled at the end of this method (tail recursively)
- reschedule_queue.enqueue_tail (removed_dispatch_entry);
-
- // advance the iterator to the next timeline entry (if there is one)
- // that is not for the dispatch entry being removed
- while (iter.done () == 0)
- {
- // point to the current link
- if ((iter.next (link) == 0) || (! link))
- {
- return ST_BAD_INTERNAL_POINTER;
- }
-
- // advance until a different dispatch entry is found,
- // or we run off the end of the timeline
- if (&(link->entry ().dispatch_entry ()) ==
- removed_dispatch_entry)
- {
- iter.advance ();
- }
- else
- {
- break;
- }
- }
-
- // remove entries corresponding to the rescheduled
- // dispatch from the timeline and destroy them
- TimeLine_Entry *next_remove_entry = 0;
- while (remove_entry)
- {
- next_remove_entry = remove_entry->next ();
-
- timeline_->remove (TimeLine_Entry_Link (*remove_entry));
- delete remove_entry;
-
- remove_entry = next_remove_entry;
- }
- }
-
- // exit the outer loop if there are no more entries in the timeline
- if (iter.done () != 0)
- {
- break;
- }
-
- // if there's room, schedule a new timeline entry for the dispatch
- if (link->entry ().start() > last_stop)
- {
- ACE_NEW_RETURN (
- current_entry,
- TimeLine_Entry (
- dispatch_entry,
- last_stop,
- (((remaining_time + last_stop) < link->entry ().start())
- ? (remaining_time + last_stop) : link->entry ().start()),
- dispatch_entry.arrival (),
- dispatch_entry.deadline (),
- 0, last_entry),
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- // patch up the pointers within the list of entries for this dispatch
- if (last_entry)
- {
- last_entry->next (current_entry);
- }
- last_entry = current_entry;
-
- timeline_->insert(TimeLine_Entry_Link(*current_entry));
-
- // update the remaining time and last stop values
- remaining_time -= ((remaining_time < (link->entry ().start() - last_stop))
- ? remaining_time : (link->entry ().start() - last_stop));
- }
-
- // update the last stop time
- if (last_stop < link->entry ().stop ())
- {
- last_stop = link->entry ().stop ();
- }
- }
-
- // if there is still dispatch time remaining, and we've
- // reached the end of the list, insert what's left
- if (remaining_time > 0)
- {
- ACE_NEW_RETURN (
- current_entry,
- TimeLine_Entry (
- dispatch_entry,
- last_stop,
- remaining_time + last_stop,
- dispatch_entry.arrival (),
- dispatch_entry.deadline (),
- 0, last_entry),
- ST_VIRTUAL_MEMORY_EXHAUSTED);
-
- // patch up the pointers within the list of entries for this dispatch
- if (last_entry)
- {
- last_entry->next (current_entry);
- }
-
- timeline_->insert(TimeLine_Entry_Link(*current_entry));
- }
-
- return status;
-}
-
-
-
-////////////////////////////////////////////////////////////////////
-// class template ACE_Strategy_Scheduler_Factory member functions //
-////////////////////////////////////////////////////////////////////
-
-template <class STRATEGY>
-ACE_Strategy_Scheduler *
-ACE_Strategy_Scheduler_Factory<STRATEGY>::create (ACE_Scheduler::Preemption_Priority minimum_critical_priority)
-{
- ACE_Strategy_Scheduler *the_scheduler = 0;
- STRATEGY *the_strategy;
-
- ACE_NEW_RETURN(the_strategy, STRATEGY(minimum_critical_priority), 0);
-
- ACE_NEW_RETURN (the_scheduler, ACE_Strategy_Scheduler (*the_strategy), 0);
-
- return the_scheduler;
-};
- // construct and return a scheduler strategized with
- // an instance of the the parameterized strategy type
-
-
-
-/////////////////////////////////////////////////////////////////
-// abstract base class ACE_Scheduler_Strategy member functions //
-/////////////////////////////////////////////////////////////////
-
-
-ACE_Scheduler_Strategy::ACE_Scheduler_Strategy (
- ACE_Scheduler::Preemption_Priority minimum_critical_priority)
- : minimum_critical_priority_ (minimum_critical_priority)
-{
-}
- // ctor
-
-int
-ACE_Scheduler_Strategy::sort_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // order first by the priority ordering
- int result = priority_comp (first_entry, second_entry);
-
- // within same priority, order by dynamic subpriority
- if (result == 0)
- {
- result = dynamic_subpriority_comp (first_entry, second_entry);
- }
-
- // if same dynamic subpriority, order by static subpriority
- if (result == 0)
- {
- result = static_subpriority_comp (first_entry, second_entry);
- }
-
- return result;
-}
- // = comparison of two dispatch entries using the specific priority, dynamic
- // subpriority, and static subpriority method definitions provided by
- // the derived strategy class to produce the strategy specific sort
- // ordering: returns -1 if the first Dispatch_Entry is greater in the order,
- // 0 if they are equivalent, or 1 if the second Dispatch_Entry is greater in
- // the order
-
-
-ACE_Scheduler_Strategy::static_subpriority_comp (
- const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // order first by importance assigned to underlying RT_Info (descending)
- if (first_entry.task_entry ().rt_info ()->importance >
- second_entry.task_entry ().rt_info ()->importance)
- {
- return -1;
- }
- else if (first_entry.task_entry ().rt_info ()->importance <
- second_entry.task_entry ().rt_info ()->importance)
- {
- return 1;
- }
- else
- {
- // order last by the topological sort finishing time (ascending)
- if (first_entry.task_entry ().finished () <
- second_entry.task_entry ().finished ())
- {
- return -1;
- }
- else if (first_entry.task_entry ().finished () >
- second_entry.task_entry ().finished ())
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
-}
-
-ACE_Scheduler::Preemption_Priority
-ACE_Scheduler_Strategy::minimum_critical_priority ()
-{
- return 0;
-}
- // = returns 0 for minimum critical priority number
-
-
-/////////////////////////////////////////////////////////////////////////
-// class ACE_MUF_Scheduler_Strategy static data member initializations //
-/////////////////////////////////////////////////////////////////////////
-
-ACE_MUF_Scheduler_Strategy * ACE_MUF_Scheduler_Strategy::instance_ = 0;
-
-///////////////////////////////////////////////////////
-// class ACE_MUF_Scheduler_Strategy member functions //
-///////////////////////////////////////////////////////
-
-ACE_MUF_Scheduler_Strategy *
-ACE_MUF_Scheduler_Strategy::instance ()
-{
- if (0 == ACE_MUF_Scheduler_Strategy::instance_)
- {
- ACE_NEW_RETURN (ACE_MUF_Scheduler_Strategy::instance_,
- ACE_MUF_Scheduler_Strategy, 0);
- }
-
- return ACE_MUF_Scheduler_Strategy::instance_;
-}
-
-int
-ACE_MUF_Scheduler_Strategy::priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // order by criticality (descending)
- if (first_entry.task_entry ().rt_info ()->criticality >
- second_entry.task_entry ().rt_info ()->criticality)
- {
- return -1;
- }
- else if (first_entry.task_entry ().rt_info ()->criticality <
- second_entry.task_entry ().rt_info ()->criticality)
- {
- return 1;
- }
- else
- {
- return 0; // same priority level
- }
-}
- // = comparison of two dispatch entries by maximum criticality: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent, or
- // 1 if the second Dispatch_Entry is greater in the order.
-
-
-void
-ACE_MUF_Scheduler_Strategy::sort (Dispatch_Entry **dispatch_entries, u_int size)
-{
- ::qsort ((void *) dispatch_entries,
- size,
- sizeof (Dispatch_Entry *),
- (COMP_FUNC) ACE_MUF_Scheduler_Strategy::sort_function);
-}
- // = sort the dispatch entry pointer array in descending urgency order
-
-
-ACE_MUF_Scheduler_Strategy::ACE_MUF_Scheduler_Strategy (
- ACE_Scheduler::Preemption_Priority minimum_critical_priority)
- :ACE_Scheduler_Strategy (minimum_critical_priority)
-{
-}
- // = default ctor
-
-ACE_MUF_Scheduler_Strategy::~ACE_MUF_Scheduler_Strategy ()
-{
-}
- // = virtual dtor
-
-long
-ACE_MUF_Scheduler_Strategy::dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time)
-{
- long laxity =
- entry.deadline () - current_time -
- entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- return (laxity > 0) ? LONG_MAX - laxity : laxity;
-}
- // = returns a dynamic subpriority value for the given entry and the
- // current time: if the operation has non-negative laxity, then the
- // value is positive, and a lower laxity gives a higher dynamic
- // subpriority; if the operation has negative laxity, the value
- // is the (negative) laxity value
-
-
-int
-ACE_MUF_Scheduler_Strategy::dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // order by descending dynamic priority according to ascending laxity
- u_long laxity1 =
- first_entry.deadline () - first_entry.arrival () -
- first_entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- u_long laxity2 =
- second_entry.deadline () - first_entry.arrival () -
- second_entry.task_entry ().rt_info ()->worst_case_execution_time;
-
-
- if (laxity1 < laxity2)
- {
- return -1;
- }
- else if (laxity1 > laxity2)
- {
- return 1;
- }
- else
- {
- return 0;
- }
-}
- // = orders of two dispatch entries by ascending laxity: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // 1 if the second Dispatch_Entry is greater in the order.
-
-
-int
-ACE_MUF_Scheduler_Strategy::sort_function (void *arg1, void *arg2)
-{
- return ACE_MUF_Scheduler_Strategy::instance ()->
- sort_comp (** ACE_static_cast (Dispatch_Entry **, arg1),
- ** ACE_static_cast (Dispatch_Entry **, arg2));
-}
- // comparison function to pass to qsort
-
-ACE_Scheduler::Preemption_Priority
-ACE_MUF_Scheduler_Strategy::minimum_critical_priority ()
-{
- return minimum_critical_priority_;
-}
- // = returns minimum critical priority number
-
-/////////////////////////////////////////////////////////////////////////
-// class ACE_RMS_Scheduler_Strategy static data member initializations //
-/////////////////////////////////////////////////////////////////////////
-
-ACE_RMS_Scheduler_Strategy * ACE_RMS_Scheduler_Strategy::instance_ = 0;
-
-///////////////////////////////////////////////////////
-// class ACE_RMS_Scheduler_Strategy member functions //
-///////////////////////////////////////////////////////
-
-ACE_RMS_Scheduler_Strategy *
-ACE_RMS_Scheduler_Strategy::instance ()
-{
- if (0 == ACE_RMS_Scheduler_Strategy::instance_)
- {
- ACE_NEW_RETURN (ACE_RMS_Scheduler_Strategy::instance_,
- ACE_RMS_Scheduler_Strategy, 0);
- }
-
- return ACE_RMS_Scheduler_Strategy::instance_;
-}
-
-int
-ACE_RMS_Scheduler_Strategy::priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // compare by decreasing dispatch period
- if ((first_entry.deadline () - first_entry.arrival ()) <
- (second_entry.deadline () - second_entry.arrival ()))
- {
- return -1;
- }
- else if ((first_entry.deadline () - first_entry.arrival ()) >
- (second_entry.deadline () - second_entry.arrival ()))
- {
- return 1;
- }
- else
- {
- return 0; // same priority level
- }
-}
- // = comparison of two dispatch entries by minimum period: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // or 1 if the second Dispatch_Entry is greater in the order.
-
-void
-ACE_RMS_Scheduler_Strategy::sort (
- Dispatch_Entry **dispatch_entries_, u_int size)
-{
- ::qsort ((void *) dispatch_entries_,
- size,
- sizeof (Dispatch_Entry *),
- (COMP_FUNC) ACE_RMS_Scheduler_Strategy::sort_function);
-}
- // = sort the dispatch entry pointer array in descending RMS (rate) order
-
-ACE_RMS_Scheduler_Strategy::ACE_RMS_Scheduler_Strategy (
- ACE_Scheduler::Preemption_Priority minimum_critical_priority)
- :ACE_Scheduler_Strategy (minimum_critical_priority)
-{
-}
- // = default ctor
-
-ACE_RMS_Scheduler_Strategy::~ACE_RMS_Scheduler_Strategy ()
-{
-}
- // = virtual dtor
-
-long
-ACE_RMS_Scheduler_Strategy::dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time)
-{
- return 0;
-}
- // = all entries have the same dynamic subpriority value
-
-int
-ACE_RMS_Scheduler_Strategy::dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- return 0;
-}
- // = all tasks in a given priority level have the same dynamic
- // subpriority under RMS
-
-
-int
-ACE_RMS_Scheduler_Strategy::sort_function (void *arg1, void *arg2)
-{
- return ACE_RMS_Scheduler_Strategy::instance ()->
- sort_comp (** ACE_static_cast (Dispatch_Entry **, arg1),
- ** ACE_static_cast (Dispatch_Entry **, arg2));
-}
- // comparison function to pass to qsort
-
-
-ACE_Scheduler::Preemption_Priority
-ACE_RMS_Scheduler_Strategy::minimum_critical_priority ()
-{
- return minimum_critical_priority_;
-}
- // = returns minimum critical priority number
-
-/////////////////////////////////////////////////////////////////////////
-// class ACE_MLF_Scheduler_Strategy static data member initializations //
-/////////////////////////////////////////////////////////////////////////
-
-ACE_MLF_Scheduler_Strategy * ACE_MLF_Scheduler_Strategy::instance_ = 0;
-
-///////////////////////////////////////////////////////
-// class ACE_MLF_Scheduler_Strategy member functions //
-///////////////////////////////////////////////////////
-
-ACE_MLF_Scheduler_Strategy *
-ACE_MLF_Scheduler_Strategy::instance ()
-{
- if (0 == ACE_MLF_Scheduler_Strategy::instance_)
- {
- ACE_NEW_RETURN (ACE_MLF_Scheduler_Strategy::instance_,
- ACE_MLF_Scheduler_Strategy, 0);
- }
-
- return ACE_MLF_Scheduler_Strategy::instance_;
-}
-
-int
-ACE_MLF_Scheduler_Strategy::priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- return 0;
-}
- // = just returns 0, as all dispatch entries are of equivalent priority under MLF.
-
-void
-ACE_MLF_Scheduler_Strategy::sort (
- Dispatch_Entry **dispatch_entries_, u_int size)
-{
- ::qsort ((void *) dispatch_entries_,
- size,
- sizeof (Dispatch_Entry *),
- (COMP_FUNC) ACE_MLF_Scheduler_Strategy::sort_function);
-}
- // = sort the dispatch entry pointer array in ascending laxity order
-
-
-ACE_MLF_Scheduler_Strategy::ACE_MLF_Scheduler_Strategy (
- ACE_Scheduler::Preemption_Priority minimum_critical_priority)
- :ACE_Scheduler_Strategy (0)
-{
-}
- // = default ctor
-
-ACE_MLF_Scheduler_Strategy::~ACE_MLF_Scheduler_Strategy ()
-{
-}
- // = virtual dtor
-
-
-long
-ACE_MLF_Scheduler_Strategy::dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time)
-{
- long laxity =
- entry.deadline () - current_time -
- entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- return (laxity > 0) ? LONG_MAX - laxity : laxity;
-}
- // = returns a dynamic subpriority value for the given entry and the
- // current time relative to its arrival
-
-int
-ACE_MLF_Scheduler_Strategy::dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // order by laxity (ascending)
- // order by descending dynamic priority according to ascending laxity
- u_long laxity1 =
- first_entry.deadline () - first_entry.arrival () -
- first_entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- u_long laxity2 =
- second_entry.deadline () - first_entry.arrival () -
- second_entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- if (laxity1 < laxity2)
- {
- return -1;
- }
- else if (laxity1 > laxity2)
- {
- return 1;
- }
- else
- {
- return 0;
- }
-}
- // = orders two dispatch entries by ascending laxity: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // or 1 if the second Dispatch_Entry is greater in the order.
-
-
-int
-ACE_MLF_Scheduler_Strategy::sort_function (void *arg1, void *arg2)
-{
- return ACE_MLF_Scheduler_Strategy::instance ()->
- sort_comp (** ACE_static_cast (Dispatch_Entry **, arg1),
- ** ACE_static_cast (Dispatch_Entry **, arg2));
-}
- // comparison function to pass to qsort
-
-
-/////////////////////////////////////////////////////////////////////////
-// class ACE_EDF_Scheduler_Strategy static data member initializations //
-/////////////////////////////////////////////////////////////////////////
-
-ACE_EDF_Scheduler_Strategy * ACE_EDF_Scheduler_Strategy::instance_ = 0;
-
-///////////////////////////////////////////////////////
-// class ACE_EDF_Scheduler_Strategy member functions //
-///////////////////////////////////////////////////////
-
-ACE_EDF_Scheduler_Strategy *
-ACE_EDF_Scheduler_Strategy::instance ()
-{
- if (0 == ACE_EDF_Scheduler_Strategy::instance_)
- {
- ACE_NEW_RETURN (ACE_EDF_Scheduler_Strategy::instance_,
- ACE_EDF_Scheduler_Strategy, 0);
- }
-
- return ACE_EDF_Scheduler_Strategy::instance_;
-}
-
-
-int
-ACE_EDF_Scheduler_Strategy::priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- return 0;
-}
- // = just returns 0, as all dispatch entries are of equivalent priority under EDF.
-
-void
-ACE_EDF_Scheduler_Strategy::sort (
- Dispatch_Entry **dispatch_entries_, u_int size)
-{
- ::qsort ((void *) dispatch_entries_,
- size,
- sizeof (Dispatch_Entry *),
- (COMP_FUNC) ACE_EDF_Scheduler_Strategy::sort_function);
-}
- // = sort the dispatch entry pointer array in ascending deadline (period) order
-
-
-ACE_EDF_Scheduler_Strategy::ACE_EDF_Scheduler_Strategy (
- ACE_Scheduler::Preemption_Priority minimum_critical_priority)
- :ACE_Scheduler_Strategy (0)
-{
-}
- // = default ctor
-
-ACE_EDF_Scheduler_Strategy::~ACE_EDF_Scheduler_Strategy ()
-{
-}
- // = virtual dtor
-
-long
-ACE_EDF_Scheduler_Strategy::dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time)
-{
- long time_to_deadline = entry.deadline () - current_time;
- return (time_to_deadline > 0)
- ? LONG_MAX - time_to_deadline : time_to_deadline;
-}
- // = returns a dynamic subpriority value for the given entry and the
- // current time relative to its arrival
-
-int
-ACE_EDF_Scheduler_Strategy::dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // order by dispatchable interval (ascending)
- if (first_entry.deadline () - first_entry.arrival () <
- second_entry.deadline () - first_entry.arrival ())
- {
- return -1;
- }
- else if (first_entry.deadline () - first_entry.arrival () >
- second_entry.deadline () - first_entry.arrival ())
- {
- return 1;
- }
- else
- {
- return 0;
- }
-}
- // = orders two dispatch entries by ascending time to deadline: returns -1 if
- // the first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // or 1 if the second Dispatch_Entry is greater in the order.
-
-
-int
-ACE_EDF_Scheduler_Strategy::sort_function (void *arg1, void *arg2)
-{
- return ACE_EDF_Scheduler_Strategy::instance ()->
- sort_comp (** ACE_static_cast (Dispatch_Entry **, arg1),
- ** ACE_static_cast (Dispatch_Entry **, arg2));
-}
- // comparison function to pass to qsort
-
-/////////////////////////////////////////////////////////////////////////////
-// class ACE_RMS_Dyn_Scheduler_Strategy static data member initializations //
-/////////////////////////////////////////////////////////////////////////////
-
-ACE_RMS_Dyn_Scheduler_Strategy * ACE_RMS_Dyn_Scheduler_Strategy::instance_ = 0;
-
-///////////////////////////////////////////////////////////
-// class ACE_RMS_Dyn_Scheduler_Strategy member functions //
-///////////////////////////////////////////////////////////
-
-ACE_RMS_Dyn_Scheduler_Strategy *
-ACE_RMS_Dyn_Scheduler_Strategy::instance ()
-{
- if (0 == ACE_RMS_Dyn_Scheduler_Strategy::instance_)
- {
- ACE_NEW_RETURN (ACE_RMS_Dyn_Scheduler_Strategy::instance_,
- ACE_RMS_Dyn_Scheduler_Strategy, 0);
- }
-
- return ACE_RMS_Dyn_Scheduler_Strategy::instance_;
-}
-
-
-int
-ACE_RMS_Dyn_Scheduler_Strategy::priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- if ((first_entry.task_entry ().rt_info ()->criticality >=
- RtecScheduler::HIGH_CRITICALITY) &&
- (second_entry.task_entry ().rt_info ()->criticality >=
- RtecScheduler::HIGH_CRITICALITY))
- {
- // if they're both in the high criticality bracket,
- // order by dispatch period as in RMS scheduling
- if ((first_entry.deadline () - first_entry.arrival ()) <
- (second_entry.deadline () - second_entry.arrival ()))
- {
- return -1;
- }
- else if ((first_entry.deadline () - first_entry.arrival ()) >
- (second_entry.deadline () - second_entry.arrival ()))
- {
- return 1;
- }
-
- return 0; // same priority level
- }
- else if ((first_entry.task_entry ().rt_info ()->criticality <
- RtecScheduler::HIGH_CRITICALITY) &&
- (second_entry.task_entry ().rt_info ()->criticality <
- RtecScheduler::HIGH_CRITICALITY))
- {
- // if they're both in the low criticality bracket, they have the same priority
- return 0;
- }
-
- // they're in different criticality brackets: order by criticality (descending)
- return (first_entry.task_entry ().rt_info ()->criticality >
- second_entry.task_entry ().rt_info ()->criticality)
- ? -1 : 1;
-}
- // = comparison of two dispatch entries by maximum criticality: returns -1
- // if the first Dispatch_Entry is greater in the order, 0 if they're
- // equivalent, or 1 if the second Dispatch_Entry is greater in the order.
-
-
-void
-ACE_RMS_Dyn_Scheduler_Strategy::sort (
- Dispatch_Entry **dispatch_entries_, u_int size)
-{
- ::qsort ((void *) dispatch_entries_,
- size,
- sizeof (Dispatch_Entry *),
- (COMP_FUNC) ACE_RMS_Dyn_Scheduler_Strategy::sort_function);
-}
- // = sort the dispatch entry pointer array in descending priority order
-
-
-ACE_RMS_Dyn_Scheduler_Strategy::ACE_RMS_Dyn_Scheduler_Strategy (
- ACE_Scheduler::Preemption_Priority minimum_critical_priority)
- :ACE_Scheduler_Strategy (minimum_critical_priority)
-{
-}
- // = default ctor
-
-ACE_RMS_Dyn_Scheduler_Strategy::~ACE_RMS_Dyn_Scheduler_Strategy ()
-{
-}
- // = virtual dtor
-
-long
-ACE_RMS_Dyn_Scheduler_Strategy::dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time)
-{
- if (entry.task_entry ().rt_info ()->criticality <
- RtecScheduler::HIGH_CRITICALITY)
- {
- long laxity =
- entry.deadline () - current_time -
- entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- return (laxity > 0) ? LONG_MAX - laxity : laxity;
- }
-
- return 0;
-}
- // = returns a dynamic subpriority value for the given entry and the
- // current time relative to its arrival
-
-int
-ACE_RMS_Dyn_Scheduler_Strategy::dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry)
-{
- // if either is in the high criticality bracket, we do not
- // distinguish between them on the basis of dynamic subpriority
- if ((first_entry.task_entry ().rt_info ()->criticality >=
- RtecScheduler::HIGH_CRITICALITY) ||
- (second_entry.task_entry ().rt_info ()->criticality >=
- RtecScheduler::HIGH_CRITICALITY))
- {
- // for HIGH_CRITICALITY and VERY_HIGH_CRITICALITY, all
- // entries have the same dynamic subpriority as in RMS
- return 0;
- }
- else
- {
- // for VERY_LOW_CRITICALITY, LOW_CRITICALITY and MEDIUM_CRITICALITY,
- // order second by laxity (ascending)
- u_long laxity1 =
- first_entry.deadline () - first_entry.arrival () -
- first_entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- u_long laxity2 =
- second_entry.deadline () - first_entry.arrival () -
- second_entry.task_entry ().rt_info ()->worst_case_execution_time;
-
- if (laxity1 < laxity2)
- {
- return -1;
- }
- else if (laxity1 > laxity2)
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
-}
- // = comparison of two dispatch entries within the very high and high
- // criticality sets by minimum period (RMS) or of two dispatch entries
- // within the medium, low, and very low criticality sets by minimum
- // laxity: returns -1 if the first Dispatch_Entry is greater in the order,
- // 0 if they're equivalent, or 1 if the second Dispatch_Entry is greater
- // in the order.
-
-int
-ACE_RMS_Dyn_Scheduler_Strategy::sort_function (void *arg1, void *arg2)
-{
- return ACE_RMS_Dyn_Scheduler_Strategy::instance ()->
- sort_comp (** ACE_static_cast (Dispatch_Entry **, arg1),
- ** ACE_static_cast (Dispatch_Entry **, arg2));
-}
- // comparison function to pass to qsort
-
-
-ACE_Scheduler::Preemption_Priority
-ACE_RMS_Dyn_Scheduler_Strategy::minimum_critical_priority ()
-{
- return minimum_critical_priority_;
-}
- // = returns 0 for minimum critical priority number
-
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node<Dispatch_Entry *>;
-template class ACE_Unbounded_Set<Dispatch_Entry *>;
-template class ACE_Unbounded_Set_Iterator<Dispatch_Entry *>;
-template class ACE_Strategy_Scheduler_Factory<ACE_MUF_Scheduler_Strategy>;
-template class ACE_Strategy_Scheduler_Factory<ACE_RMS_Scheduler_Strategy>;
-template class ACE_Strategy_Scheduler_Factory<ACE_MLF_Scheduler_Strategy>;
-template class ACE_Strategy_Scheduler_Factory<ACE_EDF_Scheduler_Strategy>;
-template class ACE_Strategy_Scheduler_Factory<ACE_RMS_Dyn_Scheduler_Strategy>;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-// EOF
-
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h b/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h
deleted file mode 100644
index 8a6bb2f3b15..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h
+++ /dev/null
@@ -1,474 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Strategy_Scheduler.h
-//
-// = CREATION DATE
-// 22 December 1997
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#if ! defined (STRATEGY_SCHEDULER_H)
-#define STRATEGY_SCHEDULER_H
-
-#include "DynSched.h"
-
-// forward declaration of the abstract base class for scheduler strategies
-class ACE_Scheduler_Strategy;
-
-/////////////////////////////////
-// Strategized scheduler class //
-/////////////////////////////////
-
-class TAO_ORBSVCS_Export ACE_Strategy_Scheduler : public ACE_Scheduler
- // = TITLE
- // ACE_Strategy_Scheduler
- //
- // = DESCRIPTION
- // Strategized scheduler implementation. Provides an implementation
- // of all strategy specific scheduling mechanisms, which relies on the
- // methods of the associated strategy class.
-{
-// public interface
-public:
-
- ACE_Strategy_Scheduler (ACE_Scheduler_Strategy &strategy);
- // = strategized ctor
-
- virtual ~ACE_Strategy_Scheduler ();
- // = virtual dtor
-
- status_t assign_priorities (Dispatch_Entry **dispatches, u_int count);
- // = assigns priorities to the sorted dispatch schedule,
- // according to the strategy's priority comparison operator.
-
- status_t assign_subpriorities (Dispatch_Entry **dispatches, u_int count);
- // = assigns dynamic and static sub-priorities to the sorted dispatch
- // schedule, according to the strategy's subpriority comparisons.
-
- virtual Preemption_Priority minimum_critical_priority ();
- // = determine the minimum critical priority number
-
-private:
-
- virtual status_t schedule_timeline_entry (Dispatch_Entry &dispatch_entry,
- ACE_Unbounded_Queue <Dispatch_Entry *>
- &reschedule_queue);
- // = schedules a dispatch entry into the timeline being created
-
- virtual status_t sort_dispatches (Dispatch_Entry **dispatches, u_int count);
- // = sets up the schedule in the order generated by the strategy
-
- ACE_Scheduler_Strategy &strategy_;
- // = strategy for comparison, sorting of dispatch entries
-
- ACE_UNIMPLEMENTED_FUNC (ACE_Strategy_Scheduler (const ACE_Strategy_Scheduler &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Strategy_Scheduler &operator= (
- const ACE_Strategy_Scheduler &))
-};
-
-
-
-////////////////////////////////////////
-// Factory for strategized schedulers //
-////////////////////////////////////////
-
-template <class STRATEGY>
-class ACE_Strategy_Scheduler_Factory
- // = TITLE
- // ACE_Strategy_Scheduler_Factory
- //
- // = DESCRIPTION
- // Provides a type parameterized factory method that constructs
- // and returns a scheduler that uses the given scheduling strategy
-{
-public:
-
- static ACE_Strategy_Scheduler * create (ACE_Scheduler::Preemption_Priority minimum_critical_priority);
- // construct and return a scheduler strategized with
- // an instance of the the parameterized strategy type
-};
-
-
-//////////////////////////
-// Scheduler Strategies //
-//////////////////////////
-
-class TAO_ORBSVCS_Export ACE_Scheduler_Strategy
- // = TITLE
- // ACE_Scheduler_Strategy
- //
- // = DESCRIPTION
- // Abstract Base Class for scheduling strategies: each derived class
- // must define an ordering strategy for dispatch entries based on a specific
- // scheduling algorithm.
-{
-public:
-
- ACE_Scheduler_Strategy (ACE_Scheduler::Preemption_Priority minimum_critical_priority = 0);
- // ctor
-
- virtual int priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry) = 0;
- // = comparison of two dispatch entries in strategy specific high to low priority
- // ordering: returns -1 if the first Dispatch_Entry is greater in the order,
- // 0 if they are equivalent, or 1 if the second Dispatch_Entry is greater in
- // the order
-
- virtual void sort (Dispatch_Entry **dispatch_entries,
- u_int count) = 0;
- // = sort the dispatch entry link pointer array according to
- // the specific sort order defined by the strategy
-
- virtual ACE_Scheduler::Preemption_Priority minimum_critical_priority ();
- // = determine the minimum critical priority number
-
- virtual int dynamic_subpriority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry) = 0;
- // = comparison of two dispatch entries in strategy specific high to low
- // dynamic subpriority ordering: returns -1 if the first Dispatch_Entry
- // is greater in the order, 0 if they are equivalent, or 1 if the
- // second Dispatch_Entry is greater in the order
-
- virtual long dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time) = 0;
- // = returns a dynamic subpriority value
- // for the given timeline entry at the current time
-
- virtual int static_subpriority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = provide a lowest level ordering based first on importance (descending),
- // and then on the dependency topological sort finishing time (ascending).
-
-
-protected:
-
- int sort_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = comparison of two dispatch entries using the specific priority, dynamic
- // subpriority, and static subpriority method definitions provided by
- // the derived strategy class to produce the strategy specific sort
- // ordering: returns -1 if the first Dispatch_Entry is greater in the order,
- // 0 if they are equivalent, or 1 if the second Dispatch_Entry is greater in
- // the order. This is an example of the Template Method pattern (and also
- // of Pree's Unification Metapattern), in which derived classes provide
- // definitions of the methods on which the sort_comp Template Method relies.
-
- ACE_Scheduler::Preemption_Priority minimum_critical_priority_;
- // = the minimum critical priority number for the strategy
-};
-
-
-
-class TAO_ORBSVCS_Export ACE_MUF_Scheduler_Strategy : public ACE_Scheduler_Strategy
- // = TITLE
- // ACE_MUF_Scheduler_Strategy
- //
- // = DESCRIPTION
- // Defines "schedule" method using Maximum Urgency First
- // scheduling algorithm.
-{
-public:
-
- ACE_MUF_Scheduler_Strategy (ACE_Scheduler::Preemption_Priority minimum_critical_priority = 0);
- // ctor
-
- virtual ~ACE_MUF_Scheduler_Strategy ();
- // = virtual dtor
-
-
- static ACE_MUF_Scheduler_Strategy *instance ();
- // returns an instance of the strategy
-
- virtual int priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = comparison of two dispatch entries by maximum criticality: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent, or
- // 1 if the second Dispatch_Entry is greater in the order.
-
- virtual void sort (Dispatch_Entry **dispatch_entries,
- u_int count);
- // = sort the dispatch entry link pointer array in descending urgency order
-
- virtual ACE_Scheduler::Preemption_Priority minimum_critical_priority ();
- // = determine the minimum critical priority number
-
-protected:
-
- virtual long dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time);
- // = returns a dynamic subpriority value at the current time for
- // the given timeline entry: if the operation has
- // non-negative laxity, then the value is positive, and a lower
- // laxity gives a higher dynamic subpriority; if the operation
- // has negative laxity, the value is the (negative) laxity value
-
- virtual int dynamic_subpriority_comp (
- const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = orders of two dispatch entries by ascending laxity: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // 1 if the second Dispatch_Entry is greater in the order.
-
-private:
-
- static int sort_function (void *arg1, void *arg2);
- // comparison function to pass to qsort: calls instance ()->sort_comp ();
-
- static ACE_MUF_Scheduler_Strategy *instance_;
- // instance of the strategy
-};
-
-
-class TAO_ORBSVCS_Export ACE_RMS_Scheduler_Strategy : public ACE_Scheduler_Strategy
- // = TITLE
- // ACE_RMS_Scheduler_Strategy
- //
- // = DESCRIPTION
- // Defines "schedule" method using Rate Monotonic
- // Scheduling algorithm.
-{
-public:
-
- ACE_RMS_Scheduler_Strategy (ACE_Scheduler::Preemption_Priority minimum_critical_priority = 0);
- // ctor
-
- virtual ~ACE_RMS_Scheduler_Strategy ();
- // = virtual dtor
-
- static ACE_RMS_Scheduler_Strategy *instance ();
- // returns an instance of the strategy
-
- virtual int priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = comparison of two dispatch entries by minimum period: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // or 1 if the second Dispatch_Entry is greater in the order.
-
- virtual void sort (Dispatch_Entry **dispatch_entries,
- u_int count);
- // = sort the dispatch entry link pointer array in descending RMS (rate) order
-
- virtual ACE_Scheduler::Preemption_Priority minimum_critical_priority ();
- // = determine the minimum critical priority number
-
-protected:
-
- virtual long dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time);
- // = just returns 0: all operations have
- // the same dynamic subpriority value
-
- virtual int dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = all dispatches in a given priority level have the same dynamic
- // subpriority under RMS: just returns 0
-
-private:
-
- static int sort_function (void *arg1, void *arg2);
- // comparison function to pass to qsort: calls instance ()->sort_comp ();
-
- static ACE_RMS_Scheduler_Strategy *instance_;
- // instance of the strategy
-
-};
-
-
-
-
-
-class TAO_ORBSVCS_Export ACE_MLF_Scheduler_Strategy : public ACE_Scheduler_Strategy
- // = TITLE
- // ACE_MLF_Scheduler_Strategy
- //
- // = DESCRIPTION
- // Defines "schedule" method using Minimum Laxity First
- // scheduling algorithm.
-{
-public:
-
- ACE_MLF_Scheduler_Strategy (ACE_Scheduler::Preemption_Priority minimum_critical_priority = 0);
- // = ctor
-
- virtual ~ACE_MLF_Scheduler_Strategy ();
- // = virtual dtor
-
- static ACE_MLF_Scheduler_Strategy *instance ();
- // returns an instance of the strategy
-
- virtual int priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = just returns 0, as all dispatch entries are of equivalent priority under MLF.
-
- virtual void sort (Dispatch_Entry **dispatch_entries,
- u_int count);
- // = sort the dispatch entry link pointer array in ascending laxity order
-
-protected:
-
- virtual long dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time);
- // = returns a dynamic subpriority value at the current time for
- // the given timeline entry: if the operation has
- // non-negative laxity, then the value is positive, and a lower
- // laxity gives a higher dynamic subpriority; if the operation
- // has negative laxity, the value is the (negative) laxity value
-
- virtual int dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = orders two dispatch entries by ascending laxity: returns -1 if the
- // first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // or 1 if the second Dispatch_Entry is greater in the order.
-
-private:
-
- static int sort_function (void *arg1, void *arg2);
- // comparison function to pass to qsort: calls instance ()->sort_comp ();
-
- static ACE_MLF_Scheduler_Strategy *instance_;
- // instance of the strategy
-
-};
-
-
-class TAO_ORBSVCS_Export ACE_EDF_Scheduler_Strategy : public ACE_Scheduler_Strategy
- // = TITLE
- // ACE_EDF_Scheduler_Strategy
- //
- // = DESCRIPTION
- // Defines "schedule" method using Earliest Deadline First
- // scheduling algorithm.
-{
-public:
-
- ACE_EDF_Scheduler_Strategy (ACE_Scheduler::Preemption_Priority minimum_critical_priority = 0);
- // = default ctor
-
- virtual ~ACE_EDF_Scheduler_Strategy ();
- // = virtual dtor
-
- static ACE_EDF_Scheduler_Strategy *instance ();
- // returns an instance of the strategy
-
- virtual int priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = returns 0, as all dispatch entries are of equivalent priority under EDF.
-
- virtual void sort (Dispatch_Entry **dispatch_entries,
- u_int count);
- // = sort the dispatch entry link pointer array in ascending deadline (period) order
-
-protected:
-
- virtual long dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time);
- // = returns a dynamic subpriority value at the current time for the
- // given timeline entry: if the operation has non-negative
- // time to deadline, then value is positive, and a shorter time to
- // deadline gives a higher dynamic subpriority; if the operation has a
- // negative time to deadline, the value is (negative) time to deadline
-
-
- virtual int dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = orders two dispatch entries by ascending time to deadline: returns -1 if
- // the first Dispatch_Entry is greater in the order, 0 if they're equivalent,
- // or 1 if the second Dispatch_Entry is greater in the order.
-
-private:
-
- static int sort_function (void *arg1, void *arg2);
- // comparison function to pass to qsort: calls instance ()->sort_comp ();
-
- static ACE_EDF_Scheduler_Strategy *instance_;
- // instance of the strategy
-
-};
-
-
-class TAO_ORBSVCS_Export ACE_RMS_Dyn_Scheduler_Strategy : public ACE_Scheduler_Strategy
- // = TITLE
- // ACE_RMS_Dyn_Scheduler_Strategy
- //
- // = DESCRIPTION
- // Defines "schedule" method using Rate Monotonic priority assignment for
- // the critical set, single priority for the dynamic (non-critical) set.
-{
-public:
-
- ACE_RMS_Dyn_Scheduler_Strategy (ACE_Scheduler::Preemption_Priority minimum_critical_priority = 0);
- // = ctor
-
- virtual ~ACE_RMS_Dyn_Scheduler_Strategy ();
- // = virtual dtor
-
- static ACE_RMS_Dyn_Scheduler_Strategy *instance ();
- // returns an instance of the strategy
-
- virtual int priority_comp (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = comparison of two dispatch entries by maximum criticality: returns -1
- // if the first Dispatch_Entry is greater in the order, 0 if they're
- // equivalent, or 1 if the second Dispatch_Entry is greater in the order.
-
- virtual void sort (Dispatch_Entry **dispatch_entries,
- u_int count);
- // = sort the dispatch entry pointer array in descending priority order
-
- virtual ACE_Scheduler::Preemption_Priority minimum_critical_priority ();
- // = determine the minimum critical priority number
-
-protected:
-
- virtual long dynamic_subpriority (Dispatch_Entry &entry,
- u_long current_time);
- // = returns a dynamic subpriority value at the current time for the
- // given timeline entry: if the operation is in the
- // critical set, the dynamic subpriority value is always 0; if the
- // operation is non-critical and has non-negative laxity, then the
- // dynamic subpriority value is positive, and a lower laxity gives a
- // higher dynamic subpriority if the operation is non-critical and has
- // negative laxity, the value is the (negative) laxity value
-
-
- virtual int dynamic_subpriority_comp
- (const Dispatch_Entry &first_entry,
- const Dispatch_Entry &second_entry);
- // = comparison of two dispatch entries within the very high and high
- // criticality sets by minimum period (RMS) or of two dispatch entries
- // within the medium, low, and very low criticality sets by minimum
- // laxity: returns -1 if the first Dispatch_Entry is greater in the order,
- // 0 if they're equivalent, or 1 if the second Dispatch_Entry is greater
- // in the order.
-
-private:
-
- static int sort_function (void *arg1, void *arg2);
- // comparison function to pass to qsort: calls instance ()->sort_comp ();
-
- static ACE_RMS_Dyn_Scheduler_Strategy *instance_;
- // instance of the strategy
-
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "Strategy_Scheduler.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* STRATEGY_SCHEDULER_H */
-
-// EOF
diff --git a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.i b/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.i
deleted file mode 100644
index c84e9e2da77..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.i
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-//
-// ============================================================================
-//
-// = LIBRARY
-// sched
-//
-// = FILENAME
-// Strategy_Scheduler.i
-//
-// = CREATION DATE
-// 22 December 1997
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-
-// EOF
-
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
deleted file mode 100644
index b6abd44a072..00000000000
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
+++ /dev/null
@@ -1,251 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#include "ace/OS.h"
-
-#include "orbsvcs/Runtime_Scheduler.h"
-#include "orbsvcs/Scheduler_Factory.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "orbsvcs/Scheduler_Factory.i"
-#endif /* __ACE_INLINE__ */
-
-RtecScheduler::Scheduler_ptr ACE_Scheduler_Factory::server_ = 0;
-
-static int entry_count = -1;
-static ACE_Scheduler_Factory::POD_RT_Info* rt_info = 0;
-
-int ACE_Scheduler_Factory::use_runtime (int ec,
- POD_RT_Info rti[])
-{
- if (server_ != 0 || entry_count != -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Scheduler_Factory::use_runtime - "
- "server already configured\n"), -1);
- }
-
- entry_count = ec;
- rt_info = rti;
-
- return 0;
-}
-
-RtecScheduler::Scheduler_ptr static_server ()
-{
- RtecScheduler::Scheduler_ptr server_ = 0;
-
- typedef RtecScheduler::RT_Info* RT_Info_ptr;
- RtecScheduler::RT_Info** info;
- ACE_NEW_RETURN (info, RT_Info_ptr[entry_count], 0);
- for (int i = 0; i < entry_count; ++i)
- {
- info[i] = new RtecScheduler::RT_Info;
- if (info[i] == 0)
- {
- for (int j = 0; j < i; ++j)
- {
- delete info[i];
- }
- delete[] info;
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Scheduler_Factory::config_runtime - "
- "cannot allocate RT_Info\n"), 0);
- }
- info[i]->entry_point = rt_info[i].entry_point;
- info[i]->handle = rt_info[i].handle;
- info[i]->worst_case_execution_time = rt_info[i].worst_case_execution_time;
- info[i]->typical_execution_time = rt_info[i].typical_execution_time;
- info[i]->cached_execution_time = rt_info[i].cached_execution_time;
- info[i]->period = rt_info[i].period;
- info[i]->importance = rt_info[i].importance;
- info[i]->quantum = rt_info[i].quantum;
- info[i]->threads = rt_info[i].threads;
- info[i]->priority = rt_info[i].priority;
- info[i]->subpriority = rt_info[i].subpriority;
- info[i]->preemption_priority = rt_info[i].preemption_priority;
- }
- static ACE_Runtime_Scheduler scheduler(entry_count, info);
- TAO_TRY
- {
- server_ = scheduler._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG,
- "ACE_Scheduler_Factory - configured static server\n"));
- }
- TAO_CATCHANY
- {
- for (int i = 0; i < entry_count; ++i)
- {
- delete info[i];
- }
- delete[] info;
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Scheduler_Factory::config_runtime - "
- "cannot allocate server\n"), 0);
- }
- TAO_ENDTRY;
- return server_;
-}
-
-int
-ACE_Scheduler_Factory::use_config (CosNaming::NamingContext_ptr naming)
-{
- if (server_ != 0 || entry_count != -1)
- {
- // No errors, runtime execution simply takes precedence over
- // config runs.
- return 0;
- }
-
- TAO_TRY
- {
- CosNaming::Name schedule_name (1);
- schedule_name[0].id = CORBA::string_dup ("ScheduleService");
- schedule_name.length (1);
- CORBA::Object_ptr objref =
- naming->resolve (schedule_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- server_ =
- RtecScheduler::Scheduler::_narrow(objref, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecScheduler::Scheduler::_duplicate (server_);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- server_ = 0;
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Scheduler_Factory::use_context - "
- " exception while resolving server\n"), -1);
- }
- TAO_ENDTRY;
- return 0;
-}
-
-int
-ACE_Scheduler_Factory::use_config (CORBA::ORB_ptr orb)
-{
- if (server_ != 0 || entry_count != -1)
- {
- // No errors, runtime execution simply takes precedence over
- // config runs.
- return 0;
- }
-
- TAO_TRY
- {
- CORBA::Object_ptr objref =
- orb->resolve_initial_references ("ScheduleService");
- TAO_CHECK_ENV;
-
- server_ =
- RtecScheduler::Scheduler::_narrow(objref, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecScheduler::Scheduler::_duplicate (server_);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- server_ = 0;
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Scheduler_Factory::use_context - "
- " exception while resolving server\n"), -1);
- }
- TAO_ENDTRY;
- return 0;
-}
-
-
-RtecScheduler::Scheduler_ptr
-ACE_Scheduler_Factory::server (void)
-{
- if (server_ == 0 && entry_count != -1)
- {
- server_ = static_server ();
- }
-
- if (server_ == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Scheduler_Factor::server - "
- "no scheduling service configured\n"), 0);
- }
- return server_;
-}
-
-static char header[] =
-"// This file was automatically generated by Scheduler_Factory\n"
-"// before editing the file please consider generating it again\n"
-"\n"
-"#include \"orbsvcs/Scheduler_Factory.h\"\n"
-"\n";
-
-static char footer[] =
-"\n"
-"// This setups Scheduler_Factory to use the runtime version\n"
-"static int scheduler_factory_setup = \n"
-" ACE_Scheduler_Factory::use_runtime (sizeof (infos)/sizeof (infos[0]),\n"
-" infos);\n"
-"\n"
-"// EOF\n";
-
-static char start_infos[] =
-"static ACE_Scheduler_Factory::POD_RT_Info infos[] = {\n";
-
-static char end_infos[] =
-"};\n";
-
-int ACE_Scheduler_Factory::dump_schedule
- (const RtecScheduler::RT_Info_Set& infos,
- const char* filename)
-{
- FILE* file = stdout;
- if (filename != 0)
- {
- file = ACE_OS::fopen (filename, "w");
- if (file == 0)
- {
- return -1;
- }
- }
- ACE_OS::fprintf(file, header);
-
- ACE_OS::fprintf(file, start_infos);
- for (u_int i = 0; i < infos.length (); ++i)
- {
- if (i != 0)
- {
- // Finish previous line
- ACE_OS::fprintf(file, ",\n");
- }
- const RtecScheduler::RT_Info& info = infos[i];
- ACE_OS::fprintf (file,
-"{ \"%s\", %d, %f, %f, %f, %d, %d, %f, %d, %d, %d, %d }",
- (const char*)info.entry_point,
- info.handle,
- info.worst_case_execution_time,
- info.typical_execution_time,
- info.cached_execution_time,
- info.period,
- info.importance,
- info.quantum,
- info.threads,
- info.priority,
- info.subpriority,
- info.preemption_priority);
- }
- // finish last line.
- ACE_OS::fprintf(file, "\n");
- ACE_OS::fprintf(file, end_infos);
- ACE_OS::fprintf(file, footer);
- ACE_OS::fclose (file);
- return 0;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h
deleted file mode 100644
index b5cf28d4ae6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#ifndef ACE_SCHEDULER_FACTORY_H
-#define ACE_SCHEDULER_FACTORY_H
-
-#include "ace/OS.h"
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/RtecSchedulerC.h"
-
-class TAO_ORBSVCS_Export ACE_Scheduler_Factory
- // = TITLE
- // Factory of scheduler services.
- //
- // = DESCRIPTION
- // This class acts as a factory for scheduler servers. At config
- // time it will return a remote server, which will actually
- // compute the scheduling parameters. At run-time it returns a
- // local server, which will use the results of the config runs to
- // actually do the scheduling, without incurring in RPC overheads.
-{
-public:
- struct POD_RT_Info
- // = TITLE
- // Plain Old Data for RT_Infos.
- //
- // = DESCRIPTION
- // This class provide us with a plain old data version of
- // RT_Info, this is useful for implementing static arrays or of
- // those.
- {
- const char* entry_point;
- RtecScheduler::handle_t handle;
- RtecScheduler::Time worst_case_execution_time;
- RtecScheduler::Time typical_execution_time;
- RtecScheduler::Time cached_execution_time;
- RtecScheduler::Period period;
- RtecScheduler::Importance importance;
- RtecScheduler::Quantum quantum;
- CORBA::Long threads;
- RtecScheduler::OS_Priority priority;
- RtecScheduler::Sub_Priority subpriority;
- RtecScheduler::Preemption_Priority preemption_priority;
- };
-
- static int use_config (CosNaming::NamingContext_ptr naming);
- // Setup the variables needed for a config run, using the
- // NamingContext to locate a Scheduler.
-
- static int use_config (CORBA::ORB_ptr orb);
- // Setup the variable needed for a config run, using an environment
- // variable to locate a Scheduler.
-
- static int use_runtime (int entry_count,
- POD_RT_Info rt_info[]);
- // Disable config runs in the Factory and setups the precomputed
- // scheduling.
-
- static RtecScheduler::Scheduler_ptr server (void);
- // Return the Real-time Scheduling Service used for this run.
- // Must have been configured either using use_context() or use_data().
- //
- // Normally use_data() is called at static elaboration time, so
- // everything is automatic.
- // On config runs use_context() is called from main, after
- // resolve_initial_references.
-
- static int dump_schedule (const RtecScheduler::RT_Info_Set& infos,
- const char* file_name = 0);
- // This helper function will dump the schedule returned by a
- // RtecScheduler::Scheduler into a file, the file can be compiled to
- // create an efficient local implementation of the Scheduler.
-
- // TODO: How to do cleanup()? Use the ACE_Object_Manager stuff?
-
-protected:
- static int no_config_run (void);
- // By default this factory assumes we are runnning a config
- // run. Calling this method disables that.
- // Since the methods returns an int it can be used to initialize a
- // static variable, hence calling it before main(); this technique
- // can be used in the code emitted for the run-time scheduler,
- // automagically disabling the config_run() when that code is linked
- // in.
-
-private:
- static RtecScheduler::Scheduler_ptr server_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Scheduler_Factory.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_SCHEDULER_FACTORY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.i b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.i
deleted file mode 100644
index 8d85b9d5a37..00000000000
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.i
+++ /dev/null
@@ -1,6 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.cpp b/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.cpp
deleted file mode 100644
index ffea37fb9fe..00000000000
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#include "ace/OS.h"
-
-#include "orbsvcs/Scheduler_Utilities.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "orbsvcs/Scheduler_Utilities.i"
-#endif /* __ACE_INLINE__ */
-
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h b/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h
deleted file mode 100644
index 8b66e3d04d6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-#ifndef ACE_SCHEDULER_UTILITIES_H
-#define ACE_SCHEDULER_UTILITIES_H
-
-#include "ace/OS.h"
-
-#include "orbsvcs/RtecSchedulerC.h"
-
-class TAO_ORBSVCS_Export ACE_RT_Info : public RtecScheduler::RT_Info
- // = TITLE
- // Offers a convenient C++ interface to the IDL RT_Info structure.
- //
- // = DESCRIPTION
- // For performance reasons the RT_Info data is represented as an
- // IDL structure, this permits sending complete RT_Info's from the
- // client to the server.
- // Unfortunately this precludes the usage of member functions and
- // constructors, this class serves as a helper to implement those
- // without loosing the performance on IDL.
-{
-public:
- ACE_RT_Info (const char* entry_point,
- RtecScheduler::Time worst_time,
- RtecScheduler::Time typical_time,
- RtecScheduler::Time cached_time,
- RtecScheduler::Period period,
- RtecScheduler::Importance importance,
- RtecScheduler::Quantum quantum,
- CORBA::Long threads);
-
- ACE_RT_Info (const RtecScheduler::RT_Info& rt_info);
-
- int add_dependency(RtecScheduler::handle_t dep,
- int number_of_calls = 1);
-};
-
-#if defined (__ACE_INLINE__)
-#include "orbsvcs/Scheduler_Utilities.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_SCHEDULER_UTILITIES_H */
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.i b/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.i
deleted file mode 100644
index 1d62ceffaf5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.i
+++ /dev/null
@@ -1,32 +0,0 @@
-// ============================================================================
-//
-// $Id$
-//
-// ============================================================================
-
-ACE_INLINE
-ACE_RT_Info::ACE_RT_Info (const char* entry_point_,
- RtecScheduler::Time worst_time_,
- RtecScheduler::Time typical_time_,
- RtecScheduler::Time cached_time_,
- RtecScheduler::Period period_,
- RtecScheduler::Importance importance_,
- RtecScheduler::Quantum quantum_,
- CORBA::Long threads_)
-{
- this->entry_point = entry_point_;
- this->worst_case_execution_time = worst_time_;
- this->typical_execution_time = typical_time_;
- this->cached_execution_time = cached_time_;
- this->period = period_;
- this->importance = importance_;
- this->quantum = quantum_;
- this->threads = threads_;
-}
-
-ACE_INLINE
-ACE_RT_Info::ACE_RT_Info (const RtecScheduler::RT_Info& rt_info)
- : RtecScheduler::RT_Info (rt_info)
-{
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Sequences.idl b/TAO/orbsvcs/orbsvcs/Sequences.idl
deleted file mode 100644
index a148feccf81..00000000000
--- a/TAO/orbsvcs/orbsvcs/Sequences.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Sequences.idl
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-// ========================================================================
-
-// Used for extracting simple sequences from anys.
-
-module TAO_Sequences
-{
- typedef sequence<short> ShortSeq;
- typedef sequence<unsigned short> UShortSeq;
- typedef sequence<long> LongSeq;
- typedef sequence<unsigned long> ULongSeq;
- typedef sequence<boolean> BooleanSeq;
- typedef sequence<float> FloatSeq;
- typedef sequence<double> DoubleSeq;
- typedef sequence<string> StringSeq;
-};
diff --git a/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp b/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp
deleted file mode 100644
index 485435edfb1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// $Id$
-//
-#include "orbsvcs/Time_Utilities.h"
-
-#if !defined (__ACE_INLINE__)
-#include "orbsvcs/Time_Utilities.i"
-#endif /* __ACE_INLINE__ */
-
-TimeBase::TimeT ORBSVCS_Time::zero = {0, 0};
diff --git a/TAO/orbsvcs/orbsvcs/Time_Utilities.h b/TAO/orbsvcs/orbsvcs/Time_Utilities.h
deleted file mode 100644
index 586f9508855..00000000000
--- a/TAO/orbsvcs/orbsvcs/Time_Utilities.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-
-#ifndef ORBSVCS_TIME_UTILITIES_H
-#define ORBSVCS_TIME_UTILITIES_H
-
-#include "orbsvcs/CosTimeBaseC.h"
-
-class TAO_ORBSVCS_Export ORBSVCS_Time
-{
- // = TITLE
- // Time conversion utilities.
- //
- // = DESCRIPTION
- // This class define several static methods to convert between
- // several time structures and the CORBA TimeT structure.
- //
- // Recall that TimeT stores time in a 64-bit long long (or
- // structure when that is not available) and uses hundreds of
- // nanoseconds as time units (i.e. 1 second is 10^7 TimeT units).
- //
-public:
-
- // = A helper constant, IDL does not have constant for structures.
- static TimeBase::TimeT zero;
-
- // = ACE_hrtime_t conversion routines, we interpret an ACE_hrtime_t
- // as nanoseconds.
- static void
- hrtime_to_TimeT (TimeBase::TimeT& lhs,
- ACE_hrtime_t rhs);
- static void
- TimeT_to_hrtime (ACE_hrtime_t &lhs,
- const TimeBase::TimeT& rhs);
- static ACE_hrtime_t
- to_hrtime (const TimeBase::TimeT& t);
-
- // = ACE_Time_Value conversion routines, recall that they are
- // <seconds,useconds> pairs.
- static void
- Time_Value_to_TimeT (TimeBase::TimeT& lhs,
- const ACE_Time_Value& rhs);
- static void
- TimeT_to_Time_Value (ACE_Time_Value& lrs,
- const TimeBase::TimeT& rhs);
- static ACE_Time_Value
- to_Time_Value (const TimeBase::TimeT& rhs);
-};
-
-#if !defined (__ACE_INLINE__)
-
-extern TAO_ORBSVCS_Export int operator== (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-extern TAO_ORBSVCS_Export int operator!= (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-extern TAO_ORBSVCS_Export int operator< (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-extern TAO_ORBSVCS_Export int operator<= (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-extern TAO_ORBSVCS_Export int operator< (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-extern TAO_ORBSVCS_Export int operator> (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-extern TAO_ORBSVCS_Export int operator>= (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs);
-
-#else /* defined (__ACE_INLINE__) */
-#include "orbsvcs/Time_Utilities.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ORBSVCS_TIME_UTILITIES_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Time_Utilities.i b/TAO/orbsvcs/orbsvcs/Time_Utilities.i
deleted file mode 100644
index d1cb14f48f9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Time_Utilities.i
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-ACE_INLINE void
-ORBSVCS_Time::TimeT_to_hrtime (ACE_hrtime_t &lhs,
- const TimeBase::TimeT& rhs)
-{
- lhs = rhs.high;
- lhs <<= 32;
- lhs |= rhs.low;
- lhs *= 100;
-}
-
-ACE_INLINE void
-ORBSVCS_Time::hrtime_to_TimeT (TimeBase::TimeT& lhs,
- ACE_hrtime_t rhs)
-{
- ACE_UINT64 t = rhs / 100; // convert to 100ns
- ACE_UINT32 mask = ~0L;
- lhs.low = t & mask;
-#if defined (ACE_LACKS_LONGLONG_T)
- lhs.high = t.hi ();
-#else /* ! ACE_LACKS_LONGLONG_T */
- lhs.high = (t >> 32);
-#endif /* ! ACE_LACKS_LONGLONG_T */
-}
-
-ACE_INLINE ACE_hrtime_t
-ORBSVCS_Time::to_hrtime (const TimeBase::TimeT& t)
-{
- ACE_hrtime_t r;
- ORBSVCS_Time::TimeT_to_hrtime (r, t);
- return r;
-}
-
-ACE_INLINE void
-ORBSVCS_Time::Time_Value_to_TimeT (TimeBase::TimeT& lhs,
- const ACE_Time_Value& rhs)
-{
- ACE_hrtime_t t = rhs.sec () * ACE_ONE_SECOND_IN_NSECS + rhs.usec () * 1000;
- ORBSVCS_Time::hrtime_to_TimeT (lhs, t);
-}
-
-ACE_INLINE void
-ORBSVCS_Time::TimeT_to_Time_Value (ACE_Time_Value& lhs,
- const TimeBase::TimeT& rhs)
-{
- ACE_hrtime_t t;
-
- ORBSVCS_Time::TimeT_to_hrtime (t, rhs);
-
- lhs.set ((t / ACE_ONE_SECOND_IN_NSECS),
- (t % ACE_ONE_SECOND_IN_NSECS) / 1000);
-}
-
-ACE_INLINE ACE_Time_Value
-ORBSVCS_Time::to_Time_Value (const TimeBase::TimeT& t)
-{
- ACE_Time_Value r;
- ORBSVCS_Time::TimeT_to_Time_Value (r, t);
- return r;
-}
-
-ACE_INLINE int
-operator== (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs)
-{
- return (lhs.low == rhs.low
- && lhs.high == rhs.high);
-}
-
-ACE_INLINE int
-operator!= (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs)
-{
- return !(lhs == rhs);
-}
-
-ACE_INLINE int
-operator< (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs)
-{
- return (lhs.high < rhs.high
- || (lhs.high == rhs.high && lhs.low < rhs.low));
-}
-
-ACE_INLINE int
-operator<= (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs)
-{
- return (lhs.high < rhs.high
- || (lhs.high == rhs.high && lhs.low <= rhs.low));
-}
-
-ACE_INLINE int
-operator> (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs)
-{
- return !(rhs <= lhs);
-}
-
-ACE_INLINE int
-operator>= (const TimeBase::TimeT &lhs,
- const TimeBase::TimeT &rhs)
-{
- return !(rhs < lhs);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Admin.cpp b/TAO/orbsvcs/orbsvcs/Trader/Admin.cpp
deleted file mode 100644
index 6cd89f6811d..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Admin.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// Admin
-//
-// = FILENAME
-// Admin.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (TAO_ADMIN_C)
-#define TAO_ADMIN_C
-
-#include "Admin.h"
-
-template <class TRADER>
-const char* TAO_Admin<TRADER>::NAME = "Trader: Admin";
-
-template <class TRADER>
-TAO_Admin<TRADER>::TAO_Admin (TRADER &trader)
- : trader_ (trader),
- TAO_Trader_Components <POA_CosTrading::Admin> (trader.trading_components ()),
- TAO_Import_Attributes <POA_CosTrading::Admin> (trader.import_attributes ()),
- TAO_Support_Attributes <POA_CosTrading::Admin> (trader.support_attributes ()),
- TAO_Link_Attributes <POA_CosTrading::Admin> (trader.link_attributes ()),
- sequence_number_ (0)
-{
- // Because a servant is uniquely identified by a POA name and an
- // ObjectID number, the concatenation of the two prefixed before a
- // sequence number will ensure the request_id_stem space between
- // traders will not overlap. The sequence number space will be four
- // octets.
- CORBA::Environment _env;
- PortableServer::POA_var poa = this->_default_POA (_env);
- PortableServer::ObjectId_var id = poa->servant_to_id (this, _env);
- CORBA::String_var poa_name = poa->the_name (_env);
- int name_length = ACE_OS::strlen (poa_name.in ()),
- id_length = id->length (),
- total_length = name_length + id_length + sizeof (CORBA::ULong);
-
- this->stem_id_.length (total_length);
- for (int i = total_length - 1, j = name_length - 1; j >= 0; i--, j--)
- this->stem_id_[i] = (CORBA::Octet) poa_name[j];
-
- for (j = id_length - 1; j >= 0; j--, i--)
- this->stem_id_[i] = id[j];
-}
-
-template <class TRADER>
-TAO_Admin<TRADER>::~TAO_Admin (void)
-{
-}
-
-template <class TRADER> CosTrading::Admin::OctetSeq *
-TAO_Admin<TRADER>::request_id_stem (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- // Add one to the sequence_number and concatenate it to the unique
- // prefix. The sequence number is four octets long.
- for (int i = sizeof (CORBA::ULong) - 1; i >= 0; i--)
- this->stem_id_[i] = (this->sequence_number_ >> (8*i)) & 0xff;
-
- // Increment the sequence number and return a copy of the stem_id.
- this->sequence_number_++;
- return new CosTrading::Admin::OctetSeq (this->stem_id_);
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_def_search_card (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().def_search_card ();
-
- this->trader_.import_attributes ().def_search_card (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_max_search_card (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().max_search_card ();
-
- this->trader_.import_attributes ().max_search_card (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_def_match_card (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().def_match_card ();
-
- this->trader_.import_attributes ().def_match_card (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_max_match_card (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().max_match_card ();
-
- this->trader_.import_attributes ().max_match_card (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_def_return_card (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().def_return_card ();
-
- this->trader_.import_attributes ().def_return_card (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_max_return_card (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().max_return_card ();
-
- this->trader_.import_attributes ().max_return_card (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_max_list (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().max_list ();
-
- this->trader_.import_attributes ().max_list (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::Boolean
-TAO_Admin<TRADER>::
-set_supports_modifiable_properties (CORBA::Boolean value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Boolean return_value =
- this->trader_.support_attributes ().supports_modifiable_properties ();
-
- this->trader_.support_attributes ().supports_modifiable_properties (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::Boolean
-TAO_Admin<TRADER>::
-set_supports_dynamic_properties (CORBA::Boolean value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Boolean return_value =
- this->trader_.support_attributes ().supports_dynamic_properties ();
-
- this->trader_.support_attributes ().supports_dynamic_properties (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::Boolean
-TAO_Admin<TRADER>::set_supports_proxy_offers (CORBA::Boolean value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::Boolean return_value =
- this->trader_.support_attributes ().supports_proxy_offers ();
-
- this->trader_.support_attributes ().supports_proxy_offers (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_def_hop_count (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().def_hop_count ();
-
- this->trader_.import_attributes ().def_hop_count (value);
- return return_value;
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Admin<TRADER>::set_max_hop_count (CORBA::ULong value,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong return_value =
- this->trader_.import_attributes ().max_hop_count ();
-
- this->trader_.import_attributes ().max_hop_count (value);
- return return_value;
-}
-
-template <class TRADER> CosTrading::FollowOption
-TAO_Admin<TRADER>::set_def_follow_policy (CosTrading::FollowOption policy,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CosTrading::FollowOption return_value =
- this->trader_.import_attributes ().def_follow_policy ();
-
- this->trader_.import_attributes ().def_follow_policy (policy);
- return return_value;
-}
-
-template <class TRADER> CosTrading::FollowOption
-TAO_Admin<TRADER>::set_max_follow_policy (CosTrading::FollowOption policy,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CosTrading::FollowOption return_value =
- this->trader_.import_attributes ().max_follow_policy ();
-
- this->trader_.import_attributes ().max_follow_policy (policy);
- return return_value;
-}
-
-template <class TRADER> CosTrading::FollowOption
-TAO_Admin<TRADER>::
-set_max_link_follow_policy (CosTrading::FollowOption policy,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CosTrading::FollowOption return_value =
- this->trader_.link_attributes ().max_link_follow_policy ();
-
- this->trader_.link_attributes ().max_link_follow_policy (policy);
- return return_value;
-}
-
-template <class TRADER> CosTrading::TypeRepository_ptr
-TAO_Admin<TRADER>::
-set_type_repos (CosTrading::TypeRepository_ptr repository,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CosTrading::TypeRepository_ptr return_value =
- this->trader_.support_attributes ().type_repos ();
-
- this->trader_.support_attributes ().type_repos (repository);
- return return_value;
-}
-
-template <class TRADER> CosTrading::Admin::OctetSeq*
-TAO_Admin<TRADER>::set_request_id_stem (const CosTrading::Admin::OctetSeq& stem,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return 0;
-}
-
-template <class TRADER> void
-TAO_Admin<TRADER>::list_offers (CORBA::ULong how_many,
- CosTrading::OfferIdSeq_out ids,
- CosTrading::OfferIdIterator_out id_itr,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,)
- CosTrading::NotImplemented)
-{
- // This method only applies when the register interface is implemented
- if (CORBA::is_nil(this->trader_.trading_components().register_if()))
- TAO_THROW (CosTrading::NotImplemented());
-
- TRADER::SERVICE_TYPE_MAP& type_map = this->trader_.service_type_map();
-
- CosTrading::OfferIdIterator_ptr oi =
- type_map.retrieve_all_offer_ids ()->_this (_env);
- TAO_CHECK_ENV_RETURN (_env,);
-
- id_itr = CosTrading::OfferIdIterator::_nil ();
- if (how_many > 0)
- {
- if (oi->next_n (how_many, ids, _env) == (CORBA::Boolean)0)
- {
- // No more items left in the iterator.
- oi->destroy (_env);
- oi = CosTrading::OfferIdIterator::_nil ();
- }
- }
- else
- ids = new CosTrading::OfferIdSeq(0);
-}
-
-template <class TRADER> void
-TAO_Admin<TRADER>::list_proxies (CORBA::ULong how_many,
- CosTrading::OfferIdSeq_out ids,
- CosTrading::OfferIdIterator_out id_itr,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented))
-{
- TAO_THROW (CosTrading::NotImplemented ());
-}
-
-#endif /* TAO_ADMIN_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Admin.h b/TAO/orbsvcs/orbsvcs/Trader/Admin.h
deleted file mode 100644
index 75925b99978..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Admin.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Admin.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_ADMIN_H
-#define TAO_ADMIN_H
-
-#include "Attributes.h"
-
-template <class TRADER>
-class TAO_Admin :
- public TAO_Trader_Components <POA_CosTrading::Admin>,
- public TAO_Support_Attributes <POA_CosTrading::Admin>,
- public TAO_Import_Attributes <POA_CosTrading::Admin>,
- public TAO_Link_Attributes <POA_CosTrading::Admin>
-//
-// = TITLE
-// This class implements CosTrading::Admin IDL interface.
-//
-// = DESCRIPTION (FROM SPEC)
-//
-// The admin interface enables the values of the trader attributes to
-// be read and written. All attributes are defined as readonly in
-// either SupportAttributes, ImportAttributes, LinkAttributes, or
-// Admin. To set the trader "attribute" to a new value,
-// set_<attribute_name> operations are defined in Admin. Each of these
-// set operations returns the previous value of the attribute as its
-// function value. If the admin interface operation
-// set_support_proxy_offers is invoked with a value set to FALSE in a
-// trader which supports the proxy interface, the
-// set_support_proxy_offer value does not affect the function of
-// operations in the proxy interface. However, in this case, it does
-// have the effect of making any proxy offers exported via the proxy
-// interface for that trader unavailable to satisfy queries on that
-// trader's lookup interface.
-{
-public:
-
- TAO_Admin (TRADER &trader);
-
- ~TAO_Admin (void);
-
- // = Importing Parameters (used by the Lookup Interface)
-
- virtual CORBA::ULong set_def_search_card (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::ULong set_max_search_card (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // search card is the cardinality of the offers searched for
- // constraint compliance.
-
-
- virtual CORBA::ULong set_def_match_card (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::ULong set_max_match_card (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // match card is the cardinality of offers found compliant with the
- // constraints.
-
- virtual CORBA::ULong set_def_return_card (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::ULong set_max_return_card (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // return card is the cardinality of the offers returned from
- // Lookup.
-
- virtual CORBA::ULong set_max_list (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::Boolean
- set_supports_modifiable_properties (CORBA::Boolean value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::Boolean
- set_supports_dynamic_properties (CORBA::Boolean value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::Boolean
- set_supports_proxy_offers (CORBA::Boolean value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Types of offers available for consideration. Ween out those
- // offers with modifiable properties
-
- // = Link Interface parameters
-
- virtual CORBA::ULong set_def_hop_count (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::ULong set_max_hop_count (CORBA::ULong value,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CosTrading::FollowOption
- set_def_follow_policy (CosTrading::FollowOption policy,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CosTrading::FollowOption
- set_max_follow_policy (CosTrading::FollowOption policy,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- virtual CosTrading::FollowOption
- set_max_link_follow_policy (CosTrading::FollowOption policy,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- // = Set Type Repository
-
- virtual CosTrading::TypeRepository_ptr
- set_type_repos (CosTrading::TypeRepository_ptr repository,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CosTrading::Admin::OctetSeq*
- request_id_stem (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CosTrading::Admin::OctetSeq*
- set_request_id_stem (const CosTrading::Admin::OctetSeq& stem,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual void list_offers (CORBA::ULong how_many,
- CosTrading::OfferIdSeq_out ids,
- CosTrading::OfferIdIterator_out id_itr,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented));
-
-
- // BEGIN SPEC
- // The list_offers operation allows the administrator of a trader to
- // perform housekeeping by obtaining a handle on each of the offers
- // within a trader (e.g., for garbage collection etc.). Only the
- // identifiers of ordinary offers are returned, identifiers of proxy
- // offers are not returned via this operation. If the trader does
- // not support the Register interface, the NotImplemented exception
- // is raised. The returned identifiers are passed back in one of two
- // ways (or a combination of both). ° The "ids" return result
- // conveys a list of offer identifiers and the "id_itr" is a
- // reference to an interface at which additional offer identities
- // can be obtained. ° The "how_many" parameter states how many
- // identifiers are to be returned via the "ids" result; any
- // remaining are available via the iterator interface. If the
- // "how_many" exceeds the number of offers held in the trader, then
- // the "id_itr" is nil.
- // END SPEC
-
- virtual void list_proxies (CORBA::ULong how_many,
- CosTrading::OfferIdSeq_out ids,
- CosTrading::OfferIdIterator_out id_itr,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented));
-
-
- static const char* NAME;
-
-private:
-
- TRADER &trader_;
-
- CosTrading::Admin::OctetSeq stem_id_;
- // Unique prefix to create a sequence number space.
-
- CORBA::ULong sequence_number_;
- // Current sequence number.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Admin.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-
-#endif /* TAO_ADMIN_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Attributes.cpp b/TAO/orbsvcs/orbsvcs/Trader/Attributes.cpp
deleted file mode 100644
index bfea3f89cf4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Attributes.cpp
+++ /dev/null
@@ -1,589 +0,0 @@
-// Attributes.h
-// $Id$
-
-#if !defined (TAO_ATTRIBUTES_C)
-#define TAO_ATTRIBUTES_C
-
-#include "Attributes.h"
-#include "Trader.h"
-
-TAO_Support_Attributes_Impl::TAO_Support_Attributes_Impl (TAO_Trader_Base &trader)
- : trader_ (trader),
- supports_modifiable_properties_ (CORBA::B_TRUE),
- supports_dynamic_properties_ (CORBA::B_TRUE),
- supports_proxy_offers_ (CORBA::B_FALSE),
- type_repos_ (CosTrading::TypeRepository::_nil ())
-{
-}
-
-TAO_Support_Attributes_Impl::~TAO_Support_Attributes_Impl (void)
-{
-}
-
-CORBA::Boolean
-TAO_Support_Attributes_Impl::supports_modifiable_properties (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CORBA::B_FALSE);
- return this->supports_modifiable_properties_;
-}
-
-void
-TAO_Support_Attributes_Impl::supports_modifiable_properties (CORBA::Boolean new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->supports_modifiable_properties_ = new_value;
-}
-
-CORBA::Boolean
-TAO_Support_Attributes_Impl::supports_dynamic_properties (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CORBA::B_FALSE);
-
- return this->supports_dynamic_properties_;
-}
-
-void
-TAO_Support_Attributes_Impl::supports_dynamic_properties (CORBA::Boolean new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->supports_dynamic_properties_ = new_value;
-}
-
-CORBA::Boolean
-TAO_Support_Attributes_Impl::supports_proxy_offers (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CORBA::B_FALSE);
-
- return this->supports_proxy_offers_;
-}
-
-void
-TAO_Support_Attributes_Impl::supports_proxy_offers (CORBA::Boolean new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->supports_proxy_offers_ = new_value;
-}
-
-CosTrading::TypeRepository_ptr
-TAO_Support_Attributes_Impl::type_repos (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::TypeRepository::_nil ());
- return this->type_repos_;
-}
-
-void
-TAO_Support_Attributes_Impl::type_repos (CosTrading::TypeRepository_ptr new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->type_repos_ = new_value;
-}
-
-
-TAO_Import_Attributes_Impl::TAO_Import_Attributes_Impl (TAO_Trader_Base &trader)
- : trader_ (trader),
- def_search_card_ (10),
- max_search_card_ (10),
- def_match_card_ (10),
- max_match_card_ (10),
- def_return_card_ (10),
- max_return_card_ (10),
- max_list_ (0),
- def_hop_count_ (0),
- max_hop_count_ (0),
- def_follow_policy_ (CosTrading::local_only),
- max_follow_policy_ (CosTrading::local_only)
-{
-}
-
-
-TAO_Import_Attributes_Impl::~TAO_Import_Attributes_Impl (void)
-{
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::def_search_card (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 10);
- return this->def_search_card_;
-}
-
-void
-TAO_Import_Attributes_Impl::def_search_card (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
-
- if (new_value > this->max_search_card_)
- this->def_search_card_ = this->max_search_card_;
- else
- this->def_search_card_ = new_value;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::max_search_card (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 10);
- return this->max_search_card_;
-}
-
-void
-TAO_Import_Attributes_Impl::max_search_card (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
-
- this->max_search_card_ = new_value;
-
- if (this->def_search_card_ > this->max_search_card_)
- this->def_search_card_ = this->max_search_card_;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::def_match_card (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 10);
- return this->def_match_card_;
-}
-
-void
-TAO_Import_Attributes_Impl::def_match_card (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
-
- if (new_value > this->max_match_card_)
- this->def_match_card_ = this->max_match_card_;
- else
- this->def_match_card_ = new_value;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::max_match_card (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 10);
- return this->max_match_card_;
-}
-
-void
-TAO_Import_Attributes_Impl::max_match_card (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->max_match_card_ = new_value;
-
- if (this->def_match_card_ > this->max_match_card_)
- this->def_match_card_ = this->max_match_card_;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::def_return_card (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 10);
- return this->def_return_card_;
-}
-
-void
-TAO_Import_Attributes_Impl::def_return_card (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
-
- if (new_value > this->max_return_card_)
- this->def_return_card_ = this->max_return_card_;
- else
- this->def_return_card_ = new_value;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::max_return_card (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 10);
- return this->max_return_card_;
-}
-
-void
-TAO_Import_Attributes_Impl::max_return_card (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->max_return_card_ = new_value;
-
- if (this->def_return_card_ > this->max_return_card_)
- this->def_return_card_ = this->max_return_card_;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::max_list (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 0);
- return this->max_list_;
-}
-
-void
-TAO_Import_Attributes_Impl::max_list (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->max_list_ = new_value;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::def_hop_count (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 0);
- return this->def_hop_count_;
-}
-
-void
-TAO_Import_Attributes_Impl::def_hop_count (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
-
- if (new_value > this->max_hop_count_)
- this->def_hop_count_ = this->max_hop_count_;
- else
- this->def_hop_count_ = new_value;
-}
-
-CORBA::ULong
-TAO_Import_Attributes_Impl::max_hop_count (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), 0);
- return this->max_hop_count_;
-}
-
-void
-TAO_Import_Attributes_Impl::max_hop_count (CORBA::ULong new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->max_hop_count_ = new_value;
-
- if (this->def_hop_count_ > this->max_hop_count_)
- this->def_hop_count_ = this->max_hop_count_;
-}
-
-CosTrading::FollowOption
-TAO_Import_Attributes_Impl::def_follow_policy (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), CosTrading::local_only);
- return this->def_follow_policy_;
-}
-
-void
-TAO_Import_Attributes_Impl::def_follow_policy (FollowOption new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
-
- if (new_value > this->max_follow_policy_)
- this->def_follow_policy_ = this->max_follow_policy_;
- else
- this->def_follow_policy_ = new_value;
-}
-
-FollowOption
-TAO_Import_Attributes_Impl::max_follow_policy (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (), CosTrading::local_only);
- return this->max_follow_policy_;
-}
-
-void
-TAO_Import_Attributes_Impl::max_follow_policy (FollowOption new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->max_follow_policy_ = new_value;
-
- if (this->def_follow_policy_ > this->max_follow_policy_)
- this->def_follow_policy_ = this->max_follow_policy_;
-}
-
-
-TAO_Trading_Components_Impl::TAO_Trading_Components_Impl (TAO_Trader_Base &trader)
- : trader_ (trader),
- lookup_ (CosTrading::Lookup::_nil ()),
- register_ (CosTrading::Register::_nil ()),
- link_ (CosTrading::Link::_nil ()),
- proxy_ (CosTrading::Proxy::_nil ()),
- admin_ (CosTrading::Admin::_nil ())
-{
-}
-
-TAO_Trading_Components_Impl::~TAO_Trading_Components_Impl (void)
-{
-}
-
-CosTrading::Lookup_ptr
-TAO_Trading_Components_Impl::lookup_if (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::Lookup::_nil ());
- return this->lookup_;
-}
-
-void
-TAO_Trading_Components_Impl::lookup_if (CosTrading::Lookup_ptr new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->lookup_ = new_value;
-}
-
-CosTrading::Register_ptr
-TAO_Trading_Components_Impl::register_if (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::Register::_nil ());
- return this->register_;
-}
-
-void
-TAO_Trading_Components_Impl::register_if (CosTrading::Register_ptr new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->register_ = new_value;
-}
-
-CosTrading::Link_ptr
-TAO_Trading_Components_Impl::link_if (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::Link::_nil ());
- return this->link_;
-}
-
-void
-TAO_Trading_Components_Impl::link_if (CosTrading::Link_ptr new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->link_ = new_value;
-}
-
-CosTrading::Proxy_ptr
-TAO_Trading_Components_Impl::proxy_if (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::Proxy::_nil ());
- return this->proxy_;
-}
-
-void
-TAO_Trading_Components_Impl::proxy_if (CosTrading::Proxy_ptr new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->proxy_ = new_value;
-}
-
-CosTrading::Admin_ptr
-TAO_Trading_Components_Impl::admin_if (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::Admin::_nil ());
- return this->admin_;
-}
-
-void
-TAO_Trading_Components_Impl::admin_if (CosTrading::Admin_ptr new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->admin_ = new_value;
-}
-
-
-TAO_Link_Attributes_Impl::TAO_Link_Attributes_Impl (TAO_Trader_Base &trader)
- :trader_ (trader),
- max_link_follow_policy_ (CosTrading::local_only)
-{
-}
-
-TAO_Link_Attributes_Impl::~TAO_Link_Attributes_Impl (void)
-{
-}
-
-CosTrading::FollowOption
-TAO_Link_Attributes_Impl::max_link_follow_policy (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_Lock, ace_mon, this->trader_.lock (),
- CosTrading::local_only);
- return this->max_link_follow_policy_;
-}
-
-void
-TAO_Link_Attributes_Impl::max_link_follow_policy (CosTrading::FollowOption new_value)
-{
- ACE_WRITE_GUARD (ACE_Lock, ace_mon, this->trader_.lock ());
- this->max_link_follow_policy_ = new_value;
-}
-
-template <class IF>
-TAO_Trader_Components<IF>::
-TAO_Trader_Components (const TAO_Trading_Components_Impl& comps)
- : comps_ (comps)
-{
-}
-
-template <class IF> CosTrading::Lookup_ptr
-TAO_Trader_Components<IF>::lookup_if (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return CosTrading::Lookup::_duplicate (this->comps_.lookup_if ());
-}
-
-template <class IF> CosTrading::Register_ptr
-TAO_Trader_Components<IF>::register_if (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Returning Register Interface.\n"));
- return CosTrading::Register::_duplicate (this->comps_.register_if ());
-}
-
-template <class IF> CosTrading::Admin_ptr
-TAO_Trader_Components<IF>::admin_if (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return CosTrading::Admin::_duplicate (this->comps_.admin_if ());
-}
-
-template <class IF> CosTrading::Proxy_ptr
-TAO_Trader_Components<IF>::proxy_if (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return CosTrading::Proxy::_duplicate (this->comps_.proxy_if ());
-}
-
-template <class IF> CosTrading::Link_ptr
-TAO_Trader_Components<IF>::link_if (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return CosTrading::Link::_duplicate (this->comps_.link_if ());
-}
-template <class IF>
-TAO_Support_Attributes<IF>::
-TAO_Support_Attributes (const TAO_Support_Attributes_Impl& attrs)
- : attrs_ (attrs)
-{
-}
-
-template <class IF> CORBA::Boolean
-TAO_Support_Attributes<IF>::supports_modifiable_properties (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.supports_modifiable_properties ();
-}
-
-template <class IF> CORBA::Boolean
-TAO_Support_Attributes<IF>::supports_dynamic_properties (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.supports_dynamic_properties ();
-}
-
-template <class IF> CORBA::Boolean
-TAO_Support_Attributes<IF>::supports_proxy_offers (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.supports_proxy_offers ();
-}
-
-template <class IF> CosTrading::TypeRepository_ptr
-TAO_Support_Attributes<IF>::type_repos (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Returning Service Type Repository.\n"));
- return CosTrading::TypeRepository::_duplicate (this->attrs_.type_repos ());
-}
-
-template <class IF>
-TAO_Import_Attributes<IF>::
-TAO_Import_Attributes (const TAO_Import_Attributes_Impl& attrs)
- : attrs_ (attrs)
-{
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::def_search_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.def_search_card ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::max_search_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_search_card ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::def_match_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.def_match_card ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::max_match_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_match_card ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::def_return_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.def_return_card ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::max_return_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_return_card ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::max_list (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_list ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::def_hop_count (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.def_hop_count ();
-}
-
-template <class IF> CORBA::ULong
-TAO_Import_Attributes<IF>::max_hop_count (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_hop_count ();
-}
-
-template <class IF> CosTrading::FollowOption
-TAO_Import_Attributes<IF>::def_follow_policy (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.def_follow_policy ();
-}
-
-template <class IF> CosTrading::FollowOption
-TAO_Import_Attributes<IF>::max_follow_policy (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_follow_policy ();
-}
-
-template <class IF>
-TAO_Link_Attributes<IF>::
-TAO_Link_Attributes (const TAO_Link_Attributes_Impl& attrs)
- : attrs_ (attrs)
-{
-}
-
-template <class IF> CosTrading::FollowOption
-TAO_Link_Attributes<IF>::max_link_follow_policy (CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- return this->attrs_.max_link_follow_policy ();
-}
-
-#endif /* TAO_ATTRIBUTES_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Attributes.h b/TAO/orbsvcs/orbsvcs/Trader/Attributes.h
deleted file mode 100644
index 68e71880d72..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Attributes.h
+++ /dev/null
@@ -1,403 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Attributes.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_ATTRIBUTES_H
-#define TAO_ATTRIBUTES_H
-
-#include "orbsvcs/CosTradingS.h"
-
-class TAO_Trader_Base;
-
-class TAO_Export TAO_Support_Attributes_Impl
- // = TITLE
- // This class stores, allows access to and modification of
- // trader's support attributes.
- //
- // = DESCRIPTION
- // Contains a reference to the trader from which it is
- // used so it can use trader's lock.
-{
-public:
- // = Initialization and termination methods.
- TAO_Support_Attributes_Impl (TAO_Trader_Base &trader);
- ~TAO_Support_Attributes_Impl ();
-
- // = Accessor methods.
- CORBA::Boolean supports_modifiable_properties (void) const;
- void supports_modifiable_properties (CORBA::Boolean);
-
- CORBA::Boolean supports_dynamic_properties (void) const;
- void supports_dynamic_properties (CORBA::Boolean);
-
- CORBA::Boolean supports_proxy_offers (void) const;
- void supports_proxy_offers (CORBA::Boolean);
-
- CosTrading::TypeRepository_ptr type_repos (void) const;
- void type_repos (CosTrading::TypeRepository_ptr);
-
-private:
-
- TAO_Trader_Base &trader_;
- // A reference to the trader (needed for obtaining the lock.)
-
- CORBA::Boolean supports_modifiable_properties_;
- // Indicator of whether the trader supports property modification.
-
- CORBA::Boolean supports_dynamic_properties_;
- // Indicator of whether the trader supports dynamic properties.
-
- CORBA::Boolean supports_proxy_offers_;
- // Indicator of whether the trader supports proxy offers.
-
- CORBA::Object_var type_repos_;
- // A reference to the TypeRepostitory used by the trader.
-};
-
-class TAO_Export TAO_Link_Attributes_Impl
- // = TITLE
- // This class stores, allows access to and modification of
- // trader's link attributes.
- //
- // = DESCRIPTION
- // Contains a reference to the trader from which it is
- // used so it can use trader's lock.
-{
-public:
- // = Initialization and termination methods.
-
- TAO_Link_Attributes_Impl (TAO_Trader_Base &trader);
- ~TAO_Link_Attributes_Impl ();
-
- // = Accessor methods.
-
- CosTrading::FollowOption max_link_follow_policy (void) const;
- void max_link_follow_policy (CosTrading::FollowOption);
-
-private:
-
- TAO_Trader_Base &trader_;
- // A reference to the trader (needed for obtaining the lock.)
-
- CosTrading::FollowOption max_link_follow_policy_;
- //
-};
-
-class TAO_Export TAO_Import_Attributes_Impl
- // = TITLE
- // This class stores, allows access to and modification of
- // trader's import attributes.
- //
- // = DESCRIPTION
- // Contains a reference to the trader from which it is
- // used so it can use trader's lock.
-{
-public:
- // = Initialization and termination methods.
-
- TAO_Import_Attributes_Impl (TAO_Trader_Base &trader);
-
- ~TAO_Import_Attributes_Impl (void);
-
- // = Accessor methods.
-
- CORBA::ULong def_search_card (void) const;
- void def_search_card (CORBA::ULong);
-
- CORBA::ULong max_search_card (void) const;
- void max_search_card (CORBA::ULong);
-
- CORBA::ULong def_match_card (void) const;
- void def_match_card (CORBA::ULong);
-
- CORBA::ULong max_match_card (void) const;
- void max_match_card (CORBA::ULong);
-
- CORBA::ULong def_return_card (void) const;
- void def_return_card (CORBA::ULong);
-
- CORBA::ULong max_return_card (void) const;
- void max_return_card (CORBA::ULong);
-
- CORBA::ULong max_list (void) const;
- void max_list (CORBA::ULong);
-
- CORBA::ULong def_hop_count (void) const;
- void def_hop_count (CORBA::ULong);
-
- CORBA::ULong max_hop_count (void) const;
- void max_hop_count (CORBA::ULong);
-
- CosTrading::FollowOption def_follow_policy (void) const;
- void def_follow_policy (CosTrading::FollowOption);
-
- CosTrading::FollowOption max_follow_policy (void) const;
- void max_follow_policy (CosTrading::FollowOption);
-
-private:
-
- TAO_Trader_Base &trader_;
-
- CORBA::ULong def_search_card_;
- // Upper bound of offers to be searched if <search_card>
- // is not specified.
-
- CORBA::ULong max_search_card_;
- // Maximum upper bound of offers to be searched.
-
- CORBA::ULong def_match_card_;
- // Upper bound of matched offers to be ordered if
- // <match_card> is not specified).
-
- CORBA::ULong max_match_card_;
- // Maximum upper bound of matched offers to be ordered.
-
- CORBA::ULong def_return_card_;
- // Upper bound of ordered offers to be returned if
- // <returned_card> is not specified.
-
- CORBA::ULong max_return_card_;
- // Maximum upper bound of ordered offers to be returned.
-
- CORBA::ULong max_list_;
- // Upper bound of depth
-
- CORBA::ULong def_hop_count_;
- // Upper bound of depth of links to be traversed if <hop_count> is
- // not specified.
-
- CORBA::ULong max_hop_count_;
- // Maximum upper bound of depth of links to be traversed.
-
- CosTrading::FollowOption def_follow_policy_;
- // Default link follow policy for a particular trader.
-
- CosTrading::FollowOption max_follow_policy_;
- // Limiting link follow policy for all links of the trader -
- // overrides both link and importer policies.
-};
-
-class TAO_Export TAO_Trading_Components_Impl
- //
- // = TITLE
- // Set/get methods for references to various
- // interfaces of the trader.
- //
- // = DESCRIPTION
- // Note, this class is for use in local address space only and is NOT a
- // direct implementation of IDL methods. (Implementation of
- // IDL methods in CosTrading::Trader_Components would need
- // add a _duplicate call for each get method).
-{
-public:
-
- // = Initialization and termination methods.
- TAO_Trading_Components_Impl (TAO_Trader_Base &trader);
- ~TAO_Trading_Components_Impl (void);
-
- // = CosTrading::TraderComponents methods.
-
- CosTrading::Lookup_ptr lookup_if (void) const;
- // Returns an object reference to the Lookup interface of the trader.
- // Returns nil if the trader does not support Lookup interface.
-
- void lookup_if (CosTrading::Lookup_ptr);
- // Set the reference to the Lookup interface.
-
- CosTrading::Register_ptr register_if (void) const;
- // Returns object reference for the Register interface of the trader.
- // Returns nil if the trader does not support Register interface.
-
- void register_if (CosTrading::Register_ptr);
- // Set the reference to the Register interface of the trader.
-
- CosTrading::Link_ptr link_if (void) const;
- // Returns object reference for the Link interface of the trader.
- // Returns nil if the trader does not support Link interface.
-
- void link_if (CosTrading::Link_ptr);
- // Set the reference to the Link interface of the trader.
-
- CosTrading::Proxy_ptr proxy_if (void) const;
- // Returns object reference to the Proxy interface of the trader.
- // Returns nil if the trader does not support Proxy interface.
-
- void proxy_if (CosTrading::Proxy_ptr);
- // Set the reference to the Proxy interface of the trader.
-
- CosTrading::Admin_ptr admin_if (void) const;
- // Returns object reference for the Admin interface of the trader.
- // Returns nil if the trader does not support Admin interface.
-
- void admin_if (CosTrading::Admin_ptr);
- // Set the reference to the Admin interface of the trader.
-
-private:
-
- TAO_Trader_Base &trader_;
-
- CosTrading::Lookup_var lookup_;
- CosTrading::Register_var register_;
- CosTrading::Link_var link_;
- CosTrading::Proxy_var proxy_;
- CosTrading::Admin_var admin_;
-};
-
-
-template <class IF>
-class TAO_Trader_Components : public virtual IF
-{
-public:
-
- TAO_Trader_Components (const TAO_Trading_Components_Impl& comps);
-
- // = CosTrading::TraderComponents methods.
- virtual CosTrading::Lookup_ptr lookup_if (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Returns an object reference to the Lookup interface of the trader.
- // Returns nil if the trader does not support Lookup interface.
-
- virtual CosTrading::Register_ptr register_if (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Returns object reference for the Register interface of the trader.
- // Returns nil if the trader does not support Register interface.
-
- virtual CosTrading::Link_ptr link_if (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Returns object reference for the Link interface of the trader.
- // Returns nil if the trader does not support Link interface.
-
- virtual CosTrading::Proxy_ptr proxy_if (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Returns object reference to the Proxy interface of the trader.
- // Returns nil if the trader does not support Proxy interface.
-
- virtual CosTrading::Admin_ptr admin_if (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Returns object reference for the Admin interface of the trader.
- // Returns nil if the trader does not support Admin interface.
-
-private:
-
- const TAO_Trading_Components_Impl& comps_;
-};
-
-template <class IF>
-class TAO_Support_Attributes : public virtual IF
-{
-public:
-
- TAO_Support_Attributes (const TAO_Support_Attributes_Impl& attrs);
-
- // = CosTrading::SupportAttributes methods.
-
- virtual CORBA::Boolean supports_modifiable_properties (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean supports_dynamic_properties (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean supports_proxy_offers (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CosTrading::TypeRepository_ptr type_repos (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- const TAO_Support_Attributes_Impl& attrs_;
-};
-
-template <class IF>
-class TAO_Import_Attributes : public virtual IF
-{
-public:
-
- TAO_Import_Attributes (const TAO_Import_Attributes_Impl& attrs);
-
- // = CosTrading::ImportAttributes methods.
-
- virtual CORBA::ULong def_search_card (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong max_search_card (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- // Search cardinality determines the maximum number of offers searched
- // before not considering other offers.
-
- virtual CORBA::ULong def_match_card (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong max_match_card (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- // Match cardinality determines the maximum number of offers
- // matched to the constraints before not considering other offers..
-
- virtual CORBA::ULong def_return_card (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong max_return_card (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- // Return cardinality determines the maximum number of offers marked
- // to return before not considering other offers.
-
-
- virtual CORBA::ULong max_list (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong def_hop_count (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::ULong max_hop_count (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CosTrading::FollowOption def_follow_policy (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- virtual CosTrading::FollowOption max_follow_policy (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
-
-private:
-
- const TAO_Import_Attributes_Impl& attrs_;
-};
-
-template <class IF>
-class TAO_Link_Attributes : public virtual IF
-{
-public:
-
- TAO_Link_Attributes (const TAO_Link_Attributes_Impl& attrs);
-
- // = CosTrading::LinkAttributes methods
- virtual CosTrading::FollowOption max_link_follow_policy (CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
-private:
-
- const TAO_Link_Attributes_Impl& attrs_;
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Attributes.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_ATTRIBUTES_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint.cpp
deleted file mode 100644
index bd384d9984e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-
-#include "Constraint.h"
-
-char* TAO_Lex_String_Input::string_ = 0;
-char* TAO_Lex_String_Input::current_ = 0;
-char* TAO_Lex_String_Input::end_ = 0;
-
-// Routine to have Lex read its input from the constraint string.
-
-int
-TAO_Lex_String_Input::copy_into(char* buf, int max_size)
-{
- int chars_left = TAO_Lex_String_Input::end_ - TAO_Lex_String_Input::current_;
- int n = (max_size > chars_left) ? chars_left : max_size;
-
-
- if (n > 0)
- {
- memcpy(buf, TAO_Lex_String_Input::current_, n);
- TAO_Lex_String_Input::current_ += n;
- }
-
- return n;
-}
-
-void
-TAO_Lex_String_Input::reset(char* input_string)
-{
- TAO_Lex_String_Input::string_ = input_string;
- TAO_Lex_String_Input::current_ = input_string;
- TAO_Lex_String_Input::end_ = input_string +
- ACE_OS::strlen(TAO_Lex_String_Input::string_);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint.h
deleted file mode 100644
index ec0008d195b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_CONSTRAINT_H
-#define TAO_CONSTRAINT_H
-
-#include "Constraint_Nodes.h"
-
-// Functions we need for parsing.
-extern int yyparse(void);
-extern void yyrestart(FILE*);
-extern int yylex(void);
-
-// Have yylex read from the constraint string, not from stdin.
-#undef YY_INPUT
-#define YY_INPUT(b, r, ms) (r = TAO_Lex_String_Input::copy_into(b, ms))
-
-#undef yyerror
-#define yyerror(x)
-
-class TAO_Lex_String_Input
-// = TITLE
-// Stupid hack to have Lex read from a string and not from
-// stdin. Essentially, the interpreter needs to call yylex() until
-// EOF, and call TAO_Lex_String_Input::reset() with the new string,
-// prior to calling yyparse.
-{
-public:
-
- static void reset(char* input_string);
- // Reset the lex input.
-
- static int copy_into(char* buf, int max_size);
- // Method lex will call to read from the input string.
-
-private:
-
- static char* string_;
- static char* current_;
- static char* end_;
- // Pointers to keep track of the input string.
-};
-
-// The union used by lex and yacc to build the Abstract Syntax Tree.
-typedef union
-{
- TAO_Constraint* constraint_;
-} YYSTYPE;
-
-extern YYSTYPE yylval;
-extern YYSTYPE yyval;
-
-#endif /* CONSTRAINT_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.cpp
deleted file mode 100644
index 267a664b239..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.cpp
+++ /dev/null
@@ -1,627 +0,0 @@
-// Constraint_Evaluator.cpp
-// $Id$
-
-// ========================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Evaluator.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-
-#define get_left_operand() (this->queue_.rbegin()[1])
-#define get_right_operand() this->queue_.back()
-#define get_operand() this->queue_.back()
-
-#include "Constraint_Evaluator.h"
-
-TAO_Constraint_Evaluator::
-TAO_Constraint_Evaluator(CosTrading::Offer* offer,
- CORBA::Boolean supports_dp)
- : prop_eval_ (*offer, supports_dp)
-{
- this->props_.clear();
- int length = offer->properties.length();
-
- // Create a map of property names to their values.
- for (int i = 0; i < length; i++)
- {
- string name = (const char*)offer->properties[i].name;
- this->props_[name] = i;
- }
-}
-
-
-CORBA::Boolean
-TAO_Constraint_Evaluator::evaluate_constraint(TAO_Constraint* root)
-{
- CORBA::Boolean result = 0;
- while (! this->queue_.empty())
- this->queue_.pop_back();
-
- // Evaluate the offer according to the constraints in root_;
- if (root != 0)
- {
- if ((root->accept(this) == 0) &&
- (! this->queue_.empty ()))
- {
- result = (CORBA::Boolean) get_operand();
- this->queue_.pop_back ();
- }
- }
-
- // If a property couldn't be evaluated we must return 0.
- return result;
-}
-
-int
-TAO_Constraint_Evaluator::
-evaluate_preference(TAO_Constraint* root,
- TAO_Literal_Constraint& result)
-{
- int return_value = -1;
- while (! this->queue_.empty())
- this->queue_.pop_back();
-
- // Evaluate the offer according to the constraints in root_;
- if (root != 0)
- {
- if ((root->accept(this) == 0) &&
- (! this->queue_.empty ()))
- {
- result = get_operand();
- this->queue_.pop_back();
- return_value = 0;
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::visit_constraint(TAO_Unary_Constraint* constraint)
-{
- TAO_Constraint* operand = constraint->operand ();
- return operand->accept(this);
-}
-
-int
-TAO_Constraint_Evaluator::visit_with(TAO_Unary_Constraint* unary_with)
-{
- TAO_Constraint* operand = unary_with->operand ();
- return operand->accept(this);
-}
-
-int
-TAO_Constraint_Evaluator::visit_min(TAO_Unary_Constraint* unary_min)
-{
- TAO_Constraint* operand = unary_min->operand ();
- return operand->accept(this);
-}
-
-int
-TAO_Constraint_Evaluator::visit_max(TAO_Unary_Constraint* unary_max)
-{
- TAO_Constraint* operand = unary_max->operand ();
- return operand->accept(this);
-}
-
-int
-TAO_Constraint_Evaluator::visit_random(TAO_Noop_Constraint* noop_random)
-{
- TAO_Literal_Constraint random((CORBA::Long) (ACE_OS::rand ()));
- this->queue_.push_back(random);
- return 0;
-}
-
-int
-TAO_Constraint_Evaluator::visit_first(TAO_Noop_Constraint* noop_first)
-{
- TAO_Literal_Constraint first((CORBA::Long) 0);
- this->queue_.push_back (first);
- return 0;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_and(TAO_Binary_Constraint* boolean_and)
-{
- int return_value = -1;
- CORBA::Boolean result = (CORBA::Boolean) 0;
- TAO_Constraint* left = boolean_and->left_operand(),
- *right = boolean_and->right_operand();
-
- // Short circuiting AND.
-
- if (left->accept(this) == 0)
- {
- result = (CORBA::Boolean) get_operand();
- this->queue_.pop_back ();
-
- if (result)
- {
- if (right->accept(this) == 0)
- {
- result = (CORBA::Boolean) get_operand();
- this->queue_.pop_back ();
-
- return_value = 0;
- }
- }
- else
- return_value = 0;
- }
-
- if (return_value != -1)
- this->queue_.push_back (TAO_Literal_Constraint (result));
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_or(TAO_Binary_Constraint* boolean_or)
-{
- int return_value = -1;
- CORBA::Boolean result = (CORBA::Boolean) 0;
- TAO_Constraint* left = boolean_or->left_operand (),
- *right = boolean_or->right_operand ();
-
- // Short-circuiting OR.
-
- if (left->accept(this) == 0)
- {
- result = (CORBA::Boolean) get_operand();
- this->queue_.pop_back ();
-
- if (result == (CORBA::Boolean) 0)
- {
- if (right->accept (this) == 0)
- {
- result = (CORBA::Boolean) get_operand();
- this->queue_.pop_back();
- return_value = 0;
- }
- }
- else
- return_value = 0;
- }
-
- if (return_value != -1)
- this->queue_.push_back (TAO_Literal_Constraint (result));
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_not(TAO_Unary_Constraint* unary_not)
-{
- int return_value = -1;
- TAO_Constraint* operand = unary_not->operand();
-
- // Logical NOT.
-
- if (operand->accept(this) == 0)
- {
- CORBA::Boolean result = ! (CORBA::Boolean)get_operand();
- this->queue_.pop_back ();
- this->queue_.push_back (TAO_Literal_Constraint (result));
-
- return_value = 0;
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_exist(TAO_Unary_Constraint* unary_exist)
-{
- TAO_Property_Constraint* operand =
- (TAO_Property_Constraint*) unary_exist->operand ();
- string property_name ((const char*) operand->name ());
-
- // Determine if a property is defined on this offer.
-
- CORBA::Boolean result = (CORBA::Boolean)
- (this->props_.find (property_name) != this->props_.end());
-
- this->queue_.push_back (TAO_Literal_Constraint (result));
-
- return 0;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_unary_minus(TAO_Unary_Constraint* unary_minus)
-{
- int return_value = -1;
- TAO_Constraint* operand = unary_minus->operand();
-
- if (operand->accept(this) == 0)
- {
- TAO_Literal_Constraint& result = - get_operand();
- this->queue_.pop_back ();
- this->queue_.push_back (result);
-
- return_value = 0;
- }
-
- return return_value;
-}
-
-void
-TAO_Constraint_Evaluator::do_the_op (int operation)
-{
- TAO_Literal_Constraint& l_op = get_left_operand();
- TAO_Literal_Constraint& r_op = get_right_operand();
-
- // Perform the listed bindary operation on the first two elements on
- // the stack.
-
- TAO_Literal_Constraint& result =
- (operation <= TAO_NE)
- ?
- TAO_Literal_Constraint
- ((CORBA::Boolean)
- ((operation == TAO_GT) ? l_op > r_op :
- (operation == TAO_GE) ? l_op >= r_op :
- (operation == TAO_LT) ? l_op < r_op :
- (operation == TAO_LE) ? l_op <= r_op :
- (operation == TAO_NE) ? l_op != r_op :
- (operation == TAO_EQ) ? l_op == r_op : 0))
- :
- ((operation == TAO_PLUS) ? l_op + r_op :
- (operation == TAO_MINUS) ? l_op - r_op :
- (operation == TAO_MULT) ? l_op * r_op :
- (operation == TAO_DIV) ? l_op / r_op :
- TAO_Literal_Constraint ());
-
- this->queue_.pop_back ();
- this->queue_.pop_back ();
- this->queue_.push_back (result);
-}
-
-int
-TAO_Constraint_Evaluator::visit_bin_op (TAO_Binary_Constraint* op,
- int operation)
-{
- int return_value = -1;
- TAO_Constraint* left = op->left_operand(),
- *right = op->right_operand();
-
- // Perform an operation on the results of evaluating the left and
- // right branches of this subtree.
- if (left->accept (this) == 0)
- {
- if (right->accept (this) == 0)
- {
- this->do_the_op (operation);
- return_value = 0;
- }
- else
- this->queue_.pop_back ();
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_add(TAO_Binary_Constraint* boolean_add)
-{
- return this->visit_bin_op (boolean_add, TAO_PLUS);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_sub(TAO_Binary_Constraint* boolean_sub)
-{
- return this->visit_bin_op (boolean_sub, TAO_MINUS);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_mult(TAO_Binary_Constraint* boolean_mult)
-{
- return this->visit_bin_op (boolean_mult, TAO_MULT);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_div(TAO_Binary_Constraint* boolean_div)
-{
- return this->visit_bin_op (boolean_div, TAO_DIV);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_twiddle(TAO_Binary_Constraint* binary_twiddle)
-{
- int return_value = -1;
- TAO_Constraint* left = binary_twiddle->left_operand(),
- *right = binary_twiddle->right_operand();
-
- // Determine if the left operand is a substring of the right.
-
- if (left->accept (this) == 0)
- {
- if (right->accept(this) == 0)
- {
- TAO_Literal_Constraint& left_operand = get_left_operand();
- TAO_Literal_Constraint& right_operand = get_right_operand();
-
- CORBA::Boolean result = (CORBA::Boolean)
- (ACE_OS::strstr ((const char*)left_operand,
- (const char*)right_operand) != 0);
-
- this->queue_.pop_back();
- this->queue_.pop_back();
- this->queue_.push_back (TAO_Literal_Constraint (result));
- return_value = 0;
- }
- else
- this->queue_.pop_back ();
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_in(TAO_Binary_Constraint* binary_in)
-{
- int return_value = -1;
- TAO_Constraint* left = binary_in->left_operand(),
- *right = binary_in->right_operand();
-
- // Determine if the left operand is contained in the right.
-
- if (left->accept(this) == 0)
- {
- if (this->visit_property ((TAO_Property_Constraint*) right) == 0)
- {
- TAO_Literal_Constraint& left_value = get_left_operand();
- const CORBA::Any* any = (const CORBA::Any*) get_right_operand();
-
- if (any != 0)
- {
- CORBA::Boolean result =
- this->sequence_does_contain ((CORBA::Any*) any, left_value);
-
- this->queue_.pop_back ();
- this->queue_.pop_back ();
- this->queue_.push_back (TAO_Literal_Constraint (result));
- return_value = 0;
- }
- else
- this->queue_.pop_back ();
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_less_than(TAO_Binary_Constraint* boolean_lt)
-{
- return this->visit_bin_op (boolean_lt, TAO_LT);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_less_than_equal(TAO_Binary_Constraint* boolean_lte)
-{
- return this->visit_bin_op (boolean_lte, TAO_LE);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_greater_than(TAO_Binary_Constraint* boolean_gt)
-{
- return this->visit_bin_op (boolean_gt, TAO_GT);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_greater_than_equal(TAO_Binary_Constraint* boolean_gte)
-{
- return this->visit_bin_op (boolean_gte, TAO_GE);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_equal(TAO_Binary_Constraint* boolean_eq)
-{
- return this->visit_bin_op (boolean_eq, TAO_EQ);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_not_equal(TAO_Binary_Constraint* boolean_neq)
-{
- return this->visit_bin_op (boolean_neq, TAO_NE);
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_literal(TAO_Literal_Constraint* literal)
-{
- this->queue_.push_back (*literal);
- return 0;
-}
-
-int
-TAO_Constraint_Evaluator::
-visit_property(TAO_Property_Constraint* literal)
-{
- int return_value = -1;
- // Handle case where property is not, in fact, mapped to a value
- string prop_name((const char*) literal->name ());
- Property_Map_Iter prop_iter = this->props_.find (prop_name);
-
- if (prop_iter != this->props_.end())
- {
- CORBA::Environment env;
- // Retrieve the value of the property from the Property_Evaluator
- int prop_index = (*prop_iter).second;
-
- CORBA::Any* value =
- this->prop_eval_.property_value (prop_index, env);
-
- if (value != 0)
- {
- this->queue_.push_back (TAO_Literal_Constraint (value));
- return_value = 0;
- }
- }
-
- return return_value;
-}
-
-
-template <class SEQ, class OPERAND_TYPE> CORBA::Boolean
-TAO_find (SEQ& sequence, const OPERAND_TYPE element)
-{
- int length = sequence.length(),
- return_value = 0;
-
- for (int i = 0; i < length; i++)
- {
- if (sequence[i] == element)
- {
- return_value = 1;
- break;
- }
- }
-
- return (CORBA::Boolean) return_value;
-}
-
-#ifdef ACE_HAS_TEMPLATE_SPECIALIZATION
-template<> CORBA::Boolean
-TAO_find (TAO_Sequences::StringSeq& sequence, const char* element)
-#else
-CORBA::Boolean
-TAO_find_string (TAO_Sequences::StringSeq& sequence, const char* element)
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-{
- int length = sequence.length(),
- return_value = 0;
-
- for (int i = 0; i < length; i++)
- {
- if (ACE_OS::strcmp(sequence[i], element) == 0)
- {
- return_value = 1;
- break;
- }
- }
-
- return (CORBA::Boolean) return_value;
-}
-
-CORBA::Boolean
-TAO_Constraint_Evaluator::
-sequence_does_contain(CORBA::Any* sequence,
- TAO_Literal_Constraint& element)
-{
- // Helper method to cast the void* value returned from the sequence
- // any into a sequence type locally compiled from idl. The sequence
- // wrapper uses the [] operator to locate the target element in the
- // sequence.
-
- CORBA::Environment env;
- CORBA::Boolean return_value = CORBA::B_FALSE;
- CORBA::TypeCode_ptr type = sequence->type ();
- CORBA::TypeCode_ptr content = type->content_type (env);
- TAO_CHECK_ENV_RETURN (env, return_value);
- CORBA::TCKind sequence_type = content->kind (env);
- TAO_CHECK_ENV_RETURN (env, return_value);
-
- // What's up with this?
- if (sequence_type == CORBA::tk_sequence)
- {
- CORBA::TypeCode_ptr tmp = content->content_type (env);
- TAO_CHECK_ENV_RETURN (env, return_value);
- sequence_type = tmp->kind (env);
- TAO_CHECK_ENV_RETURN (env, return_value);
- }
-
- /*
- switch(sequence_type)
- {
- case CORBA::tk_short:
- {
- TAO_Sequences::ShortSeq short_seq;
- if ((*sequence) >>= short_seq)
- return_value = ::TAO_find (short_seq, (CORBA::Long)element);
- }
- break;
- case CORBA::tk_ushort:
- {
- TAO_Sequences::UShortSeq ushort_seq;
- if ((*sequence) >>= ushort_seq)
- return_value = ::TAO_find (ushort_seq, (CORBA::ULong)element);
- }
- break;
- case CORBA::tk_long:
- {
- TAO_Sequences::LongSeq long_seq;
- if ((*sequence) >>= long_seq)
- return_value = ::TAO_find (long_seq, (CORBA::Long)element);
- }
- break;
- case CORBA::tk_ulong:
- {
- TAO_Sequences::ULongSeq ulong_seq;
- if ((*sequence) >>= ulong_seq)
- return_value = ::TAO_find (ulong_seq, (CORBA::ULong)element);
- }
- break;
- case CORBA::tk_float:
- {
- TAO_Sequences::FloatSeq float_seq;
- if ((*sequence) >>= float_seq)
- return_value = ::TAO_find (float_seq, (CORBA::Double)element);
- }
- break;
- case CORBA::tk_double:
- {
- TAO_Sequences::DoubleSeq double_seq;
- if ((*sequence) >>= double_seq)
- return_value = ::TAO_find (double_seq, (CORBA::Double)element);
- }
- break;
- case CORBA::tk_boolean:
- {
- TAO_Sequences::BooleanSeq bool_seq;
- if ((*sequence) >>= bool_seq)
- return_value = ::TAO_find (bool_seq, (CORBA::ULong)element);
- }
- break;
- case CORBA::tk_string:
- {
- TAO_Sequences::StringSeq string_seq;
- if ((*sequence) >>= string_seq)
- {
-#ifdef ACE_HAS_TEMPLATE_SPECIALIZATION
- return_value = ::TAO_find (string_seq, (const char *)element);
-#else
- return_value = ::TAO_find_string (string_seq, (const char*) element);
-#endif // ACE_HAS_TEMPLATE_SPECIALIZATION
- }
- break;
- }
- }
- */
-return return_value;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.h
deleted file mode 100644
index 88e8ae9cd07..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Evaluator.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ========================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Evaluator.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_CONSTRAINT_EVALUATOR_H
-#define TAO_CONSTRAINT_EVALUATOR_H
-
-#include <map>
-#include <deque>
-#include <string>
-
-#include "Property_Evaluator.h"
-#include "Constraint_Visitor.h"
-#include "Constraint_Nodes.h"
-
-#include "orbsvcs/SequencesC.h"
-
-class TAO_Constraint_Evaluator : public TAO_Constraint_Visitor
-//
-// = TITLE
-// TAO_Constraint_Evaluator traverse a constraint expression tree,
-// and determines whether an offer fits the constraints
-// represented by the tree
-//
-// = DESCRIPTION
-// Using the Visitor pattern, the TAO_Constraint_Evaluator has each
-// node of the expression tree call back to it with the method
-// designated for its type. In that method, the visitor will
-// evaluate its operands and perform the operation designated by
-// that node's type, and return the result. Note: the
-// EvaluationVisitor assumes the tree is semantically correct,
-// that is, the validate method on SemanticValidatorVisitor return
-// true. The only possible evaluation time error is a divide by a
-// property whose value is zero.
-{
-public:
-
- TAO_Constraint_Evaluator(CosTrading::Offer* offer,
- CORBA::Boolean supports_dynamic_properties = 1);
-
- CORBA::Boolean evaluate_constraint(TAO_Constraint* root);
- // Evaluate returns 1 if the offer satisfies the constraints
- // represented by the the expression tree rooted at <root>, 0 if it
- // doesn't. If an error occurs during process, the constraint
- // automatically fails.
-
- int evaluate_preference(TAO_Constraint* root,
- TAO_Literal_Constraint& result);
- // The result of the preference evaluation is stored in result. The
- // method returns 0 upon success, -1 upon failure.
-
- // = Visitor Methods
-
- virtual int visit_constraint(TAO_Unary_Constraint* constraint);
-
- virtual int visit_with(TAO_Unary_Constraint* unary_with);
- virtual int visit_min(TAO_Unary_Constraint* unary_min);
- virtual int visit_max(TAO_Unary_Constraint* unary_max);
- virtual int visit_first(TAO_Noop_Constraint* noop_first);
- virtual int visit_random(TAO_Noop_Constraint* noop_random);
-
- virtual int visit_and(TAO_Binary_Constraint* boolean_and);
- // Takes the logical and of the results of both operands. Note that
- // in the case where the left operand returns zero, the result is
- // immediately known.
-
- virtual int visit_or(TAO_Binary_Constraint* boolean_or);
- // Takes the logical or of the results of both operands. Note that
- // in the case where the left operand returns one, the result is
- // immediately known.
-
- virtual int visit_not(TAO_Unary_Constraint* unary_not);
- // Logically negates the value of the operand.
-
- virtual int visit_exist(TAO_Unary_Constraint* unary_exist);
- // The property exists if its name is bound to a value in the
- // <props_> map.
-
- virtual int visit_unary_minus(TAO_Unary_Constraint* unary_minus);
- // Mathematically negates the return value the operand.
-
- virtual int visit_add(TAO_Binary_Constraint* boolean_add);
- // Add the results of evaluating the left and right operands.
-
- virtual int visit_sub(TAO_Binary_Constraint* boolean_sub);
- // Subtract the results of evaluating the left and right operands.
-
- virtual int visit_mult(TAO_Binary_Constraint* boolean_mult);
- // Multiply the results of evaluating the left and right operands.
-
- virtual int visit_div(TAO_Binary_Constraint* boolean_div);
- // Divide the results of evaluating the left and right operands.
-
- virtual int visit_twiddle(TAO_Binary_Constraint* binary_twiddle);
- // Determines if the right operand is a substring of the left.
-
- virtual int visit_in(TAO_Binary_Constraint* binary_in);
- // Determines if the sequence represented by the right operand
- // contains the left operand.
-
- // = Compare the results of evaluating left and right operands.
- virtual int visit_less_than(TAO_Binary_Constraint* boolean_lt);
- virtual int visit_less_than_equal(TAO_Binary_Constraint* boolean_lte);
- virtual int visit_greater_than(TAO_Binary_Constraint* boolean_gt);
- virtual int visit_greater_than_equal(TAO_Binary_Constraint* boolean_gte);
- virtual int visit_equal(TAO_Binary_Constraint* boolean_eq);
- virtual int visit_not_equal(TAO_Binary_Constraint* boolean_neq);
-
- virtual int visit_literal(TAO_Literal_Constraint* literal);
- // Copy the value of the literal into the result container.
-
- virtual int visit_property(TAO_Property_Constraint* literal);
- // Copy the value of the property into the result container.
-
-private:
-
- typedef map<string, int, less<string> > Property_Map;
- typedef Property_Map::iterator Property_Map_Iter;
- typedef deque<TAO_Literal_Constraint> Operand_Queue;
-
- void do_the_op (int operation);
- int visit_bin_op (TAO_Binary_Constraint* op, int operation);
-
-
- CORBA::Boolean sequence_does_contain(CORBA::Any* sequence,
- TAO_Literal_Constraint& element);
- // Determine if sequence contains <element>, a literal of the same
- // simple type as <sequence_type>. Return 1 in this eventuality.
-
- TAO_Literal_Constraint& left_operand(void);
- TAO_Literal_Constraint& right_operand(void);
-
- Property_Map props_;
- // The map of property names to their values for a property.
-
- TAO_Property_Evaluator prop_eval_;
- // Utility with which to evaluate the properties of an offer, be
- // they dyanmic or static.
-
- Operand_Queue queue_;
- // The result of a non_boolean operation.
-};
-
-template <class SEQ, class OPERAND_TYPE>
-CORBA::Boolean TAO_find (SEQ& sequence, const OPERAND_TYPE operand);
-
-#ifdef ACE_HAS_TEMPLATE_SPECIALIZATION
-template<>
-CORBA::Boolean TAO_find (StringSeq& sequence, const char* element);
-#else
-CORBA::Boolean TAO_find_string (StringSeq& sequence, const char* element);
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-
-#endif /* CONSTRAINT_EVALUATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.cpp
deleted file mode 100644
index 4077030341f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// Constraint_Interpreter.cpp
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Interpreter.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-
-#include "Constraint_Interpreter.h"
-#include <ctype.h>
-#include <stdio.h>
-
-TAO_Constraint_Interpreter::
-TAO_Constraint_Interpreter(CosTradingRepos::ServiceTypeRepository::TypeStruct* ts,
- const char* constraints,
- CORBA::Environment& _env)
- TAO_THROW_SPEC (CosTrading::IllegalConstraint)
- : TAO_Interpreter ()
-{
- TAO_Constraint_Validator type_checker(ts);
-
- if (TAO_Interpreter::is_empty_string (constraints))
- this->root_ = new TAO_Literal_Constraint ((CORBA::Boolean) 1);
- else
- {
- if (this->build_tree (constraints) != 0)
- TAO_THROW (CosTrading::IllegalConstraint (constraints));
-
- if (type_checker.validate (this->root_) == -1)
- TAO_THROW (CosTrading::IllegalConstraint (constraints));
- }
-}
-
-TAO_Constraint_Interpreter::
-TAO_Constraint_Interpreter(TAO_Constraint_Validator& validator,
- const char* constraints,
- CORBA::Environment& _env)
- TAO_THROW_SPEC (CosTrading::IllegalConstraint)
-{
- if (TAO_Interpreter::is_empty_string (constraints))
- this->root_ = new TAO_Literal_Constraint ((CORBA::Boolean) 1);
- else
- {
- if (this->build_tree (constraints) != 0)
- TAO_THROW (CosTrading::IllegalConstraint (constraints));
-
- if (validator.validate (this->root_) == -1)
- TAO_THROW (CosTrading::IllegalConstraint (constraints));
- }
-}
-
-TAO_Constraint_Interpreter::~TAO_Constraint_Interpreter (void)
-{
-}
-
-CORBA::Boolean
-TAO_Constraint_Interpreter::evaluate (CosTrading::Offer* offer)
-{
- TAO_Constraint_Evaluator evaluator (offer);
- return evaluator.evaluate_constraint (this->root_);
-}
-
-CORBA::Boolean
-TAO_Constraint_Interpreter::evaluate(TAO_Constraint_Evaluator& evaluator)
-{
- return evaluator.evaluate_constraint (this->root_);
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.h
deleted file mode 100644
index c1247b6d5ff..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Interpreter.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Interpreter.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_CONSTRAINT_INTERPRETER_H
-#define TAO_CONSTRAINT_INTERPRETER_H
-
-#include <stack>
-#include <deque>
-#include "Interpreter.h"
-#include "Constraint_Validator.h"
-#include "Constraint_Evaluator.h"
-
-class TAO_Constraint_Interpreter : public TAO_Interpreter
-//
-// = TITLE
-// TAO_Constraint_Interpreter will, given a constraint string whose
-// syntax and semantics comply with the trader specification for the
-// constraint language, determine if a CosTrading::Offer meets the
-// constraints.
-//
-// = DESCRIPTION
-// TAO_Constraint_Interpreter will first build an expression tree
-// representing the constraint expression using Lex and Yacc. Then,
-// using a TAO_Constraint_Validator, it will validate the semantic
-// correctness of the tree. When the evaluate method is invoked with
-// an Offer, the TAO_Constraint_Interpreter will construct an
-// EvaluationVisitor, which will evaluate the tree and decide
-// whether the offer meets the constraints.
-{
-public:
-
- TAO_Constraint_Interpreter(CosTradingRepos::ServiceTypeRepository::TypeStruct* ts,
- const char* constraints,
- CORBA::Environment& env)
- TAO_THROW_SPEC (CosTrading::IllegalConstraint);
-
- TAO_Constraint_Interpreter(TAO_Constraint_Validator& validator,
- const char* constraints,
- CORBA::Environment& env)
- TAO_THROW_SPEC (CosTrading::IllegalConstraint);
- // This constructor builds an expression tree representing the
- // constraint specified in <constraints>, and throws an Illegal
- // Constraint exception if the constraint given has syntax errors or
- // semantic errors, such as mismatched types.
-
- ~TAO_Constraint_Interpreter(void);
- // Destructor
-
- CORBA::Boolean evaluate(CosTrading::Offer* offer);
-
- CORBA::Boolean evaluate(TAO_Constraint_Evaluator& evaluator);
-
- // Determine whether an offer fits the constraints with which the
- // tree was constructed. This method is thread safe (hopefully).
-};
-
-#endif /* TAO_CONSTRAINT_INTERPRETER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.cpp
deleted file mode 100644
index d3b790adcd3..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.cpp
+++ /dev/null
@@ -1,917 +0,0 @@
-// Constraint_Nodes.cpp
-
-// =====================================================================
-// $Id$
-//
-// = LIBRARY
-// Lookup
-//
-// = FILENAME
-// Constraint_Nodes.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =====================================================================
-
-
-#include "Constraint_Nodes.h"
-
-const CORBA::Long MAX_SIGNED_INTEGER = (~(CORBA::Long)0) >> 1;
-const CORBA::Long MIN_SIGNED_INTEGER = ~(MAX_SIGNED_INTEGER);
-const CORBA::ULong MAX_UNSIGNED_INTEGER = (~(CORBA::ULong)0);
-
-int
-TAO_Noop_Constraint::accept(TAO_Constraint_Visitor* visitor)
-{
- int return_value = -1;
- switch(this->type_)
- {
- case TAO_FIRST:
- return_value = visitor->visit_first(this);
- break;
- case TAO_RANDOM:
- return_value = visitor->visit_random(this);
- }
-
- return return_value;
-}
-
-TAO_Binary_Constraint::
-TAO_Binary_Constraint(TAO_Expression_Type op_type,
- TAO_Constraint* left,
- TAO_Constraint* right)
- : op_ (op_type),
- left_ (left),
- right_ (right)
-{
-}
-
-TAO_Binary_Constraint::~TAO_Binary_Constraint()
-{
- delete left_;
- delete right_;
-}
-
-// Dispatch table for the accept method
-static int (*dispatch_table[]) (TAO_Constraint_Visitor*,
- TAO_Binary_Constraint*)=
-{
- TAO_Binary_Constraint::visit_greater_than,
- TAO_Binary_Constraint::visit_greater_than_equal,
- TAO_Binary_Constraint::visit_less_than,
- TAO_Binary_Constraint::visit_less_than_equal,
- TAO_Binary_Constraint::visit_equal,
- TAO_Binary_Constraint::visit_not_equal,
- 0,
- TAO_Binary_Constraint::visit_and,
- TAO_Binary_Constraint::visit_or,
- 0,
- TAO_Binary_Constraint::visit_in,
- TAO_Binary_Constraint::visit_twiddle,
- 0,
- TAO_Binary_Constraint::visit_add,
- TAO_Binary_Constraint::visit_sub,
- TAO_Binary_Constraint::visit_mult,
- TAO_Binary_Constraint::visit_div
-};
-
-// Simulate the fun of actual double dispatching.
-int
-TAO_Binary_Constraint::accept(TAO_Constraint_Visitor* visitor)
-{
- int offset = this->op_ - TAO_GT,
- return_value = -1;
-
- if (dispatch_table[offset] != 0)
- return_value = dispatch_table[offset](visitor, this);
-
- return return_value;
-}
-
-int
-TAO_Binary_Constraint::
-visit_or(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_or(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_and(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_and(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_less_than(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_less_than(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_less_than_equal(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_less_than_equal(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_greater_than(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_greater_than(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_greater_than_equal(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_greater_than_equal(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_equal(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_equal(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_not_equal(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_not_equal(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_add(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_add(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_sub(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_sub(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_mult(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_mult(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_div(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_div(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_twiddle(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_twiddle(expr);
-}
-
-int
-TAO_Binary_Constraint::
-visit_in(TAO_Constraint_Visitor* visitor,
- TAO_Binary_Constraint* expr)
-{
- return visitor->visit_in(expr);
-}
-
-
-TAO_Constraint*
-TAO_Binary_Constraint::left_operand()
-{
- return this->left_;
-}
-
-TAO_Constraint*
-TAO_Binary_Constraint::right_operand()
-{
- return this->right_;
-}
-
-TAO_Unary_Constraint::
-TAO_Unary_Constraint(TAO_Expression_Type op_type,
- TAO_Constraint* operand)
- : op_ (op_type),
- operand_ (operand)
-{
-}
-
-TAO_Unary_Constraint::~TAO_Unary_Constraint()
-{
- delete operand_;
-}
-
-
-int
-TAO_Unary_Constraint::accept(TAO_Constraint_Visitor* visitor)
-{
- // Since there are only three unary operators, there's no need for a
- // dispatch table.
- int return_value = -1;
- switch (this->op_)
- {
- case TAO_CONSTRAINT:
- return_value = visitor->visit_constraint(this);
- break;
- case TAO_WITH:
- return_value = visitor->visit_with(this);
- break;
- case TAO_MIN:
- return_value = visitor->visit_min(this);
- break;
- case TAO_MAX:
- return_value = visitor->visit_max(this);
- break;
- case TAO_NOT:
- return_value = visitor->visit_not(this);
- break;
- case TAO_UMINUS:
- return_value = visitor->visit_unary_minus(this);
- break;
- case TAO_EXIST:
- return_value = visitor->visit_exist(this);
- break;
- }
-
- return return_value;
-}
-
-TAO_Constraint*
-TAO_Unary_Constraint::operand()
-{
- return this->operand_;
-}
-
-TAO_Property_Constraint::
-TAO_Property_Constraint(const char* name)
- : name_ (ACE_OS::strdup (name))
-{
-}
-
-TAO_Property_Constraint::~TAO_Property_Constraint()
-{
- delete this->name_;
-}
-
-int
-TAO_Property_Constraint::accept(TAO_Constraint_Visitor* visitor)
-{
- return visitor->visit_property(this);
-}
-
-const char*
-TAO_Property_Constraint::name() const
-{
- return name_;
-}
-
-TAO_Literal_Constraint::
-TAO_Literal_Constraint (const TAO_Literal_Constraint& lit)
-{
- this->copy (lit);
-}
-
-
-TAO_Literal_Constraint::
-TAO_Literal_Constraint(CORBA::Any* any)
- : type_ (TAO_Literal_Constraint::comparable_type (any->type ()))
-{
- CORBA::Environment env;
- CORBA::Any& any_ref = *any;
- CORBA::TCKind corba_type = any_ref.type()->kind(env);
- TAO_CHECK_ENV_RETURN (env,);
-
- switch(this->type_)
- {
- case TAO_SIGNED:
- this->op_.integer_ = 0;
- if (corba_type == CORBA::tk_short)
- {
- CORBA::Short sh;
- any_ref >>= sh;
- this->op_.integer_ = (CORBA::Long)sh;
- }
- else
- any_ref >>= this->op_.integer_;
- break;
- case TAO_UNSIGNED:
- this->op_.uinteger_ = 0;
- if (corba_type == CORBA::tk_ushort)
- {
- CORBA::UShort sh;
- any_ref >>= sh;
- this->op_.uinteger_ = (CORBA::ULong)sh;
- }
- else
- any_ref >>= this->op_.uinteger_;
- break;
- case TAO_DOUBLE:
- if (corba_type == CORBA::tk_float)
- {
- CORBA::Float fl;
- (*any) >>= fl;
- this->op_.double_ = (CORBA::Double)fl;
- }
- else
- (*any) >>= this->op_.double_;
- break;
- case TAO_BOOLEAN:
- {
- CORBA_Any::to_boolean tmp(this->op_.bool_);
- (*any) >>= tmp;
- }
- break;
- case TAO_STRING:
- {
- char * s;
- any_ref >>= s;
- this->op_.str_ = ACE_OS::strdup(s);
- }
- break;
- case TAO_SEQUENCE:
- this->op_.any_ = any;
- }
-}
-
-TAO_Literal_Constraint::TAO_Literal_Constraint(CORBA::ULong uinteger)
- : type_ (TAO_UNSIGNED)
-{
- this->op_.uinteger_ = uinteger;
-}
-
-TAO_Literal_Constraint::TAO_Literal_Constraint(CORBA::Long integer)
- : type_ (TAO_SIGNED)
-{
- this->op_.integer_ = integer;
-}
-
-TAO_Literal_Constraint::TAO_Literal_Constraint(CORBA::Boolean boolean)
- : type_ (TAO_BOOLEAN)
-{
- this->op_.bool_ = boolean;
-}
-
-TAO_Literal_Constraint::TAO_Literal_Constraint(CORBA::Double doub)
- : type_ (TAO_DOUBLE)
-{
- this->op_.double_ = doub;
-}
-
-TAO_Literal_Constraint::TAO_Literal_Constraint(const char* str)
- : type_ (TAO_STRING)
-{
- this->op_.str_ = ACE_OS::strdup(str);
-}
-
-TAO_Literal_Constraint::~TAO_Literal_Constraint(void)
-{
- if (this->type_ == TAO_STRING)
- free (this->op_.str_);
-}
-
-int
-TAO_Literal_Constraint::accept(TAO_Constraint_Visitor* visitor)
-{
- return visitor->visit_literal(this);
-}
-
-void
-TAO_Literal_Constraint::operator= (const TAO_Literal_Constraint& co)
-{
- this->copy (co);
-}
-
-TAO_Literal_Constraint::operator CORBA::Boolean(void) const
-{
- return (this->type_ == TAO_BOOLEAN) ? this->op_.bool_ : CORBA::B_FALSE;
-}
-
-TAO_Literal_Constraint::operator CORBA::ULong(void) const
-{
- CORBA::ULong return_value = (CORBA::ULong)0;
-
- if (this->type_ == TAO_UNSIGNED)
- return_value = this->op_.uinteger_;
- else if (this->type_ == TAO_SIGNED)
- return_value =
- (this->op_.integer_ > 0) ? (CORBA::ULong)this->op_.integer_ : 0;
- else if (this->type_ == TAO_DOUBLE)
- return_value =
- (this->op_.double_ > 0) ?
- ((this->op_.double_ > MAX_UNSIGNED_INTEGER) ?
- MAX_UNSIGNED_INTEGER :
- (CORBA::ULong)this->op_.double_)
- : 0;
-
- return return_value;
-}
-
-TAO_Literal_Constraint::operator CORBA::Long(void) const
-{
- CORBA::Long return_value = (CORBA::Long)0;
-
- if (this->type_ == TAO_SIGNED)
- return_value = this->op_.integer_;
- else if (this->type_ == TAO_UNSIGNED)
- return_value =
- (this->op_.uinteger_ > MAX_SIGNED_INTEGER) ?
- MAX_SIGNED_INTEGER : this->op_.uinteger_;
- else if (this->type_ == TAO_DOUBLE)
- return_value =
- (this->op_.double_ > 0) ?
- ((this->op_.double_ > MAX_SIGNED_INTEGER) ?
- MAX_SIGNED_INTEGER :
- (CORBA::Long)this->op_.double_) :
- ((this->op_.double_ < MIN_SIGNED_INTEGER) ?
- MIN_SIGNED_INTEGER :
- (CORBA::Long)this->op_.double_);
-
- return return_value;
-}
-
-TAO_Literal_Constraint::operator CORBA::Double(void) const
-{
- CORBA::Double return_value = (CORBA::Double)0.0;
-
- if (this->type_ == TAO_DOUBLE)
- return_value = this->op_.double_;
- else if (this->type_ == TAO_SIGNED)
- return_value = (CORBA::Double)this->op_.integer_;
- else if (this->type_ == TAO_UNSIGNED)
- return_value = (CORBA::Double)this->op_.uinteger_;
-
- return return_value;
-}
-
-TAO_Literal_Constraint::operator const char* (void) const
-{
- return (this->type_ == TAO_STRING) ? this->op_.str_ : 0;
-}
-
-TAO_Literal_Constraint::operator const CORBA::Any* (void) const
-{
- return (this->type_ == TAO_SEQUENCE) ? this->op_.any_ : 0;
-}
-
-TAO_Expression_Type
-TAO_Literal_Constraint::comparable_type (CORBA::TypeCode_ptr type)
-{
- // Convert a CORBA::TCKind into a TAO_Literal_Type
- CORBA::Environment env;
- TAO_Expression_Type return_value = TAO_UNKNOWN;
- CORBA::TCKind kind = type->kind(env);
- TAO_CHECK_ENV_RETURN (env, return_value);
-
- switch (kind)
- {
- case CORBA::tk_ushort:
- case CORBA::tk_ulong:
- return_value = TAO_UNSIGNED;
- break;
- case CORBA::tk_long:
- case CORBA::tk_short:
- return_value = TAO_SIGNED;
- break;
- case CORBA::tk_boolean:
- return_value = TAO_BOOLEAN;
- break;
- case CORBA::tk_float:
- case CORBA::tk_double:
- return_value = TAO_DOUBLE;
- break;
- case CORBA::tk_string:
- return_value = TAO_STRING;
- break;
- case CORBA::tk_sequence:
- return_value = TAO_SEQUENCE;
- break;
- case CORBA::tk_alias:
- {
- CORBA::TypeCode_ptr typecode = type->content_type (env);
- TAO_CHECK_ENV_RETURN (env, return_value);
- CORBA::TCKind kind = typecode->kind (env);
- TAO_CHECK_ENV_RETURN (env, return_value);
-
- if (kind == CORBA::tk_sequence)
- return_value = TAO_SEQUENCE;
- }
- break;
- default:
- return_value = TAO_UNKNOWN;
- }
-
- return return_value;
-}
-
-int
-operator== (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- int return_value = 0;
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_STRING:
- return_value = (ACE_OS::strcmp((const char*)left, (const char*)right) == 0);
- break;
- case TAO_DOUBLE:
- return_value = (CORBA::Double)left == (CORBA::Double)right;
- break;
- case TAO_SIGNED:
- return_value = (CORBA::Long)left == (CORBA::Long)right;
- break;
- case TAO_UNSIGNED:
- return_value = (CORBA::ULong)left == (CORBA::ULong)right;
- break;
- case TAO_BOOLEAN:
- return_value = (CORBA::Boolean)left == (CORBA::Boolean)right;
- break;
- }
-
- return return_value;
-}
-
-
-int
-operator!= (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- int return_value = 0;
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_STRING:
- return_value = (ACE_OS::strcmp((const char*)left, (const char*)right) != 0);
- break;
- case TAO_DOUBLE:
- return_value = (CORBA::Double)left != (CORBA::Double)right;
- break;
- case TAO_SIGNED:
- return_value = (CORBA::Long)left != (CORBA::Long)right;
- break;
- case TAO_UNSIGNED:
- return_value = (CORBA::ULong)left != (CORBA::ULong)right;
- break;
- case TAO_BOOLEAN:
- return_value = (CORBA::Boolean)left != (CORBA::Boolean)right;
- break;
- }
-
- return return_value;
-}
-
-int
-operator< (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- int return_value = 0;
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_STRING:
- return_value = (ACE_OS::strcmp((const char*)left, (const char*)right) < 0);
- break;
- case TAO_DOUBLE:
- return_value = (CORBA::Double)left < (CORBA::Double)right;
- break;
- case TAO_SIGNED:
- return_value = (CORBA::Long)left < (CORBA::Long)right;
- break;
- case TAO_UNSIGNED:
- return_value = (CORBA::ULong)left < (CORBA::ULong)right;
- break;
- case TAO_BOOLEAN:
- return_value = (CORBA::Boolean) left < (CORBA::Boolean) right;
- break;
- }
-
- return return_value;
-}
-
-int
-operator<= (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- int return_value = 0;
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_STRING:
- return_value = (ACE_OS::strcmp((const char*)left, (const char*)right) <= 0);
- break;
- case TAO_DOUBLE:
- return_value = (CORBA::Double)left <= (CORBA::Double)right;
- break;
- case TAO_SIGNED:
- return_value = (CORBA::Long)left <= (CORBA::Long)right;
- break;
- case TAO_UNSIGNED:
- return_value = (CORBA::ULong)left <= (CORBA::ULong)right;
- break;
- }
-
- return return_value;
-}
-
-int
-operator> (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- int return_value = 0;
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_STRING:
- return_value = (ACE_OS::strcmp((const char*)left, (const char*)right) > 0);
- break;
- case TAO_DOUBLE:
- return_value = (CORBA::Double)left > (CORBA::Double)right;
- break;
- case TAO_SIGNED:
- return_value = (CORBA::Long)left > (CORBA::Long)right;
- break;
- case TAO_UNSIGNED:
- return_value = (CORBA::ULong)left > (CORBA::ULong)right;
- break;
- }
-
- return return_value;
-}
-
-int
-operator>= (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- int return_value = 0;
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_STRING:
- return_value = (ACE_OS::strcmp((const char*)left, (const char*)right) >= 0);
- break;
- case TAO_DOUBLE:
- return_value = (CORBA::Double)left >= (CORBA::Double)right;
- break;
- case TAO_SIGNED:
- return_value = (CORBA::Long)left >= (CORBA::Long)right;
- break;
- case TAO_UNSIGNED:
- return_value = (CORBA::ULong)left >= (CORBA::ULong)right;
- break;
- }
-
- return return_value;
-}
-
-
-int
-operator== (CORBA::Double left, const TAO_Literal_Constraint& right)
-{
- return (left == (CORBA::Double) right);
-}
-
-int
-operator== (const TAO_Sequences::StringSeq::Manager& left,
- const TAO_Literal_Constraint& right)
-{
- int result = 0;
-
- if ((const char*)right != 0)
- result = ACE_OS::strcmp ((const char*) left,
- (const char*) right) == 0;
- return result;
-}
-
-
-TAO_Literal_Constraint
-operator+ (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_DOUBLE:
- {
- CORBA::Double result = (CORBA::Double)left + (CORBA::Double)right;
- return TAO_Literal_Constraint((CORBA::Double)result);
- }
- break;
- case TAO_SIGNED:
- {
- CORBA::Long result = (CORBA::Long)left + (CORBA::Long)right;
- return TAO_Literal_Constraint((CORBA::Long)result);
- }
- break;
- case TAO_UNSIGNED:
- {
- CORBA::ULong result = (CORBA::ULong)left + (CORBA::ULong)right;
- return TAO_Literal_Constraint((CORBA::ULong)result);
- }
- break;
- default:
- return TAO_Literal_Constraint((CORBA::Long)0);
- }
-}
-
-TAO_Literal_Constraint
-operator- (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_DOUBLE:
- {
- CORBA::Double result = (CORBA::Double)left - (CORBA::Double)right;
- return TAO_Literal_Constraint((CORBA::Double)result);
- }
- break;
- case TAO_SIGNED:
- {
- CORBA::Long result = (CORBA::Long)left - (CORBA::Long)right;
- return TAO_Literal_Constraint((CORBA::Long)result);
- }
- break;
- case TAO_UNSIGNED:
- {
- CORBA::ULong result = (CORBA::ULong)left - (CORBA::ULong)right;
- return TAO_Literal_Constraint((CORBA::ULong)result);
- }
- break;
- default:
- return TAO_Literal_Constraint((CORBA::Long)0);
- }
-}
-
-TAO_Literal_Constraint
-operator* (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_DOUBLE:
- {
- CORBA::Double result = (CORBA::Double)left * (CORBA::Double)right;
- return TAO_Literal_Constraint((CORBA::Double)result);
- }
- break;
- case TAO_SIGNED:
- {
- CORBA::Long result = (CORBA::Long)left * (CORBA::Long)right;
- return TAO_Literal_Constraint((CORBA::Long)result);
- }
- break;
- case TAO_UNSIGNED:
- {
- CORBA::ULong result = (CORBA::ULong)left * (CORBA::ULong)right;
- return TAO_Literal_Constraint((CORBA::ULong)result);
- }
- break;
- default:
- return TAO_Literal_Constraint((CORBA::Long)0);
- }
-}
-
-TAO_Literal_Constraint
-operator/ (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- TAO_Expression_Type widest_type =
- TAO_Literal_Constraint::widest_type(left, right);
-
- switch (widest_type)
- {
- case TAO_DOUBLE:
- {
- CORBA::Double result = (CORBA::Double)left / (CORBA::Double)right;
- return TAO_Literal_Constraint((CORBA::Double)result);
- }
- break;
- case TAO_SIGNED:
- {
- CORBA::Long result = (CORBA::Long)left / (CORBA::Long)right;
- return TAO_Literal_Constraint((CORBA::Long)result);
- }
- break;
- case TAO_UNSIGNED:
- {
- CORBA::ULong result = (CORBA::ULong)left / (CORBA::ULong)right;
- return TAO_Literal_Constraint((CORBA::ULong)result);
- }
- break;
- default:
- return TAO_Literal_Constraint((CORBA::Long)0);
- }
-}
-
-TAO_Literal_Constraint
-operator- (const TAO_Literal_Constraint& operand)
-{
- switch (operand.expr_type())
- {
- case TAO_DOUBLE:
- {
- CORBA::Double result = - (CORBA::Double)operand;
- return TAO_Literal_Constraint((CORBA::Double)result);
- }
- break;
- case TAO_SIGNED:
- {
- CORBA::Long result = - (CORBA::Long)operand;
- return TAO_Literal_Constraint((CORBA::Long)result);
- }
- break;
- case TAO_UNSIGNED:
- {
- CORBA::Long result = - (CORBA::ULong)operand;
- return TAO_Literal_Constraint((CORBA::ULong)result);
- }
- break;
- default:
- return TAO_Literal_Constraint((CORBA::Long)0);
- }
-}
-
-TAO_Expression_Type
-TAO_Literal_Constraint::widest_type(const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right)
-{
- TAO_Expression_Type left_type = left.expr_type(),
- right_type = right.expr_type(),
- return_value = right_type;
-
- if (right_type != left_type)
- {
- if (right_type > left_type)
- return_value = right_type;
- else
- return_value = left_type;
- }
-
- return return_value;
-}
-
-void
-TAO_Literal_Constraint::copy (const TAO_Literal_Constraint& lit)
-{
- this->type_ = lit.type_;
- if (this->type_ == TAO_STRING)
- this->op_.str_ = ACE_OS::strdup(lit.op_.str_);
- else if (this->type_ == TAO_DOUBLE)
- this->op_.double_ = lit.op_.double_;
- else if (this->type_ == TAO_UNSIGNED)
- this->op_.uinteger_ = lit.op_.uinteger_;
- else if (this->type_ == TAO_SIGNED)
- this->op_.integer_ = lit.op_.integer_;
- else if (this->type_ == TAO_BOOLEAN)
- this->op_.bool_ = lit.op_.bool_;
- else if (this->type_ == TAO_SEQUENCE)
- this->op_.any_ = lit.op_.any_;
- else
- type_ = TAO_UNKNOWN;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h
deleted file mode 100644
index e5ea4c0be48..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- C++ -*- */
-
-// =====================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Nodes.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =====================================================================
-
-#ifndef TAO_CONSTRAINT_NODES_H
-#define TAO_CONSTRAINT_NODES_H
-
-#include "Constraint_Visitor.h"
-#include "Constraint_Tokens.h"
-
-#include "orbsvcs/CosTradingC.h"
-#include "orbsvcs/SequencesC.h"
-
-typedef unsigned short TAO_Expression_Type;
-
-class TAO_Constraint
-//
-// = TITLE
-// TAO_Constraint is the base class of all nodes on the
-// constraint expression tree.
-//
-// = DESCRIPTION
-// An TAO_Constraint knows what type of operation or entity
-// it represents, and which method on TAO_Constraint_Visitor
-// correlates to its type. When the accept method is invoked, a
-// subclass dispatches the method on an InterpreterVisitor
-// correlating to its type.
-{
-public:
-
- virtual int accept(TAO_Constraint_Visitor* visitor) = 0;
- // Implementing the pattern of double dispatching, each subclass of
- // TAO_Constraint will call back on an InterpreterVisitor the
- // method to handle a node of its ExpressionType.
-
- virtual TAO_Expression_Type expr_type(void) const = 0;
- // Return the expression type represented by this node.
-
- virtual ~TAO_Constraint(void) {}
-};
-
-class TAO_Noop_Constraint : public TAO_Constraint
-{
-public:
-
- TAO_Noop_Constraint(TAO_Expression_Type type)
- : type_ (type) {}
-
- virtual int accept(TAO_Constraint_Visitor* visitor);
-
- virtual TAO_Expression_Type expr_type(void) const
- { return this->type_; }
-
-private:
-
- TAO_Expression_Type type_;
-};
-
-class TAO_Binary_Constraint : public TAO_Constraint
-//
-// = TITLE
-// TAO_Binary_Constraint represents an operation with left
-// and right operands.
-{
-public:
-
- TAO_Binary_Constraint(TAO_Expression_Type op_type,
- TAO_Constraint* left,
- TAO_Constraint* right);
-
- virtual int accept(TAO_Constraint_Visitor* visitor);
-
- virtual ~TAO_Binary_Constraint(void);
-
- virtual TAO_Expression_Type expr_type(void) const
- { return this->op_; }
-
- TAO_Constraint* left_operand(void);
- // Return the left operand of the binary expression
-
- TAO_Constraint* right_operand(void);
- // Return the right operand of the binary expression
-
- // Allow double dispatching without creating an inundation of
- // classes by using a dispatch table of static method pointers to
- // invoke the correct visitor method as efficiently as a virtual
- // method invocation.
- static int visit_or(TAO_Constraint_Visitor*, TAO_Binary_Constraint*);
- static int visit_and(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_less_than(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_less_than_equal(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_greater_than(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_greater_than_equal(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_equal(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_not_equal(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_add(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_sub(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_mult(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_div(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_twiddle(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
- static int visit_in(TAO_Constraint_Visitor* , TAO_Binary_Constraint*);
-
-private:
-
- TAO_Expression_Type op_;
- // The operator type
-
- TAO_Constraint* left_;
- TAO_Constraint* right_;
- // The operands of the expression
-};
-
-class TAO_Unary_Constraint : public TAO_Constraint
-//
-// = TITLE
-// TAO_Unary_Constraint represents an operation with only
-// one operand.
-{
-public:
-
- TAO_Unary_Constraint(TAO_Expression_Type op_type,
- TAO_Constraint* operand);
-
- virtual ~TAO_Unary_Constraint(void);
-
- virtual int accept(TAO_Constraint_Visitor* visitor);
-
- virtual TAO_Expression_Type expr_type(void) const
- { return this->op_; }
-
- TAO_Constraint* operand(void);
-
-private:
-
- TAO_Expression_Type op_;
- // The operator type
-
- TAO_Constraint* operand_;
- // The operand of the expression
-};
-
-class TAO_Property_Constraint : public TAO_Constraint
-//
-// = TITLE
-// TAO_Property_Constraint represents a property whose
-// value is determined by the offer being evaluated.
-{
-public:
-
- TAO_Property_Constraint(const char* name);
-
- virtual ~TAO_Property_Constraint(void);
-
- virtual int accept(TAO_Constraint_Visitor* visitor);
-
- virtual TAO_Expression_Type expr_type(void) const
- { return TAO_IDENT; }
-
- const char* name(void) const;
- // Returns the name of the property.
-
-private:
-
- char* name_;
- // The name of the property.
-};
-
-class TAO_Literal_Constraint : public TAO_Constraint
-//
-// = TITLE
-// TAO_Literal_Constraint represents a literal occuring in
-// the constraint expression tree.
-{
- public:
-
- TAO_Literal_Constraint(void)
- : type_ (TAO_UNKNOWN) {}
-
- // = Constructors for each of the various types of literals.
-
- TAO_Literal_Constraint(CORBA::Any* any);
-
- TAO_Literal_Constraint(CORBA::ULong uinteger);
-
- TAO_Literal_Constraint(CORBA::Long integer);
-
- TAO_Literal_Constraint(CORBA::Boolean boolean);
-
- TAO_Literal_Constraint(CORBA::Double doub);
-
- TAO_Literal_Constraint(const char* str);
-
- TAO_Literal_Constraint (const TAO_Literal_Constraint& lit);
-
- ~TAO_Literal_Constraint(void);
-
- virtual int accept(TAO_Constraint_Visitor* visitor);
-
- virtual TAO_Expression_Type expr_type(void) const
- { return type_; }
-
- void operator= (const TAO_Literal_Constraint& co);
-
- // Conversion routines.
- operator CORBA::Boolean(void) const;
- operator CORBA::ULong(void) const;
- operator CORBA::Long(void) const;
- operator CORBA::Double(void) const;
- operator const char* (void) const;
- operator const CORBA::Any* (void) const;
-
- // Return the type represented by this MysteryOperand.
-
- // = Comparison operators.
-
- friend int
- operator< (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator<= (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator> (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator>= (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator== (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator!= (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator== (double left,
- const TAO_Literal_Constraint& right);
-
- friend int
- operator== (const TAO_Sequences::StringSeq::Manager& left,
- const TAO_Literal_Constraint& right);
-
- // = Arithmetic operators.
-
- friend TAO_Literal_Constraint
- operator+ (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend TAO_Literal_Constraint
- operator- (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend TAO_Literal_Constraint
- operator* (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend TAO_Literal_Constraint
- operator/ (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
-
- friend TAO_Literal_Constraint
- operator- (const TAO_Literal_Constraint& operand);
-
- static TAO_Expression_Type
- widest_type (const TAO_Literal_Constraint& left,
- const TAO_Literal_Constraint& right);
- // Ensure both operands are of the same simple numeric type.
-
- static TAO_Expression_Type
- comparable_type (CORBA::TypeCode_ptr type);
- // Determine the comparable Expression Type from the CORBA type
-
- private:
-
- void copy (const TAO_Literal_Constraint& co);
-
- union
- {
- char* str_;
- CORBA::Any_ptr any_;
- CORBA::ULong uinteger_;
- CORBA::Long integer_;
- CORBA::Boolean bool_;
- CORBA::Double double_;
- } op_;
- // Union of the possible literal types.
-
- TAO_Expression_Type type_;
- // The actual types of the TAO_Literal_Constraint.
-
-};
-
-#endif /* TAO_CONSTRAINT_NODES_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Tokens.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Tokens.h
deleted file mode 100644
index 4636d909dc5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Tokens.h
+++ /dev/null
@@ -1,34 +0,0 @@
-# define TAO_GT 257
-# define TAO_GE 258
-# define TAO_LT 259
-# define TAO_LE 260
-# define TAO_EQ 261
-# define TAO_NE 262
-# define TAO_EXIST 263
-# define TAO_AND 264
-# define TAO_OR 265
-# define TAO_NOT 266
-# define TAO_IN 267
-# define TAO_TWIDDLE 268
-# define TAO_BOOLEAN 269
-# define TAO_PLUS 270
-# define TAO_MINUS 271
-# define TAO_MULT 272
-# define TAO_DIV 273
-# define TAO_UMINUS 274
-# define TAO_NUMBER 275
-# define TAO_RPAREN 276
-# define TAO_LPAREN 277
-# define TAO_IDENT 278
-# define TAO_STRING 279
-# define TAO_UNKNOWN 280
-# define TAO_UNSIGNED 281
-# define TAO_SIGNED 282
-# define TAO_DOUBLE 283
-# define TAO_CONSTRAINT 284
-# define TAO_SEQUENCE 285
-# define TAO_WITH 286
-# define TAO_MAX 287
-# define TAO_MIN 288
-# define TAO_FIRST 289
-# define TAO_RANDOM 290
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.cpp
deleted file mode 100644
index 7ed1065ff52..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.cpp
+++ /dev/null
@@ -1,469 +0,0 @@
-// Constraint_Validator.cpp
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Validator.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Constraint_Validator.h"
-
-TAO_Constraint_Validator::
-TAO_Constraint_Validator(TypeStruct* type_struct)
-{
- PropStructSeq& prop_seq = type_struct->props;
- int length = prop_seq.length();
-
- // Create a map of the service type properties to their types.
- for (int i = 0; i < length; i++)
- {
- string prop_name_str((const char*)prop_seq[i].name);
- CORBA::TypeCode_var corba_type = prop_seq[i].value_type;
- this->type_map_[prop_name_str] = (const TypeCode_ptr)corba_type;
- }
-}
-
-int
-TAO_Constraint_Validator::validate (TAO_Constraint* root)
-{
- return root->accept(this);
-}
-
-int
-TAO_Constraint_Validator::visit_constraint(TAO_Unary_Constraint* constraint)
-{
- int return_value = -1;
- TAO_Expression_Type type;
- TAO_Constraint* operand = constraint->operand();
- this->extract_type(operand, type);
-
- if (this->expr_returns_boolean (type))
- return_value = operand->accept (this);
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::visit_first(TAO_Noop_Constraint* noop)
-{
- return 0;
-}
-
-int
-TAO_Constraint_Validator::visit_random(TAO_Noop_Constraint* noop)
-{
- return 0;
-}
-
-int
-TAO_Constraint_Validator::visit_with(TAO_Unary_Constraint* unary_with)
-{
- return this->visit_constraint(unary_with);
-}
-
-int
-TAO_Constraint_Validator::visit_min(TAO_Unary_Constraint* unary_min)
-{
- return this->visit_unary_minus(unary_min);
-}
-
-int
-TAO_Constraint_Validator::visit_max(TAO_Unary_Constraint* unary_max)
-{
- return this->visit_unary_minus(unary_max);
-}
-
-int
-TAO_Constraint_Validator::
-visit_and(TAO_Binary_Constraint* boolean_and)
-{
- int return_value = -1;
- TAO_Constraint* left = boolean_and->left_operand(),
- *right = boolean_and->right_operand();
- TAO_Expression_Type left_type, right_type;
- this->extract_type(left, left_type);
- this->extract_type(right, right_type);
-
- // Can only "and" expressions that return a boolean value
- if (this->expr_returns_boolean(left_type) &&
- this->expr_returns_boolean(right_type))
- {
- if (left->accept(this) == 0 &&
- right->accept(this) == 0)
- return_value = 0;
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_or(TAO_Binary_Constraint* boolean_or)
-{
- // The types for or are the same as those for and.
- return this->visit_and(boolean_or);
-}
-
-int
-TAO_Constraint_Validator::
-visit_not(TAO_Unary_Constraint* unary_not)
-{
- int return_value = -1;
- // Not can only negate an expression that returns a boolean.
- TAO_Expression_Type type;
- TAO_Constraint* operand = unary_not->operand();
- this->extract_type(operand, type);
-
- if (this->expr_returns_boolean(type))
- return_value = operand->accept(this);
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_exist(TAO_Unary_Constraint* unary_exist)
-{
- // Exist simply requires that its operand be a property name
- // included in the service type.
- int return_value = -1;
- TAO_Constraint* operand = unary_exist->operand();
- TAO_Expression_Type type = operand->expr_type();
-
- if (type == TAO_IDENT)
- return_value = operand->accept(this);
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_unary_minus(TAO_Unary_Constraint* unary_minus)
-{
- // Unary minus can only negate a numeric operand.
- int return_value = -1;
- TAO_Expression_Type type;
- TAO_Constraint* operand = unary_minus->operand();
- this->extract_type(operand, type);
-
- if (this->expr_returns_number(type))
- return_value = operand->accept(this);
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_add(TAO_Binary_Constraint* boolean_add)
-{
- // All the mathematical operators require numeric operands.
- int return_value = -1;
- TAO_Constraint* left = boolean_add->left_operand(),
- *right = boolean_add->right_operand();
- TAO_Expression_Type left_type, right_type;
- this->extract_type(left, left_type);
- this->extract_type(right, right_type);
-
- if (this->expr_returns_number(left_type) &&
- this->expr_returns_number(right_type))
- {
- if (left->accept(this) == 0 &&
- right->accept(this) == 0)
- return_value = 0;
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_sub(TAO_Binary_Constraint* boolean_sub)
-{
- return this->visit_add(boolean_sub);
-}
-
-int
-TAO_Constraint_Validator::
-visit_mult(TAO_Binary_Constraint* boolean_mult)
-{
- return this->visit_add(boolean_mult);
-}
-
-int
-TAO_Constraint_Validator::
-visit_div(TAO_Binary_Constraint* boolean_div)
-{
- // Div not only requires that both of its operands be numeric, but
- // also the the demoninator not be zero. However, since the
- // denominator can be an expression who's value can only be
- // determined while evaulating the constraint expression, this
- // method detects only when the demoniator is a literal whose value
- // is zero.
- int return_value = -1;
- TAO_Constraint* left = boolean_div->left_operand(),
- *right = boolean_div->right_operand();
- TAO_Expression_Type left_type, right_type;
- this->extract_type(left, left_type);
- this->extract_type(right, right_type);
-
- if (this->expr_returns_number(left_type) &&
- this->expr_returns_number(right_type))
- {
- // Prevent division by zero, a no no.
- int right_isnt_zero = 1;
- switch(right->expr_type())
- {
- case TAO_UNSIGNED:
- right_isnt_zero = (CORBA::ULong)(*((TAO_Literal_Constraint*)right));
- break;
- case TAO_SIGNED:
- right_isnt_zero = (CORBA::Long)(*((TAO_Literal_Constraint*)right));
- break;
- case TAO_DOUBLE:
- right_isnt_zero = (CORBA::Double)(*((TAO_Literal_Constraint*)right));
- break;
- }
-
- if (right_isnt_zero)
- {
- if (left->accept(this) == 0 &&
- right->accept(this) == 0)
- return_value = 0;
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_twiddle(TAO_Binary_Constraint* binary_twiddle)
-{
- // Twiddle requires that both of its operand be strings.
- int return_value = -1;
- TAO_Constraint* left = binary_twiddle->left_operand(),
- *right = binary_twiddle->right_operand();
- TAO_Expression_Type left_type, right_type;
- this->extract_type(left, left_type);
- this->extract_type(right, right_type);
-
- if (this->expr_returns_string(left_type) &&
- this->expr_returns_string(right_type))
- {
- if (left->accept(this) == 0 &&
- right->accept(this) == 0)
- return_value = 0;
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_in (TAO_Binary_Constraint* binary_in)
-{
- // In requires that the right operand be a sequence of a simple type
- // and that its left operand be an expression that evaluates to a
- // value of the same simple type.
- int return_value = -1;
- TAO_Constraint* left = binary_in->left_operand(),
- *right = binary_in->right_operand();
- TAO_Expression_Type left_type, right_type;
- CORBA::TypeCode* prop_type = this->extract_type(right, right_type);
- this->extract_type(left, left_type);
-
- if (right_type == TAO_SEQUENCE)
- {
- int types_match = 0;
- CORBA::Environment env;
-
- if (this->expr_returns_number (left_type))
- {
- types_match =
- prop_type->equal (TAO_Sequences::_tc_ShortSeq, env) ||
- prop_type->equal (TAO_Sequences::_tc_UShortSeq, env) ||
- prop_type->equal (TAO_Sequences::_tc_LongSeq, env) ||
- prop_type->equal (TAO_Sequences::_tc_ULongSeq, env) ||
- prop_type->equal (TAO_Sequences::_tc_DoubleSeq, env) ||
- prop_type->equal (TAO_Sequences::_tc_FloatSeq, env);
- }
- else if (this->expr_returns_boolean (left_type))
- types_match = prop_type->equal (TAO_Sequences::_tc_BooleanSeq, env);
- else if (this->expr_returns_string (left_type))
- types_match = prop_type->equal (TAO_Sequences::_tc_StringSeq, env);
-
- if (types_match)
- return_value = left->accept(this);
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_less_than(TAO_Binary_Constraint* boolean_lt)
-{
- // Comparison operations require that both operands be of the same
- // simple type.
- int return_value = -1;
- TAO_Constraint* left = boolean_lt->left_operand(),
- *right = boolean_lt->right_operand();
- TAO_Expression_Type left_type, right_type;
- this->extract_type(left, left_type);
- this->extract_type(right, right_type);
-
- if ((this->expr_returns_number(left_type) &&
- this->expr_returns_number(right_type)) ||
- (this->expr_returns_string(left_type) &&
- this->expr_returns_string(right_type)))
- {
- if (left->accept(this) == 0 &&
- right->accept(this) == 0)
- return_value = 0;
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_less_than_equal(TAO_Binary_Constraint* boolean_lte)
-{
- return this->visit_less_than(boolean_lte);
-}
-
-int
-TAO_Constraint_Validator::
-visit_greater_than(TAO_Binary_Constraint* boolean_gt)
-{
- return this->visit_less_than(boolean_gt);
-}
-
-int
-TAO_Constraint_Validator::
-visit_greater_than_equal(TAO_Binary_Constraint* boolean_gte)
-{
- return this->visit_less_than(boolean_gte);
-}
-
-int
-TAO_Constraint_Validator::
-visit_equal(TAO_Binary_Constraint* boolean_eq)
-{
- int return_value = -1;
- TAO_Constraint* left = boolean_eq->left_operand(),
- *right = boolean_eq->right_operand();
- TAO_Expression_Type left_type, right_type;
- this->extract_type(left, left_type);
- this->extract_type(right, right_type);
-
- if ((this->expr_returns_number(left_type) &&
- this->expr_returns_number(right_type)) ||
- (this->expr_returns_string(left_type) &&
- this->expr_returns_string(right_type)) ||
- (this->expr_returns_boolean(left_type) &&
- this->expr_returns_boolean(right_type)))
- {
- if (left->accept(this) == 0 &&
- right->accept(this) == 0)
- return_value = 0;
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::
-visit_not_equal(TAO_Binary_Constraint* boolean_neq)
-{
- return this->visit_equal(boolean_neq);
-}
-
-int
-TAO_Constraint_Validator::
-visit_literal(TAO_Literal_Constraint* literal)
-{
- return 0;
-}
-
-int
-TAO_Constraint_Validator::
-visit_property(TAO_Property_Constraint* literal)
-{
- // Ensure that the property actually exists in the service type.
- string prop_map(literal->name());
- return (this->type_map_.find(prop_map) != this->type_map_.end()) ? 0 : -1;
-}
-
-CORBA::TypeCode*
-TAO_Constraint_Validator::extract_type (TAO_Constraint* expr,
- TAO_Expression_Type& type)
-{
- CORBA::TypeCode* return_value = 0;
- type = expr->expr_type();
- if (type == TAO_IDENT)
- {
- TAO_Property_Constraint* prop = (TAO_Property_Constraint*) expr;
- string prop_name(prop->name());
- Property_Type_Map_Iter type_iter =
- this->type_map_.find (prop_name);
-
- if (type_iter != this->type_map_.end())
- {
- return_value = (*type_iter).second;
- type = TAO_Literal_Constraint::comparable_type(return_value);
- }
- }
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::expr_returns_boolean(TAO_Expression_Type expr_type)
-{
- // If the expression is a boolean operations, a boolean literal, or
- // a boolean property, return 1.
- int return_value = 0;
-
- if (expr_type <= TAO_BOOLEAN)
- return_value = 1;
-
- return return_value;
-}
-
-
-int
-TAO_Constraint_Validator::expr_returns_number(TAO_Expression_Type expr_type)
-{
- // If the expression is a number operation, a numeric literal, or a
- // numeric property, return 1.
- int return_value = 0;
-
- if ((expr_type >= TAO_PLUS && expr_type <= TAO_NUMBER) ||
- (expr_type >= TAO_UNSIGNED && expr_type <= TAO_DOUBLE))
- return_value = 1;
-
- return return_value;
-}
-
-int
-TAO_Constraint_Validator::expr_returns_string(TAO_Expression_Type expr_type)
-{
- // If the expression is an operation with a string return value, a
- // string literal, or a property whose type is string, return 1.
- int return_value = 0;
-
- if (expr_type == TAO_STRING)
- return_value = 1;
-
- return return_value;
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.h
deleted file mode 100644
index 9ba7a6baa00..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Validator.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Validator.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_CONSTRAINT_VALIDATOR_H
-#define TAO_CONSTRAINT_VALIDATOR_H
-
-#include <map>
-#include <string>
-
-#include "Constraint_Nodes.h"
-
-class TAO_Constraint_Validator : public TAO_Constraint_Visitor
- //
- // = TITLE
- // TAO_Constraint_Validator ensures that in an expression tree
- // passed to it, the operands of each operation match the
- // correct types.
- //
- // = DESCRIPTION
- // TAO_Constraint_Validator uses the visitor pattern to
- // traverse all the nodes in an expression tree, checking each
- // for operands of the proper type. The algorithm for type
- // checking is as follows: ensure that operand expression(s)
- // return the correct types using exprReturns* methods, and their
- // types. If they (or it) return the correct types, call accept
- // on the operands until all return true, or one returns false,
- // at which point we can back out of the traversal.
-{
-public:
-
- typedef
- map<string, CORBA::TypeCode_ptr, less<string> >
- Property_Type_Map;
-
- typedef Property_Type_Map::iterator
- Property_Type_Map_Iter;
-
- typedef
- CosTradingRepos::ServiceTypeRepository::TypeStruct
- TypeStruct;
-
- typedef
- CosTradingRepos::ServiceTypeRepository::PropStructSeq
- PropStructSeq;
-
- TAO_Constraint_Validator(TypeStruct* type_struct);
- // The constructor creates a map of property names to their values
- // from the Type Description retrieved from the
- // ServiceTypeRepository. The ServiceTypeRepository throws
- // exceptions when it's displeased with the type name provided to
- // it. The map allows O(lg n) associative access, rather than the
- // O(n) sequential lookup from the CORBA data structures.
-
- int validate(TAO_Constraint* root);
- // Validate returns 1 if the expression tree whose root is <root>
- // makes semantic sense, in that the operands for each operation
- // comply with each other and the types accepted by the operator.
-
- // = Visitor Methods
-
- virtual int visit_constraint(TAO_Unary_Constraint* constraint);
-
- virtual int visit_with(TAO_Unary_Constraint* unary_with);
- virtual int visit_min(TAO_Unary_Constraint* unary_min);
- virtual int visit_max(TAO_Unary_Constraint* unary_max);
- virtual int visit_first(TAO_Noop_Constraint* noop_first);
- virtual int visit_random(TAO_Noop_Constraint* noop_random);
-
- virtual int visit_and(TAO_Binary_Constraint* boolean_and);
- virtual int visit_or(TAO_Binary_Constraint* boolean_or);
- // The two operands must return a boolean value.
-
- virtual int visit_not(TAO_Unary_Constraint* unary_not);
- // The operand must return a boolean value.
-
- virtual int visit_exist(TAO_Unary_Constraint* unary_exist);
- // The operand must return a valid (i.e., present in the service
- // type description) property name.
-
- virtual int visit_unary_minus(TAO_Unary_Constraint* unary_minus);
- // The operand must return a number to be negated.
-
- virtual int visit_add(TAO_Binary_Constraint* boolean_add);
- virtual int visit_sub(TAO_Binary_Constraint* boolean_sub);
- virtual int visit_mult(TAO_Binary_Constraint* boolean_mult);
- virtual int visit_div(TAO_Binary_Constraint* boolean_div);
- // Both operands must return numeric results.
-
- virtual int visit_twiddle(TAO_Binary_Constraint* binary_twiddle);
- // Both operands must return strings.
-
- virtual int visit_in(TAO_Binary_Constraint* binary_in);
- // The right operand must be a sequence of the same simple type as
- // the left operand.
-
- virtual int visit_less_than(TAO_Binary_Constraint* boolean_lt);
- virtual int visit_less_than_equal(TAO_Binary_Constraint* boolean_lte);
- virtual int visit_greater_than(TAO_Binary_Constraint* boolean_gt);
- virtual int visit_greater_than_equal(TAO_Binary_Constraint* boolean_gte);
- virtual int visit_equal(TAO_Binary_Constraint* boolean_eq);
- virtual int visit_not_equal(TAO_Binary_Constraint* boolean_neq);
- // The left and right operands must both be of the same simple type.
-
- virtual int visit_literal(TAO_Literal_Constraint* literal);
- virtual int visit_property(TAO_Property_Constraint* literal);
- // The property must be defined in the service type description.
-
-private:
-
- Property_Type_Map type_map_;
- // A map gleaned from the ServiceTypeStruct, which correlates
- // property names with their types.
-
- CORBA::TypeCode* extract_type(TAO_Constraint* expr_type,
- TAO_Expression_Type& type);
-
- int expr_returns_boolean(TAO_Expression_Type expr_type);
- // expr_returns_boolean returns 1 if <expr_type>, when evaluated, will
- // return a boolean.
-
- int expr_returns_number(TAO_Expression_Type expr_type);
- // expr_returns_boolean returns 1 if <expr_type>, when evaluated, will
- // return a number.
-
- int expr_returns_string(TAO_Expression_Type expr_type);
- // expr_returns_boolean returns 1 if <expr_type>, when evaluated, will
- // return a string.
-};
-
-#endif /* TAO_CONSTRAINT_VALIDATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitor.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitor.h
deleted file mode 100644
index 255b483b490..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitor.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Constraint_Visitor.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_CONSTRAINT_VISITOR_H
-#define TAO_CONSTRAINT_VISITOR_H
-
-class TAO_Binary_Constraint;
-class TAO_Unary_Constraint;
-class TAO_Property_Constraint;
-class TAO_Literal_Constraint;
-class TAO_Noop_Constraint;
-
-class TAO_Constraint_Visitor
-//
-// = TITLE
-// This is the base class for all visitors who wish to preform
-// some operation from the state of the expression tree. Using
-// double dispatching, subclasses of Constraint expression call
-// back to the InterpreterVisitor subclass from the accept method.
-//
-// = DESCRIPTION
-// Traversal of the expression tree uses the "Visitor" pattern. To
-// "visit" a node, a client invokes the "accept" method on a
-// subclass of ConstraintExpression, which, in turn, invokes the
-// appropriate method on the visitor passed to it, based on its
-// own type. So, the Constraint_Visitor has a method to deal with
-// each possible type of node in an expression tree; one for each
-// operator in the grammar.
-{
-public:
-
- virtual int visit_constraint(TAO_Unary_Constraint* constraint) = 0;
-
- virtual int visit_with(TAO_Unary_Constraint* unary_with) = 0;
- virtual int visit_min(TAO_Unary_Constraint* unary_min) = 0;
- virtual int visit_max(TAO_Unary_Constraint* unary_max) = 0;
- virtual int visit_first(TAO_Noop_Constraint* noop_first) = 0;
- virtual int visit_random(TAO_Noop_Constraint* noop_random) = 0;
-
- virtual int visit_and(TAO_Binary_Constraint* boolean_and) = 0;
- virtual int visit_or(TAO_Binary_Constraint* boolean_or) = 0;
- virtual int visit_not(TAO_Unary_Constraint* unary_not) = 0;
-
- virtual int visit_exist(TAO_Unary_Constraint* unary_exist) = 0;
- virtual int visit_unary_minus(TAO_Unary_Constraint* unary_minus) = 0;
-
- virtual int visit_add(TAO_Binary_Constraint* boolean_add) = 0;
- virtual int visit_sub(TAO_Binary_Constraint* boolean_sub) = 0;
- virtual int visit_mult(TAO_Binary_Constraint* boolean_mult) = 0;
- virtual int visit_div(TAO_Binary_Constraint* boolean_div) = 0;
-
- virtual int visit_twiddle(TAO_Binary_Constraint* binary_twiddle) = 0;
- virtual int visit_in(TAO_Binary_Constraint* binary_in) = 0;
-
- virtual int visit_less_than(TAO_Binary_Constraint* boolean_lt) = 0;
- virtual int visit_less_than_equal(TAO_Binary_Constraint* boolean_lte) = 0;
- virtual int visit_greater_than(TAO_Binary_Constraint* boolean_gt) = 0;
- virtual int visit_greater_than_equal(TAO_Binary_Constraint* boolean_gte) = 0;
- virtual int visit_equal(TAO_Binary_Constraint* boolean_eq) = 0;
- virtual int visit_not_equal(TAO_Binary_Constraint* boolean_neq) = 0;
-
- virtual int visit_literal(TAO_Literal_Constraint* literal) = 0;
- virtual int visit_property(TAO_Property_Constraint* literal) = 0;
-};
-
-#endif /* CONSTRAINT_VISITOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
deleted file mode 100644
index 7f191d8cb14..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_l.cpp
+++ /dev/null
@@ -1,1782 +0,0 @@
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header$
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#include <unistd.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
- };
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 31
-#define YY_END_OF_BUFFER 32
-static yyconst short int yy_accept[81] =
- { 0,
- 0, 0, 32, 30, 31, 30, 30, 22, 23, 14,
- 12, 13, 30, 15, 26, 16, 30, 18, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- 11, 21, 0, 28, 0, 27, 0, 26, 17, 20,
- 19, 29, 29, 29, 29, 29, 29, 10, 29, 29,
- 29, 9, 29, 29, 0, 0, 29, 29, 8, 29,
- 29, 2, 1, 7, 29, 29, 0, 27, 29, 24,
- 29, 29, 29, 5, 25, 6, 3, 29, 4, 0
- } ;
-
-static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 3, 1, 1, 1, 1, 1, 4, 5,
- 6, 7, 8, 1, 9, 10, 11, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 1, 1, 13,
- 14, 15, 1, 1, 16, 17, 17, 17, 18, 19,
- 17, 17, 17, 17, 17, 20, 17, 17, 17, 17,
- 17, 21, 22, 23, 24, 17, 17, 17, 17, 17,
- 1, 25, 1, 1, 26, 1, 27, 17, 17, 28,
-
- 29, 30, 17, 31, 32, 17, 17, 17, 33, 34,
- 35, 17, 17, 36, 37, 38, 17, 17, 39, 40,
- 17, 17, 1, 1, 1, 41, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst int yy_meta[42] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 1, 1, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 1, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1
- } ;
-
-static yyconst short int yy_base[83] =
- { 0,
- 0, 0, 104, 105, 105, 89, 38, 105, 105, 105,
- 105, 105, 90, 105, 33, 87, 86, 85, 0, 82,
- 76, 62, 55, 62, 59, 17, 57, 55, 63, 57,
- 105, 105, 42, 105, 43, 36, 76, 40, 105, 105,
- 105, 0, 67, 62, 57, 52, 47, 0, 42, 47,
- 42, 0, 45, 40, 47, 47, 55, 58, 0, 38,
- 34, 0, 0, 0, 42, 38, 54, 52, 44, 0,
- 23, 22, 23, 0, 0, 0, 0, 24, 0, 105,
- 72, 51
- } ;
-
-static yyconst short int yy_def[83] =
- { 0,
- 80, 1, 80, 80, 80, 80, 81, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 80, 80, 81, 80, 80, 80, 80, 80, 80, 80,
- 80, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 81, 80, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 80, 80, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 0,
- 80, 80
- } ;
-
-static yyconst short int yy_nxt[147] =
- { 0,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 19, 19, 20, 19,
- 19, 19, 21, 19, 4, 4, 22, 19, 23, 24,
- 19, 25, 26, 27, 28, 29, 19, 19, 30, 19,
- 31, 34, 37, 49, 38, 34, 55, 36, 50, 37,
- 34, 38, 42, 56, 67, 67, 79, 78, 68, 77,
- 76, 75, 35, 68, 56, 68, 35, 55, 74, 73,
- 72, 35, 33, 33, 71, 70, 69, 66, 65, 64,
- 63, 62, 61, 60, 59, 58, 57, 36, 54, 53,
- 52, 51, 48, 47, 46, 45, 44, 43, 41, 40,
-
- 39, 36, 32, 80, 3, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80
- } ;
-
-static yyconst short int yy_chk[147] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 7, 15, 26, 15, 33, 35, 36, 26, 38,
- 55, 38, 82, 36, 56, 56, 78, 73, 56, 72,
- 71, 69, 7, 68, 36, 67, 33, 35, 66, 65,
- 61, 55, 81, 81, 60, 58, 57, 54, 53, 51,
- 50, 49, 47, 46, 45, 44, 43, 37, 30, 29,
- 28, 27, 25, 24, 23, 22, 21, 20, 18, 17,
-
- 16, 13, 6, 3, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80
- } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "Trader/constraint.l"
-#define INITIAL 0
-#line 2 "Trader/constraint.l"
-// $Id$
-// ========================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// constraint.l
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Constraint.h"
-#include "Constraint_Nodes.h"
-#include "Constraint_Tokens.h"
-
-static TAO_Literal_Constraint* extract_string(const char*);
-
-#define TAO_YY_LEX_DEBUG
-
-#ifdef TAO_CONSTRAINT_DEBUG
-#define TAO_YY_LEX_DEBUG TAO_OS::fprintf(stderr, "%s\n", yytext)
-#endif /* TAO_CONSTRAINT_DEBUG */
-
-
-#line 448 "lex.yy.c"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = '*', n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-
-YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 42 "Trader/constraint.l"
-
-
-#line 602 "lex.yy.c"
-
- if ( yy_init )
- {
- yy_init = 0;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yy_start )
- yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_load_buffer_state();
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yy_start;
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 81 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 105 );
-
-yy_find_action:
- yy_act = yy_accept[yy_current_state];
- if ( yy_act == 0 )
- { /* have to back up */
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- yy_act = yy_accept[yy_current_state];
- }
-
- YY_DO_BEFORE_ACTION;
-
-
-do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 44 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_MIN; }
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 45 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_MAX; }
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 46 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_FIRST; }
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 47 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_RANDOM; }
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 48 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_WITH; }
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 49 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_EXIST; }
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 50 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_NOT; }
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 51 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_AND; }
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 52 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_OR; }
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 53 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_IN; }
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 54 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_TWIDDLE; }
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 55 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_PLUS; }
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 56 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_MINUS; }
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 57 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_MULT; }
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 58 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_DIV; }
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 59 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_LT; }
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 60 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_LE; }
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 61 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_GT; }
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 62 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_GE; }
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 63 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_EQ; }
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 64 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_NE; }
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 65 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_LPAREN; }
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 66 "Trader/constraint.l"
-{ TAO_YY_LEX_DEBUG; return TAO_RPAREN; }
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 67 "Trader/constraint.l"
-{
- yylval.constraint_ =
- new TAO_Literal_Constraint(CORBA::B_TRUE);
- TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
- }
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 72 "Trader/constraint.l"
-{
- yylval.constraint_ =
- new TAO_Literal_Constraint(CORBA::B_FALSE);
- TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
- }
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 77 "Trader/constraint.l"
-{
- yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Long)atoi(yytext));
- TAO_YY_LEX_DEBUG; return TAO_NUMBER;
- }
- YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 82 "Trader/constraint.l"
-{
- yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Double)atof(yytext));
- TAO_YY_LEX_DEBUG; return TAO_NUMBER;
- }
- YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 87 "Trader/constraint.l"
-{
- yylval.constraint_ = extract_string(yytext);
- TAO_YY_LEX_DEBUG; return TAO_STRING;
- }
- YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 91 "Trader/constraint.l"
-{
- yylval.constraint_ =
- new TAO_Property_Constraint(yytext);
- TAO_YY_LEX_DEBUG; return TAO_IDENT;
- }
- YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 96 "Trader/constraint.l"
-{
- TAO_YY_LEX_DEBUG; return TAO_UNKNOWN;
- }
- YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 99 "Trader/constraint.l"
-ECHO;
- YY_BREAK
-#line 865 "lex.yy.c"
-case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yy_c_buf_p;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
- register int number_to_move, i;
- int ret_val;
-
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
-
- int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->yy_buf_size -
- number_to_move - 1;
-#endif
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
-
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
- return ret_val;
- }
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 81 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- return yy_current_state;
- }
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
- register int yy_is_jam;
- register char *yy_cp = yy_c_buf_p;
-
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 81 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 80);
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
-
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_char;
-
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /* fall through */
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- return EOF;
-
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
-
- return c;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
-
- if ( yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- yy_init_buffer( b, file );
-
- return b;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
- if ( ! b )
- return;
-
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
-
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
- {
- yy_flush_buffer( b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
- {
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
- }
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- yy_switch_to_buffer( b );
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) yy_flex_alloc( n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
- }
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
- }
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
- return (void *) malloc( size );
- }
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
- }
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
-
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 99 "Trader/constraint.l"
-
-
-TAO_Literal_Constraint*
-extract_string(const char* total)
-{
- int prev_slash = 0,
- ctr = 0;
- char str[BUFSIZ],
- *tmp = (char*) total + 1;
-
- while (*tmp != '\0')
- {
- if (*tmp == '\\')
- {
- if (prev_slash)
- prev_slash = 0;
- else
- {
- prev_slash = 1;
- continue;
- }
- }
- else if (*tmp == '\'')
- prev_slash = 0;
-
- str[ctr++] = *tmp;
- tmp++;
- }
-
- str[ctr - 1] = '\0';
- return new TAO_Literal_Constraint(str);
-} \ No newline at end of file
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_y.cpp b/TAO/orbsvcs/orbsvcs/Trader/Constraint_y.cpp
deleted file mode 100644
index 0c84915206c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_y.cpp
+++ /dev/null
@@ -1,907 +0,0 @@
-
-# line 2 "Trader/constraint.y"
- // $Id$
-// ========================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// constraint.y
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Constraint.h"
-#include "Constraint_Nodes.h"
-
-//#define YYDEBUG 1
-# define TAO_GT 257
-# define TAO_GE 258
-# define TAO_LT 259
-# define TAO_LE 260
-# define TAO_EQ 261
-# define TAO_NE 262
-# define TAO_EXIST 263
-# define TAO_AND 264
-# define TAO_OR 265
-# define TAO_NOT 266
-# define TAO_IN 267
-# define TAO_TWIDDLE 268
-# define TAO_BOOLEAN 269
-# define TAO_PLUS 270
-# define TAO_MINUS 271
-# define TAO_MULT 272
-# define TAO_DIV 273
-# define TAO_UMINUS 274
-# define TAO_NUMBER 275
-# define TAO_RPAREN 276
-# define TAO_LPAREN 277
-# define TAO_IDENT 278
-# define TAO_STRING 279
-# define TAO_UNKNOWN 280
-# define TAO_UNSIGNED 281
-# define TAO_SIGNED 282
-# define TAO_DOUBLE 283
-# define TAO_CONSTRAINT 284
-# define TAO_SEQUENCE 285
-# define TAO_WITH 286
-# define TAO_MAX 287
-# define TAO_MIN 288
-# define TAO_FIRST 289
-# define TAO_RANDOM 290
-
-#ifdef __STDC__
-#include <stdlib.h>
-#include <string.h>
-#else
-#include <malloc.h>
-#include <memory.h>
-#endif
-
-#include <values.h>
-
-#ifdef __cplusplus
-
-#ifndef yyerror
- void yyerror(const char *);
-#endif
-
-#ifndef yylex
-#ifdef __EXTERN_C__
- extern "C" { int yylex(void); }
-#else
- int yylex(void);
-#endif
-#endif
- int yyparse(void);
-
-#endif
-#define yyclearin yychar = -1
-#define yyerrok yyerrflag = 0
-extern int yychar;
-extern int yyerrflag;
-YYSTYPE yylval;
-YYSTYPE yyval;
-typedef int yytabelem;
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 150
-#endif
-#if YYMAXDEPTH > 0
-int yy_yys[YYMAXDEPTH], *yys = yy_yys;
-YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv;
-#else /* user does initial allocation */
-int *yys;
-YYSTYPE *yyv;
-#endif
-static int yymaxdepth = YYMAXDEPTH;
-# define YYERRCODE 256
-
-# line 133 "Trader/constraint.y"
-
-
-//extern int yydebug = 1;
-yytabelem yyexca[] ={
--1, 1,
- 0, -1,
- -2, 0,
- };
-# define YYNPROD 38
-# define YYLAST 93
-yytabelem yyact[]={
-
- 19, 54, 44, 16, 45, 19, 24, 37, 22, 38,
- 39, 24, 21, 22, 18, 20, 23, 21, 25, 18,
- 20, 23, 36, 7, 6, 5, 8, 9, 19, 60,
- 26, 16, 40, 41, 24, 25, 22, 38, 39, 15,
- 21, 11, 18, 20, 23, 32, 33, 34, 35, 30,
- 31, 14, 10, 17, 13, 12, 4, 3, 1, 2,
- 0, 0, 0, 0, 0, 27, 28, 29, 0, 0,
- 42, 0, 48, 49, 50, 51, 52, 53, 43, 47,
- 58, 59, 46, 0, 0, 0, 0, 0, 0, 0,
- 56, 57, 55 };
-yytabelem yypact[]={
-
- -263,-10000000, -230,-10000000, -234, -235, -235, -235,-10000000,-10000000,
--10000000, -212, -245, -261, -240,-10000000, -258,-10000000, -235, -276,
--10000000,-10000000, -271,-10000000,-10000000, -235, -235, -230, -230, -230,
- -235, -235, -235, -235, -235, -235, -277, -235, -235, -235,
- -235, -235,-10000000, -247,-10000000,-10000000, -234,-10000000,-10000000,-10000000,
--10000000,-10000000,-10000000,-10000000,-10000000, -233, -240, -240,-10000000,-10000000,
--10000000 };
-yytabelem yypgo[]={
-
- 0, 58, 57, 59, 56, 52, 41, 55, 54, 51,
- 39, 53 };
-yytabelem yyr1[]={
-
- 0, 1, 1, 2, 2, 2, 2, 2, 3, 3,
- 4, 4, 5, 5, 5, 5, 5, 5, 5, 6,
- 6, 7, 7, 8, 8, 8, 9, 9, 9, 10,
- 10, 11, 11, 11, 11, 11, 11, 11 };
-yytabelem yyr2[]={
-
- 0, 3, 3, 5, 5, 5, 3, 3, 7, 3,
- 7, 3, 7, 7, 7, 7, 7, 7, 3, 7,
- 3, 7, 3, 7, 7, 3, 7, 7, 3, 5,
- 3, 7, 5, 3, 3, 5, 3, 3 };
-yytabelem yychk[]={
-
--10000000, -1, -3, -2, -4, 288, 287, 286, 289, 290,
- -5, -6, -7, -8, -9, -10, 266, -11, 277, 263,
- 278, 275, 271, 279, 269, 265, 264, -3, -3, -3,
- 261, 262, 257, 258, 259, 260, 267, 268, 270, 271,
- 272, 273, -11, -3, 278, 275, -4, -5, -6, -6,
- -6, -6, -6, -6, 278, -8, -9, -9, -10, -10,
- 276 };
-yytabelem yydef[]={
-
- 0, -2, 1, 2, 9, 0, 0, 0, 6, 7,
- 11, 18, 20, 22, 25, 28, 0, 30, 0, 0,
- 33, 34, 0, 36, 37, 0, 0, 3, 4, 5,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 29, 0, 32, 35, 8, 10, 12, 13,
- 14, 15, 16, 17, 19, 21, 23, 24, 26, 27,
- 31 };
-typedef struct
-#ifdef __cplusplus
- yytoktype
-#endif
-{ char *t_name; int t_val; } yytoktype;
-#ifndef YYDEBUG
-# define YYDEBUG 0 /* don't allow debugging */
-#endif
-
-#if YYDEBUG
-
-yytoktype yytoks[] =
-{
- "TAO_GT", 257,
- "TAO_GE", 258,
- "TAO_LT", 259,
- "TAO_LE", 260,
- "TAO_EQ", 261,
- "TAO_NE", 262,
- "TAO_EXIST", 263,
- "TAO_AND", 264,
- "TAO_OR", 265,
- "TAO_NOT", 266,
- "TAO_IN", 267,
- "TAO_TWIDDLE", 268,
- "TAO_BOOLEAN", 269,
- "TAO_PLUS", 270,
- "TAO_MINUS", 271,
- "TAO_MULT", 272,
- "TAO_DIV", 273,
- "TAO_UMINUS", 274,
- "TAO_NUMBER", 275,
- "TAO_RPAREN", 276,
- "TAO_LPAREN", 277,
- "TAO_IDENT", 278,
- "TAO_STRING", 279,
- "TAO_UNKNOWN", 280,
- "TAO_UNSIGNED", 281,
- "TAO_SIGNED", 282,
- "TAO_DOUBLE", 283,
- "TAO_CONSTRAINT", 284,
- "TAO_SEQUENCE", 285,
- "TAO_WITH", 286,
- "TAO_MAX", 287,
- "TAO_MIN", 288,
- "TAO_FIRST", 289,
- "TAO_RANDOM", 290,
- "-unknown-", -1 /* ends search */
-};
-
-char * yyreds[] =
-{
- "-no such reduction-",
- "constraint : bool_or",
- "constraint : preference",
- "preference : TAO_MIN bool_or",
- "preference : TAO_MAX bool_or",
- "preference : TAO_WITH bool_or",
- "preference : TAO_FIRST",
- "preference : TAO_RANDOM",
- "bool_or : bool_or TAO_OR bool_and",
- "bool_or : bool_and",
- "bool_and : bool_and TAO_AND bool_compare",
- "bool_and : bool_compare",
- "bool_compare : expr_in TAO_EQ expr_in",
- "bool_compare : expr_in TAO_NE expr_in",
- "bool_compare : expr_in TAO_GT expr_in",
- "bool_compare : expr_in TAO_GE expr_in",
- "bool_compare : expr_in TAO_LT expr_in",
- "bool_compare : expr_in TAO_LE expr_in",
- "bool_compare : expr_in",
- "expr_in : expr_twiddle TAO_IN TAO_IDENT",
- "expr_in : expr_twiddle",
- "expr_twiddle : expr TAO_TWIDDLE expr",
- "expr_twiddle : expr",
- "expr : expr TAO_PLUS term",
- "expr : expr TAO_MINUS term",
- "expr : term",
- "term : term TAO_MULT factor_not",
- "term : term TAO_DIV factor_not",
- "term : factor_not",
- "factor_not : TAO_NOT factor",
- "factor_not : factor",
- "factor : TAO_LPAREN bool_or TAO_RPAREN",
- "factor : TAO_EXIST TAO_IDENT",
- "factor : TAO_IDENT",
- "factor : TAO_NUMBER",
- "factor : TAO_MINUS TAO_NUMBER",
- "factor : TAO_STRING",
- "factor : TAO_BOOLEAN",
-};
-#endif /* YYDEBUG */
-# line 1 "/usr/ccs/bin/yaccpar"
-/*
- * Copyright (c) 1993 by Sun Microsystems, Inc.
- */
-
-#pragma ident "@(#)yaccpar 6.12 93/06/07 SMI"
-
-/*
-** Skeleton parser driver for yacc output
-*/
-
-/*
-** yacc user known macros and defines
-*/
-#define YYERROR goto yyerrlab
-#define YYACCEPT return(0)
-#define YYABORT return(1)
-#define YYBACKUP( newtoken, newvalue )\
-{\
- if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
- {\
- yyerror( "syntax error - cannot backup" );\
- goto yyerrlab;\
- }\
- yychar = newtoken;\
- yystate = *yyps;\
- yylval = newvalue;\
- goto yynewstate;\
-}
-#define YYRECOVERING() (!!yyerrflag)
-#define YYNEW(type) malloc(sizeof(type) * yynewmax)
-#define YYCOPY(to, from, type) \
- (type *) memcpy(to, (char *) from, yynewmax * sizeof(type))
-#define YYENLARGE( from, type) \
- (type *) realloc((char *) from, yynewmax * sizeof(type))
-#ifndef YYDEBUG
-# define YYDEBUG 1 /* make debugging available */
-#endif
-
-/*
-** user known globals
-*/
-int yydebug; /* set to 1 to get debugging */
-
-/*
-** driver internal defines
-*/
-#define YYFLAG (-10000000)
-
-/*
-** global variables used by the parser
-*/
-YYSTYPE *yypv; /* top of value stack */
-int *yyps; /* top of state stack */
-
-int yystate; /* current state */
-int yytmp; /* extra var (lasts between blocks) */
-
-int yynerrs; /* number of errors */
-int yyerrflag; /* error recovery flag */
-int yychar; /* current input token number */
-
-
-
-#ifdef YYNMBCHARS
-#define YYLEX() yycvtok(yylex())
-/*
-** yycvtok - return a token if i is a wchar_t value that exceeds 255.
-** If i<255, i itself is the token. If i>255 but the neither
-** of the 30th or 31st bit is on, i is already a token.
-*/
-#if defined(__STDC__) || defined(__cplusplus)
-int yycvtok(int i)
-#else
-int yycvtok(i) int i;
-#endif
-{
- int first = 0;
- int last = YYNMBCHARS - 1;
- int mid;
- wchar_t j;
-
- if(i&0x60000000){/*Must convert to a token. */
- if( yymbchars[last].character < i ){
- return i;/*Giving up*/
- }
- while ((last>=first)&&(first>=0)) {/*Binary search loop*/
- mid = (first+last)/2;
- j = yymbchars[mid].character;
- if( j==i ){/*Found*/
- return yymbchars[mid].tvalue;
- }else if( j<i ){
- first = mid + 1;
- }else{
- last = mid -1;
- }
- }
- /*No entry in the table.*/
- return i;/* Giving up.*/
- }else{/* i is already a token. */
- return i;
- }
-}
-#else/*!YYNMBCHARS*/
-#define YYLEX() yylex()
-#endif/*!YYNMBCHARS*/
-
-/*
-** yyparse - return 0 if worked, 1 if syntax error not recovered from
-*/
-#if defined(__STDC__) || defined(__cplusplus)
-int yyparse(void)
-#else
-int yyparse()
-#endif
-{
- register YYSTYPE *yypvt; /* top of value stack for $vars */
-
-#if defined(__cplusplus) || defined(lint)
-/*
- hacks to please C++ and lint - goto's inside switch should never be
- executed; yypvt is set to 0 to avoid "used before set" warning.
-*/
- static int __yaccpar_lint_hack__ = 0;
- switch (__yaccpar_lint_hack__)
- {
- case 1: goto yyerrlab;
- case 2: goto yynewstate;
- }
- yypvt = 0;
-#endif
-
- /*
- ** Initialize externals - yyparse may be called more than once
- */
- yypv = &yyv[-1];
- yyps = &yys[-1];
- yystate = 0;
- yytmp = 0;
- yynerrs = 0;
- yyerrflag = 0;
- yychar = -1;
-
-#if YYMAXDEPTH <= 0
- if (yymaxdepth <= 0)
- {
- if ((yymaxdepth = YYEXPAND(0)) <= 0)
- {
- yyerror("yacc initialization error");
- YYABORT;
- }
- }
-#endif
-
- {
- register YYSTYPE *yy_pv; /* top of value stack */
- register int *yy_ps; /* top of state stack */
- register int yy_state; /* current state */
- register int yy_n; /* internal state number info */
- goto yystack; /* moved from 6 lines above to here to please C++ */
-
- /*
- ** get globals into registers.
- ** branch to here only if YYBACKUP was called.
- */
- yynewstate:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- goto yy_newstate;
-
- /*
- ** get globals into registers.
- ** either we just started, or we just finished a reduction
- */
- yystack:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
-
- /*
- ** top of for (;;) loop while no reductions done
- */
- yy_stack:
- /*
- ** put a state and value onto the stacks
- */
-#if YYDEBUG
- /*
- ** if debugging, look up token value in list of value vs.
- ** name pairs. 0 and negative (-1) are special values.
- ** Note: linear search is used since time is not a real
- ** consideration while debugging.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- printf( "State %d, token ", yy_state );
- if ( yychar == 0 )
- printf( "end-of-file\n" );
- else if ( yychar < 0 )
- printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */
- {
- /*
- ** reallocate and recover. Note that pointers
- ** have to be reset, or bad things will happen
- */
- int yyps_index = (yy_ps - yys);
- int yypv_index = (yy_pv - yyv);
- int yypvt_index = (yypvt - yyv);
- int yynewmax;
-#ifdef YYEXPAND
- yynewmax = YYEXPAND(yymaxdepth);
-#else
- yynewmax = 2 * yymaxdepth; /* double table size */
- if (yymaxdepth == YYMAXDEPTH) /* first time growth */
- {
- char *newyys = (char *)YYNEW(int);
- char *newyyv = (char *)YYNEW(YYSTYPE);
- if (newyys != 0 && newyyv != 0)
- {
- yys = YYCOPY(newyys, yys, int);
- yyv = YYCOPY(newyyv, yyv, YYSTYPE);
- }
- else
- yynewmax = 0; /* failed */
- }
- else /* not first time */
- {
- yys = YYENLARGE(yys, int);
- yyv = YYENLARGE(yyv, YYSTYPE);
- if (yys == 0 || yyv == 0)
- yynewmax = 0; /* failed */
- }
-#endif
- if (yynewmax <= yymaxdepth) /* tables not expanded */
- {
- yyerror( "yacc stack overflow" );
- YYABORT;
- }
- yymaxdepth = yynewmax;
-
- yy_ps = yys + yyps_index;
- yy_pv = yyv + yypv_index;
- yypvt = yyv + yypvt_index;
- }
- *yy_ps = yy_state;
- *++yy_pv = yyval;
-
- /*
- ** we have a new state - find out what to do
- */
- yy_newstate:
- if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
- goto yydefault; /* simple state */
-#if YYDEBUG
- /*
- ** if debugging, need to mark whether new token grabbed
- */
- yytmp = yychar < 0;
-#endif
- if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) )
- yychar = 0; /* reached EOF */
-#if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- printf( "Received token " );
- if ( yychar == 0 )
- printf( "end-of-file\n" );
- else if ( yychar < 0 )
- printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
- goto yydefault;
- if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/
- {
- yychar = -1;
- yyval = yylval;
- yy_state = yy_n;
- if ( yyerrflag > 0 )
- yyerrflag--;
- goto yy_stack;
- }
-
- yydefault:
- if ( ( yy_n = yydef[ yy_state ] ) == -2 )
- {
-#if YYDEBUG
- yytmp = yychar < 0;
-#endif
- if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) )
- yychar = 0; /* reached EOF */
-#if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- printf( "Received token " );
- if ( yychar == 0 )
- printf( "end-of-file\n" );
- else if ( yychar < 0 )
- printf( "-none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- /*
- ** look through exception table
- */
- {
- register int *yyxi = yyexca;
-
- while ( ( *yyxi != -1 ) ||
- ( yyxi[1] != yy_state ) )
- {
- yyxi += 2;
- }
- while ( ( *(yyxi += 2) >= 0 ) &&
- ( *yyxi != yychar ) )
- ;
- if ( ( yy_n = yyxi[1] ) < 0 )
- YYACCEPT;
- }
- }
-
- /*
- ** check for syntax error
- */
- if ( yy_n == 0 ) /* have an error */
- {
- /* no worry about speed here! */
- switch ( yyerrflag )
- {
- case 0: /* new error */
- yyerror( "syntax error" );
- goto skip_init;
- yyerrlab:
- /*
- ** get globals into registers.
- ** we have a user generated syntax type error
- */
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- skip_init:
- yynerrs++;
- /* FALLTHRU */
- case 1:
- case 2: /* incompletely recovered error */
- /* try again... */
- yyerrflag = 3;
- /*
- ** find state where "error" is a legal
- ** shift action
- */
- while ( yy_ps >= yys )
- {
- yy_n = yypact[ *yy_ps ] + YYERRCODE;
- if ( yy_n >= 0 && yy_n < YYLAST &&
- yychk[yyact[yy_n]] == YYERRCODE) {
- /*
- ** simulate shift of "error"
- */
- yy_state = yyact[ yy_n ];
- goto yy_stack;
- }
- /*
- ** current state has no shift on
- ** "error", pop stack
- */
-#if YYDEBUG
-# define _POP_ "Error recovery pops state %d, uncovers state %d\n"
- if ( yydebug )
- printf( _POP_, *yy_ps,
- yy_ps[-1] );
-# undef _POP_
-#endif
- yy_ps--;
- yy_pv--;
- }
- /*
- ** there is no state on stack with "error" as
- ** a valid shift. give up.
- */
- YYABORT;
- case 3: /* no shift yet; eat a token */
-#if YYDEBUG
- /*
- ** if debugging, look up token in list of
- ** pairs. 0 and negative shouldn't occur,
- ** but since timing doesn't matter when
- ** debugging, it doesn't hurt to leave the
- ** tests here.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- printf( "Error recovery discards " );
- if ( yychar == 0 )
- printf( "token end-of-file\n" );
- else if ( yychar < 0 )
- printf( "token -none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- printf( "token %s\n",
- yytoks[yy_i].t_name );
- }
- }
-#endif /* YYDEBUG */
- if ( yychar == 0 ) /* reached EOF. quit */
- YYABORT;
- yychar = -1;
- goto yy_newstate;
- }
- }/* end if ( yy_n == 0 ) */
- /*
- ** reduction by production yy_n
- ** put stack tops, etc. so things right after switch
- */
-#if YYDEBUG
- /*
- ** if debugging, print the string that is the user's
- ** specification of the reduction which is just about
- ** to be done.
- */
- if ( yydebug )
- printf( "Reduce by (%d) \"%s\"\n",
- yy_n, yyreds[ yy_n ] );
-#endif
- yytmp = yy_n; /* value to switch over */
- yypvt = yy_pv; /* $vars top of value stack */
- /*
- ** Look in goto table for next state
- ** Sorry about using yy_state here as temporary
- ** register variable, but why not, if it works...
- ** If yyr2[ yy_n ] doesn't have the low order bit
- ** set, then there is no action to be done for
- ** this reduction. So, no saving & unsaving of
- ** registers done. The only difference between the
- ** code just after the if and the body of the if is
- ** the goto yy_stack in the body. This way the test
- ** can be made before the choice of what to do is needed.
- */
- {
- /* length of production doubled with extra bit */
- register int yy_len = yyr2[ yy_n ];
-
- if ( !( yy_len & 01 ) )
- {
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state =
- yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- goto yy_stack;
- }
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- }
- /* save until reenter driver code */
- yystate = yy_state;
- yyps = yy_ps;
- yypv = yy_pv;
- }
- /*
- ** code supplied by user is placed in this switch
- */
- switch( yytmp )
- {
-
-case 1:
-# line 38 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_CONSTRAINT, yypvt[-0].constraint_); } break;
-case 2:
-# line 40 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 3:
-# line 44 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_MIN, yypvt[-0].constraint_); } break;
-case 4:
-# line 46 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_MAX, yypvt[-0].constraint_); } break;
-case 5:
-# line 48 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_WITH, yypvt[-0].constraint_); } break;
-case 6:
-# line 50 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Noop_Constraint(TAO_FIRST); } break;
-case 7:
-# line 52 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Noop_Constraint(TAO_RANDOM); } break;
-case 8:
-# line 56 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_OR, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 9:
-# line 58 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 10:
-# line 62 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_AND, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 11:
-# line 64 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 12:
-# line 68 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_EQ, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 13:
-# line 70 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_NE, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 14:
-# line 72 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_GT, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 15:
-# line 74 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_GE, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 16:
-# line 76 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_LT, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 17:
-# line 78 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_LE, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 18:
-# line 80 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 19:
-# line 84 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_IN, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 20:
-# line 86 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 21:
-# line 90 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_TWIDDLE, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 22:
-# line 92 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 23:
-# line 96 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_PLUS, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 24:
-# line 98 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_MINUS, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 25:
-# line 100 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 26:
-# line 104 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_MULT, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 27:
-# line 106 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Binary_Constraint(TAO_DIV, yypvt[-2].constraint_, yypvt[-0].constraint_); } break;
-case 28:
-# line 108 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 29:
-# line 112 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_NOT, yypvt[-0].constraint_); } break;
-case 30:
-# line 114 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 31:
-# line 118 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-1].constraint_; } break;
-case 32:
-# line 120 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_EXIST, yypvt[-0].constraint_); } break;
-case 33:
-# line 122 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 34:
-# line 124 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 35:
-# line 126 "Trader/constraint.y"
-{ yyval.constraint_ = new TAO_Unary_Constraint(TAO_UMINUS, yypvt[-0].constraint_); } break;
-case 36:
-# line 128 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-case 37:
-# line 130 "Trader/constraint.y"
-{ yyval.constraint_ = yypvt[-0].constraint_; } break;
-# line 532 "/usr/ccs/bin/yaccpar"
- }
- goto yystack; /* reset registers in driver code */
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.cpp b/TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.cpp
deleted file mode 100644
index f13e59cf758..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// $Id$
-
-#include "Dynamic_Property.h"
-
-TAO_Dynamic_Property::TAO_Dynamic_Property(const char* name)
-{
-}
-
-TAO_Dynamic_Property::~TAO_Dynamic_Property (void)
-{
-}
-
-CosTradingDynamic::DynamicProp*
-TAO_Dynamic_Property::register_handler(const char* name,
- CORBA::TypeCode_ptr returned_type,
- const CORBA::Any& extra_info,
- TAO_DP_Evaluation_Handler* handler)
-{
- string prop_name(name);
- CosTradingDynamic::DynamicProp* dp_struct = 0;
- TAO_Dynamic_Property::HANDLER_MAP::iterator handlers_iter =
- this->handlers_.find(prop_name);
-
- // Set up the handler to receive evaluations for prop_name
- if (handlers_iter == this->handlers_.end())
- this->handlers_[prop_name] = handler;
-
- // Create the dp_struct for this dynamic property.
- dp_struct = new CosTradingDynamic::DynamicProp;
- if (dp_struct != 0)
- {
- CORBA::Environment env;
-
- dp_struct->eval_if = this->_this (env);
- TAO_CHECK_ENV_RETURN (env, dp_struct);
- dp_struct->returned_type =
- CORBA::TypeCode::_duplicate (returned_type);
- dp_struct->extra_info = extra_info;
- }
-
- return dp_struct;
-}
-
-TAO_DP_Evaluation_Handler*
-TAO_Dynamic_Property::remove_handler(const char* name)
-{
- string prop_name(name);
- TAO_DP_Evaluation_Handler* handler = 0;
- HANDLER_MAP::iterator handlers_iter = this->handlers_.find(prop_name);
-
- if (handlers_iter != this->handlers_.end())
- {
- handler = (*handlers_iter).second;
- this->handlers_.erase(handlers_iter);
- }
-
- return handler;
-}
-
-CORBA::Any*
-TAO_Dynamic_Property::evalDP(const char* name,
- CORBA::TypeCode_ptr returned_type,
- const CORBA::Any& extra_info,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTradingDynamic::DPEvalFailure))
-{
- string prop_name(name);
- CORBA::Any* result = 0;
- HANDLER_MAP::iterator handlers_iter = this->handlers_.find(prop_name);
-
- if (handlers_iter != this->handlers_.end())
- {
- TAO_DP_Evaluation_Handler* handler = (*handlers_iter).second;
- result = handler->evalDP (extra_info, _env);
-
- if (! returned_type->equal(result->type(), _env))
- TAO_THROW_RETURN (CosTradingDynamic::DPEvalFailure(), result);
- }
- else
- TAO_THROW_RETURN (CosTradingDynamic::DPEvalFailure(), result);
-
- return result;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.h b/TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.h
deleted file mode 100644
index b0d047c6713..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Dynamic_Property.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Dynamic_Property.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-
-#ifndef TAO_DYNAMIC_PROPERTY_H
-#define TAO_DYNAMIC_PROPERTY_H
-
-#include <map>
-#include <string>
-
-#include "orbsvcs/CosTradingS.h"
-
-class TAO_DP_Evaluation_Handler
-{
-public:
-
- virtual CORBA::Any* evalDP(const CORBA::Any& extra_info,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) = 0;
-
-};
-
-class TAO_Dynamic_Property :
- public POA_CosTradingDynamic::DynamicPropEval
-// = TITLE
-// This class exhibits one strategy for handling many dynamic
-// properties from a single process. Dynamic_Property, when
-// registered with the orb, will receive and dispatch to registered
-// handlers, incoming evalDP requests. This pushes the
-// demultiplexing of dynamic property evaluation up from the orb
-// level and into the application.
-{
-public:
-
- TAO_Dynamic_Property(const char* name = "Dynamic Property");
-
- ~TAO_Dynamic_Property (void);
-
- CosTradingDynamic::DynamicProp*
- register_handler(const char* name,
- CORBA::TypeCode_ptr returned_type,
- const CORBA::Any& extra_info,
- TAO_DP_Evaluation_Handler* handler);
- // Registers a handler with the Dynamic_Property
- // demultiplexer. Returns a constructed dynamic property struct
- // upon success, which the caller must then deallocate when
- // finished, or 0 on failure (i.e., a property with the same name
- // is already registered).
-
- TAO_DP_Evaluation_Handler* remove_handler(const char* name);
-
- virtual CORBA::Any* evalDP(const char* name,
- CORBA::TypeCode_ptr returned_type,
- const CORBA::Any& extra_info,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTradingDynamic::DPEvalFailure));
- // Point of demultiplexing.
-
-private:
-
- typedef map
- <
- string,
- TAO_DP_Evaluation_Handler*,
- less<string>
- > HANDLER_MAP;
-
- HANDLER_MAP handlers_;
-
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Dynamic_Property.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_DYNAMIC_PROPERTY_H*/
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Interpreter.cpp b/TAO/orbsvcs/orbsvcs/Trader/Interpreter.cpp
deleted file mode 100644
index 07afac4ce3f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Interpreter.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-#include "Interpreter.h"
-
-TAO_Interpreter::~TAO_Interpreter (void)
-{
- delete root_;
-}
-
-int
-TAO_Interpreter::build_tree(const char* constraints)
-{
- TAO_Lex_String_Input::reset((char*)constraints);
- int return_value = 0;
-
- yyval.constraint_ = 0;
- return_value = ::yyparse();
-
- if (return_value == 0 && yyval.constraint_ != 0)
- this->root_ = yyval.constraint_;
- else
- {
- while (yylex() > 0)
- ;
- this->root_ = 0;
- }
-
- return return_value;
-}
-
-
-int
-TAO_Interpreter::is_empty_string(const char* str)
-{
- int return_value = 0;
-
- if (str != 0)
- {
- int i = 0;
- while (str[i] != '\0')
- {
- if (str[i] != ' ')
- break;
-
- i++;
- }
-
- if (str[i] == '\0')
- return_value = 1;
- }
-
- return return_value;
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Interpreter.h b/TAO/orbsvcs/orbsvcs/Trader/Interpreter.h
deleted file mode 100644
index 08dee14637a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Interpreter.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Interpreter.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-
-#ifndef TAO_INTERPRETER_H
-#define TAO_INTERPRETER_H
-
-#include "Constraint.h"
-#include "Constraint_Nodes.h"
-
-class TAO_Interpreter
-// = TITLE
-// TAO_Interpreter is the superclass for all interpreters. It's
-// build tree method invoke the yacc parser to parse a constraint
-// or preference string.
-{
-protected:
-
- TAO_Interpreter (void) : root_ (0) {}
-
- ~TAO_Interpreter (void);
-
- int build_tree (const char* preferences);
- // Using the Yacc generated parser, construct an expression
- // tree representing <constraints> from the tokens returned by it.
-
- static int is_empty_string (const char* str);
-
- TAO_Constraint* root_;
- // The root of the expression tree, not equal to null if build_tree
- // successfully builds a tree from the constraints.
-};
-
-#endif /* TAO_Interpreter */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Link.cpp b/TAO/orbsvcs/orbsvcs/Trader/Link.cpp
deleted file mode 100644
index 7920d301bbf..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Link.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Link.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#if !defined (TAO_LINK_C)
-#define TAO_LINK_C
-
-#include "Link.h"
-#include "Locking.h"
-#include "Trader.h"
-
-template <class TRADER, class MAP_LOCK_TYPE>
-TAO_Link<TRADER,MAP_LOCK_TYPE>::TAO_Link (TRADER &trader)
- : trader_ (trader),
- TAO_Trader_Components <POA_CosTrading::Link> (trader.trading_components ()),
- TAO_Link_Attributes <POA_CosTrading::Link> (trader.link_attributes ()),
- TAO_Support_Attributes <POA_CosTrading::Link> (trader.support_attributes ())
-{
-}
-
-template <class TRADER, class MAP_LOCK_TYPE>
-TAO_Link<TRADER,MAP_LOCK_TYPE>::~TAO_Link (void)
-{
-}
-
-template <class TRADER, class MAP_LOCK_TYPE> void
-TAO_Link<TRADER,MAP_LOCK_TYPE>::
-add_link (const char *name,
- CosTrading::Lookup_ptr target,
- CosTrading::FollowOption def_pass_on_follow_rule,
- CosTrading::FollowOption limiting_follow_rule,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::DuplicateLinkName,
- CosTrading::InvalidLookupRef,
- CosTrading::Link::DefaultFollowTooPermissive,
- CosTrading::Link::LimitingFollowTooPermissive))
-{
- TAO_WRITE_GUARD (MAP_LOCK_TYPE,
- ace_mon,
- this->links_.lock ());
-
- // Ensure the link name is valid.
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW (CosTrading::Link::IllegalLinkName (name));
-
- // Ensure this isn't a duplicate link name.
- string link_name (name);
- LINKS::iterator links_iter = this->links_.find (link_name);
- if (links_iter != this->links_.end ())
- TAO_THROW (CosTrading::Link::DuplicateLinkName (name));
-
- // Ensure the lookup_ptr isn't nil.
- if (target == CosTrading::Lookup::_nil())
- TAO_THROW (CosTrading::InvalidLookupRef (target));
-
- // Ensure that the default link behavior isn't stronger than the
- // limiting link behavior.
- if (def_pass_on_follow_rule > limiting_follow_rule)
- TAO_THROW (CosTrading::Link::DefaultFollowTooPermissive
- (def_pass_on_follow_rule, limiting_follow_rule));
-
- // Ensure that the limiting link behavior for this link doesn't
- // exceed the maximum allowed for a link.
- if (limiting_follow_rule < this->max_link_follow_policy (_env))
- TAO_THROW (CosTrading::Link::LimitingFollowTooPermissive
- (limiting_follow_rule, this->max_link_follow_policy (_env)));
-
- // Create a link info structure for this link of the federation.
- CosTrading::Link::LinkInfo link_info;
- link_info.target = target;
- link_info.target_reg = target->register_if (_env);
- link_info.def_pass_on_follow_rule = def_pass_on_follow_rule;
- link_info.limiting_follow_rule = limiting_follow_rule;
- TAO_CHECK_ENV_RETURN (_env,);
-
- // Insert this link into the collection of links.
- this->links_.insert (link_name, link_info);
-}
-
-template <class TRADER, class MAP_LOCK_TYPE> void
-TAO_Link<TRADER,MAP_LOCK_TYPE>::remove_link (const char *name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName))
-{
- TAO_WRITE_GUARD (MAP_LOCK_TYPE,
- ace_mon,
- this->links_.lock ());
-
- // Ensure the link name is valid.
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW (CosTrading::Link::IllegalLinkName (name));
-
- // Ensure this isn't a duplicate link name.
- string link_name (name);
- LINKS::iterator links_iter = this->links_.find (link_name);
- if (links_iter == this->links_.end ())
- TAO_THROW (CosTrading::Link::UnknownLinkName (name));
-
- // Erase the link state from the map.
- this->links_.erase (links_iter);
-}
-
-template <class TRADER, class MAP_LOCK_TYPE> CosTrading::Link::LinkInfo *
-TAO_Link<TRADER,MAP_LOCK_TYPE>::describe_link (const char *name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName))
-{
- TAO_READ_GUARD_RETURN (MAP_LOCK_TYPE,
- ace_mon,
- this->links_.lock (),
- (CosTrading::Link::LinkInfo*) 0);
-
- // Ensure the link name is valid.
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW_RETURN (CosTrading::Link::IllegalLinkName (name), 0);
-
- // Ensure this isn't a duplicate link name.
- string link_name (name);
- LINKS::iterator links_iter = this->links_.find (link_name);
- if (links_iter == this->links_.end ())
- TAO_THROW_RETURN (CosTrading::Link::UnknownLinkName (name), 0);
-
- // return the link infor for this link name.
- return &(*links_iter).second;
-}
-
-template <class TRADER, class MAP_LOCK_TYPE> CosTrading::LinkNameSeq*
-TAO_Link<TRADER,MAP_LOCK_TYPE>::list_links (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_READ_GUARD_RETURN (MAP_LOCK_TYPE,
- ace_mon,
- this->links_.lock (),
- (CosTrading::LinkNameSeq*) 0);
-
- // Allocate space for the link names.
- CORBA::ULong size = this->links_.size (), i = 0;
- CosTrading::LinkName* link_seq =
- CosTrading::LinkNameSeq::allocbuf (size);
-
- // Copy the link names into the buffer.
- for (LINKS::iterator links_iter = this->links_.begin ();
- links_iter != this->links_.end ();
- links_iter++)
- link_seq[i++] = CORBA::string_dup ((*links_iter).first.data ());
-
- // Return a sequence of the buf names.
- return new CosTrading::LinkNameSeq (i, i, link_seq, 1);
-}
-
-template <class TRADER, class MAP_LOCK_TYPE> void
-TAO_Link<TRADER,MAP_LOCK_TYPE>::
-modify_link (const char *name,
- CosTrading::FollowOption def_pass_on_follow_rule,
- CosTrading::FollowOption limiting_follow_rule,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName,
- CosTrading::Link::DefaultFollowTooPermissive,
- CosTrading::Link::LimitingFollowTooPermissive))
-{
- TAO_WRITE_GUARD (MAP_LOCK_TYPE,
- ace_mon,
- this->links_.lock ());
-
- // Ensure the link name is valid.
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW (CosTrading::Link::IllegalLinkName (name));
-
- // Ensure this isn't a duplicate link name.
- string link_name (name);
- LINKS::iterator links_iter = this->links_.find (link_name);
- if (links_iter == this->links_.end ())
- TAO_THROW (CosTrading::Link::UnknownLinkName (name));
-
- // Ensure that the default link behavior isn't stronger than the
- // limiting link behavior.
- if (def_pass_on_follow_rule > limiting_follow_rule)
- TAO_THROW (CosTrading::Link::DefaultFollowTooPermissive
- (def_pass_on_follow_rule, limiting_follow_rule));
-
- // Ensure that the limiting link behavior for this link doesn't
- // exceed the maximum allowed for a link.
- if (limiting_follow_rule < this->max_link_follow_policy (_env))
- TAO_THROW (CosTrading::Link::LimitingFollowTooPermissive
- (limiting_follow_rule, this->max_link_follow_policy (_env)));
-
- // Adjust the link settings
- CosTrading::Link::LinkInfo& link_info = (*links_iter).second;
- link_info.def_pass_on_follow_rule = def_pass_on_follow_rule;
- link_info.limiting_follow_rule = limiting_follow_rule;
-}
-
-#endif /* TAO_LINK_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Link.h b/TAO/orbsvcs/orbsvcs/Trader/Link.h
deleted file mode 100644
index b10e5a73c79..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Link.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Link.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>,
-// Irfan Pyarali <irfan@cs.wustl.edu>,
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_LINK_H
-#define TAO_LINK_H
-
-#include "Attributes.h"
-#include "Monitor.h"
-#include <string>
-#include <map>
-
-template <class TRADER, class MAP_LOCK_TYPE>
-class TAO_Link :
- public TAO_Trader_Components <POA_CosTrading::Link>,
- public TAO_Support_Attributes <POA_CosTrading::Link>,
- public TAO_Link_Attributes <POA_CosTrading::Link>
-{
-public:
-
- TAO_Link (TRADER &trader);
-
- ~TAO_Link (void);
-
- virtual void add_link (const char *name,
- CosTrading::Lookup_ptr target,
- CosTrading::FollowOption def_pass_on_follow_rule,
- CosTrading::FollowOption limiting_follow_rule,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::DuplicateLinkName,
- CosTrading::InvalidLookupRef,
- CosTrading::Link::DefaultFollowTooPermissive,
- CosTrading::Link::LimitingFollowTooPermissive));
- // BEGIN SPEC
- // The add_link operation allows a trader subsequently to use the
- // service of another trader in the performance of its own trading
- // service operations.
-
- // The "name" parameter is used in subsequent link management
- // operations to identify the intended link. If the parameter is not
- // legally formed, then the IllegalLinkName exception is raised. An
- // exception of DuplicateLinkName is raised if the link name already
- // exists. The link name is also used as a component in a sequence
- // of name components in naming a trader for resolving or forwarding
- // operations. The sequence of context relative link names provides
- // a path to a trader.
-
- // The "target" parameter identifies the Lookup interface at which
- // the trading service provided by the target trader can be
- // accessed. Should the Lookup interface parameter be nil, then an
- // exception of InvalidLookupRef is raised. The target interface is
- // used to obtain the associated Register interface, which will be
- // subsequently returned as part of a describe_link operation and
- // invoked as part of a resolve operation.
-
- // The "def_pass_on_follow_rule" parameter specifies the default
- // link behavior for the link if no link behavior is specified on an
- // importer's query request. If the "def_pass_on_follow_rule"
- // exceeds the "limiting_follow_rule" specified in the next
- // parameter, then a DefaultFollowTooPermissive exception is
- // raised.
-
- // The "limiting_follow_rule" parameter specifies the most
- // permissive link follow behavior that the link is willing to
- // tolerate. The exception LimitingFollowTooPermissive is raised if
- // this parameter exceeds the trader's attribute of
- // "max_link_follow_policy" at the time of the link's creation. Note
- // it is possible for a link's "limiting_follow_rule" to exceed the
- // trader's "max_link_follow_policy" later in the life of a link, as
- // it is possible that the trader could set its
- // "max_link_follow_policy" to a more restrictive value after the
- // creation of the link.
- // END SPEC
-
- virtual void remove_link (const char *name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName));
-
- // BEGIN SPEC
- // The remove_link operation removes all knowledge of the target
- // trader. The target trader cannot be used subsequently to resolve,
- // forward, or propagate trading operations from this trader.
-
- // The "name" parameter identifies the link to be removed. The
- // exception IllegalLinkName is raised if the link is formed poorly
- // and the UnknownLinkName exception is raised if the named link is
- // not in the trader.
- // END SPEC
-
- virtual CosTrading::Link::LinkInfo* describe_link (const char *name,
- CORBA::Environment&)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName));
-
- // BEGIN SPEC
- // The describe_link operation returns information on a link held in
- // the trader.
-
- // The "name" parameter identifies the link whose description is
- // required. For a malformed link name, the exception
- // IllegalLinkName is raised. An UnknownLinkName exception is raised
- // if the named link is not found in the trader.
-
- // The operation returns a LinkInfo structure comprising: ° the
- // Lookup interface of the target trading service, ° the Register
- // interface of the target trading service, and ° the default, as
- // well as the limiting follow behavior of the named link.
-
- // If the target service does not support the Register interface,
- // then that field of the LinkInfo structure is nil. Given the
- // description of the Register::resolve() operation in "Resolve
- // Operation" on page 16-45, most implementations will opt for
- // determining the Register interface when add_link is called and
- // storing that information statically with the rest of the link
- // state.
- // END SPEC
-
- virtual CosTrading::LinkNameSeq* list_links (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- // BEGIN SPEC
- // The list_links operation returns a list of the names of all
- // trading links within the trader. The names can be used
- // subsequently for other management operations, such as
- // describe_link or remove_link.
- // END SPEC
-
- virtual void modify_link (const char *name,
- CosTrading::FollowOption def_pass_on_follow_rule,
- CosTrading::FollowOption limiting_follow_rule,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName,
- CosTrading::Link::DefaultFollowTooPermissive,
- CosTrading::Link::LimitingFollowTooPermissive));
-
- // BEGIN SPEC
- // The modify_link operation is used to change the existing link
- // follow behaviors of an identified link. The Lookup interface
- // reference of the target trader and the name of the link cannot be
- // changed.
-
- // The "name" parameter identifies the link whose follow behaviors
- // are to be changed. A poorly formed "name" raises the
- // IllegalLinkName exception. An UnknownLinkName exception is raised
- // if the link name is not known to the trader.
-
- // The "def_pass_on_follow_rule" parameter specifies the new default
- // link behavior for this link. If the "def_pass_on_follow_rule"
- // exceeds the "limiting_follow_rule" specified in the next
- // parameter, then a DefaultFollowTooPermissive exception is
- // raised.
-
- // The "limiting_follow_rule" parameter specifies the new limit for
- // the follow behavior of this link. The exception
- // LimitingFollowTooPermissive is raised if the value exceeds the
- // current "max_link_follow_policy" of the trader.
- // END SPEC
-
-private:
-
- typedef TAO_Monitor
- <
- map <string, CosTrading::Link::LinkInfo, less <string> >,
- MAP_LOCK_TYPE
- >
- LINKS;
-
- LINKS links_;
- // The collection of link connecting this trader to others in the
- // federation.
-
- TRADER &trader_;
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Link.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_LINK_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Locking.h b/TAO/orbsvcs/orbsvcs/Trader/Locking.h
deleted file mode 100644
index 7a583405dc9..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Locking.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- C++ -*- */
-
-// =========================================================================
-// $Id$
-//
-// = LIBRARY
-// Trading
-//
-// = FILENAME
-// Locking.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ==========================================================================
-#ifndef TAO_LOCKING_H
-#define TAO_LOCKING_H
-
-#if defined (OS_NO_NAMESPACE)
-#define queue booga
-#endif /* OS_NO_NAMESPACE */
-
-#include "tao/corba.h"
-
-#if defined (OS_NO_NAMESPACE)
-#undef queue
-#endif /* OS_NO_NAMESPACE */
-
-
-// Macros for obtaining read/write locks that are
-// automatically released at the end of scope.
-// In case of failure, CORBA::SystemException is thrown.
-
-#define TAO_WRITE_GUARD(MUTEX,OBJ,LOCK) \
-ACE_Write_Guard<MUTEX> OBJ (LOCK); \
-if (OBJ.locked () == 0) \
- TAO_THROW (CORBA::UNKNOWN (CORBA::COMPLETED_NO));
-
-#define TAO_READ_GUARD(MUTEX,OBJ,LOCK) \
-ACE_Read_Guard<MUTEX> OBJ (LOCK); \
-if (OBJ.locked () == 0) \
- TAO_THROW (CORBA::UNKNOWN (CORBA::COMPLETED_NO));
-
-#define TAO_WRITE_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN) \
-ACE_Write_Guard<MUTEX> OBJ (LOCK); \
-if (OBJ.locked () == 0) \
- TAO_THROW_RETURN (CORBA::UNKNOWN (CORBA::COMPLETED_NO), RETURN);
-
-#define TAO_READ_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN) \
-ACE_Read_Guard<MUTEX> OBJ (LOCK); \
-if (OBJ.locked () == 0) \
- TAO_THROW_RETURN (CORBA::UNKNOWN (CORBA::COMPLETED_NO), RETURN);
-
-#endif /* TAO_LOCKING_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Lookup.cpp b/TAO/orbsvcs/orbsvcs/Trader/Lookup.cpp
deleted file mode 100644
index 771db950890..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Lookup.cpp
+++ /dev/null
@@ -1,775 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Lookup.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#if !defined (TAO_LOOKUP_C)
-#define TAO_LOOKUP_C
-
-#include "Lookup.h"
-#include "ace/Auto_Ptr.h"
-#include <iostream.h>
-
-#include "Query_Only_Offer_Iterator.h"
-#include "Register_Offer_Iterator.h"
-#include "Offer_Iterator_Collection.h"
-
-template <class TRADER>
-const char* TAO_Lookup<TRADER>::NAME = "Trader: Lookup";
-
-template <class TRADER>
-TAO_Lookup<TRADER>::TAO_Lookup (TRADER &trader)
- : trader_ (trader),
- TAO_Trader_Components<POA_CosTrading::Lookup> (trader.trading_components ()),
- TAO_Support_Attributes<POA_CosTrading::Lookup> (trader.support_attributes ()),
- TAO_Import_Attributes<POA_CosTrading::Lookup> (trader.import_attributes ())
-{
-}
-
-template <class TRADER>
-TAO_Lookup<TRADER>::~TAO_Lookup (void)
-{
-}
-
-template <class TRADER> void
-TAO_Lookup<TRADER>::
-query (const char *type,
- const char *constraint,
- const char *preferences,
- const CosTrading::PolicySeq &in_policies,
- const CosTrading::Lookup::SpecifiedProps &desired_props,
- CORBA::ULong how_many,
- CosTrading::OfferSeq_out returned_offers,
- CosTrading::OfferIterator_out returned_offer_iterator,
- CosTrading::PolicyNameSeq_out returned_limits_applied,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName))
-{
- // Initializing out parameters
- returned_offers = new CosTrading::OfferSeq;
- returned_offer_iterator = CosTrading::OfferIterator::_nil ();
- returned_limits_applied = new CosTrading::PolicyNameSeq;
-
- // Get service type map
- TRADER::SERVICE_TYPE_MAP& service_type_map =
- this->trader_.service_type_map ();
-
- TAO_Policies policies (this->trader_, in_policies, env);
- TAO_CHECK_ENV_RETURN (env,);
-
- // If the importer has specified a starting trader, foward the
- // query.
- CosTrading::TraderName* trader_name = policies.starting_trader (env);
- TAO_CHECK_ENV_RETURN (env,);
-
- if (trader_name != 0)
- {
- CosTrading::TraderName_var starting_trader (trader_name);
- this->forward_query (starting_trader.in (),
- type,
- constraint,
- preferences,
- policies,
- desired_props,
- how_many,
- returned_offers,
- returned_offer_iterator,
- returned_limits_applied,
- env);
- return;
- }
-
- // If a federated query returns to us, ignore it to prevent
- // redundant results.
- if (this->duplicate_stem_id (policies, env))
- return;
-
- // If the type is invalid or unknown, let us know now.
- TAO_Support_Attributes_Impl support_attrs =
- this->trader_.support_attributes ();
- CosTrading::TypeRepository_ptr type_repos =
- support_attrs.type_repos ();
- CosTradingRepos::ServiceTypeRepository_ptr rep =
- CosTradingRepos::ServiceTypeRepository::_narrow (type_repos, env);
- TAO_CHECK_ENV_RETURN (env,);
-
- // If type is not found, there is nothing to consider - return.
- // Else we found the service type....proceed with lookup.
- // We will store the matched offers in here.
- LOOKUP_OFFER_LIST ordered_offers;
-
- // Perform the lookup, placing the ordered results in ordered_offers.
- this->perform_lookup (type,
- constraint,
- preferences,
- service_type_map,
- rep,
- policies,
- ordered_offers,
- env);
- TAO_CHECK_ENV_RETURN (env,);
-
- // Fill the return sequence and iterator with the bountiful results.
- CORBA::ULong offers_returned =
- this->fill_receptacles (type,
- ordered_offers,
- how_many,
- desired_props,
- returned_offers,
- returned_offer_iterator,
- env);
- TAO_CHECK_ENV_RETURN (env,);
-
- // Return the limits applied during the course of the lookup.
- returned_limits_applied = policies.limits_applied ();
-
- // Determine if we should perform a federated query, and if so
- // construct a sequence of links to follow.
- CosTrading::LinkNameSeq* links = 0;
- CosTrading::LinkNameSeq_var links_to_follow (links);
- CORBA::Boolean should_follow =
- this->retrieve_links (policies,
- offers_returned,
- CosTrading::LinkNameSeq_out (links),
- env);
- TAO_CHECK_ENV_RETURN (env,);
-
- if (should_follow)
- {
- // Perform the sequence of fedrated queries.
- this->federated_query (*links,
- type,
- constraint,
- preferences,
- policies,
- desired_props,
- how_many - returned_offers->length (),
- returned_offers,
- returned_offer_iterator,
- returned_limits_applied,
- env);
- }
- TAO_CHECK_ENV_RETURN (env,);
-}
-
-template <class TRADER> void
-TAO_Lookup<TRADER>::
-perform_lookup (const char* type,
- const char* constraint,
- const char* preferences,
- SERVICE_TYPE_MAP& service_type_map,
- CosTradingRepos::ServiceTypeRepository_ptr rep,
- TAO_Policies& policies,
- LOOKUP_OFFER_LIST& ordered_offers,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType))
-{
- // TAO_Offer_Filter -- ensures that we don't consider offers with
- // modifiable or dynamic properties if the Trader doesn't support
- // them, or the importer has turned them off using policies.
- // TAO_Constraint_Validator -- validates the constraint with the
- // property types in the supplied type.
- // TAO_Constraint_Interpreter -- parses the constraint string, and
- // determines whether an offer meets those constraints.
- // TAO_Preference_Interpreter -- parses the preference string and
- // orders offers according to those constraints.
- TYPE_STRUCT type_struct (rep->fully_describe_type (type, env));
- TAO_CHECK_ENV_RETURN (env,);
- TAO_Offer_Filter offer_filter (type_struct.ptr (), policies, env);
- TAO_Constraint_Validator validator (type_struct.ptr ());
- TAO_Constraint_Interpreter constr_inter (validator, constraint, env);
- TAO_CHECK_ENV_RETURN (env,);
- TAO_Preference_Interpreter pref_inter (validator, preferences, env);
- TAO_CHECK_ENV_RETURN (env,);
- CORBA::ULong return_card = policies.return_card (env);
- TAO_CHECK_ENV_RETURN (env,);
-
- // Try to find the map of offers of desired service type.
- this->lookup_one_type (type,
- service_type_map,
- constr_inter,
- pref_inter,
- offer_filter);
-
- // If the importer hasn't demanded an exact match search, we search
- // all the subtypes of the supplied type. NOTE: Only the properties
- // belonging to the provided type are considered on
- // subtypes. Additional properties on the subtype are generally
- // ignored. This is as it should be, consistent with the notions of
- // type inheritence.
- if (! policies.exact_type_match (env))
- {
- TAO_CHECK_ENV_RETURN (env,);
- this->lookup_all_subtypes (type,
- service_type_map,
- rep,
- constr_inter,
- pref_inter,
- offer_filter);
- }
- TAO_CHECK_ENV_RETURN (env,);
-
- // Pull the matched offers out of the pref_inter in order, and stick
- // them in a queue. The offers in the queue will be emptied into
- // the return sequence and iterator for later purusal by the
- // importer. Only prepare for the importer no more offers than the
- // return cardinality default or policy allows.
- int num_offers = pref_inter.num_offers ();
- for (int i = 0; i < num_offers && i < return_card; i++)
- {
- CosTrading::Offer* offer;
- CosTrading::OfferId offer_id;
- if (pref_inter.remove_offer (offer_id, offer))
- ordered_offers.push_back (make_pair (offer_id, offer));
- else
- break;
- }
-}
-
-template <class TRADER> void
-TAO_Lookup<TRADER>::
-lookup_one_type (const char* type,
- SERVICE_TYPE_MAP& service_type_map,
- TAO_Constraint_Interpreter& constr_inter,
- TAO_Preference_Interpreter& pref_inter,
- TAO_Offer_Filter& offer_filter)
-{
- // Retrieve an iterator over the offers for a given type.
- auto_ptr<LOCAL_OFFER_ITER>
- offer_iter (service_type_map.get_offers (type));
-
- if (offer_iter.get () != 0)
- {
- while (offer_filter.ok_to_consider_more () &&
- offer_iter->has_more_offers ())
- {
- // For each offer in the iterator, attempt to match it with
- // the constraints passed to the Query method. If it matches
- // the constraint, use the TAO_Preference_Interpreter to
- // order the matched offers with respect to the preference
- // string passed to the method. All the while the offer
- // iterator ensures we don't exceed the match cardinality
- // constraints.
- CosTrading::Offer* offer = offer_iter->get_offer ();
-
- TAO_Constraint_Evaluator evaluator (offer);
- if (offer_filter.ok_to_consider (offer) &&
- constr_inter.evaluate (evaluator))
- {
- // Shove the offer and its id into the preference
- // ordering object, pref_inter.
- CosTrading::OfferId offer_id = offer_iter->get_id ();
- pref_inter.order_offer (offer_id, offer, evaluator);
- offer_filter.matched_offer ();
- }
-
- offer_iter->next_offer ();
- }
- }
-}
-
-template <class TRADER> void
-TAO_Lookup<TRADER>::
-lookup_all_subtypes (const char* type,
- SERVICE_TYPE_MAP& service_type_map,
- CosTradingRepos::ServiceTypeRepository_ptr rep,
- TAO_Constraint_Interpreter& constr_inter,
- TAO_Preference_Interpreter& pref_inter,
- TAO_Offer_Filter& offer_filter)
-{
- // BEGIN SPEC
- // The trader may return a service offer of a subtype of the "type"
- // requested. Sub-typing of service types is discussed in "Service
- // Types" on page 16-4. A service subtype can be described by the
- // properties of its supertypes. This ensures that a well-formed query
- // for the "type" is also a well-formed query with respect to any
- // subtypes. However, if the importer specifies the policy of
- // exact_type_match = TRUE, then only offers with the exact (no
- // subtype) service type requested are returned.
- // END SPEC
-
- // The algorithm works as follows:
- // Starting with the asked for type, iterate through all other types
- // looking for those that have it as their direct supertype. Upon
- // finding a direct subtype of the top-level types, consider all of
- // that type's offer and stick it onto the list of subtypes. On the
- // second iteration, locate subtypes of those subtypes. This
- // proceeds until all of the subtypes for the original class have
- // been located and their offers considered, or we've exhausted the
- // cardinality constraints.
-
- string type_string (type);
- TYPE_LIST sub_types, unconsidered_types;
- CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes sst;
- TYPE_NAME_SEQ all_types (service_type_map.list_all_types ());
-
- // All types save the supertype are initially unconsidered.
- sub_types.push_back (type_string);
- for (int i = all_types->length () - 1; i >= 0; i--)
- unconsidered_types.push_back (string (all_types[i]));
- unconsidered_types.remove (type_string);
-
- // Iterate over the remaining subtypes to locate their subtypes.
- // We could meet our cardinality constraints prior searching all
- // types, at which point the algorithm ends gracefully.
- while (! sub_types.empty () && offer_filter.ok_to_consider_more ())
- {
- // For each potential supertype, iterate over the remaining types.
- const char* super_type = sub_types.front ().data ();
- sub_types.pop_front ();
- for (int j = unconsidered_types.size () - 1;
- j >= 0 && offer_filter.ok_to_consider_more ();
- j--)
- {
- TYPE_STRUCT type_struct;
- CORBA::Boolean is_sub_type = 0;
- string type_name = unconsidered_types.front ();
- unconsidered_types.pop_front ();
-
- TAO_TRY
- {
- type_struct = rep->describe_type (type_name.data (), TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- break;
- }
- TAO_ENDTRY;
-
- // Determine if the prospective type is a subtype of the given one.
- for (int k = type_struct->super_types.length () - 1;
- k >= 0 &&
- ACE_OS::strcmp (type_struct->super_types[k], super_type);
- k--)
- ;
-
- // If this type isn't a subtype, return it to the queue for
- // later consideration.
- if (k < 0)
- unconsidered_types.push_back (type_name);
- else
- {
- // Otherwise, perform a constraint match on the type, and
- // add it to the queue of potential supertypes.
- this->lookup_one_type (type_name.data (),
- service_type_map,
- constr_inter,
- pref_inter,
- offer_filter);
- sub_types.push_back (type_name);
- }
- }
- }
-}
-
-
-template <class TRADER> int
-TAO_Lookup<TRADER>::
-fill_receptacles (const char* type,
- LOOKUP_OFFER_LIST& ordered_offers,
- CORBA::ULong how_many,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CosTrading::OfferSeq*& offers,
- CosTrading::OfferIterator_ptr& offer_itr,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName))
-{
- // BEGIN SPEC
- // The returned offers are passed back in one of two ways (or a
- // combination of both). ° The "offers" return result conveys a list
- // of offers and the "offer_itr" is a reference to an interface at
- // which offers can be obtained. ° The "how_many" parameter states
- // how many offers are to be returned via the "offers" result, any
- // remaining offers are available via the iterator interface. If the
- // "how_many" exceeds the number of offers to be returned, then the
- // "offer_itr" will be nil.
- // END SPEC
-
- // Ordered offers iterator.
- LOOKUP_OFFER_LIST::iterator ordered_offers_iterator =
- ordered_offers.begin ();
- TAO_Property_Filter prop_filter (desired_props, env);
- TAO_CHECK_ENV_RETURN (env, 0);
-
- // RETURNING: Calculate how many offers go into the sequence
- // Calculate how many go into the iterator
- int size = ordered_offers.size ();
- CORBA::ULong offers_in_sequence = (how_many < size) ? how_many : size;
- CORBA::ULong offers_in_iterator = size - offers_in_sequence;
- CORBA::ULong total_offers = offers_in_sequence + offers_in_iterator;
-
- offers->length (offers_in_sequence);
-
- // Add to the sequence, filtering out the undesired properties.
- for (int i = 0; i < offers_in_sequence; ordered_offers_iterator++, i++)
- {
- CosTrading::Offer& source = *((*ordered_offers_iterator).second);
- CosTrading::Offer& destination = (*offers)[i];
- prop_filter.filter_offer (source, destination);
- }
-
- // Any remaining offers go into iterator
- if (offers_in_iterator > 0)
- {
- // Create an iterator implementation
- TAO_Offer_Iterator *oi =
- this->create_offer_iterator (type, prop_filter);
- offer_itr = oi->_this (env);
- TAO_CHECK_ENV_RETURN (env,total_offers - offers_in_iterator);
-
- // Add to the iterator
- for (i = 0;
- i < offers_in_iterator;
- ordered_offers_iterator++, i++)
- {
- oi->add_offer ((*ordered_offers_iterator).first,
- (*ordered_offers_iterator).second);
- }
- }
-
- return total_offers;
-}
-
-template <class TRADER>
-TAO_Offer_Iterator *
-TAO_Lookup<TRADER>::
-create_offer_iterator (const char *type,
- const TAO_Property_Filter& pfilter)
-{
- // This is the factory method that creates the appropriate type of
- // offer iterator. If there's no Register interface, then we can
- // just stick the offers directly into an iterator, since these
- // offers will never be removed from the Trader. If there's a
- // Register interface, then there's a chance that by the time the
- // importer calls the next_n method on the iterator that the offer
- // will have been withdrawn. So the Register_Offer_Iterator retains only
- // the offer ids, and will recognize when an offer id no longer
- // identifies an offer in the trader.
-
- // We pass the property filter to the iterators, so when the iterators
- // return the offers, they can remove the undesirable properties
- // from those offers.
- TAO_Offer_Iterator* iterator = 0;
-
- if (CORBA::is_nil (this->trader_.trading_components ().register_if ()))
- iterator = new TAO_Query_Only_Offer_Iterator (pfilter);
- else
- {
- iterator =
- new TAO_Register_Offer_Iterator<TRADER> (this->trader_, pfilter);
- }
-
- return iterator;
-}
-
-template <class TRADER> CORBA::Boolean
-TAO_Lookup<TRADER>::duplicate_stem_id (TAO_Policies& policies,
- CORBA::Environment& _env)
-{
- // Determine whether the stem_id passed to this query is one we've
- // already seen. If this is the case, then we shouldn't pursue this
- // query any further.
- CORBA::Boolean return_value = CORBA::B_FALSE;
- CosTrading::Admin::OctetSeq_var request_id = policies.request_id (_env);
- TAO_CHECK_ENV_RETURN (_env, return_value);
-
- // If the stem_id was provided and is a duplicate, return true.
- if ((! request_id.ptr () == 0) &&
- (this->request_ids_.insert (request_id)).second)
- return_value = CORBA::B_TRUE;
-
- return return_value;
-}
-
-template <class TRADER> CORBA::Boolean
-TAO_Lookup<TRADER>::retrieve_links (TAO_Policies& policies,
- CORBA::ULong offers_returned,
- CosTrading::LinkNameSeq_out links,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Lookup::PolicyTypeMismatch))
-{
- CORBA::Boolean should_follow = CORBA::B_FALSE;
- CosTrading::FollowOption follow_rule = policies.link_follow_rule (_env);
- TAO_CHECK_ENV_RETURN (_env, should_follow);
-
- // Determine whether or not a federated query is warranted. A query
- // is waranted if the follow_rule governing this query is 'always'
- // or if_no_local and the local query returned nothing.
- if ((follow_rule == CosTrading::always ||
- (follow_rule == CosTrading::if_no_local && offers_returned == 0))
- && policies.hop_count (_env) > 0)
- should_follow = CORBA::B_TRUE;
-
- if (should_follow)
- {
- // Grab the names of all the links in the trader, and push
- // the suitable ones onto <valid_links>.
- CosTrading::Link_var link_interface
- = this->trader_.trading_components ().link_if ();
- deque<CosTrading::LinkName> valid_links;
- CosTrading::LinkNameSeq_var link_path =
- link_interface->list_links (_env);
- TAO_CHECK_ENV_RETURN (_env, should_follow);
-
- // Determine which of the links registered with the Link
- // interface are suitable to follow.
- for (int i = link_path->length () - 1; i >= 0; i--)
- {
- CosTrading::FollowOption link_rule =
- policies.link_follow_rule ((const char*) link_path[i], _env);
- if (link_rule == CosTrading::always ||
- (link_rule == CosTrading::if_no_local &&
- offers_returned == 0))
- valid_links.push_back ((char *)((const char*) link_path[i]));
- }
-
- // Collect those valid links into a sequence suitable for
- // passing into the federated_query method.
- links = new CosTrading::LinkNameSeq (valid_links.size ());
- for (i = valid_links.size (); i >= 0; i--, valid_links.pop_front ())
- links[i] = valid_links.front ();
- }
-
- return should_follow;
-}
-
-
-template <class TRADER> void
-TAO_Lookup<TRADER>::
-federated_query (const CosTrading::LinkNameSeq& links,
- const char *type,
- const char *constr,
- const char *pref,
- TAO_Policies& policies,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CORBA::ULong how_many,
- CosTrading::OfferSeq_out offers,
- CosTrading::OfferIterator_out offer_iter,
- CosTrading::PolicyNameSeq_out limits,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName))
-{
- // The general idea here is this: We've assembled a number of links
- // to follow, and we'll query each of them in turn. When we've
- // assembled <return_card> number of offers, we've hit the ceiling
- // and we back out. On each query we adjust the policies for the new
- // trader by reducing the return_card, hop_count, etc..., and merge
- // the results from the new query with the results from the previous
- // queries.
-
- // We'll need the link and admin interfaces for this part of the
- // federated query.
- CORBA::ULong total_returned = 0,
- return_card = policies.return_card (_env);
- CosTrading::Link_var link_interface
- = this->trader_.trading_components ().link_if ();
- CosTrading::Admin_var admin_interface
- = this->trader_.trading_components ().admin_if ();
-
- // Begin collecting all the various offer_iterators into a
- // collection. The end result is a distributed tree of offer
- // iterators, which if traversed in its entirety is probably hugely
- // inefficient, but oh well, I can't think of a better solution.
- TAO_Offer_Iterator_Collection* offer_iter_collection;
- ACE_NEW_RETURN (offer_iter_collection,
- TAO_Offer_Iterator_Collection,);
-
- offer_iter_collection->add_offer_iterator (offer_iter);
- total_returned = offers->length () +
- offer_iter_collection->max_left (_env);
-
- for (int i = links.length () - 1; i >= 0; i--)
- {
- CosTrading::OfferSeq* out_offers = 0;
- CosTrading::OfferIterator* out_offer_iter = 0;
- CosTrading::PolicyNameSeq* out_limits = 0;
- CosTrading::OfferSeq_var out_offers_var (out_offers);
- CosTrading::OfferIterator_var out_offer_iter_var (out_offer_iter);
- CosTrading::PolicyNameSeq_var out_limits_var (out_limits);
-
- TAO_TRY
- {
- // Obtain information about the link we're traversing.
- CosTrading::Link::LinkInfo_var link_info =
- link_interface->describe_link (links[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Prepare a set of policies to pass to the next trader.
- CosTrading::PolicySeq_var new_pols =
- policies.policies_to_pass (link_info->def_pass_on_follow_rule,
- total_returned,
- admin_interface.in ());
-
- // Perform the federated query.
- link_info->target->
- query (type,
- constr,
- pref,
- new_pols.in (),
- desired_props,
- how_many - offers->length (),
- CosTrading::OfferSeq_out (out_offers),
- CosTrading::OfferIterator_out (out_offer_iter),
- CosTrading::PolicyNameSeq_out (out_limits),
- _env);
- TAO_CHECK_ENV;
-
- // Merge the results.
- CORBA::ULong offset = offers->length ();
- offers->length (out_offers->length () + offset);
- offer_iter_collection->add_offer_iterator (out_offer_iter);
- for (int j = out_offers->length () - 1; j >= 0; j--)
- offers[j + offset] = out_offers_var[j];
-
- // Concatenate the limits applied.
- offset = limits->length ();
- offers->length (out_limits->length () + offset);
- for (j = out_limits->length () - 1; j >= 0; j--)
- limits[j + offset] = out_limits_var[j];
-
- // If we've obtained all the offers we need, let's blow this
- // joint.
- if (total_returned >= return_card)
- break;
- }
- TAO_CATCHANY
- {
- break;
- }
- TAO_ENDTRY;
- }
-
- // Return the collection of offer iterators.
- offer_iter = offer_iter_collection->_this (_env);
-}
-
-template <class TRADER> void
-TAO_Lookup<TRADER>
-::forward_query (const CosTrading::TraderName& starting_trader,
- const char *type,
- const char *constr,
- const char *pref,
- TAO_Policies& policies,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CORBA::ULong how_many,
- CosTrading::OfferSeq_out offers,
- CosTrading::OfferIterator_out offer_itr,
- CosTrading::PolicyNameSeq_out limits_applied,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName))
-{
- // Forward this query to the next link in the starting_trader sequence.
- CosTrading::Link_var link_interface
- = this->trader_.trading_components ().link_if ();
- CosTrading::Admin_var admin_interface
- = this->trader_.trading_components ().admin_if ();
-
- TAO_TRY
- {
- CosTrading::Link::LinkInfo_var link_info =
- link_interface->describe_link (starting_trader[0], TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::PolicySeq_var in_policies = policies.policies_to_forward ();
-
- // Perform forwarding query.
- link_info->target->query (type,
- constr,
- pref,
- in_policies.in (),
- desired_props,
- how_many,
- offers,
- offer_itr,
- limits_applied,
- _env);
- TAO_CHECK_ENV_RETURN (_env,);
- }
- TAO_CATCHANY
- {
- TAO_THROW (CosTrading::Lookup::InvalidPolicyValue ());
- }
- TAO_ENDTRY;
-}
-
-
-int
-operator< (const CosTrading::Admin::OctetSeq_var& l,
- const CosTrading::Admin::OctetSeq_var& r)
-{
- int return_value = 0;
- CosTrading::Admin::OctetSeq& left = l;
- CosTrading::Admin::OctetSeq& right = r;
- CORBA::ULong left_length = left.length (),
- right_length = right.length ();
-
-
- if (left_length < right_length)
- return_value = 1;
- else if (left_length == right_length)
- {
- for (int i = 0; i < left_length; i++)
- {
- if (left[i] < right[i])
- {
- return_value = 1;
- break;
- }
- else if (left[i] > right[i])
- break;
- }
- }
-
- return return_value;
-}
-
-#endif /* TAO_LOOKUP_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Lookup.h b/TAO/orbsvcs/orbsvcs/Trader/Lookup.h
deleted file mode 100644
index f7fd3f14b1a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Lookup.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Lookup.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_LOOKUP_H
-#define TAO_LOOKUP_H
-
-#include "Policies.h"
-#include "Offer_Filter.h"
-#include "Offer_Iterator.h"
-#include "Constraint_Interpreter.h"
-#include "Preference_Interpreter.h"
-
-#include <list>
-
-template<class TRADER>
-class TAO_Lookup :
- public TAO_Trader_Components<POA_CosTrading::Lookup>,
- public TAO_Support_Attributes<POA_CosTrading::Lookup>,
- public TAO_Import_Attributes<POA_CosTrading::Lookup>
- //
- // = TITLE
- // This class implements CosTrading::Lookup IDL interface.
-{
-public:
-
- TAO_Lookup (TRADER &trader);
-
- ~TAO_Lookup (void);
-
- virtual void
- query (const char *type,
- const char *constr,
- const char *pref,
- const CosTrading::PolicySeq& policies,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CORBA::ULong how_many,
- CosTrading::OfferSeq_out offers,
- CosTrading::OfferIterator_out offer_itr,
- CosTrading::PolicyNameSeq_out limits_applied,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName));
-
- // BEGIN SPEC
- // The query operation is the means by which an object can obtain
- // references to other objects that provide services meeting its
- // requirements.
-
- // The "type" parameter conveys the required service type. It is key
- // to the central purpose of trading: to perform an introduction for
- // future type safe interactions between importer and exporter. By
- // stating a service type, the importer implies the desired interface
- // type and a domain of discourse for talking about properties of the
- // service.
-
- // The trader may return a service offer of a subtype of the "type"
- // requested. Sub-typing of service types is discussed in "Service
- // Types" on page 16-4. A service subtype can be described by the
- // properties of its supertypes. This ensures that a well-formed
- // query for the "type" is also a well-formed query with respect to
- // any subtypes. However, if the importer specifies the policy of
- // exact_type_match = TRUE, then only offers with the exact (no
- // subtype) service type requested are returned.
-
- // The constraint "constr" is the means by which the importer states
- // those requirements of a service that are not captured in the
- // signature of the interface. These requirements deal with the
- // computational behavior of the desired service, non-functional
- // aspects, and non-computational aspects (such as the organization
- // owning the objects that provide the service). An importer is
- // always guaranteed that any returned offer satisfies the matching
- // constraint at the time of import. If the "constr" does not obey
- // the syntax rules for a legal constraint expression, then an
- // IllegalConstraint exception is raised.
-
- // The "pref" parameter is also used to order those offers that
- // match the "constr" so that the offers returned by the trader are
- // in the order of greatest interest to the importer. If "pref" does
- // not obey the syntax rules for a legal preference expression, then
- // an IllegalPreference exception is raised.
-
- // The "policies" parameter allows the importer to specify how the
- // search should be performed as opposed to what sort of services
- // should be found in the course of the search. This can be viewed
- // as parameterizing the algorithms within the trader
- // implementation. The "policies" are a sequence of name-value
- // pairs. The names available to an importer depend on the
- // implementation of the trader. However, some names are
- // standardized where they effect the interpretation of other
- // parameters or where they may impact linking and federation of
- // traders.
-
- // The "desired_props" parameter defines the set of properties
- // describing returned offers that are to be returned with the
- // object reference. There are three possibilities, the importer
- // wants one of the properties, all of the properties (but without
- // having to name them), or some properties (the names of which are
- // provided).
-
- // The desired_props parameter does not affect whether or not a
- // service offer is returned. To avoid "missing" desired properties,
- // the importer should specify "exists prop_name" in the
- // constraint.
-
- // The returned offers are passed back in one of two ways (or a
- // combination of both). °The "offers" return result conveys a list
- // of offers and the "offer_itr" is a reference to an interface at
- // which offers can be obtained. The "how_many" parameter states
- // how many offers are to be returned via the "offers" result, any
- // remaining offers are available via the iterator interface. If the
- // "how_many" exceeds the number of offers to be returned, then the
- // "offer_itr" will be nil.
-
- // If any cardinality or other limits were applied by one or more
- // traders in responding to a particular query, then the
- // "limits_applied" parameter will contain the names of the policies
- // which limited the query. The sequence of names returned in
- // "limits_applied" from any federated or proxy queries must be
- // concatenated onto the names of limits applied locally and
- // returned.
- // END SPEC
-
- static const char* NAME;
-
- // Handy Typedefs
- typedef CosTradingRepos::ServiceTypeRepository SERVICE_TYPE_REPOS;
- typedef CosTradingRepos::ServiceTypeRepository::TypeStruct_var TYPE_STRUCT;
- typedef CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq_var TYPE_NAME_SEQ;
-
-private:
-
- typedef TRADER::LOCAL_OFFER_ITER LOCAL_OFFER_ITER;
- typedef TRADER::SERVICE_TYPE_MAP SERVICE_TYPE_MAP;
- typedef pair<CosTrading::OfferId, CosTrading::Offer*> OFFER;
- typedef deque<OFFER> LOOKUP_OFFER_LIST;
- typedef list<string> TYPE_LIST;
-
- TAO_Offer_Iterator*
- create_offer_iterator (const char *type,
- const TAO_Property_Filter& filter);
- // Factory method for creating an appropriate Offer Iterator based
- // on the presence of the Register Interface.
-
- void perform_lookup (const char* type,
- const char* constraint,
- const char* preferences,
- SERVICE_TYPE_MAP& service_type_map,
- CosTradingRepos::ServiceTypeRepository_ptr rep,
- TAO_Policies& policies,
- LOOKUP_OFFER_LIST& ordered_offers,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType));
- // This method has three phases. The first phase passes the
- // offer_map through the constraint interpreter, winnowing away
- // those offers that don't match the validated constraint. The
- // second phase orders the offers using the specified
- // preferences. The last phase places the ordered offers into a list
- // for returning. At each phase, the cardinality policies specified
- // in the policies structure determine the number of offers
- // submitted to each phase.
-
- void lookup_all_subtypes (const char* type,
- SERVICE_TYPE_MAP& service_type_map,
- CosTradingRepos::ServiceTypeRepository_ptr rep,
- TAO_Constraint_Interpreter& constr_inter,
- TAO_Preference_Interpreter& pref_inter,
- TAO_Offer_Filter& offer_filter);
- // Traverse the type hierarchy to pull the matching offers from all
- // subtypes of the root type.
-
- void lookup_one_type (const char* type,
- SERVICE_TYPE_MAP& service_type_map,
- TAO_Constraint_Interpreter& constr_inter,
- TAO_Preference_Interpreter& pref_inter,
- TAO_Offer_Filter& offer_filter);
- // Check if offers of a type fit the constraints and order them
- // according to the preferences submitted.
-
- int fill_receptacles (const char* type,
- LOOKUP_OFFER_LIST& ordered_offers,
- CORBA::ULong how_many,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CosTrading::OfferSeq*& offers,
- CosTrading::OfferIterator_ptr& offer_itr,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName));
- // This method takes the list of ordered offers and places a number
- // of them in the sequence of returned offers and the rest into thr
- // iterator. In addition, fill_receptacles uses the
- // TAO_Property_Filter to ensure the returned offers contain the
- // properties specified in the desired_props in parameter.
-
- void forward_query (const CosTrading::TraderName& starting_trader,
- const char *type,
- const char *constr,
- const char *pref,
- TAO_Policies& policies,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CORBA::ULong how_many,
- CosTrading::OfferSeq_out offers,
- CosTrading::OfferIterator_out offer_itr,
- CosTrading::PolicyNameSeq_out limits_applied,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName));
- // If a starting_trader policy was specfied, foward the query to the
- // next link in the sequence.
-
- CORBA::Boolean duplicate_stem_id (TAO_Policies& policies,
- CORBA::Environment& _env);
- // Determine if the stem id provided to the query is one we've
- // already seen.
-
- CORBA::Boolean retrieve_links (TAO_Policies& policies,
- CORBA::ULong offer_returned,
- CosTrading::LinkNameSeq_out links,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Lookup::PolicyTypeMismatch));
- // Assemble a sequence of links that the federate_query method
- // should follow. Use the starting_trader policy, if one's provided,
- // otherwise use the Link interface to determine which of the
- // registered links should be followed in this query.
-
- void federated_query (const CosTrading::LinkNameSeq& links,
- const char *type,
- const char *constr,
- const char *pref,
- TAO_Policies& policies,
- const CosTrading::Lookup::SpecifiedProps& desired_props,
- CORBA::ULong how_many,
- CosTrading::OfferSeq_out offers,
- CosTrading::OfferIterator_out offer_itr,
- CosTrading::PolicyNameSeq_out limits_applied,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName));
- // Perform and pass on a query over a set of links. Merge the
- // results of the federated queries into a single set of results
- // suitable for returning to the user.
-
- TRADER &trader_;
- // A reference to the trader for obtaining offer maps.
-
- typedef set
- <
- CosTrading::Admin::OctetSeq_var,
- less <CosTrading::Admin::OctetSeq_var>
- >
- REQUEST_IDS;
-
- REQUEST_IDS request_ids_;
- // A list of recent request_id_stems
-};
-
-int operator< (const CosTrading::Admin::OctetSeq_var& left,
- const CosTrading::Admin::OctetSeq_var& right);
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Lookup.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_LOOKUP_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Monitor.h b/TAO/orbsvcs/orbsvcs/Trader/Monitor.h
deleted file mode 100644
index 21741ca7bda..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Monitor.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orsvcs
-//
-// = FILENAME
-// Monitor.h
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_MONITOR_H
-#define TAO_MONITOR_H
-
-template <class TYPE, class TAO_LOCK>
-class TAO_Monitor : public TYPE
-{
- //
- // = TITLE
- //
- // A utility class for writing applications where access to an
- // object must be synchronized in a multithreaded environment.
- //
- //
- // = DESCRIPTION
- //
- // A monitor associates a lock of type TAO_LOCK with an object
- // of type TYPE. The user is fully responsible for invoking all
- // necessary acquire/release operations on that lock (i.e. the
- // monitor does not automate any lock operations - all
- // operations are invoked explicitly by the user). The
- // usefullness of a monitor is in associating one lock with one
- // object without the need for inheritance or much code.
- //
- //
-public:
-
- typedef TAO_LOCK LOCK_TYPE;
-
- TAO_Monitor (void)
- : delete_ (1)
- {
- ACE_NEW (this->lock_, TAO_LOCK);
- }
-
- TAO_Monitor (const TAO_Monitor& monitor)
- {
- // Assume control of their lock.
- TAO_Monitor* mon = (TAO_Monitor*)&monitor;
- mon->delete_ = 0;
- this->delete_ = 1;
- this->lock_ = mon->lock_;
- }
-
- ~TAO_Monitor (void)
- {
- if (this->delete_)
- delete this->lock_;
- }
-
- // Return a reference to the lock that I use.
- TAO_LOCK &lock (void)
- {
- return *this->lock_;
- }
-
- // Return a reference to the lock that I use.
- const TAO_LOCK &lock (void) const
- {
- return *this->lock_;
- }
-
-protected:
-
- int delete_;
-
- TAO_LOCK* lock_;
- // Lock used to monitor the object.
-};
-
-#endif /* #define TAO_MONITOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.cpp
deleted file mode 100644
index fe3f79fda25..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// $Id$
-
-#include "Offer_Filter.h"
-
-TAO_Offer_Filter::
-TAO_Offer_Filter (SERVICE_TYPE_REPOS::TypeStruct* type_struct,
- TAO_Policies& policies,
- CORBA::Environment& _env)
- : search_card_ (policies.search_card (_env)),
- match_card_ (policies.match_card (_env)),
- dp_ (policies.use_dynamic_properties (_env)),
- mod_ (policies.use_modifiable_properties (_env))
-{
- SERVICE_TYPE_REPOS::PropStructSeq& prop_seq = type_struct->props;
-
- // Take note of modifiable properties in the type_struct
- for (int i = prop_seq.length () - 1; i >= 0; i--)
- {
- SERVICE_TYPE_REPOS::PropertyMode mode = prop_seq[i].mode;
- if (mode != SERVICE_TYPE_REPOS::PROP_MANDATORY_READONLY ||
- mode != SERVICE_TYPE_REPOS::PROP_READONLY)
- this->mod_props_.insert (string (prop_seq[i].name));
- }
-}
-
-CORBA::Boolean
-TAO_Offer_Filter::ok_to_consider (CosTrading::Offer* offer)
-{
- CORBA::Boolean return_value = 1;
- TAO_Property_Evaluator prop_eval (*offer);
-
- // If we should screen offers, determine if this offer is unworthy
- // for consideration.
- if (! (this->mod_ && this->dp_))
- {
- for (int i = offer->properties.length () - 1;
- i >= 0 && return_value;
- i--)
- {
- // Winnow away the unwanted offers with modifiable or
- // dynamic properties.
- if (! this->mod_)
- {
- // Determine if this property name is found in the set
- // of modifiable properties for the type being considered.
- string prop_name (offer->properties[i].name);
- if (this->mod_props_.find (prop_name) !=
- this->mod_props_.end ())
- return_value = 0;
- }
-
- if (! this->dp_ && return_value)
- {
- // Determine if this property is dynamic.
- if (prop_eval.is_dynamic_property (i))
- return_value = 0;
- }
-
- if (return_value == 0)
- break;
- }
- }
-
- // If we're good to go, consider this offer considered and decrement
- // the search cardinality counter.
- if (return_value)
- this->search_card_--;
-
- return return_value;
-}
-
-CORBA::Boolean
-TAO_Offer_Filter::ok_to_consider_more (void)
-{
- return this->search_card_ > 0 && this->match_card_ > 0;
-}
-
-void
-TAO_Offer_Filter::matched_offer (void)
-{
- this->match_card_--;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.h
deleted file mode 100644
index ceed69eeb5c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Filter.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Filter.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_OFFER_FILTER_H
-#define TAO_OFFER_FILTER_H
-
-#include "Policies.h"
-#include "Property_Evaluator.h"
-
-#include <set>
-#include <string>
-
-class TAO_Offer_Filter
-// = TITLE
-// The purpose of this class is to ensure that offers that
-// shouldn't be considered by the TAO_Constraint_Interpreter
-// aren't.
-//
-// = DESCRIPTION
-// There two classes of reasons why an offer for a correct
-// type shouldn't be considered: 1) The default parameters of the
-// Trader or policies passed to the Lookup::query method deem it
-// inappropriate to consider offers with modifiable (i.e., not
-// readonly) or dynamic properties. 2) We've exceeded the
-// default or provided cardinality constraints. TAO_Offer_Filter
-// ensures that violation of policies doesn't occur. It's the
-// enforcer.
-{
-public:
-
- typedef CosTradingRepos::ServiceTypeRepository SERVICE_TYPE_REPOS;
-
- TAO_Offer_Filter (SERVICE_TYPE_REPOS::TypeStruct* type_struct,
- TAO_Policies& policies,
- CORBA::Environment& _env);
- // Glean from the TypeStruct and Policy setting the appropriate way
- // to screen unsuitable offers from consideration.
-
- CORBA::Boolean ok_to_consider (CosTrading::Offer* offer);
- // Determine whether the poicies contained in the given policy
- // object allow the Lookup interface to consider the offer. That is,
- // if use_modifiable_properties is false, and the offer contains
- // modifiable properties as designated in the type struct, return
- // false. If use_dynamic_properties is false, and the offer contains
- // dynamic properties, then return false. If the lookup interface is
- // safe in considering this offer, return true and subtract from the
- // search card value. When the search card value falls to zero,
- // ok_to_consider always returns false.
-
- CORBA::Boolean ok_to_consider_more (void);
- // It's ok to consider more offers when lookup hasn't exceeded the
- // cardinality values for searching and matching offers.
-
- void matched_offer (void);
- // Signal that the Lookup method has matched an offer; decrement the
- // match_card.
-
-private:
-
- typedef set<string, less<string> > PROP_NAMES;
-
- PROP_NAMES mod_props_;
- // The set of the name of modifiable properties.
-
- CORBA::ULong search_card_, match_card_;
- // Keep track of the cardinalities.
-
- CORBA::Boolean dp_;
- CORBA::Boolean mod_;
- // Keep track of property limitations: modifiable or dynamic ones
- // may be bad.
-};
-
-#endif /* TAO_OFFER_FILTER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.cpp
deleted file mode 100644
index 7ca466e05cc..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Id_terator.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "Offer_Id_Iterator.h"
-
-TAO_Offer_Id_Iterator::TAO_Offer_Id_Iterator(void)
-{
-}
-
-TAO_Offer_Id_Iterator::~TAO_Offer_Id_Iterator (void)
-{
- int items_left = this->ids_.size ();
-
- for (int i = 0; i < items_left; i++)
- {
- CORBA::string_free (this->ids_.front ());
- this->ids_.pop ();
- }
-}
-
-CORBA::ULong
-TAO_Offer_Id_Iterator::max_left(CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft))
-{
- return this->ids_.size ();
-}
-
-void
-TAO_Offer_Id_Iterator::destroy(CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- // Remove self from POA
- //
- // Note that there is no real error checking here as we can't do
- // much about errors here anyway
- //
-
- TAO_TRY
- {
- PortableServer::POA_var poa = this->_default_POA (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- PortableServer::ObjectId_var id = poa->servant_to_id (this, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- poa->deactivate_object (id.in (), TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- }
- TAO_ENDTRY;
-
- delete this;
-}
-
-CORBA::Boolean
-TAO_Offer_Id_Iterator::next_n(CORBA::ULong n,
- CosTrading::OfferIdSeq_out _ids,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- // Calculate the number of Ids to be returned in this .
- int items_left = this->ids_.size(),
- difference = items_left - n,
- returnable_items = (difference >= 0) ? n : items_left;
-
- if (returnable_items == 0)
- _ids = new CosTrading::OfferIdSeq;
- else
- {
- // Allocate space for the returned OfferIds.
- CosTrading::OfferId* id_buf =
- CosTrading::OfferIdSeq::allocbuf (returnable_items);
-
- // Copy in those ids!
- for (int i = 0; i < returnable_items; i++)
- {
- char* offer_id = this->ids_.front ();
- id_buf[i] = offer_id;
- this->ids_.pop ();
- }
-
- // Place them into an OfferIdSeq.
- _ids = new CosTrading::OfferIdSeq (returnable_items,
- returnable_items,
- id_buf,
- 1);
- }
-
- // Return true only if there are items left to be returned in
- // subsequent calls.
- return (CORBA::Boolean)(difference > 0);
-}
-
-void
-TAO_Offer_Id_Iterator::insert_id(const char* new_id)
-{
- this->ids_.push (CORBA::string_dup (new_id));
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.h
deleted file mode 100644
index 71d002a65e4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Id_Iterator.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Id_terator.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#ifndef TAO_OFFER_ID_ITERATOR_H
-#define TAO_OFFER_ID_ITERATOR_H
-
-#include <deque>
-#include <queue>
-#include <string>
-
-#include "orbsvcs/CosTradingS.h"
-
-class TAO_Offer_Id_Iterator : public POA_CosTrading::OfferIdIterator
-// = TITLE
-// Silly little iterator that contains the overflow of offer ids
-// from the Admin list_offers method.
-//
-// = DESCRIPTION
-//
-// BEGIN SPEC
-// The OfferIdIterator interface is used to return a set of offer
-// identifiers from the list_offers operation and the list_proxies
-// operation in the Admin interface by enabling the offer identifiers
-// to be extracted by successive operations on the OfferIdIterator
-// interface.
-// END SPEC
-{
- public:
-
- TAO_Offer_Id_Iterator(void);
- // No op constructor
-
- ~TAO_Offer_Id_Iterator (void);
-
- virtual CORBA::ULong max_left(CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft));
- // The max_left operation returns the number of offer identifiers
- // remaining in the iterator. The exception UnknownMaxLeft is raised
- // if the iterator cannot determine the remaining number of offer
- // identifiers (e.g., if the iterator determines its set of offer
- // identifiers through lazy evaluation).
-
- virtual void destroy(CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // The destroy operation destroys the iterator. No further
- // operations can be invoked on an iterator after it has been
- // destroyed.
-
- virtual CORBA::Boolean next_n(CORBA::ULong _n,
- CosTrading::OfferIdSeq_out _ids,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // The next_n operation returns a set of offer identifiers in the
- // output parameter "ids." The operation returns n offer identifiers
- // if there are at least n offer identifiers remaining in the
- // iterator. If there are fewer than n offer identifiers in the
- // iterator, then all remaining offer identifiers are returned. The
- // actual number of offer identifiers returned can be determined
- // from the length of the "ids" sequence. The next_n operation
- // returns TRUE if there are further offer identifiers to be
- // extracted from the iterator. It returns FALSE if there are no
- // further offer identifiers to be extracted.
-
- void insert_id(const char* new_id);
- // Insert a <new_id> into the contents of the iterator.
-
- private:
-
-#ifdef OS_NO_DEFAULT_TEMPLATE_ARGUMENTS
- typedef queue<char*, deque<char*> > OFFER_ID_QUEUE;
-#else
- typedef queue<char*> OFFER_ID_QUEUE;
-#endif /* OS_NO_DEFAULT_TEMPLATE_ARGUMENTS */
-
- OFFER_ID_QUEUE ids_;
-};
-
-#endif /* TAO_OFFER_ID_ITERATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.cpp
deleted file mode 100644
index 7732f2c7fa4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Iterator.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#define ACE_BUILD_DLL
-
-#include "Offer_Iterator.h"
-
-
-TAO_Offer_Iterator::TAO_Offer_Iterator (const TAO_Property_Filter& pfilter)
- : pfilter_ (pfilter)
-{
-}
-
-TAO_Offer_Iterator::~TAO_Offer_Iterator (void)
-{
-}
-
-void
-TAO_Offer_Iterator::destroy (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- // Remove self from POA
- //
- // Note that there is no real error checking here as we can't do
- // much about errors here anyway
- //
-
- TAO_TRY
- {
- PortableServer::POA_var poa = this->_default_POA (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- PortableServer::ObjectId_var id = poa->servant_to_id (this, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- poa->deactivate_object (id.in (), TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- }
- TAO_ENDTRY;
-
- delete this;
-}
-
-
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.h
deleted file mode 100644
index 9f74af2b6e1..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Iterator.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_OFFER_ITERATOR_H
-#define TAO_OFFER_ITERATOR_H
-
-#include "Property_Filter.h"
-
-class TAO_Export TAO_Offer_Iterator :
- public POA_CosTrading::OfferIterator
- // = TITLE
- // This class implements CosTrading::OfferIterator IDL
- // interface.
-
- // = DESCRIPTION
- // This is an abstract base class to allow for different
- // implementations of OfferIterator.
- // BEGIN SPEC
- // The OfferIterator interface is used to return a set of service
- // offers from the query operation by enabling the service offers
- // to be extracted by successive operations on the OfferIterator
- // interface.
- // END SPEC
-{
-public:
- // = Initialization and termination methods.
-
- TAO_Offer_Iterator (const TAO_Property_Filter& property_filter);
-
- virtual ~TAO_Offer_Iterator (void);
-
- virtual void destroy (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // BEGIN SPEC
- // The destroy operation destroys the iterator. No further
- // operations can be invoked on an iterator after it has been
- // destroyed.
- // END SPEC
-
- virtual void add_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer) = 0;
- // Add an offer to the collection of offers the iterator will
- // iterate over.
-
- virtual CORBA::ULong max_left (CORBA::Environment &env) = 0
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft));
-
- // BEGIN SPEC
- // The max_left operation returns the number of service offers
- // remaining in the iterator. The exception UnknownMaxLeft is raised
- // if the iterator cannot determine the remaining number of service
- // offers (e.g., if the iterator determines its set of service
- // offers through lazy evaluation).
- // END SPEC
-
- virtual CORBA::Boolean next_n (CORBA::ULong n,
- CosTrading::OfferSeq_out offers,
- CORBA::Environment &env) = 0
- TAO_THROW_SPEC ((CORBA::SystemException));
- // BEGIN SPEC
- // The next_n operation returns a set of service offers in the
- // output parameter "offers." The operation returns n service offers
- // if there are at least n service offers remaining in the
- // iterator. If there are fewer than n service offers in the
- // iterator, then all remaining service offers are returned. The
- // actual number of service offers returned can be determined from
- // the length of the "offers" sequence. The next_n operation returns
- // TRUE if there are further service offers to be extracted from the
- // iterator. It returns FALSE if there are no further service offers
- // to be extracted.
- // END SPEC
- protected:
-
- TAO_Property_Filter pfilter_;
-};
-
-#endif /* TAO_OFFER_ITERATOR */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.cpp
deleted file mode 100644
index ec78e9f2921..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// $Id$
-
-#include "Offer_Iterator_Collection.h"
-
-TAO_Offer_Iterator_Collection::TAO_Offer_Iterator_Collection (void)
- : total_left_ (0)
-{
-}
-
-void
-TAO_Offer_Iterator_Collection::
-add_offer_iterator (CosTrading::OfferIterator* offer_iter)
-{
- Iter_Info iter_info;
-
- if (offer_iter != CosTrading::OfferIterator::_nil ())
- {
- TAO_TRY
- {
- iter_info.iter_ = offer_iter;
- iter_info.num_left_ = offer_iter->max_left (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- // I don't know what to do here if the offer_iterator throws
- // an UnknownMaxLeft exception.
- }
- TAO_ENDTRY;
-
- this->total_left_ += iter_info.num_left_;
- this->iters_.push_back (iter_info);
- }
-}
-
-CORBA::Boolean
-TAO_Offer_Iterator_Collection::next_n (CORBA::ULong n,
- CosTrading::OfferSeq_out offers,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- CORBA::ULong offers_left = n;
- CORBA::Boolean return_value = CORBA::B_TRUE;
- CosTrading::OfferSeq_var out_offers;
-
- ACE_NEW_RETURN (offers, CosTrading::OfferSeq, return_value);
- while (offers_left > 0 && ! this->iters_.empty ())
- {
- Iter_Info& iter_info = this->iters_.front ();
-
- // Determine how many offers we should retrieve from this
- // iterator.
- CORBA::ULong offers_to_retrieve =
- (offers_left > iter_info.num_left_)
- ? iter_info.num_left_
- : offers_left;
-
- // Retrieve the set of offers.
- iter_info.iter_->next_n
- (offers_to_retrieve,
- CosTrading::OfferSeq_out (out_offers.out ()),
- env);
-
- // Merge it with the passed set.
- CORBA::ULong offset = offers->length ();
- offers->length (out_offers->length () + offset);
- for (int j = out_offers->length () - 1; j >= 0; j--)
- offers[j + offset] = out_offers[j];
-
- // Adjust the offer counters.
- offers_left -= offers_to_retrieve;
- iter_info.num_left_ -= offers_to_retrieve;
- this->total_left_ -= offers_to_retrieve;
-
- // If we've exhausted this iterator, destroy it.
- if (iter_info.num_left_ == 0)
- {
- iter_info.iter_->destroy (env);
- this->iters_.pop_front ();
- }
- }
-
- // Determine if we have anything left to offer.
- if (this->iters_.empty ())
- return_value = B_FALSE;
-
- return return_value;
-}
-
-void
-TAO_Offer_Iterator_Collection::destroy (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- // Destroy all iterators in the collection.
- for (OFFER_ITERS::iterator iters_iter = this->iters_.begin ();
- iters_iter != this->iters_.end ();
- iters_iter++)
- (*iters_iter).iter_->destroy (_env);
-
- this->total_left_ = 0;
-
- // Remove self from POA
- //
- // Note that there is no real error checking here as we can't do
- // much about errors here anyway
- //
-
- TAO_TRY
- {
- PortableServer::POA_var poa = this->_default_POA (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- poa->deactivate_object (id.in (), TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- }
- TAO_ENDTRY;
-
- delete this;
-}
-
-CORBA::ULong
-TAO_Offer_Iterator_Collection::max_left (CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft))
-{
- return this->total_left_;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.h
deleted file mode 100644
index 74b5cd06eef..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterator_Collection.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Iterator_Collection.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_OFFER_ITERATOR_COLLECTION_H
-#define TAO_OFFER_ITERATOR_COLLECTION_H
-
-#include <deque>
-#include "orbsvcs/CosTradingS.h"
-
-class TAO_Offer_Iterator_Collection : public POA_CosTrading::OfferIterator
-// = TITLE
-// A collection of offer iterator to query in turn.
-//
-// = DESCRIPTION
-// Since a query could conceivable query several other traders, it
-// needs a way to merge the results into a single set of results
-// suitable for being returned to the user. And since all the query
-// method can return to the user is a sequence and an iterator, and
-// the size of the sequence is constrained, there needs to be some
-// way to collect all the returned offer_iterators into a single
-// offer_iterator. This is that collection. The results of
-// collecting all the iterators in this way is a distributed tree of
-// iterators, which could conceivably become hugely inefficient if
-// the trader graphs is deep enough.
-{
-public:
-
- // = Constructors.
-
- TAO_Offer_Iterator_Collection (void);
-
- virtual ~TAO_Offer_Iterator_Collection (void) {}
-
- virtual CORBA::Boolean next_n (CORBA::ULong n,
- CosTrading::OfferSeq_out offers,
- CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Retrieve n offers from the set of iterators.
-
- virtual void destroy (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Destroy the collection of iterators.
-
- virtual CORBA::ULong max_left (CORBA::Environment &env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft));
- // Determine how many offers are left in the collection
-
- void add_offer_iterator (CosTrading::OfferIterator* offer_iter);
- // Add an iterator to the collection.
-
-private:
-
- struct Iter_Info
- {
- CosTrading::OfferIterator_var iter_;
- // Object reference for this iterator in the collection.
-
- CORBA::ULong num_left_;
- // Cached value of the number of elements left in this iterator.
- };
-
- typedef deque<Iter_Info> OFFER_ITERS;
-
- OFFER_ITERS iters_;
- // The iterator collection.
-
- CORBA::ULong total_left_;
- // Cached value of the number of offers left in the collection.
-};
-
-#endif /* TAO_OFFER_ITERATOR_COLLECTION_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.cpp
deleted file mode 100644
index a66426b73ad..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "Offer_Modifier.h"
-#include "Trader.h"
-
-TAO_Offer_Modifier::
-TAO_Offer_Modifier (const char* type_name,
- TYPE_STRUCT* type_struct,
- CosTrading::Offer& offer)
- : offer_ (offer),
- type_ (type_name)
-{
- typedef CosTradingRepos::ServiceTypeRepository SERVICE_TYPE_REPOS;
-
- CosTrading::PropertySeq& prop_seq = this->offer_.properties;
- SERVICE_TYPE_REPOS::PropStructSeq& pstructs = type_struct->props;
- int pstructs_length = pstructs.length (),
- props_length = prop_seq.length ();
-
- // Separate the type defined properties into mandatory and readonly
- for (int i = 0; i < pstructs_length; i++)
- {
- if (pstructs[i].mode == SERVICE_TYPE_REPOS::PROP_MANDATORY)
- this->mandatory_.insert (string (pstructs[i].name));
- else if (pstructs[i].mode == SERVICE_TYPE_REPOS::PROP_READONLY)
- this->readonly_.insert (string (pstructs[i].name));
- }
-
- // Insert the properties of the offer into a map.
- for (i = 0; i < props_length; i++)
- this->props_[string (prop_seq[i].name)] = &prop_seq[i];
-}
-
-void
-TAO_Offer_Modifier::
-delete_properties (const CosTrading::PropertyNameSeq& deletes,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Register::UnknownPropertyName,
- CosTrading::Register::MandatoryProperty,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName))
-{
- PROP_NAMES delete_me;
- // Validate that the listed property names can be deleted
- for (int i = 0, length = deletes.length (); i < length; i++)
- {
- CosTrading::PropertyName dname = (char*)((const char *) deletes[i]);
- if (! TAO_Trader_Base::is_valid_identifier_name (dname))
- TAO_THROW (CosTrading::IllegalPropertyName (dname));
- else
- {
- string prop_name (dname);
- if (this->mandatory_.find (prop_name) != this->mandatory_.end ())
- TAO_THROW (CosTrading::Register::MandatoryProperty (this->type_, dname));
- else if ((delete_me.insert (prop_name)).second == 0)
- TAO_THROW (CosTrading::DuplicatePropertyName (dname));
- else if (this->props_.find (prop_name) == this->props_.end ())
- TAO_THROW (CosTrading::Register::UnknownPropertyName (dname));
- }
- }
-
- // Delete those properties from the offer.
- for (i = 0; i < length; i++)
- {
- string prop_name = (const char *) deletes[i];
- this->props_.erase (prop_name);
- }
-}
-
-void
-TAO_Offer_Modifier::
-merge_properties (const CosTrading::PropertySeq& modifies,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::Register::ReadonlyProperty))
-{
- PROP_NAMES modify_me;
- // Ensure that the proposed changes aren't to readonly properties or
- // otherwise invalid.
- for (int i = 0, length = modifies.length (); i < length; i++)
- {
- CosTrading::PropertyName mname =
- (char*) ((const char *) modifies[i].name);
- if (! TAO_Trader_Base::is_valid_identifier_name (mname))
- TAO_THROW (CosTrading::IllegalPropertyName (mname));
- else
- {
- string prop_name (mname);
- if (this->readonly_.find (prop_name) != this->readonly_.end () &&
- this->props_.find (prop_name) == this->props_.end ())
- TAO_THROW (CosTrading::Register::ReadonlyProperty (this->type_, mname));
- else if ((modify_me.insert (prop_name)).second == 0)
- TAO_THROW (CosTrading::DuplicatePropertyName (mname));
- }
- }
-
- for (i = 0; i < length; i++)
- {
- // Add a property to the destination if it doesn't already exist.
- pair <PROPS::iterator, bool> insert_return =
- this->props_.insert (make_pair (string (modifies[i].name),
- (CosTrading::Property *) &modifies[i]));
-
- // Modify a property if it already exists in the destination.
- if (! insert_return.second)
- {
- PROPS::iterator& dup = insert_return.first;
- CosTrading::Property* prop = (*dup).second;
-
- prop->value = modifies[i].value;
- }
- }
-}
-
-CosTrading::Offer&
-TAO_Offer_Modifier::affect_change (void)
-{
- int elem = 0;
- CosTrading::PropertySeq prop_seq;
-
- // Create a new property list reflecting the deletes, modifies, and
- // add operations performed, and place this property list in the
- // offer.
- prop_seq.length (this->props_.size ());
- for (PROPS::iterator props_iter = this->props_.begin ();
- props_iter != this->props_.end ();
- props_iter++, elem++)
- {
- prop_seq[elem] = *(*props_iter).second;
- }
-
- this->offer_.properties = prop_seq;
- return this->offer_;
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.h
deleted file mode 100644
index e0d08a1de57..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Modifier.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Offer_Modifier
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef ACE_OFFER_MODIFIER_H
-#define ACE_OFFER_MODIFIER_H
-
-#include <set>
-#include <map>
-
-class TAO_Offer_Modifier
-// = TITLE
-// This class deletes, modifies, and adds properties to a given
-// offer according to the rules of the modify method on the Register
-// interface.
-{
-public:
-
- typedef CosTradingRepos::ServiceTypeRepository::TypeStruct TYPE_STRUCT;
-
- TAO_Offer_Modifier (const char* type,
- TYPE_STRUCT* type_struct,
- CosTrading::Offer& offer);
- // Modify an <offer> of type <type>, whose properties are described
- // by <type_struct>
-
- void delete_properties (const CosTrading::PropertyNameSeq& deletes,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Register::UnknownPropertyName,
- CosTrading::Register::MandatoryProperty,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName));
- // Delete the properties whose names were given to the
- // constructor. Ensure we don't delete mandatory properties.
-
- void merge_properties (const CosTrading::PropertySeq& modifies,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::Register::ReadonlyProperty));
- // Copy to the destination the union of the source and destination
- // properties. In the case of duplicate properties, update the
- // destination with the source's value.
-
- CosTrading::Offer& affect_change (void);
- // Return a reference to the Offer with the changes affected.
-
-private:
-
- typedef set< string, less <string> > PROP_NAMES;
- typedef map< string, CosTrading::Property*, less <string> > PROPS;
-
- const char* type_;
- // The type of the offer.
-
- PROPS props_;
- // The map of properties in the offer.
-
- PROP_NAMES readonly_, mandatory_;
- // The set of readonly and mandatory property names in the offer's
- // type.
-
- CosTrading::Offer& offer_;
- // A reference to the offer undergoing change.
-};
-
-#endif /* TAO_OFFER_MODIFIER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Policies.cpp b/TAO/orbsvcs/orbsvcs/Trader/Policies.cpp
deleted file mode 100644
index c4d173f8bc7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Policies.cpp
+++ /dev/null
@@ -1,509 +0,0 @@
-// $Id$
-
-#include "Policies.h"
-
-const char* TAO_Policies::POLICY_NAMES[] =
-{
- "exact_type_match",
- "hop_count",
- "link_follow_rule",
- "match_card",
- "return_card",
- "search_card",
- "starting_trader",
- "use_dynamic_properties",
- "use_modifiable_properties",
- "use_proxy_offers",
- "request_id"
-};
-
-TAO_Policies::TAO_Policies (TAO_Trader_Base& trader,
- const CosTrading::PolicySeq& policies,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPolicyName,
- CosTrading::DuplicatePolicyName))
- : trader_ (trader),
- policies_ (USE_PROXY_OFFERS + 1)
-{
- for (int i = 0; i <= USE_PROXY_OFFERS; i++)
- this->policies_[i] = 0;
-
- for (int j = 0; j < policies.length (); j++)
- {
- const char* pol_name = (const char*) policies[j].name;
- int length = (pol_name == 0) ? 0 : ACE_OS::strlen (pol_name),
- index = -1;
-
- if (length < ACE_OS::strlen (POLICY_NAMES[HOP_COUNT]))
- TAO_THROW (CosTrading::Lookup::IllegalPolicyName (pol_name));
-
- switch (pol_name[0])
- {
- case 'e':
- index = EXACT_TYPE_MATCH;
- break;
- case 'h':
- index = HOP_COUNT;
- break;
- case 'l':
- index = LINK_FOLLOW_RULE;
- break;
- case 'm':
- index = MATCH_CARD;
- break;
- case 'r':
- index = RETURN_CARD;
- break;
- case 's':
- index = SEARCH_CARD;
- break;
- case 'u':
- if (pol_name[4] == 'd')
- index = USE_DYNAMIC_PROPERTIES;
- if (pol_name[4] == 'm')
- index = USE_MODIFIABLE_PROPERTIES;
- if (pol_name[4] == 'p')
- index = USE_PROXY_OFFERS;
- }
-
- // Match the name of the policy, and insert its value into the
- // vector.
- if (index == -1 || ::strcmp (POLICY_NAMES[index], pol_name) != 0)
- TAO_THROW (CosTrading::Lookup::IllegalPolicyName (pol_name));
- else
- {
- if (this->policies_[index] != 0)
- TAO_THROW (CosTrading::DuplicatePolicyName (pol_name));
- else
- this->policies_[index] = (CosTrading::Policy *) &(policies[j]);
- }
- }
-}
-
-CORBA::ULong
-TAO_Policies::ulong_prop (POLICY_TYPE pol,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- CORBA::ULong return_value = 0, max_value;
- TAO_Import_Attributes_Impl& import_attrs =
- this->trader_.import_attributes ();
-
- // Discover the default values for each of the possible cardinality
- // policies.
- switch (pol)
- {
- case SEARCH_CARD:
- return_value = import_attrs.def_search_card ();
- max_value = import_attrs.max_search_card ();
- break;
- case MATCH_CARD:
- return_value = import_attrs.def_match_card ();
- max_value = import_attrs.max_match_card ();
- break;
- case RETURN_CARD:
- return_value = import_attrs.def_return_card ();
- max_value = import_attrs.max_return_card ();
- break;
- case HOP_COUNT:
- return_value = import_attrs.def_hop_count ();
- max_value = import_attrs.max_hop_count ();
- break;
- }
-
- if (this->policies_[pol] != 0)
- {
- // Extract the desired policy value.
- CosTrading::Policy* policy = this->policies_[pol];
- CosTrading::PolicyValue& value = policy->value;
- CORBA::TypeCode* type = value.type ();
-
- if (!type->equal (CORBA::_tc_ulong, _env))
- TAO_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy),
- return_value);
- else
- value >>= return_value;
-
- if (max_value < return_value)
- return_value = max_value;
- else
- this->limits_.insert (string(POLICY_NAMES[pol]));
- }
-
- return return_value;
-}
-
-CORBA::ULong
-TAO_Policies::search_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->ulong_prop (SEARCH_CARD, _env);
-}
-
-CORBA::ULong
-TAO_Policies::match_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->ulong_prop (MATCH_CARD, _env);
-}
-
-CORBA::ULong
-TAO_Policies::return_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->ulong_prop (RETURN_CARD, _env);
-}
-
-CORBA::Boolean
-TAO_Policies::boolean_prop (POLICY_TYPE pol,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- CORBA::Boolean def_value = (CORBA::Boolean) 1,
- return_value = (CORBA::Boolean) 1;
- TAO_Support_Attributes_Impl& support_attrs =
- this->trader_.support_attributes ();
-
- switch (pol)
- {
- case USE_MODIFIABLE_PROPERTIES:
- def_value = support_attrs.supports_modifiable_properties ();
- break;
- case USE_DYNAMIC_PROPERTIES:
- def_value = support_attrs.supports_dynamic_properties ();
- break;
- case USE_PROXY_OFFERS:
- def_value = support_attrs.supports_proxy_offers ();
- break;
- }
-
- if (this->policies_[pol] != 0)
- {
- CosTrading::Policy* policy = this->policies_[pol];
- CosTrading::PolicyValue& value = policy->value;
- CORBA::TypeCode* type = value.type ();
-
- if (!type->equal (CORBA::_tc_boolean, _env))
- TAO_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy),
- return_value);
- else
- value >>= to_boolean (return_value);
-
- if (def_value == (CORBA::Boolean) 0)
- return_value = (CORBA::Boolean) 0;
- else
- this->limits_.insert (string (POLICY_NAMES[pol]));
- }
-
- return return_value;
-}
-
-
-CORBA::Boolean
-TAO_Policies::use_modifiable_properties (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->boolean_prop (USE_MODIFIABLE_PROPERTIES, _env);
-}
-
-CORBA::Boolean
-TAO_Policies::use_dynamic_properties (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->boolean_prop (USE_DYNAMIC_PROPERTIES, _env);
-}
-
-CORBA::Boolean
-TAO_Policies::use_proxy_offers (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->boolean_prop (USE_PROXY_OFFERS, _env);
-}
-
-CORBA::Boolean
-TAO_Policies::exact_type_match (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->boolean_prop (EXACT_TYPE_MATCH, _env);
-}
-
-
-CosTrading::TraderName*
-TAO_Policies::starting_trader (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue))
-{
- CosTrading::TraderName* trader_name = 0;
-
- if (this->policies_[STARTING_TRADER] != 0)
- {
- CosTrading::Policy* policy = this->policies_[STARTING_TRADER];
- CosTrading::PolicyValue& value = policy->value;
- CORBA::TypeCode* type = value.type ();
-
- if (!type->equal (CosTrading::_tc_TraderName, _env))
- TAO_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy),
- trader_name);
- else
- {
- ACE_NEW_RETURN (trader_name, CosTrading::TraderName, 0);
- // value >>= *trader_name;
- this->limits_.insert (string (POLICY_NAMES[STARTING_TRADER]));
- }
- }
-
- return trader_name;
-}
-
-CosTrading::FollowOption
-TAO_Policies::link_follow_rule (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- CosTrading::FollowOption return_value =
- this->trader_.import_attributes ().def_follow_policy ();
-
- if (this->policies_[LINK_FOLLOW_RULE] != 0)
- {
- CosTrading::FollowOption max_follow_policy =
- this->trader_.import_attributes ().max_follow_policy ();
-
- CosTrading::Policy* policy = this->policies_[LINK_FOLLOW_RULE];
- CosTrading::PolicyValue& value = policy->value;
- CORBA::TypeCode* type = value.type ();
-
- // Extract the link follow rule
- if (!type->equal (CosTrading::_tc_FollowOption, _env))
- TAO_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy),
- return_value);
- else
- // value >>= return_value;
- ;
-
- if (return_value > max_follow_policy)
- {
- this->limits_.insert (string (POLICY_NAMES[LINK_FOLLOW_RULE]));
- return_value = max_follow_policy;
- }
- }
-
- return return_value;
-}
-
-
-CosTrading::FollowOption
-TAO_Policies::link_follow_rule (const char* link_name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::Link::IllegalLinkName,
- CosTrading::Link::UnknownLinkName))
-{
- CosTrading::FollowOption return_value = CosTrading::local_only;
- CosTrading::Link_var link
- (this->trader_.trading_components ().link_if ());
-
- if (link != CosTrading::Link::_nil ())
- {
- CosTrading::Link::LinkInfo_var
- link_info (link->describe_link (link_name, _env));
- TAO_CHECK_ENV_RETURN (_env, return_value);
- CosTrading::FollowOption trader_max_follow_policy =
- this->trader_.import_attributes ().max_follow_policy ();
-
- if (this->policies_[LINK_FOLLOW_RULE] != 0)
- {
- CosTrading::FollowOption query_link_follow_rule;
- CosTrading::FollowOption link_limiting_follow_rule =
- link_info->limiting_follow_rule;
- CosTrading::Policy* policy = this->policies_[LINK_FOLLOW_RULE];
- CosTrading::PolicyValue& value = policy->value;
- CORBA::TypeCode* type = value.type ();
-
- // Extract the link follow rule
- if (!type->equal (CosTrading::_tc_FollowOption, _env))
- TAO_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy),
- return_value);
- else
- // value >>= query_link_follow_rule;
- ;
-
- return_value = (query_link_follow_rule < trader_max_follow_policy)
- ? query_link_follow_rule : trader_max_follow_policy;
- return_value = (return_value < link_limiting_follow_rule)
- ? return_value : link_limiting_follow_rule;
- }
- else
- {
- CosTrading::FollowOption link_def_follow_rule =
- this->trader_.import_attributes ().max_follow_policy ();
-
- return_value = (link_def_follow_rule < trader_max_follow_policy)
- ? link_def_follow_rule : trader_max_follow_policy;
- }
- }
-
- return return_value;
-}
-
-CORBA::ULong
-TAO_Policies::hop_count (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- return this->ulong_prop (HOP_COUNT, _env);
-}
-
-CosTrading::Admin::OctetSeq*
-TAO_Policies::request_id (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch))
-{
- CosTrading::Admin::OctetSeq* request_id = 0;
-
- if (this->policies_[REQUEST_ID] != 0)
- {
- CosTrading::Policy* policy = this->policies_[REQUEST_ID];
- CosTrading::PolicyValue& value = policy->value;
- CORBA::TypeCode* type = value.type ();
-
- if (!type->equal (CosTrading::Admin::_tc_OctetSeq_seq, _env))
- TAO_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy),
- request_id);
- else
- {
- ACE_NEW_RETURN (request_id, CosTrading::Admin::OctetSeq, 0);
- // value >>= *request_id;
- }
- ;
- }
-
- return request_id;
-}
-
-CosTrading::PolicyNameSeq*
-TAO_Policies::limits_applied (void)
-{
- int i = 0;
- CORBA::ULong size = this->limits_.size ();
- CosTrading::PolicyName* temp =
- CosTrading::PolicyNameSeq::allocbuf (size);
-
- for (POL_SET::iterator p_iter = this->limits_.begin();
- p_iter != this->limits_.end ();
- p_iter++)
- temp[i++] = CORBA::string_dup ((*p_iter).data ());
-
- return new CosTrading::PolicyNameSeq (i, i, temp, 1);
-}
-
-CosTrading::PolicySeq*
-TAO_Policies::policies_to_forward (void)
-{
- // Create a new policy sequence, shortening the starting trader
- // policy by one link.
-
- CORBA::Environment env;
- CORBA::ULong counter = 0;
- CosTrading::Policy* policy_buffer =
- CosTrading::PolicySeq::allocbuf (REQUEST_ID + 1);
-
- if (policy_buffer == 0)
- return 0;
-
- for (int i = EXACT_TYPE_MATCH; i <= REQUEST_ID; i++)
- {
- CosTrading::Policy& new_policy = policy_buffer[counter];
-
- if (this->policies_[i] != 0)
- {
- // Copy in the existing policies.
- new_policy.name = this->policies_[i]->name;
-
- if (i == STARTING_TRADER)
- {
- TAO_TRY
- {
- // Eliminate the first link of the trader name.
- CosTrading::TraderName* trader_name =
- this->starting_trader (env);
- CORBA::ULong length = trader_name->length ();
-
- for (int j = 1; j < length; j++)
- trader_name[j - 1] = trader_name[j];
- trader_name->length (length - 1);
-
- // new_policy.value <<= *trader_name;
- }
- TAO_CATCHANY {}
- TAO_ENDTRY;
- }
- else
- new_policy.value = this->policies_[i]->value;
- }
- }
-
- // Create the new sequence
- return new CosTrading::PolicySeq (REQUEST_ID + 1, counter,
- policy_buffer, CORBA::B_TRUE);
-}
-
-CosTrading::PolicySeq*
-TAO_Policies::
-policies_to_pass (CosTrading::FollowOption def_pass_on_follow_rule,
- CORBA::ULong offers_returned,
- CosTrading::Admin_ptr admin_if)
-{
- // Create a new policy sequence to pass to a federated
- // query. Decrement the hop count, add a stem id if none exists, and
- // add a follow rule if none exists. Also adjust the return_card to
- // account for previous queries.
- CORBA::Environment env;
- CORBA::ULong counter = 0;
- CosTrading::Policy* policy_buffer =
- CosTrading::PolicySeq::allocbuf (REQUEST_ID + 1);
-
- if (policy_buffer == 0)
- return 0;
-
- for (int i = EXACT_TYPE_MATCH; i <= REQUEST_ID; i++)
- {
- CosTrading::Policy& new_policy = policy_buffer[counter];
-
- if (this->policies_[i] != 0)
- {
- // Add an existing query.
- new_policy.name = this->policies_[i]->name;
- new_policy.value = this->policies_[i]->value;
- }
- else
- {
- if (i == LINK_FOLLOW_RULE)
- {
- // Add a link follow rule if one didn't exist.
- new_policy.name = POLICY_NAMES[i];
- // new_policy.value <<= def_pass_on_follow_rule;
- }
- else if (i == REQUEST_ID)
- {
- // Add the request id if one didn't exist.
- new_policy.name = POLICY_NAMES[i];
- // new_policy.value <<= *(admin_if->request_id_stem (env));
- }
- }
-
- if (i == HOP_COUNT)
- {
- // Decrement the hop count.
- new_policy.name = POLICY_NAMES[i];
- new_policy.value <<= this->hop_count (env) - 1;
- }
- else if (i == RETURN_CARD)
- {
- // Adjust the return card.
- new_policy.name = POLICY_NAMES[i];
- new_policy.value <<= this->return_card (env) - offers_returned;
- }
- }
-
- // Create the new sequence.
- return new CosTrading::PolicySeq (REQUEST_ID + 1, counter,
- policy_buffer, CORBA::B_TRUE);
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Policies.h b/TAO/orbsvcs/orbsvcs/Trader/Policies.h
deleted file mode 100644
index a1708977eb5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Policies.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Policies.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#ifndef TAO_POLICIES_H
-#define TAO_POLICIES_H
-
-// STL fun stuff.
-#include <vector>
-#include <set>
-#include <string>
-
-#include "Trader.h"
-
-class TAO_Policies
-//
-// = TITLE
-// This class ensures that policies submitted to Lookup make sense,
-// have the correct value types, and don't exceed the maximums set
-// through the Admin Interface.
-//
-// = DESCRIPTION
-// TAO_Policies does an admirable job of reconciling differences
-// between the default parameter settings of the Trader and the import
-// and other policies set by the client. Unbeknownst to its client
-// TAO_Policies hides this arbitration, and records whether the user
-// policy was chosen, or the default. This information gets returned
-// to the invoker of the query method.
-{
-public:
-
- enum POLICY_TYPE
- {
- EXACT_TYPE_MATCH,
- HOP_COUNT,
- LINK_FOLLOW_RULE,
- MATCH_CARD,
- RETURN_CARD,
- SEARCH_CARD,
- STARTING_TRADER,
- USE_DYNAMIC_PROPERTIES,
- USE_MODIFIABLE_PROPERTIES,
- USE_PROXY_OFFERS,
- REQUEST_ID
- };
-
- static const char * POLICY_NAMES[];
-
- TAO_Policies (TAO_Trader_Base& trader,
- const CosTrading::PolicySeq& policies,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPolicyName,
- CosTrading::DuplicatePolicyName));
-
- // BEGIN SPEC
- // The "policies" parameter allows the importer to specify how the
- // search should be performed as opposed to what sort of services
- // should be found in the course of the search. This can be viewed
- // as parameterizing the algorithms within the trader
- // implementation. The "policies" are a sequence of name-value
- // pairs. The names available to an importer depend on the
- // implementation of the trader. However, some names are
- // standardized where they effect the interpretation of other
- // parameters or where they may impact linking and federation of
- // traders. ° If a policy name in this parameter does not obey the
- // syntactic rules for legal PolicyName's, then an IllegalPolicyName
- // exception is raised. ° If the type of the value associated with a
- // policy differs from that specified in this specification, then a
- // PolicyTypeMismatch exception is raised. ° If subsequent
- // processing of a PolicyValue yields any errors (e.g., the
- // starting_trader policy value is malformed), then an
- // InvalidPolicyValue exception is raised. ° If the same policy name
- // is included two or more times in this parameter, then the
- // DuplicatePolicyName exception is raised.
- // END SPEC
-
- CORBA::ULong search_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "search_card" policy indicates to the trader the maximum
- // number of offers it should consider when looking for type
- // conformance and constraint expression match. The lesser of this
- // value and the trader's max_search_card attribute is used by the
- // trader. If this policy is not specified, then the value of the
- // trader's def_search_card attribute is used.
- // END SPEC
-
- CORBA::ULong match_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "match_card" policy indicates to the trader the maximum
- // number of matching offers to which the preference specification
- // should be applied. The lesser of this value and the trader's
- // max_match_card attribute is used by the trader. If this policy is
- // not specified, then the value of the trader's def_match_card
- // attribute is used.
- // END SPEC
-
- CORBA::ULong return_card (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "return_card" policy indicates to the trader the maximum
- // number of matching offers to return as a result of this
- // query. The lesser of this value and the trader's max_return_card
- // attribute is used by the trader. If this policy is not specified,
- // then the value of the trader's def_return_card attribute is
- // used.
- // END SPEC
-
- // = Offer consideration policies
-
- CORBA::Boolean use_modifiable_properties (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "use_modifiable_properties" policy indicates whether the
- // trader should consider offers which have modifiable properties
- // when constructing the set of offers to which type conformance and
- // constraint processing should be applied. If the value of this
- // policy is TRUE, then such offers will be included; if FALSE, they
- // will not. If this policy is not specified, such offers will be
- // included.
- // END SPEC
-
- CORBA::Boolean use_dynamic_properties (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "use_dynamic_properties" policy indicates whether the trader
- // should consider offers which have dynamic properties when
- // constructing the set of offers to which type conformance and
- // constraint processing should be applied. If the value of this
- // policy is TRUE, then such offers will be included; if FALSE, they
- // will not. If this policy is not specified, such offers will be
- // included.
- // END SPEC
-
- CORBA::Boolean use_proxy_offers (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "use_proxy_offers" policy indicates whether the trader should
- // consider proxy offers when constructing the set of offers to
- // which type conformance and constraint processing should be
- // applied. If the value of this policy is TRUE, then such offers
- // will be included; if FALSE, they will not. If this policy is not
- // specified, such offers will be included.
- // END SPEC
-
- CORBA::Boolean exact_type_match (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "exact_type_match" policy indicates to the trader whether the
- // importer's service type must exactly match an offer's service
- // type; if not (and by default), then any offer of a type
- // conformant to the importer's service type is considered.
- // END SPEC
-
- // = Federated trader policies (not implemented yet)
-
- CosTrading::TraderName* starting_trader (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue));
- // BEGIN SPEC
- // The "starting_trader" policy facilitates the distribution of the
- // trading service itself. It allows an importer to scope a search
- // by choosing to explicitly navigate the links of the trading
- // graph. If the policy is used in a query invocation it is
- // recommended that it be the first policy-value pair; this
- // facilitates an optimal forwarding of the query operation. A
- // "policies" parameter need not include a value for the
- // "starting_trader" policy. Where this policy is present, the first
- // name component is compared against the name held in each link. If
- // no match is found, the InvalidPolicyValue exception is
- // raised. Otherwise, the trader invokes query() on the Lookup
- // interface held by the named link, but passing the
- // "starting_trader" policy with the first component removed.
- // END SPEC
-
- CosTrading::FollowOption link_follow_rule (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
- // Determine the link follow policy for this query overall.
-
- CosTrading::FollowOption link_follow_rule (const char* link_name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue));
- // Determine the link follow policy for a given <link_name>.
-
- // BEGIN SPEC
- //The "link_follow_rule" policy indicates how the client wishes
- //links to be followed in the resolution of its query. See the
- //discussion in "Link Follow Behavior" on page 16-16 for details.
- // END SPEC
-
- // This method returns the link_follow_rule for a link whose name is
- // <link_name> using the following formula:
- // if the importer specified a link_follow_rule policy
- // min(trader.max_follow_policy, link.limiting_follow_rule,
- // query.link_follow_rule)
- // else min(trader.max_follow_policy, link.limiting_follow_rule,
- // trader.def_follow_policy)
-
- CORBA::ULong hop_count (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
-
- // BEGIN SPEC
- // The "hop_count" policy indicates to the trader the maximum number
- // of hops across federation links that should be tolerated in the
- // resolution of this query. The hop_count at the current trader is
- // determined by taking the minimum of the trader's max_hop_count
- // attribute and the importer's hop_count policy, if provided, or
- // the trader's def_hop_count attribute if it is not. If the
- // resulting value is zero, then no federated queries are
- // permitted. If it is greater than zero, then it must be
- // decremented before passing on to a federated trader.
- // END SPEC
-
- CosTrading::Admin::OctetSeq* request_id (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
- // Return the request_id passed to the query method across a link to
- // another trader.
-
- // = Return the limits applied.
- CosTrading::PolicyNameSeq* limits_applied (void);
- // BEGIN SPEC
- // If any cardinality or other limits were applied by one or more
- // traders in responding to a particular query, then the
- // "limits_applied" parameter will contain the names of the policies
- // which limited the query. The sequence of names returned in
- // "limits_applied" from any federated or proxy queries must be
- // concatenated onto the names of limits applied locally and
- // returned.
- // END SPEC
-
- CosTrading::PolicySeq* policies_to_forward (void);
- // Policies to forward to the next trader in a directed federated query.
-
- CosTrading::PolicySeq*
- policies_to_pass (CosTrading::FollowOption def_pass_on_follow_rule,
- CORBA::ULong offers_returned,
- CosTrading::Admin_ptr admin_if);
- // Policies to pass on to the next generation of queries. Decrements
- // the hop counter,adds a link_follow_rule if none exists, adjusts
- // the return_card, and adds the stem_id if none exists.
-
-private:
-
- typedef vector <CosTrading::Policy*> POL_VECTOR;
- typedef set <string, less<string> > POL_SET;
-
- CORBA::ULong ulong_prop (POLICY_TYPE pol,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
- // Reconclile a ULong property with its default.
-
- CORBA::Boolean boolean_prop (POLICY_TYPE pol,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch));
- // Reconcile a Boolean property with its debault.
-
- POL_SET limits_;
- // The policies employed to date.
-
- POL_VECTOR policies_;
- // The policies indexable from the enumerated type.
-
- TAO_Trader_Base& trader_;
- // For the validating identifier names.
-};
-
-
-#endif /* TAO_POLICIES_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.cpp b/TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.cpp
deleted file mode 100644
index 19b697199e6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-#include "Policy_Manager.h"
-
-TAO_Policy_Manager::TAO_Policy_Manager (int num_policies)
- : policies_ (num_policies),
- num_policies_ (0)
-{
- for (int i = 0; i < TAO_Policies::REQUEST_ID + 1; i++)
- this->poltable_[i] = -1;
-}
-
-void
-TAO_Policy_Manager::search_card (CORBA::ULong scard)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::SEARCH_CARD);
- policy.value <<= scard;
-}
-
-void
-TAO_Policy_Manager::match_card (CORBA::ULong mcard)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::MATCH_CARD);
- policy.value <<= mcard;
-}
-
-void
-TAO_Policy_Manager::return_card (CORBA::ULong rcard)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::RETURN_CARD);
- policy.value <<= rcard;
-}
-
-void
-TAO_Policy_Manager::use_modifiable_properties (CORBA::Boolean mod_props)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::USE_MODIFIABLE_PROPERTIES);
- policy.value <<= CORBA::Any::from_boolean (mod_props);
-}
-
-void
-TAO_Policy_Manager::use_dynamic_properties (CORBA::Boolean dyn_props)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::USE_DYNAMIC_PROPERTIES);
- policy.value <<= CORBA::Any::from_boolean (dyn_props);
-}
-
-void
-TAO_Policy_Manager::use_proxy_offers (CORBA::Boolean prox_offs)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::USE_PROXY_OFFERS);
- policy.value <<= CORBA::Any::from_boolean (prox_offs);
-}
-
-void
-TAO_Policy_Manager::starting_trader (CosTrading::TraderName* name)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::STARTING_TRADER);
- // policy.value <<= *name;
-}
-
-void
-TAO_Policy_Manager::
-link_follow_rule (CosTrading::FollowOption follow_option)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::LINK_FOLLOW_RULE);
- policy.value <<= follow_option;
-}
-
-void
-TAO_Policy_Manager::hop_count (CORBA::ULong hop_count)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::HOP_COUNT);
- policy.value <<= hop_count;
-}
-
-void
-TAO_Policy_Manager::exact_type_match (CORBA::Boolean exact_type)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::EXACT_TYPE_MATCH);
- policy.value <<= CORBA::Any::from_boolean (exact_type);
-}
-
-void
-TAO_Policy_Manager::request_id (CosTrading::Admin::OctetSeq* request_id)
-{
- CosTrading::Policy& policy =
- this->fetch_next_policy (TAO_Policies::REQUEST_ID);
- // policy.value <<= *request_id
-}
-
-TAO_Policy_Manager::operator const CosTrading::PolicySeq& (void) const
-{
- return this->policies_;
-}
-
-const CosTrading::PolicySeq&
-TAO_Policy_Manager::policy_seq (void) const
-{
- return this->policies_;
-}
-
-CosTrading::Policy&
-TAO_Policy_Manager::fetch_next_policy (POLICY_TYPE pol_type)
-{
- CORBA::ULong index = 0;
-
- if (this->poltable_[pol_type] == -1)
- {
- int length = this->policies_.length ();
- this->num_policies_++;
-
- if (length < this->num_policies_)
- this->policies_.length (this->num_policies_);
-
- index = this->num_policies_ - 1;
- this->policies_[index].name = TAO_Policies::POLICY_NAMES[pol_type];
- this->poltable_[pol_type] = index;
- }
- else
- index = this->poltable_[pol_type];
-
- return this->policies_[index];
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.h b/TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.h
deleted file mode 100644
index 3275f75dd28..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Policy_Manager.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// ACE_Policies.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#ifndef TAO_POLICY_MANAGER_H
-#define TAO_POLICY_MANAGER_H
-
-#include <map>
-#include <string>
-
-#include "Policies.h"
-
-class TAO_Policy_Manager
-// = TITLE
-//
-// This class is a utility for clients using the CosTrading::Lookup
-// interface that helps them build a policy sequence without violating
-// syntax rules and having to mess with typecodes.
-{
-public:
-
- TAO_Policy_Manager (int num_policies = 0);
-
- // = Routines to set policies.
-
- void search_card (CORBA::ULong scard);
-
- void match_card (CORBA::ULong mcard);
-
- void return_card (CORBA::ULong rcard);
-
- void use_modifiable_properties (CORBA::Boolean mod_props);
-
- void use_dynamic_properties (CORBA::Boolean dyn_props);
-
- void use_proxy_offers (CORBA::Boolean prox_offs);
-
- void starting_trader (CosTrading::TraderName* name);
-
- void link_follow_rule (CosTrading::FollowOption follow_option);
-
- void hop_count (CORBA::ULong hop_count);
-
- void request_id (CosTrading::Admin::OctetSeq* reqiest_id);
-
- void exact_type_match (CORBA::Boolean exact_type);
-
- operator const CosTrading::PolicySeq& (void) const;
-
- const CosTrading::PolicySeq& policy_seq (void) const;
- // Return a PolicySeq suitable for passing to the query method of
- // the Lookup interface.
-
-private:
-
- CosTrading::Policy& fetch_next_policy (TAO_Policies::POLICY_TYPE pol_type);
-
- int poltable_[TAO_Policies::REQUEST_ID + 1];
-
- CosTrading::PolicySeq policies_;
-
- CORBA::ULong num_policies_;
-};
-
-#endif /* TAO_POLICY_MANAGER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.cpp b/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.cpp
deleted file mode 100644
index 55fd85864a8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-// Preference_Interpreter.cpp
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Preference_Interpreter.cpp
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Preference_Interpreter.h"
-#include <values.h>
-#include <ctype.h>
-#include <stdio.h>
-
-TAO_Preference_Interpreter::
-TAO_Preference_Interpreter(CosTradingRepos::ServiceTypeRepository::TypeStruct* ts,
- const char* preference,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPreference))
- : TAO_Interpreter ()
-{
- TAO_Constraint_Validator type_checker(ts);
-
- if (TAO_Interpreter::is_empty_string(preference))
- this->root_ = new TAO_Noop_Constraint(TAO_FIRST);
- else
- {
- if (this->build_tree (preference) != 0)
- TAO_THROW (CosTrading::Lookup::IllegalPreference (preference));
-
- if (type_checker.validate (this->root_) == -1)
- TAO_THROW (CosTrading::Lookup::IllegalPreference (preference));
- }
-}
-
-TAO_Preference_Interpreter::
-TAO_Preference_Interpreter(TAO_Constraint_Validator& validator,
- const char* preference,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPreference))
- : TAO_Interpreter ()
-{
- if (TAO_Interpreter::is_empty_string(preference))
- this->root_ = new TAO_Noop_Constraint(TAO_FIRST);
- else
- {
- if (this->build_tree (preference) != 0)
- TAO_THROW (CosTrading::Lookup::IllegalPreference (preference));
-
- if (validator.validate (this->root_) == -1)
- TAO_THROW (CosTrading::Lookup::IllegalPreference (preference));
- }
-}
-
-TAO_Preference_Interpreter::~TAO_Preference_Interpreter()
-{
-}
-
-void
-TAO_Preference_Interpreter::
-order_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer)
-{
- TAO_Constraint_Evaluator evaluator(offer);
- this->order_offer (offer_id, offer, evaluator);
-}
-
-void
-TAO_Preference_Interpreter::
-order_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer,
- TAO_Constraint_Evaluator& evaluator)
-{
- if (this->root_ != 0)
- {
- TAO_Literal_Constraint return_value;
- TAO_Expression_Type expr_type = this->root_->expr_type ();
- if (evaluator.evaluate_preference (this->root_, return_value) == 0)
- this->offers_.insert (return_value, make_pair (offer_id, offer));
- else
- {
- TAO_Literal_Constraint end ((CORBA::Double) MAXDOUBLE);
- this->offers_.insert (end, make_pair (offer_id, offer));
- }
- }
-}
-
-int
-TAO_Preference_Interpreter::
-remove_offer (CosTrading::OfferId& offer_id,
- CosTrading::Offer*& offer)
-{
- int return_value = 0;
- TAO_Expression_Type expr_type = this->root_->expr_type ();
- ORDERED_OFFERS::iterator offer_beg = this->offers_.begin ();
- ORDERED_OFFERS::iterator offer_end = this->offers_.end ();
-
- if (offer_beg != offer_end)
- {
- if (expr_type == TAO_WITH || expr_type == TAO_MAX)
- {
- offer_end--;
- offer_id = (*offer_end).second.first;
- offer = (*offer_end).second.second;
- this->offers_.erase (offer_end);
- }
- else
- {
- offer_id = (*offer_beg).second.first;
- offer = (*offer_beg).second.second;
- this->offers_.erase (offer_beg);
- }
-
- return_value = 1;
- }
-
- return return_value;
-}
-
-int
-TAO_Preference_Interpreter::num_offers(void)
-{
- return this->offers_.size();
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h b/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h
deleted file mode 100644
index 7ff86a6ba17..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Preference_Interpreter.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_PREFERENCE_INTERPRETER_H
-#define TAO_PREFERENCE_INTERPRETER_H
-
-#include <map>
-#include "Interpreter.h"
-#include "Constraint_Evaluator.h"
-#include "Constraint_Validator.h"
-
-class TAO_Preference_Interpreter : public TAO_Interpreter
-// = TITLE
-// The TAO_Preference_Interpreter will, given a valid preference
-// string and offers, will order the offers based on the offers'
-// compliance with the preferences.
-//
-// = DESCRIPTION
-// Each time the order_offer method is invoked, the
-// TAO_Preference_Interpreter stores the offer reference in the
-// order dictated by its evaluation of the preference string. After
-// the TAO_Preference_Interpreter client has finished ordering all
-// the offers, it will extract the offers in order using the
-// remove_offer method.
-{
-public:
-
- TAO_Preference_Interpreter(CosTradingRepos::ServiceTypeRepository::TypeStruct* ts,
- const char* preference,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPreference));
-
- TAO_Preference_Interpreter(TAO_Constraint_Validator& validator,
- const char* preference,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPreference));
-
- // Parse the preference string, determining first if it's
- // valid. Throw an IllegalPreference exception if the preference
- // doesn't conform to the BNF grammar for preferences.
-
- ~TAO_Preference_Interpreter(void);
- // Destructor
-
- void order_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer);
-
- void order_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer,
- TAO_Constraint_Evaluator& evaluator);
- // Evaluate the offer, and order it internally based on the results
- // of the evaluation.
-
- int remove_offer (CosTrading::OfferId& offer_id,
- CosTrading::Offer*& offer);
- // Remove the next offer. The offer returned will be the next in the
- // ordering determined by the preference string.
-
- int num_offers(void);
- // Return the number of offers remaining in the ordering.
-
-private:
-
- typedef multimap
- < TAO_Literal_Constraint,
- pair < CosTrading::OfferId, CosTrading::Offer* >,
- less < TAO_Literal_Constraint > >
- ORDERED_OFFERS;
- // The map of ordered offers to their order value.
-
- ORDERED_OFFERS offers_;
-};
-
-#endif /* TAO_PREFERENCE_INTERPRETER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.cpp
deleted file mode 100644
index 2b82ba5966f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.cpp
+++ /dev/null
@@ -1,223 +0,0 @@
-// File: Property_Evaluator.cpp
-// $Id$
-
-#include "Trader.h"
-#include "Property_Evaluator.h"
-
-// Constructor
-
-TAO_Property_Evaluator::
-TAO_Property_Evaluator(const CosTrading::PropertySeq& props,
- CORBA::Boolean supports_dp)
- : props_ (props),
- supports_dp_ (supports_dp)
-{
-}
-
-
-TAO_Property_Evaluator::
-TAO_Property_Evaluator(CosTrading::Offer& offer,
- CORBA::Boolean supports_dp)
- : props_ (offer.properties),
- supports_dp_ (supports_dp)
-{
-}
-
-int
-TAO_Property_Evaluator::is_dynamic_property (int index)
-{
- CORBA::Environment env;
- int return_value = 0,
- num_properties = this->props_.length();
-
- // Ensure index is in bounds.
- if (index >= 0 && index < num_properties)
- {
- // Obtain the value of the property at index <index>.
- const CORBA::Any& value = this->props_[index].value;
- CORBA::TypeCode* type = value.type();
-
- if (type->equal(CosTradingDynamic::_tc_DynamicProp, env))
- return_value = 1;
- }
-
- return return_value;
-}
-
-CORBA::Any*
-TAO_Property_Evaluator::property_value(int index,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure))
-{
- CORBA::Any* prop_val = 0;
-
- if (! this->is_dynamic_property(index))
- prop_val = (CORBA::Any *) &(this->props_[index].value);
- else if (this->supports_dp_)
- {
- // Property is defined at this point.
- DP_Eval* dp_eval;
- DP_Struct dp_struct;
- const CORBA::String_var name = this->props_[index].name;
- const CORBA::Any& value = this->props_[index].value;
-
- // Extract the DP_Struct.
- //value >>= dp_struct;
- dp_eval = dp_struct.eval_if;
-
- if (CORBA::is_nil (dp_eval))
- TAO_THROW_RETURN (CosTradingDynamic::DPEvalFailure (), prop_val);
- else
- {
- CORBA::TypeCode* type = dp_struct.returned_type;
- CORBA::Any& info = dp_struct.extra_info;
-
- TAO_TRY
- {
- // Retrieve the value of the dynamic property.
- prop_val = dp_eval->evalDP(name, type, info, TAO_TRY_ENV);
- }
- TAO_CATCH (CORBA::SystemException, excp)
- {
- TAO_THROW_RETURN
- (CosTradingDynamic::DPEvalFailure (name, type, info),
- prop_val);
- }
- TAO_ENDTRY;
- }
- }
-
- return prop_val;
-}
-
-CORBA::TypeCode*
-TAO_Property_Evaluator::property_type(int index)
-{
- CORBA::TypeCode* prop_type = CORBA::TypeCode::_nil();
-
- // Determine if property is both defined and dynamic.
- if (this->is_dynamic_property (index))
- {
- // Extract type information from the DP_Struct.
- const CORBA::Any& value = this->props_[index].value;
- DP_Struct dp_struct;
- //value >>= dp_struct;
-
- // Grab a pointer to the returned_type description
- prop_type = CORBA::TypeCode::_duplicate(dp_struct.returned_type);
- }
- else
- // TypeCode is self-evident at this point.
- prop_type = this->props_[index].value.type();
-
- return prop_type;
-}
-
-TAO_Property_Evaluator_By_Name::
-TAO_Property_Evaluator_By_Name (const CosTrading::PropertySeq& properties,
- CORBA::Environment& _env,
- CORBA::Boolean supports_dp)
- TAO_THROW_SPEC ((CosTrading::DuplicatePropertyName,
- CosTrading::IllegalPropertyName))
- : TAO_Property_Evaluator (properties, supports_dp)
-{
- string prop_name;
- int length = this->props_.length();
-
- for (int i = 0; i < length; i++)
- {
- const CosTrading::Property& prop = this->props_[i];
-
- if (! TAO_Trader_Base::is_valid_identifier_name (prop.name))
- TAO_THROW (CosTrading::IllegalPropertyName (prop.name));
-
- prop_name = prop.name;
- if (! (this->table_.insert (make_pair (prop_name, i))).second)
- TAO_THROW (CosTrading::DuplicatePropertyName (prop.name));
- }
-}
-
-TAO_Property_Evaluator_By_Name::
-TAO_Property_Evaluator_By_Name(CosTrading::Offer& offer,
- CORBA::Boolean supports_dp)
- : TAO_Property_Evaluator(offer, supports_dp)
-{
- int length = this->props_.length();
-
- for (int i = 0; i < length; i++)
- {
- string prop_name = (const char*) this->props_[i].name;
- this->table_[prop_name] = i;
- }
-}
-
-int
-TAO_Property_Evaluator_By_Name::
-is_dynamic_property(const char* property_name)
-{
- int predicate = 0;
- string prop_name (property_name);
- Lookup_Table_Iter lookup_iter = this->table_.find (prop_name);
-
- // If the property name is in the map, delegate evaluation to our
- // superclass. Otherwise, throw an exception.
- if (lookup_iter != this->table_.end())
- {
- int index = (*lookup_iter).second;
- predicate = TAO_Property_Evaluator::is_dynamic_property(index);
- }
-
- return predicate;
-}
-
-CORBA::Any*
-TAO_Property_Evaluator_By_Name::property_value(const char* property_name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure))
-{
- CORBA::Any* prop_value = 0;
- string prop_name(property_name);
- Lookup_Table_Iter lookup_iter = this->table_.find(prop_name);
-
- // If the property name is in the map, delegate evaluation to our
- // superclass. Otherwise, throw an exception.
- if (lookup_iter != this->table_.end())
- {
- int index = (*lookup_iter).second;
- prop_value = TAO_Property_Evaluator::property_value(index, _env);
- }
-
- return prop_value;
-}
-
-CORBA::TypeCode*
-TAO_Property_Evaluator_By_Name::property_type(const char* property_name)
-{
- string prop_name(property_name);
- CORBA::TypeCode* prop_type = CORBA::TypeCode::_nil();
- Lookup_Table_Iter lookup_iter = this->table_.find(prop_name);
-
- // If the property name is in the map, delegate evaluation to our
- // superclass. Otherwise, throw an exception.
- if (lookup_iter != this->table_.end())
- {
- int index = (*lookup_iter).second;
- prop_type = TAO_Property_Evaluator::property_type(index);
- }
-
- return prop_type;
-}
-
-const CosTrading::Property*
-TAO_Property_Evaluator_By_Name::get_property (const char* property_name)
-{
- CosTrading::Property* property = 0;
- string prop_name (property_name);
- Lookup_Table_Iter lookup_iter = this->table_.find(prop_name);
-
- if (lookup_iter != this->table_.end())
- property = (CosTrading::Property *) &this->props_[(*lookup_iter).second];
-
- return property;
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.h b/TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.h
deleted file mode 100644
index 3007ba98f46..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Property_Evaluator.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Property_Evaluator.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_PROPERTY_EVALUATOR_H
-#define TAO_PROPERTY_EVALUATOR_H
-
-#include <map>
-#include <set>
-#include <string>
-
-#include "orbsvcs/CosTradingC.h"
-
-class TAO_Property_Evaluator
-//
-// = TITLE
-// This class abstracts away the details of obtaining property
-// values and property types. Since the procedure for obtaining the
-// value or type of a dynamic property is disparate from the method
-// for a static property, TAO_Property_Evaluator provides methods
-// that will unify the two approaches under a single
-// interface. Since dynamic properties aren't necessarily supported
-// by a trader, this class accounts for that contingency. The use of
-// indexed lookups allows them to occur in constant time on the
-// CORBA sequences, but requires that the client know the layout of
-// properties ahead of time.
-{
-public:
-
- TAO_Property_Evaluator(const CosTrading::PropertySeq& properties,
- CORBA::Boolean supports_dp = 1);
-
- TAO_Property_Evaluator(CosTrading::Offer& offer,
- CORBA::Boolean supports_dp = 1);
- // Construct an instance of TAO_Property_Evaluator that operates on
- // an <offer> where the support for dynamic properties is dictated
- // by <supports_dynamic_properties>.
-
- int is_dynamic_property(int index);
- // Returns 1 if the property at index <index> is dynamic. Returns a
- // 0 when the index is out of bounds.
-
- CORBA::Any* property_value(int index, CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure));
- // Returns value of the property whose index is <index>. If the
- // property at that index is dynamic and the trader supports dynamic
- // properties, then the property_value method will obtain the value
- // of the dynamic property using the evalDP method on the
- // CosTradingDynamic::DynamicPropEval interface, passing on a
- // CosTradingDynamic::DPEvalFailure exception on failure. If the
- // property index is undefined, the method returns a null pointer.
-
- CORBA::TypeCode* property_type(int index);
- // Returns the type of the property whose index is <index>. If the
- // property is dynamic and the trader supports dynamic properties,
- // then the method returns the <returned_type> field of the
- // CosTradingDynamic::DynamicProp struct associated with the
- // property name. If the index is out of bounds, the method returns
- // a null pointer (that is, 0).
-
-protected:
-
- typedef CosTradingDynamic::DynamicProp DP_Struct;
- typedef CosTradingDynamic::DynamicPropEval DP_Eval;
-
- const CosTrading::PropertySeq& props_;
- // The offer from which the TAO_Property_Evaluator extracts property
- // information.
-
- int supports_dp_;
-};
-
-class TAO_Property_Evaluator_By_Name : public TAO_Property_Evaluator
-//
-// = TITLE
-// This class extends the TAO_Property_Evaluator to allow lookups
-// based on the property name of interest. Since the property
-// information is contained within an integer indexed array,
-// lookups may occur in O(n) time, where n is the length of the
-// array. To make lookups by name more efficient,
-// TAO_Property_Evaluator_By_Name creates a mapping of property
-// names to integer indicies, upon which lookups are guaranteed to
-// be O(lg n).
-{
-public:
-
- TAO_Property_Evaluator_By_Name (const CosTrading::PropertySeq& properties,
- CORBA::Environment& _env,
- CORBA::Boolean supports_dp = 1)
- TAO_THROW_SPEC ((CosTrading::DuplicatePropertyName,
- CosTrading::IllegalPropertyName));
-
- TAO_Property_Evaluator_By_Name(CosTrading::Offer& offer,
- CORBA::Boolean supports_dp = 1);
- // Construct an instance of TAO_Property_Evaluator that operates on
- // an <offer> where the support for dynamic properties is dictated
- // by <supports_dynamic_properties>.
-
- int is_dynamic_property(const char* property_name);
- // Returns 1 if the property whose name is <property_name> is
- // defined and dynamic. If the property is undefined, this method
- // will throw a Property_Undefined exception with impunity.
-
- CORBA::Any* property_value(const char* property_name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure));
- // This method is identical to its counterpart in
- // TAO_Property_Evaluator, except property_value first discovers the
- // index through a string matching lookup.
-
- CORBA::TypeCode* property_type(const char* property_name);
- // This method is identical to its counterpart in
- // TAO_Property_Evaluator, exception property_type first discovers
- // the index through a string matching lookup.
-
- const CosTrading::Property* get_property (const char* property_name);
-
-private:
-
- typedef map<string, int, less<string> > Lookup_Table;
- typedef Lookup_Table::iterator Lookup_Table_Iter;
- // A mapping, upon which lookups will take O(lg n), of property
- // names to sequence indices.
-
- Lookup_Table table_;
- // The instance of the above mapping for the offer provided in the
- // constructor.
-};
-
-#endif /* TAO_PROPERTY_EVALUATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Property_Filter.cpp b/TAO/orbsvcs/orbsvcs/Trader/Property_Filter.cpp
deleted file mode 100644
index 3c8f1dc3b84..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Property_Filter.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-#include "Property_Filter.h"
-#include "Trader.h"
-
-TAO_Property_Filter::
-TAO_Property_Filter (const SPECIFIED_PROPS& desired_props,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName))
- : policy_ (desired_props._d ())
-{
- if (this->policy_ == CosTrading::Lookup::some)
- {
- const PropertyNameSeq& prop_seq = desired_props.prop_names ();
- int length = prop_seq.length ();
-
- for (int i = 0; i < length; i++)
- {
- const char* pname = prop_seq[i];
-
- // Check for errors or duplicates
- if (! TAO_Trader_Base::is_valid_identifier_name (pname))
- TAO_THROW_SPEC (CosTrading::IllegalPropertyName (pname));
- else
- {
- // Insert returns a pair whose second element is a flag
- // indicating whether a collision occured.
- string prop_name (pname);
- if (this->props_.insert (prop_name).second == 0)
- TAO_THROW_SPEC (CosTrading::DuplicatePropertyName (pname));
- }
- }
- }
-}
-
-TAO_Property_Filter::
-TAO_Property_Filter (const TAO_Property_Filter& prop_filter)
- : props_ (prop_filter.props_),
- policy_ (prop_filter.policy_)
-{
-}
-
-void
-TAO_Property_Filter::filter_offer (CosTrading::Offer& source,
- CosTrading::Offer& destination)
-{
- PROP_QUEUE prop_queue;
- CosTrading::PropertySeq& s_props = source.properties;
- CosTrading::PropertySeq& d_props = destination.properties;
- int length = s_props.length (), elem = 0;
-
- if (this->policy_ != CosTrading::Lookup::none)
- {
- for (int i = 0; i < length; i++)
- {
- if (this->policy_ == CosTrading::Lookup::all)
- prop_queue.push_back (&s_props[i]);
- else
- {
- string prop_name (s_props[i].name);
-
- // Save those property that match.
- if (this->props_.find (prop_name) != this->props_.end ())
- prop_queue.push_back (&s_props[i]);
- }
- }
-
- // Shove the matched properties into the destination property
- // sequence.
- length = prop_queue.size ();
- d_props.length (prop_queue.size ());
- for (PROP_QUEUE::iterator prop_iter = prop_queue.begin ();
- prop_iter != prop_queue.end ();
- prop_iter++)
- d_props[elem++] = *(*prop_iter);
- }
-}
-
-int
-TAO_Property_Filter::verify_property_name (const char* name)
-{
- int return_value = -1,
- length = ACE_OS::strlen (name);
-
- if (length >= 1 && isalpha (name[0]))
- {
- for (int i = 0; i < length; i++)
- {
- if (! (isalnum (name[i]) || name[i] == '_'))
- break;
- }
-
- return_value = 0;
- }
-
- return return_value;
-}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Property_Filter.h b/TAO/orbsvcs/orbsvcs/Trader/Property_Filter.h
deleted file mode 100644
index e23dbde28d4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Property_Filter.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Property_Filter.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#ifndef TAO_PROPERTY_FILTER_H
-#define TAO_PROPERTY_FILTER_H
-
-#include <set>
-#include <deque>
-
-class TAO_Property_Filter
-// = TITLE
-//
-// The Ace_Property_Filter copies those properties specified in a
-// CosTrading::Lookup::SpecifiedProps from a source
-// CosTrading::Offer to a destination CosTrading::Offer.
-{
-public:
-
- typedef CosTrading::Lookup::SpecifiedProps SPECIFIED_PROPS;
-
- TAO_Property_Filter (const SPECIFIED_PROPS& desired_props,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName));
- // Verify that the specified properties are correct.
-
- TAO_Property_Filter (const TAO_Property_Filter& prop_filter);
-
- void filter_offer (CosTrading::Offer& source,
- CosTrading::Offer& destination);
- // Copy the desired properties from the source offer to the
- // destination offer.
-
-private:
-
- typedef set< string, less <string> > PROP_NAMES;
- typedef deque< CosTrading::Property* > PROP_QUEUE;
-
- int verify_property_name (const char* name);
-
- PROP_NAMES props_;
- CosTrading::Lookup::HowManyProps policy_;
-};
-
-#endif /* TAO_PROPERTY_FILTER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Proxy.cpp b/TAO/orbsvcs/orbsvcs/Trader/Proxy.cpp
deleted file mode 100644
index 0e9e17a82ef..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Proxy.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// Trading
-//
-// = FILENAME
-// Proxy.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (TAO_PROXY_C)
-#define TAO_PROXY_C
-
-#include "Proxy.h"
-
-template <class TRADER>
-TAO_Proxy<TRADER>::TAO_Proxy (TRADER &trader)
- : trader_ (trader),
- TAO_Trader_Components <POA_CosTrading::Proxy> (trader.trading_components ()),
- TAO_Support_Attributes <POA_CosTrading::Proxy> (trader.support_attributes ())
-{
-}
-
-template <class TRADER>
-TAO_Proxy<TRADER>::~TAO_Proxy (void)
-{
-}
-
-template <class TRADER> CosTrading::OfferId
-TAO_Proxy<TRADER>::export_proxy (CosTrading::Lookup_ptr target,
- const char *type,
- const CosTrading::PropertySeq& properties,
- CORBA::Boolean if_match_all,
- const char * recipe,
- const CosTrading::PolicySeq& policies_to_pass_on,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::InvalidLookupRef,
- CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::Proxy::IllegalRecipe,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName))
-{
- TAO_THROW_RETURN (CORBA::UNKNOWN (CORBA::COMPLETED_NO), 0);
-}
-
-template <class TRADER> void
-TAO_Proxy<TRADER>::withdraw_proxy (const char *id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Proxy::NotProxyOfferId))
-{
- TAO_THROW (CORBA::UNKNOWN (CORBA::COMPLETED_NO));
-}
-
-template <class TRADER> CosTrading::Proxy::ProxyInfo *
-TAO_Proxy<TRADER>::describe_proxy (const char *id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Proxy::NotProxyOfferId))
-{
- TAO_THROW_RETURN (CORBA::UNKNOWN (CORBA::COMPLETED_NO), 0);
-}
-
-template <class TRADER> void
-TAO_Proxy<TRADER>::list_proxies (CORBA::ULong how_many,
- CosTrading::OfferIdSeq*& ids,
- CosTrading::OfferIdIterator_ptr& id_itr,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented))
-{
- TAO_THROW (CORBA::UNKNOWN (CORBA::COMPLETED_NO));
-}
-
-
-#endif /* TAO_PROXY_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Proxy.h b/TAO/orbsvcs/orbsvcs/Trader/Proxy.h
deleted file mode 100644
index 67f3c2677b8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Proxy.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Proxy.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_PROXY_H
-#define TAO_PROXY_H
-
-#include "Attributes.h"
-
-template <class TRADER>
-class TAO_Proxy :
- public TAO_Trader_Components <POA_CosTrading::Proxy>,
- public TAO_Support_Attributes <POA_CosTrading::Proxy>
-{
-public:
-
- TAO_Proxy (TRADER &trader);
-
- ~TAO_Proxy (void);
-
- virtual CosTrading::OfferId
- export_proxy (CosTrading::Lookup_ptr target,
- const char *type,
- const CosTrading::PropertySeq& properties,
- CORBA::Boolean if_match_all,
- const char * recipe,
- const CosTrading::PolicySeq& policies_to_pass_on,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::InvalidLookupRef,
- CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::Proxy::IllegalRecipe,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName));
-
- virtual void withdraw_proxy (const char *id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Proxy::NotProxyOfferId));
-
- virtual CosTrading::Proxy::ProxyInfo *
- describe_proxy (const char *id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Proxy::NotProxyOfferId));
-
- // = CosTrading::TraderComponents methods.
-
- virtual void list_proxies (CORBA::ULong how_many,
- CosTrading::OfferIdSeq*& ids,
- CosTrading::OfferIdIterator_ptr& id_itr,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented));
-
-private:
- TRADER &trader_;
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Proxy.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-
-#endif /* TAO_PROXY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.cpp
deleted file mode 100644
index 5dadb8746d4..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
- /* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Query_Only_Offer_Iterator.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-#define ACE_BUILD_DLL
-
-#include "Query_Only_Offer_Iterator.h"
-#include <iostream.h>
-
-TAO_Query_Only_Offer_Iterator::
-TAO_Query_Only_Offer_Iterator(const TAO_Property_Filter& pfilter)
- : TAO_Offer_Iterator (pfilter)
-{
-}
-
-TAO_Query_Only_Offer_Iterator::~TAO_Query_Only_Offer_Iterator(void)
-{
- // cerr << "In iterator destructor now" << endl;
-}
-
-void
-TAO_Query_Only_Offer_Iterator::add_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer)
-{
- this->offers_.push_back (offer);
- CORBA::string_free (offer_id);
-}
-
-CORBA::ULong
-TAO_Query_Only_Offer_Iterator::max_left (CORBA::Environment& _env)
- TAO_THROW_SPEC((CORBA::SystemException,
- CosTrading::UnknownMaxLeft))
-{
- return this->offers_.size ();
-}
-
-CORBA::Boolean
-TAO_Query_Only_Offer_Iterator::next_n (CORBA::ULong n,
- OfferSeq_out offers,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- offers = new CosTrading::OfferSeq;
-
- CORBA::ULong offers_in_sequence =
- min (n, (CORBA::ULong)this->offers_.size ());
- offers->length (offers_in_sequence);
-
- // populate the sequence.
- for (CORBA::ULong i = 0; i < offers_in_sequence; i++)
- {
- CosTrading::Offer& source = *(this->offers_.front ());
- CosTrading::Offer& destination = (*offers)[i];
-
- this->pfilter_.filter_offer (source, destination);
- offers_.pop_front ();
- }
-
- return offers_in_sequence != 0;
-}
-
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.h b/TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.h
deleted file mode 100644
index b0610c4481b..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Query_Only_Offer_Iterator.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Query_Only_Offer_Iterator.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_QUERY_ONLY_OFFER_ITERATOR_H
-#define TAO_QUERY_ONLY_OFFER_ITERATOR_H
-
-#include "Offer_Iterator.h"
-#include <deque>
-
-class TAO_Export TAO_Query_Only_Offer_Iterator : public TAO_Offer_Iterator
- // = TITLE
- // An implementation of the CosTrading::OfferIterator IDL
- // interface that takes advantage of the fact that the trader is
- // Query Only, and therefore its service offers are not being
- // changed or removed.
- //
- // = DESCRIPTION
- // The iterator stores pointers to Offers to be iterated over,
- // and later accesses the Offers directly through the pointers.
- //
-{
-public:
- // = Initialization and termination methods.
-
- TAO_Query_Only_Offer_Iterator (const TAO_Property_Filter& pfilter);
-
- virtual ~TAO_Query_Only_Offer_Iterator (void);
-
- virtual CORBA::Boolean next_n (CORBA::ULong n,
- CosTrading::OfferSeq_out offers,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Deposit at maximum n offers into the return sequence and return 1,
- // or return 0 if the iterator is done and no offers are returned.
-
- virtual CORBA::ULong max_left (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft));
- // Return the number of items left in the iterator.
-
- void add_offer (CosTrading::OfferId offer_id,
- CosTrading::Offer* offer);
- // Add an offer the iterator should iterate over.
-
-private:
-
- deque <CosTrading::Offer *> offers_;
- // Structure that stores pointers to offers
- // to iterate over.
-};
-
-
-#endif /* TAO_QUERY_ONLY_OFFER_ITERATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/README b/TAO/orbsvcs/orbsvcs/Trader/README
deleted file mode 100644
index fcdae03e73f..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/README
+++ /dev/null
@@ -1,60 +0,0 @@
-$Id$
-
-Thank you for your interest in the TAO Trading Service. The TAO
-Trading Service is in the process of being ported to TAO from
-VisiBroker, and therefore it won't compile. I'll send mail to the
-group when the port is complete, and then people can play with it.
-
-Thanks,
-Seth
-
----------------------------------------------------------------------------
-
-Note: This version of the trading service requires the Object Space
-STL. To have the trading service compile properly, prepend the following
-to the makefile:
-
-include $(STL_ROOT)/config/local.cfg
-
-CC_INCLUDES += -I$(STD)
-CC_INCLUDES += -pta
-
-CPPFLAGS += \
- -I$(TOOLKIT) \
- $(CC_INCLUDES) \
- $(CC_FLAGS) \
- $(CC_DEFINES) \
- $(CC_EH) \
- $(CC_MT)
-
-The final trading service server application needs to link with the
-following library:
-
-LDFLAGS += -L$(STL_ROOT)/lib
-LDLIBS += -lospace
-
-Where currently: STL_ROOT=/project/doc/irfan/ObjectSpace/SC4.0,
- STD=$STL_ROOT/ospace/std, and
- STL=$STL_ROOT/stl
-
-Also, the Sequences.idl file needs to be compiled by tao_idl before
-the C++ compilation begins. These sequences are used to extract
-simple sequences from offer property values.
-
-The constraint.y and constraint.l files have been compiled
-into Constraint_y.cpp and Constraint_l.cpp by:
-
-Constraint_y.cpp: constraint.y
- $(YACC) -d $<
- mv y.tab.c $@
- mv y.tab.h Constraint_Tokens.h
-
-Constraint_l.cpp: constraint.l
- $(LEX) $<
- mv lex.yy.c $@
-
-It shouldn't be necessary to recompile them, but it's handy to have
-this information around just in case.
-
-Thanks,
-Seth \ No newline at end of file
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Register.cpp b/TAO/orbsvcs/orbsvcs/Trader/Register.cpp
deleted file mode 100644
index 007d3dc98f7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Register.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Register.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (TAO_REGISTER_C)
-#define TAO_REGISTER_C
-
-#include "Register.h"
-#include "Property_Evaluator.h"
-#include "Trader.h"
-#include <iostream.h>
-#include <algorithm>
-
-template <class TRADER>
-const char* TAO_Register<TRADER>::NAME = "Trader: Register";
-
-template <class TRADER>
-TAO_Register<TRADER>::TAO_Register (TRADER &trader)
- : trader_ (trader),
- TAO_Trader_Components<POA_CosTrading::Register> (trader.trading_components ()),
- TAO_Support_Attributes<POA_CosTrading::Register> (trader.support_attributes ())
-{
-}
-
-template <class TRADER>
-TAO_Register<TRADER>::~TAO_Register (void)
-{
-}
-
-template <class TRADER> CosTrading::OfferId
-TAO_Register<TRADER>::export (CORBA::Object_ptr reference,
- const char *type,
- const CosTrading::PropertySeq &properties,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Register::InvalidObjectRef,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::Register::InterfaceTypeMismatch,
- CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::DuplicatePropertyName))
-{
- // Get service type map
- TRADER::SERVICE_TYPE_MAP &service_type_map =
- this->trader_.service_type_map ();
-
- CosTrading::Offer offer;
- TAO_Support_Attributes_Impl& support_attrs =
- this->trader_.support_attributes ();
- CosTrading::TypeRepository_ptr type_repos =
- support_attrs.type_repos ();
- CosTradingRepos::ServiceTypeRepository_ptr rep =
- CosTradingRepos::ServiceTypeRepository::_narrow (type_repos, _env);
- TAO_CHECK_ENV_RETURN (_env, 0);
-
- // Yank our friend, the type struct, and confirm that the given
- // properties match the type definition.
- TYPE_STRUCT* type_struct = rep->fully_describe_type (type, _env);
- TAO_CHECK_ENV_RETURN (_env, 0);
-
- // Oops the type is masked, we shouldn't let exporters know the type
- // exists.
- if (type_struct->masked)
- TAO_THROW_RETURN (CosTrading::UnknownServiceType (type), 0);
-
- // TAO-specific way to determine if an object is derived from or is
- // an interface type.
- if (! reference->_is_a (type_struct->if_name, _env))
- TAO_THROW_RETURN (CosTrading::Register::
- InterfaceTypeMismatch (type, reference), 0);
-
- // Validate that the properties defined for this offer are correct
- // to their types and strength.
- this->validate_properties (type, type_struct,
- (CosTrading::PropertySeq) properties, _env);
- TAO_CHECK_ENV_RETURN (_env, 0);
-
- offer.reference = (reference->_duplicate (reference));
- offer.properties = properties;
-
- // Insert the offer into the underlying type map.
- CosTrading::OfferId id = service_type_map.insert_offer (type, offer);
-
- if (id == 0)
- {
- // Add type, if it's already been added in that split second
- // since we've released the lock, nothing bad will happen.
- service_type_map.add_type (type);
- id = service_type_map.insert_offer (type, offer);
- }
-
- return id;
-}
-
-template <class TRADER> void
-TAO_Register<TRADER>::withdraw (const char *id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId))
-{
- // Get service type map.
- TRADER::SERVICE_TYPE_MAP &service_type_map =
- this->trader_.service_type_map ();
-
- service_type_map.remove_offer ((CosTrading::OfferId) id, _env);
-}
-
-template <class TRADER> CosTrading::Register::OfferInfo *
-TAO_Register<TRADER>::describe (const char *id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId))
-{
- // Get service type map.
- char* type = 0;
- TRADER::SERVICE_TYPE_MAP &service_type_map =
- this->trader_.service_type_map ();
-
- // Perform a lookup to find the offer.
- CosTrading::Offer* offer =
- service_type_map.lookup_offer ((CosTrading::OfferId) id, type, _env);
- TAO_CHECK_ENV_RETURN (_env, (CosTrading::Register::OfferInfo *) 0);
-
- CosTrading::Register::OfferInfo *offer_info =
- new CosTrading::Register::OfferInfo ();
-
- offer_info->reference = offer->reference->_duplicate (offer->reference);
- offer_info->type = CORBA::string_dup (type);
- offer_info->properties = offer->properties;
-
- return offer_info;
-}
-
-template <class TRADER> void
-TAO_Register<TRADER>::modify (const char *id,
- const CosTrading::PropertyNameSeq& del_list,
- const CosTrading::PropertySeq& modify_list,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId,
- CosTrading::IllegalPropertyName,
- CosTrading::Register::UnknownPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::Register::MandatoryProperty,
- CosTrading::Register::ReadonlyProperty,
- CosTrading::DuplicatePropertyName))
-{
- // Throw an exception if the trader is not configured
- // to support properties modification.
- if (! this->supports_modifiable_properties (_env))
- TAO_THROW (CosTrading::NotImplemented ());
- else
- {
- char* type = 0;
- TAO_Support_Attributes_Impl& support_attrs =
- this->trader_.support_attributes ();
- CosTrading::TypeRepository_ptr type_repos =
- support_attrs.type_repos ();
- CosTradingRepos::ServiceTypeRepository_ptr rep =
- CosTradingRepos::ServiceTypeRepository::_narrow (type_repos, _env);
- TAO_CHECK_ENV_RETURN (_env,);
- TRADER::SERVICE_TYPE_MAP &service_type_map =
- this->trader_.service_type_map ();
-
- CosTrading::Offer* offer =
- service_type_map.lookup_offer ((CosTrading::OfferId) id, type, _env);
- TAO_CHECK_ENV_RETURN (_env,);
-
- if (offer != 0)
- {
- // Yank our friend, the type struct.
- TYPE_STRUCT* type_struct = rep->describe_type (type, _env);
- TAO_CHECK_ENV_RETURN (_env,);
- TAO_Offer_Modifier offer_mod (type, type_struct, *offer);
-
- // Delete, add, and change properties of the offer.
- this->validate_properties (type, type_struct,
- (CosTrading::PropertySeq) modify_list, _env);
- TAO_CHECK_ENV_RETURN (_env,);
- offer_mod.delete_properties (del_list, _env);
- TAO_CHECK_ENV_RETURN (_env,);
- offer_mod.merge_properties (modify_list, _env);
- TAO_CHECK_ENV_RETURN (_env,);
-
- // Alter our reference to the offer.
- offer_mod.affect_change ();
- }
- }
-}
-
-template <class TRADER> void
-TAO_Register<TRADER>::withdraw_using_constraint (const char *type,
- const char *constr,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Register::NoMatchingOffers))
-{
- int num_removed = 0;
- deque<CosTrading::OfferId_var> ids;
- TAO_Support_Attributes_Impl& support_attrs =
- this->trader_.support_attributes ();
- CosTrading::TypeRepository_ptr type_repos =
- support_attrs.type_repos ();
- CosTradingRepos::ServiceTypeRepository_ptr rep =
- CosTradingRepos::ServiceTypeRepository::_narrow (type_repos, _env);
- TRADER::SERVICE_TYPE_MAP &service_type_map =
- this->trader_.service_type_map ();
- CORBA::Boolean dp_support =
- support_attrs.supports_dynamic_properties ();
-
- // Retrieve the type struct
- TYPE_STRUCT* type_struct = rep->describe_type (type, _env);
- TAO_CHECK_ENV_RETURN (_env,);
-
- // Try to find the map of offers of desired service type.
- TRADER::SERVICE_TYPE_MAP::Local_Offer_Iterator*
- offer_iter = service_type_map.get_offers (type);
-
- if (offer_iter != 0)
- {
- TAO_Constraint_Validator validator (type_struct);
- TAO_Constraint_Interpreter constr_inter (validator, constr, _env);
- TAO_CHECK_ENV_RETURN (_env,);
-
- while (offer_iter->has_more_offers ())
- {
- CosTrading::Offer* offer = offer_iter->get_offer ();
- // Add offer if it matches the constraints
-
- TAO_Constraint_Evaluator evaluator (offer, dp_support);
- if (constr_inter.evaluate (evaluator))
- ids.push_back (offer_iter->get_id ());
-
- offer_iter->next_offer ();
- }
-
- // Must delete the iterator, so we can write to the service type map.
- delete offer_iter;
- }
-
- if (ids.size () == 0)
- TAO_THROW (CosTrading::Register::NoMatchingOffers (constr));
- else
- {
- for (deque<CosTrading::OfferId_var>::iterator id_iter = ids.begin ();
- id_iter != ids.end ();
- id_iter++)
- {
- service_type_map.remove_offer
- ((CosTrading::OfferId) ids.front ().in (), _env);
- }
- }
-}
-
-template <class TRADER> CosTrading::Register_ptr
-TAO_Register<TRADER>::resolve (const CosTrading::TraderName &name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Register::IllegalTraderName,
- CosTrading::Register::UnknownTraderName,
- CosTrading::Register::RegisterNotSupported))
-{
- // Determine if the first link is a legal link name.
- if (! TAO_Trader_Base::is_valid_identifier_name (name[0]))
- TAO_THROW_RETURN (CosTrading::Register::IllegalTraderName (name),
- CosTrading::Register::_nil ());
-
- // Grab a reference to the link interface, and get a link description.
- CosTrading::Link_var link (this->link_if (_env));
- TAO_CHECK_ENV_RETURN (_env, CosTrading::Register::_nil ());
- CosTrading::Link::LinkInfo_var link_info;
-
- TAO_TRY
- {
- // Ensure that the link to the next trader exists.
- link_info = link->describe_link (name[0], TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_THROW_RETURN (CosTrading::Register::UnknownTraderName (name),
- CosTrading::Register::_nil ());
- }
- TAO_ENDTRY;
-
- // Ensure that the register pointer isn't nil.
- if (link_info->target_reg == CosTrading::Register::_nil ())
- TAO_THROW_RETURN (CosTrading::Register::RegisterNotSupported (name),
- CosTrading::Register::_nil ());
-
- CosTrading::Register_ptr return_value = link_info->target_reg;
-
- if (name.length () > 1)
- {
- // Create a new Trader Name with the first link removed.
- CosTrading::TraderName trader_name (name.length () - 1);
- for (int i = trader_name.length () - 1; i >= 0; i--)
- trader_name[i] = name[i + 1];
-
- return_value = link_info->target_reg->resolve (trader_name, _env);
- TAO_CHECK_ENV_RETURN (_env, CosTrading::Register::_nil ());
- }
-
- return return_value;
-}
-
-template <class TRADER> void
-TAO_Register<TRADER>::
-validate_properties (const char* type,
- TYPE_STRUCT* type_struct,
- CosTrading::PropertySeq& properties,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::DuplicatePropertyName))
-{
- typedef CosTradingRepos::ServiceTypeRepository SERVICE_TYPE_REPOS;
-
- int length = properties.length ();
- SERVICE_TYPE_REPOS::PropStructSeq& prop_types = type_struct->props;
- TAO_Property_Evaluator_By_Name prop_eval (properties, _env);
- TAO_CHECK_ENV_RETURN (_env,);
-
- // Perform property validation
- length = prop_types.length ();
- for (int i = 0; i < length; i++)
- {
- SERVICE_TYPE_REPOS::PropStruct& prop_struct = prop_types[i];
- const char* prop_name = prop_struct.name;
-
- // Obtain the type of the exported property.
- CORBA::TypeCode* prop_type = prop_eval.property_type (prop_name);
-
- if (prop_type == CORBA::TypeCode::_nil ())
- {
- // Offer cannot have a missing mandatory property.
- if (prop_types[i].mode == SERVICE_TYPE_REPOS::PROP_MANDATORY)
- TAO_THROW (CosTrading::MissingMandatoryProperty (type, prop_name));
- }
- else
- {
- if (! prop_type->equal (prop_struct.value_type, _env))
- {
- // Offer cannot redefine the type of an property.
- const CosTrading::Property* prop = prop_eval.get_property (prop_name);
- TAO_THROW (CosTrading::PropertyTypeMismatch (type, *prop));
- }
- else if (prop_struct.mode == SERVICE_TYPE_REPOS::PROP_READONLY &&
- prop_eval.is_dynamic_property (prop_name))
- TAO_THROW (CosTrading::ReadonlyDynamicProperty (type, prop_name));
- }
- }
-}
-
-#endif /* TAO_REGISTER_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Register.h b/TAO/orbsvcs/orbsvcs/Trader/Register.h
deleted file mode 100644
index 36975416071..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Register.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Register.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ============================================================================
-#ifndef ACE_REGISTER_H
-#define ACE_REGISTER_H
-
-#include "Offer_Modifier.h"
-
-#include <map>
-#include <string>
-#include <deque>
-
-template <class TRADER>
-class TAO_Register :
- public TAO_Trader_Components<POA_CosTrading::Register>,
- public TAO_Support_Attributes<POA_CosTrading::Register>
- //
- // = TITLE
- // This class implements CosTrading::Register IDL interface.
-{
-public:
-
- TAO_Register (TRADER &trader);
-
- virtual ~TAO_Register (void);
-
- virtual CosTrading::OfferId export (CORBA::Object_ptr reference,
- const char *type,
- const CosTrading::PropertySeq& properties,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Register::InvalidObjectRef,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::Register::InterfaceTypeMismatch,
- CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::DuplicatePropertyName));
-
- // BEGIN SPEC
- // The export operation is the means by which a service is
- // advertised, via a trader, to a community of potential
- // importers. The OfferId returned is the handle with which the
- // exporter can identify the exported offer when attempting to
- // access it via other operations. The OfferId is only meaningful in
- // the context of the trader that generated it.
-
- // The "reference" parameter is the information that enables a client
- // to interact with a remote server. If a trader implementation chooses
- // to consider certain types of object references (e.g., a nil object
- // reference) to be unexportable, then it may return the InvalidObjectRef
- // exception in such cases.
-
- // The "type" parameter
- // identifies the service type, which contains the interface type of
- // the "reference" and a set of named property types that may be
- // used in further describing this offer (i.e., it restricts what is
- // acceptable in the properties parameter). °
-
- // If the string
- // representation of the "type" does not obey the rules for
- // identifiers, then an IllegalServiceType exception is raised. ° If
- // the "type" is correct syntactically but a trader is able to
- // unambiguously determine that it is not a recognized service type,
- // then an UnknownServiceType exception is raised. °
-
- // If the trader
- // can determine that the interface type of the "reference"
- // parameter is not a subtype of the interface type specified in
- // "type," then an InterfaceTypeMismatch exception is raised. The
- // "properties" parameter is a list of named values that conform to
- // the property value types defined for those names. They describe
- // the service being offered. This description typically covers
- // behavioral, non-functional, and non-computational aspects of the
- // service. °
-
- // If any of the property names do not obey the syntax
- // rules for PropertyNames, then an IllegalPropertyName exception is
- // raised. °
-
- // If the type of any of the property values is not the
- // same as the declared type (declared in the service type), then a
- // PropertyTypeMismatch exception is raised.
-
- // ° If an attempt is made to assign a dynamic property value to a
- // readonly property, then the ReadonlyDynamicProperty exception is
- // raised. ° If the "properties" parameter omits any property
- // declared in the service type with a mode of mandatory, then a
- // MissingMandatoryProperty exception is raised. ° If two or more
- // properties with the same property name are included in this
- // parameter, the DuplicatePropertyName exception is raised.
- // END SPEC
-
- virtual void withdraw (const char *id, CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId));
-
- // BEGIN SPEC
- // The withdraw operation removes the service offer from the trader
- // (i.e., after withdraw the offer can no longer be returned as the
- // result of a query). The offer is identified by the "id" parameter
- // which was originally returned by export. ° If the string
- // representation of "id" does not obey the rules for offer
- // identifiers, then an IllegalOfferId exception is raised. ° If the
- // "id" is legal but there is no offer within the trader with that
- // "id," then an UnknownOfferId exception is raised. ° If the "id"
- // identifies a proxy offer rather than an ordinary offer, then a
- // ProxyOfferId exception is raised.
- // END SPEC
-
- virtual CosTrading::Register::OfferInfo*
- describe (const char * id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId));
-
- // BEGIN SPEC
- // The describe operation returns the information about an offered
- // service that is held by the trader. It comprises the "reference"
- // of the offered service, the "type" of the service offer, and the
- // "properties" that describe this offer of service. The offer is
- // identified by the "id" parameter which was originally returned by
- // export. ° If the string representation of "id" does not obey the
- // rules for object identifiers, then an IllegalOfferId exception is
- // raised. ° If the "id" is legal but there is no offer within the
- // trader with that "id," then an UnknownOfferId exception is
- // raised. ° If the "id" identifies a proxy offer rather than an
- // ordinary offer, then a ProxyOfferId exception is raised.
- // END SPEC
-
- virtual void modify (const char * id,
- const CosTrading::PropertyNameSeq& del_list,
- const CosTrading::PropertySeq& modify_list,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId,
- CosTrading::IllegalPropertyName,
- CosTrading::Register::UnknownPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::Register::MandatoryProperty,
- CosTrading::Register::ReadonlyProperty,
- CosTrading::DuplicatePropertyName));
-
- // BEGIN SPEC
- // The modify operation is used to change the description of a
- // service as held within a service offer. The object reference and
- // the service type associated with the offer cannot be
- // changed. This operation may: ° add new (non-mandatory) properties
- // to describe an offer, ° change the values of some existing (not
- // readonly) properties, or ° delete existing (neither mandatory nor
- // readonly) properties.
-
- // The modify operation either succeeds completely or it fails
- // completely. The offer is identified by the "id" parameter which
- // was originally returned by export. ° If the string representation
- // of "id" does not obey the rules for offer identifiers, then an
- // IllegalOfferId exception is raised. ° If the "id" is legal but
- // there is no offer within the trader with that "id," then an
- // UnknownOfferId exception is raised. ° If the "id" identifies a
- // proxy offer rather than an ordinary offer, then a ProxyOfferId
- // exception is raised.
-
- // The "del_list" parameter gives the names of the properties that
- // are no longer to be recorded for the identified offer. Future
- // query and describe operations will not see these properties. ° If
- // any of the names within the "del_list" do not obey the rules for
- // PropertyName's, then an IllegalPropertyName exception is
- // raised. ° If a "name" is legal but there is no property for the
- // offer with that "name," then an UnknownPropertyName exception is
- // raised. ° If the list includes a property that has a mandatory
- // mode, then the MandatoryProperty exception is raised. ° If the
- // same property name is included two or more times in this
- // parameter, the DuplicatePropertyName exception is raised.
-
- // The "modify_list" parameter gives the names and values of
- // properties to be changed. If the property is not in the offer,
- // then the modify operation adds it. The modified (or added)
- // property values are returned in future query and describe
- // operations in place of the original values. ° If any of the names
- // within the "modify_list" do not obey the rules for
- // PropertyName's, then an IllegalPropertyName exception is
- // raised. ° If the list includes a property that has a readonly
- // mode, then the ReadonlyProperty exception is raised unless that
- // readonly property is not currently recorded for the offer. The
- // ReadonlyDynamicProperty exception is raised if an attempt is made
- // to assign a dynamic property value to a readonly property. ° If
- // the value of any modified property is of a type that is not the
- // same as the type expected, then the PropertyTypeMismatch
- // exception is raised. ° If two or more properties with the same
- // property name are included in this argument, the
- // DuplicatePropertyName exception is raised.
-
- // The NotImplemented exception shall be raised if and only if the
- // supports_modifiable_properties attribute yields FALSE.
- // END SPEC
-
- virtual void withdraw_using_constraint (const char *type,
- const char *constr,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Register::NoMatchingOffers));
-
- // BEGIN SPEC
- // The withdraw_using_constraint operation withdraws a set of offers
- // from within a single trader. This set is identified in the same
- // way that a query operation identifies a set of offers to be
- // returned to an importer.
-
- // The "type" parameter conveys the required service type. Each
- // offer of the specified type will have the constraint expression
- // applied to it. If it matches the constraint expression, then the
- // offer will be withdrawn.° If "type" does not obey the rules for
- // service types, then an IllegalServiceType exception is raised. °
- // If the "type" is correct syntactically but is not recognized as a
- // service type by the trader, then an UnknownServiceType exception
- // is raised.
-
- // The constraint "constr" is the means by which the client
- // restricts the set of offers to those that are intended for
- // withdrawal. ° If "constr" does not obey the syntax rules for a
- // constraint then an IllegalConstraint exception is raised. ° If
- // the constraint fails to match with any offer of the specified
- // service type, then a NoMatchingOffers exception is raised.
- // END SPEC
-
- virtual CosTrading::Register_ptr
- resolve (const CosTrading::TraderName &name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Register::IllegalTraderName,
- CosTrading::Register::UnknownTraderName,
- CosTrading::Register::RegisterNotSupported));
-
- // BEGIN SPEC
- // This operation is used to resolve a context relative name for
- // another trader. In particular, it is used when exporting to a
- // trader that is known by a name rather than by an object
- // reference. The client provides the name, which will be a sequence
- // of name components. ° If the content of the parameter cannot
- // yield legal syntax for the first component, then the
- // IllegalTraderName exception is raised. Otherwise, the first name
- // component is compared against the name held in each link. ° If no
- // match is found, or the trader does not support links, the
- // UnknownTraderName exception is raised. Otherwise, the trader
- // obtains the register_if held as part of the matched link. ° If
- // the Register interface is not nil, then the trader binds to the
- // Register interface and invokes resolve but passes the TraderName
- // with the first component removed; if it is nil, then the
- // RegisterNotSupported exception is raised. When a trader is able
- // to match the first name component leaving no residual name, that
- // trader returns the reference for the Register interface for that
- // linked trader. In unwinding the recursion, intermediate traders
- // return the Register interface reference to their client (another
- // trader).
- // END SPEC
-
- static const char* NAME;
-
-protected:
-
- typedef CosTradingRepos::ServiceTypeRepository::TypeStruct TYPE_STRUCT;
-
- void validate_properties (const char* type,
- TYPE_STRUCT* type_struct,
- CosTrading::PropertySeq& properties,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::DuplicatePropertyName));
-
- // Type is a known service type.
-
- CORBA::Boolean find_property (CosTrading::PropertySeq &properties,
- const char *property_name,
- CORBA::ULong &position);
-
- private:
- TRADER &trader_;
-};
-
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Register.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* ACE_REGISTER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.cpp b/TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.cpp
deleted file mode 100644
index 4f9d4190b27..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Register_Offer_Iterator.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-// ============================================================================
-
-#if !defined (TAO_REGISTER_OFFER_ITERATOR_C)
-#define TAO_REGISTER_OFFER_ITERATOR_C
-
-#include "Register_Offer_Iterator.h"
-#include <iostream.h>
-
-#ifndef min
-#define min(a, b) ((a) > (b) ? (b) : (a))
-#endif
-
-template <class TRADER>
-TAO_Register_Offer_Iterator<TRADER>::
-TAO_Register_Offer_Iterator (TRADER &trader,
- const TAO_Property_Filter& pfilter)
- : TAO_Offer_Iterator (pfilter),
- trader_ (trader)
-{
-}
-
-template <class TRADER>
-TAO_Register_Offer_Iterator<TRADER>::~TAO_Register_Offer_Iterator (void)
-{
-}
-
-template <class TRADER> void
-TAO_Register_Offer_Iterator<TRADER>::add_offer (CosTrading::OfferId id,
- CosTrading::Offer* offer)
-{
- this->offer_ids_.push_back (id);
-}
-
-template <class TRADER> CORBA::ULong
-TAO_Register_Offer_Iterator<TRADER>::max_left (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft))
-{
- return this->offer_ids_.size ();
-}
-
-template <class TRADER> CORBA::Boolean
-TAO_Register_Offer_Iterator<TRADER>::next_n (CORBA::ULong n,
- OfferSeq_out offers,
- CORBA::Environment& _env)
- TAO_THROW_SPEC (CORBA::SystemException)
-{
- offers = new CosTrading::OfferSeq;
-
- CORBA::ULong ret_offers = 0;
-
- // Get service type map (monitor object).
- TRADER::SERVICE_TYPE_MAP &service_type_map =
- this->trader_.service_type_map ();
-
- CORBA::ULong max_possible_offers_in_sequence =
- min(n, this->offer_ids_.size ());
- offers->length (max_possible_offers_in_sequence);
-
- // While there are entries left and we haven't filled <offers>
- // with requested number.
- while (! this->offer_ids_.empty ()
- && n > ret_offers)
- {
- // If offer is found, put it into the sequence.
- // remove this id irrespective of whether the offer is found
- // or not.
- CosTrading::OfferId_var id = this->offer_ids_.front ();
-
- TAO_TRY
- {
- CosTrading::Offer* offer =
- service_type_map.lookup_offer (id, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (offer != 0)
- {
- CosTrading::Offer& destination = (*offers)[ret_offers++];
- this->pfilter_.filter_offer (*offer, destination);
- }
- }
- TAO_CATCHANY {}
- TAO_ENDTRY;
-
- this->offer_ids_.pop_front ();
- }
-
- // Reset the length to the correct value
- offers->length (ret_offers);
-
- return (CORBA::Boolean)(ret_offers != 0);
-}
-
-#endif /* TAO_REGISTER_OFFER_ITERATOR_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.h b/TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.h
deleted file mode 100644
index 133a771ab35..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Register_Offer_Iterator.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Register_Offer_Iterator.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_REGISTER_OFFER_ITERATOR_H
-#define TAO_REGISTER_OFFER_ITERATOR_H
-
-#include "Offer_Iterator.h"
-#include <deque>
-
-template <class TRADER>
-class TAO_Register_Offer_Iterator : public TAO_Offer_Iterator
- // = TITLE
- // An implementation of CosTrading::OfferIterator IDL interface
- // appropriate when trader has Register functionality.
- //
- // = DESCRIPTION
- // Stores ids of offers to be iterated over. Before returning
- // an offer, checks if the offer is still there (since it may
- // have been removed by the Register).
-{
-public:
-
- // = Initialization and termination methods.
-
- TAO_Register_Offer_Iterator (TRADER &trader,
- const TAO_Property_Filter& pfilter);
- // Takes service type and trader reference in order to
- // later locate offers using their ids.
-
- virtual ~TAO_Register_Offer_Iterator (void);
- // destructor.
-
- virtual CORBA::Boolean next_n (CORBA::ULong n,
- CosTrading::OfferSeq_out offers,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException));
- // Deposit at maximum n offers into the return sequence and return 1,
- // or return 0 if the iterator is done and no offers are returned.
-
- virtual CORBA::ULong max_left (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::UnknownMaxLeft));
- // Throws CosTrading::UnknownMaxLeft since with the presence of
- // "Register" functionality, the iterator cannot guarantee that
- // the trader will have all the offers it has now when the time
- // to return them comes.
-
- void add_offer (CosTrading::OfferId id,
- CosTrading::Offer* offer);
- // Add an offer the iterator should iterate over.
-
-private:
-
- TRADER &trader_;
- // A reference to the trader is needed for access to the map of offers.
-
- deque <CosTrading::OfferId_var> offer_ids_;
- // Offer ids of offers to iterate over.
-};
-
-
-#if defined (TAO_TEMPLATES_REQUIRE_SOURCE)
-#include "Register_Offer_Iterator.cpp"
-#endif /* TAO_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_REGISTER_OFFER_ITERATOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.cpp b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.cpp
deleted file mode 100644
index d77e3656703..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-// $Id$
-#ifndef TAO_SERVICE_TYPE_MAP_C
-#define TAO_SERVICE_TYPE_MAP_C
-
-#include "Service_Type_Map.h"
-#include "Offer_Id_Iterator.h"
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::TAO_Service_Type_Map (void)
-{
-}
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator*
-TAO_Service_Type_Map<LOCK_TYPE>::get_offers (const char* type)
-{
- // Construct a Local_Offer_Iterator
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), 0);
-
- Local_Offer_Iterator* iterator = 0;
- string service_type (type);
- SERVICE_TYPE_MAP::iterator type_iter =
- this->type_map_.find (service_type);
-
- if (type_iter != this->type_map_.end ())
- {
- iterator = new Local_Offer_Iterator (type,
- this->type_map_,
- (*type_iter).second.first);
- }
-
- return iterator;
-}
-
-template <class LOCK_TYPE> int
-TAO_Service_Type_Map<LOCK_TYPE>::add_type (const char* type)
-{
- ACE_WRITE_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), -1);
-
- int return_value = -1;
- string service_type (type);
- SERVICE_TYPE_MAP::iterator type_iter =
- this->type_map_.find (service_type);
-
- if (type_iter == this->type_map_.end ())
- {
- OFFER_MAP offer_map;
- SERVICE_TYPE_MAP::value_type
- new_entry (service_type, make_pair (offer_map, 1));
-
- if (! (this->type_map_.insert (new_entry)).second)
- return_value = 0;
- }
-
- return return_value;
-}
-
-template <class LOCK_TYPE> int
-TAO_Service_Type_Map<LOCK_TYPE>::remove_type (const char* type)
-{
- ACE_WRITE_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), -1);
-
- int return_value = -1;
- string service_type (type);
- SERVICE_TYPE_MAP::iterator type_iter =
- this->type_map_.find (service_type);
-
- if (type_iter != this->type_map_.end ())
- {
- this->type_map_.erase (type_iter);
- return_value = 0;
- }
-
- return return_value;
-}
-
-template <class LOCK_TYPE> char*
-TAO_Service_Type_Map<LOCK_TYPE>::
-insert_offer (const char* type,
- const CosTrading::Offer& offer)
-{
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), 0);
-
- char* return_value = 0;
- string service_type (type);
- SERVICE_TYPE_MAP::iterator type_iter =
- this->type_map_.find (service_type);
-
- if (type_iter != this->type_map_.end ())
- {
- // If type is found, insert the offer
- OFFER_MAP_PLUS_COUNTER& mc = (*type_iter).second;
- OFFER_MAP &offer_map = mc.first;
- HUGE_NUMBER& starting_number = mc.second;
-
- ACE_WRITE_GUARD_RETURN (LOCK_TYPE, ace_mon, offer_map.lock (), 0);
-
- return_value = this->generate_offer_id (type, starting_number);
- offer_map[starting_number++] = offer;
- }
-
- return return_value;
-}
-
-template <class LOCK_TYPE> int
-TAO_Service_Type_Map<LOCK_TYPE>::
-remove_offer (const char* type, HUGE_NUMBER id)
-{
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), -1);
-
- int return_value = -1;
- SERVICE_TYPE_MAP::iterator type_iter;
-
- type_iter = this->type_map_.find (string (type));
-
- if (type_iter != this->type_map_.end ())
- {
- OFFER_MAP::iterator offer_iter;
- OFFER_MAP_PLUS_COUNTER& mc = (*type_iter).second;
- OFFER_MAP &offer_map = mc.first;
-
- ACE_WRITE_GUARD_RETURN (LOCK_TYPE, ace_mon, offer_map.lock (), -1);
-
- offer_iter = offer_map.find (id);
- if (offer_iter != offer_map.end ())
- {
- offer_map.erase (offer_iter);
- return_value = 0;
- }
- }
-
- return return_value;
-}
-
-template <class LOCK_TYPE> int
-TAO_Service_Type_Map<LOCK_TYPE>::
-remove_offer (const CosTrading::OfferId offer_id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId))
-{
- char* stype = 0;
- HUGE_NUMBER index = -1;
-
- this->parse_offer_id (offer_id, stype, index, _env);
- TAO_CHECK_ENV_RETURN (_env, -1);
-
- if (this->remove_offer (stype, index) == -1)
- TAO_THROW_RETURN (CosTrading::UnknownOfferId (offer_id), -1);
-
- return 0;
-}
-
-template <class LOCK_TYPE> CosTrading::Offer*
-TAO_Service_Type_Map<LOCK_TYPE>::
-lookup_offer (const CosTrading::OfferId offer_id,
- char*& type_name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId))
-{
- HUGE_NUMBER index;
- CosTrading::Offer* offer = 0;
- this->parse_offer_id (offer_id, type_name, index, _env);
- TAO_CHECK_ENV_RETURN (_env, offer);
-
- if ((offer = this->lookup_offer (type_name, index)) == 0)
- TAO_THROW_RETURN (CosTrading::UnknownOfferId (offer_id), offer);
-
- return offer;
-}
-
-
-template <class LOCK_TYPE> CosTrading::Offer*
-TAO_Service_Type_Map<LOCK_TYPE>::
-lookup_offer (const CosTrading::OfferId offer_id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId))
-{
- char* type_name;
- HUGE_NUMBER index;
- CosTrading::Offer* offer = 0;
-
- this->parse_offer_id (offer_id, type_name, index, _env);
- TAO_CHECK_ENV_RETURN (_env, offer);
-
- if ((offer = this->lookup_offer (type_name, index)) == 0)
- TAO_THROW_RETURN (CosTrading::UnknownOfferId (offer_id), offer);
-
- return offer;
-}
-
-template <class LOCK_TYPE> CosTrading::Offer*
-TAO_Service_Type_Map<LOCK_TYPE>::
-lookup_offer (const char* type, HUGE_NUMBER id)
-{
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), 0);
-
- CosTrading::Offer* return_value = 0;
- SERVICE_TYPE_MAP::iterator type_iter =
- this->type_map_.find (string (type));
-
- if (type_iter != this->type_map_.end ())
- {
- OFFER_MAP::iterator offer_iter;
- OFFER_MAP_PLUS_COUNTER& mc = (*type_iter).second;
- OFFER_MAP &offer_map = mc.first;
-
- offer_iter = offer_map.find (id);
- if (offer_iter != offer_map.end ())
- return_value = &((*offer_iter).second);
- }
-
- return return_value;
-}
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::Random_Offer_Locator*
-TAO_Service_Type_Map<LOCK_TYPE>::lookup_offers (const char* type)
-{
- // Construct a Random_Offer_Locator.
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), 0);
-
- Random_Offer_Locator* iterator = 0;
- string service_type (type);
- SERVICE_TYPE_MAP::iterator type_iter =
- this->type_map_.find (service_type);
-
- if (type_iter != this->type_map_.end ())
- {
- iterator = new Random_Offer_Locator (this->type_map_,
- (*type_iter).second.first);
- }
-
- return iterator;
-}
-
-template <class LOCK_TYPE> TAO_Offer_Id_Iterator*
-TAO_Service_Type_Map<LOCK_TYPE>::retrieve_all_offer_ids (void)
-{
- // Fill an TAO_Offer_Id_Iterator with the offer_ids of all offers
- // exported to the TAO_Service_Type_Map. Iterates through the entire
- // map, cramming offer_id strings into a newly constructed
- // TAO_Offer_Id_Iterator.
- TAO_Offer_Id_Iterator* id_iterator = new TAO_Offer_Id_Iterator ();
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), 0);
-
- for (SERVICE_TYPE_MAP::iterator type_iter = this->type_map_.begin ();
- type_iter != this->type_map_.end ();
- type_iter++)
- {
- char* service_type = (char *) (*type_iter).first.data ();
- OFFER_MAP& offer_map = (*type_iter).second.first;
-
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, offer_map.lock (), 0);
-
- for (OFFER_MAP::iterator offer_iter = offer_map.begin();
- offer_iter != offer_map.end();
- offer_iter++)
- {
- HUGE_NUMBER offer_index = (*offer_iter).first;
- CosTrading::OfferId_var offer_id =
- this->generate_offer_id (service_type, offer_index);
-
- id_iterator->insert_id (offer_id);
- }
- }
-
- return id_iterator;
-}
-
-template <class LOCK_TYPE> TAO_Service_Type_Map<LOCK_TYPE>::TYPE_NAME_SEQ*
-TAO_Service_Type_Map<LOCK_TYPE>::list_all_types (void)
-{
- ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, this->type_map_.lock (), 0);
-
- CORBA::ULong i = 0;
- TYPE_NAME* type_names = TYPE_NAME_SEQ::allocbuf (this->type_map_.size ());
-
- for (SERVICE_TYPE_MAP::iterator type_iter = this->type_map_.begin ();
- type_iter != this->type_map_.end ();
- type_iter++)
- type_names[i++] = CORBA::string_dup ((*type_iter).first.data ());
-
- return new TYPE_NAME_SEQ (i, i, type_names, 1);
-}
-
-template <class LOCK_TYPE> void
-TAO_Service_Type_Map<LOCK_TYPE>::parse_offer_id (const char *offer_id,
- char*&service_type,
- HUGE_NUMBER& id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId))
-{
- // Get service type: it is everything from 17th character to the end.
- service_type = (char *) offer_id + 16;
-
- // Get id: temporarily put the end of string character where the service
- // type starts, convert to number, replace the character back.
- char &start_of_type = (char) *(offer_id + 16);
- char temp = start_of_type;
- start_of_type = '\0';
- id = ACE_OS::atoi (offer_id);
-
- start_of_type = temp;
-
- if (! TAO_Trader_Base::is_valid_identifier_name (service_type))
- TAO_THROW (CosTrading::IllegalOfferId (offer_id));
-}
-
-template <class LOCK_TYPE> char*
-TAO_Service_Type_Map<LOCK_TYPE>::
-generate_offer_id (const char *service_type_name,
- HUGE_NUMBER id)
-{
- // holds final id string.
- string offer_id;
-
- // hold portions of id string.
- char id_string[16];
- char padding [16];
-
- ACE_OS::sprintf(id_string, "%d", id);
-
- size_t padding_size = 16 - ACE_OS::strlen (id_string);
- // Fill padding with zeros.
- for (int i = 0; i < padding_size; i++)
- padding[i] = '0';
- padding[padding_size] = '\0';
-
- offer_id += padding;
- offer_id += id_string;
- offer_id += service_type_name;
-
- return CORBA::string_dup (offer_id.data ());
-}
-
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator::
-Local_Offer_Iterator (const char* type,
- TAO_Service_Type_Map<LOCK_TYPE>::SERVICE_TYPE_MAP& stm,
- TAO_Service_Type_Map<LOCK_TYPE>::OFFER_MAP& offer_map)
- : offer_map_ (offer_map),
- stm_ (stm),
- offer_iter_ (offer_map.begin ()),
- type_ (type)
-{
- if (this->stm_.lock ().acquire_read () == -1)
- ;
-
- if (this->offer_map_.lock ().acquire_read () == -1)
- ;
-}
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator::
-~Local_Offer_Iterator (void)
-{
- if (this->offer_map_.lock ().release () == -1)
- ;
-
- if (this->stm_.lock ().release () == -1)
- ;
-}
-
-template <class LOCK_TYPE> CosTrading::OfferId
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator::get_id (void)
-{
- return TAO_Service_Type_Map<LOCK_TYPE>::
- generate_offer_id (this->type_, (*this->offer_iter_).first);
-}
-
-template <class LOCK_TYPE> int
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator::
-has_more_offers (void)
-{
- return this->offer_iter_ != this->offer_map_.end ();
-}
-
-
-template <class LOCK_TYPE> CosTrading::Offer*
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator::
-get_offer (void)
-{
- return &(*this->offer_iter_).second;
-}
-
-template <class LOCK_TYPE> void
-TAO_Service_Type_Map<LOCK_TYPE>::Local_Offer_Iterator::
-next_offer (void)
-{
- this->offer_iter_++;
-}
-
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::Random_Offer_Locator::
-Random_Offer_Locator (TAO_Service_Type_Map<LOCK_TYPE>::SERVICE_TYPE_MAP& stm,
- TAO_Service_Type_Map<LOCK_TYPE>::OFFER_MAP& offer_map)
- : offer_map_ (offer_map),
- offer_iter_ (offer_map_.begin ()),
- stm_ (stm)
-{
- if (this->stm_.lock ().acquire_read () == -1)
- ;
-
- if (this->offer_map_.lock ().acquire_read () == -1)
- ;
-}
-
-template <class LOCK_TYPE>
-TAO_Service_Type_Map<LOCK_TYPE>::Random_Offer_Locator::
-~Random_Offer_Locator (void)
-{
- if (this->offer_map_.lock ().release () == -1)
- ;
-
- if (this->stm_.lock ().release () == -1)
- ;
-}
-
-template <class LOCK_TYPE> CosTrading::Offer*
-TAO_Service_Type_Map<LOCK_TYPE>::Random_Offer_Locator::
-get_offer (TAO_Service_Type_Map<LOCK_TYPE>::HUGE_NUMBER id)
-{
- CosTrading::Offer* return_value = 0;
-
- this->offer_iter_ = this->offer_map_.find (id);
- if (this->offer_iter_ != this->offer_map_.end ())
- return_value = &(*this->offer_iter_).second;
-
- return return_value;
-}
-
-#endif /* TAO_SERVICE_TYPE_MAP_C */
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.h b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.h
deleted file mode 100644
index c6b3cbd03b7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Map.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Service_Type_Map.h
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_SERVICE_TYPE_MAP_H
-#define TAO_SERVICE_TYPE_MAP_H
-
-#include "Trader.h"
-#include "Monitor.h"
-
-class TAO_Offer_Id_Iterator;
-
-template <class LOCK_TYPE>
-class TAO_Service_Type_Map
-// = DESCRIPTION
-// The TAO_Service_Type_Map encapsulates the mapping of service
-// types to those offers exported with that service types. The
-// underlying structure is a map of maps. The first maps maps the
-// service type name to a map of exported offers. The second map
-// maps the identifying index for that offer within the service
-// types. So a service type name and an index uniquely identifies an
-// exported offer. In fact, when the register export interface
-// returns a CosTrading::OfferId, it's returning no more than a
-// simple string concatenation of these two values. In addition to
-// all these wonderful things, the TAO_Service_Type_Map has built-in
-// locking, one reader/writer-style lock for modifying the top-level
-// map and a reader/writer-style for each of the offer
-// maps. Needless to say the locks are acquired when the
-// TAO_Service_Type_Map performs operations on the structures they
-// guard.
-//
-// NOTE: TAO_Service_Type_Map needs to be parameterized by a
-// READER/WRITER LOCK, a RECURSIVE MUTEX, or a NULL MUTEX, not a
-// simple binary mutex! Mutexes will cause deadlock when you try to
-// contruct an iterator (which acquires a read lock on the map under
-// an existing read lock). Just don't do it, ok?
-{
-public:
-
- typedef int HUGE_NUMBER;
- typedef map<HUGE_NUMBER, CosTrading::Offer, less<HUGE_NUMBER> > OFFERS;
- typedef TAO_Monitor<OFFERS, LOCK_TYPE> OFFER_MAP;
- typedef pair<OFFER_MAP, HUGE_NUMBER> OFFER_MAP_PLUS_COUNTER;
- typedef TAO_Monitor <map <string, OFFER_MAP_PLUS_COUNTER, less<string> >, LOCK_TYPE> SERVICE_TYPE_MAP;
-
- class Local_Offer_Iterator;
- class Random_Offer_Locator;
-
- TAO_Service_Type_Map (void);
- // No arg constructor.
-
- Local_Offer_Iterator* get_offers (const char* type);
- // Return an iterator for traversing the list of offers whose type
- // is <type>, or 0 if the type doesn't exist.
-
- int add_type (const char* type);
- // Add a new service type. Returns 0 on success (that is, the type
- // was found), -1 on failure (the type wasn't found).
-
- int remove_type (const char* type);
- // Remove a service type. returns 0 on success (the type was found
- // and removed), and -1 on failure (the type wasn't found).
-
- CosTrading::OfferId insert_offer (const char* type,
- const CosTrading::Offer& offer);
- // Add an offer of type <type> and generate a CosTrading::OfferId
- // for it. Returns 0 on failure.
-
- int remove_offer (const CosTrading::OfferId offer_id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId));
-
- int remove_offer (const char* type, HUGE_NUMBER id);
- // Remove an offers whose id is <offer_id>. Returns 0 on success, -1
- // on failure, and throws a CosTrading::IllegalOfferId if it can't
- // parse the CosTrading::OfferId.
-
-
- CosTrading::Offer* lookup_offer (const CosTrading::OfferId offer_id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId));
- // Lookup an offer whose offer_id is <offer_id>, and return
- // it. Otherwise, throw the appropriate exception.
-
- CosTrading::Offer* lookup_offer (const CosTrading::OfferId offer_id,
- char*& type_name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId));
- // Lookup an offer whose OfferId is <offer_id> and return in
- // <type_name> the type name of the object. Type name is just a
- // pointer to a location in offer_id, so DON'T DELETE IT.
-
- CosTrading::Offer* lookup_offer (const char* type, HUGE_NUMBER id);
- // Lookup an offer whose type is <type> and id, <id>. Return 0 on
- // failure.
-
- Random_Offer_Locator* lookup_offers (const char* type);
- // Return a random access iterator to the set of offers of type
- // <type>.
-
- TAO_Offer_Id_Iterator* retrieve_all_offer_ids (void);
- // Return an iterator that will traverse and return all the offer
- // ids in the service type map.
-
- typedef CosTrading::ServiceTypeName TYPE_NAME;
- typedef CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq TYPE_NAME_SEQ;
- TYPE_NAME_SEQ* list_all_types (void);
-
- class Local_Offer_Iterator
- // = TITLE
- // Local_Offer_Iterator iterates over the set of exported
- // offers for a given type. Handily, it takes care of all the
- // necessary locking, acquiring them in the constructor, and
- // releasing them in the destructor. Since Local_Offer_Iterator
- // is dynamically allocated by TAO_Offer_Id_Iterator, make sure
- // to EXPLICITLY CALL DELETE when you're done with it.
- {
- friend TAO_Service_Type_Map<LOCK_TYPE>;
- public:
-
- ~Local_Offer_Iterator (void);
- // Release all the locks acquired.
-
- int has_more_offers (void);
- // Returns 1 if there are more offers, 0 otherwise.
-
- CosTrading::OfferId get_id (void);
- // Get the id for the current offer.
-
- CosTrading::Offer* get_offer (void);
- // Returns the next offer in the series.
-
- void next_offer (void);
- // Advances the iterator 1.
-
- private:
-
- Local_Offer_Iterator (const char* type,
- SERVICE_TYPE_MAP& stm,
- OFFER_MAP& offer_map);
- // Protected constructor.
-
- OFFER_MAP& offer_map_;
- // The underlying map of offers.
-
- SERVICE_TYPE_MAP& stm_;
- // The top level map on which we're going to acquire a read lock.
-
- OFFER_MAP::iterator offer_iter_;
- //
-
- const char* type_;
- };
-
- class Random_Offer_Locator
- // = TITLE
- // Random_Offer_Locator locates offers in a set of exported
- // offers for a given type. Handily, it takes care of all the
- // necessary locking, acquiring them in the constructor, and
- // releasing them in the destructor. Since Random_Offer_Locator
- // is dynamically allocated by TAO_Offer_Id_Iterator, make sure
- // to EXPLICITLY CALL DELETE when you're done with it.
-
- {
- friend TAO_Service_Type_Map<LOCK_TYPE>;
- public:
-
- ~Random_Offer_Iterator (void);
- // Release all the read locks acquire by the constructor.
-
- CosTrading::Offer* get_offer (HUGE_NUMBER id);
- // Returns the offer in the series of id <id>
-
- private:
-
- Random_Offer_Locator (SERVICE_TYPE_MAP& stm,
- OFFER_MAP& offer_map);
-
- OFFER_MAP& offer_map_;
- SERVICE_TYPE_MAP& stm_;
- OFFER_MAP::iterator offer_iter_;
- };
-
- // Should be private:
-
- static char* generate_offer_id (const char *service_type_name,
- HUGE_NUMBER id);
- // Take in a service type name for the offer the current value of
- // of the counter and generate an offer id.
-
-private:
-
- static void parse_offer_id (const char *offer_id,
- char* &service_type,
- HUGE_NUMBER& id,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalOfferId));
- // Take in a previously generated offer id and return the type
- // and id that were used to generate the offer id.
-
- SERVICE_TYPE_MAP type_map_;
- // The protected data structure.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Service_Type_Map.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_SERVICE_TYPE_MAP_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
deleted file mode 100644
index 9635a6efe7a..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
+++ /dev/null
@@ -1,528 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Service_Type_Repository.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Locking.h"
-#include "Service_Type_Repository.h"
-
-TAO_Service_Type_Repository::
-TAO_Service_Type_Repository (ACE_Lock* lock)
- : lock_ (lock)
-{
- incarnation_.low = 0;
- incarnation_.high = 0;
-
- // If a lock wasn't provided, let's assume the user doesn't want any
- // kind of lock at all.
- if (this->lock_ == 0)
- ACE_NEW (this->lock_, ACE_Lock_Adapter<ACE_Null_Mutex> ());
-}
-
-
-TAO_Service_Type_Repository::
-~TAO_Service_Type_Repository (void)
-{
- delete this->lock_;
-}
-
-
-SERVICE_TYPE_REPOS::IncarnationNumber
-TAO_Service_Type_Repository::
-incarnation (CORBA::Environment& _env)
-{
- SERVICE_TYPE_REPOS::IncarnationNumber inc_num;
- TAO_READ_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, inc_num);
- return incarnation_;
-}
-
-
-SERVICE_TYPE_REPOS::IncarnationNumber
-TAO_Service_Type_Repository::
-add_type (const char * name,
- const char * if_name,
- const SERVICE_TYPE_REPOS::PropStructSeq& props,
- const SERVICE_TYPE_REPOS::ServiceTypeNameSeq& super_types,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- SERVICE_TYPE_REPOS::ServiceTypeExists,
- SERVICE_TYPE_REPOS::InterfaceTypeMismatch,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- SERVICE_TYPE_REPOS::ValueTypeRedefinition,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::DuplicateServiceTypeName))
-{
- PROP_MAP prop_map;
- SUPER_TYPE_MAP super_map;
- SERVICE_TYPE_REPOS::TypeStruct info;
- SERVICE_TYPE_MAP::iterator type_iterator;
- SERVICE_TYPE_REPOS::IncarnationNumber inc_num;
-
- TAO_WRITE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, inc_num);
-
- // make sure Type name is valid
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW_RETURN (CosTrading::IllegalServiceType (name),
- this->incarnation_);
-
- // check if the service type already exists.
- type_iterator = this->type_map_.find (name);
- if (type_iterator != this->type_map_.end ())
- TAO_THROW_RETURN (SERVICE_TYPE_REPOS::ServiceTypeExists (),
- this->incarnation_);
-
- // make sure all property names are valid and appear only once.
- this->validate_properties (props, prop_map, _env);
- TAO_CHECK_ENV_RETURN (_env, this->incarnation_);
-
- // check that all super_types exist, and none are duplicated.
- this->validate_supertypes (super_types, super_map, _env);
- TAO_CHECK_ENV_RETURN (_env, this->incarnation_);
-
- // NOTE: I don't really know a way to do this without an Interface
- // Repository, since the Interface Repository IDs don't contain
- // information about supertypes.
- //
- // make sure interface name is legal.
- // this->validate_interface (if_name, super_types, _env);
- // TAO_CHECK_ENV_RETURN(_env, this->incarnation);
- //
- // Instead, we do this:
- //
- if (if_name == 0)
- TAO_THROW_RETURN (SERVICE_TYPE_REPOS::InterfaceTypeMismatch (),
- this->incarnation_);
-
- // collect and make sure that properties of all supertypes and this type
- // are compatible. We can use prop_map and super_types_map for the job.
- this->validate_inheritance (prop_map, super_map, _env);
- TAO_CHECK_ENV_RETURN (_env, this->incarnation_);
-
- // we can now use prop_map to construct a sequence of all properties the
- // this type.
- info.if_name = if_name;
- info.props = props;
- info.super_types = super_types;
- info.masked = 0;
- info.incarnation = this->incarnation_;
- this->update_type_map (name, info, prop_map, super_map);
-
- // increment incarnation number
- this->incarnation_.low++;
- // if we wrapped around in lows...
- if (this->incarnation_.low == 0)
- this->incarnation_.high++;
-
- return this->type_map_[name].type_info_.incarnation;
-}
-
-
-void
-TAO_Service_Type_Repository::
-remove_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::HasSubTypes))
-{
- ACE_DEBUG ((LM_DEBUG, "TAO_Service_Type_Repository::remove_type (%s)\n",
- name));
-
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW (CosTrading::IllegalServiceType (name));
-
- TAO_WRITE_GUARD (ACE_Lock, ace_mon, *this->lock_);
-
- // check if the type exists.
- SERVICE_TYPE_MAP::iterator type_iterator = this->type_map_.find (name);
- if (type_iterator == this->type_map_.end ())
- TAO_THROW (CosTrading::UnknownServiceType (name));
-
- // check if has any subtypes.
- Type_Info& type_info = (*type_iterator).second;
- if (type_info.sub_types_.empty () == 0)
- {
- const char* type_name = type_info.sub_types_.front ().data ();
- TAO_THROW (SERVICE_TYPE_REPOS::HasSubTypes (name, type_name));
- }
-
- // remove this type from an entry of each of its supertypes.
- SERVICE_TYPE_REPOS::ServiceTypeNameSeq &super =
- type_info.type_info_.super_types;
-
- for (CORBA::ULong i = 0; i < super.length (); i++)
- {
- // find the super type
- const char *n = super[i];
- SERVICE_TYPE_MAP::iterator super_iterator = this->type_map_.find (n);
-
- // remove this type from its list of subtypes
- (*super_iterator).second.sub_types_.remove (name);
- }
-
- // remove the type from the map.
- this->type_map_.erase (type_iterator);
-}
-
-
-SERVICE_TYPE_REPOS::ServiceTypeNameSeq*
-TAO_Service_Type_Repository::
-list_types (const SERVICE_TYPE_REPOS::SpecifiedServiceTypes& which_types,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_READ_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->lock_,
- (SERVICE_TYPE_REPOS::ServiceTypeNameSeq*) 0);
-
- SERVICE_TYPE_REPOS::ServiceTypeNameSeq_ptr result =
- new SERVICE_TYPE_REPOS::ServiceTypeNameSeq ();
-
- CORBA::ULong i = 0;
-
- if (which_types._d () == SERVICE_TYPE_REPOS::all)
- {
- result->length (this->type_map_.size ());
- for (SERVICE_TYPE_MAP::iterator itr = this->type_map_.begin ();
- itr != this->type_map_.end ();
- itr++, i++)
- (*result)[i] = CORBA::string_dup ((*itr).first.c_str ());
- }
- else
- {
- SERVICE_TYPE_REPOS::IncarnationNumber num =
- which_types.incarnation ();
-
- if (num > incarnation_)
- result->length (0);
- else
- result->length (this->type_map_.size ());
-
- for (SERVICE_TYPE_MAP::iterator itr = this->type_map_.begin ();
- itr != this->type_map_.end ();
- itr++, i++)
- {
- if (num < (*itr).second.type_info_.incarnation)
- (*result)[i] = CORBA::string_dup ((*itr).first.c_str ());
- }
-
- result->length (i);
- }
-
- return result;
-}
-
-
-
-SERVICE_TYPE_REPOS::TypeStruct*
-TAO_Service_Type_Repository::
-describe_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType))
-{
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW_RETURN (CosTrading::IllegalServiceType (name),
- (SERVICE_TYPE_REPOS::TypeStruct*) 0);
-
- TAO_READ_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->lock_,
- (SERVICE_TYPE_REPOS::TypeStruct*) 0);
-
- // make sure the type exists.
- SERVICE_TYPE_MAP::iterator type_iterator = this->type_map_.find (name);
- if (type_iterator == this->type_map_.end ())
- TAO_THROW_RETURN (CosTrading::UnknownServiceType (name),
- (SERVICE_TYPE_REPOS::TypeStruct*) 0);
-
- // return appropriate information about the type.
- SERVICE_TYPE_REPOS::TypeStruct* descr = new SERVICE_TYPE_REPOS::TypeStruct;
- SERVICE_TYPE_REPOS::TypeStruct & s = (*type_iterator).second.type_info_;
-
- (*descr) = s;
-
- return descr;
-}
-
-
-SERVICE_TYPE_REPOS::TypeStruct*
-TAO_Service_Type_Repository::
-fully_describe_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType))
-{
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW_RETURN (CosTrading::IllegalServiceType (name),
- (SERVICE_TYPE_REPOS::TypeStruct*) 0);
-
- TAO_READ_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->lock_,
- (SERVICE_TYPE_REPOS::TypeStruct*) 0);
-
- // make sure the type exists.
- SERVICE_TYPE_MAP::iterator type_iterator = this->type_map_.find (name);
- if (type_iterator == this->type_map_.end ())
- TAO_THROW_RETURN (CosTrading::UnknownServiceType (name),
- (SERVICE_TYPE_REPOS::TypeStruct*) 0);
-
- // return appropriate information about the type.
- SERVICE_TYPE_REPOS::TypeStruct* descr =
- new SERVICE_TYPE_REPOS::TypeStruct;
- SERVICE_TYPE_REPOS::TypeStruct & s =
- (*type_iterator).second.type_info_;
-
- // We do the explicit copy, since otherwise we'd have excessive
- // properties copying.
- descr->if_name = s.if_name;
- descr->props = (*type_iterator).second.all_prop_;
- descr->super_types = s.super_types;
- descr->masked = s.masked;
- descr->incarnation = s.incarnation;
-
- return descr;
-}
-
-
-void
-TAO_Service_Type_Repository::
-mask_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::AlreadyMasked))
-{
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW (CosTrading::IllegalServiceType (name));
-
- TAO_WRITE_GUARD (ACE_Lock, ace_mon, *this->lock_);
-
- // make sure the type exists.
- SERVICE_TYPE_MAP::iterator type_iterator = this->type_map_.find (name);
- if (type_iterator == this->type_map_.end ())
- TAO_THROW (CosTrading::UnknownServiceType (name));
-
- // make sure the type is unmasked.
- CORBA::Boolean & mask = (*type_iterator).second.type_info_.masked;
- if (mask == 1)
- TAO_THROW (SERVICE_TYPE_REPOS::AlreadyMasked (name));
- // mask.
- else
- mask = 1;
-}
-
-
-void
-TAO_Service_Type_Repository::
-unmask_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::NotMasked))
-{
- if (! TAO_Trader_Base::is_valid_identifier_name (name))
- TAO_THROW (CosTrading::IllegalServiceType (name));
-
- TAO_WRITE_GUARD (ACE_Lock, ace_mon, *this->lock_);
-
- // make sure the type exists.
- SERVICE_TYPE_MAP::iterator type_iterator = this->type_map_.find (name);
- if (type_iterator == this->type_map_.end ())
- TAO_THROW (CosTrading::UnknownServiceType (name));
-
- // make sure the type is masked.
- CORBA::Boolean & mask = (*type_iterator).second.type_info_.masked;
- if (mask == 0)
- TAO_THROW (SERVICE_TYPE_REPOS::NotMasked (name));
- // unmask.
- else
- mask = 0;
-}
-
- void
-TAO_Service_Type_Repository::
-validate_properties (const SERVICE_TYPE_REPOS::PropStructSeq& props,
- PROP_MAP& prop_map,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName))
-{
- for (CORBA::ULong i = 0; i < props.length (); i++)
- {
- const char* n = props[i].name;
- if (! TAO_Trader_Base::is_valid_identifier_name (n))
- TAO_THROW (CosTrading::IllegalPropertyName (n));
- else
- {
- string prop_name (n);
- SERVICE_TYPE_REPOS::PropStruct* prop_struct =
- (SERVICE_TYPE_REPOS::PropStruct *) &props[i];
-
- if (! prop_map.insert
- (make_pair (prop_name, prop_struct)).second)
- TAO_THROW (CosTrading::DuplicatePropertyName (n));
- }
- }
-}
-
- void
-TAO_Service_Type_Repository::
-validate_supertypes (const SERVICE_TYPE_REPOS::ServiceTypeNameSeq& super_types,
- SUPER_TYPE_MAP& super_map,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::DuplicatePropertyName))
-{
- for (CORBA::ULong i = 0; i < super_types.length (); i++)
- {
- char* type = (char*)((const char*)super_types[i]);
-
- if (! TAO_Trader_Base::is_valid_identifier_name (type))
- TAO_THROW (CosTrading::IllegalServiceType (type));
- else
- {
- string s_type (type);
- SERVICE_TYPE_MAP::iterator super_iter =
- this->type_map_.find (s_type);
-
- if (super_iter == this->type_map_.end ())
- TAO_THROW (CosTrading::UnknownServiceType (type));
- else
- if (! super_map.insert (make_pair (s_type, super_iter)).second)
- TAO_THROW (SERVICE_TYPE_REPOS::DuplicateServiceTypeName (type));
- }
- }
-}
-
-void
-TAO_Service_Type_Repository
-::validate_inheritance (PROP_MAP& prop_map,
- SUPER_TYPE_MAP& super_map,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((SERVICE_TYPE_REPOS::ValueTypeRedefinition))
-{
- SERVICE_TYPE_REPOS::PropertyMode mode;
- // for each super_type
- for (SUPER_TYPE_MAP::iterator super_map_iterator = super_map.begin ();
- super_map_iterator != super_map.end ();
- super_map_iterator++)
- {
- SERVICE_TYPE_MAP::iterator super_iter = (*super_map_iterator).second;
-
- // for each property in a super_type
- for (int i = 0; i < (*super_iter).second.all_prop_.length (); i++)
- {
- SERVICE_TYPE_REPOS::PropStruct& property =
- (*super_iter).second.all_prop_[i];
-
- // insert property into the map.
- string prop_name = (const char*) property.name;
- if (prop_map.insert (prop_name, &property).second == 0)
- {
- // if already there, check that it is compatible with
- // properties of other types. Value Types have to be the
- // same.
- SERVICE_TYPE_REPOS::PropStruct& property_in_map =
- *(prop_map[prop_name]);
-
- if (! property.value_type->equal (property_in_map.value_type, _env))
- {
- TAO_THROW (SERVICE_TYPE_REPOS::ValueTypeRedefinition
- (property.name, property,
- property_in_map.name, property_in_map));
- }
-
- // Mode of the parent type has to be the same or less
- // restrictive.
- if (property.mode >= property_in_map.mode)
- {
- TAO_THROW (SERVICE_TYPE_REPOS::ValueTypeRedefinition
- (property.name, property,
- property_in_map.name, property_in_map));
- }
- }
- }
- }
-}
-
-void
-TAO_Service_Type_Repository::
-update_type_map (const char* name,
- SERVICE_TYPE_REPOS::TypeStruct& info,
- PROP_MAP& prop_map,
- SUPER_TYPE_MAP& super_map)
-{
- Type_Info type;
- SERVICE_TYPE_REPOS::PropStructSeq all_prop;
-
- CORBA::ULong i = 0;
- all_prop.length (prop_map.size ());
- for (PROP_MAP::iterator prop_map_iterator = prop_map.begin ();
- prop_map_iterator != prop_map.end ();
- prop_map_iterator++, i++)
- {
- all_prop[i] = *((*prop_map_iterator).second);
- }
-
- // update entries for all supertypes to include this type as a subtype.
- // we can use the super_types_map we have constructed.
-
- for (SUPER_TYPE_MAP::iterator super_map_iterator = super_map.begin ();
- super_map_iterator != super_map.end ();
- super_map_iterator++)
- {
- SERVICE_TYPE_MAP::iterator super_iter = (*super_map_iterator).second;
- (*super_iter).second.sub_types_.push_back (name);
- }
-
- // all parameters are valid, create an entry for this service type
- // in the this->type_map_.
- type.type_info_ = info;
- type.all_prop_ = all_prop;
- this->type_map_[name] = type;
-
-}
-
-int
-operator< (const SERVICE_TYPE_REPOS::IncarnationNumber &l,
- const SERVICE_TYPE_REPOS::IncarnationNumber &r)
-{
- if (l.high < r.high)
- return 1;
- else if (l.high == r.high)
- return (l.low < r.low);
- else
- return 0;
-}
-
-
-int
-operator> (const SERVICE_TYPE_REPOS::IncarnationNumber &l,
- const SERVICE_TYPE_REPOS::IncarnationNumber &r)
-{
- return (r < l);
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h
deleted file mode 100644
index 6c184a32edd..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Service_Type_Repository.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_SERVICE_TYPE_REPOSITORY_H
-#define TAO_SERVICE_TYPE_REPOSITORY_H
-
-#include <list>
-#include "Trader.h"
-#include "Monitor.h"
-
-typedef CosTradingRepos::ServiceTypeRepository SERVICE_TYPE_REPOS;
-
-class TAO_Service_Type_Repository :
- public POA_CosTradingRepos::ServiceTypeRepository
- //
- // = TITLE
- // This class implements CosTradingRepos::ServiceTypeRepository
- // IDL interface.
-{
-public:
-
- TAO_Service_Type_Repository (ACE_Lock* lock = 0);
- // Parameterize the Service_Type_Repository with a lock to serialize
- // access to the type repository map. A reader/writer lock is
- // probably best. The Service_Type_Repository assumes control of the
- // lock.
-
- ~TAO_Service_Type_Repository (void);
-
- virtual SERVICE_TYPE_REPOS::IncarnationNumber
- incarnation (CORBA::Environment& _env);
-
- virtual SERVICE_TYPE_REPOS::IncarnationNumber
- add_type (const char * name,
- const char * if_name,
- const SERVICE_TYPE_REPOS::PropStructSeq& props,
- const SERVICE_TYPE_REPOS::ServiceTypeNameSeq& super_types,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- SERVICE_TYPE_REPOS::ServiceTypeExists,
- SERVICE_TYPE_REPOS::InterfaceTypeMismatch,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- SERVICE_TYPE_REPOS::ValueTypeRedefinition,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::DuplicateServiceTypeName));
-
- // BEGIN SPEC
- // The add_type operation enables the creation of new service types
- // in the service type repository. The caller supplies the "name"
- // for the new type, the identifier for the interface associated
- // with instances of this service type, the properties definitions
- // for this service type, and the service type names of the
- // immediate super-types to this service type.
-
- // If the type creation is successful, an incarnation number is
- // returned as the value of the operation. Incarnation numbers are
- // opaque values that are assigned to each modification to the
- // repository's state. An incarnation number can be quoted when
- // invoking the list_types operation to retrieve all changes to the
- // service repository since a particular logical time. (Note:
- // IncarnationNumber is currently declared as a struct consisting of
- // two unsigned longs; what we really want here is an unsigned hyper
- // [64-bit integer]. A future revision task force should modify this
- // when CORBA systems support IDL 64-bit integers.)
-
- // If the "name" parameter is malformed, then the
- // CosTrading::IllegalServiceType exception is raised. ° If the type
- // already exists, then the ServiceTypeExists exception is raised. °
- // If the "if_name" parameter is not a sub-type of the interface
- // associated with a service type from which this service type is
- // derived, such that substitutability would be violated, then the
- // InterfaceTypeMismatch exception is raised. ° If a property name
- // supplied in the "props" parameter is malformed, the
- // CosTrading::IllegalPropertyName exception is raised. ° If the
- // same property name appears two or more times in the "props"
- // parameter, the CosTrading::DuplicatePropertyName exception is
- // raised. ° If a property value type associated with this service
- // type illegally modifies the value type of a super-type's
- // property, or if two super-types incompatibly declare value types
- // for the same property name, then the ValueTypeRedefinition
- // exception is raised. ° If one of the ServiceTypeNames in
- // "super_types" is malformed, then the
- // CosTrading::IllegalServiceType exception is raised. If one of the
- // ServiceTypeNames in "super_types" does not exist, then the
- // CosTrading::UnknownServiceType exception is raised. ° If the same
- // service type name is included two or more times in this
- // parameter, the DuplicateServiceTypeName exception is raised.
- // END SPEC
-
-
- virtual void remove_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::HasSubTypes));
-
- // BEGIN SPEC
- // The remove_type operation removes the named type from the service
- // type repository. ° If "name" is malformed, then the
- // CosTrading::IllegalServiceType exception is raised. ° If "name"
- // does not exist within the repository, then the
- // CosTrading::UnknownServiceType exception is raised. ° If "name"
- // has a service type which has been derived from it, then the
- // HasSubTypes exception is raised.
- // END SPEC
-
- virtual SERVICE_TYPE_REPOS::ServiceTypeNameSeq*
- list_types (const SERVICE_TYPE_REPOS::SpecifiedServiceTypes& which_types,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- // BEGIN SPEC
- // The list_types operation permits a client to obtain the names of
- // service types which are in the repository. The "which_types"
- // parameter permits the client to specify one of two possible
- // values: ° all types known to the repository ° all types
- // added/modified since a particular incarnation number The names of
- // the requested types are returned by the operation for subsequent
- // querying via the describe_type or the fully_describe_type
- // operation.
- // END SPEC
-
- virtual SERVICE_TYPE_REPOS::TypeStruct*
- describe_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType));
- // BEGIN SPEC
- // The describe_type operation permits a client to obtain the
- // details for a particular service type. ° If "name" is malformed,
- // then the CosTrading::IllegalServiceType exception is raised. ° If
- // "name" does not exist within the repository, then the
- // CosTrading::UnknownServiceType exception is raised.
- // END SPEC
-
- virtual SERVICE_TYPE_REPOS::TypeStruct*
- fully_describe_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType));
- // BEGIN SPEC
- // The fully_describe_type operation permits a client to obtain the
- // details for a particular service type. The property sequence
- // returned in the TypeStruct includes all properties inherited from
- // the transitive closure of its super types; the sequence of super
- // types in the TypeStruct contains the names of the types in the
- // transitive closure of the super type relation. ° If "name" is
- // malformed, then the CosTrading::IllegalServiceType exception is
- // raised. ° If "name" does not exist within the repository, then
- // the CosTrading::UnknownServiceType exception is raised.
- // END SPEC
-
- virtual void mask_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::AlreadyMasked));
- // BEGIN SPEC
- // The mask_type operation permits the deprecation of a particular
- // type (i.e., after being masked, exporters will no longer be able
- // to advertise offers of that particular type). The type continues
- // to exist in the service repository due to other service types
- // being derived from it. ° If "name" is malformed, then the
- // CosTrading::IllegalServiceType exception is raised. ° If "name"
- // does not exist within the repository, then the
- // CosTrading::UnknownServiceType exception is raised. ° If the type
- // is currently in the masked state, then the AlreadyMasked
- // exception is raised.
- // END SPEC
-
- virtual void unmask_type (const char * name,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- SERVICE_TYPE_REPOS::NotMasked));
- // BEGIN SPEC
- // The unmask_type undeprecates a type (i.e., after being unmasked,
- // exporters will be able to resume advertisement of offers of that
- // particular type). ° If "name" is malformed, then the
- // CosTrading::IllegalServiceType exception is raised. ° If "name"
- // does not exist within the repository, then the
- // CosTrading::UnknownServiceType exception is raised. ° If the type
- // is not currently in the masked state, then the NotMasked
- // exception is raised.
- // END SPEC
-
-private:
-
- struct Type_Info {
- // storage structure for information pertinent to the type.
-
- typedef list<string> TYPE_LIST;
-
- SERVICE_TYPE_REPOS::TypeStruct type_info_;
- // standard type info.
-
- SERVICE_TYPE_REPOS::PropStructSeq all_prop_;
- // complete listing of the type's properties (including inherited).
-
- TYPE_LIST sub_types_;
- // names of subtypes.
- };
-
- typedef map< string, Type_Info, less <string> > SERVICE_TYPE_MAP;
- typedef SERVICE_TYPE_MAP::iterator SERVICE_TYPE_ITERATOR;
-
- typedef map
- <
- string,
- SERVICE_TYPE_REPOS::PropStruct*,
- less < string >
- > PROP_MAP;
-
- typedef map
- <
- string,
- SERVICE_TYPE_MAP::iterator,
- less < string >
- > SUPER_TYPE_MAP;
-
- void validate_properties (const SERVICE_TYPE_REPOS::PropStructSeq& props,
- PROP_MAP& prop_map,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName));
- // Confirm that the properties in props have valid names, and aren't
- // duplicated. Cram those properties into the prop_map.
-
- void validate_supertypes (const SERVICE_TYPE_REPOS::ServiceTypeNameSeq& super_types,
- SUPER_TYPE_MAP& super_map,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::DuplicatePropertyName));
- // Confirm that the each super type exists, and cram them into super_map.
-
- void validate_inheritance (PROP_MAP& prop_map,
- SUPER_TYPE_MAP& super_map,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((SERVICE_TYPE_REPOS::ValueTypeRedefinition));
- // Ensure that properties of a super_type aren't having their types
- // or retstrictions redefined.
-
- // void validate_interface (const char* if_name,
- // SUPER_TYPE_MAP& super_map,
- // CORBA::Environment& _env)
- // TAO_THROW_SPEC ((SERVICE_TYPE_REPOS::InterfaceTypeMismatch));
- // Ensure that the interface type derives from its superclasses'.
-
- void update_type_map (const char* name,
- SERVICE_TYPE_REPOS::TypeStruct& type,
- PROP_MAP& prop_map,
- SUPER_TYPE_MAP& super_map);
- // Update the type map with the information contained in the
- // TypeStruct, prop_map, and super_map.
-
- ACE_Lock* lock_;
- // Lock with which to serialize access to the service type map.
-
- SERVICE_TYPE_MAP type_map_;
- // Stores information for each service type in the repository.
- // This is a mapping from service type name to a Type_Info struct
- // which serves as a storage for various information for the given type.
-
- SERVICE_TYPE_REPOS::IncarnationNumber incarnation_;
- // incarnation number to be used for the next modification to the repository.
-};
-
-// This are temporary functions, until the format of the incarnation number
-// will be changed in the spec.
-
-int
-operator> (const SERVICE_TYPE_REPOS::IncarnationNumber &l,
- const SERVICE_TYPE_REPOS::IncarnationNumber &r);
-
-int
-operator< (const SERVICE_TYPE_REPOS::IncarnationNumber &l,
- const SERVICE_TYPE_REPOS::IncarnationNumber &r);
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Service_Type_Repository.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* TAO_SERVICE_TYPE_REPOSITORY_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp
deleted file mode 100644
index dc9babc04e8..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Trader_Base.cpp
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#define ACE_BUILD_DLL
-
-#include "Trader.h"
-#include "ace/OS.h"
-#include <iostream.h>
-
-TAO_Trader_Base::TAO_Trader_Base (void)
- : trading_components_ (*this),
- import_attributes_ (*this),
- support_attributes_ (*this),
- link_attributes_ (*this)
-{
-}
-
-TAO_Import_Attributes_Impl &
-TAO_Trader_Base::import_attributes (void)
-{
- return this->import_attributes_;
-}
-
-const TAO_Import_Attributes_Impl &
-TAO_Trader_Base::import_attributes (void) const
-{
- return this->import_attributes_;
-}
-
-TAO_Support_Attributes_Impl &
-TAO_Trader_Base::support_attributes (void)
-{
- return this->support_attributes_;
-}
-
-const TAO_Support_Attributes_Impl &
-TAO_Trader_Base::support_attributes (void) const
-{
- return this->support_attributes_;
-}
-
-TAO_Link_Attributes_Impl &
-TAO_Trader_Base::link_attributes (void)
-{
- return this->link_attributes_;
-}
-
-const TAO_Link_Attributes_Impl &
-TAO_Trader_Base::link_attributes (void) const
-{
- return this->link_attributes_;
-}
-
-TAO_Trading_Components_Impl &
-TAO_Trader_Base::trading_components (void)
-{
- return this->trading_components_;
-}
-
-const TAO_Trading_Components_Impl &
-TAO_Trader_Base::trading_components (void) const
-{
- return this->trading_components_;
-}
-
-
-CORBA::Boolean
-TAO_Trader_Base::is_valid_identifier_name (const char* ident)
-{
- int return_value = CORBA::B_FALSE;
-
- if (ident == 0)
- return return_value;
-
- int length = ACE_OS::strlen (ident);
- if (length >= 1 && isalpha (ident[0]))
- {
- return_value = 1;
- for (int i = 0; i < length; i++)
- {
- if (! (isalnum (ident[i]) || ident[i] == '_'))
- {
- return_value = 0;
- break;
- }
- }
- }
-
- return return_value;
-}
-
-#include "Trader_T.h"
-
-TAO_Trader_Factory::TAO_TRADER*
-TAO_Trader_Factory::TAO_create_linked_trader (void)
-{
- TAO_TRADER::Trader_Components linked_trader =
- (TAO_TRADER::Trader_Components)
- (TAO_TRADER::LOOKUP |
- TAO_TRADER::REGISTER |
- TAO_TRADER::ADMIN |
- TAO_TRADER::LINK);
- return new TAO_TRADER (linked_trader);
-}
-
-#ifdef ACE_HAS_THREADS
-
-TAO_Trader_Factory::TAO_MT_TRADER*
-TAO_Trader_Factory::TAO_MT_create_linked_trader (void)
-{
- TAO_MT_TRADER::Trader_Components linked_trader =
- (TAO_MT_TRADER::Trader_Components)
- (TAO_MT_TRADER::LOOKUP |
- TAO_MT_TRADER::REGISTER |
- TAO_MT_TRADER::ADMIN |
- TAO_MT_TRADER::LINK);
- return new TAO_MT_TRADER (linked_trader);
-}
-
-#endif /* ACE_HAS_THREADS */
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader.h b/TAO/orbsvcs/orbsvcs/Trader/Trader.h
deleted file mode 100644
index b6f4ef399f7..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- C++ -*- */
-
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Trader_Base.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef TAO_TRADER_BASE_H
-#define TAO_TRADER_BASE_H
-
-#include <string>
-#include <map>
-
-#include "Attributes.h"
-
-// Forward Declaration
-template <class TRADER_LOCK_TYPE, MAP_LOCK_TYPE>
-class TAO_Trader;
-
-// Cludge to avoid template instantiation in the executable.
-class TAO_Trader_Factory
-{
-public:
-
- typedef TAO_Trader<ACE_Null_Mutex, ACE_Null_Mutex> TAO_TRADER;
- static TAO_TRADER* TAO_create_linked_trader (void);
-
-#ifdef ACE_HAS_THREADS
-
- typedef TAO_Trader<ACE_Thread_Mutex, ACE_RW_Mutex> TAO_MT_TRADER;
- static TAO_MT_TRADER* TAO_MT_create_linked_trader (void);
-
-#endif /* ACE_HAS_THREADS */
-};
-
-class TAO_Export TAO_Trader_Base
- //
- // = TITLE
- // TAO_Trader inherits from this "helper" class.
- // The sole purpose of this class is to factor some of TAO_Trader's
- // data members out, so that they would not have to be templatized
- // and be be aware of the type of lock they use.
- //
- // = DESCRIPTION
- // TAO_Trader is a template class. And while we want
- // <import_attributes_>, <trader_components_>, and
- // <support_attributes> use a lock contained in TAO_Trader, we do not
- // want all these classes to be templatized. TAO_Trader_Base class solves
- // this problem.
-{
-public:
- typedef int HUGE_NUMBER;
-
- TAO_Trader_Base (void);
-
- // = Accessors for objects that manage trader's configuration.
-
- TAO_Trading_Components_Impl &trading_components (void);
-
- const TAO_Trading_Components_Impl &trading_components (void) const;
-
- TAO_Import_Attributes_Impl &import_attributes (void);
-
- const TAO_Import_Attributes_Impl &import_attributes (void) const;
-
- TAO_Support_Attributes_Impl &support_attributes (void);
-
- const TAO_Support_Attributes_Impl &support_attributes (void) const;
-
- TAO_Link_Attributes_Impl &link_attributes (void);
-
- const TAO_Link_Attributes_Impl &link_attributes (void) const;
-
- // = Accessor for trader's lock.
-
- virtual ACE_Lock &lock (void) = 0;
- // return lock that guards trader's current configuration.
-
- static CORBA::Boolean is_valid_identifier_name (const char* ident);
- // Determine whether the identifier is a valid one (i.e., if the
- // first character is a letter, and the subsequent ones letter,
- // numbers, or underscores.)
-
-protected:
- // = Objects determining current configuration of a trader.
-
- TAO_Trading_Components_Impl trading_components_;
- // Stores and allows lookup of trader's components.
-
- TAO_Import_Attributes_Impl import_attributes_;
- // Stores and allows access/modification of trader's import attributes.
-
- TAO_Support_Attributes_Impl support_attributes_;
- // Stores and allows access/modification of trader's support attributes.
-
- TAO_Link_Attributes_Impl link_attributes_;
- // Stores and allows access/modification of trader's link attributes.
-};
-
-
-#endif /* TAO_TRADER_BASE_H */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_T.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_T.cpp
deleted file mode 100644
index 7ac0533eeb5..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_T.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- C++ -*- */
-// ============================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Trader.cpp
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (TAO_TRADER_C)
-#define TAO_TRADER_C
-
-#include "Trader.h"
-#include "Lookup.h"
-#include "Register.h"
-#include "Link.h"
-#include "Proxy.h"
-#include "Admin.h"
-
-template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE>
-TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE>::TAO_Trader (Trader_Components components)
-{
- CORBA::Environment env;
- for (int i = LOOKUP_IF; i <= LINK_IF; i++)
- this->ifs_[i] = 0;
-
- if (ACE_BIT_ENABLED (components, LOOKUP))
- {
- TAO_Lookup<TRADER_SELF>* lookup = new TAO_Lookup<TRADER_SELF> (*this);
- this->trading_components ().lookup_if (lookup->_this (env));
- this->ifs_[LOOKUP_IF] = lookup;
- }
- if (ACE_BIT_ENABLED (components, REGISTER))
- {
- TAO_Register<TRADER_SELF>* reg = new TAO_Register<TRADER_SELF> (*this);
- this->trading_components ().register_if (reg->_this (env));
- this->ifs_[REGISTER_IF] = reg;
- }
- if (ACE_BIT_ENABLED (components, ADMIN))
- {
- TAO_Admin<TRADER_SELF>* admin = new TAO_Admin<TRADER_SELF> (*this);
- this->trading_components ().admin_if (admin->_this (env));
- this->ifs_[ADMIN_IF] = admin;
- }
- if (ACE_BIT_ENABLED (components, PROXY))
- {
- TAO_Proxy<TRADER_SELF>* proxy = new TAO_Proxy<TRADER_SELF> (*this);
- this->trading_components ().proxy_if (proxy->_this (env));
- this->ifs_[PROXY_IF] = proxy;
- }
- if (ACE_BIT_ENABLED (components, LINK))
- {
- TAO_Link<TRADER_SELF, MAP_LOCK_TYPE>* link =
- new TAO_Link<TRADER_SELF, MAP_LOCK_TYPE> (*this);
- this->trading_components ().link_if (link->_this (env));
- this->ifs_[LINK_IF] = link;
- }
-}
-
-template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE>
-TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE>::~TAO_Trader ()
-{
- // Remove Trading Components from POA
- //
- // Note that there is no real error checking here as we can't do
- // much about errors here anyway
- //
-
- for (int i = LOOKUP_IF; i <= LINK_IF; i++)
- {
- if (this->ifs_[i] != 0)
- {
- TAO_TRY
- {
- PortableServer::POA_var poa =
- this->ifs_[i]->_default_POA (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this->ifs_[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
- poa->deactivate_object (id.in (), TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- }
- TAO_ENDTRY;
-
- delete this->ifs_[i];
- }
- }
-}
-
-template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE>
-TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE>::SERVICE_TYPE_MAP&
-TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE>::service_type_map (void)
-{
- return this->service_type_map_;
-}
-
-template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE> ACE_Lock &
-TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE>::lock (void)
-{
- return this->lock_;
-}
-
-#endif /* TAO_TRADER_C */
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h
deleted file mode 100644
index e38650f5cb6..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- C++ -*- */
-
-// ========================================================================
-// $Id$
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// Trader.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu>
-// Seth Widoff <sbw1@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ========================================================================
-
-#ifndef TAO_TRADER_H
-#define TAO_TRADER_H
-
-// ACE includes
-#include "Trader.h"
-#include "Monitor.h"
-#include "Service_Type_Map.h"
-
-template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE>
-class TAO_Trader : public TAO_Trader_Base
- //
- // = TITLE
- // This class packages together all the various pieces that
- // provide functionality specified in COS Trading specification.
- //
- // = DESCRIPTION
- // TAO_Trader contains all the components that together represent
- // a single trader. Based on its constructor arguments,
- // TAO_Trader creates instances of appropriate interface
- // implementations as well as instances of objects common to
- // more than one interface (offers, attributes, etc.).
- // TAO_Trader also enforces the proper order on all
- // initializations. TAO_Trader acts like a "glue" class that
- // creates appropriate components, holds everything together,
- // and enforces order. TAO_Trader is parameterized by two types
- // of locks: one for its service service offers, one for its
- // state (configuration).
-{
-public:
-
- enum Trader_Components
- {
- LOOKUP = 0x001,
- REGISTER = 0x002,
- LINK = 0x004,
- PROXY = 0x008,
- ADMIN = 0x010
- };
- // The desired combination of interfaces to be passed to the
- // TAO_Trader constructor.
-
- typedef TAO_Service_Type_Map<MAP_LOCK_TYPE> SERVICE_TYPE_MAP;
- typedef SERVICE_TYPE_MAP::Local_Offer_Iterator LOCAL_OFFER_ITER;
- typedef MAP_LOCK_TYPE LOCK_TYPE;
-
- TAO_Trader (Trader_Components components = LOOKUP);
- // Constructor which based on its arguments will create
- // a particular type of trader (e.g. Query trader, Simple trader, etc.)
- // The argument is a bitwise OR of desired Trader_Components as listed
- // in enumerated type above.
-
- ~TAO_Trader (void);
- // destructor.
-
- SERVICE_TYPE_MAP& service_type_map (void);
- // Accessor for the structure with all the service offers.
-
- ACE_Lock &lock (void);
- // returns the trader
-
-protected:
-
- typedef TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE> TRADER_SELF;
-
- SERVICE_TYPE_MAP service_type_map_;
- // A monitor (i.e. an STL map + a lock) serving as a storage for
- // all the service offers of a trader.
- // Structure: a map (actually a monitor) of service type names to
- // a counter + a map (a monitor) of offers for that service type. A map of offers for
- // a service type (an internal map) is a mapping from a number ids to offers.
-
- ACE_Lock_Adapter<TRADER_LOCK_TYPE> lock_;
- // lock that guards the state of the trader (its configuration).
-
- enum { LOOKUP_IF, REGISTER_IF, ADMIN_IF, PROXY_IF, LINK_IF };
-
- PortableServer::ServantBase* ifs_[5];
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "Trader.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#endif /* ACE_TRADER_H */
-
diff --git a/TAO/orbsvcs/orbsvcs/Trader/constraint.l b/TAO/orbsvcs/orbsvcs/Trader/constraint.l
deleted file mode 100644
index 76ab1b2cb6c..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/constraint.l
+++ /dev/null
@@ -1,130 +0,0 @@
-%{
-// $Id$
-// ========================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// constraint.l
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Constraint.h"
-#include "Constraint_Nodes.h"
-#include "Constraint_Tokens.h"
-
-static TAO_Literal_Constraint* extract_string(const char*);
-
-#define TAO_YY_LEX_DEBUG
-
-#ifdef TAO_CONSTRAINT_DEBUG
-#define TAO_YY_LEX_DEBUG TAO_OS::fprintf(stderr, "%s\n", yytext)
-#endif /* TAO_CONSTRAINT_DEBUG */
-
-
-%}
-
-white_space [ \t]
-letter [a-zA-Z]
-digit [0-9]
-alpha_num ({letter}|{digit})
-integer {digit}+
-float ({digit}*\.{digit}+)([eE][-+]?{digit}+)?
-string '(([^'\\]*)|([^'\\]*\\')|([^'\\]*\\\\))*'
-ident {letter}({alpha_num}|[_])*
-newline \n
-unknown [^ \t]
-
-%%
-
-min { TAO_YY_LEX_DEBUG; return TAO_MIN; }
-max { TAO_YY_LEX_DEBUG; return TAO_MAX; }
-first { TAO_YY_LEX_DEBUG; return TAO_FIRST; }
-random { TAO_YY_LEX_DEBUG; return TAO_RANDOM; }
-with { TAO_YY_LEX_DEBUG; return TAO_WITH; }
-exist { TAO_YY_LEX_DEBUG; return TAO_EXIST; }
-not { TAO_YY_LEX_DEBUG; return TAO_NOT; }
-and { TAO_YY_LEX_DEBUG; return TAO_AND; }
-or { TAO_YY_LEX_DEBUG; return TAO_OR; }
-in { TAO_YY_LEX_DEBUG; return TAO_IN; }
-"~" { TAO_YY_LEX_DEBUG; return TAO_TWIDDLE; }
-"+" { TAO_YY_LEX_DEBUG; return TAO_PLUS; }
-"-" { TAO_YY_LEX_DEBUG; return TAO_MINUS; }
-"*" { TAO_YY_LEX_DEBUG; return TAO_MULT; }
-"/" { TAO_YY_LEX_DEBUG; return TAO_DIV; }
-"<" { TAO_YY_LEX_DEBUG; return TAO_LT; }
-"<=" { TAO_YY_LEX_DEBUG; return TAO_LE; }
-">" { TAO_YY_LEX_DEBUG; return TAO_GT; }
-">=" { TAO_YY_LEX_DEBUG; return TAO_GE; }
-"==" { TAO_YY_LEX_DEBUG; return TAO_EQ; }
-"!=" { TAO_YY_LEX_DEBUG; return TAO_NE; }
-"(" { TAO_YY_LEX_DEBUG; return TAO_LPAREN; }
-")" { TAO_YY_LEX_DEBUG; return TAO_RPAREN; }
-TRUE {
- yylval.constraint_ =
- new TAO_Literal_Constraint(CORBA::B_TRUE);
- TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
- }
-FALSE {
- yylval.constraint_ =
- new TAO_Literal_Constraint(CORBA::B_FALSE);
- TAO_YY_LEX_DEBUG; return TAO_BOOLEAN;
- }
-{integer} {
- yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Long)atoi(yytext));
- TAO_YY_LEX_DEBUG; return TAO_NUMBER;
- }
-{float} {
- yylval.constraint_ =
- new TAO_Literal_Constraint((CORBA::Double)atof(yytext));
- TAO_YY_LEX_DEBUG; return TAO_NUMBER;
- }
-{string} {
- yylval.constraint_ = extract_string(yytext);
- TAO_YY_LEX_DEBUG; return TAO_STRING;
- }
-{ident} {
- yylval.constraint_ =
- new TAO_Property_Constraint(yytext);
- TAO_YY_LEX_DEBUG; return TAO_IDENT;
- }
-{unknown} {
- TAO_YY_LEX_DEBUG; return TAO_UNKNOWN;
- }
-%%
-
-TAO_Literal_Constraint*
-extract_string(const char* total)
-{
- int prev_slash = 0,
- ctr = 0;
- char str[BUFSIZ],
- *tmp = (char*) total + 1;
-
- while (*tmp != '\0')
- {
- if (*tmp == '\\')
- {
- if (prev_slash)
- prev_slash = 0;
- else
- {
- prev_slash = 1;
- continue;
- }
- }
- else if (*tmp == '\'')
- prev_slash = 0;
-
- str[ctr++] = *tmp;
- tmp++;
- }
-
- str[ctr - 1] = '\0';
- return new TAO_Literal_Constraint(str);
-} \ No newline at end of file
diff --git a/TAO/orbsvcs/orbsvcs/Trader/constraint.y b/TAO/orbsvcs/orbsvcs/Trader/constraint.y
deleted file mode 100644
index b6ead834a7e..00000000000
--- a/TAO/orbsvcs/orbsvcs/Trader/constraint.y
+++ /dev/null
@@ -1,135 +0,0 @@
-%{
- // $Id$
-// ========================================================================
-//
-// = LIBRARY
-// orbsvcs
-//
-// = FILENAME
-// constraint.y
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// ========================================================================
-
-#include "Constraint.h"
-#include "Constraint_Nodes.h"
-
-//#define YYDEBUG 1
-%}
-
-%token TAO_GT TAO_GE TAO_LT TAO_LE TAO_EQ TAO_NE TAO_EXIST
-%token TAO_AND TAO_OR TAO_NOT TAO_IN TAO_TWIDDLE TAO_BOOLEAN
-%token TAO_PLUS TAO_MINUS TAO_MULT TAO_DIV TAO_UMINUS TAO_NUMBER
-%token TAO_RPAREN TAO_LPAREN TAO_IDENT TAO_STRING TAO_UNKNOWN
-%token TAO_UNSIGNED TAO_SIGNED TAO_DOUBLE TAO_CONSTRAINT TAO_SEQUENCE
-%token TAO_WITH TAO_MAX TAO_MIN TAO_FIRST TAO_RANDOM
-
-%start constraint
-
-%type <constraint_> TAO_IDENT TAO_NUMBER TAO_STRING TAO_BOOLEAN
-%type <constraint_> constraint preference bool_or bool_and bool_compare
-%type <constraint_> expr_in expr_twiddle expr term factor_not factor
-
-%%
-
-constraint: bool_or
- { $$ = new TAO_Unary_Constraint(TAO_CONSTRAINT, $1); }
- | preference
- { $$ = $1; }
- ;
-
-preference: TAO_MIN bool_or
-{ $$ = new TAO_Unary_Constraint(TAO_MIN, $2); }
- | TAO_MAX bool_or
-{ $$ = new TAO_Unary_Constraint(TAO_MAX, $2); }
- | TAO_WITH bool_or
-{ $$ = new TAO_Unary_Constraint(TAO_WITH, $2); }
- | TAO_FIRST
-{ $$ = new TAO_Noop_Constraint(TAO_FIRST); }
- | TAO_RANDOM
-{ $$ = new TAO_Noop_Constraint(TAO_RANDOM); }
- ;
-
-bool_or: bool_or TAO_OR bool_and
- { $$ = new TAO_Binary_Constraint(TAO_OR, $1, $3); }
- | bool_and
- { $$ = $1; }
- ;
-
-bool_and: bool_and TAO_AND bool_compare
- { $$ = new TAO_Binary_Constraint(TAO_AND, $1, $3); }
- | bool_compare
- { $$ = $1; }
- ;
-
-bool_compare: expr_in TAO_EQ expr_in
- { $$ = new TAO_Binary_Constraint(TAO_EQ, $1, $3); }
- | expr_in TAO_NE expr_in
- { $$ = new TAO_Binary_Constraint(TAO_NE, $1, $3); }
- | expr_in TAO_GT expr_in
- { $$ = new TAO_Binary_Constraint(TAO_GT, $1, $3); }
- | expr_in TAO_GE expr_in
- { $$ = new TAO_Binary_Constraint(TAO_GE, $1, $3); }
- | expr_in TAO_LT expr_in
- { $$ = new TAO_Binary_Constraint(TAO_LT, $1, $3); }
- | expr_in TAO_LE expr_in
- { $$ = new TAO_Binary_Constraint(TAO_LE, $1, $3); }
- | expr_in
- { $$ = $1; }
- ;
-
-expr_in: expr_twiddle TAO_IN TAO_IDENT
- { $$ = new TAO_Binary_Constraint(TAO_IN, $1, $3); }
- | expr_twiddle
- { $$ = $1; }
- ;
-
-expr_twiddle: expr TAO_TWIDDLE expr
- { $$ = new TAO_Binary_Constraint(TAO_TWIDDLE, $1, $3); }
- | expr
- { $$ = $1; }
- ;
-
-expr: expr TAO_PLUS term
- { $$ = new TAO_Binary_Constraint(TAO_PLUS, $1, $3); }
- | expr TAO_MINUS term
- { $$ = new TAO_Binary_Constraint(TAO_MINUS, $1, $3); }
- | term
- { $$ = $1; }
- ;
-
-term: term TAO_MULT factor_not
- { $$ = new TAO_Binary_Constraint(TAO_MULT, $1, $3); }
- | term TAO_DIV factor_not
- { $$ = new TAO_Binary_Constraint(TAO_DIV, $1, $3); }
- | factor_not
- { $$ = $1; }
- ;
-
-factor_not: TAO_NOT factor
- { $$ = new TAO_Unary_Constraint(TAO_NOT, $2); }
- | factor
- { $$ = $1; }
- ;
-
-factor: TAO_LPAREN bool_or TAO_RPAREN
- { $$ = $2; }
- | TAO_EXIST TAO_IDENT
- { $$ = new TAO_Unary_Constraint(TAO_EXIST, $2); }
- | TAO_IDENT
- { $$ = $1; }
- | TAO_NUMBER
- { $$ = $1; }
- | TAO_MINUS TAO_NUMBER
- { $$ = new TAO_Unary_Constraint(TAO_UMINUS, $2); }
- | TAO_STRING
- { $$ = $1; }
- | TAO_BOOLEAN
- { $$ = $1; }
- ;
-
-%%
-
-//extern int yydebug = 1;
diff --git a/TAO/orbsvcs/orbsvcs/orbsvcs.dsp b/TAO/orbsvcs/orbsvcs/orbsvcs.dsp
deleted file mode 100644
index 2daeb218877..00000000000
--- a/TAO/orbsvcs/orbsvcs/orbsvcs.dsp
+++ /dev/null
@@ -1,619 +0,0 @@
-# Microsoft Developer Studio Project File - Name="orbsvcs" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=orbsvcs - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "orbsvcs.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "orbsvcs.mak" CFG="orbsvcs - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "orbsvcs - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "orbsvcs - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "DLL\Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "../.." /I "../../.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D TAO_ORBSVCS_HAS_DLL=1 /D "TAO_ORBSVCS_BUILD_DLL" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-# Begin Special Build Tool
-SOURCE=$(InputPath)
-PostBuild_Desc=Copying DLL to $TAO_ROOT/tao
-PostBuild_Cmds=copy orbsvcs.dll ..\..\tao
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "orbsvcs_"
-# PROP BASE Intermediate_Dir "orbsvcs_"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "DLL\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".." /I "../.." /I "../../.." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D TAO_ORBSVCS_HAS_DLL=1 /D "TAO_ORBSVCS_BUILD_DLL" /YX /FD /c
-# SUBTRACT CPP /WX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAO.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
-# Begin Special Build Tool
-SOURCE=$(InputPath)
-PostBuild_Desc=Copying DLL to $TAO_ROOT/tao
-PostBuild_Cmds=copy orbsvcs.dll ..\..\tao
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "orbsvcs - Win32 Release"
-# Name "orbsvcs - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\Event\BCU.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched\Config_Scheduler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosNaming.idl
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\CosNaming.idl
-InputName=CosNaming
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\CosNaming.idl
-InputName=CosNaming
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming\CosNaming_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosNamingC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosNamingS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosTimeBase.idl
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# Begin Custom Build
-InputPath=.\CosTimeBase.idl
-InputName=CosTimeBase
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\CosTimeBase.idl
-InputName=CosTimeBase
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosTimeBaseC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosTimeBaseS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\Dispatching_Modules.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming\Entries.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\Event_Channel.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Utilities.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming\Ior_Multicast.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\Local_ESTypes.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Logger.idl
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\Logger.idl
-InputName=Logger
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\Logger.idl
-InputName=Logger
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LoggerC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\LoggerS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\Memory_Pools.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming\Naming_Utils.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\ReactorTask.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\RT_Task.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventChannelAdmin.idl
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventChannelAdmin.idl
-InputName=RtecEventChannelAdmin
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventChannelAdmin.idl
-InputName=RtecEventChannelAdmin
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventChannelAdminC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventChannelAdminS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventComm.idl
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventComm.idl
-InputName=RtecEventComm
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventComm.idl
-InputName=RtecEventComm
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventCommC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventCommS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecScheduler.idl
-
-!IF "$(CFG)" == "orbsvcs - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecScheduler.idl
-InputName=RtecScheduler
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecScheduler.idl
-InputName=RtecScheduler
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecSchedulerC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecSchedulerS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Runtime_Scheduler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched\Scheduler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Factory.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched\Scheduler_Generic.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Utilities.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event\Task_Manager.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Utilities.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/orbsvcs/orbsvcs.dsw b/TAO/orbsvcs/orbsvcs/orbsvcs.dsw
deleted file mode 100644
index 8a33ecb6923..00000000000
--- a/TAO/orbsvcs/orbsvcs/orbsvcs.dsw
+++ /dev/null
@@ -1,41 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "orbsvcs"=.\orbsvcs.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "orbsvcs_lib"=.\orbsvcs_lib.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/orbsvcs/orbsvcs_export.h b/TAO/orbsvcs/orbsvcs/orbsvcs_export.h
deleted file mode 100644
index 044c4281975..00000000000
--- a/TAO/orbsvcs/orbsvcs/orbsvcs_export.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Definition for Win32 Export directives.
-// This file is generated automatically by
-// ${TAO_ROOT}/TAO_IDL/GenExportH.BAT
-// ------------------------------
-#if !defined (TAO_ORBSVCS_EXPORT_H)
-#define TAO_ORBSVCS_EXPORT_H
-
-#include "ace/OS.h"
-
-#if defined (TAO_ORBSVCS_HAS_DLL)
-# if (TAO_ORBSVCS_HAS_DLL == 1)
-# if defined (TAO_ORBSVCS_BUILD_DLL)
-# define TAO_ORBSVCS_Export ACE_Proper_Export_Flag
-# define TAO_ORBSVCS_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TAO_ORBSVCS_SINGLETON_INSTANTIATION(T) ACE_PROPER_SINGLETON_INSTANTIATION (T)
-# else
-# define TAO_ORBSVCS_Export ACE_Proper_Import_Flag
-# define TAO_ORBSVCS_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TAO_ORBSVCS_SINGLETON_INSTANTIATION(T)
-# endif /* TAO_ORBSVCS_BUILD_DLL */
-# else
-# define TAO_ORBSVCS_Export
-# define TAO_ORBSVCS_SINGLETON_DECLARATION(T)
-# define TAO_ORBSVCS_SINGLETON_INSTANTIATION(T)
-# endif /* ! TAO_ORBSVCS_HAS_DLL == 1 */
-#else
-# define TAO_ORBSVCS_Export
-# define TAO_ORBSVCS_SINGLETON_DECLARATION(T)
-# define TAO_ORBSVCS_SINGLETON_INSTANTIATION(T)
-#endif /* TAO_ORBSVCS_HAS_DLL */
-
-#endif /* TAO_ORBSVCS_EXPORT_H */
- // End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/orbsvcs_lib.dsp b/TAO/orbsvcs/orbsvcs/orbsvcs_lib.dsp
deleted file mode 100644
index 2a9aaed9004..00000000000
--- a/TAO/orbsvcs/orbsvcs/orbsvcs_lib.dsp
+++ /dev/null
@@ -1,519 +0,0 @@
-# Microsoft Developer Studio Project File - Name="orbsvcs_lib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=orbsvcs_lib - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "orbsvcs_lib.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "orbsvcs_lib.mak" CFG="orbsvcs_lib - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "orbsvcs_lib - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "orbsvcs_lib - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-
-!IF "$(CFG)" == "orbsvcs_lib - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "LIB\Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "../.." /I "../../.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "orbsvcs_lib - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "LIB\Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I ".." /I "../.." /I "../../.." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"orbsvcs_s.lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "orbsvcs_lib - Win32 Release"
-# Name "orbsvcs_lib - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "*.idl,*.cpp"
-# Begin Source File
-
-SOURCE=.\Channel_Clients.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosNaming.idl
-
-!IF "$(CFG)" == "orbsvcs_lib - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\CosNaming.idl
-InputName=CosNaming
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs_lib - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\CosNaming.idl
-InputName=CosNaming
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosNamingC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\CosNamingS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Utilities.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Logger.idl
-
-!IF "$(CFG)" == "orbsvcs_lib - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\Logger.idl
-InputName=Logger
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs_lib - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\Logger.idl
-InputName=Logger
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LoggerC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\LoggerS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventChannelAdmin.idl
-
-!IF "$(CFG)" == "orbsvcs_lib - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventChannelAdmin.idl
-InputName=RtecEventChannelAdmin
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs_lib - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventChannelAdmin.idl
-InputName=RtecEventChannelAdmin
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventChannelAdminC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventChannelAdminS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventComm.idl
-
-!IF "$(CFG)" == "orbsvcs_lib - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventComm.idl
-InputName=RtecEventComm
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs_lib - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecEventComm.idl
-InputName=RtecEventComm
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventCommC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecEventCommS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecScheduler.idl
-
-!IF "$(CFG)" == "orbsvcs_lib - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecScheduler.idl
-InputName=RtecScheduler
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "orbsvcs_lib - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL compiler
-InputPath=.\RtecScheduler.idl
-InputName=RtecScheduler
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl -Wb,export_macro=TAO_ORBSVCS_Export\
- -Wb,export_include=orbsvcs_export.h $(InputName).idl
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecSchedulerC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\RtecSchedulerS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Runtime_Scheduler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Factory.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Utilities.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "*.h"
-# Begin Source File
-
-SOURCE=.\Channel_Clients.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Channel_Clients_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Service_Constants.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Utilities.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Runtime_Scheduler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Factory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Utilities.h
-# End Source File
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "*.i"
-# Begin Source File
-
-SOURCE=.\Event_Utilities.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Runtime_Scheduler.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Factory.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Scheduler_Utilities.i
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/orbsvcs/sfp.idl b/TAO/orbsvcs/orbsvcs/sfp.idl
deleted file mode 100644
index 879f33a2130..00000000000
--- a/TAO/orbsvcs/orbsvcs/sfp.idl
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-/* $Id$ */
-
-module SFP
-{
- enum message_type
- {
- // Messages in the forward direction
- START,
- ENDOFSTREAM,
- SIMPLEFRAME,
- SEQUENCEDFRAME,
- FRAME,
- SPECIALFRAME,
- // Messages in the reverse direction
- STARTREPLY,
- CREDIT
- };
-
- struct frame_header
- {
- sequence <char> magic_number;
- // '=', 'S', 'F', 'P'
- octet flags;
- // bit 0 = byte order,
- // 1 = fragments, 2-7 always 0
- octet message_type;
- unsigned long message_size;
- // Size following this header
- };
-
- struct fragment
- {
- sequence <char> magic_number;
- // 'F', 'R', 'A', 'G'
- octet flags;
- // bit 1 = more fragments
- unsigned long frag_number;
- // 0,..,n
- unsigned long frag_sz;
- unsigned long source_id;
- // Required for UDP multicast with multiple sources
- };
-
- struct start_message
- {
- // sequence <char> magic_number;
- // '=', 'S', 'T', 'A'
- unsigned long magic_number;
- octet major_version;
- octet minor_version;
- octet flags;
- // bit 0 = byte order
- };
-
- // Acknowledge successful processing of
- // Start
-
- struct start_reply
- {
- octet flags;
- // bit 0 = byte order, 1 = exception
- };
-
- // If the message_type in frameHeader is sequencedFrame
- // the the frameHeader will be followed by this
- // (See also RTP note)
-
- struct sequenced_frame
- {
- unsigned long sequence_num;
- };
- // If the message_type is Frame then
- // the frameHeader is followed by this
- // See also RTP note
-
- struct frame
- {
- unsigned long timestamp;
- unsigned long synch_source;
- sequence<unsigned long> source_ids;
- };
-};
diff --git a/TAO/orbsvcs/orbsvcs/tmplinst-orbsvcs.cpp b/TAO/orbsvcs/orbsvcs/tmplinst-orbsvcs.cpp
deleted file mode 100644
index 59a3a1f3aba..00000000000
--- a/TAO/orbsvcs/orbsvcs/tmplinst-orbsvcs.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/RtecEventCommC.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/RtecSchedulerC.h"
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class TAO_Unbounded_Sequence<CosNaming::NameComponent>;
-template class TAO_Unbounded_Sequence<CosNaming::Binding>;
-template class TAO_Unbounded_Sequence<RtecEventComm::Event>;
-template class TAO_Unbounded_Sequence<RtecEventChannelAdmin::Dependency>;
-template class TAO_Unbounded_Sequence<RtecEventChannelAdmin::Publication>;
-template class TAO_Unbounded_Sequence<RtecScheduler::Dependency_Info>;
-template class TAO_Unbounded_Sequence<RtecScheduler::RT_Info>;
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate TAO_Unbounded_Sequence<CosNaming::NameComponent>
-#pragma instantiate TAO_Unbounded_Sequence<CosNaming::Binding>
-#pragma instantiate TAO_Unbounded_Sequence<RtecEventComm::Event>
-#pragma instantiate TAO_Unbounded_Sequence<RtecEventChannelAdmin::Dependency>
-#pragma instantiate TAO_Unbounded_Sequence<RtecEventChannelAdmin::Publication>
-#pragma instantiate TAO_Unbounded_Sequence<RtecScheduler::Dependency_Info>
-#pragma instantiate TAO_Unbounded_Sequence<RtecScheduler::RT_Info>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/AVStreams/Makefile b/TAO/orbsvcs/tests/AVStreams/Makefile
deleted file mode 100644
index 675fc08bebb..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/Makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Top-level Makefile for the AVStreams demo of the TAO ORB
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-LDLIBS = -lorbsvcs -lTAO
-
-PROG_SRCS = main.cpp
-
-LSRC = $(PROG_SRCS)
-
-#AVStreams_SERVER_OBJS = server.o
-#AVStreams_CLIENT_OBJS = client.o
-
-COSPROPERTY_OBJS = main.o
-
-#BIN = server client
-BIN = main
-BUILD = $(BIN)
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-#server:$(addprefix $(VDIR),$(AVStreams_SERVER_OBJS))
-#$(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#client:$(addprefix $(VDIR),$(AVStreams_CLIENT_OBJS))
-#$(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-main: $(addprefix $(VDIR), $(COSPROPERTY_OBJS))
- $(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-
-realclean: clean
- -/bin/rm -rf
-
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/client.cpp b/TAO/orbsvcs/tests/AVStreams/client.cpp
deleted file mode 100644
index 71bb308b86d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/client.cpp
+++ /dev/null
@@ -1,599 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/tests/AVStreams
-//
-// = FILENAME
-// client.cpp
-//
-// = DESCRIPTION
-// Test client for the AVStreams demo
-//
-// = AUTHORS
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "client.h"
-
-Video_Client_StreamEndPoint::Video_Client_StreamEndPoint (void)
-{
-}
-
-void
-Video_Client_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Video_Client_StreamEndPoint::handle_stop: called\n"));
-}
-
-void
-Video_Client_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Video_Client_StreamEndPoint::handle_start: called\n"));
-}
-
-void
-Video_Client_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Video_Client_StreamEndPoint::handle_destroy: called\n"));
-}
-
-CORBA::Boolean
-Video_Client_StreamEndPoint::handle_connection_established (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Video_Client_StreamEndPoint::handle_connection_established: called\n"));
- return 1;
-}
-
-Client::Client (void)
-{
-}
-
-// initialize the ORB, get a grip on the remote mmdevice, and store it
-// in this->remote_mmdevice_. Also create a stream controlller and a
-// local mmdevice.
-
-int
-Client::init (int argc,
- char *argv[],
- CORBA::Environment &env)
-{
- // Init the ORB.
- manager_.init (argc,
- argv,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Create the local mmdevice.
- TAO_Client_MMDevice <Video_Client_StreamEndPoint> *mmdevice_impl;
-
- ACE_NEW_RETURN (mmdevice_impl,
- TAO_Client_MMDevice <Video_Client_StreamEndPoint>,
- -1);
-
- this->local_mmdevice_ = mmdevice_impl->_this (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Create the local streamctrl.
- TAO_StreamCtrl *stream_ctrl;
-
- ACE_NEW_RETURN (stream_ctrl,
- TAO_StreamCtrl (manager_.orb ()),
- -1);
- this->stream_ctrl_ = stream_ctrl->_this (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Bind to a remote mmdevice, as supplied by argc argv.
- this->bind_to_remote_mmdevice (argc, argv, env);
-
- manager_.orb ()->open ();
- // Create a local mmdevice for now..
- // mmdevice_impl = new TAO_MMDevice;
- // this->remote_mmdevice_ = mmdevice_impl->_this (env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-}
-
-// Use stream_ctrl_ to bind local_mmdevice_ and remote_mmdevice_.
-
-int
-Client::run (CORBA::Environment &env)
-{
- // Initialize the in parameters.
-
- // @@ Alex, please make sure you restructure this code so that you
- // test for allocation failures.
- AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS);
- AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec);
-
- // Allocate the qos_list.
- struct AVStreams::QoS qos_list;
- // @@ Alex, please take a careful look at this code and figure out
- // if you really need to use "magic numbers" like 64 here.
- qos_list.QoSType = CORBA::string_alloc (64);
- qos_list.QoSParams = CORBA::string_alloc (64);
- strcpy (qos_list.QoSType, "foo");
- strcpy (qos_list.QoSParams, "bar");
-
- the_qos->length (1);
- the_qos [0] = qos_list;
-
- // Allocate the flow_list.
- const char *flow_list [] =
- {
- "alpha",
- "beta",
- "gamma"
- };
-
- CORBA::ULong len = sizeof (flow_list)/sizeof (char *);
-
- // Set the length of the sequence.
- the_flows->length (len);
-
- // Now set each individual element.
- for (CORBA::ULong i=0; i < the_flows->length (); i++)
- {
- // Generate some arbitrary string to be filled into the ith
- // location in the sequence.
- // char *str = gen->gen_string ();
- //this->in_[i] = str;
- the_flows [i] = flow_list [i];
- }
-
- // Bind the devices together.
- this->stream_ctrl_->bind_devs (local_mmdevice_,
- remote_mmdevice_,
- the_qos.inout (),
- the_flows.in (),
- env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Devices bound successfully!\n"));
-
- // Start the flow of the stream.
- this->stream_ctrl_-> start (the_flows.in (),
- env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-// Bind to a remote mmdevice, as given by the command line arguments.
-
-int
-Client::bind_to_remote_mmdevice (int argc,
- char *argv[],
- CORBA::Environment &env)
-{
- ACE_Get_Opt get_opts (argc, argv, "k:");
- int c;
- char *ior = 0;
-
- // @@ Alex, can you please move this into a "parse_args()" helper
- // method?
-
- // Parse the command line.
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'k':
- ior =
- ACE_OS::strdup (get_opts.optarg);
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-k mmdevice_key]"
- "\n",
- argv [0]),
- -1);
- }
-
- // We didn't get an IOR from the command line!
- if (ior == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-k mmdevice_key]"
- "\n",
- argv [0]),
- -1);
-
- // Get the object reference.
- CORBA::Object_var mmdevice_object =
- this->manager_.orb ()->string_to_object (ior,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Narrow the reference.
- this->remote_mmdevice_ =
- AVStreams::MMDevice::_narrow (mmdevice_object.in (),
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- if (CORBA::is_nil (this->remote_mmdevice_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "invalid key <%s>\n",
- ior),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,
- "Object received OK\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) Bound to remote mmdevice"));
- return 0;
-}
-
-// Testing the methods of the property service, with local_mmdevice.
-
-int
-Client::property_tester (CORBA::Environment &env)
-{
- // Testing define_property () of PropertySet interface.
- this->test_define_property (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Testing get_all_property_names.
- this->test_get_all_property_names (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Testing get_properties.
- this->test_get_properties (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Tesing get_all_properties.
- this->test_get_all_properties (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-}
-
-// Testing define_property with local_mmdevice.
-
-int
-Client::test_define_property (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking define_property\n"));
-
- CORBA::Any anyval;
-
- // Prepare a char and "define" that in the PropertySet.
-
- CORBA::Char ch = '#';
- anyval <<= from_char (ch);
- ch = '*';
- anyval >>= to_char (ch);
-
- ACE_DEBUG ((LM_DEBUG,
- "Main : Char ch = %c\n",
- ch));
- this->remote_mmdevice_->define_property ("char_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Prepare a Short and "define" that in the PropertySet.
- CORBA::Short s = 3;
- anyval <<= s;
- s = 7;
- anyval >>= s;
-
- ACE_DEBUG ((LM_DEBUG,
- "Main : Short s = %d\n",
- s));
-
- local_mmdevice_->define_property ("short_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Prepare a Long and "define" that in the PropertySet.
- CORBA::Long l = 931232;
- anyval <<= l;
- l = 931233;
- anyval >>= l;
- ACE_DEBUG ((LM_DEBUG,
- "Main : Long l = %d\n",
- l));
- CORBA::Any newany(anyval);
- local_mmdevice_->define_property ("long_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
-
- // Prepare a Float and "define" that in the PropertySet.
- CORBA::Float f = 3.14;
- anyval <<= f;
- f = 4.14;
- anyval >>= f;
- ACE_DEBUG ((LM_DEBUG,
- "Main : Float f = %f\n",
- f));
- local_mmdevice_->define_property ("float_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Prepare a String and "define" that in the PropertySet.
- ACE_DEBUG ((LM_DEBUG,
- "Main: Any holding String\n"));
- CORBA::String_var strvar (CORBA::string_dup ("Test_String"));
- anyval <<= strvar.in ();
- CORBA::String newstr;
- anyval >>= newstr;
-
- ACE_DEBUG ((LM_DEBUG,
- "Main: String : %s, From any : %s\n",
- strvar.in (),
- newstr));
-
- local_mmdevice_->define_property ("string_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-}
-
-// Testing get_all_property_names of the PropertySet.
-
-int
-Client::test_get_all_property_names (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nTesting get_all_property_names ()\n"));
-
- // Get the size.
- CORBA::ULong num_of_properties =
- local_mmdevice_->get_number_of_properties (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Get half on the names and half of on the iterator.
- CORBA::ULong how_many = num_of_properties / 2;
- CosPropertyService::PropertyNames_var names_var;
- CosPropertyService::PropertyNamesIterator_var iterator_var;
- local_mmdevice_->get_all_property_names (how_many,
- names_var.out (),
- iterator_var.out (),
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Print out the names in the names-sequence.
- if (names_var.ptr () != 0)
- {
- CORBA::ULong len = names_var->length ();
-
- for (CORBA::ULong ni = 0; ni < len; ni++)
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- (const char *) names_var [ni]));
- }
-
- // Iterate thru and print out the names in the iterator, if any.
- if (iterator_var.ptr () != 0)
- {
- CosPropertyService::PropertyName_var name_var;
-
- while (iterator_var->next_one (name_var.out (), env) == CORBA::B_TRUE)
- {
- TAO_CHECK_ENV_RETURN (env, 1);
- ACE_DEBUG ((LM_DEBUG, "%s\n", name_var.in ()));
- }
-
- TAO_CHECK_ENV_RETURN (env, 1);
- }
-}
-
-// Test get_properties. Give a sequence of names and get all their
-// properties.
-
-int
-Client::test_get_properties (CORBA::Environment &env)
-{
- // Get float_property, string_property and no_property. If return
- // value is false and type is tc_void then that name is not there in
- // the PropertySet.
-
- CosPropertyService::PropertyNames_var names;
-
- ACE_NEW_RETURN (names,
- CosPropertyService::PropertyNames,
- -1);
- names->length (4);
- names [0] = CORBA::string_dup ("float_property");
- names [1] = CORBA::string_dup ("string_property");
- names [2] = CORBA::string_dup ("long_property");
- names [3] = CORBA::string_dup ("no_property");
- CosPropertyService::Properties_var properties;
-
- // Get the properties.
- CORBA::Boolean return_val = local_mmdevice_->get_properties (names,
- properties.out (),
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- if (properties.ptr () != 0)
- {
- // Go thru the properties and print them out, if they are not
- // _tc_void typed values.
- CORBA::ULong len = properties->length ();
-
- for (CORBA::ULong pi = 0; pi < len; pi++)
- {
- // Print the name.
- ACE_DEBUG ((LM_DEBUG,
- "%s : ",
- (const char *) properties [pi].property_name.in ()));
-
- // Print the value if type is not tk_void.
- if (properties [pi].property_value.type () == CORBA::_tc_void)
- ACE_DEBUG ((LM_DEBUG,"Void\n"));
-
- if (properties [pi].property_value.type () == CORBA::_tc_float)
- {
- CORBA::Float f;
- properties [pi].property_value >>= f;
- ACE_DEBUG ((LM_DEBUG,"%f\n", f));
- }
-
- if (properties [pi].property_value.type () == CORBA::_tc_string)
- {
- CORBA::String str;
- properties [pi].property_value >>= str;
- ACE_DEBUG ((LM_DEBUG,"%s\n", str));
- }
-
- if (properties [pi].property_value.type () == CORBA::_tc_long)
- {
- CORBA::Long l;
- properties [pi].property_value >>= l;
- ACE_DEBUG ((LM_DEBUG,"%d\n", l));
- }
- }
- }
- return 0;
-}
-
-// Test get_all_properties.
-
-int
-Client::test_get_all_properties (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nTesting get_all_properties\n"));
- // Get the number of current properties.
- CORBA::ULong num_of_properties =
- this->local_mmdevice_->get_number_of_properties (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Get half on the properties and half of on the iterator.
- CORBA::ULong how_many = num_of_properties / 2;
- CosPropertyService::Properties_var properties;
- CosPropertyService::PropertiesIterator_var iterator;
- local_mmdevice_->get_all_properties (how_many,
- properties.out (),
- iterator.out (),
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Print out the properties now.
- if (properties.ptr () != 0)
- {
- CORBA::ULong len = properties->length ();
-
- for (CORBA::ULong pi = 0; pi < len; pi++)
- {
- // Print the property_name.
- ACE_DEBUG ((LM_DEBUG,
- "%s : ",
- properties [pi].property_name.in ()));
-
- // Print the value if type is not tk_void.
- if (properties [pi].property_value.type () == CORBA::_tc_void)
- ACE_DEBUG ((LM_DEBUG,"Void\n"));
-
- if (properties [pi].property_value.type () == CORBA::_tc_float)
- {
- CORBA::Float f;
- properties [pi].property_value >>= f;
- ACE_DEBUG ((LM_DEBUG,"%f\n", f));
- }
-
- if (properties [pi].property_value.type () == CORBA::_tc_string)
- {
- CORBA::String str;
- properties [pi].property_value >>= str;
- ACE_DEBUG ((LM_DEBUG,"%s\n", str));
- }
-
- if (properties [pi].property_value.type () == CORBA::_tc_long)
- {
- CORBA::Long l;
- properties [pi].property_value >>= l;
- ACE_DEBUG ((LM_DEBUG,"%d\n", l));
- }
- }
- }
-
- // Pass thru the iterator.
- if (iterator.ptr () != 0)
- {
- CosPropertyService::Property_var property;
-
- while (iterator->next_one (property.out (), env) == CORBA::B_TRUE)
- {
- TAO_CHECK_ENV_RETURN (env, 1);
- ACE_DEBUG ((LM_DEBUG,
- "%s : ",
- property->property_name.in ()));
-
- // Print the property_value.
- if (property->property_value.type () == CORBA::_tc_short)
- {
- CORBA::Short s;
- property->property_value >>= s;
- ACE_DEBUG ((LM_DEBUG,"%d\n", s));
- }
-
- if (property->property_value.type () == CORBA::_tc_float)
- {
- CORBA::Float f;
- property->property_value >>= f;
- ACE_DEBUG ((LM_DEBUG,"%f\n", f));
- }
-
- if (property->property_value.type () == CORBA::_tc_string)
- {
- CORBA::String str;
- property->property_value >>= str;
- ACE_DEBUG ((LM_DEBUG,"%s\n", str));
- }
-
- if (property->property_value.type () == CORBA::_tc_long)
- {
- CORBA::Long l;
- property->property_value >>= l;
- ACE_DEBUG ((LM_DEBUG,"%d\n", l));
- }
- }
- TAO_CHECK_ENV_RETURN (env, 1);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- TAO_TRY
- {
- Client client;
-
- if (client.init (argc,
- argv,
- TAO_TRY_ENV) == -1)
- return 1;
- TAO_CHECK_ENV;
-
- client.run (TAO_TRY_ENV);
- client.property_tester (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("AVStreams: client");
- return -1;
- }
- TAO_ENDTRY;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/client.h b/TAO/orbsvcs/tests/AVStreams/client.h
deleted file mode 100644
index 19216de47d8..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/client.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/tests/AVStreams
-//
-// = FILENAME
-// client.h
-//
-// = DESCRIPTION
-// Test client for the AVStreams demo
-//
-// = AUTHORS
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (AVSTREAMS_CLIENT_H)
-#define AVSTREAMS_CLIENT_H
-
-#include "ace/Synch.h"
-#include "ace/Task.h"
-#include "ace/Thread_Manager.h"
-#include "orbsvcs/Property/CosPropertyService_i.h"
-#include "orbsvcs/AV/AVStreams_i.h"
-#include "ace/Get_Opt.h"
-#include "tao/tao_util.h"
-
-class Client
-{
- // = TITLE
- // Client for A/V Streams demo.
- //
- // = DESCRIPTION
- // Encapsulates client functionality.
-public:
- // Constructor
- Client (void);
-
- int init (int argc,
- char **argv,
- CORBA::Environment &env);
- // Initialize the ORB etc, and bind the MMDevices.
-
- int run (CORBA::Environment &env);
- // Run the client. This will call StreamCtrl::bind_devs.
-
- int property_tester (CORBA::Environment &env);
- // Testing the property service methods.
-
-protected:
- int bind_to_remote_mmdevice (int argc,
- char *argv[],
- CORBA::Environment &env);
- // Bind to the remote MMDevice.
-
- // = Property Testing.
-
- int test_define_property (CORBA::Environment &env);
- // Testing the define property method.
-
- int test_get_all_property_names (CORBA::Environment &env);
- //Testing get_all_property_names.
-
- int test_get_properties (CORBA::Environment &env);
- //Testing get_properties. Give the names and get their properties.
-
- int test_get_all_properties (CORBA::Environment &env);
- // Testing get_all_properties.
-
- TAO_ORB_Manager manager_;
- // The ORB manager, handles ORB initialization etc.
-
- AVStreams::MMDevice_var local_mmdevice_;
- // Our MMDevice.
-
- AVStreams::MMDevice_var remote_mmdevice_;
- // Servers MMDevice.
-
- AVStreams::StreamCtrl_var stream_ctrl_;
- // Stream Controller.
-};
-
-class Video_Client_StreamEndPoint
- : public virtual TAO_Client_StreamEndPoint
-{
- // = TITLE
- // Stream Endpoint for the video client.
- //
- // = DESCRIPTION
- // Implements the callbacks that are made by the AVStreams library.
-public:
- Video_Client_StreamEndPoint (void);
- // Constructor.
-
- virtual void handle_stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles stream stoppage.
-
- virtual void handle_start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles stream start. Starts the flow of data.
-
- virtual void handle_destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles the destruction of the stream, tears down the transport.
-
- virtual CORBA::Boolean handle_connection_established (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles stream bind, establishes the transport.
-};
-
-#endif /* AVSTREAMS_CLIENT_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/ANNOUNCE b/TAO/orbsvcs/tests/AVStreams/mpeg/ANNOUNCE
deleted file mode 100644
index 77ccd3aaeb1..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/ANNOUNCE
+++ /dev/null
@@ -1,45 +0,0 @@
-Sent to:
- comp.multimedia, comp.sources.x, comp.windows.x,
- comp.windows.x.announce,
- ogi.general, ogi.cse.general, ogi.cse.software
-
-ANNOUNCE: Internet MPEG Player v2.0
-
-The Distributed Systems Research Group of the Department of Computer
-Science and Engineering, Oregon Graduate Institute of Science and
-Technology is pleased to announce the release of version 2.0 of its
-Internet-based distributed real-time MPEG video audio player.
-
-The MPEG player has following salient features:
-
- - Real-time synchronized playback of MPEG1 video and SPARC audio.
- - Movie data stream from server to client, NO NEED to download
- all bits beforehand.
- - Launch-able from within WWW browsers.
- - Users can specify QoS parameters like desired video frame
- rate.
- - Novel software feedback mechanisms are used to make the
- player robust across Internet:
- - synchronizing client and server clocks.
- - adapting video frame rate to current Internet
- workload.
-
-
-The video player is publicly available via following WWW pointer:
-
- http://cse.ogi.edu/DISC/projects/synthetix/Player/
-
-or following anonymous ftp pointer:
-
- ftp.cse.ogi.edu (129.29.20.2) in /pub/dsrg/Player/
-
-
-Best wishes,
-
-Shanwei Cen
-
-Distributed Systems Research Group
-Department of Computer Science and Engineering
-Oregon Graduate Institute of Science & Technology
-
-scen@cse.ogi.edu
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/BUGS b/TAO/orbsvcs/tests/AVStreams/mpeg/BUGS
deleted file mode 100644
index dbb12fd2df5..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/BUGS
+++ /dev/null
@@ -1,21 +0,0 @@
-Reporting bugs:
-
- If you find any bugs in this MPEG video audio player,
- please report them to
-
- scen@cse.ogi.edu.
-
- Since this software
- is unsupported, we make no guarantee about how long it will
- take to fix the bugs, or if it will be fixed at all. Bug fixes
- will be cheerfully accepted. Please include as much detailed
- information as possible, including:
-
- 1) the version number of the program you are using (cf. VERSION)
- 2) the data file that caused the bug (if possible)
- 3) the OS version and machine type you ran the program on
- 4) the compiler used to compile the program
-
-Known problems:
-
- Please see man page vcr(1) for a list of them.
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/COPYING b/TAO/orbsvcs/tests/AVStreams/mpeg/COPYING
deleted file mode 100644
index a43ea2126fb..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL b/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL
deleted file mode 100644
index 20c5d01aae5..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL
+++ /dev/null
@@ -1,231 +0,0 @@
-Following are the instructions for installing the distributed
-real-time MPEG video and audio player.
-
-To install this MPEG video audio player on an architecture, you need
-to login to a machine of the same architecture, and follow the
-instructions below.
-
-Building this software needs a Motif environment.
-
-The player can be built to have or not to have audio capacity. If your
-workstation or X-terminal has audio output, you may want to play audio
-with the player.
-
-Audio can be supported either through native audio device or
-AudioFile. If you want to build the player to use AudioFile, you need
-AudioFile client environment: header files and libraries. Those who
-are interested in getting AudioFile may want to follow the pointer(ftp
-or WWW):
-
- file://crl.dec.com/pub/DEC/AF/
-
-Upon reading this file, you should have uncompressed and untared the
-file vcr.tar.Z. Suppose you are now in the root directory of the
-source tree, which contains this file and several other files as well
-as a source subdirectory ./source.
-
-Prior to installation, please read all files 'INSTALL*', and 'README*'
-in current directory, to get more information.
-
-The software and Makefile's are coded so that you can build the player
-for several architectures at the same time, without copying the source
-code, or making symbolic links to source files.
-
-There are plenty of sample Makefile's in directory ./source for
-architectures HPUX (Makefile.ohp[.debug|.static]), SunOS4 for
-Sparc-stations (Makefile.osun4[.debug|.static]), Solaris 2.4 for x86
-(Makefile.osolpc[.debug]) and Solaris 2.x for SparcStation
-(Makefile.solsparc). Makefile's with suffix '.debug' are with
-debugging mode turned on, otherwise most optimizations are turned on.
-
-Also you will find a file 'Makefile.rules'. This file contains all
-dependency information, which is independent from specific environment
-setting. This file is included by all other sample Makefile's in that
-directory. Separate 'Makefile.rules' make it easier for you to
-understand and modify the sample Makefile's, and/or create your own
-Makefile's.
-
-The Makefile's in ./source defines following variables:
-
- LIBDIRS -- a list of internal library directories your version
- of binaries need.
- CC -- name of the compiler used.
- CFLAGS -- flags for the compiler. This should also include
- paths of the header files for X11, AudioFile, etc.
- In the sample Makefile's, the pathes are defined by
- the name INCLUDEDIR.
- LD -- name of the linker used.
- LDFLAGS -- flags for the linker.
- AR -- name and options of archive mantenance program
- RANLIB -- name an option of ranlib, if your platform (like SunOS4)
- needs ranlib, you need to define this, otherwise leave it
- undefined.
- CLIBS -- a list of external libraries for client, like X11,
- Xm, AF, etc. including the paths of these libraries,
- if they are not in default path.
- CILIBS -- a list of internal libraries for client, each element
- in this list should be in a directory listed in LIBDIRS.
- SLIBS -- a list of external libraries for server, like X11,
- Xm, AF, etc. including the paths of these libraries,
- if they are not in default path.
- SILIBS -- a list of internal libraries for server, each element
- in this list should be in a directory listed in LIBDIRS.
-
-The Makefile's finally include the 'Makefile.rules' in ./source.
-
-In the definition of the name CFLAGS, one or more of following micros
-may need to be defined through '-D' compiler option, for compiling the
-client and/or the server:
-
- Shared by client and server:
-
- SunOS -- If you are building the player on SunOS4. For both
- the client and the server.
- __srv4__ -- If you are building the player on Solaris 2.x.
- For both the client and the server.
- _HPUX_SOURCE -- If you are building the player on HPUX.
- For both the client and the server.
- ULTRIX -- If you are building the player on Ultrix 4.x. For
- both the client and the server
- IRIX -- For SGI IRIX 5.x
- FreeBSD -- For FreeBSD 2.x
- LINUX -- For Linux 1.x
-
- BIG_ENDIAN -- If you are building the player on big-endian
- machines, like HP and SunSPARC. For both the
- client and the server.
- LITTLE_ENDIAN -- If you are building the player on little-endian
- machines, like x86 PC and DEC MIPS. For both the
- client and the server.
-
- STAT -- If you want to build the player WITH the code for
- statistics. For both the client and the server.
-
- NDEBUG -- If you want to include assertion checking in the
- player. For both the client and the server.
-
- Used by client only:
-
- AUDIOFILE -- If you want to build the player to output audio
- to AudioFile server. You need to have at least
- AudioFile client side library to use AudioFile.
- Otherwise, you may access directly audio devices.
- SH_MEM -- If you want the player to output to X-window via
- shared memory. For the client only.
-
-
-Following are the steps for installing the software, with
-installing on HPUX as an example.
-
-If you are installing on an architecture other than HPUX, you may want
-to create working directories with different names. If your
-architecture is in above architecture list, you may want to make use
-of the sample Makefile's for your architecture instead of HPUX, and
-edit them to suit your environment.
-
-If you are porting the player to an architecture which is not in above
-list, you may need to create your own Makefile's. Nevertheless, you
-will find useful hints from existing sample Makefile's. Among other
-things, choose to define BIG_ENDIAN or LITTLE_ENDIAN in CFLAGS
-depending on the endianness of your platform, and you may need to
-define a name for your porting, like SunOS ULTRIX etc. mentioned
-above. Also, you may need to modify some architecture specific code,
-which is usually around where names like ULTRIX, _HPUX_SOURCE or
-__svr4__ show up.
-
-Suppose now you are to build the player on the HPUX architecture, in
-working subdirectory ./hpux. In fact, you can choose any names you
-like for this working directory.
-
-Now, you have or will create following directories for building the
-software:
-
-./ -- root directory for the source package.
-./source -- source code directory tree.
-
-Above directories have been created automatically when you untar the
-source package. You will create following working directory for
-compiling the software.
-
-./hpux -- directory for building the whole package.
-
-
-Steps for building the package on HPUX
-
-(1).
- % mkdir ./hpux
- % cd ./hpux
- % tar xf ../dirtree.tar
- % ln -s ../source/Makefile.hp Makefile
-
-(2). Edit ./Makefile, to suit your environment.
-
-(3).
- % make
- % make clean
- % cd ..
-
-If no error is reported, you should have got ./hpux/vcrs, the server
-program, and ./hpux/vcr, the client programs of the player.
-
-In editing the Makefile's, make sure to set right values to all
-variables like CC, CFLAGS, etc., so that the right compiler is chosen,
-the right compile flags are set, the header files and the libraries
-for TCP/UNIX socket are accessible when compiling both the server and
-the client, and the header files and the libraries for X11,
-X11-toolkit, Motif, and AudioFile (if applicable) are all accessible
-when compiling the client. Also make sure you set all reasonal
-compile-time optimization flags on with CFLAGS. This makes things
-different, because the client takes very much CPU time to decode video
-frames.
-
-If you have problem with the meaning of CC, CFLAGS, LD, LDFLAGS,
-etc. or the syntax or structure of the Makefile's you are to edit or
-create, please read the man page of 'make'. If you are not sure which
-compiler to use and what compile and link flags to set, please find
-out the compilers available in your system (usually they are 'cc' or
-'gcc') and read their man pages.
-
-Only compilers accepting prototypes will compile successfully. gcc is
-one of them. The Makefiles in this package work with 'make' programs
-which support pattern match rules. gnu make is one of them.
-
-3. Install the compiled programs into proper directories
-
-For example, suppose you are in the root dir of the source kit, and
-want to install the player in /usr/local, run following commands:
-
- % cp ./vcr.1 ./vcrs.1 /usr/local/man/man1/.
- % cp ./hpux/vcrs ./hpux/vcr /usr/local/bin/.
-
-
-4. Run the player.
-
-(1). Start the server program on hosts on which there are video and/or
-audio files to be played. Refer to vcrs(1) for instructions.
-
-(2). Set environment for accessing AudioFile, X, Motif, start the client
-program. Refer to vcr(1) for instructions. Following are sample steps
-(assume you are using csh on Sparc-station, and use AudioFile):
-
- % set path=(/usr/local/bin $path)
- % setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
- % setenv DISPLAY hostname:0.0
- % Asparc &
- % ahost hostname
- % vcr
-
-(3). The first invocation of the client programs will create a
-directory $(HOME)/.vcr, and a movie list file $(HOME)/.vcr/vcrPrograms
-with default movie list. After the first invocation, edit the movie
-list file to include all your favorite programs in this file, and
-invoke the client again to play your favorite programs. Refer to man
-page vcr(1) for structure of this file.
-
-5. Add yourself to our mailing list by sending a mail (with your name
-and email address) to the following address, so that we can keep you
-informed of software upgrade and bug fix.
-
- scen@cse.ogi.edu
-
-If you experience any problem, please read file BUGS for bug report.
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB b/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB
deleted file mode 100644
index 38a656a538b..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB
+++ /dev/null
@@ -1,105 +0,0 @@
-These are the instructions for compiling mpeg_play, the software MPEG
-decoder and player.
-
-1) Untar the file mpeg_play.tar.Z. This is best done by creating a new
-directory for the files involved, moving the tar file into this directory
-and invoking the command:
-
- zcat mpeg_play-2.0.tar.Z | tar xvf -
-
-2) Create and customize the Makefile. Do this by copying the file
-Makefile.proto to Makefile. Then edit Makefile for your particular needs.
-
-In the makefile the CFLAGS definition is multiply defined for a couple of
-different machines, uncomment the one you want to use, or define your own
-if necessary.
-
-The INCLUDEDIR variable should be set to include the paths leading to the
-standard header files such as stdio.h as well as to X11/Xlib.h (on most
-systems, this is /usr/include). To do this set the INCLUDEDIR variable to
--I followed by the pathname. For example, if the path is /usr/local/include,
-edit the Makefile to look like this:
-
- INCLUDEDIR = -I/usr/local/include
-
-If more than one pathname is necessary, simply prepend -I to each path.
-For example if you needed to include /usr/local/include and /usr/X11/include,
-the variable definition would look like:
-
- INCLUDEDIR = -I/usr/local/include -I/usr/X11/include
-
-Finally, make sure the LIBS variable is set to the path and name of your X11
-library. For example:
-
- LIBS = /usr/lib/X11/libX11.a
-
-3) Type make all.
-
-4) To remove .o files, type make clean
-
-5) Add yourself to the mailing list by sending mail to
- mpeg-list-request@roger-rabbit.cs.berkeley.edu with the subject line
- "ADD" (you can delete yourself by sending the subject line "DEL").
- If you are a uunet user, you can use the mail path
- 'uunet!ucbvax!roger-rabbit.cs!mpeg-list-request'
-
- mail mpeg-list-request@roger-rabbit.cs.berkeley.edu
- Subject: ADD
- ^D
-
-6) Try it out! You can ftp some sample data files from the same site
- you got this player from. Data files usually end in .mpg or .mpeg
- The command line for the player is described in the man page, but
- is basically:
-
- mpeg_play [options] [file_name]
-
-7) If you want the player to collect statistics on size of frames,
- macroblocks, time to decode, etc., add the following to the
- definition of CFLAGS in the Makefile:
- -DANALYSIS
- Remove all .o files with "make clean" and remake with "make all"
- The player will now print summarized statistics at the end of the
- video clip and can be made to print frame by frame statistics with
- the use of the -eachstat flag. Read man page for more info.
-------------------------------------------------------------------------
-
-Using Imake
-
-We have included an Imakefile for use with Imake. Since we do not use
-Imake ourselves and the file was provided by someone else, we can not
-give any specific instructions on how to use it. Please, consult
-someone more experienced with Imake.
-Thanks.
-
-------------------------------------------------------------------------
-NOTES
-
-It seems that much of the time is spent converting the 24 bit MPEG image
-to an 8 bit color space. This process is called "dithering". We've included
-several dithering algorithms. Read the man pages for more instructions.
-
-The data files available are produced by XING. These images are
-usually small (~160X120). XING data does not take advantage
-of P or B frames (ie, frames with motion compensation). The data is simply
-a series of I frames. Performance of the player on XING data is
-significantly lower (half or less) of the performance when motion compensated
-MPEG data is decoded.
-
-Reporting bugs:
- If you find any bugs in this software, please send them to
- mpeg-bugs@roger-rabbit.cs.berkeley.edu. Since this software
- is unsupported, we make no guarantees about how long it will
- take to fix the bug, or if it will be fixed at all. Bug fixes
- will be cheerfully accepted. Please include as much detailed
- information as possible, including:
-
- 1) the version number of the program you are using (cf. VERSION)
- 2) the data file that caused the bug (if possible)
- 3) the OS version and machine type you ran the program on
- 4) the compiler used to compile the program
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel b/TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel
deleted file mode 100644
index fc8384029fb..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel
+++ /dev/null
@@ -1,12 +0,0 @@
-
-1. Current patch level: version 2.0, patch level 1
-
-Sun Jun 9 12:26:16 PDT 1996
-
-(1). Port to linux 1.3
-(2). Reduce the number of semaphores used in the client to ONE.
-(3). Various bug fix
-
-2. Patch level: version 2.0, patch level 0
-
-Tue Nov 28 14:14:58 PST 1995
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README b/TAO/orbsvcs/tests/AVStreams/mpeg/README
deleted file mode 100644
index 26a835dac7f..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/README
+++ /dev/null
@@ -1,142 +0,0 @@
- Distributed real-time MPEG video audio player v2.0
-
- Distributed Systems Research Group
- Department of Computer Science and Engineering
- Oregon Graduate Institute of Science & Technology
- November, 1995
-
-
-This directory contains a freely available software distributed
-real-time MPEG video and audio player, for use across the
-Internet. Please install it, run it, play movies and music, and have
-fun !
-
-The player features common VCR functionalities like synchronized video
-and audio play back, play speed change on the fly, fast-forward, rewind,
-step forward, random Positioning, and more.
-
-This version of the player plays MPEG1 video (elementary stream) and
-Sun Sparc format (mu-law) audio. It does not play MPEG1 system streams
-or MPEG2 streams yet.
-
-The player is of server/client architecture, with audio/video servers
-and a client distributed across the Internet. The server manages audio
-video file retrieval and distribution. The client decodes video
-frames, plays video and audio streams, and provides a Motif style user
-interface.
-
-The servers stream out media data to clients, so there is NO NEED to
-download all bits beforehand.
-
-Some important characteristics of Internet are resource sharing,
-highly dynamic workload, no resource reservation facility, and lack of
-a common clock. This player uses novel software feedback mechanisms
-to synchronize servers and clients, and to adapt playback quality to
-the current Internet workload.
-
-
-As compared to version 1.0, this version has following improvements:
-
- - UDP/TCP video audio data connection choice
- - support of both native audio device and AudioFile
- - client invocable from web browser
- - better organized source code tree
- - bug fix
- - and more...
-
-
-The player has been compiled and tested on following architectures:
-
- HP-UX 09.03
- SunOS 4.1.3_U1 (sparc)
- Solaris 2.3 (sparc)
- Solaris 2.4 (i86pc)
- Solaris 2.4 (sparc)
- Ultrix 4.x
- FreeBSD 2.0.5
- LINUX 1.3
-
-If you decide to port the player to a new architecture, please let
-us know so that we can incorporate the changes into our sources.
-
-
-The player is publicly available via anonymous ftp from:
-
- ftp.cse.ogi.edu (129.29.20.2) in /pub/dsrg/Player/
-
-or through following WWW pointer:
-
- http://cse.ogi.edu/DISC/projects/synthetix/Player/
-
-To install the player, ftp file vcr.tar.Z to local host, move it to a
-suitable directory (best to create a new directory for this software),
-uncompress and untar the .Z file, and see INSTALL for instructions.
-Following is an example of steps to ftp and untar the package:
-
- % mkdir vcr
- % cd vcr
- % ftp ftp.cse.ogi.edu
- *** login as anonymous and your email address as passwd ***
- ftp> cd pub/dsrg/Player
- ftp> binary
- ftp> get README
- ftp> get vcr.tar.Z
- ftp> quit
- % gunzip vcr.tar.Z (or you may also use 'uncompress vcr.tar.Z')
- % tar xf vcr.tar
-
-Binary code for platforms HPUX, Solaris 2.4 for x86, Solaris 2.x for
-Sparc, SunOS4.1.3 and FreeBSD are also available in directory
-/pub/dsrg/Player/binaries/.
-
-
-This software is covered by copyrights. It contains code contributed
-by the author and several other parties. Please see the beginning of
-source files and copyright file(s) in the root directory of the source
-tree for more information.
-
-
-Please add yourself to our mailing list by sending a mail (with your
-name and address) to following address, so that we can keep you
-informed of software upgrade and bug fix.
-
- scen@cse.ogi.edu
-
-
-We would highly appreciate it if you can share with us the performance
-result you get when you play movies retrieved from the OGI
-server. Please let us know following information:
-
- - The platform you use for the client.
-
- - How many hops from your site to OGI, and what is the
- estimated bandwidth,
-
- - Which picture size (320x240, 256x192, 128x96 or 64x48)
- works best for you, and on average how many
- frames-per-second can be displayed.
-
- - Questions, comments, suggestions, and bug report.
-
-Information can also be sent to: scen@cse.ogi.edu Thank you!
-
-
-ACKNOWLEDGMENT
-
-We gratefully thank ARPA and the National Science Foundation for their
-financial support, and thank Tektronix, Hewlett-Packard and the
-Portland Trail Blazers for their donations.
-
-We also want to thank following people for their code:
-
- Lawrence A. Rowe, Ketan Patel, and Brian Smith of Computer Science
- Division-EECS, Univ. of Calif. at Berkeley. The MPEG decoder used by
- the client of the player is originated from their MPEG decoder 2.0
-
- Thomas M. Levergood, Andrew C. Payne, James Gettys, G. Winfield
- Treese, and Lawrence C. Stewart of Cambridge Research Lab, Digital
- Equipment Corporation. The player uses AudioFile as audio output.
-
- Daeron Meyer of the Geometry Center, University of Minnesota. The
- Motif user interface is based on his version.
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README.MI b/TAO/orbsvcs/tests/AVStreams/mpeg/README.MI
deleted file mode 100644
index 85a3069e979..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/README.MI
+++ /dev/null
@@ -1,39 +0,0 @@
-Hello animation addicts,
-
-I'll be brief. This is the modified source of mpeg_play that has a new motif
-user interface (finally!). I hope you will enjoy spending many hours using it!
-This is a very rough first release and the source files + make files are not
-particularly well organized. You might have to do a lot of hand tweaking to get
-it to compile.
-
-Here are some helpful hints:
-
-/mib directory contains the source for my mib interface construction toolkit
- which is really just a wrapper around motif. This is the majority of the
- new code and is the same toolkit I used for the X11 version of Geomview
- (3d visualization program), also available via ftp from geom.umn.edu.
-
-/interface directory contains the bitmaps for buttons, and the interface
- geometry specified with .mib files.
-
-ui.c file contains the code which sets up the interface and processes button
- callbacks.
-
-More minor modifications were made to gdith.c util.c util32.c and video.c.
-
-To compile you will need a decent compiler (gcc works the best!), as well as
-the X11, Xt, and Xm (motif) libraries.
-
-You must first get mib/libmib.a to be created. The Makefile in /mib should take
-care of this when properly tweaked. The main makefile should handle linking the
-library into the mpeg_play binary.
-
-If you have any questions or need help with the compile feel free to send me
-mail, but I may take a while to respond. I tend to correspond with quite a
-few people about many different things.
-
-best wishes,
-
-Daeron Meyer
-
-daeron@geom.umn.edu
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB b/TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB
deleted file mode 100644
index 3c122f92421..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB
+++ /dev/null
@@ -1,105 +0,0 @@
- MPEG Video Software Decoder
- (Version 2.0; Jan 27, 1993)
-
- Lawrence A. Rowe, Ketan Patel, and Brian Smith
- Computer Science Division-EECS, Univ. of Calif. at Berkeley
-
-This directory contains a public domain MPEG video software
-decoder. The decoder is implemented as a library that will
-take a video stream and display it in an X window on an 8, 24
-or 32 bit deep display. The main routine is supplied to
-demonstrate the use of the decoder library. Several dithering
-algorithms are supplied based on the Floyd-Steinberg, ordered
-dither, and half-toning algorithms that tradeoff quality and
-performance. Neither the library nor the main routine handle
-real-time synchronization or audio streams.
-
-The decoder implements the standard described in the Committee
-Draft ISO/IEC CD 11172 dated December 6, 1991 which is
-sometimes refered to as "Paris Format." The code has been
-compiled and tested on the following platforms:
-
- HP PA-RISC (HP/UX 8.X, X11R4) (i.e., HP 9000/7XX and 9000/3XX)
- Sun Sparc (SunOS 4.X, X11R5)
- DECstation 5000 and Alpha
- IBM RS6000
- Silicon Graphics Indigo
- MIPS RISC/os 4.51
- Sequent Symmetry
- Sony NEWS
- and more than we can list here.
-
-If you decide to port the code to a new architecture, please let
-us know so that we can incorporate the changes into our sources.
-
-This directory contains everything required to build and
-display video. We have included source code, a makefile, an Imakefile,
-installation instructions, and a man page. Data files can
-be obtained from the same ftp site this was located in.
-See the INSTALL file for instructions on how to
-compile and run the decoder.
-
-The data files were produced by XING. XING data does not take
-advantage of P or B frames (ie, frames with motion compensation).
-Performance of the player on XING data is significantly slower
-(half or less) than the performance when motion compensated MPEG
-data is decoded. We are very interested in running the software
-on other MPEG streams. Please contact us if you have a stream
-that does not decode correctly. Also, please send us new streams
-produced by others that do utilize P and B frames.
-
-NOTE: One particular XING data file: raiders.mpg, is not a
-valid MPEG stream since it does not contain a sequence
-header.
-
-We have established several mailing lists for messages about
-the decoder:
-
-mpeg-list-dist@CS.Berkeley.EDU
- General information on the decoder for everyone interested
- should be sent to this list. This should become active after
- 11/20/92
-
-mpeg-list-request@CS.Berkeley.EDU
- Requests to join or leave the list should be sent to this
- address. The subject line should contain the single word
- ADD or DELETE.
-
-mpeg-bugs@CS.Berkeley.EDU
- Problems, questions, or patches should be sent to this address.
-
-Our future plans include porting the decoder to run on other
-platforms, integrating it into a video playback system that
-supports real-time synchronization and audio streams, and
-further experiments to improve the performance of the
-decoder. Vendors or other organizations interested in supporting
-this research or discussing other aspects of this project should
-contact Larry Rowe at Rowe@CS.Berkeley.EDU.
-
-We also plan on producing an MPEG encoder. The encoder will NOT be
-a real time digitizer, but will be intended for offline processing
-of video data.
-
-ACKNOWLEDGEMENTS:
- We gratefully thank Hewlett-Packard, Fujitsu, the Semiconductor
- Research Corporation for financial support.
-
- We also want to thank the following people for their help:
-
- Tom Lane of the Independent JPEG Group provided us with
- the basic inverse DCT code used by our player.
- (tom_lane@g.gp.cs.cmu.edu)
-
- Reid Judd of Sun Microsystems provided advice and assistance.
-
- Todd Brunhoff of NVR provided advise and assistance.
-
- Toshihiko Kawai of Sony provided advise and assistance.
-
-
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/VERSION b/TAO/orbsvcs/tests/AVStreams/mpeg/VERSION
deleted file mode 100644
index b8dcb387060..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-Distributed real-time MPEG video and audio player version 2.0
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile
deleted file mode 100644
index a8a1dd46c92..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-## $Id$
-#----------------------------------------------------------------------------
-# @(#)Makefile 1.1
-#
-# Makefile for MPEG stuff
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-INFO = README
-
-DIRS = mpeg_shared \
- mpeg_mib \
- mpeg_server \
- mpeg_client \
- client \
- server
-
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat -I$(TAO_ROOT)/orbsvcs -I$(TSS_ORB_FLAG)#-H
-
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO b/TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO
deleted file mode 100644
index 4404841b20d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO
+++ /dev/null
@@ -1,57 +0,0 @@
-$Id$
-
-Use - for things to do, * for urgent things, and + for things that
-have been done.
-
-Things to do
-------------
-
-"Simple" things
-
-- Remove kerberos warnings
-
-+ Need to fix the following warnings:
- "Video_Server.cpp", line 880: Warning: para hides Video_Server::para.
- "Video_Server.cpp", line 906: Warning: para hides Video_Server::para.
-
-+ Seg fault while exiting
- Destructor of reactor crashes the server
- -- I think I've fixed this! Naga, can you confirm that it doesnt crash
- anymore ?
-
-+ Parent-Child relationship
- -- parent goes back and listens for new connections
- -- child handles this connection
-
-- rttag is enabled with -r
- does it work ?
-
-+ rename Mpeg_Server to AV_Server
-
-- Make #define's into enums in common.h/globals.h
-
-+ Change handle_input to handle_connection in
- Mpeg_Svc_Handler
-
-+ Video_Sig_Handler is in Mpeg_Server -- needs to be moved to Video_Server
- -- done
-
-+ Split up VIDEO_FAST into two commands - VIDEO_FAST_{FORWARD,BACKWARD}
-
-+ create a helper class for video, and put FBread et al in that
-
-- try compiling ACE and the application with fast=1 to see if
- performance improves
-
-- Rename "play", "play_send" etc. appropriately
-
-
-
-"Not-so-simple" things
-
-
-- Logic for Video_Server is convoluted!!
-
-- Need to modularize Audio_Server
-
-- Seperate command parsing in its own class
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile
deleted file mode 100644
index e2690e8d94c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile
+++ /dev/null
@@ -1,78 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-BIN = vcr
-
-BUILD = $(BIN)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-FILES= vcr
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-
-LIBS += -lTAO -lACE
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-LDFLAGS += -lmpeg_shared -lmpeg_mib -lmpeg_client -lXm -lXext -lXt -lSM -lICE -lX11 -lsocket -lnsl -ldl
-CPPFLAGS += -i -I../mpeg_client/ -DSH_MEM -DNDEBUG -DSunOS -DSTAT -I/project/doc/pkg/X11/include -L../mpeg_client/ -L/project/doc/pkg/X11/lib
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/vcr.o .obj/vcr.so .shobj/vcr.o .shobj/vcr.so: vcr.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp
deleted file mode 100644
index c94d9b360a9..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp
+++ /dev/null
@@ -1,472 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/wait.h>
-#ifndef MIPS
-#include <netinet/in.h>
-#else
-#include <bsd/netinet/in.h>
-#endif
-#if defined(SunOS) || defined(FreeBSD)
-#include <stdlib.h>
-#endif
-#include <time.h>
-#include <sys/time.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/sem.h>
-
-#include "include/common.h"
-
-#include "video.h"
-#include "proto.h"
-#include "newproto.h"
-#include "global.h"
-
-#include "util.h"
-#include "dither.h"
-
-#include "mpeg_shared/routine.h"
-
-static int mainPid;
-
-static time_t start_time;
-/*
- *--------------------------------------------------------------
- *
- * usage --
- *
- * Print mpeg_play usage
- *
- * Results:
- * None.
- *
- * Side effects:
- * exits with a return value -1
- *
- *--------------------------------------------------------------
- */
-
-void
-usage(char *s) /* program name */
-{
- fprintf(stderr, "Usage:\n");
- fprintf(stderr, "%s [-rt] [-shmem] [-rmsem]\n", s);
- fprintf(stderr, " [-dither ordered|ordered2|fs4|fs2|fs2fast|hybrid|\n");
- fprintf(stderr, " hybrid2|2x2|gray|color|mono|threshold]\n");
- fprintf(stderr, " [X-window options]\n");
- fprintf(stderr, " [-v [host_name:]video_file_name]\n");
- fprintf(stderr, " [-a [host_name:]audio_file_name]\n");
-
- fprintf(stderr, " [-p movie_file_name]\n");
- fprintf(stderr, " [-l movie_list_file_name]\n");
-
- fprintf(stderr, " [-help]\n");
- fprintf(stderr, " [-quiet]\n");
-
- exit (-1);
-}
-
-/*
- *--------------------------------------------------------------
- *
- * int_handler --
- *
- * Handles Cntl-C interupts..
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static int on_exit_tag = 1;
-
-void set_exit_routine_tag(int tag)
-{
- on_exit_tag = tag;
-}
-void on_exit_routine(void)
-{
- if (!on_exit_tag)
- return;
- if (mainPid == getpid())
- {
- extern void delete_semaphore();
- ABdeleteSem();
- VBdeleteSem();
- VDdeleteSem();
- delete_semaphore();
- if (getuid() != DEVELOPER_UID)
- {
- FILE * fp;
- char *buf = (char *)malloc(100);
- char *tbuf;
- if (buf != NULL) {
- sprintf(buf, "%s%s", LOG_DIR, "vcrSession.log");
- if ((fp = fopen(buf, "a")) != NULL) {
- time_t val = time(NULL);
- get_hostname(buf, 100);
- buf[99] = 0;
- tbuf = ctime(&start_time);
- tbuf[strlen(tbuf) - 1] = 0;
- fprintf(fp, "User %d on %s at %s %dm%ds\n", getuid(), buf,
- tbuf, (val - start_time) / 60, (val - start_time) % 60);
- }
- free(buf);
- }
- }
- }
- on_exit_tag = 0;
- kill(0, SIGINT);
-}
-
-static void int_handler(int sig)
-{
- exit(0);
-}
-
-static void clear_child(int sig)
-{
- int pid;
- int status;
-
- while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
- {
- if (status == 0) {
- continue;
- }
- fprintf(stderr, "VCR: child %d (status %d) ", pid, status);
- if (WIFEXITED(status)) {
- fprintf(stderr, "exited with status %d\n", WEXITSTATUS(status));
- }
- else if (WIFSIGNALED(status)) {
-#if defined(_HPUX_SOURCE) || defined(__svr4__) || defined(IRIX)
- fprintf(stderr, "terminated at signal %d%s.\n", WTERMSIG(status),
- WCOREDUMP(status) ? ", core dumped" : "");
-#else
- fprintf(stderr, "terminated at signal %d.\n", WTERMSIG(status));
-#endif
- }
- else if (WIFSTOPPED(status)) {
- fprintf(stderr, "stopped at signal %d\n", WSTOPSIG(status));
- }
-
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * main --
- *
- * Parses command line, starts decoding and displaying.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-int main(int argc, char ** argv)
-{
-
- int mark;
- int rmsemFlag = 0;
-
- argc_share = argc;
- argv_share = argv;
- mark = 1;
- argc--;
-
- displayName[0] = 0;
- ditherType = ORDERED2_DITHER;
- LUM_RANGE = 8;
- CR_RANGE = CB_RANGE = 4;
- noDisplayFlag = 0;
-
-#ifdef SH_MEM
- shmemFlag = 0;
-#endif
-
- if (getenv("DISPLAY")!= NULL)
- {
- char * disp = getenv("DISPLAY");
- if (strncmp(disp, "anquetil:0", 10) == 0 ||
- strncmp(disp, "helix:0", 7) == 0 ||
- strncmp(disp, "hinault:0", 9) == 0 ||
- strncmp(disp, "lemond:0", 8) == 0 ||
- strncmp(disp, "indurain:0", 10) == 0)
- ditherType = ORDERED_DITHER;
- else
- ditherType = ORDERED_DITHER;
- }
-
- while (argc) {
- if (strcmp(argv[mark], "-rt") == 0) {
- realTimeFlag = 1;
- argc--; mark++;
- }
- else if (strcmp(argv[mark], "-rt1") == 0) {
- realTimeFlag = 2;
- argc--; mark++;
- }
- else if (strcmp(argv[mark], "-rt2") == 0) {
- realTimeFlag = 3;
- argc--; mark++;
- }
- else if (strcmp(argv[mark], "-shmem") == 0) {
- argc--; mark++;
- shmemFlag = 1;
- }
- else if (strcmp(argv[mark], "-rmsem") == 0) {
- argc--; mark++;
- rmsemFlag = 1;
- }
-#if 0
- else if (strcmp(argv[mark], "-nop") == 0) {
- TogglePFlag();
- argc--; mark++;
- } else if (strcmp(argv[mark], "-nob") == 0) {
- ToggleBFlag();
- argc--; mark++;
- }
-#endif
- else if (strcmp(argv[mark], "-l") == 0) { /* program list file name */
- strcpy(proglistName, argv[++mark]);
- argc -= 2; mark++;
-
- } else if (strcmp(argv[mark], "-display") == 0) {
- strcpy(displayName,argv[++mark]);
- argc -= 2; mark++;
- } else if (strcmp(argv[mark], "-dither") == 0) {
- argc--; mark++;
- if (argc < 1) {
- perror("Must specify dither option after -dither flag");
- usage(argv[0]);
- }
- if (strcmp(argv[mark], "hybrid") == 0) {
- argc--; mark++;
- ditherType = HYBRID_DITHER;
- } else if (strcmp(argv[mark], "hybrid2") == 0) {
- argc--; mark++;
- ditherType = HYBRID2_DITHER;
- } else if (strcmp(argv[mark], "fs4") == 0) {
- argc--; mark++;
- ditherType = FS4_DITHER;
- } else if (strcmp(argv[mark], "fs2") == 0) {
- argc--; mark++;
- ditherType = FS2_DITHER;
- } else if (strcmp(argv[mark], "fs2fast") == 0) {
- argc--; mark++;
- ditherType = FS2FAST_DITHER;
- } else if (strcmp(argv[mark], "hybrid2") == 0) {
- argc--; mark++;
- ditherType = HYBRID2_DITHER;
- } else if (strcmp(argv[mark], "2x2") == 0) {
- argc--; mark++;
- ditherType = Twox2_DITHER;
- } else if (strcmp(argv[mark], "gray") == 0) {
- argc--; mark++;
- ditherType = GRAY_DITHER;
- } else if (strcmp(argv[mark], "color") == 0) {
- argc--; mark++;
- ditherType = FULL_COLOR_DITHER;
- }
- /*
- else if (strcmp(argv[mark], "none") == 0) {
- argc--; mark++;
- ditherType = NO_DITHER;
- }
- */
- else if (strcmp(argv[mark], "ordered") == 0) {
- argc--; mark++;
- ditherType = ORDERED_DITHER;
- } else if (strcmp(argv[mark], "ordered2") == 0) {
- argc--; mark++;
- ditherType = ORDERED2_DITHER;
- }
- /*
- else if (strcmp(argv[mark], "mbordered") == 0) {
- argc--; mark++;
- ditherType = MBORDERED_DITHER;
- }
- */
- else if (strcmp(argv[mark], "mono") == 0) {
- argc--; mark++;
- ditherType = MONO_DITHER;
- } else if (strcmp(argv[mark], "threshold") == 0) {
- argc--; mark++;
- ditherType = MONO_THRESHOLD;
- } else {
- perror("Illegal dither option.");
- usage(argv[0]);
- }
- }
- else if (strcmp(argv[mark], "-quiet") == 0) {
- argc--; mark++;
- quietFlag = 1;
- }
- else if (strcmp(argv[mark], "-l_range") == 0) {
- argc--; mark++;
- LUM_RANGE = atoi(argv[mark]);
- if (LUM_RANGE < 1) {
- fprintf(stderr, "Illegal luminance range value: %d\n", LUM_RANGE);
- exit(1);
- }
- argc--; mark++;
- }
- else if (strcmp(argv[mark], "-cr_range") == 0) {
- argc--; mark++;
- CR_RANGE = atoi(argv[mark]);
- if (CR_RANGE < 1) {
- fprintf(stderr, "Illegal cr range value: %d\n", CR_RANGE);
- exit(1);
- }
- argc--; mark++;
- }
- else if (strcmp(argv[mark], "-cb_range") == 0) {
- argc--; mark++;
- CB_RANGE = atoi(argv[mark]);
- if (CB_RANGE < 1) {
- fprintf(stderr, "Illegal cb range value: %d\n", CB_RANGE);
- exit(1);
- }
- argc--; mark++;
- }
- else if (strcmp(argv[mark], "-help") == 0) {
- usage(argv[0]);
- }
- else {
- argc--; mark++;
- }
- /*
- else if (argv[mark][0] == '-') {
- fprintf(stderr, "Un-recognized flag %s\n",argv[mark]);
- usage(argv[0]);
- }
- */
- /* the input video and audio files with options '-v', '-a' and '-p' are processed
- at the end of 'ui.c' */
- }
- if (ditherType == MBORDERED_DITHER)
- {
- fprintf(stderr, "Sorry, mbordered dithertype no longer supported.\n");
- exit(1);
- }
- // setsignal(SIGCHLD, clear_child);
- // setsignal(SIGINT, int_handler);
- // setsignal(SIGHUP, int_handler);
- /*
- setsignal(SIGKILL, int_handler);
- setsignal(SIGSEGV, int_handler);
- */
- // setsignal(SIGQUIT, int_handler);
- // setsignal(SIGTERM, int_handler);
- // setsignal(SIGALRM, SIG_IGN);
- setsignal(SIGPIPE, SIG_IGN);
-
-
- atexit(on_exit_routine);
-
- if (rmsemFlag) {
- if (geteuid() == 0) { /* root, refuse to remove shm and sem ids */
- fprintf(stderr, "You are ROOT, -rmsem is ignored 'cause it's too dangerous.\n");
- }
- else {
- char *tmpf = tempnam("/tmp", "");
- if (tmpf != NULL) {
- char buf[128];
- FILE *fp;
- sprintf(buf, "ipcs >%s", tmpf);
- system(buf);
- if ((fp = fopen(tmpf, "r")) != NULL) {
- while (fgets(buf, 128, fp) != NULL && (int)(strlen(buf)) > 10) {
- int id;
- sscanf(&buf[1], "%d", &id);
- if (buf[0] == 'm') {
- shmctl(id, IPC_RMID, NULL);
- }
- else if (buf[0] == 's') {
- semctl(id, 0, IPC_RMID, 0);
- }
- }
- fclose(fp);
- unlink(tmpf);
- }
- free(tmpf);
- }
- }
- }
-
- if (quietFlag) {
- if ((freopen("/dev/null", "w", stdout) == NULL) ||
- (freopen("/dev/null", "w", stderr) == NULL)) {
- exit(10);
- }
- }
-
- start_time = time(NULL);
-
- setsid(); /* break controlling terminal and creat a new session */
-
- mainPid = getpid();
-
- CTRmain();
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h
deleted file mode 100644
index ea7ebf0e638..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h
+++ /dev/null
@@ -1,588 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#if !defined (_MPEG_COMMON_H)
-#define _MPEG_COMMON_H
-
-//#include <sys/types.h>
-//#include <netdb.h>
-//#include <sys/socket.h>
-#include "ace/OS.h"
-/*
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <sys/un.h>
-*/
-
-extern int gethostname (char*, size_t);
-
-#define VERSION 200 /* version 2.00 */
-
-#ifdef LITTLE_ENDIAN
-#define NeedByteOrderConversion
-#elif !defined(BIG_ENDIAN)
-#if (defined(vax) || defined(i386) || defined(i486)) && !defined(NeedByteOrderConversion)
-#define NeedByteOrderConversion
-#endif
-#endif
-
-/*following is defined so that debuging information is printed out for only
- specific user (usually software developer), LOG_DIR is also defined */
-
-/*
-#define LOG_DIR "/home/shanweic/log/"
-#define DEVELOPER_UID 8640
-*/
-
-/* %% this is where the logging is done.." */
-#define LOG_DIR "./"
-#define DEVELOPER_UID 1735
-
-#define SFprintf if ((!getuid()) || getuid() == DEVELOPER_UID) fprintf
-#define Fprintf if (shared->config.verbose) fprintf
-
-#define VCR_TCP_PORT 7101
-#define VCR_UNIX_PORT "/tmp/vcr_unix_port01"
-#define VCR_ATM_PORT "3005"
-
-#define SPEEDUP_INV_SCALE 5 /* VS fast starts at 5/(5-1) normal speed */
-
-#define AB_BUF_SIZE (64 * 1024) /* size of client AB buffer */
-
-#if 0
-#define VB_BUF_SIZE (256 * 1024) /* Size of client VB buffer */
-#endif
-
-#define VB_BUF_SIZE (1024 * 1024) /* Size of client VB buffer */
-
-#define VD_BUF_SIZE (1024 * 1024) /* Size of client VD buffer */
-
-#define PATH_SIZE 256
-#define PATTERN_SIZE 100
-#define MAX_FRAMES 54000 /* half hour video at 30FPS */
-#define MAX_VDQUEUE_SIZE 20
-#define MAX_FB_PACKETS 20 /* max number of feedback packet info collected. */
-#define POSITION_RANGE 100
-#define MSGGAP_MIN -10 /* these are used for recording stat of
- msgs received by VB */
-#define MSGGAP_MAX 50
-
-#define INET_SOCKET_BUFFER_SIZE 1400
-
-/* audio type constants */
-
-#define AudioTypeMuLaw 0
-#define AudioTypeALaw 1
-#define AudioTypeRIFF 2
-#define AudioTypeLiner16 3
-#define AudioTypeLiner8 4
-#define AudioTypeLiner8Offset 5
-
-/* Video and audio compression format */
-
-#define VIDEO_MPEG1 0
-#define VIDEO_MPEG2 1
-#define VIDEO_JPEG 3
-#define VIDEO_SIF 4
-
-#define AUDIO_RAW 10
-#define AUDIO_MPEG1 11
-#define AUDIO_MPEG2 12
-
-
-/* system configuration default values */
-
-#define DEFAULT_maxFPS 60
-#define DEFAULT_maxSPS 16000
-#define DEFAULT_ffFPS 150
-#define DEFAULT_fbFPS 150
-#define DEFAULT_feedBackDelay 2000
-#define DEFAULT_audioMask 0x1
-#define DEFAULT_encodeType AudioTypeMuLaw
-#define DEFAULT_channels 1
-#define DEFAULT_samplesPerSecond 8000
-#define DEFAULT_bytesPerSample 1
-#define DEFAULT_audioTimerDuration 500
-#define DEFAULT_audioBufferedIntervals 2
-#define DEFAULT_framesPerAudioPlay 4
-#define DEFAULT_audioForward 800
-#define DEFAULT_filterPara 50
-#define DEFAULT_maxSPframes 60
-#define DEFAULT_VStimeAdvance 100
-
-#define DEFAULT_volume 0
-
-/* audio parameter data structure */
-
-typedef struct
-{
- int encodeType;
- int channels;
- int samplesPerSecond;
- int bytesPerSample;
-} AudioParameter;
-
-/* client processes shared data structure definition */
-
-typedef struct
-{
- int VDframeNumber;
- int VBbufId, VDbufId;
- char * VBbufAddr, * VDbufAddr;
- int pixelValid;
- unsigned char pixel[256]; /* for transfering pixel value from VP to VD */
-
- /* command and status */
- int cmd;
- int cmdsn;
- int cmdBusy;
-
- int loopBack;
-
- int framesPerSecond; /* Frames per second */
- int usecPerFrame; /* micro-seconds per frame, actual video speed */
- int samplesPerSecond; /* Samples per second */
- int usecPerSample; /* micro-seconds per sample, actual audio speed */
-
- int volumePosition;
- int balancePosition;
- int speedPosition;
- int locationPosition;
- struct hostent audioHost;
- char audioPath[PATH_SIZE];
- struct hostent videoHost;
- char videoPath[PATH_SIZE];
-
- int live; /* non-zero if any of the video/audio streams are live source */
- int videoFormat;
- int audioFormat;
-
- /* video channel parameters */
- int totalFrames;
- int totalGroups;
- int totalHeaders;
- int averageFrameSize;
- double pictureRate;
- int horizontalSize;
- int verticalSize;
- int pelAspectRatio;
- int vbvBufferSize;
- int firstGopFrames;
- int patternSize;
- char pattern[PATTERN_SIZE];
- int IframeGap;
- int VStimeAdvance;
-
- int lastIframeDecoded;
- int sendPatternGops;
- char sendPattern[PATTERN_SIZE];
- float frameRateLimit;
- int framesDropped;
- int qosRecomputes;
-
- /* video channel status */
- int currentGroup;
- int currentFrame;
- int currentDisplay;
- int nextFrame;
- int nextGroup;
-
- /* audio channel parameters */
- int totalSamples;
- AudioParameter audioPara;
-
- /* audio channel status */
- int nextSample; /* played by AP */
-
- /* AudioFile device parameter */
- AudioParameter AFPara;
-
- int currentUPF;
- int rtplay; /* realtime tag, -- VD needs to drop frames when needed */
- int collectStat; /* to indicate if statistics should be collected or not */
- int VBheadFrame; /* ID of last frame put to VBbuffer by VB */
- int needHeader; /* VD requests resending of systerm Header */
- int playRoundTripDelay; /* play round trip time (from issuing play/FF/FB
- command to first Decoded frame showup in
- VD buffer) estimated by CTR start_timer() */
- int audioMaxPktSize; /* 0 -- reliable byte stream,
- >0 - non-discard mode packet stream,
- <0 - discard mode packet stream */
- int videoMaxPktSize;
-
- /* System configuration parameters */
- struct
- {
- int rt; /* play as fast as possible without dropping frames,
- and audio turned off when this tag is set to 0 (zero)
- */
- int maxFPS; /* maximum PLAY frames-per-second, this play speed is used
- during playback when speed scale is set to 100 */
- int maxSPS; /* similar to maxFPS, used when audio is played without
- corresponding video
- */
- int ffFPS; /* play speed when Fast forward */
- int fbFPS; /* play speed when fast rewind */
- int feedBackDelay; /* msec, delay of feedback when AB, VB received first
- packet, 0 (zero) default to adaptive */
- int audioMask; /* mask for audio output device */
- AudioParameter audioPara; /* default audio parameter by system */
- int audioTimerDuration; /* for audio-only case, miliseconds */
- int audioBufferedIntervals; /* for audio-only case,
- audioTimerDuration * audioBufferedIntervals
- milliseconds of audio samples will be buffered
- in AF buffer
- */
- int framesPerAudioPlay; /* for audio-video case, each time, samples corresponding
- to this number of video frames will be played */
- int audioForward; /* forward value for audio channel, in AFTime unit
- (number of samples), audio channel is played ahead of video
- by this number of samples. This is introduce to compensate
- the dely to AF in audio channel, and usually should be less
- than 1 (one) second, but greater than zero.
- */
- int VStimeAdvance; /* target VB buffer level to be mentained (micro-seconds). This
- is sent in INIT message to VS, to decide how many frames to
- be maintained in VB buffer
- */
- float frameRateLimit; /* playback frame rate limit (frames per second) */
- int collectStat; /* tag to collect statistics to file 'stat.n' when set */
- int collectFrameInfo; /* collect MPEG frame info to file 'stat.n' when set*/
- int syncEffective; /* tag to make sync mechanism effective when set */
- int qosEffective; /* tag to make QoS control effective when set */
- int audioOffset; /* offset added to audio channel 'nextSample' when play().
- usually audio and video are not recorded strictly
- synchronized. This parameter is to compensate it. The
- value can be any integer value.
- */
- int filterPara; /* 1/R of Median, nsamples of Mean and Average */
- int maxSPframes; /* max number of frame in a sendPattern */
- int audioConn; /* tag for connection oriented audio data channel */
- int videoConn; /* tag for connection oriented video data channel */
- int verbose;
- } config;
-
-#ifdef STAT
- struct
- {
- unsigned VBmaxBytes; /* max fill level (bytes) in VB */
- unsigned VBdroppedFrames; /* accumulative total number of frames dropped by VB
- because VB buffer full */
- unsigned VBemptyTimes; /* number of time VD fail to get a frame from VB
- immediately */
- unsigned VDnoRef; /* # of frames without reference */
- unsigned VDagainstSendPattern; /* # of frames against send pattern */
- unsigned VDtooLateI; /* # of I frames dropped 'cause too late */
- unsigned VDtooLateP; /* # of P frames dropped 'cause too late */
- unsigned VDtooLateB; /* # of B frames dropped 'cause too late */
- unsigned VDlastFrameDecoded; /* ID of last frame decoded by VD */
- unsigned CTRdropLate;
- unsigned CTRdropOutOrder;
- unsigned CTRdispOnTime;
- unsigned CTRdispLate;
- unsigned fbPacketNumber; /* # packets sent by feedback mechanism */
- struct {
- int frameId;
- int addUsecPerFrame;
- int addFrames;
- int frames;
- int framesDropped;
- float frameRateLimit;
- int advance;
- } fbPackets[MAX_FB_PACKETS]; /* recording FB packet contents */
- unsigned VDqueue[MAX_VDQUEUE_SIZE]; /* record number of frames with VD queue
- length of index number */
- int VBmsgGaps[MSGGAP_MAX + 1 - MSGGAP_MIN]; /* # of ind-sized gaps between msgs */
- char VBframesReceived[(MAX_FRAMES + 7)/8]; /* bit array for frames received by VB */
- char VDframesDecoded[(MAX_FRAMES + 7)/8]; /* bit array for frames decoded by VD */
- char VPframesDisplayed[(MAX_FRAMES + 7)/8]; /* bit array for frames displayed by VP */
- short VBfillLevel[MAX_FRAMES]; /* VB buffer fill level (frames) recorded by CTR */
- } stat;
-#endif
-} SharedData;
-
-/* command and reply: GUI-CTR, CTR-VS, CTR-AS */
-
-/* GUI to CTR, (and also CTR to VS and/or AS) */
-
-#define CmdINIT 0 /* followed by: videoHost, videoPath, audioHost, audioPath
- each item is passed as a string (without 0), led with length(int) */
-#define CmdINITaudio 1 /* for CTR-AS */
-#define CmdINITvideo 2 /* for CTR-VS */
-#define CmdSTOP 3
-#define CmdFF 4
-#define CmdFB 5
-#define CmdSTEP 6
-#define CmdPLAY 7
-#define CmdREF 20 /* this is for sending REFerence frame by VS
- for CmdSTEP and CmdPLAY */
-#define CmdPOSITION 8 /* followed by position */
-#define CmdPOSITIONrelease 9 /* followed by position */
-#define CmdVOLUME 10 /* followed by position */
-#define CmdBALANCE 11 /* followed by position */
-#define CmdSPEED 12 /* followed by position */
-#define CmdLOOPenable 13
-#define CmdLOOPdisable 14
-#define CmdSTATstream 23 /* reply with { | type(byte) | size(int) }+ | */
-#define CmdSTATsent 24 /* reply with { | byte }+ | */
-#define CmdCLOSE 18
-#define CmdFAIL 19 /* followed by a string */
-
-#define CmdDONE 15 /* CTR to GUI:
- replay for accptance and execution of Above Cmd */
-
-#define CmdVPinitScreen 30 /* CTR to VP(GUI), audio-only screen clearning */
-#define CmdVPdisplayFrame 31 /* CTR to VP(GUI) to display the single frame in buffer */
-#define CmdVPclearScreen 32 /* CTR to VP(GUI), to clear all images in VD buffer */
-#define CmdVPaudioPosition 33 /* CTR to VP(GUI), in audio-only case, set position bar */
-
-// to terminate the event loop
-#define CmdExit 34
-
-/* CTR-VS */
-
-/* CmdINITvideo: followd by parameters of a fixed structure of 3 integers
- reply with CmdINITvideo followed by reply or CmdFAIL followed by a string,
-*/
-typedef struct
-{
- int sn;
- int version;
- int nameLength; /* the length of the video file */
- /* this structure is followed by a zero-terminated file name as follows:
- char videoFile[];
- */
-} INITvideoPara;
-
-typedef struct
-{
- int live;
- int format;
-
- int totalHeaders;
- int totalFrames;
- int totalGroups;
- int horizontalSize;
- int verticalSize;
- int pelAspectRatio;
- int pictureRate1000;
- int vbvBufferSize;
- int sizeIFrame;
- int sizePFrame;
- int sizeBFrame;
- int sizeSystemHeader;
- int sizeGop;
- int averageFrameSize;
- int firstGopFrames;
- int patternSize;
- char pattern[PATTERN_SIZE];
-} INITvideoReply;
-
-/* CmdPOSITION, CmdPOSITIONrelease: followed by following parameter */
-typedef struct
-{
- int sn;
- int nextGroup;
-} POSITIONpara;
-
-/* CmdSTEP: followed by following parameter */
-typedef struct
-{
- int sn;
- int nextFrame;
-} STEPpara;
-
-/* CmdFF, CmdFB: followed by following parameter */
-typedef struct
-{
- int sn;
- int nextGroup;
- int usecPerFrame;
- int framesPerSecond;
- int VStimeAdvance;
-} FFpara;
-
-/*CmdPLAY: followed by following parameter */
-typedef struct
-{
- int sn;
- int collectStat;
- int nextFrame;
- int usecPerFrame;
- int framesPerSecond;
- int frameRateLimit1000;
- int VStimeAdvance;
- int sendPatternGops;
- char sendPattern[PATTERN_SIZE];
-} PLAYpara;
-
-/* CmdSPEED: parameter */
-typedef struct
-{
- int sn;
- int usecPerFrame;
- int framesPerSecond;
- int frameRateLimit1000;
- int sendPatternGops;
- char sendPattern[PATTERN_SIZE];
-} SPEEDpara;
-
-/* CmdLOOPenabe, CmdLOOPdisable, CmdSTOP: following by SN */
-
-
-/* video channel data packet structure */
-
-typedef struct
-{
- int cmd;
- int cmdsn;
- int sh;
- int gop;
- int frame;
- int display; /* display frame number */
- int future;
- int past;
- int currentUPF;
- int dataBytes;
-} VideoPacket;
-
-
-/* video channel data message structure */
-
-typedef struct
-{
- int packetsn;
- int packetSize;
- int msgsn;
- int msgOffset;
- int msgSize;
-} VideoMessage;
-
-
-/* Feedback parameter structure */
-
-typedef struct
-{
- int cmdsn;
- int needHeader;
- int addUsecPerFrame;
- int addFrames;
- int frameRateLimit1000;
- int sendPatternGops;
- int sendPattern[PATTERN_SIZE];
-} VideoFeedBackPara;
-
-
-
-/* audio channel commands and parameters */
-
-/* CmdINITaudio parameter of fixed structure of 3 integers and a AudioPara,
- replys with CmdINITaudio followed by reply or CmdFAIL followed by a string */
-typedef struct
-{
- int sn;
- int version;
- AudioParameter para;
- int nameLength;
- /* char audioFile[] */
-} INITaudioPara;
-
-typedef struct
-{
- int live;
- int format;
-
- AudioParameter para;
- int totalSamples;
-} INITaudioReply;
-
-
-/* CmdPLAY parameter */
-typedef struct
-{
- int sn;
- int nextSample;
-#if 0
- int samplesPerSecond; /* <= shared->audioPara.samplesPerSecond */
-#endif
- int samplesPerSecond; /* audio playback speed */
- int samplesPerPacket; /* Number of samples in a packet */
- int ABsamples; /* size of client VB buffer in samples */
- int spslimit; /* QoS parameter: sps supported by the audio channel */
-} PLAYaudioPara;
-
-/* STOP followed only by SN */
-
-/* CmdSPEED parameter */
-typedef struct
-{
- int sn;
- int samplesPerSecond;
- int samplesPerPacket; /* Number of samples in a packet */
- int spslimit;
-} SPEEDaudioPara;
-
-/* audio packet structure */
-typedef struct
-{
- int cmdsn;
- int resend;
- int samplesPerSecond;
- int firstSample;
- int samples;
- int actualSamples;
- int dataBytes;
-} AudioPacket;
-
-typedef struct
-{
- int firstSample; /* Id of the first sample in this packet */
- int samples; /* number of samples in current packet */
-} APdescriptor; /* audio packet decriptor */
-
-/* audio feedback packet */
-typedef struct
-{
- int cmdsn;
- int type; /* 0 - feedback command; >=1 - Number of packets to be resent */
- union {
- struct {
- int addsps;
- int addSamples;
- } fb;
- APdescriptor ap;
- } data;
-} AudioFeedBackPara;
-/* One actual resent request may have multiple APdescriptors depending on
- the value in element type, all execpt the first one follows above structure*/
-
-typedef struct {
- int sh, gop, frame, display, future, past;
- int refcount; /* reference count */
- unsigned char * data; /* data buffer for image */
-} FrameBlock;
-
-
-#endif /* _MPEG_COMMON_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp
deleted file mode 100644
index 40fa6f6ca4e..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#include <stdlib.h>
-#include <string.h>
-#include "video.h"
-#include "dither.h"
-#include "proto.h"
-
-/*
- * We'll define the "ConvertColor" macro here to do fixed point arithmetic
- * that'll convert from YCrCb to RGB using:
- * R = L + 1.40200*Cr;
- * G = L - 0.34414*Cb - 0.71414*Cr
- * B = L + 1.77200*Cb;
- *
- * We'll use fixed point by adding two extra bits after the decimal.
- */
-
-#define BITS 8
-#define ONE ((int) 1)
-#define CONST_SCALE (ONE << BITS)
-#define ROUND_FACTOR (ONE << (BITS-1))
-
-/* Macro to convert integer to fixed. */
-#define UP(x) (((int)(x)) << BITS)
-
-/* Macro to convert fixed to integer (with rounding). */
-#define DOWN(x) (((x) + ROUND_FACTOR) >> BITS)
-
-/* Macro to convert a float to a fixed */
-#define FIX(x) ((int) ((x)*CONST_SCALE + 0.5))
-
-#define CLAMP(ll,x,ul) ( ((x)<(ll)) ?(ll):( ((x)>(ul)) ?(ul):(x)))
-
-static int *Cb_r_tab, *Cr_g_tab, *Cb_g_tab, *Cr_b_tab;
-
-/*
- *--------------------------------------------------------------
- *
- * InitColorDither --
- *
- * To get rid of the multiply and other conversions in color
- * dither, we use a lookup table.
- *
- * Results:
- * None.
- *
- * Side effects:
- * The lookup tables are initialized.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitColorDither()
-{
- int CR, CB, i;
-
- Cr_b_tab = (int *)malloc(256*sizeof(int));
- Cr_g_tab = (int *)malloc(256*sizeof(int));
- Cb_g_tab = (int *)malloc(256*sizeof(int));
- Cb_r_tab = (int *)malloc(256*sizeof(int));
-
- for (i=0; i<256; i++) {
- CB = CR = i;
-
- CB -= 128; CR -= 128;
-
- Cb_r_tab[i] = FIX(1.40200) * CB;
- Cr_g_tab[i] = -FIX(0.34414) * CR;
- Cb_g_tab[i] = -FIX(0.71414) * CB;
- Cr_b_tab[i] = FIX(1.77200) * CR;
- }
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * ColorDitherImage --
- *
- * Converts image into 24 bit color.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-ColorDitherImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int rows, int cols)
-{
- int L, CR, CB;
- unsigned int *row1, *row2;
- unsigned char *lum2;
- int x, y;
- unsigned int r, b, g;
- int cb_r;
- int cr_g;
- int cb_g;
- int cr_b;
-
- row1 = (unsigned int *)out;
- row2 = row1 + cols;
- lum2 = lum + cols;
- for (y=0; y<rows; y+=2) {
- for (x=0; x<cols; x+=2) {
- int R, G, B;
-
- CR = *cr++;
- CB = *cb++;
- cb_r = Cb_r_tab[CB];
- cr_g = Cr_g_tab[CR];
- cb_g = Cb_g_tab[CB];
- cr_b = Cr_b_tab[CR];
-
- L = *lum++;
- L = UP(L);
- R = L + cb_r;
- G = L + cr_g + cb_g;
- B = L + cr_b;
-#ifndef LITTLE_ENDIAN
- r = CLAMP(0,R,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS;
-#else
- b = CLAMP(0,B,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS;
-#endif
- *row1++ = r | g | b;
-
- L = *lum++;
- L = UP(L);
- R = L + cb_r;
- G = L + cr_g + cb_g;
- B = L + cr_b;
-#ifndef LITTLE_ENDIAN
- r = CLAMP(0,R,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS;
-#else
- b = CLAMP(0,B,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS;
-#endif
- *row1++ = r | g | b;
-
- /*
- * Now, do second row.
- */
- L = *lum2++;
- L = UP(L);
- R = L + cb_r;
- G = L + cr_g + cb_g;
- B = L + cr_b;
-#ifndef LITTLE_ENDIAN
- r = CLAMP(0,R,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS;
-#else
- b = CLAMP(0,B,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS;
-#endif
- *row2++ = r | g | b;
-
- L = *lum2++;
- L = UP(L);
- R = L + cb_r;
- G = L + cr_g + cb_g;
- B = L + cr_b;
-#ifndef LITTLE_ENDIAN
- r = CLAMP(0,R,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS;
-#else
- b = CLAMP(0,B,UP(255)) >> BITS;
- g = CLAMP(0,G,UP(255)) & 0xff00;
- r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS;
-#endif
- *row2++ = r | g | b;
- }
- lum += cols;
- lum2 += cols;
- row1 += cols;
- row2 += cols;
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp
deleted file mode 100644
index ba59df34e12..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#include <string.h>
-#include <stdlib.h>
-#include "video.h"
-#include "dither.h"
-#include "proto.h"
-
-#define RAND_ERR_RANGE 7
-#define RAND_ERR_SUBVAL 3
-
-/* Array containing actual pixel values for each possible 2x2 dither pattern. */
-
-static unsigned char *dith_a;
-
-/* Arrays mapping lum, cr, and cb values to portions of dither pattern code.
- The addtion of one value from each array yields a valid dither pattern
- code.
-*/
-
-static int lval_a[256+RAND_ERR_RANGE-1];
-static int rval_a[256+RAND_ERR_RANGE-1];
-static int bval_a[256+RAND_ERR_RANGE-1];
-
-/* Range of possible dither patterns in each channel. */
-
-#define L_DITH_RANGE (((LUM_RANGE-1)*4)+1)
-#define CR_DITH_RANGE (((CR_RANGE-1)*4)+1)
-#define CB_DITH_RANGE (((CB_RANGE-1)*4)+1)
-
-/* Arrays of random error terms added to break up contours. */
-
-static int *randval_a;
-static int **randptr_a;
-
-
-/*
- *--------------------------------------------------------------
- *
- * Init2x2Dither--
- *
- * Initializes structures used for 2x2 dithering.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-Init2x2Dither()
-{
- unsigned char *dith_ca;
- int numcodes;
- int l_range, cr_range, cb_range;
- int p1, p2, p3, p4;
- int l_dith, cr_dith, cb_dith;
- int big_part, small_part;
- int i, j;
-
- l_range = L_DITH_RANGE;
- cr_range = CR_DITH_RANGE;
- cb_range = CB_DITH_RANGE;
-
- numcodes = l_range * cr_range * cb_range;
-
- dith_a = (unsigned char *) malloc(numcodes*4);
-
- dith_ca = dith_a;
-
- for (i=0; i<numcodes; i++) {
- l_dith = i % l_range;
-
- big_part = l_dith / 4;
- small_part = l_dith % 4;
-
- p1 = big_part + ((small_part > 0) ? 1 : 0);
- p2 = big_part + ((small_part > 2) ? 1 : 0);
- p3 = big_part;
- p4 = big_part + ((small_part > 1) ? 1 : 0);
-
- p1 *= CR_RANGE * CB_RANGE;
- p2 *= CR_RANGE * CB_RANGE;
- p3 *= CR_RANGE * CB_RANGE;
- p4 *= CR_RANGE * CB_RANGE;
-
- cr_dith = (i/l_range) % cr_range;
-
- big_part = cr_dith / 4;
- small_part = cr_dith % 4;
-
- p1 += (big_part + ((small_part > 0) ? 1 : 0))*CB_RANGE;
- p2 += (big_part + ((small_part > 2) ? 1 : 0))*CB_RANGE;
- p3 += (big_part)*CB_RANGE;
- p4 += (big_part + ((small_part > 1) ? 1 : 0))*CB_RANGE;
-
- cb_dith = (i/(cr_range*l_range)) % cb_range;
-
- big_part = cb_dith / 4;
- small_part = cb_dith % 4;
-
- p1 += (big_part + ((small_part > 0) ? 1 : 0));
- p2 += (big_part + ((small_part > 2) ? 1 : 0));
- p3 += (big_part);
- p4 += (big_part + ((small_part > 1) ? 1 : 0));
-
- *dith_ca++ = p1;
- *dith_ca++ = p2;
- *dith_ca++ = p3;
- *dith_ca++ = p4;
- }
-
- for (i=RAND_ERR_SUBVAL; i<256+RAND_ERR_SUBVAL; i++) {
- j = i-RAND_ERR_SUBVAL;
- lval_a[i] = (j * L_DITH_RANGE)/256;
- rval_a[i] = (j * CR_DITH_RANGE)/256;
- bval_a[i] = (j * CB_DITH_RANGE)/256;
-
- bval_a[i] *= CR_DITH_RANGE * L_DITH_RANGE * 4;
- rval_a[i] *= L_DITH_RANGE * 4;
- lval_a[i] *= 4;
- }
-
- for (i=0; i<RAND_ERR_SUBVAL; i++) {
- lval_a[i] = lval_a[RAND_ERR_SUBVAL];
- rval_a[i] = rval_a[RAND_ERR_SUBVAL];
- bval_a[i] = bval_a[RAND_ERR_SUBVAL];
- }
-
- for(i=256+RAND_ERR_SUBVAL; i<256+RAND_ERR_RANGE-1; i++) {
- lval_a[i] = lval_a[255+RAND_ERR_SUBVAL];
- rval_a[i] = rval_a[255+RAND_ERR_SUBVAL];
- bval_a[i] = bval_a[255+RAND_ERR_SUBVAL];
- }
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * RandInit --
- *
- * Initializes the random values used for 2x2 dithering.
- *
- * Results:
- * randval_a filled with random values.
- * randptr_a filled with random pointers to random value arrays.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void RandInit(int h, int w)
-{
- int i;
-
- randval_a = (int *) malloc(w*5*sizeof(int));
- randptr_a = (int **) malloc(h*sizeof(int *));
-
-#ifdef NO_LRAND48
- for (i=0; i<w*5; i++) {
- long int random();
-
- randval_a[i] = random() % RAND_ERR_RANGE;
- }
-
- for (i=0; i<h; i++) {
- long int random();
-
- randptr_a[i] = randval_a + (random() % (w*2));
- }
-#else /* NO_LRAND48 */
-
- for (i=0; i<w*5; i++) {
-
- randval_a[i] = lrand48() % RAND_ERR_RANGE;
- }
-
- for (i=0; i<h; i++) {
-
- randptr_a[i] = randval_a + (lrand48() % (w*2));
- }
-#endif
-
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * PostInit2x2Dither--
- *
- * Remaps color numbers in dither patterns to actual pixel
- * values allocated by the X server.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-PostInit2x2Dither()
-{
- unsigned char *dith_ca;
- int i;
-
- dith_ca = dith_a;
-
- for (i=0; i < (L_DITH_RANGE * CR_DITH_RANGE * CB_DITH_RANGE); i++) {
-
- *dith_ca = pixel[*dith_ca];
- dith_ca++;
- *dith_ca = pixel[*dith_ca];
- dith_ca++;
- *dith_ca = pixel[*dith_ca];
- dith_ca++;
- *dith_ca = pixel[*dith_ca];
- dith_ca++;
- }
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * Twox2DitherImage --
- *
- * Dithers lum, cr, and cb channels togethor using predefined
- * and computed 2x2 dither patterns. Each possible combination of
- * lum, cr, and cb values combines to point to a particular dither
- * pattern (2x2) which is used to represent the pixel. This assumes
- * That the display plane is 4 times larger than the lumianance
- * plane.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-Twox2DitherImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- int i, j;
- unsigned short *o1, *o2, *o3, *o4;
- unsigned char *l1, *l2, *base;
- unsigned char B, R;
- unsigned short *dith_ca;
- int big_adv = 3*w;
- int b_val, r_val, l_val;
- int *randvalptr;
- int randval;
- static int first = 1;
-
- if (first) {
- RandInit(h, w);
- first = 0;
- }
-
- o1 = (unsigned short *)out;
- o2 = (unsigned short *)(out+(2*w));
- o3 = (unsigned short *)(out+(4*w));
- o4 = (unsigned short *)(out+(6*w));
- l1 = lum;
- l2 = lum+w;
-
- for (i=0; i<h; i+=2) {
- for(j=0; j<w; j+= 4) {
-
- B = cb[0];
- b_val = bval_a[B];
- R = cr[0];
- r_val = rval_a[R];
- base = dith_a + b_val + r_val;
-
- l_val = lval_a[l1[0]];
- dith_ca = (unsigned short *)(base + l_val);
- o1[0] = dith_ca[0];
- o2[0] = dith_ca[1];
-
- l_val = lval_a[l1[1]];
- dith_ca = (unsigned short *)(base + l_val);
- o1[1] = dith_ca[0];
- o2[1] = dith_ca[1];
-
- l_val = lval_a[l2[0]];
- dith_ca = (unsigned short *)(base + l_val);
- o3[0] = dith_ca[0];
- o4[0] = dith_ca[1];
-
- l_val = lval_a[l2[1]];
- dith_ca = (unsigned short *)(base + l_val);
- o3[1] = dith_ca[0];
- o4[1] = dith_ca[1];
-
- B = cb[1];
- b_val = bval_a[B];
- R = cr[1];
- r_val = rval_a[R];
- base = dith_a + b_val + r_val;
-
- l_val = lval_a[l1[2]];
- dith_ca = (unsigned short *)(base + l_val);
- o1[2] = dith_ca[0];
- o2[2] = dith_ca[1];
-
- l_val = lval_a[l1[3]];
- dith_ca = (unsigned short *)(base + l_val);
- o1[3] = dith_ca[0];
- o2[3] = dith_ca[1];
-
- l_val = lval_a[l2[2]];
- dith_ca = (unsigned short *)(base + l_val);
- o3[2] = dith_ca[0];
- o4[2] = dith_ca[1];
-
- l_val = lval_a[l2[3]];
- dith_ca = (unsigned short *)(base + l_val);
- o3[3] = dith_ca[0];
- o4[3] = dith_ca[1];
-
- o1 += 4;
- o2 += 4;
- o3 += 4;
- o4 += 4;
- l1 += 4;
- l2 += 4;
- cb += 2;
- cr += 2;
- }
-
- l1 += w;
- l2 += w;
- o1 += big_adv;
- o2 += big_adv;
- o3 += big_adv;
- o4 += big_adv;
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp
deleted file mode 100644
index 5c24f77a030..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-// $Id$
-
-#include "Command_Handler.h"
-
-// %% yikes!!!
-#include "ctr.cpp"
-
-Command_Handler::Command_Handler (ACE_HANDLE command_handle)
- : command_handle_ (command_handle)
-{
-}
-
-ACE_HANDLE
-Command_Handler::get_handle (void) const
-{
- return this->command_handle_;
-}
-
-
-// handle the command sent to us by the GUI process
-// this is a reactor callback method
-int
-Command_Handler::handle_input (ACE_HANDLE fd)
-{
-
- {
- unsigned char cmd;
- int val;
- val = OurCmdRead ((char*)&cmd, 1);
- ::TimerProcessing ();
-
- // if we get an interrupt while reading we go back to the event loop
- if (val == 1)
- return 0;
-
- FILE * fp = NULL; /* file pointer for experiment plan */
- usr1_flag = 0;
-
- // fprintf(stderr, "CTR: cmd received - %d\n", cmd);
-
- switch (cmd)
- {
- case CmdINIT:
- init();
-
- /* following for automatic expriment plan when invoked by Developer */
- if (getuid() == DEVELOPER_UID && videoSocket >= 0) {
- fp = fopen(EXP_PLAN_FILE, "r");
- if (fp != NULL) {
- static char expCmd[6] = {CmdPOSITIONrelease, 0, 0, 0, 0, CmdPLAY};
- fprintf(stderr,
- "Warning: Auto-exp plan is to be conducted as instructed by file %s\n",
- EXP_PLAN_FILE);
- cmdBuffer = expCmd;
- cmdBytes = 6;
- cmdAcks = 2;
- }
- }
- else fp = NULL;
-
- break;
- case CmdSTOP:
- stop();
- break;
- case CmdFF:
- ff();
- break;
- case CmdFB:
- fb();
- break;
- case CmdSTEP:
- step();
- break;
- case CmdPLAY:
-
- /* following is for automatic experiment plan */
- if (fp != NULL) {
- char buf[64];
- while (fgets(buf, 64, fp) != NULL) {
- if (!strncmp("Delay", buf, 5)) {
- int val;
- sscanf(strchr(buf, ' '), "%d", &val);
- if (val < 0) val = 1;
- else if (val > 60) val = 60;
- fprintf(stderr, "Auto-exp: Delay for %d seconds\n", val);
- usleep(val * 1000000);
- }
- else if (!strncmp("Experiment", buf, 5)) {
- fprintf(stderr, "Auto-exp: to perform an experiment\n");
- while (fgets(buf, 64, fp) != NULL && buf[0] > ' ') {
- if (!strncmp("playSpeed", buf, 5)) {
- double fps;
- sscanf(strchr(buf, ' '), "%lf", &fps);
- /* following code is copied from definition of set_speed(void) */
- shared->framesPerSecond = (int)fps;
- shared->usecPerFrame = (int) (1000000.0/fps);
- if (audioSocket >= 0)
- {
- double sps = shared->audioPara.samplesPerSecond *
- fps / shared->pictureRate;
- shared->samplesPerSecond = (int)sps;
- shared->usecPerSample = (int)(1000000.0/sps);
- }
- }
- else if (!strncmp("frameRateLimit", buf, 5)) {
- sscanf(strchr(buf, ' '), "%f", &shared->config.frameRateLimit);
- }
- else if (!strncmp("maxSPframes", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.maxSPframes);
- }
- else if (!strncmp("filterPara", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.filterPara);
- }
- else if (!strncmp("collectStat", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.collectStat);
- }
- else if (!strncmp("qosEffective", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.qosEffective);
- }
- else if (!strncmp("syncEffective", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.syncEffective);
- }
- }
- usleep(500000);
- shared->loopBack = 1;
- break;
- }
- else if (!strncmp("EndExperiment", buf, 5)) {
- fprintf(stderr, "Auto-exp ends.\n");
- usleep(2000000);
- fclose(fp);
- exit(0);
- }
- }
- }
-
- play(fp != NULL);
- break;
- case CmdPOSITION:
- position();
- break;
- case CmdPOSITIONrelease:
- position_release();
- break;
- case CmdVOLUME:
- volume();
- break;
- case CmdBALANCE:
- balance();
- break;
- case CmdSPEED:
- speed();
- break;
- case CmdLOOPenable:
- {
- shared->loopBack = 1;
- break;
- }
- case CmdLOOPdisable:
- {
- shared->loopBack = 0;
- break;
- }
- default:
- fprintf(stderr, "CTR: unexpected command from UI: cmd = %d.\n", cmd);
- exit(1);
- break;
- }
- }
- return 0;
-}
-
-// ----------------------------------------------------------------------
-
-// Client_Sig_Handler methods
-// handles the timeout SIGALRM signal
-Client_Sig_Handler::Client_Sig_Handler ()
-{
-}
-
-int
-Client_Sig_Handler::register_handler (void)
-{
- // Assign the Sig_Handler a dummy I/O descriptor. Note that even
- // though we open this file "Write Only" we still need to use the
- // ACE_Event_Handler::NULL_MASK when registering this with the
- // ACE_Reactor (see below).
- this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY);
- ACE_ASSERT (this->handle_ != -1);
-
- // Register signal handler object. Note that NULL_MASK is used to
- // keep the ACE_Reactor from calling us back on the "/dev/null"
- // descriptor.
- if (ACE_Reactor::instance ()->register_handler
- (this, ACE_Event_Handler::NULL_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
- -1);
-
- // Create a sigset_t corresponding to the signals we want to catch.
- ACE_Sig_Set sig_set;
-
- sig_set.sig_add (SIGINT);
- sig_set.sig_add (SIGQUIT);
- sig_set.sig_add (SIGALRM);
- sig_set.sig_add (SIGUSR1);
- sig_set.sig_add (SIGUSR2);
-
- // Register the signal handler object to catch the signals.
- if (ACE_Reactor::instance ()->register_handler (sig_set,
- this) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
- -1);
- return 0;
-}
-// Called by the ACE_Reactor to extract the fd.
-
-ACE_HANDLE
-Client_Sig_Handler::get_handle (void) const
-{
- return this->handle_;
-}
-
-int
-Client_Sig_Handler::handle_input (ACE_HANDLE)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n"));
- return 0;
-}
-
-int
-Client_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n"));
- return 0;
-}
-
-// This method handles all the signals that are being caught by this
-// object. In our simple example, we are simply catching SIGALRM,
-// SIGINT, and SIGQUIT. Anything else is logged and ignored.
-//
-// There are several advantages to using this approach. First,
-// the behavior triggered by the signal is handled in the main event
-// loop, rather than in the signal handler. Second, the ACE_Reactor's
-// signal handling mechanism eliminates the need to use global signal
-// handler functions and data.
-
-int
-Client_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *)
-{
- int status;
- pid_t pid;
- // ACE_DEBUG ((LM_DEBUG, "(%t) received signal %S\n", signum));
-
- switch (signum)
- {
- case SIGALRM:
- // Handle the timeout
- ::TimerHandler (signum);
- // %% ??!!!
- break;
- case SIGUSR1:
- usr1_handler (signum);
- break;
- case SIGUSR2:
- default_usr2_handler (signum);
- break;
- case SIGCHLD:
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum));
- pid = ACE_OS::wait (&status);
- if (pid == UIpid)
- {
- cerr << "ui exited, im ending the event loop!" << endl;
- ACE_Reactor::instance ()->end_event_loop ();
- }
- return 0;
- case SIGINT:
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum));
- ACE_Reactor::instance ()->end_event_loop ();
- ::on_exit_routine ();
- return 0;
- default:
- ACE_DEBUG ((LM_DEBUG,
- "(%t) %S: not handled, returning to program\n",
- signum));
- break;
- }
- TimerProcessing ();
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h
deleted file mode 100644
index ec6a2be7993..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- C++ -*- */
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#if !defined (AV_COMMAND_HANDLER_H)
-#define AV_COMMAND_HANDLER_H
-
-#include "ace/Reactor.h"
-#include "ace/Event_Handler.h"
-
-
-class Command_Handler
- : public virtual ACE_Event_Handler
-{
- // = TITLE
- // Defines the event handler class for the client commands
- //
- // = DESCRIPTION
- // This class makes use of a UNIX socket, over which
- // it will receive commands from the GUI
-
-public:
-
- Command_Handler (ACE_HANDLE command_handle);
- // Construct this handler with a control (UNIX) handle
-
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when input events occur (e.g., connection or data).
-
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the handle used by the event_handler.
-
-private:
- ACE_HANDLE command_handle_;
- // The fd for the UNIX command socket
-};
-
-
-class Client_Sig_Handler
- : public virtual ACE_Event_Handler
- // = TITLE
- // Defines the signal handler class for the client timer processing
- //
- // = DESCRIPTION
- // %%
-{
-public:
- Client_Sig_Handler (void);
-
- virtual ACE_HANDLE get_handle (void) const;
-
- int register_handler (void);
- // this will register this sig_handler
- // with the reactor for SIGCHLD,SIGTERM,SIGINT
-
- virtual int shutdown (ACE_HANDLE,
- ACE_Reactor_Mask);
- // handles the reactor shutdown
-
- virtual int handle_input (ACE_HANDLE);
- // handle input on the dummy handle.
-
- virtual int handle_signal (ACE_HANDLE signum,
- siginfo_t * = 0,
- ucontext_t* = 0);
- // handles SIGALRM
-
-private:
- ACE_HANDLE handle_;
- // dummy handle for the sig handler.
-};
-
-
-#endif /* AV_COMMAND_HANDLER_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile
deleted file mode 100644
index c7cfa982f2c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile
+++ /dev/null
@@ -1,374 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIBNAME = libmpeg_client
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-FILES= 24bit \
- 2x2 \
- ab \
- audio \
- decoders \
- file \
- fs2 \
- fs2fast \
- fs4 \
- global \
- gray \
- hybrid \
- hybriderr \
- info \
- jrevdct \
- mb_ordered \
- mono \
- motionvector \
- ordered \
- ordered2 \
- para \
- parseblock \
- prog \
- ui \
- util \
- util32 \
- vb \
- vd \
- video \
- vp \
- Command_Handler
-
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-##LIBS += -lTAO -lACE
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl
-CPPFLAGS += -i -DSH_MEM -DNDEBUG -DSunOS -DSTAT -I/project/doc/pkg/X11/include -L/project/doc/pkg/X11/lib
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/24bit.o .obj/24bit.so .shobj/24bit.o .shobj/24bit.so: 24bit.cpp video.h dither.h proto.h
-.obj/2x2.o .obj/2x2.so .shobj/2x2.o .shobj/2x2.so: 2x2.cpp video.h dither.h proto.h
-.obj/ab.o .obj/ab.so .shobj/ab.o .shobj/ab.so: ab.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h
-.obj/audio.o .obj/audio.so .shobj/audio.o .shobj/audio.so: audio.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h
-.obj/decoders.o .obj/decoders.so .shobj/decoders.o .shobj/decoders.so: decoders.cpp decoders.h util.h video.h proto.h
-.obj/file.o .obj/file.so .shobj/file.o .shobj/file.so: file.cpp video.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h
-.obj/fs2.o .obj/fs2.so .shobj/fs2.o .shobj/fs2.so: fs2.cpp video.h dither.h fs2.h proto.h
-.obj/fs2fast.o .obj/fs2fast.so .shobj/fs2fast.o .shobj/fs2fast.so: fs2fast.cpp video.h proto.h dither.h
-.obj/fs4.o .obj/fs4.so .shobj/fs4.o .shobj/fs4.so: fs4.cpp fs4.h video.h proto.h dither.h
-.obj/global.o .obj/global.so .shobj/global.o .shobj/global.so: global.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-.obj/gray.o .obj/gray.so .shobj/gray.o .shobj/gray.so: gray.cpp video.h proto.h dither.h
-.obj/hybrid.o .obj/hybrid.so .shobj/hybrid.o .shobj/hybrid.so: hybrid.cpp video.h proto.h dither.h
-.obj/hybriderr.o .obj/hybriderr.so .shobj/hybriderr.o .shobj/hybriderr.so: hybriderr.cpp video.h proto.h dither.h
-.obj/info.o .obj/info.so .shobj/info.o .shobj/info.so: info.cpp
-.obj/jrevdct.o .obj/jrevdct.so .shobj/jrevdct.o .shobj/jrevdct.so: jrevdct.cpp video.h proto.h
-.obj/mb_ordered.o .obj/mb_ordered.so .shobj/mb_ordered.o .shobj/mb_ordered.so: mb_ordered.cpp video.h proto.h dither.h
-.obj/mono.o .obj/mono.so .shobj/mono.o .shobj/mono.so: mono.cpp video.h proto.h dither.h
-.obj/motionvector.o .obj/motionvector.so .shobj/motionvector.o .shobj/motionvector.so: motionvector.cpp video.h proto.h util.h
-.obj/ordered.o .obj/ordered.so .shobj/ordered.o .shobj/ordered.so: ordered.cpp video.h proto.h dither.h
-.obj/ordered2.o .obj/ordered2.so .shobj/ordered2.o .shobj/ordered2.so: ordered2.cpp video.h proto.h dither.h
-.obj/para.o .obj/para.so .shobj/para.o .shobj/para.so: para.cpp video.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h
-.obj/parseblock.o .obj/parseblock.so .shobj/parseblock.o .shobj/parseblock.so: parseblock.cpp video.h proto.h decoders.h util.h
-.obj/prog.o .obj/prog.so .shobj/prog.o .shobj/prog.so: prog.cpp video.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h
-.obj/ui.o .obj/ui.so .shobj/ui.o .shobj/ui.so: ui.cpp ../mpeg_mib/mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- interface/fb.xbm interface/play.xbm interface/step.xbm \
- interface/stop.xbm interface/loop.xbm interface/ff.xbm \
- interface/MainWindow.mib interface/Info.mib video.h \
- ../include/common.h newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- global.h
-.obj/util.o .obj/util.so .shobj/util.o .shobj/util.so: util.cpp video.h proto.h util.h
-.obj/util32.o .obj/util32.so .shobj/util32.o .shobj/util32.so: util32.cpp video.h proto.h ui.h
-.obj/vb.o .obj/vb.so .shobj/vb.o .shobj/vb.so: vb.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h
-.obj/vd.o .obj/vd.so .shobj/vd.o .shobj/vd.so: vd.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h dither.h video.h proto.h
-.obj/video.o .obj/video.so .shobj/video.o .shobj/video.so: video.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i decoders.h \
- util.h video.h proto.h global.h ui.h
-.obj/vp.o .obj/vp.so .shobj/vp.o .shobj/vp.so: vp.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h dither.h video.h proto.h ui.h
-.obj/Command_Handler.o .obj/Command_Handler.so .shobj/Command_Handler.o .shobj/Command_Handler.so: Command_Handler.cpp Command_Handler.h \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h ctr.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- newproto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- global.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp
deleted file mode 100644
index c2829df769c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp
+++ /dev/null
@@ -1,475 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-#ifdef __svr4__
-#include <stropts.h>
-#include <sys/conf.h>
-#endif
-
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-#include "mpeg_shared/filters.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/com.h"
-
-/* magic number -- deviation is considered
- caused by clock drift only if rate <= 1/MAX_CLOCK_DRIFT.
- */
-#define MAX_CLOCK_DRIFT 50
-
-#define max(a,b) ((a)>(b) ? (a) : (b))
-#define min(a,b) ((a)<(b) ? (a) : (b))
-
-typedef struct {
- int bufsize; /* number of bytes for the buffer pointed by 'buf' */
- char * buf; /* pointer to the data buffer area */
- int bps; /* current byte-per-sample */
- int size; /* number of samples the buffer can hold */
- int samples; /* number of samples in the buffer; */
- int stuff; /* number of stuff samples to be read by ABgetSamples() */
- int ts; /* tail-sample: the next sample to be comsumed by CTR */
- int hs; /* head-sample: the next sample to be expected from the network */
- int tind; /* index of the ts-sample in the buf */
-} ABBuffer;
-
-static ABBuffer * abuf;
-static int sid;
-static int exit_tag = 0;
-static int savedSocket;
-
-static void set_silence(char *buf, int samples)
-{
- memset(buf, 0xff, samples * shared->audioPara.bytesPerSample);
-}
-
-void ABinitBuf(int size) /* size in bytes */
-{
- abuf = (ABBuffer *)creat_shared_mem(size);
- abuf->bufsize = size - sizeof(*abuf);
- abuf->buf = (char *)abuf + sizeof(*abuf);
- sid = creat_semaphore();
-}
-
-void ABflushBuf(int nextSample) /* flush the whole buffer */
-{
- enter_cs(sid);
- abuf->bps = shared->audioPara.bytesPerSample;
- abuf->size = abuf->bufsize / abuf->bps;
- abuf->samples = 0;
- abuf->stuff = 0;
- abuf->ts = abuf->hs = nextSample;
- abuf->tind = 0;
- set_silence(abuf->buf, abuf->size);
- leave_cs(sid);
-}
-
-int ABcheckSamples(void) /* returns # of samples in ABbuf */
-{
- return abuf->samples;
-}
-
-int ABgetSamples(char * buf, int samples)
- /* read at most given number of samples from AB to buf, returns
- number of sample actually read */
-{
- int as;
- int tsamples = samples;
- enter_cs(sid);
- if (abuf->stuff > 0) {
- as = min(abuf->stuff, samples);
- set_silence(buf, as);
- abuf->stuff -= as;
- samples -= as;
- buf += as * abuf->bps;
- }
- if (samples > 0) {
- as = min(samples, max(0, abuf->samples));
- /* there may be fewer samples in abuf */
- if (as > 0) {
- int part1 = min(as, abuf->size - abuf->tind);
- memcpy(buf, abuf->buf + (abuf->bps * abuf->tind), part1 * abuf->bps);
- set_silence(abuf->buf + (abuf->bps * abuf->tind), part1);
- if (part1 < as) { /* This read cross the boundary of abuf */
- memcpy(buf + (part1 * abuf->bps),
- abuf->buf,
- (as - part1) * abuf->bps);
- set_silence(abuf->buf, as - part1);
- }
- }
- abuf->samples -= samples;
- abuf->ts += samples;
- abuf->tind = (abuf->tind + samples) % abuf->size;
- if (as < samples) set_silence(buf + (as * abuf->bps), samples - as);
- }
- leave_cs(sid);
- return tsamples;
-}
-
-/* if samples < 0; then stuff |samples| silient samples to ABgetSamples(),
- otherwise wipe out this number of samples from AB */
-int ABskipSamples(int samples)
-{
- enter_cs(sid);
- if (samples <= 0) {
- abuf->stuff += (- samples);
- }
- else {
- abuf->samples -= samples;
- abuf->ts += samples;
- abuf->tind = (abuf->tind + samples) % abuf->size;
- }
- leave_cs(sid);
- return samples;
-}
-
-void ABdeleteBuf(void)
-{
- remove_shared_mem((char *)abuf);
-}
-
-void ABdeleteSem(void)
-{
- remove_semaphore(sid);
-}
-
-/* SIGUSR1 from CTR is for killing this process, without affecting any other ones. */
-
-static void usr1_handler(int sig)
-{
- exit_tag = 1;
-}
-
-static void exit_on_kill(void)
-{
- extern void set_exit_routine_tag(int tag);
- set_exit_routine_tag(0);
- ComCloseConn(savedSocket);
- VBdeleteBuf();
- exit(0);
-}
-
-static void usr2_handler(int sig)
-{
- Fprintf(stderr, "VB void usr2_handler (supposed for stat).\n");
-}
-
-#define PACKET_SIZE 8192
-#define STARTUP_WAIT 10000000
-#define ACTION_WAIT 5000000
-
-void ABprocess(int dataSocket)
-{
-
- AudioPacket * packet;
- char * pkt_data;
- int conn_tag = shared->audioMaxPktSize;
-
- /* following are for feedback */
- int fbstate = 0;
- unsigned waketime;
- int pcmdsn = -1; /* previous cmdsn */
-
- exit_tag = 0;
-
- savedSocket = dataSocket;
-
- setsignal(SIGUSR1, usr1_handler);
- setsignal(SIGUSR2, usr2_handler);
-
- packet = (AudioPacket *)malloc(PACKET_SIZE);
- if (packet == NULL) {
- perror("AB failed to allocate mem for packet buffer");
- exit(1);
- }
- pkt_data = (char *)packet + sizeof(*packet);
-
- for (;;) {
- int len;
- int bytes;
- if (conn_tag >= 0) {
- bytes = sizeof(*packet);
- len = wait_read_bytes(dataSocket, (char *)packet, bytes);
- if (exit_tag) exit_on_kill();
- }
- else { /* discard mode packet stream, read all bytes */
- bytes = PACKET_SIZE;
- len = read(dataSocket, (char *)packet, bytes);
- if (exit_tag) exit_on_kill();
- if (len == -1) {
- if (errno == EINTR || errno == EWOULDBLOCK || errno == EAGAIN) {
- usleep(10000);
- if (exit_tag) exit_on_kill();
- continue;
- }
- perror("AB read() audio packet from discard-mode packet stream");
- exit(1);
- }
- }
- if (len == 0) {
- fprintf(stderr, "Error: AB found dataSocket broken\n");
- exit(1);
- }
- if (len < sizeof(*packet)) { /* unknown packet */
- fprintf(stderr, "Warn: AB discard len = %d bytes of supposed header.\n", len);
- continue;
- }
-#ifdef NeedByteOrderConversion
- packet->dataBytes = ntohl(packet->dataBytes);
-#endif
-
- if (packet->dataBytes <= 0) {
- fprintf(stderr, "AB Error: pkt->dataBytes %d, len %d\n",
- packet->dataBytes,
- len);
- exit(1);
- }
- bytes = packet->dataBytes + sizeof(*packet);
-
- if (bytes > PACKET_SIZE) {
- Fprintf(stderr, "Fatal error: AB packet buf (%dB) too small (%d)\n",
- PACKET_SIZE, bytes);
- exit(1);
- }
- if (conn_tag >= 0) {
- len = wait_read_bytes(dataSocket, (char *)packet + sizeof(*packet),
- bytes - sizeof(*packet));
- if (len <= 0) {
- if (len == -1) perror("AB encounter error on wait_read_bytes()");
- else fprintf(stderr, "AB encounter EOF on wait_read_bytes()\n");
- }
- }
-#ifdef NeedByteOrderConversion
- packet->cmdsn = ntohl(packet->cmdsn);
- packet->samplesPerSecond = ntohl(packet->samplesPerSecond);
- packet->resend = ntohl(packet->resend);
- packet->firstSample = ntohl(packet->firstSample);
- packet->samples = ntohl(packet->samples);
- packet->actualSamples = ntohl(packet->actualSamples);
- /* dataBytes already byte-reordered */
-#endif
- /*
- Fprintf(stderr, "AB got a packet: %d(%d)\n",
- packet->firstSample, packet->samples);
- */
- /*
- if (packet->firstSample % 10240 && !packet->resend) continue;
- */
- if (packet->samples * abuf->bps > PACKET_SIZE - sizeof(*packet)) {
- fprintf(stderr, "Fatal error: AB has too small packet buffer, %d out of %d\n",
- PACKET_SIZE, packet->samples * abuf->bps + sizeof(*packet));
- exit(1);
- }
-
- if (packet->cmdsn != shared->cmdsn) { /* outdated packet */
- /*
- Fprintf(stderr, "AB discarded an outdated packet\n");
- */
- continue;
- }
- enter_cs(sid);
- if (packet->firstSample + packet->samples <= abuf->ts) {
- /* all samples too late, discard it */
- abuf->hs = max(abuf->hs, packet->firstSample + packet->samples);
- abuf->samples = abuf->hs - abuf->ts;
- leave_cs(sid);
- /*
- Fprintf(stderr, "AB all sample in packet %d(%d) too late\n",
- packet->firstSample, packet->samples);
- */
- goto feedback_code;
- }
- if (packet->firstSample >= abuf->ts + abuf->size) {
- /* all samples too early, discard the packet */
- abuf->hs = max(abuf->hs, packet->firstSample + packet->samples);
- abuf->samples = abuf->hs - abuf->ts;
- leave_cs(sid);
- /*
- Fprintf(stderr, "AB all sample in packet %d(%d) too early\n",
- packet->firstSample, packet->samples);
- */
- goto feedback_code;
- }
-
- if (packet->samples > packet->actualSamples) {
- leave_cs(sid);
- fprintf(stderr, "Error: AB interpolation not available yet.\n");
- exit(1);
- }
-
- {
- int oldhs = abuf->hs;
- int firstSample = max(packet->firstSample, abuf->ts);
- int samples = min(packet->samples -
- (firstSample - packet->firstSample),
- (abuf->ts + abuf->size) - packet->firstSample);
- char * data = pkt_data +
- (firstSample - packet->firstSample) * abuf->bps;
- int dstart = (abuf->tind + (firstSample - abuf->ts)) % abuf->size;
- int part1 = min(samples, abuf->size - dstart);
- memcpy(abuf->buf + (dstart * abuf->bps), data, part1 * abuf->bps);
- if (part1 < samples) {
- memcpy(abuf->buf, data + part1 * abuf->bps,
- (samples - part1) * abuf->bps);
- }
- abuf->hs = max(abuf->hs, packet->firstSample + packet->samples);
- abuf->samples = abuf->hs - abuf->ts;
- dstart =max(oldhs, abuf->ts);
-
- leave_cs(sid);
-
- part1 = firstSample - dstart;
- if (packet->resend) {
- Fprintf(stderr, "AB got resent %d(%d)\n",
- packet->firstSample, packet->samples);
- }
- else if (part1 > 0) {
- int res;
- AudioFeedBackPara para;
- Fprintf(stderr, "AB found gap %d(%d)\n", dstart, part1);
- para.cmdsn = htonl(shared->cmdsn);
- para.type = htonl(1);
- para.data.ap.firstSample = htonl(dstart);
- para.data.ap.samples = htonl(part1);
- if (conn_tag != 0) { /* packet stream */
- while ((res = write(dataSocket, (char *)&para, sizeof(para))) == -1)
- {
- if (errno == EINTR)
- continue;
- if (errno == ENOBUFS) {
- perror("AB Warning, resend-req packet discarded for");
- break;
- }
- perror("AB error, resend-req packet sending failed");
- exit(1);
- }
- }
- else {
- res = wait_write_bytes(dataSocket, (char *)&para, sizeof(para));
- if (res == -1) {
- perror("AB error, resend-req packet sending failed");
- exit(1);
- }
- }
- if (res < sizeof(para)) {
- fprintf(stderr, "AB warn: send() for gap res %dB < sizeof(para) %dB\n",
- res, sizeof(para));
- }
- }
- }
-
- /* following is feedback algorithm */
-
- feedback_code:
-
- if (shared->live || (!shared->config.syncEffective)) continue;
- /*
- fprintf(stderr, "AB fbstate = %d\n", fbstate);
- */
- switch (fbstate) {
- case 0: /* startup init */
- if (pcmdsn != packet->cmdsn) {
- fbstate = 0;
- pcmdsn = packet->cmdsn;
- }
- else {
- fbstate = 1;
- waketime = get_usec() + STARTUP_WAIT;
- }
- break;
- case 1: /* startup wait */
- if (pcmdsn != packet->cmdsn) {
- fbstate = 0;
- break;
- }
- if (get_usec() >= waketime) {
- fbstate = 2;
- }
- break;
- case 2: /* monitoring */
- if (pcmdsn != packet->cmdsn) {
- fbstate = 0;
- break;
- }
- if (abuf->samples < abuf->size >>2 ||
- abuf->samples > (abuf->size * 3) >> 2) {
- /* feedback action needed */
- AudioFeedBackPara para;
- int res;
- para.data.fb.addsps = 0;
- para.data.fb.addSamples = (abuf->size >> 2) - abuf->samples;
-
- Fprintf(stderr, "AB sends fb: %dsps, %dsamples\n",
- para.data.fb.addsps,
- para.data.fb.addSamples);
- para.cmdsn = htonl(shared->cmdsn);
- para.type = htonl(0);
- para.data.fb.addsps = htonl(para.data.fb.addsps);
- para.data.fb.addSamples = htonl(para.data.fb.addSamples);
- if (conn_tag != 0) {
- while ((res = write(dataSocket, (char *)&para, sizeof(para))) == -1)
- {
- if (errno == EINTR)
- continue;
- if (errno == ENOBUFS) {
- perror("AB Warning, fb packet discarded for");
- break;
- }
- perror("AB error, fb packet sending failed");
- exit(1);
- }
- }
- else {
- res = wait_write_bytes(dataSocket, (char *)&para, sizeof(para));
- if (res == -1) {
- perror("AB error, fb packet sending failed");
- exit(1);
- }
- }
- if (res < sizeof(para)) {
- fprintf(stderr, "AB warn: send() for sync res %dB < sizeof(para) %dB\n",
- res, sizeof(para));
- }
-
- waketime = get_usec() + STARTUP_WAIT;
- fbstate = 1;
- }
- break;
- default:
- break;
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp
deleted file mode 100644
index 0e05cc70c1d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp
+++ /dev/null
@@ -1,490 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-/* ##################################################################
-
- When you port to a new architecture, you much add native audio
- device support in this file by adding stuff to all relevant
- functions, otherwise, it is disabled by default.
-
- ################################################################# */
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#ifdef __svr4__
-#include <sys/audioio.h>
-#elif defined(FreeBSD)
-#include <machine/pcaudioio.h>
-#elif defined(SunOS)
-#include <sys/audioio.h>
-#elif defined(_HPUX_SOURCE)
-#include <sys/audio.h>
-#elif defined(IRIX)
-#include <audio.h>
-#endif
-
-#ifdef FreeBSD
-#define AUDIO_DEVICE "/dev/pcaudio"
-#define AUDIO_CONTROL "/dev/pcaudioctl"
-#elif defined(__svr4__) || defined(SunOS)
-#define AUDIO_DEVICE "/dev/audio"
-#define AUDIO_CONTROL "/dev/audioctl"
-#elif defined(_HPUX_SOURCE)
-#define AUDIO_DEVICE "/dev/audio"
-#define AUDIO_CONTROL "/dev/audioCtl"
-#elif defined(IRIX)
-#define AUDIO_DEVICE "proprietary device"
-#define AUDIO_CONTROL "proprietary device"
-#elif defined(LINUX)
-#define AUDIO_DEVICE "/dev/audio"
-#define AUDIO_CONTROL "NO CONTROL DEV"
-#endif
-
-#include <time.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-
-static int cfd = -1, afd = -1; /* afd == -1 mean no native device available */
-static long start_time;
-static long current_time;
-
-#ifdef IRIX
-#define audioDevice AL_DEFAULT_DEVICE
-static ALport playPort = NULL;
-#endif
-
-#ifdef AUDIOFILE
-
-#include <AF/AFlib.h>
-#include <AF/AFUtils.h>
-
-static int useAF = 0;
-
-static AFAudioConn *aud;
-static AC ac;
-static AFSetACAttributes attributes;
-
-/*
- * Find a suitable default device
- * Returns -1 if no suitable device can be found.
- */
-static int FindDefaultDevice(AFAudioConn *aud)
-{
- AFDeviceDescriptor *audioDevice;
- int i;
- for(i=0; i<ANumberOfAudioDevices(aud); i++)
- {
- audioDevice = AAudioDeviceDescriptor(aud, i);
- if(audioDevice->inputsFromPhone == 0 && audioDevice->outputsToPhone == 0)
- return i;
- }
- return -1;
-}
-#endif
-
-/*
- returns: 0 - succ
- -1 - failed
-*/
-int InitAudioDevice(void)
-{
-#ifdef AUDIOFILE
- int device;
- int gain;
- unsigned int channels;
- int endianflag = 0;
-#endif
-
-#ifdef AUDIOFILE
- device = -1;
- attributes.preempt = Mix;
- attributes.start_timeout = 0;
- attributes.end_silence = 0;
- attributes.play_gain = 0;
- attributes.rec_gain = 0;
- attributes.type = UNKNOWN_ENCODETYPE;
-
- if ( (aud = AFOpenAudioConn(NULL)) == NULL)
- {
- fprintf(stderr, "Failed locating default AudioFile.\n");
- goto native_audio;
- }
-
- /* set up audio context, find sample size and sample rate
- At this time, we only support default setings */
- device = FindDefaultDevice(aud);
- attributes.type = aud->devices[device].playBufType;
- ac = AFCreateAC(aud, device, (ACPlayGain | ACEncodingType | endianflag),
- &attributes);
- if (ac == NULL)
- {
- fprintf(stderr, "Failed Initializing default AudioFile.\n");
- AFCloseAudioConn(aud);
- goto native_audio;
- }
- AFSync(aud, 0); /* Make sure we confirm encoding type support. */
- shared->AFPara.encodeType = attributes.type;
- shared->AFPara.channels = ac->device->playNchannels;
- shared->AFPara.bytesPerSample =
- BytesPerUnit(attributes.type) / SampsPerUnit(attributes.type);
- shared->AFPara.samplesPerSecond = ac->device->playSampleFreq;
- /*
- memcpy(&(shared->AFPara), &(shared->config.audioPara), sizeof(AudioParameter));
- */
- useAF = 1;
- fprintf(stderr, "Using default AudioFile.\n");
- return 0;
-#elif defined(__svr4__) || defined(SunOS) || defined(FreeBSD) \
- || defined(_HPUX_SOURCE) || defined(IRIX) || defined(LINUX)
- fprintf(stderr, "This vcr compiled without AudioFile, try native audio.\n");
-#else
- fprintf(stderr, "This vcr compiled without AudioFile, audio to be ignored\n");
- afd = -1;
- return -1;
-#endif
-
- native_audio:
-
-#if defined(__svr4__) || defined(SunOS) || defined(FreeBSD) || defined(_HPUX_SOURCE)
-
- afd = open(AUDIO_DEVICE, O_WRONLY | O_NDELAY);
- if (afd == -1) {
- fprintf(stderr, "%s", AUDIO_DEVICE);
- perror(" can't be opened for write");
- return -1;
- }
- cfd = open(AUDIO_CONTROL, O_WRONLY | O_NDELAY);
- if (cfd == -1) {
- fprintf(stderr, "%s", AUDIO_DEVICE);
- perror(" can't be opened for write");
- close(afd);
- afd = -1;
- return -1;
- }
-#if defined(_HPUX_SOURCE)
-
- if (ioctl(cfd, AUDIO_SET_DATA_FORMAT, AUDIO_FORMAT_ULAW) < 0) {
- fprintf(stderr, "%s" AUDIO_DEVICE);
- perror("can't be set to u-law");
- close(afd);
- close(cfd);
- afd = -1;
- return -1;
- }
- if (ioctl(cfd, AUDIO_SET_CHANNELS, 1) < 0) {
- fprintf(stderr, "%s" AUDIO_DEVICE);
- perror("can't be set to have single channel");
- close(afd);
- close(cfd);
- afd = -1;
- return -1;
- }
- if (ioctl(cfd, AUDIO_SET_SAMPLE_RATE, 8000) < 0) {
- fprintf(stderr, "%s" AUDIO_DEVICE);
- perror("can't be set to 8000sps");
- close(afd);
- close(cfd);
- afd = -1;
- return -1;
- }
- if (ioctl(cfd, AUDIO_SET_OUTPUT, AUDIO_OUT_SPEAKER | AUDIO_OUT_HEADPHONE))
- {
- fprintf(stderr, "%s" AUDIO_DEVICE);
- perror("can't be set output to both internal speaker and headphone");
- close(afd);
- close(cfd);
- afd = -1;
- return -1;
- }
- if(ioctl(cfd, AUDIO_SET_TXBUFSIZE, 1024*64) < 0)
- {
- fprintf(stderr, "%s" AUDIO_DEVICE);
- perror("can't be set output buffer size to 64K");
- close(afd);
- close(cfd);
- afd = -1;
- return -1;
- }
-#endif /* _HPUX_SOURCE */
-
-#elif defined(IRIX)
- {
-#define NCH 1
-#define MSQUEUE 100
- ALconfig c;
- long params[2];
-
- params[0] = AL_OUTPUT_RATE;
- params[1] = 8000;
- ALsetparams(audioDevice, params, 2);
-
- if ((c = ALnewconfig()) == NULL) {
- afd = -1;
- return -1;
- }
- ALsetwidth(c, AL_SAMPLE_16);
- ALsetchannels(c, AL_MONO);
- ALsetqueuesize(c, 10240); /* Minimal queue size */
- playPort = ALopenport(AUDIO_DEVICE, "w", c);
- ALfreeconfig(c);
- if (playPort == NULL) {
- afd = -1;
- return -1;
- }
- afd = 0;
- }
-#elif defined(LINUX)
-
- afd = open(AUDIO_DEVICE, O_WRONLY);
- if (afd == -1) {
- fprintf(stderr, "%s", AUDIO_DEVICE);
- perror(" can't be opened for write");
- return -1;
- }
-
-#else /* no audio device supported on other platforms */
-
- fprintf(stderr, "Audio device access not supported, audio to be ignored\n");
- afd = -1;
- return -1;
-
-#endif /* SunOS, FreeBSD, _HPUX_SOURCE, ... */
- shared->AFPara.encodeType = AudioTypeMuLaw;
- shared->AFPara.channels = 1;
- shared->AFPara.bytesPerSample = 1;
- shared->AFPara.samplesPerSecond = 8000;
- start_time = get_msec();
- current_time = 0;
- fprintf(stderr, "Using native %s\n", AUDIO_DEVICE);
- return 0;
-}
-
-void SetAudioParameter(AudioParameter * para)
-{
-}
-
-unsigned int GetAudioTime(void)
-{
-#ifdef AUDIOFILE
- if (useAF) return AFGetTime(ac);
-#endif
-#if defined(__svr4__) || defined(SunOS) || defined(FreeBSD) \
- || defined(_HPUX_SOURCE) || defined(IRIX) || defined(LINUX)
- if (afd == -1) return 0;
- return get_duration(start_time, get_msec()) * 8; /* 8K sampling speed */
-#else
- return 0;
-#endif
-}
-
-/* Play size number of samples to AF */
-unsigned int PlayAudioSamples(unsigned int time, char * buf, int size)
-{
-#ifdef AUDIOFILE
- if (useAF) return AFPlaySamples(ac, time, size * shared->audioPara.bytesPerSample,
- (unsigned char *)buf);
-#endif
-
-#if defined(__svr4__) || defined(SunOS) || defined(FreeBSD) \
- || defined(_HPUX_SOURCE) || defined(IRIX) || defined(LINUX)
- if (afd == -1) return 0;
-
-#ifdef IRIX
- {
-#define BUFSIZE 1024
- static short AF_cvt_u2s[]={
- -32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
- -23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
- -15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,
- -11900,-11388,-10876,-10364, -9852, -9340, -8828, -8316,
- -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140,
- -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092,
- -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004,
- -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980,
- -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436,
- -1372, -1308, -1244, -1180, -1116, -1052, -988, -924,
- -876, -844, -812, -780, -748, -716, -684, -652,
- -620, -588, -556, -524, -492, -460, -428, -396,
- -372, -356, -340, -324, -308, -292, -276, -260,
- -244, -228, -212, -196, -180, -164, -148, -132,
- -120, -112, -104, -96, -88, -80, -72, -64,
- -56, -48, -40, -32, -24, -16, -8, 0,
- 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956,
- 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764,
- 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412,
- 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316,
- 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140,
- 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092,
- 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004,
- 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980,
- 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436,
- 1372, 1308, 1244, 1180, 1116, 1052, 988, 924,
- 876, 844, 812, 780, 748, 716, 684, 652,
- 620, 588, 556, 524, 492, 460, 428, 396,
- 372, 356, 340, 324, 308, 292, 276, 260,
- 244, 228, 212, 196, 180, 164, 148, 132,
- 120, 112, 104, 96, 88, 80, 72, 64,
- 56, 48, 40, 32, 24, 16, 8, 0
- };
- int left = size;
- unsigned char * src = buf;
- int i;
- while (left > 0) {
- short buffer[BUFSIZE];
- short * dst = buffer;
- int len = left;
- if (len > BUFSIZE) len = BUFSIZE;
- left -= len;
- for (i = 0; i < len; i ++) {
- *(dst ++) = AF_cvt_u2s[*(src ++)];
- }
- ALwritesamps(playPort, buffer, len);
- }
- }
-#else
- write(afd, buf, size);
-#endif
-
- current_time += size;
- return get_duration(start_time, get_msec()) * 8; /* 8K sampling speed */
-#else
- return 0;
-#endif
-}
-
-void StartAudioPlaySession(void)
-{
- SetAudioGain();
-#ifdef AUDIOFILE
- if (useAF) return;
-#endif
-#if defined(__svr4__) || defined(SunOS) || defined(FreeBSD) \
- || defined(_HPUX_SOURCE) || defined(IRIX)
- if (afd == -1) return;
-#else
- return;
-#endif
-}
-void SetAudioGain(void)
-{
-#if defined(__svr4__) || defined(SunOS) || defined(FreeBSD)
- audio_info_t sun_gapo;
-#elif defined(_HPUX_SOURCE)
- struct audio_gain ag;
-#elif defined(IRIX)
- long params[4];
-#endif
- int volume = shared->volumePosition;
-
-#ifdef AUDIOFILE
- if (useAF) {
- AFSetOutputGain(ac, volume * 2);
- /*
- AFSetOutputGain(ac, (volume - 10)/3);
- fprintf(stderr, "CTR audio.c: volume changed to %d.\n", volume);
- */
- return;
- }
-#endif
-#if defined(__svr4__) || defined(SunOS) || defined(FreeBSD)
- if (afd == -1) return;
- ioctl(cfd, AUDIO_GETINFO, &sun_gapo);
- sun_gapo.play.gain = volume * 2;
- ioctl(cfd, AUDIO_SETINFO, &sun_gapo);
- return;
-#elif defined(_HPUX_SOURCE)
- ioctl(cfd, AUDIO_GET_GAINS, &ag);
- ag.cgain[0].transmit_gain = AUDIO_OFF_GAIN+(AUDIO_MAX_GAIN-AUDIO_OFF_GAIN)*volume/100;
- ag.cgain[1].transmit_gain = ag.cgain[0].transmit_gain;
- ioctl(cfd, AUDIO_SET_GAINS, &ag);
- return;
-#elif defined(IRIX)
- params[0] = AL_LEFT_SPEAKER_GAIN;
- params[1] = volume;
- params[2] = AL_RIGHT_SPEAKER_GAIN;
- params[3] = volume;
- ALsetparams(audioDevice, params, 4);
- return;
-#else
- return;
-#endif
-}
-
-void AudioInterpolate(char *rBuf, int len, char * cBuf, int convLen)
-{
- unsigned char *rawBuf = (unsigned char *)rBuf;
- unsigned char *convBuf = (unsigned char *)cBuf;
- int i;
- float factor = (float)len / (float)convLen;
-
-#ifdef AUDIOFILE
- if ((!useAF) && afd == -1) return;
-#else
- if (afd == -1) return;
-#endif
-
- /*
- Fprintf(stderr, "factor %5.2lf, len %d, convLen %d\n", factor, len, convLen);
- */
- if (shared->audioPara.bytesPerSample == 1)
- {
- for (i=0; i<convLen; i++)
- {
- float a = i * factor;
- int k = (int) (a + 0.5);
- /*
- int k = a;
- a = a - k;
- */
- if (k < len - 1) { /* interpolation algorithm can be improved */
- /*
- convBuf[i] = AF_comp_u[(int)(a * AF_exp_u[(int)rawBuf[k+1] & 0xff] + (1.0 - a) *
- AF_exp_u[(int)rawBuf[k] & 0xff]) + 8192];
- */
-
- convBuf[i] = rawBuf[k];
-
- }
- else
- convBuf[i] = rawBuf[len-1];
- }
- }
- else
- {
- fprintf(stderr, "CTR audio.c error: multi_byte samples not supported.\n");
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp
deleted file mode 100644
index 4c3846bb46e..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp
+++ /dev/null
@@ -1,3100 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#ifdef ULTRIX
-#include <fcntl.h>
-#else
-#include <sys/fcntl.h>
-#endif
-#include <time.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <limits.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-#include "mpeg_shared/routine.h"
-#include "mpeg_shared/sendpt.h"
-#include "mpeg_shared/filters.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/com.h"
-#include "Command_Handler.h"
-
-#define SPEEDHIST_SIZE 20
-
-#define max(a,b) (a>b ? a : b)
-#define min(a,b) (a<b ? a : b)
-
-static int usr1_flag = 0;
-static int rtplay = 1;
-static int cmdSocket = -1;
-static int CTRpid = -1, VBpid = -1, VDpid = -1, UIpid = -1;
-static int ABpid = -1;
-static int videoSocket = -1;
-static int audioSocket = -1;
-static int hasAudioDevice = 0;
-static int cmdBytes = 0;
-static char *cmdBuffer = NULL;
-static char *vh, *vf, *ah, *af;
-static int cmdAcks = 0;
-static int speedPtr = 0;
-static struct
-{
- int frameId;
- int usecPerFrame;
- float frameRateLimit;
- int frames;
- int framesDropped;
-} speedHistory[SPEEDHIST_SIZE];
-
-/* following are for live video */
-static unsigned startTime; /* used to record start time for live playback,
- also used to record FF/FB/PLAY round trip time */
-static unsigned startVSA; /* VS advance at the begining of playback of live video */
-static int displayedFrames;
-
-/* following static variable is for frameRate feedback. See comments on
- initialization of these variables in function play()*/
-
-static int fbstate = 0; /* state value of frame-rate feedback */
-static double maxfr = 0; /* frame-rate limit during playback, in fps. This is deduced
- from frameRateLimit, a constant during a playback, even if
- play speed changes */
-static int minupf = 0; /* minimum usec/frame, equals to 1000000/maxfr */
-static double maxrate = 0; /* current max frame rate, in percent of maxfr, after taken
- playspeed into consideration. If play speed > maxfr,
- then this value would be 1.0. Otherwise it would be
- playspeed/maxfr */
-static double frate = 0; /* current server frame rate, in percentage of maxrate */
-static double adjstep = 0; /* step of frame-rate adjustment. In percentage value.
- This is basically
- maxrate/#frames-in-feedback-frame-sequence */
-static int fb_startup = 0; /* Indicate the first feedback action. The first feedback
- action is to set the server fps directly according to
- actully measured display frame-rate. All following
- feedback action would then adjust server fps linearly
- adjstep each time */
-
-#define max(a,b) (a>b ? a : b)
-#define min(a,b) (a<b ? a : b)
-
-#define NewCmd(val) {shared->cmd = val; shared->cmdsn ++; }
-
-static void compute_sendPattern(void);
-
-int
-OurCmdRead(char *buf, int size)
-{
- int val;
- if (size == 0) return 0;
- if (cmdBytes > 0)
- {
- memcpy(buf, cmdBuffer, size);
- cmdBytes -= size;
- cmdBuffer += size;
- return 0;
- }
- while ((val = read(cmdSocket, (buf), (size))) <= 0)
- {
- if (val == -1 && errno == EINTR) return 1;
- if (!val) {
- perror("CTR error, EOF reached unexpected within CmdRead()");
- }
- else {
- perror("CTR CmdRead() from UI through CmdSocket");
- }
- exit(1);
- }
- return 0;
-}
-
-void CmdRead(char *buf, int size)
-{
- int val;
- if (size == 0) return;
- if (cmdBytes > 0)
- {
- memcpy(buf, cmdBuffer, size);
- cmdBytes -= size;
- cmdBuffer += size;
- return;
- }
- while ((val = read(cmdSocket, (buf), (size))) <= 0)
- {
- if (val == -1 && errno == EINTR) continue;
- if (!val) {
- perror("CTR error, EOF reached unexpected within CmdRead()");
- }
- else {
- perror("CTR CmdRead() from UI through CmdSocket");
- }
- exit(1);
- }
- return;
-}
-
-static int CmdReadNW(char *buf, int size)
-{
- struct fd_set read_mask;
- int nfds = cmdSocket+1;
- int val;
-
- if (size == 0) return 0;
-
- if (cmdBytes > 0)
- {
- memcpy(buf, cmdBuffer, size);
- cmdBytes -= size;
- cmdBuffer += size;
- return 0;
- }
-
- FD_ZERO(&read_mask);
- FD_SET(cmdSocket, &read_mask);
-#ifdef _HPUX_SOURCE
- if (select(nfds, (int *)&read_mask, NULL, NULL, NULL) == -1)
-#else
- if (select(nfds, &read_mask, NULL, NULL, NULL) == -1)
-#endif
- {
- if (errno == EINTR)
- return -1;
- perror("CTR CmdReadNW by select");
- exit(1);
- }
- if ((val = read(cmdSocket, (buf), (size))) < 0)
- {
- if (errno == EINTR)
- return -1;
-
- perror("CTR CmdReadNW by read");
- exit(1);
- }
- if (val == 0)
- {
- fprintf(stderr, "Error: EOF reached unexpectedly within CmdReadNW().");
- exit(1);
- }
- return 0;
-}
-
-static void CmdWrite(unsigned char * buf, int size)
-{
- if (cmdAcks > 0 && size == 1 && *buf == CmdDONE)
- {
- cmdAcks --;
- return;
- }
-
- while (write(cmdSocket, buf, size) == -1)
- {
- if (errno == EINTR)
- continue;
- perror("CTR writes to UI through cmdSocket");
- exit(1);
- }
-}
-
-/* following function can be replaced by ../shared/fileio.c:read_bytes()
- but SocketRead provides more error info */
-
-static void SocketRead(int s, char *buf, int size)
-{ int val, remain = size;
- char * ptr = buf;
- for (;;)
- {
- val = read(s, ptr, remain);
- /*
- fprintf(stderr, "CTR got from %sSocket %d of %d.\n",
- s == videoSocket ? "video" : "audio", val, remain);
- */
- if (val == -1 && errno == EINTR)
- {
- errno = 0;
- continue;
- }
- if (val == -1)
- {
- fprintf(stderr, "CTR error read %sSocket, ret=%d(size=%d)",
- s == videoSocket ? "video" : "audio", size-remain, size);
- perror("");
- exit(1);
- }
- if (val == 0)
- {
- fprintf(stderr, "CTR error read %sSocket, EOF met, ret=%d(size=%d).\n",
- s == videoSocket ? "video" : "audio", size-remain, size);
- exit(1);
- }
- ptr += val;
- remain -= val;
- if (remain < 0)
- {
- fprintf(stderr, "CTR error read %sSocket, read too much, ret=%d(size=%d).\n",
- s == videoSocket ? "video" : "audio", size-remain, size);
- exit(1);
- }
- if (remain == 0)
- break;
- }
-}
-
-#define VideoRead(buf, size) SocketRead(videoSocket, buf, size)
-
-#define VideoWrite(buf, psize) \
- { int val; while ((val = write(videoSocket, (buf), (psize))) == -1) \
- { if (errno == EINTR) continue; \
- perror("CTR writes to VS through videoSocket");\
- exit(1); \
- } \
- if (val < (int)(psize)) { \
- fprintf(stderr, "CTR bad VideoWrite, size %d, val %d", psize, val); perror(""); }\
- }
-
-#define AudioRead(buf, size) SocketRead(audioSocket, buf, size)
-
-#define AudioWrite(buf, size) \
- { while (write(audioSocket, (buf), (size)) == -1) \
- { if (errno == EINTR) continue; \
- perror("CTR writes to AS through audioSocket"); \
- exit(1); \
- } \
- }
-
-static void start_timer(void);
-static void stop_timer(void);
-static void timer_speed(void);
-static void wait_display(void);
-static void stop_playing();
-
-static int InitVideoChannel(char * phostname, char * vf)
-{
- int dataSocket = -1;
-
- if (ComOpenConnPair(phostname, &videoSocket,
- &dataSocket, &shared->videoMaxPktSize) == -1) {
- return -1;
- }
-
- /* Initialize with VS */
- {
- INITvideoPara para;
- INITvideoReply reply;
- unsigned char tmp;
- tmp = CmdINITvideo;
- VideoWrite(&tmp, 1);
-
- para.sn = htonl(shared->cmdsn);
- para.version = htonl(VERSION);
- para.nameLength = htonl(strlen(vf)+1);
-
- VideoWrite(&para, sizeof(para));
- VideoWrite(vf, strlen(vf)+1);
- /*
- fprintf(stderr, "InitCommand to VSwritten.\n");
- */
- /*
- VideoRead((char*)&tmp, 1);
- */
- errno = 0;
- if (read(videoSocket, (char*)&tmp, 1) <= 0) {
- if (errno) {
- perror("CTR error read first byte from videoSocket");
- }
- else {
- fprintf(stderr, "CTR error: videoSocket closed by VS.\n");
- }
- ComCloseConn(dataSocket);
- ComCloseConn(videoSocket);
- videoSocket = -1;
- return -1;
- }
- if (tmp == CmdFAIL)
- {
- char errmsg[128];
- read_string(videoSocket, errmsg, 128);
- fprintf(stderr, "CTR failed to connect to VS: %s.\n", errmsg);
- ComCloseConn(dataSocket);
- ComCloseConn(videoSocket);
- videoSocket = -1;
- return -1;
- }
- else
- {
- VideoRead((char*)&reply, sizeof(reply));
-#ifdef NeedByteOrderConversion
- reply.live = ntohl(reply.live);
- reply.format = ntohl(reply.format);
- reply.totalHeaders = ntohl(reply.totalHeaders);
- reply.totalGroups = ntohl(reply.totalGroups);
- reply.totalFrames = ntohl(reply.totalFrames);
- reply.horizontalSize = ntohl(reply.horizontalSize);
- reply.verticalSize = ntohl(reply.verticalSize);
- reply.pelAspectRatio = ntohl(reply.pelAspectRatio);
- reply.pictureRate1000 = ntohl(reply.pictureRate1000);
- reply.vbvBufferSize = ntohl(reply.vbvBufferSize);
- reply.sizeIFrame = ntohl(reply.sizeIFrame);
- reply.sizePFrame = ntohl(reply.sizePFrame);
- reply.sizeBFrame = ntohl(reply.sizeBFrame);
- reply.sizeSystemHeader = ntohl(reply.sizeSystemHeader);
- reply.sizeGop = ntohl(reply.sizeGop);
- reply.averageFrameSize = ntohl(reply.averageFrameSize);
- reply.firstGopFrames = ntohl(reply.firstGopFrames);
- reply.patternSize = ntohl(reply.patternSize);
-#endif
- shared->live += reply.live;
- shared->videoFormat = reply.format;
- shared->totalHeaders = reply.totalHeaders;
- shared->totalFrames = reply.totalFrames;
- shared->totalGroups = reply.totalGroups;
- shared->averageFrameSize = reply.averageFrameSize;
- shared->horizontalSize = reply.horizontalSize;
- shared->verticalSize = reply.verticalSize;
- shared->pelAspectRatio = reply.pelAspectRatio;
- shared->pictureRate = ((double)reply.pictureRate1000) / 1000.0;
- shared->vbvBufferSize = reply.vbvBufferSize;
- shared->firstGopFrames = reply.firstGopFrames;
- shared->patternSize = strlen(reply.pattern);
- if (shared->patternSize == 0) {
-
- Fprintf(stderr, "CTR warning: patternsize %d\n", shared->patternSize);
-
- shared->patternSize = 1;
- shared->pattern[0] = 'I';
- shared->pattern[1] = 0;
- shared->IframeGap = 1;
- }
- else if (shared->patternSize < PATTERN_SIZE)
- {
- int i;
- char * ptr = shared->pattern + shared->patternSize;
- strncpy(shared->pattern, reply.pattern, shared->patternSize);
- for (i = 1; i < PATTERN_SIZE / shared->patternSize; i ++) {
- memcpy(ptr, shared->pattern, shared->patternSize);
- ptr += shared->patternSize;
- }
- shared->IframeGap = 1;
- while (shared->IframeGap < shared->patternSize)
- {
- if (shared->pattern[shared->IframeGap] == 'I')
- break;
- else
- shared->IframeGap ++;
- }
- }
- else
- {
- fprintf(stderr, "CTR Error: patternSize %d greater than PATTERN_SIZE %d.\n",
- shared->patternSize, PATTERN_SIZE);
- exit(1);
- }
- fprintf(stderr, "Video: %s, %s\n",
- shared->videoFormat == VIDEO_SIF ? "SIF" :
- shared->videoFormat == VIDEO_JPEG ? "JPEG" :
- shared->videoFormat == VIDEO_MPEG1 ? "MPEG1" :
- shared->videoFormat == VIDEO_MPEG2 ? "MPEG2" : "UNKOWN format",
- reply.live ? "live source" : "stored source");
-
- fprintf(stderr, "Video: numS-%d, numG-%d, numF-%d, aveFrameSize-%d\n",
- reply.totalHeaders, reply.totalGroups, reply.totalFrames,
- reply.averageFrameSize);
- fprintf(stderr, "Video: maxS-%d, maxG-%d, maxI-%d, maxP-%d, maxB-%d\n",
- reply.sizeSystemHeader, reply.sizeGop,
- reply.sizeIFrame, reply.sizePFrame, reply.sizeBFrame);
- fprintf(stderr,
- "Video: SHinfo: hsize-%d, vsize-%d, pelAspect-%d, rate-%f, vbv-%d.\n",
- reply.horizontalSize, reply.verticalSize, reply.pelAspectRatio,
- shared->pictureRate, reply.vbvBufferSize);
- shared->pattern[shared->patternSize] = 0;
- fprintf(stderr, "Video: firstGopFrames %d, pattern: %s, IframeGap %d\n",
- reply.firstGopFrames, reply.pattern, shared->IframeGap);
- shared->pattern[shared->patternSize] = 'I';
- if (reply.totalFrames > MAX_FRAMES && (!shared->live))
- {
- fprintf(stderr,
- "Error: totalFrames %d > MAX_FRAMES %d, needs change and recompile.\n",
- reply.totalFrames, MAX_FRAMES);
- ComCloseConn(dataSocket);
- ComCloseConn(videoSocket);
- videoSocket = -1;
- return -1;
- }
-
- }
-
- /* create VB, and put INIT frame to VB*/
- {
- int sp[2]; /* sp[0] is for CTR and sp[1] is for VB */
-
- /* create command socket pair for sending INIT frame to VB, the pipe
- should be discard/non-discard in consistent with videoSocket*/
- if (socketpair(AF_UNIX,
- shared->videoMaxPktSize >= 0 ? SOCK_STREAM :
- SOCK_DGRAM, 0, sp) == -1)
- {
- perror("CTR error on open CTR-VB socketpair");
- exit(1);
- }
-
- switch (VBpid = fork())
- {
- case -1:
- perror("CTR error on forking VB process");
- exit(1);
- break;
- case 0:
- if (realTimeFlag) {
- SetRTpriority("VB", -1);
- }
- free(vh);
- free(vf);
- free(ah);
- free(af);
- close(sp[0]);
- ComCloseFd(videoSocket);
- if (audioSocket >= 0)
- ComCloseFd(audioSocket);
- ABdeleteBuf();
- VDdeleteBuf();
- if (cmdSocket >= 0)
- close(cmdSocket);
- if (realTimeFlag >= 2) {
-#ifdef __svr4__
- if (SetRTpriority("VB", 0)) realTimeFlag = 0;
-#elif defined(_HPUX_SOURCE)
- if (SetRTpriority("VB", 1)) realTimeFlag = 0;
-#endif
- }
- VBprocess(sp[1], dataSocket);
- break;
- default:
- close(sp[1]);
- ComCloseFd(dataSocket);
- {
- int bytes, res;
- /* passing all messages of INIT frame to VB here. */
- char * buf = (char *)malloc(INET_SOCKET_BUFFER_SIZE);
- VideoMessage *msg = (VideoMessage *)buf;
- int pkts = 1, msgo = 0, msgs = 0;
-
- if (buf == NULL) {
- perror("CTR error on malloc() for INIT frame");
- exit(1);
- }
- while (msgo + msgs < pkts) {
- VideoRead(buf, sizeof(*msg));
- pkts = ntohl(msg->packetSize);
- msgo = ntohl(msg->msgOffset);
- msgs = ntohl(msg->msgSize);
- if (shared->videoMaxPktSize >= 0) { /* non-discard mode */
- write_bytes(sp[0], buf, sizeof(*msg));
- bytes = msgs;
- while (bytes > 0) {
- int size = min(bytes, INET_SOCKET_BUFFER_SIZE);
- VideoRead(buf, size);
- write_bytes(sp[0], buf, size);
- bytes -= size;
- }
- }
- else {
- VideoRead(buf + sizeof(*msg), msgs);
- bytes = sizeof(*msg) + msgs;
- while ((res = write(sp[0], buf, bytes)) == -1) {
- if (errno == EINTR || errno == ENOBUFS) continue;
- perror("CTR error on sending INIT frame to VB");
- exit(1);
- }
- if (res < bytes) {
- fprintf(stderr, "CTR warn: send() res %dB < bytes %dB\n", res, bytes);
- }
- /*
- Fprintf(stderr,
- "CTR transferred INIT frame to VB: pkts %d, msgo %d, msgs %d\n",
- pkts, msgo, msgs);
- */
- }
- }
- read(sp[0], buf, 1); /* read a garbage byte, to sync with VB */
- close(sp[0]);
- free(buf);
- }
- break;
- }
- }
- }
-#ifdef STAT
- if (shared->config.collectFrameInfo && (!shared->live))
- {
- int i;
- int count = 0;
- char ch;
- char buf[100];
- FILE *fp;
-
- for (;;)
- {
- sprintf(buf, "struct.%d", count++);
- if (access(buf, 0))
- break;
- if (count > 10000)
- {
- fprintf(stderr, "CTR generating struct file, weired thing happened.\n");
- exit(1);
- }
- }
- fprintf(stderr, "MPEG info collected to %s. . .", buf);
- fp = fopen(buf, "w");
- if (fp == NULL)
- {
- fprintf(stderr, "CTR failed to open %s for write.\n", buf);
- perror("");
- exit(1);
- }
- {
- time_t val = time(NULL);
- get_hostname(buf, 100);
- buf[99] = 0;
- fprintf(fp, "ClientHost: %s\n", buf);
- fprintf(fp, "Date: %s\n", ctime(&val));
- }
- fprintf(fp, "VideoHost: %s\nVideoFile: %s\n", vh, vf);
- fprintf(fp, "AudioHost: %s\nAudioFile: %s\n\n", ah, af);
- fprintf(fp, "TotalFrames: %d\nTotalGroups: %d\n",
- shared->totalFrames, shared->totalGroups);
- fprintf(fp, "TotalHeaders: %d\n", shared->totalHeaders);
- fprintf(fp, "PictureRate: %f\nPictureSize: %d x %d\n",
- shared->pictureRate, shared->horizontalSize, shared->verticalSize);
- fprintf(fp, "AverageFrameSize: %d\n", shared->averageFrameSize);
- shared->pattern[shared->patternSize] = 0;
- fprintf(fp, "Pattern(%d frames): %s\n\n", shared->patternSize, shared->pattern);
- shared->pattern[shared->patternSize] = 'I';
- {
- fprintf(fp, "FrameInfo:\n ");
- for (i = 0; i < 10; i++)
- fprintf(fp, " %-6d", i);
- fprintf(fp, "\n ----------------------------------------------------");
- ch = CmdSTATstream;
- VideoWrite(&ch, 1);
- for (i = 0; i < shared->totalFrames; i++)
- {
- short size;
- VideoRead(&ch, 1);
- VideoRead((char*)&size, 2);
- size = ntohs(size);
- if (i % 10 == 0)
- fprintf(fp, "\n%4d: ", i / 10);
- fprintf(fp, "%c%-6d", ch, (int)size);
- }
- }
- }
-#endif
- return 0;
-}
-
-static int InitAudioChannel(char * phostname, char * af)
-{
- int dataSocket = -1;
-
- if (!hasAudioDevice)
- {
- fprintf(stderr, "CTR warning: Audio device not available, Audio ignored.\n");
- return -1;
- }
-
- if (ComOpenConnPair(phostname, &audioSocket,
- &dataSocket, &shared->audioMaxPktSize) == -1) {
- return -1;
- }
-
- /* Initialize with AS */
- {
- INITaudioPara para;
- INITaudioReply reply;
- unsigned char tmp;
- tmp = CmdINITaudio;
- AudioWrite(&tmp, 1);
- para.sn = htonl(shared->cmdsn);
- para.version = htonl(VERSION);
- para.para.encodeType = htonl(shared->AFPara.encodeType);
- para.para.channels = htonl(shared->AFPara.channels);
- para.para.samplesPerSecond = htonl(shared->AFPara.samplesPerSecond);
- para.para.bytesPerSample = htonl(shared->AFPara.bytesPerSample);
- para.nameLength = htonl(strlen(af)+1);
- /*
- fprintf(stderr, "AF Audio para: encode %d, ch %d, sps %d, bps %d.\n",
- para.para.encodeType, para.para.channels,
- para.para.samplesPerSecond, para.para.bytesPerSample);
- */
- AudioWrite(&para, sizeof(para));
- AudioWrite(af, strlen(af)+1);
- /*
- fprintf(stderr, "CTR: InitCommand to AS written.\n");
- */
- /*
- AudioRead((char*)&tmp, 1);
- */
- errno = 0;
- if (read(audioSocket, (char*)&tmp, 1) <= 0) {
- if (errno) {
- perror("CTR error read first byte from audioSocket");
- }
- else {
- fprintf(stderr, "CTR error: audioSocket closed by AS.\n");
- }
- ComCloseConn(audioSocket);
- ComCloseConn(dataSocket);
- videoSocket = -1;
- return -1;
- }
- if (tmp == CmdFAIL)
- {
- char errmsg[128];
- read_string(audioSocket, errmsg, 128);
- fprintf(stderr, "CTR failed to connect to AS: %s\n", errmsg);
- ComCloseConn(audioSocket);
- ComCloseConn(dataSocket);
- audioSocket = -1;
- return -1;
- }
- else
- {
- int flag = 1;
- AudioRead((char*)&reply, sizeof(reply));
- shared->live += ntohl(reply.live);
- shared->audioFormat = ntohl(reply.format);
- shared->audioPara.encodeType = ntohl(reply.para.encodeType);
- shared->audioPara.channels = ntohl(reply.para.channels);
- shared->audioPara.samplesPerSecond = ntohl(reply.para.samplesPerSecond);
- shared->audioPara.bytesPerSample = ntohl(reply.para.bytesPerSample);
- shared->totalSamples = ntohl(reply.totalSamples);
-
- fprintf(stderr, "Audio: samples %d, sps %d, bps %d\n",
- shared->totalSamples, shared->AFPara.samplesPerSecond,
- shared->AFPara.bytesPerSample);
-
- SetAudioParameter(&shared->audioPara);
- }
-
- /* create AB */
- {
- switch (ABpid = fork())
- {
- case -1:
- perror("CTR error on forking AB process");
- exit(1);
- break;
- case 0:
- if (realTimeFlag) {
- SetRTpriority("AB", -1);
- }
- free(vh);
- free(vf);
- free(ah);
- free(af);
- ComCloseFd(audioSocket);
- if (videoSocket >= 0)
- ComCloseFd(videoSocket);
- VBdeleteBuf();
- VDdeleteBuf();
- if (cmdSocket >= 0)
- close(cmdSocket);
- if (realTimeFlag >= 2) {
-#ifdef __svr4__
- if (SetRTpriority("AB", 0)) realTimeFlag = 0;
-#elif defined(_HPUX_SOURCE)
- if (SetRTpriority("AB", 1)) realTimeFlag = 0;
-#endif
- }
- ABprocess(dataSocket);
- break;
- default:
- ComCloseFd(dataSocket);
- ABflushBuf(0);
- break;
- }
- }
- }
- return 0;
-}
-
-static void set_speed(void)
-{
- int val;
- if (shared->live) {
- shared->speedPosition = 50;
- }
- val = shared->speedPosition;
- if (val == 0)
- val = 1;
- if (shared->cmd == CmdPLAY && audioSocket >= 0 && videoSocket >= 0 && rtplay) {
- /* limit audio signal period to no more than 1.0 seconds, because AudioFile
- will block if one send more than 4 seconds of sample ahead of current
- time. and our timing control is not precise.
- */
- double s = ((1.0 / shared->pictureRate) * 50.0) *
- (double)max(shared->config.framesPerAudioPlay, 1) / 1.0;
- if (s > 50.0) {
- fprintf(stderr, "CTR warning: lower value of parameter framesPerAudioPlay,\n");
- fprintf(stderr, " otherwise the Player may not work properly.\n");
- }
- if (val < s) {
- if (shared->config.verbose) {
- if (val < s * 1.0 / 2.0) {
- val = (int)s;
- fprintf(stderr, "CTR warning: speed too low, set to %d scale val.\n", val);
- }
- else {
- fprintf(stderr, "CTR warning: audio signal period %3.2f > 1 sec.\n",
- 1.0 * (float)s / (float) val);
- fprintf(stderr, " lower framesPerAudioPlay or increase speed.\n");
- }
- }
- else {
- val = (int)s;
- }
- }
- }
- if (videoSocket >= 0)
- {
- float fps;
- if (val <= 50)
- fps = shared->pictureRate * (float)val / 50.0;
- else
- {
- float rate = shared->config.maxFPS - shared->pictureRate;
- fps = shared->pictureRate + (float)rate * (float)(val - 50) / 50.0;
- /* only B frames are to be dropped */
- }
- Fprintf(stderr, "Play speed video %5.1ffps\n", fps);
- shared->framesPerSecond = (int)fps;
- shared->usecPerFrame = (int) (1000000.0/fps);
- if (audioSocket >= 0)
- {
- float sps = shared->audioPara.samplesPerSecond * fps / shared->pictureRate;
- shared->samplesPerSecond = (int)sps;
- shared->usecPerSample = (int)(1000000.0/sps);
- }
- }
- else if (audioSocket >= 0)
- {
- float sps;
- if (val <= 50)
- sps = (float)shared->audioPara.samplesPerSecond * (float)val / 50.0;
- else
- {
- int rate = shared->config.maxSPS - shared->audioPara.samplesPerSecond;
- sps = shared->audioPara.samplesPerSecond + (float)rate * (float)(val - 50) / 50.0;
- }
- Fprintf(stderr, "Play speed audio %5.1fsps\n", sps);
- shared->samplesPerSecond = (int)sps;
- shared->usecPerSample = (int)(1000000.0/sps);
- }
-}
-
-static void init()
-{
- int i, j;
-
- /* try to stop and close previous playing */
- if (audioSocket >= 0 || videoSocket >= 0)
- {
- unsigned char tmp = CmdCLOSE;
- stop_playing();
-
- if (audioSocket >= 0)
- {
- if (ABpid > 0) {
- kill(ABpid, SIGUSR1);
- ABpid = -1;
- }
- usleep(10000);
- AudioWrite(&tmp, 1);
- ComCloseConn(audioSocket);
- audioSocket = -1;
- }
-
- if (videoSocket >= 0)
- {
- if (VBpid > 0) {
- kill(VBpid, SIGUSR1);
- VBpid = -1;
- }
- usleep(10000);
- VideoWrite(&tmp, 1);
- ComCloseConn(videoSocket);
- videoSocket = -1;
- while ((!VBbufEmpty()) || !VDbufEmpty()) {
- while (VDpeekMsg() != NULL) {
- VDreclaimMsg(VDgetMsg());
- }
- usleep(10000);
- }
- usleep(10000);
- }
- }
-
- /* read in video/audio files */
- NewCmd(CmdINIT);
- CmdRead((char*)&i, 4);
- CmdRead(vh, i);
- vh[i] = 0;
- CmdRead((char*)&i, 4);
- CmdRead(vf, i);
- vf[i] = 0;
- CmdRead((char*)&i, 4);
- CmdRead(ah, i);
- ah[i] = 0;
- CmdRead((char*)&i, 4);
- CmdRead(af, i);
- af[i] = 0;
- /*
- fprintf(stderr, "INIT: vh-%s, vf-%s, ah-%s, af-%s\n", vh, vf, ah, af);
- */
-
- shared->live = 0;
- shared->audioMaxPktSize = !shared->config.audioConn;
- shared->videoMaxPktSize = !shared->config.videoConn;
-
- if (af[0] != 0)
- {
- if (InitAudioChannel(ah, af))
- {
- audioSocket = -1;
- shared->totalSamples = 0;
- }
- else
- {
- shared->nextSample = 0;
- if (shared->config.maxSPS < shared->audioPara.samplesPerSecond)
- shared->config.maxSPS < shared->audioPara.samplesPerSecond;
- }
- }
- else
- {
- shared->totalSamples = 0;
- audioSocket = -1;
- }
- if (vf[0] != 0)
- {
- if (InitVideoChannel(vh, vf))
- {
- shared->totalFrames = 0; /* disable video channel */
- videoSocket = -1;
- }
- else
- {
- shared->nextFrame = 1;
- shared->nextGroup = 0;
- shared->currentFrame = shared->currentGroup = shared->currentDisplay = 0;
- if (shared->config.maxFPS < shared->framesPerSecond)
- shared->config.maxFPS = shared->framesPerSecond;
- }
- }
- else
- {
- videoSocket = -1;
- shared->totalFrames = 0; /* disable video channel */
- }
- if (audioSocket < 0 && videoSocket < 0) /* none of video/audio channels is setup */
- {
- unsigned char tmp = CmdFAIL;
- CmdWrite(&tmp, 1);
- /*
- fprintf(stderr, "CTR initialization failed.\n");
- */
- return;
- }
- else
- {
- unsigned char tmp = CmdDONE;
- set_speed();
- if (videoSocket >= 0)
- wait_display();
- CmdWrite(&tmp, 1);
- if (videoSocket < 0)
- {
- tmp = CmdVPclearScreen;
- CmdWrite(&tmp, 1);
- }
- return;
- }
-}
-
-static void stop(void)
-{
-#ifdef STAT
- unsigned char preCmd = shared->cmd;
-#endif
- unsigned char tmp = CmdDONE;
- /*
- fprintf(stderr, "CTR: STOP . . .\n");
- */
- stop_playing();
-
- if (shared->live && videoSocket >= 0) {
- Fprintf(stderr, "CTR live video stat: average disp frame rate: %5.2f fps\n",
- shared->pictureRate * displayedFrames / shared->nextFrame);
- }
- CmdWrite(&tmp, 1);
-
-#ifdef STAT
- if (shared->collectStat && preCmd == CmdPLAY && videoSocket >= 0)
- {
- int i;
- int count = 0;
- char ch;
- char buf[100];
- FILE *fp;
-
- for (;;)
- {
- sprintf(buf, "stat.%02d", count++);
- if (access(buf, 0))
- break;
- if (count > 10000)
- {
- fprintf(stderr, "CTR generating stat file, weired thing happened.\n");
- exit(1);
- }
- }
- fprintf(stderr, "Statistics is being collected to file %s. . .", buf);
- fp = fopen(buf, "w");
- if (fp == NULL)
- {
- fprintf(stderr, "CTR failed to open %s for write.\n", buf);
- perror("");
- exit(1);
- }
- {
- time_t val = time(NULL);
- get_hostname(buf, 100);
- buf[99] = 0;
- fprintf(fp, "ClientHost: %s\n", buf);
- fprintf(fp, "Date: %s\n", ctime(&val));
- }
- fprintf(fp, "VideoHost: %s\nVideoFile: %s\n", vh, vf);
- fprintf(fp, "AudioHost: %s\nAudioFile: %s\n\n", ah, af);
- fprintf(fp, "TotalFrames: %d\nTotalGroups: %d\n",
- shared->totalFrames, shared->totalGroups);
- fprintf(fp, "TotalHeaders: %d\n", shared->totalHeaders);
- fprintf(fp, "PictureRate: %f\nPictureSize: %d x %d\n",
- shared->pictureRate, shared->horizontalSize, shared->verticalSize);
- fprintf(fp, "AverageFrameSize: %d\n", shared->averageFrameSize);
- shared->pattern[shared->patternSize] = 0;
- fprintf(fp, "Pattern(%d frames): %s\n", shared->patternSize, shared->pattern);
- shared->pattern[shared->patternSize] = 'I';
-
- fprintf(fp, "\nStartPlayRoundTripDelay: %d (millisec)\n",
- shared->playRoundTripDelay);
- fprintf(fp, "VBmaxBytes: %d\nVBdroppedFrames: %d\n",
- shared->stat.VBmaxBytes, shared->stat.VBdroppedFrames);
- fprintf(fp, "VBemptyTimes: %d\nVDlastFrameDecoded: %d\n",
- shared->stat.VBemptyTimes, shared->stat.VDlastFrameDecoded);
-
- fprintf(fp, "\nVDframesDroppedWithoutReference: %d\n",
- shared->stat.VDnoRef);
- fprintf(fp, "VDframesDroppedAgainstSendPattern: %d\n",
- shared->stat.VDagainstSendPattern);
- fprintf(fp, "VDIframesDroppedTooLate: %d\n",
- shared->stat.VDtooLateI);
- fprintf(fp, "VDPframesDroppedTooLate: %d\n",
- shared->stat.VDtooLateP);
- fprintf(fp, "VDBframesDroppedTooLate: %d\n",
- shared->stat.VDtooLateB);
-
- fprintf(fp, "CTRframesDisplayedOnTime: %d\n", shared->stat.CTRdispOnTime);
- fprintf(fp, "CTRframesDisplayedLate: %d\n", shared->stat.CTRdispLate);
- fprintf(fp, "CTRframesDroppedOutOrder: %d\n", shared->stat.CTRdropOutOrder);
- fprintf(fp, "CTRframesDroppedLate: %d\n", shared->stat.CTRdropLate);
-
- fprintf(fp,
-"\nSpeedChangeHistory:\n(frameId, UPF, FPS, frameRateLimit, frames, dropped):\n");
- for (i = 0; i < min(speedPtr, SPEEDHIST_SIZE); i ++)
- fprintf(fp, "%-4d %-6d %6.2f %6.2f %-4d %d\n",
- speedHistory[i].frameId, speedHistory[i].usecPerFrame,
- 1000000.0 / (double)speedHistory[i].usecPerFrame,
- speedHistory[i].frameRateLimit,
- speedHistory[i].frames, speedHistory[i].framesDropped);
- if (speedPtr > SPEEDHIST_SIZE)
- fprintf(fp, "Actual speed change times: %d (>%d)\n",
- speedPtr, SPEEDHIST_SIZE);
-
- fprintf(fp, "\nVDbufferFillLevel:\n(frames, times):\n");
- for (i = 0; i < MAX_VDQUEUE_SIZE; i ++) {
- if (shared->stat.VDqueue[i]) {
- fprintf(fp, "%-6d %d\n", i, shared->stat.VDqueue[i]);
- }
- }
-
- fprintf(fp, "\nVBmessageGap:\n(width, times):\n");
- {
- for (i = 0; i <= MSGGAP_MAX - MSGGAP_MIN; i ++) {
- if (shared->stat.VBmsgGaps[i]) {
- fprintf(fp, "%-6d %d\n", i + MSGGAP_MIN, shared->stat.VBmsgGaps[i]);
- }
- }
- }
-
- if (shared->stat.fbPacketNumber > 0)
- {
- fprintf(fp,
-"\nFeedbackPackets:\n(fId,addUPF,addf,rateLimit,frames,fdropped,advance):\n");
- for (i = 0; i < min(shared->stat.fbPacketNumber, MAX_FB_PACKETS); i++)
- fprintf(fp, "%-6d %-6d %-6d %6.2f %4d %4d %d\n",
- shared->stat.fbPackets[i].frameId,
- shared->stat.fbPackets[i].addUsecPerFrame,
- shared->stat.fbPackets[i].addFrames,
- shared->stat.fbPackets[i].frameRateLimit,
- shared->stat.fbPackets[i].frames,
- shared->stat.fbPackets[i].framesDropped,
- shared->stat.fbPackets[i].advance);
- if (shared->stat.fbPacketNumber > MAX_FB_PACKETS)
- fprintf(fp, "Actual # of FB packets: %d\n", shared->stat.fbPacketNumber);
- }
-
- ch = CmdSTATsent;
- VideoWrite(&ch, 1);
- fprintf(fp, "\n\nVSFramesSent:\n ");
- for (i = 0; i < 8; i++)
- fprintf(fp, "%-10d", i * 10);
- fprintf(fp, "\n -----------------------------------------------------");
- count = 0;
- for (i = 0; i < (shared->totalFrames + 7)/8; i ++)
- {
- int j;
- VideoRead(&ch, 1);
- if (i % 10 == 0)
- fprintf(fp, "\n%5d: ", i * 8);
- for (j = 0; j < 8; j++)
- {
- if (ch & (1 << j))
- {
- count ++;
- fputc('x', fp);
- }
- else
- fputc('-', fp);
- }
- }
- fprintf(fp, "\nVSTotalFramesSent: %d\n", count);
- fprintf(fp, "\nVBFramesReceived:\n ");
- for (i = 0; i < 8; i++)
- fprintf(fp, "%-10d", i * 10);
- fprintf(fp, "\n -----------------------------------------------------");
- count = 0;
- for (i = 0; i < (shared->totalFrames + 7)/8; i ++)
- {
- int j;
- if (i % 10 == 0)
- fprintf(fp, "\n%5d: ", i * 8);
- for (j = 0; j < 8; j++)
- {
- if (shared->stat.VBframesReceived[i] & (1 << j))
- {
- count ++;
- fputc('x', fp);
- }
- else
- fputc('-', fp);
- }
- }
- fprintf(fp, "\nVBTotalFramesReceived: %d\n", count);
- fprintf(fp, "\nVDFramesDecoded:\n ");
- for (i = 0; i < 8; i++)
- fprintf(fp, "%-10d", i * 10);
- fprintf(fp, "\n -----------------------------------------------------");
- count = 0;
- for (i = 0; i < (shared->totalFrames + 7)/8; i ++)
- {
- int j;
- if (i % 10 == 0)
- fprintf(fp, "\n%5d: ", i * 8);
- for (j = 0; j < 8; j++)
- {
- if (shared->stat.VDframesDecoded[i] & (1 << j))
- {
- count ++;
- fputc('x', fp);
- }
- else
- fputc('-', fp);
- }
- }
- fprintf(fp, "\nVDTotalFramesDecoded: %d\n", count);
- fprintf(fp, "\nVPFramesDisplayed:\n ");
- for (i = 0; i < 8; i++)
- fprintf(fp, "%-10d", i * 10);
- fprintf(fp, "\n -----------------------------------------------------");
- count = 0;
- for (i = 0; i < (shared->totalFrames + 7)/8; i ++)
- {
- int j;
- if (i % 10 == 0)
- fprintf(fp, "\n%5d: ", i * 8);
- for (j = 0; j < 8; j++)
- {
- if (shared->stat.VPframesDisplayed[i] & (1 << j))
- {
- count ++;
- fputc('x', fp);
- }
- else
- fputc('-', fp);
- }
- }
- fprintf(fp, "\nVPTotalFramesDisplayed: %d\n", count);
-
- fprintf(fp, "\nVBBufferFillLevelHistory:\n ");
- for (i = 0; i < 10; i ++)
- fprintf(fp, "%-7d", i);
- fprintf(fp, "\n -----------------------------------------------------");
- for (i = 0; i < shared->totalFrames; i++)
- {
- if (i % 10 == 0)
- fprintf(fp, "\n%5d: ", i / 10);
- if (shared->stat.VBfillLevel[i] == SHRT_MIN)
- fprintf(fp, "x ");
- else
- fprintf(fp, "%-7d", shared->stat.VBfillLevel[i]);
- }
- fprintf(fp, "\nHistoryEnd\n");
- fclose(fp);
- fprintf(stderr, "Statistics collecting done.\n");
- }
-#endif
-
- return;
-}
-
-static void ff(void)
-{
- unsigned char tmp;
- FFpara para;
- /*
- fprintf(stderr, "CTR: FF . . .\n");
- */
- if (shared->live) {
- beep();
- }
- else {
- stop_playing();
- if (shared->nextGroup < 0)
- shared->nextGroup = 0;
- if (videoSocket >= 0 && shared->nextGroup < shared->totalGroups)
- {
- NewCmd(CmdFF);
- shared->needHeader = 0;
- shared->framesPerSecond = shared->config.ffFPS /
- shared->patternSize;
- shared->usecPerFrame = (int)(1000000.0 / (float)shared->config.ffFPS) *
- shared->patternSize;
-
- shared->VStimeAdvance =
- max(shared->config.VStimeAdvance, DEFAULT_VStimeAdvance) * 1000;
- if (shared->VStimeAdvance < shared->usecPerFrame)
- shared->VStimeAdvance = shared->usecPerFrame;
-
- para.VStimeAdvance = htonl(shared->VStimeAdvance);
- para.sn = htonl(shared->cmdsn);
- para.nextGroup = htonl(shared->nextGroup);
- para.usecPerFrame = htonl(shared->usecPerFrame);
- para.framesPerSecond = htonl(shared->framesPerSecond);
- tmp = CmdFF;
- startTime = get_usec();
- VideoWrite(&tmp, 1);
- VideoWrite(&para, sizeof(para));
- start_timer();
- }
- }
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- return;
-}
-
-static void fb(void)
-{
- unsigned char tmp;
- FFpara para;
- /*
- fprintf(stderr, "CTR: FB . . .\n");
- */
- if (shared->live) {
- beep();
- }
- else {
- stop_playing();
- if (shared->nextGroup >= shared->totalGroups)
- shared->nextGroup = shared->totalGroups - 1;
- if (videoSocket >= 0 && shared->nextGroup >= 0)
- {
- NewCmd(CmdFB);
- shared->needHeader = 0;
- shared->framesPerSecond = shared->config.fbFPS /
- shared->patternSize;
- shared->usecPerFrame = (int)(1000000.0 / (float)shared->config.fbFPS) *
- shared->patternSize;
-
- shared->VStimeAdvance =
- max(shared->config.VStimeAdvance, DEFAULT_VStimeAdvance) * 1000;
- if (shared->VStimeAdvance < shared->usecPerFrame)
- shared->VStimeAdvance = shared->usecPerFrame;
-
- para.VStimeAdvance = htonl(shared->VStimeAdvance);
- para.sn = htonl(shared->cmdsn);
- para.nextGroup = htonl(shared->nextGroup);
- para.usecPerFrame = htonl(shared->usecPerFrame);
- para.framesPerSecond = htonl(shared->framesPerSecond);
- tmp = CmdFB;
- startTime = get_usec();
- VideoWrite(&tmp, 1);
- VideoWrite(&para, sizeof(para));
- start_timer();
- }
- }
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- return;
-}
-
-static void step()
-{
- unsigned char tmp;
- STEPpara para;
- stop_playing();
- NewCmd(CmdSTEP);
- if (videoSocket >= 0 && shared->nextFrame <= shared->totalFrames)
- { /* when shared->nextFrame == shared->totalFrame, it will force VS to send a ENDSEQ,
- to let VD give out the remaining frame in its ring[] buffer */
- para.sn = htonl(shared->cmdsn);
- para.nextFrame = htonl(shared->nextFrame);
- /*
- fprintf(stderr, "CTR: STEP . . . frame-%d\n", para.nextFrame);
- */
- tmp = CmdSTEP;
- VideoWrite(&tmp, 1);
- VideoWrite(&para, sizeof(para));
- wait_display();
- }
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- return;
-}
-
-static void play(int auto_exp)
-{
- unsigned char tmp;
- unsigned ats, vts;
- int cmdstarted = 0;
- int stuffsamples = 0;
- /*
- fprintf(stderr, "CTR: PLAY . . .\n");
- */
- stop_playing();
-
- if (!shared->live && !shared->config.rt && videoSocket >= 0) {
- /* rtplay turned off only when video avaible and not want RT play */
- rtplay = 0;
- fprintf(stderr, "VCR is not playing at in realtime mode, audio disabled\n");
- }
- else {
- rtplay = 1;
- }
-
- if (shared->live) {
- rtplay = 1;
- shared->nextFrame = 0;
- shared->nextSample = 0;
- }
-
- shared->rtplay = rtplay;
-
- if (shared->nextFrame < 0)
- shared->nextFrame = 0;
- else if (shared->nextFrame >= shared->totalFrames)
- shared->nextFrame = shared->totalFrames - 1;
-
- if (audioSocket >= 0 && shared->nextSample < shared->totalSamples && rtplay)
- {
- PLAYaudioPara para;
- if (cmdstarted == 0)
- {
- NewCmd(CmdPLAY);
- if (!auto_exp) set_speed();
- cmdstarted = 1;
- }
-
- if (videoSocket >= 0 && rtplay && !shared->live) {
- /* video channel also active, recompute nextSample */
- shared->nextSample =(int) ((double)shared->audioPara.samplesPerSecond *
- ((double)shared->nextFrame / shared->pictureRate));
- shared->nextSample += shared->config.audioOffset;
- if (shared->nextSample < 0) {
- stuffsamples = (- shared->nextSample);
- shared->nextSample = 0;
- }
- else if (shared->nextSample >= shared->totalSamples)
- shared->nextSample = shared->totalSamples - 1;
- }
-
- ABflushBuf(shared->nextSample);
-
- para.sn = htonl(shared->cmdsn);
- para.nextSample = htonl(shared->nextSample);
- para.samplesPerSecond = htonl(shared->samplesPerSecond);
- para.samplesPerPacket = htonl(1024 / shared->audioPara.bytesPerSample);
- para.ABsamples = htonl(AB_BUF_SIZE / shared->audioPara.bytesPerSample);
- para.spslimit = htonl(32000);
-
- startTime = get_usec();
- tmp = CmdPLAY;
- AudioWrite(&tmp, 1);
- AudioWrite(&para, sizeof(para));
- read_int(audioSocket, (int *)&ats);
- }
-
- if (videoSocket >= 0 && shared->nextFrame < shared->totalFrames)
- {
- PLAYpara para;
- if (cmdstarted == 0)
- {
- NewCmd(CmdPLAY);
- if (!auto_exp) set_speed();
- cmdstarted = 1;
- }
- shared->VBheadFrame = -1;
- shared->needHeader = 0;
- {
- int i = shared->config.maxSPframes;
- i = (int) ((double)i * (1000000.0 / (double)shared->usecPerFrame) /
- shared->pictureRate);
- shared->sendPatternGops = max(min(i, PATTERN_SIZE) / shared->patternSize, 1);
- }
- cmdstarted = 1;
-#ifdef STAT
- shared->collectStat = (shared->config.collectStat && (!shared->live));
- if (shared->collectStat)
- {
- int i;
- memset(&(shared->stat), 0, sizeof(shared->stat));
- shared->stat.VDlastFrameDecoded = (unsigned)-1;
- for (i = 0; i < MAX_FRAMES; i++)
- shared->stat.VBfillLevel[i] = SHRT_MIN;
- speedPtr = 0;
- }
-#endif
- shared->VStimeAdvance =
- max(shared->config.VStimeAdvance, DEFAULT_VStimeAdvance) * 1000;
- if (shared->VStimeAdvance < shared->usecPerFrame)
- shared->VStimeAdvance = shared->usecPerFrame;
-
- para.VStimeAdvance = htonl(shared->VStimeAdvance);
- para.sn = htonl(shared->cmdsn);
- para.nextFrame = htonl(shared->nextFrame);
- para.usecPerFrame = htonl(shared->usecPerFrame);
- para.framesPerSecond = htonl(shared->framesPerSecond);
- para.collectStat = htonl(shared->collectStat);
- frate = shared->config.frameRateLimit;
- if (frate <= 0.0) {
- frate = 1.0;
- }
- shared->frameRateLimit = frate;
- para.frameRateLimit1000 =
- htonl((long)(shared->frameRateLimit * 1000.0));
- compute_sendPattern();
- para.sendPatternGops = htonl(shared->sendPatternGops);
- memcpy(para.sendPattern, shared->sendPattern, PATTERN_SIZE);
- startTime = get_usec();
- tmp = CmdPLAY;
- VideoWrite(&tmp, 1);
- VideoWrite(&para, sizeof(para));
- read_int(videoSocket, (int *)&vts);
-
- if (shared->config.qosEffective) {
- /*
- fprintf(stderr, "CTR start FeedBack with init frameRateLimit %lf\n",
- frate);
- */
- maxfr = frate; /* max frame rate all the time during one playback */
- minupf = (int) (1000000.0 / maxfr); /* min usec-per-frame all the time
- during one playback */
- maxrate = (double)minupf / (double)max(shared->usecPerFrame, minupf);
- /* this is current max frame rate in percentage against 'maxfr',
- current max frame rate is the lower of 'maxfr' and play speed */
- frate = 1.0; /* current sending frame rate, in percentage against 'maxfr'
- This value is set with init value as 1.0, so that if current
- speed is lower than frameRateLimit, no frames are dropped,
- then when play speed increases frame rate will increase
- accordingly until frames are dropped*/
- adjstep = ((double)minupf / (double)shared->usecPerFrame) /
- (double)max(shared->patternSize * shared->sendPatternGops, 5);
- /* adjust step for current play speed, in percentage against
- 'maxfr' */
-
- fbstate = 1;
- fb_startup = 1;
-
- /*
- fprintf(stderr, "CTR init frate: %lf minupf %d, shared->upf %d\n",
- frate, minupf, shared->usecPerFrame);
- */
- }
- }
-
- if (shared->live && (videoSocket >= 0) && (audioSocket >= 0)) {
- int gap = get_duration(ats, vts);
- if (gap < 0 || gap >= 5000000) {
- Fprintf(stderr, "Error for live source: ats %u, vts %u, gap %d\n",
- ats, vts, gap);
- }
- else {
- int skipped = gap * shared->audioPara.samplesPerSecond / 1000000;
- skipped += shared->config.audioOffset;
- ABskipSamples(skipped);
- Fprintf(stderr, "Live source: skipped %d audio samples\n", skipped);
- }
- }
- else if (stuffsamples) {
- ABskipSamples(-stuffsamples);
- }
- if (cmdstarted)
- start_timer();
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- return;
-}
-
-static void position_action(int operation_tag)
-{
- int val;
- unsigned char tmp = CmdDONE;
- CmdRead((char*)&val, 4);
- if (shared->live) {
- beep();
- }
- else {
- shared->locationPosition = val;
- stop_playing();
- NewCmd(CmdPOSITION);
- if (videoSocket >= 0)
- {
- int gop = shared->nextGroup;
- POSITIONpara para;
- shared->nextGroup = ((shared->totalGroups-1) * val) / POSITION_RANGE;
- /*
- fprintf(stderr, "CTR: POSITION%s %d (nextGop %d). . .\n",
- operation_tag ? "_released" : "", val, shared->nextGroup);
- */
- if (gop != shared->nextGroup || operation_tag)
- {
- shared->nextFrame = ((shared->totalFrames-1) * val) / POSITION_RANGE;
- para.sn = htonl(shared->cmdsn);
- para.nextGroup = htonl(shared->nextGroup);
- tmp = CmdPOSITION;
- VideoWrite(&tmp, 1);
- VideoWrite(&para, sizeof(para));
- if (operation_tag) /* release or LOOPrewind */
- wait_display();
- }
- if (operation_tag && audioSocket >= 0) /* needs to adjust audio position */
- {
- shared->nextSample = (int)((double)shared->audioPara.samplesPerSecond *
- ((double)shared->nextFrame / shared->pictureRate));
- }
- }
- else if (audioSocket >= 0)
- shared->nextSample = (shared->totalSamples-1) * val / POSITION_RANGE;
- }
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- return;
-}
-
-static void position()
-{
- position_action(0);
-}
-
-static void position_release()
-{
- position_action(1);
-}
-
-static void volume()
-{
- CmdRead((char *)&shared->volumePosition, 4);
- if (audioSocket >= 0) {
- SetAudioGain();
- }
- /*
- unsigned char tmp = CmdDONE;
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- */
- return;
-}
-
-static void balance()
-{
- CmdRead((char *)&shared->balancePosition, 4);
- /*
- unsigned char tmp = CmdDONE;
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- */
- return;
-}
-
-static void speed(void)
-{
- unsigned char tmp;
- CmdRead((char *)&shared->speedPosition, 4);
- set_speed();
- if (!shared->live && shared->cmd == CmdPLAY)
- {
- if (videoSocket >= 0) {
- SPEEDpara para;
- para.sn = htonl(shared->cmdsn);
- para.usecPerFrame = htonl(shared->usecPerFrame);
- para.framesPerSecond = htonl(shared->framesPerSecond);
- para.frameRateLimit1000 =
- htonl((long)(shared->frameRateLimit * 1000.0));
- {
- int i = shared->config.maxSPframes;
- i = (int) ((double)i * (1000000.0 / (double)shared->usecPerFrame) /
- shared->pictureRate);
- shared->sendPatternGops = max(min(i, PATTERN_SIZE) / shared->patternSize, 1);
- }
- compute_sendPattern();
- para.sendPatternGops = htonl(shared->sendPatternGops);
- memcpy(para.sendPattern, shared->sendPattern, PATTERN_SIZE);
- tmp = CmdSPEED;
- VideoWrite(&tmp, 1);
- VideoWrite(&para, sizeof(para));
- if (fbstate) {
- maxrate = (double)minupf / (double)max(shared->usecPerFrame, minupf);
- adjstep = ((double)minupf / (double)shared->usecPerFrame) /
- (double)max(shared->patternSize * shared->sendPatternGops, 5);
- fbstate = 1;
- }
- }
- if (audioSocket >= 0) {
- SPEEDaudioPara para;
- para.sn = htonl(shared->cmdsn);
- para.samplesPerSecond = htonl(shared->samplesPerSecond);
- para.samplesPerPacket = htonl(1024 / shared->audioPara.bytesPerSample);
- para.spslimit = htonl(32000);
- tmp = CmdSPEED;
- AudioWrite(&tmp, 1);
- AudioWrite(&para, sizeof(para));
- }
- /*
- timer_speed();
- */
- }
- /*
- tmp = CmdDONE;
- CmdWrite(&tmp, 1);
- */
- return;
-}
-
-static int timer_on = 0;
-static int timer_signals_skip = 0;
-static int timerCount = 0;
-static int lastCount = 0;
-static int timerUPF;
-static int wait_usr2 = 0;
-static int last_disp_fid = 0;
-
-static void stop_playing(void)
-{
- unsigned char precmd = shared->cmd;
-
- if (precmd == CmdFF || precmd == CmdFB || precmd == CmdPLAY)
- {
- unsigned char tmp = CmdSTOP;
- NewCmd(CmdSTOP);
-
- /* notify AS and/or VS */
- if (audioSocket >= 0 && precmd == CmdPLAY && rtplay)
- {
- int cmdsn = htonl(shared->cmdsn);
- AudioWrite(&tmp, 1);
- AudioWrite(&cmdsn, 4);
- }
- if (videoSocket >= 0)
- {
- int cmdsn = htonl(shared->cmdsn);
- VideoWrite(&tmp, 1);
- VideoWrite(&cmdsn, 4);
- }
-
- /* stop timer and sleep for a while */
- stop_timer();
- usleep(100000);
-
- /* purge VDbuf and audio channel from AS*/
- if (videoSocket >= 0)
- {
- while (VDpeekMsg() != NULL)
- VDreclaimMsg(VDgetMsg());
- /*
- Fprintf(stderr, "CTR: VDbuf purged.\n");
- */
- fbstate = 0;
-
- }
-
- /* adjust some info */
- if (precmd == CmdPLAY && videoSocket >= 0)
- shared->nextFrame = shared->currentFrame+1;
- else
- shared->nextGroup = shared->currentGroup + 1;
- }
-}
-
-static void loopBack(void)
-{
- static char loopBackCmd[7] = {CmdSTOP, CmdPOSITIONrelease,
- 0, 0, 0, 0, CmdPLAY};
- cmdBuffer = loopBackCmd;
- cmdBytes = 7;
- cmdAcks = 3;
-}
-
-void TimerHandler(int sig)
-{
- int currentUPF = shared->currentUPF;
- /*
- Fprintf(stderr, "CTR in TimerHandler.\n");
- */
- if (videoSocket >= 0 && shared->cmd == CmdPLAY && currentUPF != timerUPF)
- {
- struct itimerval val;
- {
- val.it_interval.tv_sec = val.it_value.tv_sec = currentUPF / 1000000;
- val.it_interval.tv_usec = val.it_value.tv_usec = currentUPF % 1000000;
- setitimer(ITIMER_REAL, &val, NULL);
- /*
- fprintf(stderr, "CTR: timer speed changed to %d upf.\n", shared->currentUPF);
- */
- }
- timerUPF = currentUPF;
-#ifdef STAT
- if (shared->collectStat && speedPtr < SPEEDHIST_SIZE)
- {
- speedHistory[speedPtr].frameId = shared->nextFrame;
- speedHistory[speedPtr].usecPerFrame = timerUPF;
- speedHistory[speedPtr].frameRateLimit = shared->frameRateLimit;
- speedHistory[speedPtr].frames = shared->sendPatternGops * shared->patternSize;
- speedHistory[speedPtr].framesDropped = shared->framesDropped;
- }
- speedPtr ++;
-#endif
- }
- /*
- fprintf(stderr, "+\n");
- */
- if (!timerCount) {
- int addedVSwat;
- if (shared->cmd == CmdPLAY) {
- addedVSwat = shared->usecPerFrame * (shared->VBheadFrame - shared->nextFrame);
- }
- else if (shared->cmd == CmdFF) {
- addedVSwat = shared->usecPerFrame * (shared->VBheadFrame - shared->nextGroup);
- }
- else { /* shared->cmd == CmdFB */
- addedVSwat = shared->usecPerFrame * (shared->nextGroup - shared->VBheadFrame);
- }
- shared->VStimeAdvance += addedVSwat;
- }
- timerCount += timer_signals_skip + 1;
- timer_signals_skip = 0;
-
- if (shared->live ) {
- if (audioSocket <= 0) { /* video only */
- unsigned t = shared->VBheadFrame - startVSA;
- if (timerCount < t) {
- /*
- Fprintf(stderr, "CTR: (av) timerCount %d, t %d\n", timerCount, t);
- */
- timerCount = t;
- }
- }
- /* audio involved, TimerProcessing() will adjust the rate automatically */
- }
-}
-
-static void DisplayPicture(void)
-{
- int toDisplay = 1;
- int count = timerCount;
-
- if ((shared->cmd != CmdPLAY &&
- shared->cmd != CmdFF &&
- shared->cmd != CmdFB) ||
- lastCount == count)
- return;
- if (timer_on >4) /* 4 is a magic number */
- {
- stop_timer();
-
- /* tries to rewind and play again */
- if (shared->cmd == CmdPLAY && shared->loopBack)
- loopBack();
-
- return;
- }
- /*
- Fprintf(stderr, "CTR in diplayPicture().\n");
- */
- {
- int i, j;
- FrameBlock *buf, *next;
-#if 0
- if (shared->cmd == CmdPLAY && rtplay &&
- (i = shared->nextFrame - shared->firstGopFrames) > 0) {
- j = (i / shared->patternSize) % shared->sendPatternGops;
- i %= shared->patternSize;
- if (shared->pattern[i] != 'B') {
- while (i > 0) {
- if (shared->pattern[--i] != 'B') break;
- }
- }
- toDisplay = (shared->sendPattern + j * shared->patternSize)[i];
- }
- else if (shared->cmd != CmdPLAY) {
- if (last_disp_fid != shared->nextGroup) toDisplay = 1;
- else toDisplay = 0;
- }
- if (toDisplay)
-#endif
- {
- if (shared->cmd == CmdPLAY && !rtplay) { /* if play with best effort */
- while (VDcheckMsg() <= 0) /* keep sleeping for 10 millisec until a decoded
- frame show up in VD buffer */
- usleep(10000);
- }
-#ifdef STAT
- if (shared->collectStat)
- {
- shared->stat.VBfillLevel[shared->nextFrame] =
- shared->VBheadFrame - shared->nextFrame;
- i = VDcheckMsg();
- if (i < 0) i = 0;
- else if (i >= MAX_VDQUEUE_SIZE) i = MAX_VDQUEUE_SIZE - 1;
- shared->stat.VDqueue[i] ++;
- }
-#endif
- toDisplay = 0;
- for (;;)
- {
- buf = VDpeekMsg();
-
- if (buf == NULL) {
- goto loop_end;
- }
-
- switch (shared->cmd)
- {
- int position;
- case CmdPLAY:
- position = shared->nextFrame;
- /*
- Fprintf(stderr, "CTR PLAY: buf->display %d, position %d\n",
- buf->display, position);
- */
- if (buf->display == position)
- { /* display it */
- buf = VDgetMsg();
- shared->nextGroup = buf->gop + 1;
-#ifdef STAT
- shared->stat.CTRdispOnTime ++;
-#endif
- goto display_picture;
- }
- else if (buf->display > position)
- { /* too early, wait for future display */
- goto loop_end;
- }
- else /* this picture too late */
- {
- // this line gets the buffer or dequeues from the shared memory queue
- buf = VDgetMsg();
- if (((next = VDpeekMsg()) == NULL || next->display > position) &&
- buf->display > last_disp_fid) {
-#ifdef STAT
- shared->stat.CTRdispLate ++;
-#endif
- /* buf is the last one, or next too to early, display it anyway */
- goto display_picture;
- }
- else /* next not too early, discard buf */
- {
-#ifdef STAT
- if (buf->display < last_disp_fid)
- shared->stat.CTRdropOutOrder ++;
- else
- shared->stat.CTRdropLate ++;
-#endif
- /*
- Fprintf(stderr, "CTR drops frame display=%d, shared->nextFrame=%d\n",
- buf->display, shared->nextFrame);
- */
- VDreclaimMsg(buf);
- continue;
- }
- }
- break;
- case CmdFF:
- position = shared->nextGroup;
- if (buf->gop == position)
- { /* display it */
- buf = VDgetMsg();
- shared->nextFrame = buf->display;
- goto display_picture;
- }
- else if (buf->gop > position)
- { /* hold it for future display */
- goto loop_end;
- }
- else /* discard late picture */
- {
- buf = VDgetMsg();
- if ((next = VDpeekMsg()) == NULL || next->gop > position)
- /* buf is the last one, or next too to early, display it anyway */
- goto display_picture;
- else /* next not too early, discard buf */
- {
- VDreclaimMsg(buf);
- continue;
- }
- }
- break;
- case CmdFB:
- position = shared->nextGroup;
- if (buf->gop == position)
- { /* display it */
- buf = VDgetMsg();
- shared->nextFrame = buf->display;
- goto display_picture;
- }
- else if (buf->gop < position)
- { /* hold it for future display */
- goto loop_end;
- }
- else /* discard late picture */
- {
- buf = VDgetMsg();
- if ((next = VDpeekMsg()) == NULL || next->gop < position)
- /* buf is the last one, or next too to early, display it anyway */
- goto display_picture;
- else /* next not too early, discard buf */
- {
- VDreclaimMsg(buf);
- continue;
- }
- }
- break;
- default:
- goto loop_end;
- }
- }
- display_picture:
- toDisplay = 1;
- if (shared->cmd == CmdPLAY) last_disp_fid = buf->display;
- else last_disp_fid = buf->gop;
-#ifdef STAT
- if (shared->live) displayedFrames ++;
- if (shared->collectStat)
- shared->stat.VPframesDisplayed[buf->display >> 3] |= 1 << (buf->display % 8);
-#endif
- {
- unsigned char tmp = CmdVPdisplayFrame;
- CmdWrite(&tmp, 1);
- }
- CmdWrite((unsigned char *)&buf, sizeof(char *));
- loop_end:;
- }
- }
-
- if (shared->cmd == CmdPLAY)
- {
- shared->nextFrame += rtplay ? count - lastCount : 1;
- if (shared->nextFrame >= shared->totalFrames)
- {
- timer_on ++;
- shared->nextFrame = shared->totalFrames;
- }
-
- /* following is frameRate feedback algorithm */
- if (fbstate && toDisplay && rtplay) {
- static Filter *fr = NULL; /* frame-rate filter */
- static int start; /* feedback action time, in microseconds */
- static int delay; /* time to delay after each action, and to charge
- the filter after action-delay */
- static int pretime; /* time of previous frame, in microseconds */
- static int throw_outlier = 0;
- /* tag to throw away outlier. In case there are outliers, this
- tag is flipped by the algorithm, so that If there are two
- consecutive sample deviating very much from the filtered mean
- value, the second is not considered outlier. This may mean
- that the frame rate has dropped significantly. */
- static double vr; /* filtered frame-rate value, in microseconds/frame */
- double r, nr;
- int t = get_usec();
-
- switch (fbstate) {
- case 3: /* working, monitoring */
- {
- int interval = get_duration(pretime, t);
- if (throw_outlier) {
- if (interval >> 2 >= vr) {
- /* at least four times the filtered mean value to be
- considered outlier */
- /* In case an outlier is detected and thrown away, then
- the following sample will never be classified as an
- outlier, and the current time is recorded */
- throw_outlier = 0;
- pretime = t;
- Fprintf(stderr, "CTR detected a gap %d (vr = %d) us\n",
- interval, (int)vr);
- break;
- }
- }
- else {
- throw_outlier = 1;
- }
- vr = DoFilter(fr, (double)interval);
- }
- pretime = t;
-
- r = minupf / vr; /* convert the display fps to percentage of maxfr */
-
- nr = 0; /* This variable contains the newly computed server frame rate */
-
- /* let nr oscillate around 1.5 ~ 2.5 */
- if (min(frate, maxrate) - r >= 3.0 * adjstep) {
- /* pipeline is considered overloaded if server fps is more than 3 adjsteps
- higher than display fps */
- nr = min(frate, maxrate) - adjstep; /* slow down server frame rate
- one step */
- if (fb_startup) { /* startup feedback action: jump set the server fps
- to a value close to actually measure display
- frame rate */
- fb_startup = 0;
- while (nr >= r + 2.5 * adjstep) {
- nr -= adjstep;
- }
- }
- }
- else if (frate - r <= 0.5 * adjstep && frate < maxrate) {
- /* pipeline load is considered too light if the server frame rate
- is less than 0.5fps higher than display frame rate, while the server
- fps is no maximum yet. The server fps then is stepped up. */
- nr = min(frate + adjstep, maxrate);
- }
- if (nr > 0) { /* nr = 0 if not feedback action needs to be taken */
- shared->frameRateLimit = maxfr * nr;
- compute_sendPattern();
- /*
- fprintf(stderr,
- "CTR adjust frameRate to %lf, vr=%lf minupf=%d, r=%lf, frate=%lf, nr=%lf\n",
- shared->frameRateLimit, vr, minupf, r, frate, nr);
- */
- frate = nr; /* remember new server frame rate */
- shared->qosRecomputes ++;
- start = t; /* remember the action time */
- /* delay for some time before restarts, to let feedback take effect */
- delay = shared->usecPerFrame * (shared->VBheadFrame - shared->nextFrame) +
- shared->playRoundTripDelay;
- if (delay < 0) delay = shared->usecPerFrame;
- fbstate = 4;
- }
- break;
- case 4: /* delay and reset after action*/
- if (get_duration(start, t) >= delay) {
- /*
- fprintf(stderr,
- "CTR VB from s2 to s3, vr %lf, frate %lf, maxrate %lf, step %lf\n",
- vr, frate, maxrate, adjstep);
- */
- fr = ResetFilter(fr, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- delay = shared->usecPerFrame *
- max(shared->sendPatternGops * shared->patternSize,
- shared->config.filterPara);
- /* charge filter for time */
- start = pretime = t;
- throw_outlier = 0;
- fbstate = 2;
- }
- break;
- case 2: /* charge the filter */
- {
- int interval = get_duration(pretime, t);
- if (throw_outlier) {
- if (interval >> 2 >= vr) { /* at least four times the previous average */
- throw_outlier = 0;
- pretime = t;
- Fprintf(stderr, "CTR detected a gap %d (vr = %d) us\n",
- interval, (int)vr);
- break;
- }
- }
- else {
- throw_outlier = 1;
- }
- vr = DoFilter(fr, (double)interval);
- }
- pretime = t;
- if (get_duration(start, t) >= delay) {
- /*
- fprintf(stderr,
- "CTR VB from s2 to s3, vr %lf, frate %lf, maxrate %lf, step %lf\n",
- vr, frate, maxrate, adjstep);
- */
- fbstate = 3;
- }
- break;
- case 1: /* start or speed change, wait until speed data consistant */
- if (shared->currentUPF == shared->usecPerFrame) {
- if (fr == NULL) {
- fr = NewFilter(FILTER_LOWPASS, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- }
- else {
- fr = ResetFilter(fr, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- }
- if (fr == NULL) {
- perror("CTR failed to allocate space for fr filter");
- fbstate = 0;
- }
- vr = DoFilter(fr, (double)shared->usecPerFrame);
- delay = shared->usecPerFrame *
- shared->sendPatternGops * shared->patternSize;
- /* charge filter for some time */
- pretime = start = t;
- throw_outlier = 0;
- fbstate = 2;
- }
- break;
- default:
- fprintf(stderr, "CTR error: unknown feedback state: %d\n", fbstate);
- fbstate = 1;
- break;
- }
- }
- /* end of frame rate control algorithm */
-
- }
- else if (shared->cmd == CmdFF)
- {
- shared->nextGroup += count - lastCount;
- if (shared->nextGroup >= shared->totalGroups)
- {
- timer_on ++;
- shared->nextGroup = shared->totalGroups - 1;
- }
- }
- else
- {
- shared->nextGroup -= count - lastCount;
- if (shared->nextGroup < 0)
- {
- timer_on ++;
- shared->nextGroup = 0;
- }
- }
- lastCount = count;
-}
-
-#define AUDIO_BUFSIZE 2048
-
-static int audioCount = 0;
-static int audioFirst = 0;
-static int needAudioSkip = 0;
-static int bufferedSamples;
-static int nextASSample, startSample;
-static unsigned int nextAFtime;
-static int forward, forwardDelta;
-static int audioForward, framesPerAudioPlay;
-static int AudioBufSize;
-static char * rawBuf = NULL, * workBuf = NULL, * convBuf = NULL;
-
-static void PlayAudioInit(void)
-{
- audioCount = -1;
- audioFirst = 1;
- needAudioSkip = 0;
- startSample = nextASSample = shared->nextSample;
- audioForward = shared->config.audioForward;
- framesPerAudioPlay = max(shared->config.framesPerAudioPlay, 1);
- if (audioForward <= 0)
- audioForward = DEFAULT_audioForward;
- fprintf(stderr, "CTR audioForward: %d samples.\n", audioForward);
- bufferedSamples = (int)(((double)
- (shared->config.audioTimerDuration *
- shared->config.audioBufferedIntervals))
- * (double)shared->audioPara.samplesPerSecond / 1000.0);
- if (rawBuf == NULL)
- {
- if ((rawBuf = (char *)malloc(AUDIO_BUFSIZE)) == NULL)
- {
- perror("CTR fails to allocate rawBuf for audio channel");
- exit(1);
- }
- if ((workBuf = (char *)malloc(AUDIO_BUFSIZE)) == NULL)
- {
- perror("CTR fails to allocate workBuf for audio channel");
- exit(1);
- }
- }
- AudioBufSize = (AUDIO_BUFSIZE / shared->audioPara.bytesPerSample) *
- shared->audioPara.bytesPerSample;
-
- StartAudioPlaySession();
-}
-
-/* input the number of samples in the raw buffer,
- returns the numberof samples in theconverted buffer */
-static int AudioConvert(int len)
-{
- int convLen;
-
- if (shared->samplesPerSecond == shared->audioPara.samplesPerSecond)
- {
- convBuf = rawBuf;
- return len;
- }
-
- convBuf = workBuf;
- convLen = len * shared->audioPara.samplesPerSecond / shared->samplesPerSecond;
- AudioInterpolate(rawBuf, len, convBuf, convLen);
- return convLen;
-}
-
-static void PlayAudioOnly(void)
-{
- int maxSize;
- int size, csize; /* all in samples */
- unsigned int AFtime;
-
- if (audioFirst)
- {
- audioFirst = 0;
- nextAFtime = GetAudioTime() + audioForward;
- }
- else
- if ((int)(nextAFtime - GetAudioTime()) >= bufferedSamples)
- return;
-
- if (timer_on >4)
- {
- stop_timer();
-
- /* tries to rewind and play again */
- if (shared->loopBack)
- {
- /*
- fprintf(stderr, "CTR: trying loopBack().\n");
- */
- loopBack();
- }
-
- return;
- }
- if (nextASSample >= shared->totalSamples)
- {
- timer_on ++;
- return;
- }
- if (shared->samplesPerSecond >= shared->audioPara.samplesPerSecond)
- maxSize = (AudioBufSize/shared->audioPara.bytesPerSample);
- else
- maxSize = ((AudioBufSize/shared->audioPara.bytesPerSample) *
- shared->samplesPerSecond) /
- shared->audioPara.samplesPerSecond;
- for (;;)
- {
- size = ABgetSamples(rawBuf, maxSize);
- csize = AudioConvert(size);
- AFtime = PlayAudioSamples(nextAFtime, convBuf, csize);
- nextASSample += size;
- shared->nextSample += size;
- nextAFtime += csize;
- if ((int)(nextAFtime - AFtime) < 0)
- nextAFtime = AFtime;
- if (nextASSample >= shared->totalSamples)
- {
- timer_on ++;
- break;
- }
- /*
- Fprintf(stderr, "CTR: nextAFtime:%d, AFtime:%d, bufferedSamples:%d\n",
- nextAFtime, AFtime, bufferedSamples);
- */
- if ((int)(nextAFtime - AFtime) >= bufferedSamples)
- break;
- }
- {
- unsigned char tmp = CmdVPaudioPosition;
- CmdWrite(&tmp, 1);
- }
-}
-
-/* returns: 0 - no forward calculated , 1 - forward calculated */
-static int PlayAudio(void)
-{
- int timer_count = timerCount;
- int i = timer_count / framesPerAudioPlay;
- if (audioFirst)
- {
- audioFirst = 0;
- nextAFtime = GetAudioTime() + audioForward;;
- audioCount = -1; /* guarantee that PlayAudio do the first step */
- }
- if (audioCount == i) /* current audio timer signal already processed */
- return 0;
- if (audioCount < i - 1) /* some audio timer signal missing */
- {
- needAudioSkip = 1;
- /*
- Fprintf(stderr, "CTR: some audio timer signal missed.\n");
- */
- }
- if (nextASSample >= shared->totalSamples)
- {
- /*
- timer_on ++;
- */
- return 0;
- }
-
- audioCount = i;
-
- if (needAudioSkip)
- {
- /* return if not enough skip can be done */
- int next_sample = (int)(startSample +
- ((double)timer_count / shared->pictureRate) *
- shared->audioPara.samplesPerSecond);
- int skip_samples = next_sample - nextASSample;
- ABskipSamples(skip_samples);
- nextAFtime += (unsigned int)(((double)skip_samples *
- (double)shared->audioPara.samplesPerSecond) /
- (double)shared->samplesPerSecond);
- nextASSample += skip_samples;
- needAudioSkip = 0;
- }
-
- /* read current block, convert, put to AF, and update nextAFtime */
- {
- int frame_samples = (int)(startSample +
- ((double)(timer_count + framesPerAudioPlay) / shared->pictureRate) *
- (double)shared->audioPara.samplesPerSecond -
- nextASSample);
- int fsize = frame_samples * shared->audioPara.bytesPerSample;
- int read_samples;
- unsigned int curAFtime;
- unsigned int oldAFtime = nextAFtime;
- char * ptr = rawBuf;
- if (fsize > AudioBufSize)
- { /* make sure the rawBuf is big enough */
- Fprintf(stderr, "CTR PlayAudio error: BytesPerFrame=%d > AudioBufSize=%d.\n",
- fsize, AudioBufSize);
- Fprintf(stderr,
- "CTR PlayAudio: startSample=%d, timer_count=%d, nextASSmple=%d.\n",
- startSample, timer_count, nextASSample);
- fprintf(stderr, "Internal error: audio resampling buffer not big enough,\n\
- please reduce value of parameter 'Audio timer interval',\n\
- or 'Audio buffered intervals' or Frames per audio play',\n\
- and try again.\n");
- exit(1);
- }
-
- read_samples = ABgetSamples(ptr, frame_samples);
-
- /* convert and play to AF */
- {
- int maxSamples;
- int left_samples = read_samples;
- if (shared->samplesPerSecond >= shared->audioPara.samplesPerSecond)
- maxSamples = (AudioBufSize/shared->audioPara.bytesPerSample);
- else
- maxSamples = ((AudioBufSize/shared->audioPara.bytesPerSample) *
- shared->samplesPerSecond) /
- shared->audioPara.samplesPerSecond;
- for (;;)
- {
- int samples = (left_samples > maxSamples) ? maxSamples : left_samples;
- int convSamples = AudioConvert(samples);
- curAFtime = PlayAudioSamples(nextAFtime, convBuf, convSamples);
- nextAFtime += convSamples;
- left_samples -= samples;
- if (left_samples == 0)
- break;
- else
- {
- memcpy(rawBuf, rawBuf + samples * shared->audioPara.bytesPerSample,
- left_samples * shared->audioPara.bytesPerSample);
- }
- }
- }
-
- /* possible bugs in AF some times cause PlayAudioSample() to return 0 */
- forward = curAFtime ? (oldAFtime - curAFtime) : audioForward;
- /*
- if ((oldAFtime - curAFtime) > (audioForward << 6)) {
- fprintf(stderr, "forward %d, oldAFtime %d, curAFtime %d\n",
- oldAFtime - curAFtime, oldAFtime, curAFtime);
- }
- */
- /* check condition */
- if (read_samples == frame_samples) { /* all bytes for current frame already read */
- nextASSample += frame_samples;
- }
- else { /* read to the end of audio file */
- /*
- timer_on ++;
- */
- nextASSample += read_samples;
- }
- shared->nextSample = nextASSample;
- }
- return 1;
-}
-
-
-void TimerProcessing(void)
-{
- if (audioSocket >= 0 && shared->cmd == CmdPLAY)
- {
- if (videoSocket < 0)
- PlayAudioOnly();
- else if (rtplay)
- {
- int res = PlayAudio();
- /* and also tries to sync audio and video */
- if (res)
- {
- int jit;
- res = forward - audioForward;
- jit = (res>0 ? res : -res);
- jit = (int)(((double)jit / (double)shared->samplesPerSecond) * 1000000.0);
- if (res < -audioForward/2) /* needs to speedup the clock */
- {
- struct itimerval val;
- getitimer(ITIMER_REAL, &val);
- if ((int)val.it_value.tv_usec > jit)
- val.it_value.tv_usec -= jit;
- else
- {
- timer_signals_skip ++;
- val.it_value.tv_usec = 2;
- }
- setitimer(ITIMER_REAL, &val, NULL);
- }
- else if (res > audioForward) /* needs to slow down the clock */
- {
- struct itimerval val;
- /*
- val.it_interval.tv_sec = val.it_value.tv_sec = 0;
- val.it_interval.tv_usec = val.it_value.tv_usec = 0;
- */
- getitimer(ITIMER_REAL, &val);
- val.it_value.tv_usec += (jit % 1000000);
- val.it_value.tv_sec += (jit / 1000000);
- setitimer(ITIMER_REAL, &val, NULL);
- }
- /*
- if (res < -audioForward || res > audioForward)
- */
- if (res < -16000 || res > 16000)
- {
- Fprintf(stderr, "Audio forward jit %d samples\n", res);
- }
- }
- }
- }
- if (videoSocket >= 0 &&
- (shared->cmd == CmdPLAY || shared->cmd == CmdFF || shared->cmd == CmdFB)) {
- DisplayPicture();
- }
-}
-
-#define MAX_WAIT_USEC 10000000
-
-static void start_timer(void)
-{
- struct itimerval val;
-
- if (audioSocket >= 0 && shared->cmd == CmdPLAY && rtplay)
- PlayAudioInit();
-
- /* sleep for a while to wait for decoding the first picture
- and/or audio stream ready */
- {
- unsigned val1 = startTime;
- if (audioSocket >= 0 && shared->cmd == CmdPLAY && rtplay)
- {
- int samples = videoSocket >= 0 ? 1200 : 1200;
- while (ABcheckSamples() <= samples)
- {
- if (get_duration(val1, get_usec()) >= MAX_WAIT_USEC) {
- fprintf(stderr, "CTR warning: audio is not ready yet.\n");
- break;
- }
- else {
- usleep(10000);
- continue;
- }
- }
- }
- if (videoSocket >= 0)
- {
- while (VDcheckMsg() <= 0) { /* keep sleeping for 1 millisec until a decoded
- frame show up in VD buffer */
- if (get_duration(val1, get_usec()) >= MAX_WAIT_USEC) {
- fprintf(stderr, "CTR warning: video is not ready yet.\n");
- break;
- }
- usleep(10000);
- }
- }
- val1 = get_duration(val1, get_usec()) / 1000;
- shared->playRoundTripDelay = val1;
-
- Fprintf(stderr, "CTR: estimated play round trip delay: %d millisec.\n", val1);
-
- /*
- if (shared->collectStat)
- {
- fprintf(stderr, "CTR: estimated play round trip delay: %d millisec.\n", val1);
- }
- */
- }
- timer_on = 1;
- timer_signals_skip = 0;
- timerCount = 0;
- lastCount = 0;
-
- if (shared->live) {
-
- /* delay for shared->config.VStimeAdvance milliseconds, adjustable delay */
- if (shared->config.VStimeAdvance > 0) {
- Fprintf(stderr, "CTR adds %d millisec of latency\n",
- shared->config.VStimeAdvance);
- usleep(shared->config.VStimeAdvance * 1000);
- }
- displayedFrames = 0;
- startTime = get_usec();
- startVSA = shared->nextFrame - shared->VBheadFrame;
- if (startVSA < 5) startVSA = 5;
- /*
- Fprintf(stderr, "CTR: startVSA %d\n", startVSA);
- */
- }
-
- if (shared->cmd == CmdPLAY && rtplay) {
- wait_usr2 = 0;
- }
- else {
- wait_usr2 = 1;
- }
- last_disp_fid = -1;
- /*
- fprintf(stderr, "CTR start_timer() - %s for usr2\n",
- wait_usr2 ? "wait" : "NOwait");
- */
- if (shared->cmd == CmdPLAY && audioSocket >= 0 && videoSocket < 0)
- timerUPF = shared->config.audioTimerDuration * 1000;
- else {
- timerUPF = shared->usecPerFrame;
- }
-#ifdef STAT
- speedPtr = 1;
- speedHistory[0].frameId = shared->nextFrame;
- speedHistory[0].usecPerFrame = timerUPF;
- speedHistory[0].frameRateLimit = shared->frameRateLimit;
- speedHistory[0].frames = shared->sendPatternGops * shared->patternSize;
- speedHistory[0].framesDropped = shared->framesDropped;
-#endif
- /*
- fprintf(stderr, "CTR: timer started at %d upf.\n", timerUPF);
- */
- val.it_interval.tv_sec = val.it_value.tv_sec = timerUPF / 1000000;
- val.it_interval.tv_usec = val.it_value.tv_usec = timerUPF % 1000000;
- // setsignal(SIGALRM, TimerHandler);
- setitimer(ITIMER_REAL, &val, NULL);
-}
-
-static void stop_timer(void)
-{
- struct itimerval val;
-
- if (!timer_on)
- return;
-
- timer_on = 0;
-
- // setsignal(SIGALRM, SIG_IGN);
-
- val.it_interval.tv_sec = val.it_value.tv_sec = 0;
- val.it_interval.tv_usec = val.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &val, NULL);
- /*
- fprintf(stderr, "CTR: timer stopped.\n");
- */
- /*
- usleep(200000);
- */
-}
-
-static void timer_speed()
-{
- /*
- struct itimerval val;
- if (timer_on && videoSocket >= 0 &&
- (shared->cmd == CmdPLAY || shared->cmd == CmdFF || shared->cmd == CmdFB))
- {
- fprintf(stderr, "CTR: timer speed changed to %d upf.\n", shared->usecPerFrame);
- val.it_interval.tv_sec = val.it_value.tv_sec = shared->usecPerFrame / 1000000;
- val.it_interval.tv_usec = val.it_value.tv_usec = shared->usecPerFrame % 1000000;
- setitimer(ITIMER_REAL, &val, NULL);
- }
- */
-}
-
-static void wait_display(void)
-{
- if (!usr1_flag) {
- if (shared->cmd == CmdINIT) usleep(5000000);
- else usleep(800000);
- }
- if (!usr1_flag)
- {
- if (shared->cmd == CmdSTEP) /* to skip undecodable pictures */
- shared->nextFrame ++;
- else if (shared->cmd == CmdINIT) {
- fprintf(stderr, "Warning: initialilzation failed. Please reinitialize the program.\n");
- }
- return;
- }
- usr1_flag = 0;
-}
-
-static void usr1_handler(int sig)
-{
- FrameBlock *buf;
- unsigned char tmp;
- /*
- Fprintf(stderr, "CTR got USR1 for displaying single frame.\n");
- */
- usr1_flag = 1;
-
- if (shared->cmd == CmdINIT) { /* Initialize display window */
- tmp = CmdVPinitScreen;
- CmdWrite(&tmp, 1);
- }
- /*
- fprintf(stderr, "CTR: %d frames in VDbuf.\n", VDcheckMsg());
- */
- while (VDcheckMsg() > 1)
- {
- /*
- Fprintf(stderr, "CTR: VDcheckMsg() = %d, to discard a picture.\n", VDcheckMsg());
- */
- if ((buf = VDgetMsg()) != NULL)
- VDreclaimMsg(buf);
- else
- fprintf(stderr, "CTR error: VDgetMsg is NULL, unexpected.\n");
- }
- if (VDcheckMsg() >0 ) {
- /*
- Fprintf(stderr, "CTR to display a frame in user1_handler()\n");
- */
- buf = VDgetMsg();
- }
- else {
- /*
- Fprintf(stderr, "CTR no frame to display in user_handler()\n");
- */
- buf = NULL;
- }
-
- if (buf != NULL) {
- if (shared->cmd == CmdSTEP)
- {
- shared->nextFrame ++;
- shared->nextGroup = buf->gop + 1;
- }
- else
- {
- shared->nextFrame = buf->display;
- shared->nextGroup = buf->gop;
- }
- tmp = CmdVPdisplayFrame;
- CmdWrite(&tmp, 1);
- CmdWrite((unsigned char *)&buf, sizeof(char *));
- }
- else if (shared->cmd == CmdSTEP) {
- shared->nextFrame ++;
- }
-}
-
-static void default_usr2_handler(int sig)
-{
- Fprintf(stderr, "CTR warning: void SIGUSR2 handler.\n");
-}
-
-static void compute_sendPattern(void)
-{
- char buf[PATTERN_SIZE];
- float limit = shared->frameRateLimit;
- char * pat = shared->pattern;
- int len = shared->patternSize * shared->sendPatternGops;
- int f;
-
- if (limit <= 0)
- limit = 1.0;
- if (rtplay) {
- f = (int)((double)len *
- ((double)limit / (1000000.0 / (double)shared->usecPerFrame)) + 0.5);
- /* rounded to integer, instead of truncated */
- }
- else {
- f = len;
- }
- if (f >= len)
- f = len;
- else if (f <= 1)
- f = 1;
-
- ComputeSendPattern(pat, buf, len, f);
- shared->qosRecomputes ++;
-
- memcpy(shared->sendPattern, buf, PATTERN_SIZE);
-
- f = len - f;
- if (shared->config.verbose) {
- fprintf(stderr, "speed %dupf, %d frames dropped, frames %d:\nsend pattern:",
- shared->usecPerFrame, f, len);
- shared->framesDropped = f;
- {
- int i;
- for (i = 0; i < len; i ++)
- fputc(buf[i] ? pat[i] : '-', stderr);
- }
- fputc('\n', stderr);
- }
-}
-
-/* about automatic experiment plan by software developers or specific users:
- to be able to conduct experiment plan, the user need to have a uid defined
- by DEVELOPER_UID in "../include/common.h", and he/she needs to prepare a file
- EXP_PLAN_FILE, with following format:
-
- {Delay #seconds |
- Expriment } *
- EndExpriment
-
- An experiment command is followed by one or more of following parameters:
-
- playSpeed #float
- frameRateLimit #float
- maxSPframes #int
- filterPara #int
- collectStat 0/1
- qosEffective 0/1
- syncEffective 0/1
-
- and the parameter is terminated by an empty line.
-
- The automatic experiment plan file is opened after init() and experiment
- setting read just before calling play(). The Player will be terminated
- after all experiments are done.
-
- */
-
-static void on_exit_routine(void)
-{
- unsigned char tmp = CmdCLOSE;
-
- if (getpid() != CTRpid) return;
-
- if (audioSocket >= 0)
- {
- write(audioSocket, &tmp, 1);
- ComCloseConn(audioSocket);
- audioSocket = -1;
- }
- if (videoSocket >= 0)
- {
- write(videoSocket, &tmp, 1);
- ComCloseConn(videoSocket);
- videoSocket = -1;
- if (VBpid > 0) {
- kill(VBpid, SIGUSR1);
- VBpid = -1;
- }
- }
- ComCloseClient();
-}
-
-#define EXP_PLAN_FILE "experiment_plan"
-
-int CTRmain(void)
-{
- int sv[2];
- extern void set_exit_routine_tag(int tag);
-
- FILE * fp = NULL; /* file pointer for experiment plan */
-
- set_exit_routine_tag(0);
- // setsignal(SIGUSR2, default_usr2_handler);
-
- /* allocate shared data structure and initialize it */
- shared = (SharedData *) creat_shared_mem(sizeof(*shared));
- shared->cmd = 0;
- shared->cmdsn = 0;
- shared->cmdBusy = 0;
- shared->loopBack = 0;
- shared->volumePosition = 0;
- shared->balancePosition = 50;
- shared->locationPosition = 0;
- shared->speedPosition = 0;
- shared->qosRecomputes = 0;
-
- shared->pixelValid = 0;
-
- shared->config.rt = 1;
- shared->config.maxFPS = DEFAULT_maxFPS;
- shared->config.maxSPS = DEFAULT_maxSPS;
- shared->config.ffFPS = DEFAULT_ffFPS;
- shared->config.fbFPS = DEFAULT_fbFPS;
- shared->config.feedBackDelay = DEFAULT_feedBackDelay;
- shared->config.audioMask = DEFAULT_audioMask;
- shared->config.audioPara.encodeType = DEFAULT_encodeType;
- shared->config.audioPara.channels = DEFAULT_channels;
- shared->config.audioPara.samplesPerSecond = DEFAULT_samplesPerSecond;
- shared->config.audioPara.bytesPerSample = DEFAULT_bytesPerSample;
- shared->config.audioTimerDuration = DEFAULT_audioTimerDuration;
- shared->config.audioBufferedIntervals = DEFAULT_audioBufferedIntervals;
- shared->config.framesPerAudioPlay = DEFAULT_framesPerAudioPlay;
- shared->config.audioForward = DEFAULT_audioForward;
- shared->config.VStimeAdvance = DEFAULT_VStimeAdvance;
- shared->config.frameRateLimit = DEFAULT_maxFPS;
- shared->config.collectStat = 0;
- shared->config.collectFrameInfo = 0;
- shared->config.syncEffective = 1;
- shared->config.qosEffective = 1;
- shared->config.audioOffset = 0;
- shared->config.filterPara = DEFAULT_filterPara;
- shared->config.maxSPframes = DEFAULT_maxSPframes;
- shared->config.audioConn = 0;
- shared->config.videoConn = 0;
- shared->config.verbose = (!getuid()) || getuid() == DEVELOPER_UID;
-
- /* create all shared buffers: AB-CTR, VB-VD, VD-VP */
- ABinitBuf(AB_BUF_SIZE);
- VBinitBuf(VB_BUF_SIZE);
- VDinitBuf(VD_BUF_SIZE);
-
- CTRpid = getpid();
- set_exit_routine_tag(1);
-
- /* create command socket pair */
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == -1)
- {
- perror("CTR error on open cmd socketpair");
- exit(1);
- }
- cmdSocket = sv[0];
-
- /* fork processes: VD, GUI */
-
- if ((VDpid = fork()) == -1)
- {
- perror("CTR error on fork VD");
- exit(1);
- } else if (VDpid == 0)
- {
- ABdeleteBuf();
- close(sv[0]);
- close(sv[1]);
- if (realTimeFlag >= 3) {
- if (SetRTpriority("VD", 0)) realTimeFlag = 0;
- }
- VDprocess(CTRpid);
- }
-
- if ((UIpid = fork()) == -1)
- {
- perror("CTR error on fork UI");
- exit(1);
- } else if (UIpid == 0)
- {
- VBdeleteBuf();
- ABdeleteBuf();
- close(sv[0]);
- if (realTimeFlag >= 2) {
-#ifdef __svr4__
- if (SetRTpriority("VB", 0)) realTimeFlag = 0;
-#elif defined(_HPUX_SOURCE)
- if (SetRTpriority("VB", 2)) realTimeFlag = 0;
-#endif
- }
- UIprocess(sv[1]);
- }
- close(sv[1]);
- // setsignal(SIGUSR1, usr1_handler);
-
- /* initialize Audio device */
- if (InitAudioDevice() == 0)
- hasAudioDevice = 1;
- else
- hasAudioDevice = 0;
-
- ComInitClient(VCR_TCP_PORT, VCR_UNIX_PORT, VCR_ATM_PORT);
-
- if ((vh = (char *)malloc(PATH_SIZE)) == NULL)
- {
- perror("CTR failed to allocate space for vh");
- exit(1);
- }
- if ((vf = (char *)malloc(PATH_SIZE)) == NULL)
- {
- perror("CTR failed to allocate space for vf");
- exit(1);
- }
- if ((ah = (char *)malloc(PATH_SIZE)) == NULL)
- {
- perror("CTR failed to allocate space for ah");
- exit(1);
- }
- if ((af = (char *)malloc(PATH_SIZE)) == NULL)
- {
- perror("CTR failed to allocate space for af");
- exit(1);
- }
- if (realTimeFlag) {
- if (SetRTpriority("CTR", 4)) realTimeFlag = 0;
- }
-
-
- // atexit(on_exit_routine);
-
-
- // instantiate our command handler
- Command_Handler *command_handler;
- ACE_NEW_RETURN (command_handler,
- Command_Handler (cmdSocket),
- -1);
-
- // .. and register it with the reactor.
- if (ACE_Reactor::instance ()->register_handler (command_handler,
- ACE_Event_Handler::READ_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) register_handler for command_handler failed\n"),
- -1);
-
- // and now instantiate the sig_handler
- Client_Sig_Handler *client_sig_handler;
- ACE_NEW_RETURN (client_sig_handler,
- Client_Sig_Handler (),
- -1);
-
- // .. and ask it to register itself with the reactor
- if (client_sig_handler->register_handler () < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) register_handler for sig_handler failed\n"),
- -1);
-
- // and run the event loop
- ACE_Reactor::instance ()->run_event_loop ();
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Exited the client command handler event loop\n"
- "%p\n",
- "run_event_loop"));
-
- return 0;
-
- for (;;)
- {
- unsigned char cmd;
- int val;
- val = CmdReadNW((char*)&cmd, 1);
- TimerProcessing();
- if (val == -1)
- continue;
-
- usr1_flag = 0;
- /*
- fprintf(stderr, "CTR: cmd received - %d\n", cmd);
- */
- switch (cmd)
- {
- case CmdINIT:
- init();
-
- /* following for automatic expriment plan when invoked by Developer */
- if (getuid() == DEVELOPER_UID && videoSocket >= 0) {
- fp = fopen(EXP_PLAN_FILE, "r");
- if (fp != NULL) {
- static char expCmd[6] = {CmdPOSITIONrelease, 0, 0, 0, 0, CmdPLAY};
- fprintf(stderr,
- "Warning: Auto-exp plan is to be conducted as instructed by file %s\n",
- EXP_PLAN_FILE);
- cmdBuffer = expCmd;
- cmdBytes = 6;
- cmdAcks = 2;
- }
- }
- else fp = NULL;
-
- break;
- case CmdSTOP:
- stop();
- break;
- case CmdFF:
- ff();
- break;
- case CmdFB:
- fb();
- break;
- case CmdSTEP:
- step();
- break;
- case CmdPLAY:
-
- /* following is for automatic experiment plan */
- if (fp != NULL) {
- char buf[64];
- while (fgets(buf, 64, fp) != NULL) {
- if (!strncmp("Delay", buf, 5)) {
- int val;
- sscanf(strchr(buf, ' '), "%d", &val);
- if (val < 0) val = 1;
- else if (val > 60) val = 60;
- fprintf(stderr, "Auto-exp: Delay for %d seconds\n", val);
- usleep(val * 1000000);
- }
- else if (!strncmp("Experiment", buf, 5)) {
- fprintf(stderr, "Auto-exp: to perform an experiment\n");
- while (fgets(buf, 64, fp) != NULL && buf[0] > ' ') {
- if (!strncmp("playSpeed", buf, 5)) {
- double fps;
- sscanf(strchr(buf, ' '), "%lf", &fps);
- /* following code is copied from definition of set_speed(void) */
- shared->framesPerSecond = (int)fps;
- shared->usecPerFrame = (int) (1000000.0/fps);
- if (audioSocket >= 0)
- {
- double sps = shared->audioPara.samplesPerSecond *
- fps / shared->pictureRate;
- shared->samplesPerSecond = (int)sps;
- shared->usecPerSample = (int)(1000000.0/sps);
- }
- }
- else if (!strncmp("frameRateLimit", buf, 5)) {
- sscanf(strchr(buf, ' '), "%f", &shared->config.frameRateLimit);
- }
- else if (!strncmp("maxSPframes", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.maxSPframes);
- }
- else if (!strncmp("filterPara", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.filterPara);
- }
- else if (!strncmp("collectStat", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.collectStat);
- }
- else if (!strncmp("qosEffective", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.qosEffective);
- }
- else if (!strncmp("syncEffective", buf, 5)) {
- sscanf(strchr(buf, ' '), "%d", &shared->config.syncEffective);
- }
- }
- usleep(500000);
- shared->loopBack = 1;
- break;
- }
- else if (!strncmp("EndExperiment", buf, 5)) {
- fprintf(stderr, "Auto-exp ends.\n");
- usleep(2000000);
- fclose(fp);
- exit(0);
- }
- }
- }
-
- play(fp != NULL);
- break;
- case CmdPOSITION:
- position();
- break;
- case CmdPOSITIONrelease:
- position_release();
- break;
- case CmdVOLUME:
- volume();
- break;
- case CmdBALANCE:
- balance();
- break;
- case CmdSPEED:
- speed();
- break;
- case CmdLOOPenable:
- {
- shared->loopBack = 1;
- break;
- }
- case CmdLOOPdisable:
- {
- shared->loopBack = 0;
- break;
- }
- default:
- fprintf(stderr, "CTR: unexpected command from UI: cmd = %d.\n", cmd);
- exit(1);
- break;
- }
- }
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp
deleted file mode 100644
index b57d8bb4419..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp
+++ /dev/null
@@ -1,933 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/*
- * decoders.c
- *
- * This file contains all the routines for Huffman decoding required in
- * MPEG
- *
- */
-
-#include <stdio.h>
-#include <assert.h>
-#include "decoders.h"
-#include "util.h"
-#include "video.h"
-#include "proto.h"
-
-/* Decoding table for macroblock_address_increment */
-mb_addr_inc_entry mb_addr_inc[2048];
-
-/* Decoding table for macroblock_type in predictive-coded pictures */
-mb_type_entry mb_type_P[64];
-
-/* Decoding table for macroblock_type in bidirectionally-coded pictures */
-mb_type_entry mb_type_B[64];
-
-/* Decoding table for motion vectors */
-motion_vectors_entry motion_vectors[2048];
-
-/* Decoding table for coded_block_pattern */
-
-coded_block_pattern_entry coded_block_pattern[512] =
-{ {(unsigned int)ERROR, 0}, {(unsigned int)ERROR, 0}, {39, 9}, {27, 9}, {59, 9}, {55, 9}, {47, 9}, {31, 9},
- {58, 8}, {58, 8}, {54, 8}, {54, 8}, {46, 8}, {46, 8}, {30, 8}, {30, 8},
- {57, 8}, {57, 8}, {53, 8}, {53, 8}, {45, 8}, {45, 8}, {29, 8}, {29, 8},
- {38, 8}, {38, 8}, {26, 8}, {26, 8}, {37, 8}, {37, 8}, {25, 8}, {25, 8},
- {43, 8}, {43, 8}, {23, 8}, {23, 8}, {51, 8}, {51, 8}, {15, 8}, {15, 8},
- {42, 8}, {42, 8}, {22, 8}, {22, 8}, {50, 8}, {50, 8}, {14, 8}, {14, 8},
- {41, 8}, {41, 8}, {21, 8}, {21, 8}, {49, 8}, {49, 8}, {13, 8}, {13, 8},
- {35, 8}, {35, 8}, {19, 8}, {19, 8}, {11, 8}, {11, 8}, {7, 8}, {7, 8},
- {34, 7}, {34, 7}, {34, 7}, {34, 7}, {18, 7}, {18, 7}, {18, 7}, {18, 7},
- {10, 7}, {10, 7}, {10, 7}, {10, 7}, {6, 7}, {6, 7}, {6, 7}, {6, 7},
- {33, 7}, {33, 7}, {33, 7}, {33, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7},
- {9, 7}, {9, 7}, {9, 7}, {9, 7}, {5, 7}, {5, 7}, {5, 7}, {5, 7},
- {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6},
- {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6},
- {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6},
- {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6},
- {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5},
- {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5},
- {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5},
- {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5},
- {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5},
- {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5},
- {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5},
- {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5},
- {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5},
- {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5},
- {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5},
- {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5},
- {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5},
- {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5},
- {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5},
- {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5},
- {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5},
- {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5},
- {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5},
- {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5},
- {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5},
- {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5},
- {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5},
- {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5},
- {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4},
- {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4},
- {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4},
- {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4},
- {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4},
- {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4},
- {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4},
- {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4},
- {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4},
- {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4},
- {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4},
- {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4},
- {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4},
- {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4},
- {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4},
- {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3},
- {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}
-};
-
-/* Decoding table for dct_dc_size_luminance */
-dct_dc_size_entry dct_dc_size_luminance[128] =
-{ {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3},
- {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3},
- {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
- {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
- {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3},
- {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3},
- {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4},
- {6, 5}, {6, 5}, {6, 5}, {6, 5}, {7, 6}, {7, 6}, {8, 7}, {(unsigned int)ERROR, 0}
-};
-
-/* Decoding table for dct_dc_size_chrominance */
-dct_dc_size_entry dct_dc_size_chrominance[256] =
-{ {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
- {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
- {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
- {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
- {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
- {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4},
- {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4},
- {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5},
- {6, 6}, {6, 6}, {6, 6}, {6, 6}, {7, 7}, {7, 7}, {8, 8}, {(unsigned int)ERROR, 0}
-};
-
-/* DCT coeff tables. */
-
-unsigned short int dct_coeff_tbl_0[256] =
-{
-0xffff, 0xffff, 0xffff, 0xffff,
-0xffff, 0xffff, 0xffff, 0xffff,
-0xffff, 0xffff, 0xffff, 0xffff,
-0xffff, 0xffff, 0xffff, 0xffff,
-0x052f, 0x051f, 0x050f, 0x04ff,
-0x183f, 0x402f, 0x3c2f, 0x382f,
-0x342f, 0x302f, 0x2c2f, 0x7c1f,
-0x781f, 0x741f, 0x701f, 0x6c1f,
-0x028e, 0x028e, 0x027e, 0x027e,
-0x026e, 0x026e, 0x025e, 0x025e,
-0x024e, 0x024e, 0x023e, 0x023e,
-0x022e, 0x022e, 0x021e, 0x021e,
-0x020e, 0x020e, 0x04ee, 0x04ee,
-0x04de, 0x04de, 0x04ce, 0x04ce,
-0x04be, 0x04be, 0x04ae, 0x04ae,
-0x049e, 0x049e, 0x048e, 0x048e,
-0x01fd, 0x01fd, 0x01fd, 0x01fd,
-0x01ed, 0x01ed, 0x01ed, 0x01ed,
-0x01dd, 0x01dd, 0x01dd, 0x01dd,
-0x01cd, 0x01cd, 0x01cd, 0x01cd,
-0x01bd, 0x01bd, 0x01bd, 0x01bd,
-0x01ad, 0x01ad, 0x01ad, 0x01ad,
-0x019d, 0x019d, 0x019d, 0x019d,
-0x018d, 0x018d, 0x018d, 0x018d,
-0x017d, 0x017d, 0x017d, 0x017d,
-0x016d, 0x016d, 0x016d, 0x016d,
-0x015d, 0x015d, 0x015d, 0x015d,
-0x014d, 0x014d, 0x014d, 0x014d,
-0x013d, 0x013d, 0x013d, 0x013d,
-0x012d, 0x012d, 0x012d, 0x012d,
-0x011d, 0x011d, 0x011d, 0x011d,
-0x010d, 0x010d, 0x010d, 0x010d,
-0x282c, 0x282c, 0x282c, 0x282c,
-0x282c, 0x282c, 0x282c, 0x282c,
-0x242c, 0x242c, 0x242c, 0x242c,
-0x242c, 0x242c, 0x242c, 0x242c,
-0x143c, 0x143c, 0x143c, 0x143c,
-0x143c, 0x143c, 0x143c, 0x143c,
-0x0c4c, 0x0c4c, 0x0c4c, 0x0c4c,
-0x0c4c, 0x0c4c, 0x0c4c, 0x0c4c,
-0x085c, 0x085c, 0x085c, 0x085c,
-0x085c, 0x085c, 0x085c, 0x085c,
-0x047c, 0x047c, 0x047c, 0x047c,
-0x047c, 0x047c, 0x047c, 0x047c,
-0x046c, 0x046c, 0x046c, 0x046c,
-0x046c, 0x046c, 0x046c, 0x046c,
-0x00fc, 0x00fc, 0x00fc, 0x00fc,
-0x00fc, 0x00fc, 0x00fc, 0x00fc,
-0x00ec, 0x00ec, 0x00ec, 0x00ec,
-0x00ec, 0x00ec, 0x00ec, 0x00ec,
-0x00dc, 0x00dc, 0x00dc, 0x00dc,
-0x00dc, 0x00dc, 0x00dc, 0x00dc,
-0x00cc, 0x00cc, 0x00cc, 0x00cc,
-0x00cc, 0x00cc, 0x00cc, 0x00cc,
-0x681c, 0x681c, 0x681c, 0x681c,
-0x681c, 0x681c, 0x681c, 0x681c,
-0x641c, 0x641c, 0x641c, 0x641c,
-0x641c, 0x641c, 0x641c, 0x641c,
-0x601c, 0x601c, 0x601c, 0x601c,
-0x601c, 0x601c, 0x601c, 0x601c,
-0x5c1c, 0x5c1c, 0x5c1c, 0x5c1c,
-0x5c1c, 0x5c1c, 0x5c1c, 0x5c1c,
-0x581c, 0x581c, 0x581c, 0x581c,
-0x581c, 0x581c, 0x581c, 0x581c,
-};
-
-unsigned short int dct_coeff_tbl_1[16] =
-{
-0x00bb, 0x202b, 0x103b, 0x00ab,
-0x084b, 0x1c2b, 0x541b, 0x501b,
-0x009b, 0x4c1b, 0x481b, 0x045b,
-0x0c3b, 0x008b, 0x182b, 0x441b,
-};
-
-unsigned short int dct_coeff_tbl_2[4] =
-{
-0x4019, 0x1429, 0x0079, 0x0839,
-};
-
-unsigned short int dct_coeff_tbl_3[4] =
-{
-0x0449, 0x3c19, 0x3819, 0x1029,
-};
-
-unsigned short int dct_coeff_next[256] =
-{
-0xffff, 0xffff, 0xffff, 0xffff,
-0xf7d5, 0xf7d5, 0xf7d5, 0xf7d5,
-0x0826, 0x0826, 0x2416, 0x2416,
-0x0046, 0x0046, 0x2016, 0x2016,
-0x1c15, 0x1c15, 0x1c15, 0x1c15,
-0x1815, 0x1815, 0x1815, 0x1815,
-0x0425, 0x0425, 0x0425, 0x0425,
-0x1415, 0x1415, 0x1415, 0x1415,
-0x3417, 0x0067, 0x3017, 0x2c17,
-0x0c27, 0x0437, 0x0057, 0x2817,
-0x0034, 0x0034, 0x0034, 0x0034,
-0x0034, 0x0034, 0x0034, 0x0034,
-0x1014, 0x1014, 0x1014, 0x1014,
-0x1014, 0x1014, 0x1014, 0x1014,
-0x0c14, 0x0c14, 0x0c14, 0x0c14,
-0x0c14, 0x0c14, 0x0c14, 0x0c14,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-0x0011, 0x0011, 0x0011, 0x0011,
-};
-
-unsigned short int dct_coeff_first[256] =
-{
-0xffff, 0xffff, 0xffff, 0xffff,
-0xf7d5, 0xf7d5, 0xf7d5, 0xf7d5,
-0x0826, 0x0826, 0x2416, 0x2416,
-0x0046, 0x0046, 0x2016, 0x2016,
-0x1c15, 0x1c15, 0x1c15, 0x1c15,
-0x1815, 0x1815, 0x1815, 0x1815,
-0x0425, 0x0425, 0x0425, 0x0425,
-0x1415, 0x1415, 0x1415, 0x1415,
-0x3417, 0x0067, 0x3017, 0x2c17,
-0x0c27, 0x0437, 0x0057, 0x2817,
-0x0034, 0x0034, 0x0034, 0x0034,
-0x0034, 0x0034, 0x0034, 0x0034,
-0x1014, 0x1014, 0x1014, 0x1014,
-0x1014, 0x1014, 0x1014, 0x1014,
-0x0c14, 0x0c14, 0x0c14, 0x0c14,
-0x0c14, 0x0c14, 0x0c14, 0x0c14,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0023, 0x0023, 0x0023, 0x0023,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0813, 0x0813, 0x0813, 0x0813,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0412, 0x0412, 0x0412, 0x0412,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-0x0010, 0x0010, 0x0010, 0x0010,
-};
-
-/* Macro for filling up the decoding table for mb_addr_inc */
-#define ASSIGN1(start, end, step, val, num) \
- for (i = start; i < end; i+= step) { \
- for (j = 0; j < step; j++) { \
- mb_addr_inc[i+j].value = val; \
- mb_addr_inc[i+j].num_bits = num; \
- } \
- val--; \
- }
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * init_mb_addr_inc --
- *
- * Initialize the VLC decoding table for macro_block_address_increment
- *
- * Results:
- * The decoding table for macro_block_address_increment will
- * be filled; illegal values will be filled as ERROR.
- *
- * Side effects:
- * The global array mb_addr_inc will be filled.
- *
- *--------------------------------------------------------------
- */
-static void
-init_mb_addr_inc()
-{
- int i, j, val;
-
- for (i = 0; i < 8; i++) {
- mb_addr_inc[i].value = (unsigned int)ERROR;
- mb_addr_inc[i].num_bits = 0;
- }
-
- mb_addr_inc[8].value = MACRO_BLOCK_ESCAPE;
- mb_addr_inc[8].num_bits = 11;
-
- for (i = 9; i < 15; i++) {
- mb_addr_inc[i].value = (unsigned int)ERROR;
- mb_addr_inc[i].num_bits = 0;
- }
-
- mb_addr_inc[15].value = MACRO_BLOCK_STUFFING;
- mb_addr_inc[15].num_bits = 11;
-
- for (i = 16; i < 24; i++) {
- mb_addr_inc[i].value = (unsigned int)ERROR;
- mb_addr_inc[i].num_bits = 0;
- }
-
- val = 33;
-
- ASSIGN1(24, 36, 1, val, 11);
- ASSIGN1(36, 48, 2, val, 10);
- ASSIGN1(48, 96, 8, val, 8);
- ASSIGN1(96, 128, 16, val, 7);
- ASSIGN1(128, 256, 64, val, 5);
- ASSIGN1(256, 512, 128, val, 4);
- ASSIGN1(512, 1024, 256, val, 3);
- ASSIGN1(1024, 2048, 1024, val, 1);
-}
-
-
-/* Macro for filling up the decoding table for mb_type */
-#define ASSIGN2(start, end, quant, motion_forward, motion_backward, pattern, intra, num, mb_type) \
- for (i = start; i < end; i ++) { \
- mb_type[i].mb_quant = quant; \
- mb_type[i].mb_motion_forward = motion_forward; \
- mb_type[i].mb_motion_backward = motion_backward; \
- mb_type[i].mb_pattern = pattern; \
- mb_type[i].mb_intra = intra; \
- mb_type[i].num_bits = num; \
- }
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * init_mb_type_P --
- *
- * Initialize the VLC decoding table for macro_block_type in
- * predictive-coded pictures.
- *
- * Results:
- * The decoding table for macro_block_type in predictive-coded
- * pictures will be filled; illegal values will be filled as ERROR.
- *
- * Side effects:
- * The global array mb_type_P will be filled.
- *
- *--------------------------------------------------------------
- */
-static void
-init_mb_type_P()
-{
- int i;
-
- mb_type_P[0].mb_quant = mb_type_P[0].mb_motion_forward
- = mb_type_P[0].mb_motion_backward = mb_type_P[0].mb_pattern
- = mb_type_P[0].mb_intra = (unsigned int)ERROR;
- mb_type_P[0].num_bits = 0;
-
- ASSIGN2(1, 2, 1, 0, 0, 0, 1, 6, mb_type_P)
- ASSIGN2(2, 4, 1, 0, 0, 1, 0, 5, mb_type_P)
- ASSIGN2(4, 6, 1, 1, 0, 1, 0, 5, mb_type_P);
- ASSIGN2(6, 8, 0, 0, 0, 0, 1, 5, mb_type_P);
- ASSIGN2(8, 16, 0, 1, 0, 0, 0, 3, mb_type_P);
- ASSIGN2(16, 32, 0, 0, 0, 1, 0, 2, mb_type_P);
- ASSIGN2(32, 64, 0, 1, 0, 1, 0, 1, mb_type_P);
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * init_mb_type_B --
- *
- * Initialize the VLC decoding table for macro_block_type in
- * bidirectionally-coded pictures.
- *
- * Results:
- * The decoding table for macro_block_type in bidirectionally-coded
- * pictures will be filled; illegal values will be filled as ERROR.
- *
- * Side effects:
- * The global array mb_type_B will be filled.
- *
- *--------------------------------------------------------------
- */
-static void
-init_mb_type_B()
-{
- int i;
-
- mb_type_B[0].mb_quant = mb_type_B[0].mb_motion_forward
- = mb_type_B[0].mb_motion_backward = mb_type_B[0].mb_pattern
- = mb_type_B[0].mb_intra = (unsigned int)ERROR;
- mb_type_B[0].num_bits = 0;
-
- ASSIGN2(1, 2, 1, 0, 0, 0, 1, 6, mb_type_B);
- ASSIGN2(2, 3, 1, 0, 1, 1, 0, 6, mb_type_B);
- ASSIGN2(3, 4, 1, 1, 0, 1, 0, 6, mb_type_B);
- ASSIGN2(4, 6, 1, 1, 1, 1, 0, 5, mb_type_B);
- ASSIGN2(6, 8, 0, 0, 0, 0, 1, 5, mb_type_B);
- ASSIGN2(8, 12, 0, 1, 0, 0, 0, 4, mb_type_B);
- ASSIGN2(12, 16, 0, 1, 0, 1, 0, 4, mb_type_B);
- ASSIGN2(16, 24, 0, 0, 1, 0, 0, 3, mb_type_B);
- ASSIGN2(24, 32, 0, 0, 1, 1, 0, 3, mb_type_B);
- ASSIGN2(32, 48, 0, 1, 1, 0, 0, 2, mb_type_B);
- ASSIGN2(48, 64, 0, 1, 1, 1, 0, 2, mb_type_B);
-}
-
-
-/* Macro for filling up the decoding tables for motion_vectors */
-#define ASSIGN3(start, end, step, val, num) \
- for (i = start; i < end; i+= step) { \
- for (j = 0; j < step / 2; j++) { \
- motion_vectors[i+j].code = val; \
- motion_vectors[i+j].num_bits = num; \
- } \
- for (j = step / 2; j < step; j++) { \
- motion_vectors[i+j].code = -val; \
- motion_vectors[i+j].num_bits = num; \
- } \
- val--; \
- }
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * init_motion_vectors --
- *
- * Initialize the VLC decoding table for the various motion
- * vectors, including motion_horizontal_forward_code,
- * motion_vertical_forward_code, motion_horizontal_backward_code,
- * and motion_vertical_backward_code.
- *
- * Results:
- * The decoding table for the motion vectors will be filled;
- * illegal values will be filled as ERROR.
- *
- * Side effects:
- * The global array motion_vector will be filled.
- *
- *--------------------------------------------------------------
- */
-static void
-init_motion_vectors()
-{
- int i, j, val = 16;
-
- for (i = 0; i < 24; i++) {
- motion_vectors[i].code = (unsigned int)ERROR;
- motion_vectors[i].num_bits = 0;
- }
-
- ASSIGN3(24, 36, 2, val, 11);
- ASSIGN3(36, 48, 4, val, 10);
- ASSIGN3(48, 96, 16, val, 8);
- ASSIGN3(96, 128, 32, val, 7);
- ASSIGN3(128, 256, 128, val, 5);
- ASSIGN3(256, 512, 256, val, 4);
- ASSIGN3(512, 1024, 512, val, 3);
- ASSIGN3(1024, 2048, 1024, val, 1);
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * init_tables --
- *
- * Initialize all the tables for VLC decoding; this must be
- * called when the system is set up before any decoding can
- * take place.
- *
- * Results:
- * All the decoding tables will be filled accordingly.
- *
- * Side effects:
- * The corresponding global array for each decoding table
- * will be filled.
- *
- *--------------------------------------------------------------
- */
-void
-init_tables()
-{
- extern void init_pre_idct();
-
- init_mb_addr_inc();
- init_mb_type_P();
- init_mb_type_B();
- init_motion_vectors();
- init_pre_idct();
-
-#ifdef ANALYSIS
- {
- init_stats();
- }
-#endif
-}
-
-/*
- *--------------------------------------------------------------
- *
- * DecodeDCTDCSizeLum --
- *
- * Huffman Decoder for dct_dc_size_luminance; location where
- * the result of decoding will be placed is passed as argument.
- * The decoded values are obtained by doing a table lookup on
- * dct_dc_size_luminance.
- *
- * Results:
- * The decoded value for dct_dc_size_luminance or ERROR for
- * unbound values will be placed in the location specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-void
-decodeDCTDCSizeLum(unsigned int *value)
-{
- unsigned int index;
-
- show_bits7(index);
-
- *value = dct_dc_size_luminance[index].value;
-
- flush_bits(dct_dc_size_luminance[index].num_bits);
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * DecodeDCTDCSizeChrom --
- *
- * Huffman Decoder for dct_dc_size_chrominance; location where
- * the result of decoding will be placed is passed as argument.
- * The decoded values are obtained by doing a table lookup on
- * dct_dc_size_chrominance.
- *
- * Results:
- * The decoded value for dct_dc_size_chrominance or ERROR for
- * unbound values will be placed in the location specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-void
-decodeDCTDCSizeChrom(unsigned int *value)
-{
- unsigned int index;
-
- show_bits8(index);
-
- *value = dct_dc_size_chrominance[index].value;
-
- flush_bits(dct_dc_size_chrominance[index].num_bits);
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * decodeDCTCoeff --
- *
- * Huffman Decoder for dct_coeff_first and dct_coeff_next;
- * locations where the results of decoding: run and level, are to
- * be placed and also the type of DCT coefficients, either
- * dct_coeff_first or dct_coeff_next, are being passed as argument.
- *
- * The decoder first examines the next 8 bits in the input stream,
- * and perform according to the following cases:
- *
- * '0000 0000' - examine 8 more bits (i.e. 16 bits total) and
- * perform a table lookup on dct_coeff_tbl_0.
- * One more bit is then examined to determine the sign
- * of level.
- *
- * '0000 0001' - examine 4 more bits (i.e. 12 bits total) and
- * perform a table lookup on dct_coeff_tbl_1.
- * One more bit is then examined to determine the sign
- * of level.
- *
- * '0000 0010' - examine 2 more bits (i.e. 10 bits total) and
- * perform a table lookup on dct_coeff_tbl_2.
- * One more bit is then examined to determine the sign
- * of level.
- *
- * '0000 0011' - examine 2 more bits (i.e. 10 bits total) and
- * perform a table lookup on dct_coeff_tbl_3.
- * One more bit is then examined to determine the sign
- * of level.
- *
- * otherwise - perform a table lookup on dct_coeff_tbl. If the
- * value of run is not ESCAPE, extract one more bit
- * to determine the sign of level; otherwise 6 more
- * bits will be extracted to obtain the actual value
- * of run , and then 8 or 16 bits to get the value of level.
- *
- *
- *
- * Results:
- * The decoded values of run and level or ERROR for unbound values
- * are placed in the locations specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-static void
-decodeDCTCoeff(unsigned short int *dct_coeff_tbl, unsigned int *run, int *level)
-{
- unsigned int temp, index, num_bits;
- unsigned int value, next32bits, flushed;
-
- /*
- * Grab the next 32 bits and use it to improve performance of
- * getting the bits to parse. Thus, calls are translated as:
- *
- * show_bitsX <--> next32bits >> (32-X)
- * get_bitsX <--> val = next32bits >> (32-flushed-X);
- * flushed += X;
- * next32bits &= bitMask[flushed];
- * flush_bitsX <--> flushed += X;
- * next32bits &= bitMask[flushed];
- *
- */
- show_bits32(next32bits);
- flushed = 0;
-
- /* show_bits8(index); */
- index = next32bits >> 24;
-
- if (index > 3) {
- value = dct_coeff_tbl[index];
- *run = (value & RUN_MASK) >> RUN_SHIFT;
- if (*run == END_OF_BLOCK) {
- *level = END_OF_BLOCK;
- }
- else {
- /* num_bits = (value & NUM_MASK) + 1; */
- /* flush_bits(num_bits); */
- flushed = (value & NUM_MASK) + 1;
- next32bits &= bitMask[flushed];
- if (*run != ESCAPE) {
- *level = (value & LEVEL_MASK) >> LEVEL_SHIFT;
- /* get_bits1(value); */
- /* if (value) *level = -*level; */
- if (next32bits >> (31-flushed)) *level = -*level;
- flushed++;
- /* next32bits &= bitMask[flushed]; last op before update */
- }
- else { /* *run == ESCAPE */
- /* get_bits14(temp); */
- temp = next32bits >> (18-flushed);
- flushed += 14;
- next32bits &= bitMask[flushed];
- *run = temp >> 8;
- temp &= 0xff;
- if (temp == 0) {
- /* get_bits8(*level); */
- *level = next32bits >> (24-flushed);
- flushed += 8;
- /* next32bits &= bitMask[flushed]; last op before update */
- assert(*level >= 128);
- } else if (temp != 128) {
- /* Grab sign bit */
- *level = ((int) (temp << 24)) >> 24;
- } else {
- /* get_bits8(*level); */
- *level = next32bits >> (24-flushed);
- flushed += 8;
- /* next32bits &= bitMask[flushed]; last op before update */
- *level = *level - 256;
- assert(*level <= -128 && *level >= -255);
- }
- }
- /* Update bitstream... */
- flush_bits(flushed);
- }
- }
- else {
- if (index == 2) {
- /* show_bits10(index); */
- index = next32bits >> 22;
- value = dct_coeff_tbl_2[index & 3];
- }
- else if (index == 3) {
- /* show_bits10(index); */
- index = next32bits >> 22;
- value = dct_coeff_tbl_3[index & 3];
- }
- else if (index) { /* index == 1 */
- /* show_bits12(index); */
- index = next32bits >> 20;
- value = dct_coeff_tbl_1[index & 15];
- }
- else { /* index == 0 */
- /* show_bits16(index); */
- index = next32bits >> 16;
- value = dct_coeff_tbl_0[index & 255];
- }
- *run = (value & RUN_MASK) >> RUN_SHIFT;
- *level = (value & LEVEL_MASK) >> LEVEL_SHIFT;
-
- /*
- * Fold these operations together to make it fast...
- */
- /* num_bits = (value & NUM_MASK) + 1; */
- /* flush_bits(num_bits); */
- /* get_bits1(value); */
- /* if (value) *level = -*level; */
-
- flushed = (value & NUM_MASK) + 2;
- if ((next32bits >> (32-flushed)) & 0x1) *level = -*level;
-
- /* Update bitstream ... */
- flush_bits(flushed);
- }
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * decodeDCTCoeffFirst --
- *
- * Huffman Decoder for dct_coeff_first. Locations for the
- * decoded results: run and level, are being passed as
- * arguments. Actual work is being done by calling DecodeDCTCoeff,
- * with the table dct_coeff_first.
- *
- * Results:
- * The decoded values of run and level for dct_coeff_first or
- * ERROR for unbound values are placed in the locations given.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-void
-decodeDCTCoeffFirst(unsigned int *run, int *level)
-{
- decodeDCTCoeff(dct_coeff_first, run, level);
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * decodeDCTCoeffNext --
- *
- * Huffman Decoder for dct_coeff_first. Locations for the
- * decoded results: run and level, are being passed as
- * arguments. Actual work is being done by calling DecodeDCTCoeff,
- * with the table dct_coeff_next.
- *
- * Results:
- * The decoded values of run and level for dct_coeff_next or
- * ERROR for unbound values are placed in the locations given.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-void
-decodeDCTCoeffNext(unsigned int *run, int *level)
-{
- decodeDCTCoeff(dct_coeff_next, run, level);
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h
deleted file mode 100644
index eaed06d00cb..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h
+++ /dev/null
@@ -1,475 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/*
- * decoders.h
- *
- * This file contains the declarations of structures required for Huffman
- * decoding
- *
- */
-
-/* Include util.h for bit i/o parsing macros. */
-
-#include "util.h"
-
-/* Code for unbound values in decoding tables */
-#define ERROR -1
-#define DCT_ERROR 63
-
-#define MACRO_BLOCK_STUFFING 34
-#define MACRO_BLOCK_ESCAPE 35
-
-/* Two types of DCT Coefficients */
-#define DCT_COEFF_FIRST 0
-#define DCT_COEFF_NEXT 1
-
-/* Special values for DCT Coefficients */
-#define END_OF_BLOCK 62
-#define ESCAPE 61
-
-/* Structure for an entry in the decoding table of
- * macroblock_address_increment */
-typedef struct {
- unsigned int value; /* value for macroblock_address_increment */
- int num_bits; /* length of the Huffman code */
-} mb_addr_inc_entry;
-
-/* Decoding table for macroblock_address_increment */
-extern mb_addr_inc_entry mb_addr_inc[2048];
-
-
-/* Structure for an entry in the decoding table of macroblock_type */
-typedef struct {
- unsigned int mb_quant; /* macroblock_quant */
- unsigned int mb_motion_forward; /* macroblock_motion_forward */
- unsigned int mb_motion_backward; /* macroblock_motion_backward */
- unsigned int mb_pattern; /* macroblock_pattern */
- unsigned int mb_intra; /* macroblock_intra */
- int num_bits; /* length of the Huffman code */
-} mb_type_entry;
-
-/* Decoding table for macroblock_type in predictive-coded pictures */
-extern mb_type_entry mb_type_P[64];
-
-/* Decoding table for macroblock_type in bidirectionally-coded pictures */
-extern mb_type_entry mb_type_B[64];
-
-
-/* Structures for an entry in the decoding table of coded_block_pattern */
-typedef struct {
- unsigned int cbp; /* coded_block_pattern */
- int num_bits; /* length of the Huffman code */
-} coded_block_pattern_entry;
-
-/* External declaration of coded block pattern table. */
-
-extern coded_block_pattern_entry coded_block_pattern[512];
-
-
-
-/* Structure for an entry in the decoding table of motion vectors */
-typedef struct {
- int code; /* value for motion_horizontal_forward_code,
- * motion_vertical_forward_code,
- * motion_horizontal_backward_code, or
- * motion_vertical_backward_code.
- */
- int num_bits; /* length of the Huffman code */
-} motion_vectors_entry;
-
-
-/* Decoding table for motion vectors */
-extern motion_vectors_entry motion_vectors[2048];
-
-
-/* Structure for an entry in the decoding table of dct_dc_size */
-typedef struct {
- unsigned int value; /* value of dct_dc_size (luminance or chrominance) */
- int num_bits; /* length of the Huffman code */
-} dct_dc_size_entry;
-
-/* External declaration of dct dc size lumiance table. */
-
-extern dct_dc_size_entry dct_dc_size_luminance[128];
-
-/* External declaration of dct dc size chrom table. */
-
-extern dct_dc_size_entry dct_dc_size_chrominance[256];
-
-
-/* DCT coeff tables. */
-
-#define RUN_MASK 0xfc00
-#define LEVEL_MASK 0x03f0
-#define NUM_MASK 0x000f
-#define RUN_SHIFT 10
-#define LEVEL_SHIFT 4
-
-/* External declaration of dct coeff tables. */
-
-extern unsigned short int dct_coeff_tbl_0[256];
-extern unsigned short int dct_coeff_tbl_1[16];
-extern unsigned short int dct_coeff_tbl_2[4];
-extern unsigned short int dct_coeff_tbl_3[4];
-extern unsigned short int dct_coeff_next[256];
-extern unsigned short int dct_coeff_first[256];
-
-#define DecodeDCTDCSizeLum(macro_val) \
-{ \
- unsigned int index; \
- \
- show_bits7(index); \
- \
- macro_val = dct_dc_size_luminance[index].value; \
- \
- flush_bits(dct_dc_size_luminance[index].num_bits); \
-}
-
-#define DecodeDCTDCSizeChrom(macro_val) \
-{ \
- unsigned int index; \
- \
- show_bits8(index); \
- \
- macro_val = dct_dc_size_chrominance[index].value; \
- \
- flush_bits(dct_dc_size_chrominance[index].num_bits); \
-}
-
-#define DecodeDCTCoeff(dct_coeff_tbl, run, level) \
-{ \
- unsigned int temp, index; \
- unsigned int value, next32bits, flushed; \
- \
- /* \
- * Grab the next 32 bits and use it to improve performance of \
- * getting the bits to parse. Thus, calls are translated as: \
- * \
- * show_bitsX <--> next32bits >> (32-X) \
- * get_bitsX <--> val = next32bits >> (32-flushed-X); \
- * flushed += X; \
- * next32bits &= bitMask[flushed]; \
- * flush_bitsX <--> flushed += X; \
- * next32bits &= bitMask[flushed]; \
- * \
- * I've streamlined the code a lot, so that we don't have to mask \
- * out the low order bits and a few of the extra adds are removed. \
- */ \
- show_bits32(next32bits); \
- \
- /* show_bits8(index); */ \
- index = next32bits >> 24; \
- \
- if (index > 3) { \
- value = dct_coeff_tbl[index]; \
- run = value >> RUN_SHIFT; \
- if (run != END_OF_BLOCK) { \
- /* num_bits = (value & NUM_MASK) + 1; */ \
- /* flush_bits(num_bits); */ \
- if (run != ESCAPE) { \
- /* get_bits1(value); */ \
- /* if (value) level = -level; */ \
- flushed = (value & NUM_MASK) + 2; \
- level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \
- value = next32bits >> (32-flushed); \
- value &= 0x1; \
- if (value) level = -level; \
- /* next32bits &= ((~0) >> flushed); last op before update */ \
- } \
- else { /* run == ESCAPE */ \
- /* Get the next six into run, and next 8 into temp */ \
- /* get_bits14(temp); */ \
- flushed = (value & NUM_MASK) + 1; \
- temp = next32bits >> (18-flushed); \
- /* Normally, we'd ad 14 to flushed, but I've saved a few \
- * instr by moving the add below */ \
- temp &= 0x3fff; \
- run = temp >> 8; \
- temp &= 0xff; \
- if (temp == 0) { \
- /* get_bits8(level); */ \
- level = next32bits >> (10-flushed); \
- level &= 0xff; \
- flushed += 22; \
- assert(level >= 128); \
- } else if (temp != 128) { \
- /* Grab sign bit */ \
- flushed += 14; \
- level = ((int) (temp << 24)) >> 24; \
- } else { \
- /* get_bits8(level); */ \
- level = next32bits >> (10-flushed); \
- level &= 0xff; \
- flushed += 22; \
- level = level - 256; \
- assert(level <= -128 && level >= -255); \
- } \
- } \
- /* Update bitstream... */ \
- flush_bits(flushed); \
- assert (flushed <= 32); \
- } \
- } \
- else { \
- if (index == 2) { \
- /* show_bits10(index); */ \
- index = next32bits >> 22; \
- value = dct_coeff_tbl_2[index & 3]; \
- } \
- else if (index == 3) { \
- /* show_bits10(index); */ \
- index = next32bits >> 22; \
- value = dct_coeff_tbl_3[index & 3]; \
- } \
- else if (index) { /* index == 1 */ \
- /* show_bits12(index); */ \
- index = next32bits >> 20; \
- value = dct_coeff_tbl_1[index & 15]; \
- } \
- else { /* index == 0 */ \
- /* show_bits16(index); */ \
- index = next32bits >> 16; \
- value = dct_coeff_tbl_0[index & 255]; \
- } \
- run = value >> RUN_SHIFT; \
- level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \
- \
- /* \
- * Fold these operations together to make it fast... \
- */ \
- /* num_bits = (value & NUM_MASK) + 1; */ \
- /* flush_bits(num_bits); */ \
- /* get_bits1(value); */ \
- /* if (value) level = -level; */ \
- \
- flushed = (value & NUM_MASK) + 2; \
- value = next32bits >> (32-flushed); \
- value &= 0x1; \
- if (value) level = -level; \
- \
- /* Update bitstream ... */ \
- flush_bits(flushed); \
- assert (flushed <= 32); \
- } \
-}
-
-#define DecodeDCTCoeffFirst(runval, levelval) \
-{ \
- DecodeDCTCoeff(dct_coeff_first, runval, levelval); \
-}
-
-#define DecodeDCTCoeffNext(runval, levelval) \
-{ \
- DecodeDCTCoeff(dct_coeff_next, runval, levelval); \
-}
-
-/*
- *--------------------------------------------------------------
- *
- * DecodeMBAddrInc --
- *
- * Huffman Decoder for macro_block_address_increment; the location
- * in which the result will be placed is being passed as argument.
- * The decoded value is obtained by doing a table lookup on
- * mb_addr_inc.
- *
- * Results:
- * The decoded value for macro_block_address_increment or ERROR
- * for unbound values will be placed in the location specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-#define DecodeMBAddrInc(val) \
-{ \
- unsigned int index; \
- show_bits11(index); \
- val = mb_addr_inc[index].value; \
- flush_bits(mb_addr_inc[index].num_bits); \
-}
-
-/*
- *--------------------------------------------------------------
- *
- * DecodeMotionVectors --
- *
- * Huffman Decoder for the various motion vectors, including
- * motion_horizontal_forward_code, motion_vertical_forward_code,
- * motion_horizontal_backward_code, motion_vertical_backward_code.
- * Location where the decoded result will be placed is being passed
- * as argument. The decoded values are obtained by doing a table
- * lookup on motion_vectors.
- *
- * Results:
- * The decoded value for the motion vector or ERROR for unbound
- * values will be placed in the location specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-#define DecodeMotionVectors(value) \
-{ \
- unsigned int index; \
- show_bits11(index); \
- value = motion_vectors[index].code; \
- flush_bits(motion_vectors[index].num_bits); \
-}
-/*
- *--------------------------------------------------------------
- *
- * DecodeMBTypeB --
- *
- * Huffman Decoder for macro_block_type in bidirectionally-coded
- * pictures;locations in which the decoded results: macroblock_quant,
- * macroblock_motion_forward, macro_block_motion_backward,
- * macroblock_pattern, macro_block_intra, will be placed are
- * being passed as argument. The decoded values are obtained by
- * doing a table lookup on mb_type_B.
- *
- * Results:
- * The various decoded values for macro_block_type in
- * bidirectionally-coded pictures or ERROR for unbound values will
- * be placed in the locations specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-#define DecodeMBTypeB(quant, motion_fwd, motion_bwd, pat, intra) \
-{ \
- unsigned int index; \
- \
- show_bits6(index); \
- \
- quant = mb_type_B[index].mb_quant; \
- motion_fwd = mb_type_B[index].mb_motion_forward; \
- motion_bwd = mb_type_B[index].mb_motion_backward; \
- pat = mb_type_B[index].mb_pattern; \
- intra = mb_type_B[index].mb_intra; \
- flush_bits(mb_type_B[index].num_bits); \
-}
-/*
- *--------------------------------------------------------------
- *
- * DecodeMBTypeI --
- *
- * Huffman Decoder for macro_block_type in intra-coded pictures;
- * locations in which the decoded results: macroblock_quant,
- * macroblock_motion_forward, macro_block_motion_backward,
- * macroblock_pattern, macro_block_intra, will be placed are
- * being passed as argument.
- *
- * Results:
- * The various decoded values for macro_block_type in intra-coded
- * pictures or ERROR for unbound values will be placed in the
- * locations specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-#define DecodeMBTypeI(quant, motion_fwd, motion_bwd, pat, intra) \
-{ \
- unsigned int index; \
- static int quantTbl[4] = {ERROR, 1, 0, 0}; \
- \
- show_bits2(index); \
- \
- motion_fwd = 0; \
- motion_bwd = 0; \
- pat = 0; \
- intra = 1; \
- quant = quantTbl[index]; \
- if (index) { \
- flush_bits (1 + quant); \
- } \
-}
-/*
- *--------------------------------------------------------------
- *
- * DecodeMBTypeP --
- *
- * Huffman Decoder for macro_block_type in predictive-coded pictures;
- * locations in which the decoded results: macroblock_quant,
- * macroblock_motion_forward, macro_block_motion_backward,
- * macroblock_pattern, macro_block_intra, will be placed are
- * being passed as argument. The decoded values are obtained by
- * doing a table lookup on mb_type_P.
- *
- * Results:
- * The various decoded values for macro_block_type in
- * predictive-coded pictures or ERROR for unbound values will be
- * placed in the locations specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-#define DecodeMBTypeP(quant, motion_fwd, motion_bwd, pat, intra) \
-{ \
- unsigned int index; \
- \
- show_bits6(index); \
- \
- quant = mb_type_P[index].mb_quant; \
- motion_fwd = mb_type_P[index].mb_motion_forward; \
- motion_bwd = mb_type_P[index].mb_motion_backward; \
- pat = mb_type_P[index].mb_pattern; \
- intra = mb_type_P[index].mb_intra; \
- \
- flush_bits(mb_type_P[index].num_bits); \
-}
-/*
- *--------------------------------------------------------------
- *
- * DecodeCBP --
- *
- * Huffman Decoder for coded_block_pattern; location in which the
- * decoded result will be placed is being passed as argument. The
- * decoded values are obtained by doing a table lookup on
- * coded_block_pattern.
- *
- * Results:
- * The decoded value for coded_block_pattern or ERROR for unbound
- * values will be placed in the location specified.
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-#define DecodeCBP(coded_bp) \
-{ \
- unsigned int index; \
- \
- show_bits9(index); \
- coded_bp = coded_block_pattern[index].cbp; \
- flush_bits(coded_block_pattern[index].num_bits); \
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h
deleted file mode 100644
index f11623f84a5..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-extern int LUM_RANGE;
-extern int CR_RANGE;
-extern int CB_RANGE;
-
-
-#define CB_BASE 1
-#define CR_BASE (CB_BASE*CB_RANGE)
-#define LUM_BASE (CR_BASE*CR_RANGE)
-
-extern unsigned char pixel[256];
-extern int *lum_values;
-extern int *cr_values;
-extern int *cb_values;
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp
deleted file mode 100644
index 1f939dcd012..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include "video.h"
-#include <X11/Intrinsic.h>
-#include <Xm/Xm.h>
-#include <Xm/Text.h>
-#include <Xm/FileSB.h>
-#include <Xm/DialogS.h>
-#if defined(SunOS) || defined(FreeBSD)
-#include <stdlib.h>
-#endif
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-
-#ifdef XmFONTLIST_DEFAULT_TAG
-#define XmStringTag XmFONTLIST_DEFAULT_TAG
-#else
-#define XmStringTag XmSTRING_DEFAULT_CHARSET
-#endif
-#define BUFSIZE 256
-
-static Widget fileshell;
-
-void StartLocalServer(void)
-{
- int res;
-
- static int startLocalServer = 1;
-
- if (startLocalServer) {
- startLocalServer = 0;
- if (access(VCR_UNIX_PORT, 0) == -1) { /* going to start a server */
- fprintf(stderr, "Trying to fork a server on local host...\n");
- res = system("vcrs -rt 2> /dev/null& exit");
- if (shared->config.verbose && res == -1) {
- perror("Error on fork server on local host");
- }
- usleep(1000000);
- }
- }
-}
-
-/* hostname == "" defaults to local host */
-static void StartFile(char *hostname, char *filename)
-{
- char *title = (char *)malloc(strlen(hostname) + strlen(filename) + 10);
- char buf[BUFSIZE];
- int len;
-
- if (*hostname == 0) StartLocalServer();
-
- if (*hostname == 0) {
- get_full_path(filename, buf, BUFSIZE);
- }
- else {
- strncpy(buf, filename, BUFSIZE);
- buf[BUFSIZE-1] = 0;
- }
- len = strlen(buf);
-
- if (title == NULL) title = filename;
- else sprintf(title, "%s:%s", hostname, filename);
-
- if (!strcasecmp(".mpg", buf+len-4) || !strcasecmp(".mpeg", buf+len-5))
- StartProgram(title, hostname, buf, "", "");
- else if (!strcasecmp(".au", buf+len-3))
- StartProgram(title, "", "", hostname, buf);
- else
- fprintf(stderr, "Error: type of file %s not known (know only .mpeg .mpg, .au).\n",
- filename);
- if (title != filename) free(title);
-}
-
-static void dismissCB(Widget W, XtPointer closure, XtPointer call_data)
-{
-
- XtUnmanageChild (fileshell);
-}
-
-static void playCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- char *filename = NULL; /* String containing file name */
- XmStringCharSet charset = (XmStringCharSet) XmSTRING_DEFAULT_CHARSET;
- XmFileSelectionBoxCallbackStruct *fcb =
- (XmFileSelectionBoxCallbackStruct *) call_data;
-
- XmStringGetLtoR(fcb->value, charset, &filename);
-
- if (filename == NULL)
- {
- fprintf(stderr, "Error: failed to get file name to play.\n");
- return;
- }
- StartFile("", filename);
- XmStringFree((XmString)filename);
-}
-
-Widget CreateFileWindow(Widget parent, int cmdSock, int * playflag, Widget frametext)
-{
- Arg args[10]; /* arg list */
- register int n; /* arg count */
- XmString okString, cancelString;
-
-/* Create the file selection box */
- okString = (XmString)XmStringCreateLtoR("Select", XmStringTag);
- cancelString = (XmString)XmStringCreateLtoR("Dismiss", XmStringTag);
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR File Selection"); n++;
- XtSetArg(args[n], XmNokLabelString, okString); n++;
- XtSetArg(args[n], XmNcancelLabelString, cancelString); n++;
- fileshell = XmCreateFileSelectionDialog(parent, "filebox", args, n);
- XmStringFree(okString);
- XmStringFree(cancelString);
- XtAddCallback (fileshell, XmNokCallback, (XtCallbackProc)playCB, NULL);
- XtAddCallback (fileshell, XmNcancelCallback, (XtCallbackProc)dismissCB, NULL);
-
- return fileshell;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp
deleted file mode 100644
index 583582ff3d2..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp
+++ /dev/null
@@ -1,394 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#include <stdlib.h>
-#include <string.h>
-#include "video.h"
-#include "dither.h"
-#include "fs2.h"
-#include "proto.h"
-
-/* Structures for precomputed error propogation values. */
-
-static FS2DithVal lum_index[256];
-static FS2DithVal cr_index[256];
-static FS2DithVal cb_index[256];
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitFS2Dither --
- *
- * Initializes structures for precomputed 2 error f-s dithering.
- * The value field of the structure contains the pixel component
- * of the particular channel in question. Thus the addition of
- * the value field of a structure in the luminance index, a
- * structure in the Cr index, and a structure in the Cb index will
- * yeild a color number. This color number can then be transformed
- * into a pixel value to be displayed. Each channel can then be
- * processed (i.e. dithered) separately, with the results being
- * added up and remapped to yield a final pixel value.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void InitFS2Dither()
-{
- int i;
-
- /* For each possible pixel value, precompute propogated error and
- store in array.
- */
-
- for (i=0; i<256; i++) {
- lum_index[i].value = (i * LUM_RANGE) / 256;
-
- lum_index[i].e1 = (i-lum_values[lum_index[i].value]) / 2;
- lum_index[i].e3 = (i - lum_values[lum_index[i].value]) - lum_index[i].e1;
-
- lum_index[i].value *= LUM_BASE;
-
- cr_index[i].value = (i * CR_RANGE) / 256;
-
- cr_index[i].e1 = (i - cr_values[cr_index[i].value]) / 2;
- cr_index[i].e3 = (i - cr_values[cr_index[i].value]) - cr_index[i].e1 ;
-
- cr_index[i].value *= CR_BASE;
-
- cb_index[i].value = (i * CB_RANGE) / 256;
-
- cb_index[i].e1 = (i - cb_values[cb_index[i].value]) / 2;
- cb_index[i].e3 = (i - cb_values[cb_index[i].value]) - cb_index[i].e1;
-
- cb_index[i].value *= CB_BASE;
-
- }
-
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * DitherImage --
- *
- * Converts lum, cr, cb image planes into fixed colormap
- * space.
- *
- * Results:
- * the display plane is replaced by 8-bit colormap space
- * image.
- *
- * Side effects:
- * Hopefully, none.
- *
- *--------------------------------------------------------------
- */
-
-void FS2DitherImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *disp,
- int rows, int cols)
-{
- static char *cur_row_error, *next_row_error;
- static int first = 1;
- char *cur_row_err_mark, *next_row_err_mark;
- char *temp;
- int i, j, pixsum, c_cols;
- unsigned char *cur_row, *channel, *dest_row;
- FS2DithVal *chan_index;
-
- /* Allocate error arrays. */
-
- if (first) {
- cur_row_error = (char *) malloc(cols+2);
- next_row_error = (char *) malloc(cols+2);
- first = 0;
- }
-
- /* Initialize error arrays. */
-
- memset(cur_row_error, 0, cols+2);
- memset(next_row_error, 0, cols+2);
-
- /* Use luminance values first. */
-
- /* For each two rows, do... */
-
- for(i=0; i<rows; i+=2) {
-
- /* Establish pointer to current source and destination rows. */
- cur_row = lum + (i*cols);
- dest_row = disp + (i*cols);
-
- /* Establish pointers to error arrays. */
- cur_row_err_mark = cur_row_error + 1;
- next_row_err_mark = next_row_error + 1;
-
-
- /* For each column within first row do... */
-
- for (j=0; j<cols; j++) {
-
- /* Calculate pixel value with error. */
-
- pixsum = *cur_row + *cur_row_err_mark;
-
- /* Bounds check. */
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- /* Establish dest value, propogate errors. */
-
- *dest_row = lum_index[pixsum].value;
- *(cur_row_err_mark+1) += lum_index[pixsum].e1;
- *next_row_err_mark += lum_index[pixsum].e3;
-
- /* Advance pointers. */
-
- cur_row++;
- dest_row++;
- cur_row_err_mark++;
- next_row_err_mark++;
- }
-
- /* Switch error arrays, so next row errors are now current row errors, and
- vice versa.
- */
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- /* Reset next row errors. */
-
- memset(next_row_error, 0, cols+2);
-
- /* Establish pointers for second row. This one will be processed right to
- left to establish serpantine motion.
- */
-
- cur_row += cols-1;
- dest_row += cols-1;
- cur_row_err_mark = cur_row_error + cols;
- next_row_err_mark = next_row_error + cols;
-
- /* Process each column... */
-
- for (j=0; j<cols; j++) {
-
- pixsum = *cur_row + *cur_row_err_mark;
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- *dest_row = lum_index[pixsum].value;
- *(cur_row_err_mark-1) += lum_index[pixsum].e1;
- *next_row_err_mark += lum_index[pixsum].e3;
-
- cur_row--;
- dest_row--;
- cur_row_err_mark--;
- next_row_err_mark--;
- }
-
- /* Switch error arrays. */
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- /* Reset next row errors. */
-
- memset(next_row_error, 0, cols+2);
- }
-
- /* Reset error arrays. */
-
- memset(cur_row_error, 0, cols+2);
-
- /* Establish column length divided by two. */
-
- c_cols = cols >> 1;
-
- /* Set channel to Cr. Use Cr index. */
-
- channel = cr;
- chan_index = cr_index;
-
- repeat:
-
- /* Process each row of chrominance data... */
-
- for (i=0; i < rows; i+=2) {
-
- /* Establish pointers. */
-
- cur_row = channel + ((i>>1)*c_cols);
- dest_row = disp + (i*cols);
-
- cur_row_err_mark = cur_row_error+1;
- next_row_err_mark = next_row_error+1;
-
- /* For each column in row... */
-
- for (j=0; j<cols; j++) {
- int p_val;
-
- /* Get pixel value as twos bit complement. */
-
- p_val = *cur_row;
-
- /* Add error term. */
-
- pixsum = *cur_row_err_mark + p_val;
-
- /* Bounds check. */
-
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- /* Increment dest value. */
-
- *dest_row += chan_index[pixsum].value;
-
- /* Propogate error values. */
-
- *(cur_row_err_mark+1) += chan_index[pixsum].e1;
- *next_row_err_mark += chan_index[pixsum].e3;
-
-
- /* If count is odd, advance source pointer (Cr and Cb channels are 2:1
- subsampled.
- */
-
- if (j&1) cur_row++;
-
- /* Advance destination and error pointers. */
-
- dest_row++;
- cur_row_err_mark++;
- next_row_err_mark++;
- }
-
- /* Switch error arrays. */
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- /* Reset next row errors. */
-
- memset(next_row_error, 0, cols+2);
-
- /* Re-establish pointers. */
-
- cur_row += c_cols-1;
- dest_row += cols-1;
- cur_row_err_mark = cur_row_error+cols;
- next_row_err_mark = next_row_error+cols;
-
- /* Process second row right to left. */
-
- for (j=0; j<cols; j++) {
- int p_val;
-
- /* Get source value as twos bit complement. */
-
- p_val = *cur_row;
-
- /* Add error. */
-
- pixsum = *cur_row_err_mark + p_val;
-
- /* Bounds check. */
-
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- /* Increment dest value. */
-
- *dest_row += chan_index[pixsum].value;
-
- /* Propogate errors. */
-
- *(cur_row_err_mark-1) += chan_index[pixsum].e1;
- *next_row_err_mark += chan_index[pixsum].e3;
-
- /* If column counters is odd, decrement source pointer. */
-
- if (j&1) cur_row--;
-
- /* Decrement dest and error pointers. */
-
- dest_row--;
- cur_row_err_mark--;
- next_row_err_mark--;
- }
-
- /* Switch error arrays. */
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- /* Reinitialize next row errors. */
-
- memset(next_row_error, 0, cols+2);
- }
-
- /* If Cr channel completed, set channel to Cb and Cb index and repeat. */
-
- if (channel == cr) {
- channel = cb;
- chan_index = cb_index;
- memset(cur_row_error, 0, cols+2);
-
- goto repeat;
- }
-
- /* Establish pointer to start of display frame. */
-
- dest_row = disp;
-
- /* Transform all display values to pixel values. */
-
- for (i=0; i<rows; i++) {
- for (j=0; j<cols; j++) {
- *dest_row = pixel[*dest_row];
- dest_row++;
- }
- }
-}
-
-
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h
deleted file mode 100644
index 3fa96c16e66..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-typedef struct {
- unsigned char value;
- int e1;
- int e3;
-} FS2DithVal;
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2fast.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2fast.cpp
deleted file mode 100644
index 949825b64bc..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2fast.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#include <stdlib.h>
-#include <string.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-/* Arrays containing error values for floyd-steinberg dithering. */
-
-static int deltay[256];
-static int deltau[256];
-static int deltav[256];
-static int deltay2[256];
-static int deltau2[256];
-static int deltav2[256];
-
-/* Definitions governing number of bits used for luminance, cr, and cb. */
-
-#define L_BITS 3
-#define CR_BITS 2
-#define CB_BITS 2
-
-/* Masks for proper quantization of lum, cr, and cb values. */
-
-#define L_MASK 0xe0
-#define CR_MASK 0xc0
-#define CB_MASK 0xc0
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitFS2FastDither --
- *
- * Initializes structures and arrays neeeded for fast implementation
- * of two error F-S dithering.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void InitFS2FastDither()
-{
- int i;
- int lum_num, cr_num, cb_num;
-
- for (i=0; i<256; i++) {
- lum_num = (i >> (8-L_BITS));
- cr_num = (i >> (8-CR_BITS));
- cb_num = (i >> (8-CB_BITS));
-
- /* These arrays contain the error values propogated for each pixel value
- for each channel.
- */
-
- deltay[i] = (i - ((int) lum_values[lum_num])) / 2;
- deltau[i] = (i-((int) cr_values[cr_num])) / 2;
- deltav[i] = (i-((int) cb_values[cb_num])) / 2;
- deltay2[i] = (i - ((int) lum_values[lum_num])) - deltay[i];
- deltau2[i] = (i - ((int) cr_values[cr_num])) - deltau[i];
- deltav2[i] = (i - ((int) cb_values[cb_num])) - deltav[i];
-
- }
-
-}
-
-/*
- *--------------------------------------------------------------
- *
- * DitherImage --
- *
- * Dithers an image using floyd-steinberg.
- * Assumptions made:
- * 1) The color space is allocated y:cr:cb = 8:4:4
- * 2) The spatial resolution of y:cr:cb is 4:1:1
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-FS2FastDitherImage (
- unsigned char *lum,
- unsigned char *cr,
- unsigned char *cb,
- unsigned char *out,
- int w, int h)
-{
- int i, j, idx, idx2;
- int y, u, v;
- int dy, du, dv;
- int code;
- static int *yerr1;
- static int *yerr2;
- static int *uerr1;
- static int *uerr2;
- static int *verr1;
- static int *verr2;
- int *ye1, *ue1, *ve1;
- int *ye2, *ue2, *ve2;
- unsigned char *o, *l, *r, *b;
- static int first = 1;
-
- /* If first time called, allocate error arrays. */
-
- if (first) {
- first = 0;
- yerr1 = (int *) malloc((w+5)*sizeof(int));
- yerr2 = (int *) malloc((w+5)*sizeof(int));
- uerr1 = (int *) malloc((w+5)*sizeof(int));
- uerr2 = (int *) malloc((w+5)*sizeof(int));
- verr1 = (int *) malloc((w+5)*sizeof(int));
- verr2 = (int *) malloc((w+5)*sizeof(int));
- }
-
- /*
- * Init error arrays and variables.
- */
- memset ((char *)yerr1, 0, (w+5)*sizeof(int));
- memset ((char *)yerr2, 0, (w+5)*sizeof(int));
- memset ((char *)uerr1, 0, (w+5)*sizeof(int));
- memset ((char *)uerr2, 0, (w+5)*sizeof(int));
- memset ((char *)verr1, 0, (w+5)*sizeof(int));
- memset ((char *)verr2, 0, (w+5)*sizeof(int));
- du = dv = dy = 0;
-
- for (j=0; j<h; j+=2) {
- ye1 = yerr1;
- ue1 = uerr1;
- ve1 = verr1;
- ye2 = yerr2;
- ue2 = uerr2;
- ve2 = verr2;
- idx = j*w;
- idx2 = idx/4;
- o = out+idx;
- l = lum+idx;
- r = cr+idx2;
- b = cb+idx2;
- /* Do the top row in forward order. */
- for (i=0; i<w; i+=2) {
- /* Do left side of this pair... */
- y = *l++ + dy + *ye1++;
- u = *r + du + *ue1++;
- v = *b + dv + *ve1++;
-
- if (y < 0) y = 0;
- else if (y > 255) y = 255;
- if (u < 0) u = 0;
- else if (u > 255) u = 255;
- if (v < 0) v = 0;
- else if (v > 255) v = 255;
-
- /*
- * Construct a code using:
- * high order 3 bits of y,
- * high order 2 bits of u,
- * high order 2 bits of v
- */
- code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS)))
- >> (8-(L_BITS+CR_BITS+CB_BITS)));
- *o++ = pixel[code];
- *ye2++ = deltay[y];
- *ue2++ = deltau[u];
- *ve2++ = deltav[v];
- dy = deltay2[y];
- du = deltau2[u];
- dv = deltav2[v];
-
- /* Do right side of this pair... */
- y = *l++ + dy + *ye1++;
- u = *r++ + du + *ue1++;
- v = *b++ + dv + *ve1++;
-
- if (y < 0) y = 0;
- else if (y > 255) y = 255;
- if (u < 0) u = 0;
- else if (u > 255) u = 255;
- if (v < 0) v = 0;
- else if (v > 255) v = 255;
-
- code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS)))
- >> (8-(L_BITS+CR_BITS+CB_BITS)));
- *o++ = pixel[code];
- *ye2++ = deltay[y];
- *ue2++ = deltau[u];
- *ve2++ = deltav[v];
- dy = deltay2[y];
- du = deltau2[u];
- dv = deltav2[v];
-
- }
-
- ye1 = yerr1+w-1;
- ue1 = uerr1+w-1;
- ve1 = verr1+w-1;
- ye2 = yerr2+w-1;
- ue2 = uerr2+w-1;
- ve2 = verr2+w-1;
- l += w-1;
- o += w-1;
- r--;
- b--;
- dy = du = dv = 0;
-
- /* Do bottom part of row, in right to left order. */
- for (i=w-1; i>0; i-=2) {
- /* Do right side of this pair... */
- y = *l-- + dy + *ye2--;
- u = *r + du + *ue2--;
- v = *b + dv + *ve2--;
-
- if (y < 0) y = 0;
- else if (y > 255) y = 255;
- if (u < 0) u = 0;
- else if (u > 255) u = 255;
- if (v < 0) v = 0;
- else if (v > 255) v = 255;
-
- /*
- * Construct a code using:
- * high order 3 bits of y,
- * high order 2 bits of u,
- * high order 2 bits of v
- */
- code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS)))
- >> (8-(L_BITS+CR_BITS+CB_BITS)));
- *o-- = pixel[code];
- *ye1-- = deltay[y];
- *ue1-- = deltau[u];
- *ve1-- = deltav[v];
- dy = deltay2[y];
- du = deltau2[u];
- dv = deltav2[v];
-
- /* Do left side of this pair... */
- y = *l-- + dy + *ye2--;
- u = *r-- + du + *ue2--;
- v = *b-- + dv + *ve2--;
-
- if (y < 0) y = 0;
- else if (y > 255) y = 255;
- if (u < 0) u = 0;
- else if (u > 255) u = 255;
- if (v < 0) v = 0;
- else if (v > 255) v = 255;
-
- code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS)))
- >> (8-(L_BITS+CR_BITS+CB_BITS)));
- *o-- = pixel[code];
- *ye1-- = deltay[y];
- *ue1-- = deltau[u];
- *ve1-- = deltav[v];
- dy = deltay2[y];
- du = deltau2[u];
- dv = deltav2[v];
-
- }
- }
-}
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp
deleted file mode 100644
index 0be89ba33e5..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code to do YCrCb -> colormap space. */
-
-#include <stdlib.h>
-#include <string.h>
-#include "fs4.h"
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-/* Structures containing precomputed error terms. */
-
-static FS4Dither lum_index[256];
-static FS4Dither cr_index[256];
-static FS4Dither cb_index[256];
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitFS4Dither --
- *
- * Initializes structures used for f-s dithering. Precomputes
- * error terms.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitFS4Dither()
-{
- int i;
-
- for (i=0; i<256; i++) {
- lum_index[i].value = (i * LUM_RANGE) / 256;
-
- lum_index[i].e1 = (7 * (i-lum_values[lum_index[i].value])) / 16;
- lum_index[i].e2 = (i-lum_values[lum_index[i].value])/16;
- lum_index[i].e3 = (5 * (i - lum_values[lum_index[i].value])) / 16;
- lum_index[i].e4 = (i-lum_values[lum_index[i].value]) - lum_index[i].e1 -
- lum_index[i].e2 - lum_index[i].e3;
-
- lum_index[i].value *= LUM_BASE;
-
- cr_index[i].value = (i * CR_RANGE) / 256;
-
- cr_index[i].e1 = (7 * (i-cr_values[cr_index[i].value])) / 16;
- cr_index[i].e2 = (i-cr_values[cr_index[i].value])/16;
- cr_index[i].e3 = (5 * (i - cr_values[cr_index[i].value])) / 16;
- cr_index[i].e4 = (i-cr_values[cr_index[i].value]) - cr_index[i].e1 -
- cr_index[i].e2 - cr_index[i].e3;
- cr_index[i].value *= CR_BASE;
-
- cb_index[i].value = (i * CB_RANGE) / 256;
-
- cb_index[i].e1 = (7 * (i-cb_values[cb_index[i].value])) / 16;
- cb_index[i].e2 = (i-cb_values[cb_index[i].value])/16;
- cb_index[i].e3 = (5 * (i - cb_values[cb_index[i].value])) / 16;
- cb_index[i].e4 = (i-cb_values[cb_index[i].value]) - cb_index[i].e1 -
- cb_index[i].e2 - cb_index[i].e3;
- cb_index[i].value *= CB_BASE;
-
- }
-
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * DitherImage --
- *
- * Converts lum, cr, cb image planes into fixed colormap
- * space. Uses Floyd-Steinberg dithering in serpentine
- * pattern with standard 4 errors propogated.
- *
- * Results:
- * The display plane is replaced by 8-bit colormap space
- * image.
- *
- * Side effects:
- * Hopefully, none.
- *
- *--------------------------------------------------------------
- */
-
-void
-FS4DitherImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *disp,
- int rows, int cols)
-{
- static char *cur_row_error, *next_row_error;
- static int first = 1;
- char *cur_row_err_mark, *next_row_err_mark;
- char *temp;
- int i, j, pixsum, c_cols;
- unsigned char *cur_row, *channel, *dest_row;
- FS4Dither *chan_index;
-
- if (first) {
- cur_row_error = (char *) malloc(cols+2);
- next_row_error = (char *) malloc(cols+2);
- first = 0;
- }
-
- memset(cur_row_error, 0, cols+2);
- memset(next_row_error, 0, cols+2);
-
- for(i=0; i<rows; i+=2) {
- cur_row = lum + (i*cols);
- dest_row = disp + (i*cols);
-
- cur_row_err_mark = cur_row_error + 1;
- next_row_err_mark = next_row_error + 1;
-
- for (j=0; j<cols; j++) {
-
- pixsum = *cur_row + *cur_row_err_mark;
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- *dest_row = lum_index[pixsum].value;
- *(cur_row_err_mark+1) += lum_index[pixsum].e1;
- *(next_row_err_mark+1) += lum_index[pixsum].e2;
- *next_row_err_mark += lum_index[pixsum].e3;
- *(next_row_err_mark-1) += lum_index[pixsum].e4;
-
- cur_row++;
- dest_row++;
- cur_row_err_mark++;
- next_row_err_mark++;
- }
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- memset(next_row_error, 0, cols+2);
-
- cur_row += cols-1;
- dest_row += cols-1;
- cur_row_err_mark = cur_row_error + cols;
- next_row_err_mark = next_row_error + cols;
-
- for (j=0; j<cols; j++) {
-
- pixsum = *cur_row + *cur_row_err_mark;
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- *dest_row = lum_index[pixsum].value;
- *(cur_row_err_mark-1) += lum_index[pixsum].e1;
- *(next_row_err_mark-1) += lum_index[pixsum].e2;
- *next_row_err_mark += lum_index[pixsum].e3;
- *(next_row_err_mark+1) += lum_index[pixsum].e4;
-
- cur_row--;
- dest_row--;
- cur_row_err_mark--;
- next_row_err_mark--;
- }
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- memset(next_row_error, 0, cols+2);
- }
-
- memset(cur_row_error, 0, cols+2);
-
- c_cols = cols >> 1;
-
- channel = cr;
- chan_index = cr_index;
-
- repeat:
-
- for (i=0; i < rows; i+=2) {
- cur_row = channel + ((i>>1)*c_cols);
- dest_row = disp + (i*cols);
-
- cur_row_err_mark = cur_row_error+1;
- next_row_err_mark = next_row_error+1;
-
- for (j=0; j<cols; j++) {
- int p_val;
-
- p_val = *cur_row;
-
- pixsum = *cur_row_err_mark + p_val;
-
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- *dest_row += chan_index[pixsum].value;
-
- *(cur_row_err_mark+1) += chan_index[pixsum].e1;
- *(next_row_err_mark+1) += chan_index[pixsum].e2;
- *next_row_err_mark += chan_index[pixsum].e3;
- *(next_row_err_mark-1) += chan_index[pixsum].e4;
-
-
- if (j&1) cur_row++;
- dest_row++;
- cur_row_err_mark++;
- next_row_err_mark++;
- }
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- memset(next_row_error, 0, cols+2);
-
- cur_row += c_cols-1;
- dest_row += cols-1;
- cur_row_err_mark = cur_row_error+cols;
- next_row_err_mark = next_row_error+cols;
-
- for (j=0; j<cols; j++) {
- int p_val;
-
- p_val = *cur_row;
-
- pixsum = *cur_row_err_mark + p_val;
-
- if (pixsum < 0) pixsum = 0;
- else if (pixsum > 255) pixsum = 255;
-
- *dest_row += chan_index[pixsum].value;
-
- *(cur_row_err_mark-1) += chan_index[pixsum].e1;
- *(next_row_err_mark-1) += chan_index[pixsum].e2;
- *next_row_err_mark += chan_index[pixsum].e3;
- *(next_row_err_mark+1) += chan_index[pixsum].e4;
-
- if (j&1) cur_row--;
- dest_row--;
- cur_row_err_mark--;
- next_row_err_mark--;
- }
-
- temp = cur_row_error;
- cur_row_error = next_row_error;
- next_row_error = temp;
-
- memset(next_row_error, 0, cols+2);
- }
-
- if (channel == cr) {
- channel = cb;
- chan_index = cb_index;
- memset(cur_row_error, 0, cols+2);
-
- goto repeat;
- }
-
- dest_row = disp;
-
-
- for (i=0; i<rows; i++) {
- for (j=0; j<cols; j++) {
- *dest_row = pixel[*dest_row];
- dest_row++;
- }
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h
deleted file mode 100644
index e63fcafa874..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-typedef struct {
- unsigned char value;
- int e1;
- int e2;
- int e3;
- int e4;
-} FS4Dither;
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.cpp
deleted file mode 100644
index b32855ec370..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#include "include/common.h"
-
-/* Declaration of global variable to hold dither info. */
-
-int ditherType;
-
-/* Global file pointer to incoming data. */
-FILE *input;
-
-/* End of File flag. */
-int EOF_flag = 0;
-
-/* Loop flag. */
-int loopFlag = 0;
-
-/* Shared memory flag. */
-int shmemFlag = 0;
-
-/* Quiet flag. */
-int quietFlag = 0;
-
-/* Display image on screen? */
-int noDisplayFlag = 0;
-
-/* real time flag */
-int realTimeFlag = 0;
-
-/* shared version of command line argument */
-int argc_share;
-char **argv_share;
-
-/* for command line display name */
-char displayName[64];
-
-/* command line program list name */
-char proglistName[PATH_SIZE] = "";
-
-/* shared data structure */
-SharedData * shared = NULL;
-
-/* Range values for lum, cr, cb. */
-int LUM_RANGE;
-int CR_RANGE;
-int CB_RANGE;
-
-/* Array that remaps color numbers to actual pixel values used by X server. */
-
-unsigned char pixel[256];
-
-/* Arrays holding quantized value ranged for lum, cr, and cb. */
-
-int *lum_values = NULL;
-int *cr_values = NULL;
-int *cb_values = NULL;
-
-/* Structures used by the X server. */
-
-Display *display;
-Colormap cmap;
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h
deleted file mode 100644
index b7faf0b2827..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-/* Declaration of global variable to hold dither info. */
-
-extern int ditherType;
-
-/* Global file pointer to incoming data. */
-extern FILE *input;
-
-/* End of File flag. */
-extern int EOF_flag;
-
-/* Loop flag. */
-extern int loopFlag;
-
-/* Shared memory flag. */
-extern int shmemFlag;
-
-/* Quiet flag. */
-extern int quietFlag;
-
-/* Display image on screen? */
-extern int noDisplayFlag;
-
-/* real time flag */
-extern int realTimeFlag;
-
-/* shared version of command line argument */
-extern int argc_share;
-extern char **argv_share;
-
-/* for command line display name */
-extern char displayName[];
-
-/* command line program list name */
-extern char proglistName[PATH_SIZE];
-
-/* shared data structure */
-extern SharedData * shared;
-
-/* Structures used by the X server. */
-
-extern Display *display;
-extern Colormap cmap;
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp
deleted file mode 100644
index 1e0e82c4ba3..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-
-/*
- *--------------------------------------------------------------
- *
- * GrayDitherImage --
- *
- * Dithers image into 128 gray scales. Simply maps luminance
- * value into 1 of 128 gray scale colors (divide by two, essentially).
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-GrayDitherImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
-
- int i, max = w*h/16;
-
- for (i=0; i<max; i++) {
- out[0] = pixel[lum[0]];
- out[1] = pixel[lum[1]];
- out[2] = pixel[lum[2]];
- out[3] = pixel[lum[3]];
- out[4] = pixel[lum[4]];
- out[5] = pixel[lum[5]];
- out[6] = pixel[lum[6]];
- out[7] = pixel[lum[7]];
- out[8] = pixel[lum[8]];
- out[9] = pixel[lum[9]];
- out[10] = pixel[lum[10]];
- out[11] = pixel[lum[11]];
- out[12] = pixel[lum[12]];
- out[13] = pixel[lum[13]];
- out[14] = pixel[lum[14]];
- out[15] = pixel[lum[15]];
- out += 16;
- lum += 16;
- }
-}
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybrid.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybrid.cpp
deleted file mode 100644
index d94efcf5f56..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybrid.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code to implement an ordered dither. */
-#include <string.h>
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-#define DITH_SIZE 16
-
-
-/* Structures used to implement hybrid ordered dither/floyd-steinberg
- dither algorithm.
-*/
-
-static unsigned char *l_darrays[DITH_SIZE];
-static unsigned char cr_fsarray[256][4];
-static unsigned char cb_fsarray[256][4];
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitHybridDither--
- *
- * Structures intialized for hybrid dithering. Ordered dither
- * patterns set for luminance channel, f-s errors precomputed
- * for chrominance channels.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitHybridDither()
-{
- int i, j, k, err_range, threshval;
- unsigned char *lmark;
-
- for (i=0; i<DITH_SIZE; i++) {
- lmark = l_darrays[i] = (unsigned char *) malloc(256);
-
- for (j=0; j<lum_values[0]; j++) {
- *lmark++ = 0;
- }
-
- for (j=0; j<(LUM_RANGE-1); j++) {
- err_range = lum_values[j+1] - lum_values[j];
- threshval = ((i * err_range) / DITH_SIZE)+lum_values[j];
-
- for (k=lum_values[j]; k<lum_values[j+1]; k++) {
- if (k > threshval) *lmark++ = ((j+1) * (CR_RANGE * CB_RANGE));
- else *lmark++ = (j * (CR_RANGE * CB_RANGE));
- }
- }
-
- for (j=lum_values[LUM_RANGE-1]; j<256; j++) {
- *lmark++ = (LUM_RANGE-1)*(CR_RANGE * CB_RANGE);
- }
-
- }
- {
- int cr1, cr2, cr3, cr4, err1, err2;
- int cb1, cb2, cb3, cb4, val, nval;
-
- for (i=0; i<256; i++) {
-
- val = i;
-
- cr1 = (val * CR_RANGE) / 256;
- err1 = (val - cr_values[cr1])/2;
- err2 = (val - cr_values[cr1]) - err1;
-
- nval = val+err1;
- if (nval > 255) nval = 255;
- else if (nval < 0) nval = 0;
- cr2 = (nval * CR_RANGE) / 256;
- err1 = (nval - cr_values[cr2])/2;
-
- nval = val+err2;
- if (nval > 255) nval = 255;
- else if (nval < 0) nval = 0;
- cr3 = (nval * CR_RANGE) / 256;
- err2 = (nval - cr_values[cr3])/2;
-
- nval = val+err1+err2;
- if (nval > 255) nval = 255;
- else if (nval < 0) nval = 0;
- cr4 = (nval * CR_RANGE) / 256;
-
- cr_fsarray[i][0] = cr1*CB_RANGE;
- cr_fsarray[i][1] = cr2*CB_RANGE;
- cr_fsarray[i][2] = cr3*CB_RANGE;
- cr_fsarray[i][3] = cr4*CB_RANGE;
- }
-
- for (i=0; i<256; i++) {
-
- val = i;
-
- cb1 = (val * CB_RANGE) / 256;
- err1 = (val - cb_values[cb1])/2;
- err2 = (val - cb_values[cb1]) - err1;
-
- nval = val+err1;
- if (nval > 255) nval = 255;
- else if (nval < 0) nval = 0;
- cb2 = (nval * CB_RANGE) / 256;
- err1 = (nval - cb_values[cb2])/2;
-
- nval = val+err2;
- if (nval > 255) nval = 255;
- else if (nval < 0) nval = 0;
- cb3 = (nval * CB_RANGE) / 256;
- err2 = (nval - cb_values[cb3])/2;
-
- nval = val+err1+err2;
- if (nval > 255) nval = 255;
- else if (nval < 0) nval = 0;
- cb4 = (nval * CB_RANGE) / 256;
-
- cb_fsarray[i][0] = cb1;
- cb_fsarray[i][1] = cb2;
- cb_fsarray[i][2] = cb3;
- cb_fsarray[i][3] = cb4;
- }
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * HybridDitherImage --
- *
- * Dithers an image using an ordered dither.
- * Assumptions made:
- * 1) The color space is allocated y:cr:cb = 8:4:4
- * 2) The spatial resolution of y:cr:cb is 4:1:1
- * The luminance channel is dithered based on the standard
- * ordered dither pattern for a 4x4 area. The Chrominance
- * channels are dithered based on precomputed f-s errors.
- * Two errors are propogated per pixel. Errors are NOT propogated
- * beyond a 2x2 pixel area.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-HybridDitherImage (unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int w, int h)
-{
- unsigned char *l, *r, *b, *o1, *o2;
- unsigned char *l2;
- int i, j;
-
- l = lum;
- l2 = lum+w;
- r = cr;
- b = cb;
- o1 = out;
- o2 = out+w;
-
- for (i=0; i<h; i+=4) {
-
- for (j=0; j<w; j+=4) {
-
- *o1++ = pixel[(l_darrays[0][*l++] | cr_fsarray[*r][0] | cb_fsarray[*b][0])];
- *o1++ = pixel[(l_darrays[8][*l++] | cr_fsarray[*r][1] | cb_fsarray[*b][1])];
- *o2++ = pixel[(l_darrays[12][*l2++] | cr_fsarray[*r][2] | cb_fsarray[*b][2])];
- *o2++ = pixel[(l_darrays[4][*l2++] | cr_fsarray[*r++][3] | cb_fsarray[*b++][3])];
-
- *o1++ = pixel[(l_darrays[2][*l++] | cr_fsarray[*r][0] | cb_fsarray[*b][0])];
- *o1++ = pixel[(l_darrays[10][*l++] | cr_fsarray[*r][1] | cb_fsarray[*b][1])];
- *o2++ = pixel[(l_darrays[14][*l2++] | cr_fsarray[*r][2] | cb_fsarray[*b][2])];
- *o2++ = pixel[(l_darrays[6][*l2++] | cr_fsarray[*r++][3] | cb_fsarray[*b++][3])];
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
-
- for (j=0; j<w; j+=4) {
-
- *o1++ = pixel[(l_darrays[3][*l++] | cr_fsarray[*r][1] | cb_fsarray[*b][1])];
- *o1++ = pixel[(l_darrays[11][*l++] | cr_fsarray[*r][0] | cb_fsarray[*b][0])];
- *o2++ = pixel[(l_darrays[15][*l2++] | cr_fsarray[*r][3] | cb_fsarray[*b][3])];
- *o2++ = pixel[(l_darrays[7][*l2++] | cr_fsarray[*r++][2] | cb_fsarray[*b++][2])];
-
- *o1++ = pixel[(l_darrays[1][*l++] | cr_fsarray[*r][1] | cb_fsarray[*b][1])];
- *o1++ = pixel[(l_darrays[9][*l++] | cr_fsarray[*r][0] | cb_fsarray[*b][0])];
- *o2++ = pixel[(l_darrays[13][*l2++] | cr_fsarray[*r][3] | cb_fsarray[*b][3])];
- *o2++ = pixel[(l_darrays[5][*l2++] | cr_fsarray[*r++][2] | cb_fsarray[*b++][2])];
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
- }
-}
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybriderr.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybriderr.cpp
deleted file mode 100644
index 6386b2f08de..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybriderr.cpp
+++ /dev/null
@@ -1,355 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code to implement an ordered dither in the
- luminance channel and F-S error diffusion on chrominance.
-*/
-
-#include <stdlib.h>
-#include <string.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-#define DITH_SIZE 16
-
-/* Structures used for hybrid dither with errors propogated. */
-
-static unsigned char *l_darrays[DITH_SIZE];
-static unsigned char *l_darrays0, *l_darrays1, *l_darrays2, *l_darrays3;
-static unsigned char *l_darrays4, *l_darrays5, *l_darrays6, *l_darrays7;
-static unsigned char *l_darrays8, *l_darrays9, *l_darrays10, *l_darrays11;
-static unsigned char *l_darrays12, *l_darrays13, *l_darrays14, *l_darrays15;
-static unsigned char cr_fsarray[256*256][4];
-static unsigned char cb_fsarray[256*256][4];
-static unsigned short c_fserr[256*256][2];
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitHybridErrorDither--
- *
- * Initializes structures used for hybrid dither algorithm
- * with errors propogated on Cr and Cb.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitHybridErrorDither()
-{
- int i, j, k, err_range, threshval;
- unsigned char *lmark;
-
-
- for (i=0; i<DITH_SIZE; i++) {
- lmark = l_darrays[i] = (unsigned char *) malloc(256);
-
- for (j=0; j<lum_values[0]; j++) {
- *lmark++ = 0;
- }
-
- for (j=0; j<(LUM_RANGE-1); j++) {
- err_range = lum_values[j+1] - lum_values[j];
- threshval = ((i * err_range) / DITH_SIZE)+lum_values[j];
-
- for (k=lum_values[j]; k<lum_values[j+1]; k++) {
- if (k > threshval) *lmark++ = ((j+1) * (CR_RANGE * CB_RANGE));
- else *lmark++ = (j * (CR_RANGE * CB_RANGE));
- }
- }
-
- for (j=lum_values[LUM_RANGE-1]; j <256; j++) {
- *lmark++ = (LUM_RANGE-1)*(CR_RANGE * CB_RANGE);
- }
- }
- l_darrays0 = l_darrays[0]; l_darrays8 = l_darrays[8];
- l_darrays1 = l_darrays[1]; l_darrays9 = l_darrays[9];
- l_darrays2 = l_darrays[2]; l_darrays10 = l_darrays[10];
- l_darrays3 = l_darrays[3]; l_darrays11 = l_darrays[11];
- l_darrays4 = l_darrays[4]; l_darrays12 = l_darrays[12];
- l_darrays5 = l_darrays[5]; l_darrays13 = l_darrays[13];
- l_darrays6 = l_darrays[6]; l_darrays14 = l_darrays[14];
- l_darrays7 = l_darrays[7]; l_darrays15 = l_darrays[15];
- {
- int cr1, cr2, cr3, cr4, err1, err2;
- int cb1, cb2, cb3, cb4, val, nval;
- int outerr1, outerr2, outerr3, outerr4;
- int inerr1, inerr2, inerr3, inerr4;
- unsigned short oe1, oe2, oe3, oe4;
-
- for (j=0; j<65536; j+= 256) {
-
- inerr1 = (((j & 0xc000) >> 14)*8) - 12;
- inerr2 = (((j & 0x3000) >> 12)*8) - 12;
- inerr3 = (((j & 0x0c00) >> 10)*8) - 12;
- inerr4 = (((j & 0x0300) >> 8) *8) - 12;
-
- for (i=0; i<256; i++) {
- val = i;
-
- nval = val+inerr1+inerr3;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cr1 = ((nval) * CR_RANGE) / 256;
- err1 = ((nval) - cr_values[cr1])/2;
- err2 = ((nval) - cr_values[cr1]) - err1;
-
- nval = val+err1+inerr2;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cr2 = ((nval) * CR_RANGE) / 256;
- err1 = ((nval) - cr_values[cr2])/2;
- outerr3 = ((nval) - cr_values[cr2])-err1;
-
- nval = val+err2+inerr4;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cr3 = ((nval) * CR_RANGE) / 256;
- err2 = ((nval) - cr_values[cr3])/2;
- outerr1 = ((nval) - cr_values[cr3]) - err2;
-
- nval = val+err1+err2;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cr4 = ((nval) * CR_RANGE) / 256;
- outerr2 = ((nval) - cr_values[cr4])/2;
- outerr4 = ((nval) - cr_values[cr4])-outerr2;
-
- cr_fsarray[i+j][0] = cr1*CB_RANGE;
- cr_fsarray[i+j][1] = cr2*CB_RANGE;
- cr_fsarray[i+j][2] = cr3*CB_RANGE;
- cr_fsarray[i+j][3] = cr4*CB_RANGE;
-
- if (outerr1 < -16) outerr1++;
- else if (outerr1 > 15) outerr1--;
- if (outerr2 < -16) outerr2++;
- else if (outerr2 > 15) outerr2--;
- if (outerr3 < -16) outerr3++;
- else if (outerr3 > 15) outerr3--;
- if (outerr4 < -16) outerr4++;
- else if (outerr4 > 15) outerr4--;
-
- oe1 = (outerr1 + 16) / 8;
- oe2 = (outerr2 + 16) / 8;
- oe3 = (outerr3 + 16) / 8;
- oe4 = (outerr4 + 16) / 8;
-
-/* This is a debugging check and should be removed if not needed. */
- if ((oe1 > 3) || (oe2 > 3) || (oe3 > 3) || (oe4 > 3))
- fprintf(stderr, "OE error!!!!\n");
-
-
- c_fserr[i+j][0] = ((oe1 << 14) | (oe2 << 12));
-
- c_fserr[i+j][1] = ((oe3 << 10) | (oe4 << 8));
- }
-
- for (i=0; i<256; i++) {
- val = i;
- nval = val+inerr1+inerr3;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cb1 = ((nval) * CB_RANGE) / 256;
- err1 = ((nval) - cb_values[cb1])/2;
- err2 = ((nval) - cb_values[cb1]) - err1;
-
- nval = val+err1+inerr2;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cb2 = ((nval) * CB_RANGE) / 256;
- err1 = ((nval) - cb_values[cb2])/2;
-
- nval = val+err2+inerr4;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cb3 = ((nval) * CB_RANGE) / 256;
- err2 = ((nval) - cb_values[cb3])/2;
-
- nval = val+err1+err2;
- if (nval < 0) nval = 0; else if (nval > 255) nval = 255;
- cb4 = ((nval) * CB_RANGE) / 256;
-
- cb_fsarray[i+j][0] = cb1;
- cb_fsarray[i+j][1] = cb2;
- cb_fsarray[i+j][2] = cb3;
- cb_fsarray[i+j][3] = cb4;
- }
- }
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * HybridErrorDitherImage --
- *
- * Dithers an image using a hybrid ordered/floyd-steinberg dither.
- * Assumptions made:
- * 1) The color space is allocated y:cr:cb = 8:4:4
- * 2) The spatial resolution of y:cr:cb is 4:1:1
- * This dither is almost exactly like the dither implemented in the
- * file odith.c (i.e. hybrid dithering) except a quantized amount of
- * error is propogated between 2x2 pixel areas in Cr and Cb.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-HybridErrorDitherImage (unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int w, int h)
-{
- unsigned char *l, *r, *b, *o1, *o2;
- unsigned char *l2;
- static int *cr_row_errs;
- static int *cb_row_errs;
- int *cr_r_err;
- int *cb_r_err;
- int cr_c_err;
- int cb_c_err;
- unsigned char *cr_fsptr;
- unsigned char *cb_fsptr;
- static int first = 1;
- int cr_code, cb_code;
-
- int i, j;
- int row_advance, row_advance2;
- int half_row_advance, half_row_advance2;
-
- /* If first time called, allocate error arrays. */
-
- if (first) {
- cr_row_errs = (int *) malloc((w+5)*sizeof(int));
- cb_row_errs = (int *) malloc((w+5)*sizeof(int));
- first = 0;
- }
-
- row_advance = (w << 1) - 1;
- row_advance2 = row_advance+2;
- half_row_advance = (w>>1)-1;
- half_row_advance2 = half_row_advance+2;
-
- l = lum;
- l2 = lum+w;
- r = cr;
- b = cb;
- o1 = out;
- o2 = out+w;
-
- memset( (char *) cr_row_errs, 0, (w+5)*sizeof(int));
- cr_r_err = cr_row_errs;
- cr_c_err = 0;
- memset( (char *) cb_row_errs, 0, (w+5)*sizeof(int));
- cb_r_err = cb_row_errs;
- cb_c_err = 0;
-
- for (i=0; i<h; i+=4) {
-
- for (j=w; j>0; j-=4) {
-
- cr_code = (*cr_r_err | cr_c_err | *r++);
- cb_code = (*cb_r_err | cb_c_err | *b++);
-
- cr_fsptr = cr_fsarray[cr_code];
- cb_fsptr = cb_fsarray[cb_code];
-
- *o1++ = pixel[(l_darrays0[*l++] | *cr_fsptr++ | *cb_fsptr++)];
- *o1++ = pixel[(l_darrays8[*l++] | *cr_fsptr++ | *cb_fsptr++)];
- *o2++ = pixel[(l_darrays12[*l2++] | *cr_fsptr++ | *cb_fsptr++)];
- *o2++ = pixel[(l_darrays4[*l2++] | *cr_fsptr++ | *cb_fsptr++)];
-
- cr_c_err = c_fserr[cr_code][1];
- cb_c_err = c_fserr[cb_code][1];
- *cr_r_err++ = c_fserr[cr_code][0];
- *cb_r_err++ = c_fserr[cb_code][0];
- cr_code = (*cr_r_err | cr_c_err | *r++);
- cb_code = (*cb_r_err | cb_c_err | *b++);
-
- cr_fsptr = cr_fsarray[cr_code];
- cb_fsptr = cb_fsarray[cb_code];
-
- *o1++ = pixel[(l_darrays2[*l++] | *cr_fsptr++ | *cb_fsptr++)];
- *o1++ = pixel[(l_darrays10[*l++] | *cr_fsptr++ | *cb_fsptr++)];
- *o2++ = pixel[(l_darrays14[*l2++] | *cr_fsptr++ | *cb_fsptr++)];
- *o2++ = pixel[(l_darrays6[*l2++] | *cr_fsptr++ | *cb_fsptr++)];
-
- cr_c_err = c_fserr[cr_code][1];
- cb_c_err = c_fserr[cb_code][1];
- *cr_r_err++ = c_fserr[cr_code][0];
- *cb_r_err++ = c_fserr[cb_code][0];
- }
-
- l += row_advance; l2 += row_advance;
- o1 += row_advance; o2 += row_advance;
- cr_c_err = 0;
- cb_c_err = 0;
- cr_r_err--; cb_r_err--;
- r += half_row_advance; b += half_row_advance;
-
- for (j=w; j>0; j-=4) {
-
- cr_code = (*cr_r_err | cr_c_err | *r--);
- cb_code = (*cb_r_err | cb_c_err | *b--);
- cr_fsptr = cr_fsarray[cr_code];
- cb_fsptr = cb_fsarray[cb_code];
-
- *o1-- = pixel[(l_darrays9[*l--] | *cr_fsptr++ | *cb_fsptr++)];
- *o1-- = pixel[(l_darrays1[*l--] | *cr_fsptr++ | *cb_fsptr++)];
- *o2-- = pixel[(l_darrays5[*l2--] | *cr_fsptr++ | *cb_fsptr++)];
- *o2-- = pixel[(l_darrays13[*l2--] | *cr_fsptr++ | *cb_fsptr++)];
-
- cr_c_err = c_fserr[cr_code][1];
- cb_c_err = c_fserr[cb_code][1];
- *cr_r_err-- = c_fserr[cr_code][0];
- *cb_r_err-- = c_fserr[cb_code][0];
- cr_code = (*cr_r_err | cr_c_err | *r--);
- cb_code = (*cb_r_err | cb_c_err | *b--);
- cr_fsptr = cr_fsarray[cr_code];
- cb_fsptr = cb_fsarray[cb_code];
-
- *o1-- = pixel[(l_darrays11[*l--] | *cr_fsptr++ | *cb_fsptr++)];
- *o1-- = pixel[(l_darrays3[*l--] | *cr_fsptr++ | *cb_fsptr++)];
- *o2-- = pixel[(l_darrays7[*l2--] | *cr_fsptr++ | *cb_fsptr++)];
- *o2-- = pixel[(l_darrays15[*l2--] | *cr_fsptr++ | *cb_fsptr++)];
-
- cr_c_err = c_fserr[cr_code][1];
- cb_c_err = c_fserr[cb_code][1];
- *cr_r_err-- = c_fserr[cr_code][0];
- *cb_r_err-- = c_fserr[cb_code][0];
-
- }
-
- l += row_advance2; l2 += row_advance2;
- o1 += row_advance2; o2 += row_advance2;
- cr_c_err = 0; cb_c_err = 0;
- cr_r_err++; cb_r_err++;
- r += half_row_advance2; b += half_row_advance2;
- }
-}
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp
deleted file mode 100644
index ed77e72a442..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-char infomessage[] = "\
-\n\
-\n\
- Distributed real-time MPEG video audio Player v2.0\n\
- \n\
- Distributed Systems Research Group\n\
- Department of Computer Science and Engineering\n\
- Oregon Graduate Institute of Science and Technology\n\
- October, 1995\n\
-\n\
-The player features common VCR functionalities like synchronized\n\
-video(MPEG) and audio(.au) play back, play speed set on the fly,\n\
-fast-forward, rewind, step forward, random Positioning, and more.\n\
-\n\
-The player is of server/client architecture. The server manages program\n\
-retrieval and distribution. The client decodes video frames, plays video\n\
-and audio streams, and provides a Motif style user interface.\n\
-\n\
-The MPEG decoder used by the client is originated from U.C.Berkeley\n\
-MPEG decoder 2.0, by Lawrence A. Rowe, Ketan Patel, and Brian Smith,\n\
-of Computer Science Division-EECS, Univ. of Calif. at Berkeley.\n\
-\n\
-The Motif user interface is based on an implementation by Daeron Meyer\n\
-of The Geometry Center, University of Minnesota.\n\
-\n\
-This software is covered by copyrights. It contains code contributed\n\
-by the author and several other parties. Please see the beginning of\n\
-source files and copyright file(s) in the root directory of the source\n\
-kit.\n\
-\n\
-Please forward your questions, comments and bug report to:\n\
-\n\
- scen@cse.ogi.edu\n\
-\n\
-";
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib
deleted file mode 100644
index e42c3b7ec75..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib
+++ /dev/null
@@ -1,78 +0,0 @@
-static char InfoMib[] = "\
-TotalWidgets: 4\n\
-Ref: 1\n\
-Widget: \"RootForm\"\n\
-Children: 2 3 4\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Root\"\n\
-Xmwidth: 562\n\
-Xmheight: 307\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 0\n\
-XmleftOffset: 0\n\
-XmrightOffset: 0\n\
-Private-\n\
-EndWidget.\n\
-Ref: 2\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Dismiss\"\n\
-Xmwidth: 62\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 270\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 506\n\
-XmrightOffset: 9\n\
-Private-\n\
-label: \"Dismiss\"\n\
-EndWidget.\n\
-Ref: 3\n\
-Widget: \"TextBig\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"TextBig\"\n\
-Xmwidth: 546\n\
-Xmheight: 256\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 8\n\
-XmbottomOffset: 43\n\
-XmleftOffset: 8\n\
-XmrightOffset: 8\n\
-Private-\n\
-EndWidget.\n\
-Ref: 4\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"OutFrame\"\n\
-Xmwidth: 561\n\
-Xmheight: 306\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 1\n\
-XmleftOffset: 1\n\
-XmrightOffset: 0\n\
-Private-\n\
-shadowtype: 1\n\
-EndWidget.\n\
-END.\n\
-";
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib
deleted file mode 100644
index d1f432214bb..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib
+++ /dev/null
@@ -1,229 +0,0 @@
-static char MainMib[] = "\
-TotalWidgets: 12\n\
-Ref: 1\n\
-Widget: \"RootForm\"\n\
-Children: 2 3 4 5 6 7 8 9 10 11 12\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Root\"\n\
-Xmwidth: 364\n\
-Xmheight: 216\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 0\n\
-XmleftOffset: 0\n\
-XmrightOffset: 0\n\
-Private-\n\
-EndWidget.\n\
-Ref: 2\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Info\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 200\n\
-XmrightOffset: 123\n\
-Private-\n\
-label: \"Info\"\n\
-EndWidget.\n\
-Ref: 3\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Loop\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 140\n\
-XmrightOffset: 196\n\
-Private-\n\
-label: \"Loop\"\n\
-EndWidget.\n\
-Ref: 4\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Step\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 74\n\
-XmrightOffset: 262\n\
-Private-\n\
-label: \"Step\"\n\
-EndWidget.\n\
-Ref: 5\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Exit\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 314\n\
-XmrightOffset: 9\n\
-Private-\n\
-label: \"Exit\"\n\
-EndWidget.\n\
-Ref: 6\n\
-Widget: \"TextBox\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"FrameText\"\n\
-Xmwidth: 65\n\
-Xmheight: 29\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 8\n\
-XmleftOffset: 245\n\
-XmrightOffset: 54\n\
-Private-\n\
-EndWidget.\n\
-Ref: 7\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Rewind\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 8\n\
-XmrightOffset: 328\n\
-Private-\n\
-label: \"Rew\"\n\
-EndWidget.\n\
-Ref: 8\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Play\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 107\n\
-XmrightOffset: 229\n\
-Private-\n\
-label: \"Play\"\n\
-EndWidget.\n\
-Ref: 9\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Stop\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 9\n\
-XmleftOffset: 41\n\
-XmrightOffset: 295\n\
-Private-\n\
-label: \"Stop\"\n\
-EndWidget.\n\
-Ref: 10\n\
-Widget: \"DrawingArea\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Monitor\"\n\
-Xmwidth: 336\n\
-Xmheight: 157\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 13\n\
-XmbottomOffset: 46\n\
-XmleftOffset: 13\n\
-XmrightOffset: 15\n\
-Private-\n\
-EndWidget.\n\
-Ref: 11\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"InFrame\"\n\
-Xmwidth: 347\n\
-Xmheight: 167\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 8\n\
-XmbottomOffset: 41\n\
-XmleftOffset: 8\n\
-XmrightOffset: 9\n\
-Private-\n\
-shadowtype: 0\n\
-EndWidget.\n\
-Ref: 12\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"OutFrame\"\n\
-Xmwidth: 362\n\
-Xmheight: 215\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 1\n\
-XmleftOffset: 1\n\
-XmrightOffset: 1\n\
-Private-\n\
-shadowtype: 1\n\
-EndWidget.\n\
-END.\n\
-";
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib
deleted file mode 100644
index 1005fba75e8..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib
+++ /dev/null
@@ -1,324 +0,0 @@
-static char MainMib[] = "\
-TotalWidgets: 17\n\
-Ref: 1\n\
-Widget: \"RootForm\"\n\
-Children: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Root\"\n\
-Xmwidth: 364\n\
-Xmheight: 306\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 0\n\
-XmleftOffset: 0\n\
-XmrightOffset: 0\n\
-Private-\n\
-EndWidget.\n\
-Ref: 2\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Exit\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 8\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Exit\"\n\
-EndWidget.\n\
-Ref: 3\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Info\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 53\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Info\"\n\
-EndWidget.\n\
-Ref: 4\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Para\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 98\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Para\"\n\
-EndWidget.\n\
-Ref: 5\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Prog\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 143\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Prog\"\n\
-EndWidget.\n\
-Ref: 6\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"File\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 188\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"File\"\n\
-EndWidget.\n\
-Ref: 7\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Step\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 9\n\
-Private-\n\
-label: \"Step\"\n\
-EndWidget.\n\
-Ref: 8\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Play\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 42\n\
-Private-\n\
-label: \"Play\"\n\
-EndWidget.\n\
-Ref: 9\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"FF\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 75\n\
-Private-\n\
-label: \"FF\"\n\
-EndWidget.\n\
-Ref: 10\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Stop\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 108\n\
-Private-\n\
-label: \"Stop\"\n\
-EndWidget.\n\
-Ref: 11\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Rewind\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 141\n\
-Private-\n\
-label: \"Rewind\"\n\
-EndWidget.\n\
-Ref: 12\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Normal\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 174\n\
-Private-\n\
-label: \"Norm\"\n\
-EndWidget.\n\
-Ref: 13\n\
-Widget: \"Toggle\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Loop\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 219\n\
-Private-\n\
-label: \"Loop\"\n\
-EndWidget.\n\
-Ref: 14\n\
-Widget: \"DrawingArea\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Monitor\"\n\
-Xmwidth: 336\n\
-Xmheight: 157\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 43\n\
-XmbottomOffset: 106\n\
-XmleftOffset: 13\n\
-XmrightOffset: 15\n\
-Private-\n\
-EndWidget.\n\
-Ref: 15\n\
-Widget: \"TextBox\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"TitleText\"\n\
-Xmwidth: 336\n\
-Xmheight: 29\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 0\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 8\n\
-XmbottomOffset: 106\n\
-XmleftOffset: 8\n\
-XmrightOffset: 9\n\
-Private-\n\
-EndWidget.\n\
-Ref: 16\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"InFrame\"\n\
-Xmwidth: 347\n\
-Xmheight: 197\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 38\n\
-XmbottomOffset: 101\n\
-XmleftOffset: 8\n\
-XmrightOffset: 9\n\
-Private-\n\
-shadowtype: 0\n\
-EndWidget.\n\
-Ref: 17\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"OutFrame\"\n\
-Xmwidth: 362\n\
-Xmheight: 275\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 1\n\
-XmleftOffset: 1\n\
-XmrightOffset: 1\n\
-Private-\n\
-shadowtype: 1\n\
-EndWidget.\n\
-END.\n\
-";
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm
deleted file mode 100644
index e20c1d81d6c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm
+++ /dev/null
@@ -1,9 +0,0 @@
-#define fb_width 20
-#define fb_height 20
-static unsigned char fb_bits[] = {
-0x00, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x8a, 0x02, 0x00,
-0x4d, 0x03, 0x80, 0xaa, 0x02, 0x40, 0x5d, 0x03, 0xa0, 0x28,
-0x02, 0x50, 0x1c, 0x03, 0x28, 0x00, 0x02, 0x1c, 0x00, 0x03,
-0x38, 0x00, 0x02, 0x70, 0x1c, 0x03, 0xe0, 0x38, 0x02, 0xc0,
-0x7d, 0x03, 0x80, 0xeb, 0x02, 0x00, 0xcf, 0x03, 0x00, 0x8e,
-0x03, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm
deleted file mode 100644
index 82b4c250417..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define ff_width 20
-#define ff_height 20
-static unsigned char ff_bits[] = {
- 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x14, 0x05, 0x00, 0x2c, 0x0b, 0x00,
- 0x54, 0x15, 0x00, 0xac, 0x2b, 0x00, 0x44, 0x51, 0x00, 0x8c, 0xa3, 0x00,
- 0x04, 0x40, 0x01, 0x0c, 0x80, 0x03, 0x04, 0xc0, 0x01, 0x8c, 0xe3, 0x00,
- 0xc4, 0x71, 0x00, 0xec, 0x3b, 0x00, 0x74, 0x1d, 0x00, 0x3c, 0x0f, 0x00,
- 0x1c, 0x07, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm
deleted file mode 100644
index 9847623ba6a..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define loop_width 20
-#define loop_height 20
-static unsigned char loop_bits[] = {
- 0x00, 0x10, 0x00, 0x00, 0xf0, 0x00, 0xa0, 0xa0, 0x03, 0x50, 0x51, 0x05,
- 0xe8, 0xa0, 0x06, 0x74, 0x50, 0x03, 0x38, 0xe0, 0x02, 0x34, 0x70, 0x05,
- 0x1a, 0x80, 0x06, 0x14, 0x00, 0x05, 0x1a, 0x80, 0x06, 0x14, 0x00, 0x05,
- 0x2a, 0x80, 0x06, 0x54, 0x40, 0x03, 0xa8, 0xaa, 0x02, 0x50, 0x55, 0x01,
- 0xb0, 0xea, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib
deleted file mode 100644
index b3cc211d9ad..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib
+++ /dev/null
@@ -1,305 +0,0 @@
-static char MainMib[] = "\
-TotalWidgets: 16\n\
-Ref: 1\n\
-Widget: \"RootForm\"\n\
-Children: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Root\"\n\
-Xmwidth: 364\n\
-Xmheight: 306\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 0\n\
-XmleftOffset: 0\n\
-XmrightOffset: 0\n\
-Private-\n\
-EndWidget.\n\
-Ref: 2\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Exit\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 8\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Exit\"\n\
-EndWidget.\n\
-Ref: 3\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Info\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 53\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Info\"\n\
-EndWidget.\n\
-Ref: 4\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Para\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 98\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Para\"\n\
-EndWidget.\n\
-Ref: 5\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Prog\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 0\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 143\n\
-XmrightOffset: 10\n\
-Private-\n\
-label: \"Prog\"\n\
-EndWidget.\n\
-Ref: 6\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Step\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 9\n\
-Private-\n\
-label: \"Step\"\n\
-EndWidget.\n\
-Ref: 7\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Play\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 42\n\
-Private-\n\
-label: \"Play\"\n\
-EndWidget.\n\
-Ref: 8\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"FF\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 75\n\
-Private-\n\
-label: \"FF\"\n\
-EndWidget.\n\
-Ref: 9\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Stop\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 108\n\
-Private-\n\
-label: \"Stop\"\n\
-EndWidget.\n\
-Ref: 10\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Rewind\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 141\n\
-Private-\n\
-label: \"Rewind\"\n\
-EndWidget.\n\
-Ref: 11\n\
-Widget: \"Button\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Normal\"\n\
-Xmwidth: 41\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 174\n\
-Private-\n\
-label: \"Norm\"\n\
-EndWidget.\n\
-Ref: 12\n\
-Widget: \"Toggle\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Loop\"\n\
-Xmwidth: 28\n\
-Xmheight: 28\n\
-XmtopAttachment: 0\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 0\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 179\n\
-XmbottomOffset: 69\n\
-XmleftOffset: 100\n\
-XmrightOffset: 219\n\
-Private-\n\
-label: \"Loop\"\n\
-EndWidget.\n\
-Ref: 13\n\
-Widget: \"DrawingArea\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"Monitor\"\n\
-Xmwidth: 336\n\
-Xmheight: 157\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 43\n\
-XmbottomOffset: 106\n\
-XmleftOffset: 13\n\
-XmrightOffset: 15\n\
-Private-\n\
-EndWidget.\n\
-Ref: 14\n\
-Widget: \"TextBox\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"TitleText\"\n\
-Xmwidth: 336\n\
-Xmheight: 29\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 0\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 8\n\
-XmbottomOffset: 106\n\
-XmleftOffset: 8\n\
-XmrightOffset: 9\n\
-Private-\n\
-EndWidget.\n\
-Ref: 15\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"InFrame\"\n\
-Xmwidth: 347\n\
-Xmheight: 197\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 38\n\
-XmbottomOffset: 101\n\
-XmleftOffset: 8\n\
-XmrightOffset: 9\n\
-Private-\n\
-shadowtype: 0\n\
-EndWidget.\n\
-Ref: 16\n\
-Widget: \"Frame\"\n\
-Children: X\n\
-Parent: 1\n\
-Public-\n\
-Name: \"OutFrame\"\n\
-Xmwidth: 362\n\
-Xmheight: 275\n\
-XmtopAttachment: 1\n\
-XmbottomAttachment: 1\n\
-XmleftAttachment: 1\n\
-XmrightAttachment: 1\n\
-XmtopOffset: 0\n\
-XmbottomOffset: 1\n\
-XmleftOffset: 1\n\
-XmrightOffset: 1\n\
-Private-\n\
-shadowtype: 1\n\
-EndWidget.\n\
-END.\n\
-";
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm
deleted file mode 100644
index 91955e5117c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define play_width 20
-#define play_height 20
-static unsigned char play_bits[] = {
- 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x01, 0x00, 0xc0, 0x02, 0x00,
- 0x40, 0x05, 0x00, 0xc0, 0x0a, 0x00, 0x40, 0x14, 0x00, 0xc0, 0x28, 0x00,
- 0x40, 0x50, 0x00, 0xc0, 0xe0, 0x00, 0x40, 0x70, 0x00, 0xc0, 0x38, 0x00,
- 0x40, 0x1c, 0x00, 0xc0, 0x0e, 0x00, 0x40, 0x07, 0x00, 0xc0, 0x03, 0x00,
- 0xc0, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm
deleted file mode 100644
index 402643dcd25..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define rewind_width 20
-#define rewind_height 20
-static unsigned char rewind_bits[] = {
- 0x00, 0x00, 0x00, 0x30, 0x80, 0x01, 0x28, 0x40, 0x01, 0x30, 0xa0, 0x01,
- 0x28, 0x50, 0x01, 0x30, 0xa8, 0x01, 0x28, 0x14, 0x01, 0x30, 0x8a, 0x01,
- 0x28, 0x05, 0x01, 0xb0, 0x83, 0x01, 0x28, 0x03, 0x01, 0x30, 0x8e, 0x01,
- 0x28, 0x1c, 0x01, 0x30, 0xb8, 0x01, 0x28, 0x70, 0x01, 0x30, 0xe0, 0x01,
- 0x28, 0xc0, 0x01, 0x38, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm
deleted file mode 100644
index 3ac996cbdb7..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define step_width 20
-#define step_height 20
-static unsigned char step_bits[] = {
- 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x14, 0x05, 0x00, 0x18, 0x0b, 0x00,
- 0x14, 0x15, 0x00, 0x18, 0x2b, 0x00, 0x14, 0x51, 0x00, 0x18, 0xa3, 0x00,
- 0x14, 0x41, 0x01, 0x18, 0x83, 0x03, 0x14, 0xc1, 0x01, 0x18, 0xe3, 0x00,
- 0x14, 0x71, 0x00, 0x18, 0x3b, 0x00, 0x14, 0x1d, 0x00, 0x18, 0x0f, 0x00,
- 0x14, 0x07, 0x00, 0x1c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm
deleted file mode 100644
index 490ee392761..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define stop_width 20
-#define stop_height 20
-static unsigned char stop_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x54, 0x55, 0x01,
- 0xac, 0xaa, 0x02, 0x14, 0x80, 0x01, 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01,
- 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01, 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01,
- 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01, 0x0c, 0x80, 0x02, 0xf4, 0xff, 0x01,
- 0xac, 0xaa, 0x02, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp
deleted file mode 100644
index b59adbd847b..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp
+++ /dev/null
@@ -1,1457 +0,0 @@
-/* $Id$ */
-/*
- * jrevdct.c
- *
- * Copyright (C) 1991, 1992, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains the basic inverse-DCT transformation subroutine.
- *
- * This implementation is based on an algorithm described in
- * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
- * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
- * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
- * The primary algorithm described there uses 11 multiplies and 29 adds.
- * We use their alternate method with 12 multiplies and 32 adds.
- * The advantage of this method is that no data path contains more than one
- * multiplication; this allows a very simple and accurate implementation in
- * scaled fixed-point arithmetic, with a minimal number of shifts.
- *
- * I've made lots of modifications to attempt to take advantage of the
- * sparse nature of the DCT matrices we're getting. Although the logic
- * is cumbersome, it's straightforward and the resulting code is much
- * faster.
- *
- * A better way to do this would be to pass in the DCT block as a sparse
- * matrix, perhaps with the difference cases encoded.
- */
-
-#include <string.h>
-#include "video.h"
-#include "proto.h"
-
-#define GLOBAL /* a function referenced thru EXTERNs */
-
-/* We assume that right shift corresponds to signed division by 2 with
- * rounding towards minus infinity. This is correct for typical "arithmetic
- * shift" instructions that shift in copies of the sign bit. But some
- * C compilers implement >> with an unsigned shift. For these machines you
- * must define RIGHT_SHIFT_IS_UNSIGNED.
- * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
- * It is only applied with constant shift counts. SHIFT_TEMPS must be
- * included in the variables of any routine using RIGHT_SHIFT.
- */
-
-#ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define SHIFT_TEMPS INT32 shift_temp;
-#define RIGHT_SHIFT(x,shft) \
- ((shift_temp = (x)) < 0 ? \
- (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
- (shift_temp >> (shft)))
-#else
-#define SHIFT_TEMPS
-#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
-#endif
-
-/*
- * This routine is specialized to the case DCTSIZE = 8.
- */
-
-#if DCTSIZE != 8
- Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
-#endif
-
-
-/*
- * A 2-D IDCT can be done by 1-D IDCT on each row followed by 1-D IDCT
- * on each column. Direct algorithms are also available, but they are
- * much more complex and seem not to be any faster when reduced to code.
- *
- * The poop on this scaling stuff is as follows:
- *
- * Each 1-D IDCT step produces outputs which are a factor of sqrt(N)
- * larger than the true IDCT outputs. The final outputs are therefore
- * a factor of N larger than desired; since N=8 this can be cured by
- * a simple right shift at the end of the algorithm. The advantage of
- * this arrangement is that we save two multiplications per 1-D IDCT,
- * because the y0 and y4 inputs need not be divided by sqrt(N).
- *
- * We have to do addition and subtraction of the integer inputs, which
- * is no problem, and multiplication by fractional constants, which is
- * a problem to do in integer arithmetic. We multiply all the constants
- * by CONST_SCALE and convert them to integer constants (thus retaining
- * CONST_BITS bits of precision in the constants). After doing a
- * multiplication we have to divide the product by CONST_SCALE, with proper
- * rounding, to produce the correct output. This division can be done
- * cheaply as a right shift of CONST_BITS bits. We postpone shifting
- * as long as possible so that partial sums can be added together with
- * full fractional precision.
- *
- * The outputs of the first pass are scaled up by PASS1_BITS bits so that
- * they are represented to better-than-integral precision. These outputs
- * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word
- * with the recommended scaling. (To scale up 12-bit sample data further, an
- * intermediate INT32 array would be needed.)
- *
- * To avoid overflow of the 32-bit intermediate results in pass 2, we must
- * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis
- * shows that the values given below are the most effective.
- */
-
-#ifdef EIGHT_BIT_SAMPLES
-#define PASS1_BITS 2
-#else
-#define PASS1_BITS 1 /* lose a little precision to avoid overflow */
-#endif
-
-#define ONE ((INT32) 1)
-
-#define CONST_SCALE (ONE << CONST_BITS)
-
-/* Convert a positive real constant to an integer scaled by CONST_SCALE.
- * IMPORTANT: if your compiler doesn't do this arithmetic at compile time,
- * you will pay a significant penalty in run time. In that case, figure
- * the correct integer constant values and insert them by hand.
- */
-
-#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5))
-
-/* Descale and correctly round an INT32 value that's scaled by N bits.
- * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
- * the fudge factor is correct for either sign of X.
- */
-
-#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
-
-/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
- * For 8-bit samples with the recommended scaling, all the variable
- * and constant values involved are no more than 16 bits wide, so a
- * 16x16->32 bit multiply can be used instead of a full 32x32 multiply;
- * this provides a useful speedup on many machines.
- * There is no way to specify a 16x16->32 multiply in portable C, but
- * some C compilers will do the right thing if you provide the correct
- * combination of casts.
- * NB: for 12-bit samples, a full 32-bit multiplication will be needed.
- */
-
-#ifdef EIGHT_BIT_SAMPLES
-#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
-#define MULTIPLY(var,const) (((INT16) (var)) * ((INT16) (const)))
-#endif
-#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
-#define MULTIPLY(var,const) (((INT16) (var)) * ((INT32) (const)))
-#endif
-#endif
-
-#ifndef MULTIPLY /* default definition */
-#define MULTIPLY(var,const) ((var) * (const))
-#endif
-
-/* Precomputed idct value arrays. */
-
-static DCTELEM PreIDCT[64][64];
-
-void j_rev_dct (DCTBLOCK data);
-
-/* Pre compute singleton coefficient IDCT values. */
-void
-init_pre_idct() {
- int i;
-
- for (i=0; i<64; i++) {
- memset((char *) PreIDCT[i], 0, 64*sizeof(DCTELEM));
- PreIDCT[i][i] = 2048;
- j_rev_dct(PreIDCT[i]);
- }
-}
-
-#ifndef ORIG_DCT
-
-
-/*
- * Perform the inverse DCT on one block of coefficients.
- */
-
-void
-j_rev_dct_sparse (DCTBLOCK data, int pos)
-{
- register DCTELEM *dataptr;
- short int val;
- DCTELEM *ndataptr;
- int scale, coeff, rr;
- register int *dp;
- register int v;
-
- /* If DC Coefficient. */
-
- if (pos == 0) {
- dp = (int *)data;
- v = *data;
- /* Compute 32 bit value to assign. This speeds things up a bit */
- if (v < 0) val = (v-3)>>3;
- else val = (v+4)>>3;
- v = val | (val << 16);
- dp[0] = v; dp[1] = v; dp[2] = v; dp[3] = v;
- dp[4] = v; dp[5] = v; dp[6] = v; dp[7] = v;
- dp[8] = v; dp[9] = v; dp[10] = v; dp[11] = v;
- dp[12] = v; dp[13] = v; dp[14] = v; dp[15] = v;
- dp[16] = v; dp[17] = v; dp[18] = v; dp[19] = v;
- dp[20] = v; dp[21] = v; dp[22] = v; dp[23] = v;
- dp[24] = v; dp[25] = v; dp[26] = v; dp[27] = v;
- dp[28] = v; dp[29] = v; dp[30] = v; dp[31] = v;
- return;
- }
-
- /* Some other coefficient. */
- dataptr = (DCTELEM *)data;
- coeff = dataptr[pos];
- ndataptr = PreIDCT[pos];
-
- for (rr=0; rr<4; rr++) {
- dataptr[0] = (ndataptr[0] * coeff) >> (CONST_BITS-2);
- dataptr[1] = (ndataptr[1] * coeff) >> (CONST_BITS-2);
- dataptr[2] = (ndataptr[2] * coeff) >> (CONST_BITS-2);
- dataptr[3] = (ndataptr[3] * coeff) >> (CONST_BITS-2);
- dataptr[4] = (ndataptr[4] * coeff) >> (CONST_BITS-2);
- dataptr[5] = (ndataptr[5] * coeff) >> (CONST_BITS-2);
- dataptr[6] = (ndataptr[6] * coeff) >> (CONST_BITS-2);
- dataptr[7] = (ndataptr[7] * coeff) >> (CONST_BITS-2);
- dataptr[8] = (ndataptr[8] * coeff) >> (CONST_BITS-2);
- dataptr[9] = (ndataptr[9] * coeff) >> (CONST_BITS-2);
- dataptr[10] = (ndataptr[10] * coeff) >> (CONST_BITS-2);
- dataptr[11] = (ndataptr[11] * coeff) >> (CONST_BITS-2);
- dataptr[12] = (ndataptr[12] * coeff) >> (CONST_BITS-2);
- dataptr[13] = (ndataptr[13] * coeff) >> (CONST_BITS-2);
- dataptr[14] = (ndataptr[14] * coeff) >> (CONST_BITS-2);
- dataptr[15] = (ndataptr[15] * coeff) >> (CONST_BITS-2);
- dataptr += 16;
- ndataptr += 16;
- }
- return;
-}
-
-
-void
-j_rev_dct (DCTBLOCK data)
-{
- INT32 tmp0, tmp1, tmp2, tmp3;
- INT32 tmp10, tmp11, tmp12, tmp13;
- INT32 z1, z2, z3, z4, z5;
- INT32 d0, d1, d2, d3, d4, d5, d6, d7;
- register DCTELEM *dataptr;
- int rowctr;
- SHIFT_TEMPS
-
- /* Pass 1: process rows. */
- /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
- /* furthermore, we scale the results by 2**PASS1_BITS. */
-
- dataptr = data;
-
- for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) {
- /* Due to quantization, we will usually find that many of the input
- * coefficients are zero, especially the AC terms. We can exploit this
- * by short-circuiting the IDCT calculation for any row in which all
- * the AC terms are zero. In that case each output is equal to the
- * DC coefficient (with scale factor as needed).
- * With typical images and quantization tables, half or more of the
- * row DCT calculations can be simplified this way.
- */
-
- register int *idataptr = (int*)dataptr;
- d0 = dataptr[0];
- d1 = dataptr[1];
- if ((d1 == 0) && (idataptr[1] | idataptr[2] | idataptr[3]) == 0) {
- /* AC terms all zero */
- if (d0) {
- /* Compute a 32 bit value to assign. */
- DCTELEM dcval = (DCTELEM) (d0 << PASS1_BITS);
- register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000);
-
- idataptr[0] = v;
- idataptr[1] = v;
- idataptr[2] = v;
- idataptr[3] = v;
- }
-
- dataptr += DCTSIZE; /* advance pointer to next row */
- continue;
- }
- d2 = dataptr[2];
- d3 = dataptr[3];
- d4 = dataptr[4];
- d5 = dataptr[5];
- d6 = dataptr[6];
- d7 = dataptr[7];
-
- /* Even part: reverse the even part of the forward DCT. */
- /* The rotator is sqrt(2)*c(-6). */
- if (d6) {
- if (d4) {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 != 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp0 = (d0 + d4) << CONST_BITS;
- tmp1 = (d0 - d4) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 != 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp0 = d4 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp2 - tmp0;
- tmp12 = -(tmp0 + tmp2);
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 != 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, - FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp0 = (d0 + d4) << CONST_BITS;
- tmp1 = (d0 - d4) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
- } else {
- /* d0 == 0, d2 == 0, d4 != 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, -FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp0 = d4 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp2 - tmp0;
- tmp12 = -(tmp0 + tmp2);
- }
- }
- } else {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 == 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp0 = d0 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 == 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp10 = tmp3;
- tmp13 = -tmp3;
- tmp11 = tmp2;
- tmp12 = -tmp2;
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 == 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, - FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp0 = d0 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
- } else {
- /* d0 == 0, d2 == 0, d4 == 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, - FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp10 = tmp3;
- tmp13 = -tmp3;
- tmp11 = tmp2;
- tmp12 = -tmp2;
- }
- }
- }
- } else {
- if (d4) {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 != 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp0 = (d0 + d4) << CONST_BITS;
- tmp1 = (d0 - d4) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 != 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp0 = d4 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp2 - tmp0;
- tmp12 = -(tmp0 + tmp2);
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 != 0, d6 == 0 */
- tmp10 = tmp13 = (d0 + d4) << CONST_BITS;
- tmp11 = tmp12 = (d0 - d4) << CONST_BITS;
- } else {
- /* d0 == 0, d2 == 0, d4 != 0, d6 == 0 */
- tmp10 = tmp13 = d4 << CONST_BITS;
- tmp11 = tmp12 = -tmp10;
- }
- }
- } else {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 == 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp0 = d0 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 == 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp10 = tmp3;
- tmp13 = -tmp3;
- tmp11 = tmp2;
- tmp12 = -tmp2;
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 == 0, d6 == 0 */
- tmp10 = tmp13 = tmp11 = tmp12 = d0 << CONST_BITS;
- } else {
- /* d0 == 0, d2 == 0, d4 == 0, d6 == 0 */
- tmp10 = tmp13 = tmp11 = tmp12 = 0;
- }
- }
- }
- }
-
-
- /* Odd part per figure 8; the matrix is unitary and hence its
- * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
- */
-
- if (d7) {
- if (d5) {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 != 0, d7 != 0 */
- z1 = d7 + d1;
- z2 = d5 + d3;
- z3 = d7 + d3;
- z4 = d5 + d1;
- z5 = MULTIPLY(z3 + z4, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(z1, - FIX(0.899976223));
- z2 = MULTIPLY(z2, - FIX(2.562915447));
- z3 = MULTIPLY(z3, - FIX(1.961570560));
- z4 = MULTIPLY(z4, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 != 0, d5 != 0, d7 != 0 */
- z1 = d7;
- z2 = d5 + d3;
- z3 = d7 + d3;
- z5 = MULTIPLY(z3 + d5, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- z1 = MULTIPLY(d7, - FIX(0.899976223));
- z2 = MULTIPLY(z2, - FIX(2.562915447));
- z3 = MULTIPLY(z3, - FIX(1.961570560));
- z4 = MULTIPLY(d5, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 = z1 + z4;
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 != 0, d7 != 0 */
- z1 = d7 + d1;
- z2 = d5;
- z3 = d7;
- z4 = d5 + d1;
- z5 = MULTIPLY(z3 + z4, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(z1, - FIX(0.899976223));
- z2 = MULTIPLY(d5, - FIX(2.562915447));
- z3 = MULTIPLY(d7, - FIX(1.961570560));
- z4 = MULTIPLY(z4, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 = z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 == 0, d5 != 0, d7 != 0 */
- tmp0 = MULTIPLY(d7, - FIX(0.601344887));
- z1 = MULTIPLY(d7, - FIX(0.899976223));
- z3 = MULTIPLY(d7, - FIX(1.961570560));
- tmp1 = MULTIPLY(d5, - FIX(0.509795578));
- z2 = MULTIPLY(d5, - FIX(2.562915447));
- z4 = MULTIPLY(d5, - FIX(0.390180644));
- z5 = MULTIPLY(d5 + d7, FIX(1.175875602));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z3;
- tmp1 += z4;
- tmp2 = z2 + z3;
- tmp3 = z1 + z4;
- }
- }
- } else {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 == 0, d7 != 0 */
- z1 = d7 + d1;
- z3 = d7 + d3;
- z5 = MULTIPLY(z3 + d1, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(z1, - FIX(0.899976223));
- z2 = MULTIPLY(d3, - FIX(2.562915447));
- z3 = MULTIPLY(z3, - FIX(1.961570560));
- z4 = MULTIPLY(d1, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 = z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 != 0, d5 == 0, d7 != 0 */
- z3 = d7 + d3;
-
- tmp0 = MULTIPLY(d7, - FIX(0.601344887));
- z1 = MULTIPLY(d7, - FIX(0.899976223));
- tmp2 = MULTIPLY(d3, FIX(0.509795579));
- z2 = MULTIPLY(d3, - FIX(2.562915447));
- z5 = MULTIPLY(z3, FIX(1.175875602));
- z3 = MULTIPLY(z3, - FIX(0.785694958));
-
- tmp0 += z3;
- tmp1 = z2 + z5;
- tmp2 += z3;
- tmp3 = z1 + z5;
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 == 0, d7 != 0 */
- z1 = d7 + d1;
- z5 = MULTIPLY(z1, FIX(1.175875602));
-
- z1 = MULTIPLY(z1, FIX(0.275899379));
- z3 = MULTIPLY(d7, - FIX(1.961570560));
- tmp0 = MULTIPLY(d7, - FIX(1.662939224));
- z4 = MULTIPLY(d1, - FIX(0.390180644));
- tmp3 = MULTIPLY(d1, FIX(1.111140466));
-
- tmp0 += z1;
- tmp1 = z4 + z5;
- tmp2 = z3 + z5;
- tmp3 += z1;
- } else {
- /* d1 == 0, d3 == 0, d5 == 0, d7 != 0 */
- tmp0 = MULTIPLY(d7, - FIX(1.387039845));
- tmp1 = MULTIPLY(d7, FIX(1.175875602));
- tmp2 = MULTIPLY(d7, - FIX(0.785694958));
- tmp3 = MULTIPLY(d7, FIX(0.275899379));
- }
- }
- }
- } else {
- if (d5) {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 != 0, d7 == 0 */
- z2 = d5 + d3;
- z4 = d5 + d1;
- z5 = MULTIPLY(d3 + z4, FIX(1.175875602));
-
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(d1, - FIX(0.899976223));
- z2 = MULTIPLY(z2, - FIX(2.562915447));
- z3 = MULTIPLY(d3, - FIX(1.961570560));
- z4 = MULTIPLY(z4, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 = z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 != 0, d5 != 0, d7 == 0 */
- z2 = d5 + d3;
-
- z5 = MULTIPLY(z2, FIX(1.175875602));
- tmp1 = MULTIPLY(d5, FIX(1.662939225));
- z4 = MULTIPLY(d5, - FIX(0.390180644));
- z2 = MULTIPLY(z2, - FIX(1.387039845));
- tmp2 = MULTIPLY(d3, FIX(1.111140466));
- z3 = MULTIPLY(d3, - FIX(1.961570560));
-
- tmp0 = z3 + z5;
- tmp1 += z2;
- tmp2 += z2;
- tmp3 = z4 + z5;
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 != 0, d7 == 0 */
- z4 = d5 + d1;
-
- z5 = MULTIPLY(z4, FIX(1.175875602));
- z1 = MULTIPLY(d1, - FIX(0.899976223));
- tmp3 = MULTIPLY(d1, FIX(0.601344887));
- tmp1 = MULTIPLY(d5, - FIX(0.509795578));
- z2 = MULTIPLY(d5, - FIX(2.562915447));
- z4 = MULTIPLY(z4, FIX(0.785694958));
-
- tmp0 = z1 + z5;
- tmp1 += z4;
- tmp2 = z2 + z5;
- tmp3 += z4;
- } else {
- /* d1 == 0, d3 == 0, d5 != 0, d7 == 0 */
- tmp0 = MULTIPLY(d5, FIX(1.175875602));
- tmp1 = MULTIPLY(d5, FIX(0.275899380));
- tmp2 = MULTIPLY(d5, - FIX(1.387039845));
- tmp3 = MULTIPLY(d5, FIX(0.785694958));
- }
- }
- } else {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 == 0, d7 == 0 */
- z5 = d1 + d3;
- tmp3 = MULTIPLY(d1, FIX(0.211164243));
- tmp2 = MULTIPLY(d3, - FIX(1.451774981));
- z1 = MULTIPLY(d1, FIX(1.061594337));
- z2 = MULTIPLY(d3, - FIX(2.172734803));
- z4 = MULTIPLY(z5, FIX(0.785694958));
- z5 = MULTIPLY(z5, FIX(1.175875602));
-
- tmp0 = z1 - z4;
- tmp1 = z2 + z4;
- tmp2 += z5;
- tmp3 += z5;
- } else {
- /* d1 == 0, d3 != 0, d5 == 0, d7 == 0 */
- tmp0 = MULTIPLY(d3, - FIX(0.785694958));
- tmp1 = MULTIPLY(d3, - FIX(1.387039845));
- tmp2 = MULTIPLY(d3, - FIX(0.275899379));
- tmp3 = MULTIPLY(d3, FIX(1.175875602));
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 == 0, d7 == 0 */
- tmp0 = MULTIPLY(d1, FIX(0.275899379));
- tmp1 = MULTIPLY(d1, FIX(0.785694958));
- tmp2 = MULTIPLY(d1, FIX(1.175875602));
- tmp3 = MULTIPLY(d1, FIX(1.387039845));
- } else {
- /* d1 == 0, d3 == 0, d5 == 0, d7 == 0 */
- tmp0 = tmp1 = tmp2 = tmp3 = 0;
- }
- }
- }
- }
-
- /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-
- dataptr[0] = (DCTELEM) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
- dataptr[7] = (DCTELEM) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
- dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
- dataptr[6] = (DCTELEM) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
- dataptr[2] = (DCTELEM) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
- dataptr[5] = (DCTELEM) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
- dataptr[3] = (DCTELEM) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
- dataptr[4] = (DCTELEM) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
-
- dataptr += DCTSIZE; /* advance pointer to next row */
- }
-
- /* Pass 2: process columns. */
- /* Note that we must descale the results by a factor of 8 == 2**3, */
- /* and also undo the PASS1_BITS scaling. */
-
- dataptr = data;
- for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) {
- /* Columns of zeroes can be exploited in the same way as we did with rows.
- * However, the row calculation has created many nonzero AC terms, so the
- * simplification applies less often (typically 5% to 10% of the time).
- * On machines with very fast multiplication, it's possible that the
- * test takes more time than it's worth. In that case this section
- * may be commented out.
- */
-
- d0 = dataptr[DCTSIZE*0];
- d1 = dataptr[DCTSIZE*1];
- d2 = dataptr[DCTSIZE*2];
- d3 = dataptr[DCTSIZE*3];
- d4 = dataptr[DCTSIZE*4];
- d5 = dataptr[DCTSIZE*5];
- d6 = dataptr[DCTSIZE*6];
- d7 = dataptr[DCTSIZE*7];
-
- /* Even part: reverse the even part of the forward DCT. */
- /* The rotator is sqrt(2)*c(-6). */
- if (d6) {
- if (d4) {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 != 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp0 = (d0 + d4) << CONST_BITS;
- tmp1 = (d0 - d4) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 != 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp0 = d4 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp2 - tmp0;
- tmp12 = -(tmp0 + tmp2);
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 != 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, - FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp0 = (d0 + d4) << CONST_BITS;
- tmp1 = (d0 - d4) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
- } else {
- /* d0 == 0, d2 == 0, d4 != 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, -FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp0 = d4 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp2 - tmp0;
- tmp12 = -(tmp0 + tmp2);
- }
- }
- } else {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 == 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp0 = d0 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 == 0, d6 != 0 */
- z1 = MULTIPLY(d2 + d6, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865));
-
- tmp10 = tmp3;
- tmp13 = -tmp3;
- tmp11 = tmp2;
- tmp12 = -tmp2;
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 == 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, - FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp0 = d0 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
- } else {
- /* d0 == 0, d2 == 0, d4 == 0, d6 != 0 */
- tmp2 = MULTIPLY(d6, - FIX(1.306562965));
- tmp3 = MULTIPLY(d6, FIX(0.541196100));
-
- tmp10 = tmp3;
- tmp13 = -tmp3;
- tmp11 = tmp2;
- tmp12 = -tmp2;
- }
- }
- }
- } else {
- if (d4) {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 != 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp0 = (d0 + d4) << CONST_BITS;
- tmp1 = (d0 - d4) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 != 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp0 = d4 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp2 - tmp0;
- tmp12 = -(tmp0 + tmp2);
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 != 0, d6 == 0 */
- tmp10 = tmp13 = (d0 + d4) << CONST_BITS;
- tmp11 = tmp12 = (d0 - d4) << CONST_BITS;
- } else {
- /* d0 == 0, d2 == 0, d4 != 0, d6 == 0 */
- tmp10 = tmp13 = d4 << CONST_BITS;
- tmp11 = tmp12 = -tmp10;
- }
- }
- } else {
- if (d2) {
- if (d0) {
- /* d0 != 0, d2 != 0, d4 == 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp0 = d0 << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp0 + tmp2;
- tmp12 = tmp0 - tmp2;
- } else {
- /* d0 == 0, d2 != 0, d4 == 0, d6 == 0 */
- tmp2 = MULTIPLY(d2, FIX(0.541196100));
- tmp3 = MULTIPLY(d2, FIX(1.306562965));
-
- tmp10 = tmp3;
- tmp13 = -tmp3;
- tmp11 = tmp2;
- tmp12 = -tmp2;
- }
- } else {
- if (d0) {
- /* d0 != 0, d2 == 0, d4 == 0, d6 == 0 */
- tmp10 = tmp13 = tmp11 = tmp12 = d0 << CONST_BITS;
- } else {
- /* d0 == 0, d2 == 0, d4 == 0, d6 == 0 */
- tmp10 = tmp13 = tmp11 = tmp12 = 0;
- }
- }
- }
- }
-
- /* Odd part per figure 8; the matrix is unitary and hence its
- * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
- */
- if (d7) {
- if (d5) {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 != 0, d7 != 0 */
- z1 = d7 + d1;
- z2 = d5 + d3;
- z3 = d7 + d3;
- z4 = d5 + d1;
- z5 = MULTIPLY(z3 + z4, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(z1, - FIX(0.899976223));
- z2 = MULTIPLY(z2, - FIX(2.562915447));
- z3 = MULTIPLY(z3, - FIX(1.961570560));
- z4 = MULTIPLY(z4, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 != 0, d5 != 0, d7 != 0 */
- z1 = d7;
- z2 = d5 + d3;
- z3 = d7 + d3;
- z5 = MULTIPLY(z3 + d5, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- z1 = MULTIPLY(d7, - FIX(0.899976223));
- z2 = MULTIPLY(z2, - FIX(2.562915447));
- z3 = MULTIPLY(z3, - FIX(1.961570560));
- z4 = MULTIPLY(d5, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 = z1 + z4;
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 != 0, d7 != 0 */
- z1 = d7 + d1;
- z2 = d5;
- z3 = d7;
- z4 = d5 + d1;
- z5 = MULTIPLY(z3 + z4, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(z1, - FIX(0.899976223));
- z2 = MULTIPLY(d5, - FIX(2.562915447));
- z3 = MULTIPLY(d7, - FIX(1.961570560));
- z4 = MULTIPLY(z4, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 = z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 == 0, d5 != 0, d7 != 0 */
- tmp0 = MULTIPLY(d7, - FIX(0.601344887));
- z1 = MULTIPLY(d7, - FIX(0.899976223));
- z3 = MULTIPLY(d7, - FIX(1.961570560));
- tmp1 = MULTIPLY(d5, - FIX(0.509795578));
- z2 = MULTIPLY(d5, - FIX(2.562915447));
- z4 = MULTIPLY(d5, - FIX(0.390180644));
- z5 = MULTIPLY(d5 + d7, FIX(1.175875602));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z3;
- tmp1 += z4;
- tmp2 = z2 + z3;
- tmp3 = z1 + z4;
- }
- }
- } else {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 == 0, d7 != 0 */
- z1 = d7 + d1;
- z3 = d7 + d3;
- z5 = MULTIPLY(z3 + d1, FIX(1.175875602));
-
- tmp0 = MULTIPLY(d7, FIX(0.298631336));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(z1, - FIX(0.899976223));
- z2 = MULTIPLY(d3, - FIX(2.562915447));
- z3 = MULTIPLY(z3, - FIX(1.961570560));
- z4 = MULTIPLY(d1, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 = z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 != 0, d5 == 0, d7 != 0 */
- z3 = d7 + d3;
-
- tmp0 = MULTIPLY(d7, - FIX(0.601344887));
- z1 = MULTIPLY(d7, - FIX(0.899976223));
- tmp2 = MULTIPLY(d3, FIX(0.509795579));
- z2 = MULTIPLY(d3, - FIX(2.562915447));
- z5 = MULTIPLY(z3, FIX(1.175875602));
- z3 = MULTIPLY(z3, - FIX(0.785694958));
-
- tmp0 += z3;
- tmp1 = z2 + z5;
- tmp2 += z3;
- tmp3 = z1 + z5;
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 == 0, d7 != 0 */
- z1 = d7 + d1;
- z5 = MULTIPLY(z1, FIX(1.175875602));
-
- z1 = MULTIPLY(z1, FIX(0.275899379));
- z3 = MULTIPLY(d7, - FIX(1.961570560));
- tmp0 = MULTIPLY(d7, - FIX(1.662939224));
- z4 = MULTIPLY(d1, - FIX(0.390180644));
- tmp3 = MULTIPLY(d1, FIX(1.111140466));
-
- tmp0 += z1;
- tmp1 = z4 + z5;
- tmp2 = z3 + z5;
- tmp3 += z1;
- } else {
- /* d1 == 0, d3 == 0, d5 == 0, d7 != 0 */
- tmp0 = MULTIPLY(d7, - FIX(1.387039845));
- tmp1 = MULTIPLY(d7, FIX(1.175875602));
- tmp2 = MULTIPLY(d7, - FIX(0.785694958));
- tmp3 = MULTIPLY(d7, FIX(0.275899379));
- }
- }
- }
- } else {
- if (d5) {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 != 0, d7 == 0 */
- z2 = d5 + d3;
- z4 = d5 + d1;
- z5 = MULTIPLY(d3 + z4, FIX(1.175875602));
-
- tmp1 = MULTIPLY(d5, FIX(2.053119869));
- tmp2 = MULTIPLY(d3, FIX(3.072711026));
- tmp3 = MULTIPLY(d1, FIX(1.501321110));
- z1 = MULTIPLY(d1, - FIX(0.899976223));
- z2 = MULTIPLY(z2, - FIX(2.562915447));
- z3 = MULTIPLY(d3, - FIX(1.961570560));
- z4 = MULTIPLY(z4, - FIX(0.390180644));
-
- z3 += z5;
- z4 += z5;
-
- tmp0 = z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
- } else {
- /* d1 == 0, d3 != 0, d5 != 0, d7 == 0 */
- z2 = d5 + d3;
-
- z5 = MULTIPLY(z2, FIX(1.175875602));
- tmp1 = MULTIPLY(d5, FIX(1.662939225));
- z4 = MULTIPLY(d5, - FIX(0.390180644));
- z2 = MULTIPLY(z2, - FIX(1.387039845));
- tmp2 = MULTIPLY(d3, FIX(1.111140466));
- z3 = MULTIPLY(d3, - FIX(1.961570560));
-
- tmp0 = z3 + z5;
- tmp1 += z2;
- tmp2 += z2;
- tmp3 = z4 + z5;
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 != 0, d7 == 0 */
- z4 = d5 + d1;
-
- z5 = MULTIPLY(z4, FIX(1.175875602));
- z1 = MULTIPLY(d1, - FIX(0.899976223));
- tmp3 = MULTIPLY(d1, FIX(0.601344887));
- tmp1 = MULTIPLY(d5, - FIX(0.509795578));
- z2 = MULTIPLY(d5, - FIX(2.562915447));
- z4 = MULTIPLY(z4, FIX(0.785694958));
-
- tmp0 = z1 + z5;
- tmp1 += z4;
- tmp2 = z2 + z5;
- tmp3 += z4;
- } else {
- /* d1 == 0, d3 == 0, d5 != 0, d7 == 0 */
- tmp0 = MULTIPLY(d5, FIX(1.175875602));
- tmp1 = MULTIPLY(d5, FIX(0.275899380));
- tmp2 = MULTIPLY(d5, - FIX(1.387039845));
- tmp3 = MULTIPLY(d5, FIX(0.785694958));
- }
- }
- } else {
- if (d3) {
- if (d1) {
- /* d1 != 0, d3 != 0, d5 == 0, d7 == 0 */
- z5 = d1 + d3;
- tmp3 = MULTIPLY(d1, FIX(0.211164243));
- tmp2 = MULTIPLY(d3, - FIX(1.451774981));
- z1 = MULTIPLY(d1, FIX(1.061594337));
- z2 = MULTIPLY(d3, - FIX(2.172734803));
- z4 = MULTIPLY(z5, FIX(0.785694958));
- z5 = MULTIPLY(z5, FIX(1.175875602));
-
- tmp0 = z1 - z4;
- tmp1 = z2 + z4;
- tmp2 += z5;
- tmp3 += z5;
- } else {
- /* d1 == 0, d3 != 0, d5 == 0, d7 == 0 */
- tmp0 = MULTIPLY(d3, - FIX(0.785694958));
- tmp1 = MULTIPLY(d3, - FIX(1.387039845));
- tmp2 = MULTIPLY(d3, - FIX(0.275899379));
- tmp3 = MULTIPLY(d3, FIX(1.175875602));
- }
- } else {
- if (d1) {
- /* d1 != 0, d3 == 0, d5 == 0, d7 == 0 */
- tmp0 = MULTIPLY(d1, FIX(0.275899379));
- tmp1 = MULTIPLY(d1, FIX(0.785694958));
- tmp2 = MULTIPLY(d1, FIX(1.175875602));
- tmp3 = MULTIPLY(d1, FIX(1.387039845));
- } else {
- /* d1 == 0, d3 == 0, d5 == 0, d7 == 0 */
- tmp0 = tmp1 = tmp2 = tmp3 = 0;
- }
- }
- }
- }
-
- /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-
- dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp3,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp10 - tmp3,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp11 + tmp2,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(tmp11 - tmp2,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp12 + tmp1,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12 - tmp1,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp13 + tmp0,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp13 - tmp0,
- CONST_BITS+PASS1_BITS+3);
-
- dataptr++; /* advance pointer to next column */
- }
-}
-
-#else
-
-
-void
-j_rev_dct_sparse (DCTBLOCK data, int pos)
-{
- j_rev_dct(data);
-}
-
-void
-j_rev_dct (DCTBLOCK data)
-{
- INT32 tmp0, tmp1, tmp2, tmp3;
- INT32 tmp10, tmp11, tmp12, tmp13;
- INT32 z1, z2, z3, z4, z5;
- register DCTELEM *dataptr;
- int rowctr;
- SHIFT_TEMPS
-
- /* Pass 1: process rows. */
- /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
- /* furthermore, we scale the results by 2**PASS1_BITS. */
-
- dataptr = data;
- for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) {
- /* Due to quantization, we will usually find that many of the input
- * coefficients are zero, especially the AC terms. We can exploit this
- * by short-circuiting the IDCT calculation for any row in which all
- * the AC terms are zero. In that case each output is equal to the
- * DC coefficient (with scale factor as needed).
- * With typical images and quantization tables, half or more of the
- * row DCT calculations can be simplified this way.
- */
-
- if ((dataptr[1] | dataptr[2] | dataptr[3] | dataptr[4] |
- dataptr[5] | dataptr[6] | dataptr[7]) == 0) {
- /* AC terms all zero */
- DCTELEM dcval = (DCTELEM) (dataptr[0] << PASS1_BITS);
-
- dataptr[0] = dcval;
- dataptr[1] = dcval;
- dataptr[2] = dcval;
- dataptr[3] = dcval;
- dataptr[4] = dcval;
- dataptr[5] = dcval;
- dataptr[6] = dcval;
- dataptr[7] = dcval;
-
- dataptr += DCTSIZE; /* advance pointer to next row */
- continue;
- }
-
- /* Even part: reverse the even part of the forward DCT. */
- /* The rotator is sqrt(2)*c(-6). */
-
- z2 = (INT32) dataptr[2];
- z3 = (INT32) dataptr[6];
-
- z1 = MULTIPLY(z2 + z3, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(z3, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(z2, FIX(0.765366865));
-
- tmp0 = ((INT32) dataptr[0] + (INT32) dataptr[4]) << CONST_BITS;
- tmp1 = ((INT32) dataptr[0] - (INT32) dataptr[4]) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
-
- /* Odd part per figure 8; the matrix is unitary and hence its
- * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
- */
-
- tmp0 = (INT32) dataptr[7];
- tmp1 = (INT32) dataptr[5];
- tmp2 = (INT32) dataptr[3];
- tmp3 = (INT32) dataptr[1];
-
- z1 = tmp0 + tmp3;
- z2 = tmp1 + tmp2;
- z3 = tmp0 + tmp2;
- z4 = tmp1 + tmp3;
- z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); /* sqrt(2) * c3 */
-
- tmp0 = MULTIPLY(tmp0, FIX(0.298631336)); /* sqrt(2) * (-c1+c3+c5-c7) */
- tmp1 = MULTIPLY(tmp1, FIX(2.053119869)); /* sqrt(2) * ( c1+c3-c5+c7) */
- tmp2 = MULTIPLY(tmp2, FIX(3.072711026)); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp3 = MULTIPLY(tmp3, FIX(1.501321110)); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY(z1, - FIX(0.899976223)); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY(z2, - FIX(2.562915447)); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY(z3, - FIX(1.961570560)); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY(z4, - FIX(0.390180644)); /* sqrt(2) * (c5-c3) */
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
-
- /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-
- dataptr[0] = (DCTELEM) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS);
- dataptr[7] = (DCTELEM) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS);
- dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS);
- dataptr[6] = (DCTELEM) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS);
- dataptr[2] = (DCTELEM) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS);
- dataptr[5] = (DCTELEM) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS);
- dataptr[3] = (DCTELEM) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS);
- dataptr[4] = (DCTELEM) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS);
-
- dataptr += DCTSIZE; /* advance pointer to next row */
- }
-
- /* Pass 2: process columns. */
- /* Note that we must descale the results by a factor of 8 == 2**3, */
- /* and also undo the PASS1_BITS scaling. */
-
- dataptr = data;
- for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) {
- /* Columns of zeroes can be exploited in the same way as we did with rows.
- * However, the row calculation has created many nonzero AC terms, so the
- * simplification applies less often (typically 5% to 10% of the time).
- * On machines with very fast multiplication, it's possible that the
- * test takes more time than it's worth. In that case this section
- * may be commented out.
- */
-
-#ifndef NO_ZERO_COLUMN_TEST
- if ((dataptr[DCTSIZE*1] | dataptr[DCTSIZE*2] | dataptr[DCTSIZE*3] |
- dataptr[DCTSIZE*4] | dataptr[DCTSIZE*5] | dataptr[DCTSIZE*6] |
- dataptr[DCTSIZE*7]) == 0) {
- /* AC terms all zero */
- DCTELEM dcval = (DCTELEM) DESCALE((INT32) dataptr[0], PASS1_BITS+3);
-
- dataptr[DCTSIZE*0] = dcval;
- dataptr[DCTSIZE*1] = dcval;
- dataptr[DCTSIZE*2] = dcval;
- dataptr[DCTSIZE*3] = dcval;
- dataptr[DCTSIZE*4] = dcval;
- dataptr[DCTSIZE*5] = dcval;
- dataptr[DCTSIZE*6] = dcval;
- dataptr[DCTSIZE*7] = dcval;
-
- dataptr++; /* advance pointer to next column */
- continue;
- }
-#endif
-
- /* Even part: reverse the even part of the forward DCT. */
- /* The rotator is sqrt(2)*c(-6). */
-
- z2 = (INT32) dataptr[DCTSIZE*2];
- z3 = (INT32) dataptr[DCTSIZE*6];
-
- z1 = MULTIPLY(z2 + z3, FIX(0.541196100));
- tmp2 = z1 + MULTIPLY(z3, - FIX(1.847759065));
- tmp3 = z1 + MULTIPLY(z2, FIX(0.765366865));
-
- tmp0 = ((INT32) dataptr[DCTSIZE*0] + (INT32) dataptr[DCTSIZE*4]) << CONST_BITS;
- tmp1 = ((INT32) dataptr[DCTSIZE*0] - (INT32) dataptr[DCTSIZE*4]) << CONST_BITS;
-
- tmp10 = tmp0 + tmp3;
- tmp13 = tmp0 - tmp3;
- tmp11 = tmp1 + tmp2;
- tmp12 = tmp1 - tmp2;
-
- /* Odd part per figure 8; the matrix is unitary and hence its
- * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.
- */
-
- tmp0 = (INT32) dataptr[DCTSIZE*7];
- tmp1 = (INT32) dataptr[DCTSIZE*5];
- tmp2 = (INT32) dataptr[DCTSIZE*3];
- tmp3 = (INT32) dataptr[DCTSIZE*1];
-
- z1 = tmp0 + tmp3;
- z2 = tmp1 + tmp2;
- z3 = tmp0 + tmp2;
- z4 = tmp1 + tmp3;
- z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); /* sqrt(2) * c3 */
-
- tmp0 = MULTIPLY(tmp0, FIX(0.298631336)); /* sqrt(2) * (-c1+c3+c5-c7) */
- tmp1 = MULTIPLY(tmp1, FIX(2.053119869)); /* sqrt(2) * ( c1+c3-c5+c7) */
- tmp2 = MULTIPLY(tmp2, FIX(3.072711026)); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp3 = MULTIPLY(tmp3, FIX(1.501321110)); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY(z1, - FIX(0.899976223)); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY(z2, - FIX(2.562915447)); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY(z3, - FIX(1.961570560)); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY(z4, - FIX(0.390180644)); /* sqrt(2) * (c5-c3) */
-
- z3 += z5;
- z4 += z5;
-
- tmp0 += z1 + z3;
- tmp1 += z2 + z4;
- tmp2 += z2 + z3;
- tmp3 += z1 + z4;
-
- /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
-
- dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp3,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp10 - tmp3,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp11 + tmp2,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(tmp11 - tmp2,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp12 + tmp1,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12 - tmp1,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp13 + tmp0,
- CONST_BITS+PASS1_BITS+3);
- dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp13 - tmp0,
- CONST_BITS+PASS1_BITS+3);
-
- dataptr++; /* advance pointer to next column */
- }
-}
-
-
-#endif
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp
deleted file mode 100644
index 997a14c21e7..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp
+++ /dev/null
@@ -1,512 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code to implement an ordered dither. */
-
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-#define DITH_SIZE 16
-
-
-/* Structures used to implement macroblock ordered
- dither algorithm.
-*/
-
-static unsigned char ***ditherPtr[DITH_SIZE];
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitMBOrderedDither--
- *
- * Structures intialized for ordered dithering.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitMBOrderedDither()
-{
- unsigned char ****pos_2_cb;
- unsigned char ***cb_2_cr;
- unsigned char **cr_2_l;
- int cb_val, cb_rval, cr_val, cr_rval, l_val, l_rval;
- int i, j, pos;
- int err_range, threshval;
-
- pos_2_cb = (unsigned char ****) malloc (DITH_SIZE*sizeof(unsigned char ***));
- cb_2_cr = (unsigned char ***) malloc(CB_RANGE*sizeof(unsigned char **));
- cr_2_l = (unsigned char **) malloc(CR_RANGE*sizeof(unsigned char *));
-
- for (pos=0; pos<DITH_SIZE; pos++) {
-
- pos_2_cb[pos] = (unsigned char ***) malloc(256*(sizeof(unsigned char **)));
-
- for (j=0; j<CB_RANGE; j++) {
- cb_2_cr[j] = (unsigned char **) malloc(256*(sizeof(unsigned char *)));
- }
-
- for (cb_val=0; cb_val<cb_values[0]; cb_val++) {
- (pos_2_cb[pos])[cb_val] = cb_2_cr[0];
- }
-
- for (cb_rval=0; cb_rval<(CB_RANGE-1); cb_rval++) {
- err_range = cb_values[cb_rval+1] - cb_values[cb_rval];
- threshval = ((pos*err_range)/DITH_SIZE)+cb_values[cb_rval];
-
- for (cb_val=cb_values[cb_rval]; cb_val<cb_values[cb_rval+1]; cb_val++) {
- if (cb_val>threshval) (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval+1];
- else (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval];
- }
- }
-
- for (cb_val=cb_values[CB_RANGE-1]; cb_val<256; cb_val++) {
- (pos_2_cb[pos])[cb_val] = cb_2_cr[CB_RANGE-1];
- }
-
- for (cb_rval=0; cb_rval<CB_RANGE; cb_rval++) {
-
- for (j=0; j<CR_RANGE; j++) {
- cr_2_l[j] = (unsigned char *) malloc(256*(sizeof(unsigned char)));
- }
-
- for (cr_val=0; cr_val < cr_values[0]; cr_val++) {
- (cb_2_cr[cb_rval])[cr_val] = cr_2_l[0];
- }
-
- for (cr_rval=0; cr_rval<(CR_RANGE-1); cr_rval++) {
- err_range = cr_values[cr_rval+1] - cr_values[cr_rval];
- threshval = ((pos*err_range)/DITH_SIZE)+cr_values[cr_rval];
-
- for (cr_val=cr_values[cr_rval]; cr_val<cr_values[cr_rval+1]; cr_val++) {
- if (cr_val>threshval) (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval+1];
- else (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval];
- }
- }
-
- for (cr_val=cr_values[CR_RANGE-1]; cr_val<256; cr_val++) {
- (cb_2_cr[cb_rval])[cr_val] = cr_2_l[CR_RANGE-1];
- }
-
- for (cr_rval=0; cr_rval<CR_RANGE; cr_rval++) {
-
- for (l_val = 0; l_val < lum_values[0]; l_val++) {
- (cr_2_l[cr_rval])[l_val] = pixel[cb_rval+(cr_rval*CB_RANGE)+
- (0*CR_RANGE*CB_RANGE)];
- }
-
- for (l_rval=0; l_rval<(LUM_RANGE-1); l_rval++) {
- err_range = lum_values[l_rval+1] - lum_values[l_rval];
- threshval = ((pos*err_range) /DITH_SIZE) + lum_values[l_rval];
-
- for (l_val = lum_values[l_rval]; l_val < lum_values[l_rval+1]; l_val++) {
- if (l_val>threshval) (cr_2_l[cr_rval])[l_val] =
- pixel[cb_rval+(cr_rval*CB_RANGE)+((l_rval+1)*CR_RANGE*CB_RANGE)];
- else (cr_2_l[cr_rval])[l_val] =
- pixel[cb_rval+(cr_rval*CB_RANGE)+(l_rval*CR_RANGE*CB_RANGE)];
- }
- }
-
- for (l_val = lum_values[LUM_RANGE-1]; l_val < 256; l_val++) {
- (cr_2_l[cr_rval])[l_val] =
- pixel[cb_rval+(cr_rval*CB_RANGE)+((LUM_RANGE-1)*CR_RANGE*CB_RANGE)];
- }
- }
- }
- }
-
- for (i=0; i<DITH_SIZE; i++) {
- ditherPtr[i] = pos_2_cb[i];
- }
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * MBOrderedDitherImage --
- *
- * Dithers an image using an ordered dither at macroblock level.
- * Assumptions made:
- * 1) The color space is allocated y:cr:cb = 8:4:4
- * 2) The spatial resolution of y:cr:cb is 4:1:1
- * The channels are dithered based on the standard
- * ordered dither pattern for a 4x4 area.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-MBOrderedDitherImage (unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- unsigned char *l, *r, *b, *o1, *o2;
- unsigned char *l2;
- unsigned char L, R, B;
- int i, j, mbaddr, mbwidth;
- unsigned char ***dp0 = ditherPtr[0];
- unsigned char ***dp2 = ditherPtr[2];
- unsigned char ***dp4 = ditherPtr[4];
- unsigned char ***dp6 = ditherPtr[6];
- unsigned char ***dp8 = ditherPtr[8];
- unsigned char ***dp10 = ditherPtr[10];
- unsigned char ***dp12 = ditherPtr[12];
- unsigned char ***dp14 = ditherPtr[14];
- unsigned char ***dp1 = ditherPtr[1];
- unsigned char ***dp3 = ditherPtr[3];
- unsigned char ***dp5 = ditherPtr[5];
- unsigned char ***dp7 = ditherPtr[7];
- unsigned char ***dp9 = ditherPtr[9];
- unsigned char ***dp11 = ditherPtr[11];
- unsigned char ***dp13 = ditherPtr[13];
- unsigned char ***dp15 = ditherPtr[15];
-
- l = lum;
- l2 = lum + w;
- r = cr;
- b = cb;
- o1 = out;
- o2 = out+w;
- mbwidth = w / 16;
-
- for (i=0; i<h; i+=4) {
-
- mbaddr = (i / 16) * mbwidth ;
-
- for (j=0; j<w; j+=8) {
-
- if (ditherFlags[mbaddr+(j/16)]) {
- R = r[0]; B = b[0];
-
- L = l[0];
- o1[0] = ((dp0[B])[R])[L];
- L = l[1];
- o1[1] = ((dp8[B])[R])[L];
- L = l2[0];
- o2[0] = ((dp12[B])[R])[L];
- L = l2[1];
- o2[1] = ((dp4[B])[R])[L];
-
- R = r[1]; B = b[1];
-
- L = l[2];
- o1[2] = ((dp2[B])[R])[L];
- L = l[3];
- o1[3] = ((dp10[B])[R])[L];
- L = l2[2];
- o2[2] = ((dp14[B])[R])[L];
- L = l2[3];
- o2[3] = ((dp6[B])[R])[L];
-
- R = r[2]; B = b[2];
-
- L = l[4];
- o1[4] = ((dp0[B])[R])[L];
- L = l[5];
- o1[5] = ((dp8[B])[R])[L];
- L = l2[4];
- o2[4] = ((dp12[B])[R])[L];
- L = l2[5];
- o2[5] = ((dp4[B])[R])[L];
-
- R = r[3]; B = b[3];
-
- L = l[6];
- o1[6] = ((dp2[B])[R])[L];
- L = l[7];
- o1[7] = ((dp10[B])[R])[L];
- L = l2[6];
- o2[6] = ((dp14[B])[R])[L];
- L = l2[7];
- o2[7] = ((dp6[B])[R])[L];
- }
-
- l += 8;
- l2 += 8;
- r += 4;
- b += 4;
- o1 += 8;
- o2 += 8;
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
-
- for (j=0; j<w; j+=8) {
-
- if (ditherFlags[mbaddr+(j/16)]) {
-
- R = r[0]; B = b[0];
-
- L = l[0];
- o1[0] = ((dp3[B])[R])[L];
- L = l[1];
- o1[1] = ((dp11[B])[R])[L];
- L = l2[0];
- o2[0] = ((dp15[B])[R])[L];
- L = l2[1];
- o2[1] = ((dp7[B])[R])[L];
-
- R = r[1]; B = b[1];
-
- L = l[2];
- o1[2] = ((dp1[B])[R])[L];
- L = l[3];
- o1[3] = ((dp9[B])[R])[L];
- L = l2[2];
- o2[2] = ((dp13[B])[R])[L];
- L = l2[3];
- o2[3] = ((dp5[B])[R])[L];
-
- R = r[2]; B = b[2];
-
- L = l[4];
- o1[4] = ((dp3[B])[R])[L];
- L = l[5];
- o1[5] = ((dp11[B])[R])[L];
- L = l2[4];
- o2[4] = ((dp15[B])[R])[L];
- L = l2[5];
- o2[5] = ((dp7[B])[R])[L];
-
- R = r[3]; B = b[3];
-
- L = l[6];
- o1[6] = ((dp1[B])[R])[L];
- L = l[7];
- o1[7] = ((dp9[B])[R])[L];
- L = l2[6];
- o2[6] = ((dp13[B])[R])[L];
- L = l2[7];
- o2[7] = ((dp5[B])[R])[L];
- }
-
- l += 8;
- l2 += 8;
- r += 4;
- b += 4;
- o1 += 8;
- o2 += 8;
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
- }
-}
-
-void
-MBOrderedDitherDisplayCopy(VidStream *vid_stream, int mb_addr,
- int motion_forw, int r_right_forw, int r_down_forw,
- int motion_back, int r_right_back, int r_down_back,
- unsigned char *past, unsigned char *future)
-{
- int right_back, right_forw, down_back, down_forw;
- unsigned char *dest = NULL;
- unsigned char *src1, *src2;
- int row, col, row_size, rr;
- int mc, mr;
-
- row = (mb_addr / vid_stream->mb_width) << 4;
- col = (mb_addr % vid_stream->mb_width) << 4;
- row_size = vid_stream->mb_width << 4;
-/*
- dest = vid_stream->current->display + (row * row_size) + col;
-*/
- if (motion_forw) {
- right_forw = r_right_forw >> 1;
- down_forw = r_down_forw >> 1;
- src1 = past + ((row + down_forw) * row_size) + (col + right_forw);
- }
-
- if (motion_back) {
- right_back = r_right_back >> 1;
- down_back = r_down_back >> 1;
- src2 = future + ((row + down_back) * row_size) + (col + right_back);
- }
-
- if (motion_forw) {
- if (motion_back) {
- for (rr = 0; rr<16; rr++) {
- dest[0] = src1[0]; dest[1] = src2[1];
- dest[2] = src1[2]; dest[3] = src2[3];
- dest[4] = src1[4]; dest[5] = src2[5];
- dest[6] = src1[6]; dest[7] = src2[7];
- dest[8] = src1[8]; dest[9] = src2[9];
- dest[10] = src1[10]; dest[11] = src2[11];
- dest[12] = src1[12]; dest[13] = src2[13];
- dest[14] = src1[14]; dest[15] = src2[15];
-
- dest += row_size;
- src1 += row_size;
- src2 += row_size;
- }
- }
- else {
- mc = col & 0x3;
- mr = right_forw & 0x3;
- if (!mc && !mr) {
- /* Use 32 bit copy */
- int *d, *s;
-
- d = (int *) dest;
- s = (int *) src1;
- row_size /= 4;
-
- for (rr = 0; rr < 16; rr++) {
- d[0] = s[0];
- d[1] = s[1];
- d[2] = s[2];
- d[3] = s[3];
- d += row_size;
- s += row_size;
- }
- } else if ((!mc || (mc == 2)) &&
- (!mr || (mr == 2))) {
- /* Use 16 bit copy */
- short int *d, * s;
-
- d = (short int *) dest;
- s = (short int *) src1;
- row_size /= 2;
-
- for (rr = 0; rr < 16; rr++) {
- d[0] = s[0];
- d[1] = s[1];
- d[2] = s[2];
- d[3] = s[3];
- d[4] = s[4];
- d[5] = s[5];
- d[6] = s[6];
- d[7] = s[7];
- d += row_size;
- s += row_size;
- }
- }
- else {
- for (rr = 0; rr < 16; rr++) {
- dest[0] = src1[0];
- dest[1] = src1[1];
- dest[2] = src1[2];
- dest[3] = src1[3];
- dest[4] = src1[4];
- dest[5] = src1[5];
- dest[6] = src1[6];
- dest[7] = src1[7];
- dest[8] = src1[8];
- dest[9] = src1[9];
- dest[10] = src1[10];
- dest[11] = src1[11];
- dest[12] = src1[12];
- dest[13] = src1[13];
- dest[14] = src1[14];
- dest[15] = src1[15];
-
- dest += row_size;
- src1 += row_size;
- }
- }
- }
- }
- else if (motion_back) {
- mc = col & 0x3;
- mr = right_back & 0x3;
- if (!mc && !mr) {
- /* Use 32 bit copy */
- int *d, *s;
-
- d = (int *) dest;
- s = (int *) src2;
- row_size /= 4;
-
- for (rr = 0; rr < 16; rr++) {
- d[0] = s[0];
- d[1] = s[1];
- d[2] = s[2];
- d[3] = s[3];
- d += row_size;
- s += row_size;
- }
- }
- else if ((!mc || mc == 2) &&
- (!mr || mr == 2)) {
- /* Use 8 bit copy */
- short int *d, *s;
-
- d = (short int *) dest;
- s = (short int *) src2;
- row_size /= 2;
-
- for (rr = 0; rr < 16; rr++) {
- d[0] = s[0];
- d[1] = s[1];
- d[2] = s[2];
- d[3] = s[3];
- d[4] = s[4];
- d[5] = s[5];
- d[6] = s[6];
- d[7] = s[7];
- d += row_size;
- s += row_size;
- }
- }
- else {
- for (rr = 0; rr < 16; rr++) {
- /* Use 8 bit copy */
- dest[0] = src2[0];
- dest[1] = src2[1];
- dest[2] = src2[2];
- dest[3] = src2[3];
- dest[4] = src2[4];
- dest[5] = src2[5];
- dest[6] = src2[6];
- dest[7] = src2[7];
- dest[8] = src2[8];
- dest[9] = src2[9];
- dest[10] = src2[10];
- dest[11] = src2[11];
- dest[12] = src2[12];
- dest[13] = src2[13];
- dest[14] = src2[14];
- dest[15] = src2[15];
-
- dest += row_size;
- src2 += row_size;
- }
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h
deleted file mode 100644
index c421a53f167..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with this file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include <stdio.h>
-#include <X11/Intrinsic.h>
-#include <X11/Shell.h>
-#include <Xm/Xm.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/RowColumn.h>
-#include <Xm/MainW.h>
-#include <Xm/Label.h>
-#include <Xm/PushB.h>
-#include <Xm/PushBG.h>
-#include <Xm/ToggleB.h>
-#include <Xm/ToggleBG.h>
-#include <Xm/DrawingA.h>
-#include <Xm/CascadeBG.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/Frame.h>
-#include <Xm/BulletinB.h>
-#include <Xm/Scale.h>
-#include <Xm/ScrollBar.h>
-#include <Xm/Form.h>
-#include <Xm/List.h>
-#include <Xm/FileSB.h>
-#include <Xm/AtomMgr.h>
-#include <Xm/Protocols.h>
-#include <Xm/MwmUtil.h>
-
-
-/* Structure of mib_Widget */
-/*****************************************************************************/
-
-typedef struct _mib_Widget {
- char *mib_class; /* name of mib class (Button, TextBox, etc..)*/
- int mib_class_num; /* class number for ez reference :) */
- int mib_mynum; /* numbering for storage format */
- Widget me; /* Xt widget */
- int mib_selected; /* is selected */
- int mib_resizing; /* is resizing 1, or being moved 0 */
- int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */
- int mib_allowresize; /* can this widget be resized ? */
-
- int clkx, clky; /* where user clicked */
-
- void *myres; /* my resources (different for each widget) */
-
- char *name; /* reference name of this widget */
- int width, height; /* width and height */
-
- int topAttachment, bottomAttachment, leftAttachment, rightAttachment;
- /* attachments 1=attached 0=not-attached */
-
- int topOffset, bottomOffset, leftOffset, rightOffset;
- /* offsets if attached */
-
- struct _mib_Widget *parent; /* pointer to parent */
- struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */
- struct _mib_Widget *prev; /* previous sibling or parent */
- struct _mib_Widget *child; /* linked list of children widgets */
-} mib_Widget;
-
-/* mib_Buffer structure */
-/*****************************************************************************/
-
-typedef struct _mib_Buffer {
- void *buffer; /* pointer to either a file or a char string */
- int buf_type; /* type of buffer (defined above) */
- int point; /* pointer for string */
- int buflen; /* length of string buffer */
-} mib_Buffer;
-
-/* mib_Widget functions */
-/*****************************************************************************/
-
-void mib_add_mib_Widget(mib_Widget *, mib_Widget *);
-void mib_add_backward_Widget(mib_Widget *, mib_Widget *);
-void mib_remove_mib_Widget(mib_Widget *);
-void mib_clear_myres(mib_Widget *);
-mib_Widget *mib_new_mib_Widget();
-mib_Widget *mib_find_name(mib_Widget *, char *);
-mib_Widget *mib_load_interface(Widget, char *, int);
-int mib_count_all(mib_Widget *, int);
-int mib_load_Root(Widget, mib_Widget **, mib_Buffer *);
-mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *);
-int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *,
- mib_Buffer *);
-int mib_load_private(mib_Widget *, mib_Buffer *);
-void mib_reset_size(mib_Widget *);
-int mib_read_line(mib_Buffer *, char *, char *);
-void mib_set_eventhandlers(void *, void *, void *);
-void mib_apply_eventhandlers(Widget, mib_Widget *);
-
-/* supporting functions and structures */
-/*****************************************************************************/
-
-typedef struct _menu_item {
- char *label;
- WidgetClass *class;
- char mnemonic;
- char *accelerator;
- char *accel_text;
- void (*callback)();
- XtPointer callback_data;
- struct _menu_item *subitems;
-} MenuItem;
-
-Widget BuildMenu(Widget, int, char *, char, MenuItem *);
-
-/* mib class numbers */
-
-#define MIB_NULL 0
-#define MIB_TEXTBOX 1
-#define MIB_BUTTON 2
-#define MIB_TOGGLE 3
-#define MIB_RADIOBOX 4
-#define MIB_DRAWINGAREA 5
-#define MIB_LABEL 6
-#define MIB_FRAME 7
-#define MIB_SCROLLBAR 8
-#define MIB_TEXTBIG 9
-#define MIB_LIST 10
-#define MIB_SCALE 11
-#define MIB_MENU 12
-
-/* number of classes */
-#define MI_NUMCLASSES 12
-
-/* for specifying creation of a widget with
- default private values, no values at all (empty),
- or no values and editable */
-
-#define WDEFAULT 1
-#define WEMPTY 2
-#define WEDIT 3
-
-/* for specifing whether we are loading an
- interface from a file or from a string and whether it
- is editable :) */
-
-#define MI_FROMFILE 1
-#define MI_EDITFROMFILE 2
-#define MI_FROMSTRING 3
-#define MI_EDITFROMSTRING 4
-
-#define MI_MAXSTRLEN 200 /* maximum string length */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp
deleted file mode 100644
index 2a155f4f116..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/* $Id$ */
-/*
- * Author: Yoichiro Ueno (ueno@cs.titech.ac.jp)
- *
- * Copyright (C) 1991, 1992, Yoichiro Ueno.
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose is hereby granted by the Author without
- * fee, provided that the above copyright notice appear in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation, and that the name of the Author not be used
- * in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The Author makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
- * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-
-/*
- *--------------------------------------------------------------
- *
- * MonoDitherImage --
- *
- * Dithers image into monochrome.
- * Dither algorithm is based on dither.c in xli.1.11.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-#define MaxGrey 65280
-#define Threshold (MaxGrey/2)
-#define MinGrey 0
-
-#if ultrix && mips
-# define SEED_BIT 0x01
-# define OPP_SEED_BIT 0x80
-# define SHIFT_SEED_BIT(b) (b <<= 1)
-# define OPP_SHIFT_SEED_BIT(b) (b >>= 1)
-#else
-# define SEED_BIT 0x80
-# define OPP_SEED_BIT 0x01
-# define SHIFT_SEED_BIT(b) (b >>= 1)
-# define OPP_SHIFT_SEED_BIT(b) (b <<= 1)
-#endif
-
-static int *curr = NULL;
-static int *next = NULL;
-
-#if 0
-void
-MonoDitherImage(register unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- int bit_r2l;
- register unsigned int bit;
- register unsigned int data;
- int i;
- register int j;
- int *swap;
- register int out_err;
- register int next1;
- register int next2;
-
- if(curr == NULL) {
- curr = (int *)malloc(sizeof(int) * (w + 2));
- curr += 1;
- }
- if(next == NULL) {
- next = (int *)malloc(sizeof(int) * (w + 2));
- next += 1;
- }
-
- bzero ((char *)curr, w * sizeof(*curr));
-
- bit_r2l = SEED_BIT << (w - 1 & 7);
- for(i = 0; i < h; i ++) {
- if(i & 0x01) { /* Right to Left */
- bit = bit_r2l;
- data = 0;
- out_err = curr[w-1];
- next1 = 0;
- next2 = 0;
- for (j=(w-1); j>=0; j--)
- {
- out_err = (out_err >> 4) + (lum[j] << 8);
- if(out_err > Threshold) {
- data |= bit;
- out_err -= MaxGrey;
- }
- else
- out_err -= MinGrey;
-
- next[j+1] = next1 + (out_err * 3);
- next1 = next2 + (out_err * 5);
- next2 = (out_err * 1);
- out_err = curr[j-1] + (out_err * 7);
-
- OPP_SHIFT_SEED_BIT(bit);
-#if ultrix && mips
- if(bit == 0)
-#else
- if(bit > 0x80)
-#endif
- {
- out[j >> 3] = data;
- bit = OPP_SEED_BIT;
- data = 0;
- }
- }
- next[0] = next1;
- }
- else { /* Left to Right */
- bit = SEED_BIT;
- data = 0;
- out_err = curr[0];
- next1 = 0;
- next2 = 0;
- for (j=0; j<w; j++)
- {
- out_err = (out_err >> 4) + (lum[j] << 8);
- if(out_err > Threshold) {
- data |= bit;
- out_err = out_err - MaxGrey;
- }
- else
- out_err = out_err - MinGrey;
-
- next[j-1] = next1 + (out_err * 3);
- next1 = next2 + (out_err * 5);
- next2 = (out_err * 1);
- out_err = curr[j+1] + (out_err * 7);
-
- SHIFT_SEED_BIT(bit);
-#if ultrix && mips
- if(bit > 0x80)
-#else
- if(bit == 0)
-#endif
- {
- out[j >> 3] = data;
- bit = SEED_BIT;
- data = 0;
- }
- }
- next[w-1] = next1;
- }
-
- lum += w;
- out += w >> 3;
- swap = curr;
- curr = next;
- next = swap;
- }
-}
-#endif
-
-void
-MonoDitherImage(register unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- register unsigned int bit;
- register unsigned int data;
- register int j;
- int i;
- static unsigned char d[4][4] = {{0, 8, 2, 10},
- {12, 4, 14, 6},
- {3, 11, 1, 9},
- {15, 7, 13, 5}};
-
- for(i = 0; i < h; i ++) {
- bit = SEED_BIT;
- data = 0;
- for (j=0; j<w; j++) {
- if((lum[j] >> 4) > d[i % 4][j % 4]) {
- data |= bit;
- }
- SHIFT_SEED_BIT(bit);
-#if ultrix && mips
- if(bit > 0x80)
-#else
- if(bit == 0)
-#endif
- {
- out[j >> 3] = data;
- bit = SEED_BIT;
- data = 0;
- }
- }
- lum += w;
- out += (w + 7) >> 3;
- }
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * MonoThresholdImage --
- *
- * convert image into monochrome with threshold.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-MonoThresholdImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- unsigned char bit;
- unsigned char data;
-
- bit = SEED_BIT;
- data = 0;
- for (w*=h; w>0; w--) {
- if(*lum++>128)
- data |= bit;
-
- SHIFT_SEED_BIT(bit);
- if(bit == 0) {
- *out ++ = data;
- bit = SEED_BIT;
- data = 0;
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp
deleted file mode 100644
index 7525a3ee802..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#include "video.h"
-#include "proto.h"
-#include "util.h"
-
-
-/*
- *--------------------------------------------------------------
- *
- * ComputeVector --
- *
- * Computes motion vector given parameters previously parsed
- * and reconstructed.
- *
- * Results:
- * Reconstructed motion vector info is put into recon_* parameters
- * passed to this function. Also updated previous motion vector
- * information.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-#define ComputeVector(recon_right_ptr, recon_down_ptr, recon_right_prev, recon_down_prev, f, full_pel_vector, motion_h_code, motion_v_code, motion_h_r, motion_v_r) \
- \
-{ \
- int comp_h_r, comp_v_r; \
- int right_little, right_big, down_little, down_big; \
- int max, min, new_vector; \
- \
- /* The following procedure for the reconstruction of motion vectors \
- is a direct and simple implementation of the instructions given \
- in the mpeg December 1991 standard draft. \
- */ \
- \
- if (f == 1 || motion_h_code == 0) \
- comp_h_r = 0; \
- else \
- comp_h_r = f - 1 - motion_h_r; \
- \
- if (f == 1 || motion_v_code == 0) \
- comp_v_r = 0; \
- else \
- comp_v_r = f - 1 - motion_v_r; \
- \
- right_little = motion_h_code * f; \
- if (right_little == 0) \
- right_big = 0; \
- else { \
- if (right_little > 0) { \
- right_little = right_little - comp_h_r; \
- right_big = right_little - 32 * f; \
- } \
- else { \
- right_little = right_little + comp_h_r; \
- right_big = right_little + 32 * f; \
- } \
- } \
- \
- down_little = motion_v_code * f; \
- if (down_little == 0) \
- down_big = 0; \
- else { \
- if (down_little > 0) { \
- down_little = down_little - comp_v_r; \
- down_big = down_little - 32 * f; \
- } \
- else { \
- down_little = down_little + comp_v_r; \
- down_big = down_little + 32 * f; \
- } \
- } \
- \
- max = 16 * f - 1; \
- min = -16 * f; \
- \
- new_vector = recon_right_prev + right_little; \
- \
- if (new_vector <= max && new_vector >= min) \
- *recon_right_ptr = recon_right_prev + right_little; \
- /* just new_vector */ \
- else \
- *recon_right_ptr = recon_right_prev + right_big; \
- recon_right_prev = *recon_right_ptr; \
- if (full_pel_vector) \
- *recon_right_ptr = *recon_right_ptr << 1; \
- \
- new_vector = recon_down_prev + down_little; \
- if (new_vector <= max && new_vector >= min) \
- *recon_down_ptr = recon_down_prev + down_little; \
- /* just new_vector */ \
- else \
- *recon_down_ptr = recon_down_prev + down_big; \
- recon_down_prev = *recon_down_ptr; \
- if (full_pel_vector) \
- *recon_down_ptr = *recon_down_ptr << 1; \
-}
-
-/*
- *--------------------------------------------------------------
- *
- * ComputeForwVector --
- *
- * Computes forward motion vector by calling ComputeVector
- * with appropriate parameters.
- *
- * Results:
- * Reconstructed motion vector placed in recon_right_for_ptr and
- * recon_down_for_ptr.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-ComputeForwVector(int *recon_right_for_ptr, int *recon_down_for_ptr)
-{
-
- Pict *picture;
- Macroblock *mblock;
-
- picture = &(curVidStream->picture);
- mblock = &(curVidStream->mblock);
-
- ComputeVector(recon_right_for_ptr, recon_down_for_ptr,
- mblock->recon_right_for_prev,
- mblock->recon_down_for_prev,
- picture->forw_f, picture->full_pel_forw_vector,
- mblock->motion_h_forw_code, mblock->motion_v_forw_code,
- mblock->motion_h_forw_r, mblock->motion_v_forw_r);
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * ComputeBackVector --
- *
- * Computes backward motion vector by calling ComputeVector
- * with appropriate parameters.
- *
- * Results:
- * Reconstructed motion vector placed in recon_right_back_ptr and
- * recon_down_back_ptr.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-ComputeBackVector(int *recon_right_back_ptr, int *recon_down_back_ptr)
-{
- Pict *picture;
- Macroblock *mblock;
-
- picture = &(curVidStream->picture);
- mblock = &(curVidStream->mblock);
-
- ComputeVector(recon_right_back_ptr, recon_down_back_ptr,
- mblock->recon_right_back_prev,
- mblock->recon_down_back_prev,
- picture->back_f, picture->full_pel_back_vector,
- mblock->motion_h_back_code, mblock->motion_v_back_code,
- mblock->motion_h_back_r, mblock->motion_v_back_r);
-
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h
deleted file mode 100644
index 365745476ce..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-/* ui.c */
-void UIprocess(int cmdSocket);
-
-#include "mpeg_shared/routine.h"
-
-/* ctr.c */
-int CTRmain(void);
-
-/* ab.c */
-void ABinitBuf(int size);
-void ABflushBuf(int nextSample);
-int ABcheckSamples(void); /* returns # of samples in ABbuf */
-int ABgetSamples(char * buf, int samples);
- /* read at most given number of samples from AB to buf, returns
- number of sample actually read */
-int ABskipSamples(int samples);
-/* if samples < 0; then stuff |samples| silient samples to ABgetSamples(),
- otherwise wipe out this number of samples from AB */
-void ABdeleteBuf(void);
-void ABdeleteSem(void);
-
-void ABprocess(int dataSocket);
-
-/* vb.c */
-void VBinitBuf(int size);
-char * VBgetBuf(int size); /* block version */
-int VBcheckBuf(int size); /* non-block check, return True/False*/
-void VBputMsg(char * msgPtr);
-char * VBgetMsg(); /* block version */
-int VBcheckMsg(); /* non-block check, return Number of Msgs in buffer */
-int VBbufEmpty(void);
-void VBreclaimMsg(char * msgPtr);
-void VBdeleteBuf(void);
-void VBdeleteSem(void);
-
-void VBprocess(int initSocket, int dataSocket);
-
-/* vd.c */
-void VDprocess(int CTRpid);
-void VDinitBuf(int size);
-void VDresizeBuf(int height, int width);
-FrameBlock * VDgetBuf(void); /* block version, return with interrupt */
-int VDcheckBuf(void); /* non-block check, return True/False */
-void VDputMsg(FrameBlock * msgPtr);
-FrameBlock * VDgetMsg(void); /* block version, return with interrupt */
-FrameBlock * VDpeekMsg(void); /* returns a msg for checking only, no modification allowed */
-int VDcheckMsg(void); /* non-block check, return Number of Msg in buffer */
-int VDbufEmpty(void);
-void VDreferMsg(FrameBlock * msgPtr);
-void VDreclaimMsg(FrameBlock * msgPtr);
-void VDdeleteBuf(void);
-void VDdeleteSem(void);
-
-/* vp.c */
-
-void VPinitWindow(Widget shell, Window monitorWindow, int cmdSocket);
-void VPresizeWindow(int height, int width);
-
-/* -- in gdith.c -- */
-void VPcommand(int cmd, char * position);
-void VPexpose(void);
-
-/* audio.c */
-int InitAudioDevice(void);
-void SetAudioParameter(AudioParameter * para);
-unsigned int GetAudioTime(void);
-unsigned int PlayAudioSamples(unsigned int time, char * buf, int size);
-void StartAudioPlaySession(void);
-void SetAudioGain(void);
-void AudioInterpolate(char *rawBuf, int len, char * convBuf, int convLen);
-
-/* prog.c */
-
-void StartProgram(char * title, char * vh, char * vf, char * ah, char * af);
-Widget CreateProgramWindow(Widget parent, int cmdSoket, int * playflag, Widget frametext);
-
-/* file.c */
-
-void StartLocalServer(void);
-Widget CreateFileWindow(Widget parent, int cmdSoket, int * playflag, Widget frametext);
-
-
-/* para.c */
-
-Widget CreateParameterWindow(Widget parent);
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp
deleted file mode 100644
index 89c76bf6aba..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code to implement an ordered dither. */
-
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-#define DITH_SIZE 16
-
-
-/* Structures used to implement hybrid ordered dither/floyd-steinberg
- dither algorithm.
-*/
-
-static unsigned char *l_darrays[DITH_SIZE];
-static unsigned char *cr_darrays[DITH_SIZE];
-static unsigned char *cb_darrays[DITH_SIZE];
-
-/*
- *--------------------------------------------------------------
- *
- * InitOrderedDither--
- *
- * Structures intialized for ordered dithering.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitOrderedDither()
-{
- int i, j, k, err_range, threshval;
- unsigned char *lmark, *cmark;
-
- for (i=0; i<DITH_SIZE; i++) {
- lmark = l_darrays[i] = (unsigned char *) malloc(256);
-
- for (j=0; j<lum_values[0]; j++) {
- *lmark++ = 0;
- }
-
- for (j=0; j<(LUM_RANGE-1); j++) {
- err_range = lum_values[j+1] - lum_values[j];
- threshval = ((i * err_range) / DITH_SIZE)+lum_values[j];
-
- for (k=lum_values[j]; k<lum_values[j+1]; k++) {
- if (k > threshval) *lmark++ = ((j+1) * (CR_RANGE * CB_RANGE));
- else *lmark++ = (j * (CR_RANGE * CB_RANGE));
- }
- }
-
- for (j=lum_values[LUM_RANGE-1]; j<256; j++) {
- *lmark++ = (LUM_RANGE-1)*(CR_RANGE * CB_RANGE);
- }
- }
-
- for (i=0; i<DITH_SIZE; i++) {
- cmark = cr_darrays[i] = (unsigned char *) malloc(256);
-
- for (j=0; j<cr_values[0]; j++) {
- *cmark++ = 0;
- }
-
- for (j=0; j<(CR_RANGE-1); j++) {
- err_range = cr_values[j+1] - cr_values[j];
- threshval = ((i * err_range) / DITH_SIZE)+cr_values[j];
-
- for (k=cr_values[j]; k<cr_values[j+1]; k++) {
- if (k > threshval) *cmark++ = ((j+1) * CB_RANGE);
- else *cmark++ = (j * CB_RANGE);
- }
- }
-
- for (j=cr_values[CR_RANGE-1]; j<256; j++) {
- *cmark++ = (CR_RANGE-1)*(CB_RANGE);
- }
- }
-
- for (i=0; i<DITH_SIZE; i++) {
- cmark = cb_darrays[i] = (unsigned char *) malloc(256);
-
- for (j=0; j<cb_values[0]; j++) {
- *cmark++ = 0;
- }
-
- for (j=0; j<(CB_RANGE-1); j++) {
- err_range = cb_values[j+1] - cb_values[j];
- threshval = ((i * err_range) / DITH_SIZE)+cb_values[j];
-
- for (k=cb_values[j]; k<cb_values[j+1]; k++) {
- if (k > threshval) *cmark++ = j+1;
- else *cmark++ = j;
- }
- }
-
- for (j=cb_values[CB_RANGE-1]; j<256; j++) {
- *cmark++ = CB_RANGE-1;
- }
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * OrderedDitherImage --
- *
- * Dithers an image using an ordered dither.
- * Assumptions made:
- * 1) The color space is allocated y:cr:cb = 8:4:4
- * 2) The spatial resolution of y:cr:cb is 4:1:1
- * The channels are dithered based on the standard
- * ordered dither pattern for a 4x4 area.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-OrderedDitherImage (unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- unsigned char *l, *r, *b, *o1, *o2;
- unsigned char *l2;
- unsigned char L, R, B;
- int i, j;
-
- l = lum;
- l2 = lum+w;
- r = cr;
- b = cb;
- o1 = out;
- o2 = out+w;
-
- for (i=0; i<h; i+=4) {
-
- for (j=0; j<w; j+=8) {
-
- R = r[0]; B = b[0];
-
- L = l[0];
- o1[0] = pixel[(l_darrays[0][L] + cr_darrays[0][R] + cb_darrays[0][B])];
- L = l[1];
- o1[1] = pixel[(l_darrays[8][L] + cr_darrays[8][R] + cb_darrays[8][B])];
- L = l2[0];
- o2[0] = pixel[(l_darrays[12][L] + cr_darrays[12][R] + cb_darrays[12][B])];
- L = l2[1];
- o2[1] = pixel[(l_darrays[4][L] + cr_darrays[4][R] + cb_darrays[4][B])];
-
- R = r[1]; B = b[1];
-
- L = l[2];
- o1[2] = pixel[(l_darrays[2][L] + cr_darrays[2][R] + cb_darrays[2][B])];
- L = l[3];
- o1[3] = pixel[(l_darrays[10][L] + cr_darrays[10][R] + cb_darrays[10][B])];
- L = l2[2];
- o2[2] = pixel[(l_darrays[14][L] + cr_darrays[14][R] + cb_darrays[14][B])];
- L = l2[3];
- o2[3] = pixel[(l_darrays[6][L] + cr_darrays[6][R] + cb_darrays[6][B])];
-
- R = r[2]; B = b[2];
-
- L = l[4];
- o1[4] = pixel[(l_darrays[0][L] + cr_darrays[0][R] + cb_darrays[0][B])];
- L = l[5];
- o1[5] = pixel[(l_darrays[8][L] + cr_darrays[8][R] + cb_darrays[8][B])];
- L = l2[4];
- o2[4] = pixel[(l_darrays[12][L] + cr_darrays[12][R] + cb_darrays[12][B])];
- L = l2[5];
- o2[5] = pixel[(l_darrays[4][L] + cr_darrays[4][R] + cb_darrays[4][B])];
-
- R = r[3]; B = b[3];
-
- L = l[6];
- o1[6] = pixel[(l_darrays[2][L] + cr_darrays[2][R] + cb_darrays[2][B])];
- L = l[7];
- o1[7] = pixel[(l_darrays[10][L] + cr_darrays[10][R] + cb_darrays[10][B])];
- L = l2[6];
- o2[6] = pixel[(l_darrays[14][L] + cr_darrays[14][R] + cb_darrays[14][B])];
- L = l2[7];
- o2[7] = pixel[(l_darrays[6][L] + cr_darrays[6][R] + cb_darrays[6][B])];
-
- l += 8;
- l2 += 8;
- r += 4;
- b += 4;
- o1 += 8;
- o2 += 8;
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
-
- for (j=0; j<w; j+=8) {
-
- R = r[0]; B = b[0];
-
- L = l[0];
- o1[0] = pixel[(l_darrays[3][L] + cr_darrays[3][R] + cb_darrays[3][B])];
- L = l[1];
- o1[1] = pixel[(l_darrays[11][L] + cr_darrays[11][R] + cb_darrays[11][B])];
- L = l2[0];
- o2[0] = pixel[(l_darrays[15][L] + cr_darrays[15][R] + cb_darrays[15][B])];
- L = l2[1];
- o2[1] = pixel[(l_darrays[7][L] + cr_darrays[7][R] + cb_darrays[7][B])];
-
- R = r[1]; B = b[1];
-
- L = l[2];
- o1[2] = pixel[(l_darrays[1][L] + cr_darrays[1][R] + cb_darrays[1][B])];
- L = l[3];
- o1[3] = pixel[(l_darrays[9][L] + cr_darrays[9][R] + cb_darrays[9][B])];
- L = l2[2];
- o2[2] = pixel[(l_darrays[13][L] + cr_darrays[13][R] + cb_darrays[13][B])];
- L = l2[3];
- o2[3] = pixel[(l_darrays[5][L] + cr_darrays[5][R] + cb_darrays[5][B])];
-
- R = r[2]; B = b[2];
-
- L = l[4];
- o1[4] = pixel[(l_darrays[3][L] + cr_darrays[3][R] + cb_darrays[3][B])];
- L = l[5];
- o1[5] = pixel[(l_darrays[11][L] + cr_darrays[11][R] + cb_darrays[11][B])];
- L = l2[4];
- o2[4] = pixel[(l_darrays[15][L] + cr_darrays[15][R] + cb_darrays[15][B])];
- L = l2[5];
- o2[5] = pixel[(l_darrays[7][L] + cr_darrays[7][R] + cb_darrays[7][B])];
-
- R = r[3]; B = b[3];
-
- L = l[6];
- o1[6] = pixel[(l_darrays[1][L] + cr_darrays[1][R] + cb_darrays[1][B])];
- L = l[7];
- o1[7] = pixel[(l_darrays[9][L] + cr_darrays[9][R] + cb_darrays[9][B])];
- L = l2[6];
- o2[6] = pixel[(l_darrays[13][L] + cr_darrays[13][R] + cb_darrays[13][B])];
- L = l2[7];
- o2[7] = pixel[(l_darrays[5][L] + cr_darrays[5][R] + cb_darrays[5][B])];
-
- l += 8;
- l2 += 8;
- r += 4;
- b += 4;
- o1 += 8;
- o2 += 8;
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
- }
-}
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered2.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered2.cpp
deleted file mode 100644
index eab1505b642..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered2.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code to implement an ordered dither. */
-
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "dither.h"
-
-#define DITH_SIZE 16
-
-
-/* Structures used to implement hybrid ordered dither/floyd-steinberg
- dither algorithm.
-*/
-
-static unsigned char ***ditherPtr[DITH_SIZE];
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitOrderedDither--
- *
- * Structures intialized for ordered dithering.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitOrdered2Dither()
-{
- unsigned char ****pos_2_cb;
- unsigned char ***cb_2_cr;
- unsigned char **cr_2_l;
- int cb_val, cb_rval, cr_val, cr_rval, l_val, l_rval;
- int i, j, pos;
- int err_range, threshval;
-
- pos_2_cb = (unsigned char ****) malloc (DITH_SIZE*sizeof(unsigned char ***));
- cb_2_cr = (unsigned char ***) malloc(CB_RANGE*sizeof(unsigned char **));
- cr_2_l = (unsigned char **) malloc(CR_RANGE*sizeof(unsigned char *));
-
- for (pos=0; pos<DITH_SIZE; pos++) {
-
- pos_2_cb[pos] = (unsigned char ***) malloc(256*(sizeof(unsigned char **)));
-
- for (j=0; j<CB_RANGE; j++) {
- cb_2_cr[j] = (unsigned char **) malloc(256*(sizeof(unsigned char *)));
- }
-
- for (cb_val=0; cb_val<cb_values[0]; cb_val++) {
- (pos_2_cb[pos])[cb_val] = cb_2_cr[0];
- }
-
- for (cb_rval=0; cb_rval<(CB_RANGE-1); cb_rval++) {
- err_range = cb_values[cb_rval+1] - cb_values[cb_rval];
- threshval = ((pos*err_range)/DITH_SIZE)+cb_values[cb_rval];
-
- for (cb_val=cb_values[cb_rval]; cb_val<cb_values[cb_rval+1]; cb_val++) {
- if (cb_val>threshval) (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval+1];
- else (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval];
- }
- }
-
- for (cb_val=cb_values[CB_RANGE-1]; cb_val<256; cb_val++) {
- (pos_2_cb[pos])[cb_val] = cb_2_cr[CB_RANGE-1];
- }
-
- for (cb_rval=0; cb_rval<CB_RANGE; cb_rval++) {
-
- for (j=0; j<CR_RANGE; j++) {
- cr_2_l[j] = (unsigned char *) malloc(256*(sizeof(unsigned char)));
- }
-
- for (cr_val=0; cr_val < cr_values[0]; cr_val++) {
- (cb_2_cr[cb_rval])[cr_val] = cr_2_l[0];
- }
-
- for (cr_rval=0; cr_rval<(CR_RANGE-1); cr_rval++) {
- err_range = cr_values[cr_rval+1] - cr_values[cr_rval];
- threshval = ((pos*err_range)/DITH_SIZE)+cr_values[cr_rval];
-
- for (cr_val=cr_values[cr_rval]; cr_val<cr_values[cr_rval+1]; cr_val++) {
- if (cr_val>threshval) (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval+1];
- else (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval];
- }
- }
-
- for (cr_val=cr_values[CR_RANGE-1]; cr_val<256; cr_val++) {
- (cb_2_cr[cb_rval])[cr_val] = cr_2_l[CR_RANGE-1];
- }
-
- for (cr_rval=0; cr_rval<CR_RANGE; cr_rval++) {
-
- for (l_val = 0; l_val < lum_values[0]; l_val++) {
- (cr_2_l[cr_rval])[l_val] = pixel[cb_rval+(cr_rval*CB_RANGE)+
- (0*CR_RANGE*CB_RANGE)];
- }
-
- for (l_rval=0; l_rval<(LUM_RANGE-1); l_rval++) {
- err_range = lum_values[l_rval+1] - lum_values[l_rval];
- threshval = ((pos*err_range) /DITH_SIZE) + lum_values[l_rval];
-
- for (l_val = lum_values[l_rval]; l_val < lum_values[l_rval+1]; l_val++) {
- if (l_val>threshval) (cr_2_l[cr_rval])[l_val] =
- pixel[cb_rval+(cr_rval*CB_RANGE)+((l_rval+1)*CR_RANGE*CB_RANGE)];
- else (cr_2_l[cr_rval])[l_val] =
- pixel[cb_rval+(cr_rval*CB_RANGE)+(l_rval*CR_RANGE*CB_RANGE)];
- }
- }
-
- for (l_val = lum_values[LUM_RANGE-1]; l_val < 256; l_val++) {
- (cr_2_l[cr_rval])[l_val] =
- pixel[cb_rval+(cr_rval*CB_RANGE)+((LUM_RANGE-1)*CR_RANGE*CB_RANGE)];
- }
- }
- }
- }
-
- for (i=0; i<DITH_SIZE; i++) {
- ditherPtr[i] = pos_2_cb[i];
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * Ordered2DitherImage --
- *
- * Dithers an image using an ordered dither.
- * Assumptions made:
- * 1) The color space is allocated y:cr:cb = 8:4:4
- * 2) The spatial resolution of y:cr:cb is 4:1:1
- * The channels are dithered based on the standard
- * ordered dither pattern for a 4x4 area.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-Ordered2DitherImage (unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w)
-{
- unsigned char *l, *r, *b, *o1, *o2;
- unsigned char *l2;
- unsigned char L, R, B;
- int i, j;
- unsigned char ***dp0 = ditherPtr[0];
- unsigned char ***dp2 = ditherPtr[2];
- unsigned char ***dp4 = ditherPtr[4];
- unsigned char ***dp6 = ditherPtr[6];
- unsigned char ***dp8 = ditherPtr[8];
- unsigned char ***dp10 = ditherPtr[10];
- unsigned char ***dp12 = ditherPtr[12];
- unsigned char ***dp14 = ditherPtr[14];
- unsigned char ***dp1 = ditherPtr[1];
- unsigned char ***dp3 = ditherPtr[3];
- unsigned char ***dp5 = ditherPtr[5];
- unsigned char ***dp7 = ditherPtr[7];
- unsigned char ***dp9 = ditherPtr[9];
- unsigned char ***dp11 = ditherPtr[11];
- unsigned char ***dp13 = ditherPtr[13];
- unsigned char ***dp15 = ditherPtr[15];
-
- l = lum;
- l2 = lum+w;
- r = cr;
- b = cb;
- o1 = out;
- o2 = out+w;
-
- for (i=0; i<h; i+=4) {
-
- for (j=0; j<w; j+=8) {
-
- R = r[0]; B = b[0];
-
- L = l[0];
- o1[0] = ((dp0[B])[R])[L];
- L = l[1];
- o1[1] = ((dp8[B])[R])[L];
- L = l2[0];
- o2[0] = ((dp12[B])[R])[L];
- L = l2[1];
- o2[1] = ((dp4[B])[R])[L];
-
- R = r[1]; B = b[1];
-
- L = l[2];
- o1[2] = ((dp2[B])[R])[L];
- L = l[3];
- o1[3] = ((dp10[B])[R])[L];
- L = l2[2];
- o2[2] = ((dp14[B])[R])[L];
- L = l2[3];
- o2[3] = ((dp6[B])[R])[L];
-
- R = r[2]; B = b[2];
-
- L = l[4];
- o1[4] = ((dp0[B])[R])[L];
- L = l[5];
- o1[5] = ((dp8[B])[R])[L];
- L = l2[4];
- o2[4] = ((dp12[B])[R])[L];
- L = l2[5];
- o2[5] = ((dp4[B])[R])[L];
-
- R = r[3]; B = b[3];
-
- L = l[6];
- o1[6] = ((dp2[B])[R])[L];
- L = l[7];
- o1[7] = ((dp10[B])[R])[L];
- L = l2[6];
- o2[6] = ((dp14[B])[R])[L];
- L = l2[7];
- o2[7] = ((dp6[B])[R])[L];
-
- l += 8;
- l2 += 8;
- r += 4;
- b += 4;
- o1 += 8;
- o2 += 8;
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
-
- for (j=0; j<w; j+=8) {
-
- R = r[0]; B = b[0];
-
- L = l[0];
- o1[0] = ((dp3[B])[R])[L];
- L = l[1];
- o1[1] = ((dp11[B])[R])[L];
- L = l2[0];
- o2[0] = ((dp15[B])[R])[L];
- L = l2[1];
- o2[1] = ((dp7[B])[R])[L];
-
- R = r[1]; B = b[1];
-
- L = l[2];
- o1[2] = ((dp1[B])[R])[L];
- L = l[3];
- o1[3] = ((dp9[B])[R])[L];
- L = l2[2];
- o2[2] = ((dp13[B])[R])[L];
- L = l2[3];
- o2[3] = ((dp5[B])[R])[L];
-
- R = r[2]; B = b[2];
-
- L = l[4];
- o1[4] = ((dp3[B])[R])[L];
- L = l[5];
- o1[5] = ((dp11[B])[R])[L];
- L = l2[4];
- o2[4] = ((dp15[B])[R])[L];
- L = l2[5];
- o2[5] = ((dp7[B])[R])[L];
-
- R = r[3]; B = b[3];
-
- L = l[6];
- o1[6] = ((dp1[B])[R])[L];
- L = l[7];
- o1[7] = ((dp9[B])[R])[L];
- L = l2[6];
- o2[6] = ((dp13[B])[R])[L];
- L = l2[7];
- o2[7] = ((dp5[B])[R])[L];
-
- l += 8;
- l2 += 8;
- r += 4;
- b += 4;
- o1 += 8;
- o2 += 8;
- }
-
- l += w; l2 += w;
- o1 += w; o2 += w;
- }
-}
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/para.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/para.cpp
deleted file mode 100644
index 8715d47f63f..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/para.cpp
+++ /dev/null
@@ -1,371 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include "video.h"
-#include <X11/Intrinsic.h>
-#include <Xm/DialogS.h>
-#include <Xm/List.h>
-#include <Xm/Frame.h>
-#include <Xm/PushB.h>
-#include <Xm/Form.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/Label.h>
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-
-#define NUM_LIST_ITEMS 25
-#define PARAMETER_FILE "~/.vcr/vcrParameters"
-#define BANNER "Virtual VCR Parameter File, version 2.0 ** Do not Edit **"
-#ifdef XmFONTLIST_DEFAULT_TAG
-#define XmStringTag XmFONTLIST_DEFAULT_TAG
-#else
-#define XmStringTag XmSTRING_DEFAULT_CHARSET
-#endif
-#define STRING_SIZE 64
-#define ITEMS sizeof(shared->config)/4
-
-static Widget parashell, wparalist, wparafield;
-
-static int * config;
-static float *fconfig;
-
-static struct
-{
- char * title;
- int float_tag; /* 0 - integer, 1 - floating point */
-}
-para[] =
-{
- {"Real time (audio on)(tag)", 0},
- {"Video max frames-per-second", 0},
- {"Audio max sampels-per-second", 0},
- {"FF frames-per-second", 0},
- {"Rewind frames-per-second", 0},
- {"Feedback delay (msec)", 0},
- {"Audio output mask", 0},
- {"Audio_para.encodeType", 0},
- {"Audio_para.channels", 0},
- {"Audio_para.samplesPerSecond", 0},
- {"Audio_para.bytesPerSamples", 0},
- {"Audio timer interval (millisec)", 0},
- {"Audio buffered intervals", 0},
- {"Frames per audio play", 0},
- {"Audio forward (samples)", 0},
- {"VS work-ahead (milliseconds)", 0},
- {"frame rate limit (fps, float)", 1},
- {"collect statistics(tag)", 0},
- {"collect video structure info(tag)", 0},
- {"Sync effective(tag)", 0},
- {"QoS effective(tag)", 0},
- {"Audio offset(samples)", 0},
- {"Filter parameter(1/R or nsamples)", 0},
- {"Max send pattern frames", 0},
- {"Reliable byte-stream audio (tag)", 0},
- {"Reliable byte-stream video (tag)", 0},
- {"Verbose message(tag)", 0},
- {"", 0} /* this empty string is needed for testing the size of para */
-};
-
-#define Fgets(s) {if (feof(fp) || fgets(s, STRING_SIZE, fp) == NULL) break; s[strlen(s)-1] = 0; }
-
-#define Fputs(s) {fputs(s, fp); fputc('\n', fp);}
-
-static void InitBuf(void)
-{
- FILE * fp;
- char buf[256];
- int i;
-
- config = (int *)&(shared->config);
- fconfig = (float *)&(shared->config);
-
- get_full_path(PARAMETER_FILE, buf, 256);
- fp = fopen(buf, "r");
- if (fp == NULL)
- {
- fprintf(stderr, "Warning: %s not found, use default parameter value\n",
- PARAMETER_FILE);
- InitBuf_exit1:
- return;
- }
- if (fgets(buf, 100, fp) == NULL)
- {
- fclose(fp);
- goto InitBuf_exit1;
- }
- buf[strlen(buf)-1] = 0;
- if (strcmp(buf, BANNER))
- {
- fprintf(stderr, "BANNER in %s not expected, use default parameter value\n",
- PARAMETER_FILE);
- fclose(fp);
- goto InitBuf_exit1;
- }
- for(i = 0; i < ITEMS; i++)
- {
- Fgets(buf);
- if (para[i].float_tag)
- sscanf(buf, "%f", &fconfig[i]);
- else
- sscanf(buf, "%d", &config[i]);
- }
- fclose(fp);
-}
-
-static void SaveBuf(void)
-{
- int i;
- FILE * fp;
- char buf[256];
- get_full_path(PARAMETER_FILE, buf, 256);
- fp = fopen(buf, "w");
- if (fp == NULL)
- {
- fprintf(stderr, "Fail to open %s for saving para", buf);
- perror("");
- return;
- }
- Fputs(BANNER);
- for (i = 0; i < ITEMS; i++)
- if (para[i].float_tag)
- fprintf(fp, "%f\n", fconfig[i]);
- else
- fprintf(fp, "%d\n", config[i]);
- fclose(fp);
-}
-
-
-static int curListPos(void)
-{
- int * poses, count;
-
- if (XmListGetSelectedPos(wparalist, &poses, &count))
- {
- count = poses[0];
- XtFree((char*)poses);
- /*
- fprintf(stderr, "curListPos: current pos = %d\n", count);
- */
- return count - 1;
- }
- return -1;
-}
-
-static void modifyCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- int i, value;
- XmString item;
- char buf[100], * valptr;
- i = curListPos();
- if (i == -1) { beep(); return;}
- valptr = XmTextGetString(wparafield);
- if (para[i].float_tag)
- sscanf(valptr, "%f", &fconfig[i]);
- else
- sscanf(valptr, "%d", &config[i]);
- XtFree(valptr);
- if (para[i].float_tag)
- sprintf(buf, "%s: %f", para[i].title, fconfig[i]);
- else
- sprintf(buf, "%s: %d", para[i].title, config[i]);
- item = (XmString)XmStringCreateLtoR(buf, XmStringTag);
- XmListReplaceItemsPos(wparalist, &item, 1, i+1);
- XmListSelectPos(wparalist, i+1, 0);
- XmStringFree(item);
- SaveBuf();
- /*
- XtManageChild(parashell);
- */
- return;
-}
-
-static void dismissCB(Widget W, XtPointer closure, XtPointer call_data)
-{
-
- XtUnrealizeWidget(parashell);
- /*
- XtUnmanageChild(parashell);
- */
-}
-
-Widget CreateParameterWindow(Widget parent)
-{
- Arg args[20];
- int n;
- Widget wform, frame1, frame2, wlabel,
- wmodify, wdismiss;
- XmFontList fontlist;
- XFontStruct * font;
- XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET;
-
- InitBuf();
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR Parameter List"); n++;
- XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++;
- XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++;
- XtSetArg(args[n], XmNwidth, 350); n++;
- XtSetArg(args[n], XmNheight, 400); n++;
- XtSetArg(args[n], XmNminWidth, 250); n++;
- XtSetArg(args[n], XmNminHeight, 150); n++;
-
- parashell = XtAppCreateShell("Parameter List", "virtual_vcr",
- topLevelShellWidgetClass, display, args, n);
- /*
- parashell = XmCreateDialogShell(parent, "virtual_vcr", args, n);
- */
-
- font = XLoadQueryFont (XtDisplay (parashell), "courB14");
- fontlist = XmStringCreateFontList (font, cset);
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual Parameter List"); n++;
- wform = XmCreateForm(parashell, "Parameters", args, n);
- XtManageChild(wform);
- /*
- parashell = wform = XmCreateForm(parashell, "Parameters", args, n);
- */
-
- n = 0;
- wmodify = XmCreatePushButton (wform, "Update", args, n);
- XtManageChild(wmodify);
- XtAddCallback (wmodify, XmNactivateCallback, (XtCallbackProc)modifyCB, NULL);
- wdismiss = XmCreatePushButton (wform, "Dismiss", args, n);
- XtManageChild(wdismiss);
- XtAddCallback (wdismiss, XmNactivateCallback, (XtCallbackProc)dismissCB, NULL);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 20); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wmodify, args, n);
-
- n = 0;
- XtSetArg(args[n], XmNcolumns, 10); n++;
- XtSetArg (args[n], XmNleftOffset, 90); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- wparafield = XmCreateTextField(wform, "updata_text", args, n);
- XtManageChild(wparafield);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNrightOffset, 20); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wdismiss, args, n);
-
- n = 0;
- XtSetArg (args[n], XmNtopOffset, 5); n++;
- XtSetArg (args[n], XmNleftOffset, 5); n++;
- XtSetArg (args[n], XmNbottomOffset, 45); n++;
- XtSetArg (args[n], XmNrightOffset, 5); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNfontList, fontlist); n++;
- XtSetArg(args[n], XmNvisibleItemCount, NUM_LIST_ITEMS); n++;
-
- {
- int items;
- XmString * item;
- int i;
- /*
- fprintf(stderr, "Total parameter items: %d\n", items);
- */
- for (items = 0; para[items].title[0] != 0; items ++);
- if (items > ITEMS)
- items = ITEMS;
- else if (items < ITEMS)
- {
- fprintf(stderr, "Error in para.c: fewer titles than parameters, %d out of %d.\n",
- items, ITEMS);
- exit(1);
- }
- item = (XmString *)malloc(sizeof(*item) * items);
- if (item == NULL)
- {
- perror("UI allocate parameter list item(XmString)");
- exit(1);
- }
- for (i = 0; i < items; i ++)
- {
- char buf[100];
- if (para[i].float_tag)
- sprintf(buf, "%s: %f", para[i].title, fconfig[i]);
- else
- sprintf(buf, "%s: %d", para[i].title, config[i]);
- item[i] = (XmString)XmStringCreateLtoR(buf, XmStringTag);
- }
- XtSetArg(args[n], XmNitems, item); n++;
- XtSetArg(args[n], XmNitemCount, items); n++;
- XtSetArg(args[n], XmNselectedItems, item); n++;
- XtSetArg(args[n], XmNselectedItemCount, 1); n++;
- wparalist = XmCreateScrolledList(wform, "ParameterList", args, n);
- XtManageChild(wparalist);
- for (i = 0; i < items; i++)
- XmStringFree(item[i]);
- free(item);
- }
- XmFontListFree(fontlist);
-
- n=0;
- XtSetArg (args[n], XmNtopOffset, 5); n++;
- XtSetArg (args[n], XmNleftOffset, 5); n++;
- XtSetArg (args[n], XmNbottomOffset, 45); n++;
- XtSetArg (args[n], XmNrightOffset, 5); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- frame2 = XmCreateFrame (wform, "frame", args, n);
- XtManageChild(frame2);
-
- n=0;
- XtSetArg (args[n], XmNtopOffset, 0); n++;
- XtSetArg (args[n], XmNleftOffset, 0); n++;
- XtSetArg (args[n], XmNbottomOffset, 0); n++;
- XtSetArg (args[n], XmNrightOffset, 0); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- frame1 = XmCreateFrame (wform, "frame", args, n);
- XtManageChild(frame1);
-
- return parashell;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp
deleted file mode 100644
index 4a2b152ca6c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp
+++ /dev/null
@@ -1,446 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#define NO_SANITY_CHECKS
-#include <assert.h>
-#include "video.h"
-#include "proto.h"
-#include "decoders.h"
-
-/* External declarations. */
-
-extern int zigzag_direct[];
-
-/* Macro for returning 1 if num is positive, -1 if negative, 0 if 0. */
-
-#define Sign(num) ((num > 0) ? 1 : ((num == 0) ? 0 : -1))
-
-
-/*
- *--------------------------------------------------------------
- *
- * ParseReconBlock --
- *
- * Parse values for block structure from bitstream.
- * n is an indication of the position of the block within
- * the macroblock (i.e. 0-5) and indicates the type of
- * block (i.e. luminance or chrominance). Reconstructs
- * coefficients from values parsed and puts in
- * block.dct_recon array in vid stream structure.
- * sparseFlag is set when the block contains only one
- * coeffictient and is used by the IDCT.
- *
- * Results:
- *
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-#define DCT_recon blockPtr->dct_recon
-#define DCT_dc_y_past blockPtr->dct_dc_y_past
-#define DCT_dc_cr_past blockPtr->dct_dc_cr_past
-#define DCT_dc_cb_past blockPtr->dct_dc_cb_past
-
-#define DECODE_DCT_COEFF_FIRST DecodeDCTCoeffFirst
-#define DECODE_DCT_COEFF_NEXT DecodeDCTCoeffNext
-
-void
-ParseReconBlock(int n)
-{
-#ifdef RISC
- unsigned int temp_curBits;
- int temp_bitOffset;
- int temp_bufLength;
- unsigned int *temp_bitBuffer;
-#endif
-
- Block *blockPtr = &curVidStream->block;
- int coeffCount;
-
- if (bufLength < 2)
- correct_underflow();
-
-#ifdef RISC
- temp_curBits = curBits;
- temp_bitOffset = bitOffset;
- temp_bufLength = bufLength;
- temp_bitBuffer = bitBuffer;
-#endif
-
- {
- /*
- * Copy the globals curBits, bitOffset, bufLength, and bitBuffer
- * into local variables with the same names, so the macros use the
- * local variables instead. This allows register allocation and
- * can provide 1-2 fps speedup. On machines with not so many registers,
- * don't do this.
- */
-#ifdef RISC
- register unsigned int curBits = temp_curBits;
- register int bitOffset = temp_bitOffset;
- register int bufLength = temp_bufLength;
- register unsigned int *bitBuffer = temp_bitBuffer;
-#endif
-
- int diff;
- int size, level, i, run, pos, coeff;
- short int *reconptr;
- unsigned char *iqmatrixptr, *niqmatrixptr;
- int qscale;
-
- reconptr = DCT_recon[0];
-
- /*
- * Hand coded version of memset that's a little faster...
- * Old call:
- * memset((char *) DCT_recon, 0, 64*sizeof(short int));
- */
- {
- INT32 *p;
- p = (INT32 *) reconptr;
-
- p[0] = p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = p[8] = p[9] =
- p[10] = p[11] = p[12] = p[13] = p[14] = p[15] = p[16] = p[17] = p[18] =
- p[19] = p[20] = p[21] = p[22] = p[23] = p[24] = p[25] = p[26] = p[27] =
- p[28] = p[29] = p[30] = p[31] = 0;
-
- }
-
- if (curVidStream->mblock.mb_intra) {
-
- if (n < 4) {
-
- /*
- * Get the luminance bits. This code has been hand optimized to
- * get by the normal bit parsing routines. We get some speedup
- * by grabbing the next 16 bits and parsing things locally.
- * Thus, calls are translated as:
- *
- * show_bitsX <--> next16bits >> (16-X)
- * get_bitsX <--> val = next16bits >> (16-flushed-X);
- * flushed += X;
- * next16bits &= bitMask[flushed];
- * flush_bitsX <--> flushed += X;
- * next16bits &= bitMask[flushed];
- *
- * I've streamlined the code a lot, so that we don't have to mask
- * out the low order bits and a few of the extra adds are removed.
- * bsmith
- */
- unsigned int next16bits, index, flushed;
-
- show_bits16(next16bits);
- index = next16bits >> (16-7);
- size = dct_dc_size_luminance[index].value;
- flushed = dct_dc_size_luminance[index].num_bits;
- next16bits &= bitMask[16+flushed];
-
- if (size != 0) {
- flushed += size;
- diff = next16bits >> (16-flushed);
- if (!(diff & bitTest[32-size])) {
- diff = rBitMask[size] | (diff + 1);
- }
- } else {
- diff = 0;
- }
- flush_bits(flushed);
-
- if (n == 0) {
- coeff = diff << 3;
- if (curVidStream->mblock.mb_address -
- curVidStream->mblock.past_intra_addr > 1)
- coeff += 1024;
- else coeff += DCT_dc_y_past;
- DCT_dc_y_past = coeff;
- } else {
- coeff = DCT_dc_y_past + (diff << 3);
- DCT_dc_y_past = coeff;
- }
- } else {
-
- /*
- * Get the chrominance bits. This code has been hand optimized to
- * as described above
- */
- unsigned int next16bits, index, flushed;
-
- show_bits16(next16bits);
- index = next16bits >> (16-8);
- size = dct_dc_size_chrominance[index].value;
- flushed = dct_dc_size_chrominance[index].num_bits;
- next16bits &= bitMask[16+flushed];
-
- if (size != 0) {
- flushed += size;
- diff = next16bits >> (16-flushed);
- if (!(diff & bitTest[32-size])) {
- diff = rBitMask[size] | (diff + 1);
- }
- } else {
- diff = 0;
- }
- flush_bits(flushed);
-
- if (n == 4) {
- coeff = diff << 3;
- if (curVidStream->mblock.mb_address -
- curVidStream->mblock.past_intra_addr > 1)
- coeff += 1024;
- else coeff += DCT_dc_cr_past;
- DCT_dc_cr_past = coeff;
-
- } else {
- coeff = diff << 3;
- if (curVidStream->mblock.mb_address -
- curVidStream->mblock.past_intra_addr > 1)
- coeff += 1024;
- else coeff += DCT_dc_cb_past;
- DCT_dc_cb_past = coeff;
- }
- }
-
- *reconptr = coeff;
- i = 0; pos = 0;
- coeffCount = (coeff != 0);
-
- if (curVidStream->picture.code_type != 4) {
-
- qscale = curVidStream->slice.quant_scale;
- iqmatrixptr = curVidStream->intra_quant_matrix[0];
-
- while(1) {
-
- DECODE_DCT_COEFF_NEXT(run, level);
-
- if (run == END_OF_BLOCK) break;
-
- i = i + run + 1;
- pos = zigzag_direct[i];
- coeff = (level * qscale * ((int) iqmatrixptr[pos])) >> 3;
- if (level < 0) {
- coeff += (coeff & 1);
- } else {
- coeff -= (coeff & 1);
- }
-
- reconptr[pos] = coeff;
- if (coeff) {
- coeffCount++;
- }
-
- }
-
-#ifdef ANALYSIS
-
- {
- extern unsigned int *mbCoeffPtr;
- mbCoeffPtr[pos]++;
- }
-#endif
-
- flush_bits(2);
-
- goto end;
- }
- }
-
- else {
-
- niqmatrixptr = curVidStream->non_intra_quant_matrix[0];
- qscale = curVidStream->slice.quant_scale;
-
- DECODE_DCT_COEFF_FIRST(run, level);
- i = run;
-
- pos = zigzag_direct[i];
- if (level < 0) {
- coeff = (((level<<1) - 1) * qscale *
- ((int) (niqmatrixptr[pos]))) >> 4;
- coeff += (coeff & 1);
- } else {
- coeff = (((level<<1) + 1) * qscale *
- ((int) (*(niqmatrixptr+pos)))) >> 4;
- coeff -= (coeff & 1);
- }
- reconptr[pos] = coeff;
- if (coeff) {
- coeffCount = 1;
- }
-
- if (curVidStream->picture.code_type != 4) {
-
- while(1) {
-
- DECODE_DCT_COEFF_NEXT(run, level);
-
- if (run == END_OF_BLOCK) break;
-
- i = i+run+1;
- pos = zigzag_direct[i];
- if (level < 0) {
- coeff = (((level<<1) - 1) * qscale *
- ((int) (niqmatrixptr[pos]))) >> 4;
- coeff += (coeff & 1);
- } else {
- coeff = (((level<<1) + 1) * qscale *
- ((int) (*(niqmatrixptr+pos)))) >> 4;
- coeff -= (coeff & 1);
- }
- reconptr[pos] = coeff;
- if (coeff) {
- coeffCount++;
- }
- }
-
-#ifdef ANALYSIS
- {
- extern unsigned int *mbCoeffPtr;
- mbCoeffPtr[pos]++;
- }
-#endif
-
- flush_bits(2);
-
- goto end;
- }
- }
-
- end:
-
- if (coeffCount == 1) j_rev_dct_sparse (reconptr, pos);
- else j_rev_dct(reconptr);
-
-#ifdef RISC
- temp_curBits = curBits;
- temp_bitOffset = bitOffset;
- temp_bufLength = bufLength;
- temp_bitBuffer = bitBuffer;
-#endif
-
- }
-
-#ifdef RISC
- curBits = temp_curBits;
- bitOffset = temp_bitOffset;
- bufLength = temp_bufLength;
- bitBuffer = temp_bitBuffer;
-#endif
-}
-
-#undef DCT_recon
-#undef DCT_dc_y_past
-#undef DCT_dc_cr_past
-#undef DCT_dc_cb_past
-
-
-/*
- *--------------------------------------------------------------
- *
- * ParseAwayBlock --
- *
- * Parses off block values, throwing them away.
- * Used with grayscale dithering.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-ParseAwayBlock(int n)
-{
- unsigned int diff;
- unsigned int size, run;
- int level;
-
- if (bufLength < 2)
- correct_underflow();
-
- if (curVidStream->mblock.mb_intra) {
-
- /* If the block is a luminance block... */
-
- if (n < 4) {
-
- /* Parse and decode size of first coefficient. */
-
- DecodeDCTDCSizeLum(size);
-
- /* Parse first coefficient. */
-
- if (size != 0) {
- get_bitsn(size, diff);
- }
- }
-
- /* Otherwise, block is chrominance block... */
-
- else {
-
- /* Parse and decode size of first coefficient. */
-
- DecodeDCTDCSizeChrom(size);
-
- /* Parse first coefficient. */
-
- if (size != 0) {
- get_bitsn(size, diff);
- }
- }
- }
-
- /* Otherwise, block is not intracoded... */
-
- else {
-
- /* Decode and set first coefficient. */
-
- DECODE_DCT_COEFF_FIRST(run, level);
- }
-
- /* If picture is not D type (i.e. I, P, or B)... */
-
- if (curVidStream->picture.code_type != 4) {
-
- /* While end of macroblock has not been reached... */
-
- while (1) {
-
- /* Get the dct_coeff_next */
-
- DECODE_DCT_COEFF_NEXT(run, level);
-
- if (run == END_OF_BLOCK) break;
- }
-
- /* End_of_block */
-
- flush_bits(2);
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp
deleted file mode 100644
index 60fb1c13e6b..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp
+++ /dev/null
@@ -1,916 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "video.h"
-#include <X11/Intrinsic.h>
-#include <Xm/List.h>
-#include <Xm/Frame.h>
-#include <Xm/PushB.h>
-#include <Xm/Form.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/DialogS.h>
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-
-#define NUM_LIST_ITEMS 20
-#define STRING_SIZE 100
-#define ITEMS 100
-#define PROGRAM_FILE "~/.vcr/vcrPrograms"
-#define BANNER "Virtual VCR Program DataBase. version 2.0 **DO NOT edit**"
-#ifdef XmFONTLIST_DEFAULT_TAG
-#define XmStringTag XmFONTLIST_DEFAULT_TAG
-#else
-#define XmStringTag XmSTRING_DEFAULT_CHARSET
-#endif
-
-static int cmdSocket;
-static int *playtag;
-static Widget titlewidget, progshell, progmodifyshell;
-static Widget wproglist, wprogmodify;
-
-static int items = 0;
-static XmString * item;
-static struct ProgramList
-{
- char title[STRING_SIZE];
- char vh[STRING_SIZE];
- char vf[STRING_SIZE];
- char ah[STRING_SIZE];
- char af[STRING_SIZE];
-} * prog;
-
-static int progcmd, progid; /* progcmd == 0 - insert, 1 - modify*/
-static struct ProgramList deletedprog;
-
-#define LINE1 " Program Title: "
-#define LINE2 "Video file host: "
-#define LINE3 "Video file path: "
-#define LINE4 "Audio file host: "
-#define LINE5 "Audio file path: "
-#define MarginHeight 10
-#define MarginWidth 10
-static int charHeight, charWidth;
-static int titleSize;
-
-#define Fgets(s) {if (feof(fp) || fgets(s, STRING_SIZE, fp) == NULL) break; s[strlen(s)-1] = 0; }
-
-#define Fputs(s) {fputs(s, fp); fputc('\n', fp);}
-
-static void SaveBuf(void);
-
-static void InitBuf(void)
-{
- FILE * fp;
- char *fname;
- char buf[256];
- int copyTag = 0;
-
- deletedprog.title[0] = 0;
-
- item = (XmString *)malloc(sizeof(*item) * ITEMS);
- if (item == NULL)
- {
- perror("UI allocate proglist item(XmString)");
- exit(1);
- }
- prog = (struct ProgramList *) malloc(sizeof(*prog) * ITEMS);
- if (prog == NULL)
- {
- perror("UI allocate prog");
- exit(1);
- }
- fp = NULL;
- if (proglistName[0] != 0) { /* file name given in command line */
- get_full_path(proglistName, buf, 256);
- fname = proglistName;
- fp = fopen(buf, "r");
- if (fp == NULL) {
- fprintf(stderr,"PROG.C error opening %s:", proglistName);
- perror("");
- }
- }
- if (fp == NULL) {
- get_full_path(PROGRAM_FILE, buf, 256);
- fname = PROGRAM_FILE;
- fp = fopen(buf, "r");
- }
- if (fp == NULL) {
- {
-
- InitBuf_exit1:
-
- get_full_path(PROGRAM_FILE, buf, 256);
- if (access(buf, 0) != 0) { /* PROGRAM_FILE does not exist, create it */
- if (strchr(fname, '/') != NULL) { /* create the default directory */
- char *ptr = strrchr(buf, '/');
- *ptr = 0;
- mkdir(buf, 0755);
- *ptr = '/';
- }
- fname = PROGRAM_FILE;
- fp = fopen(buf, "w+");
- }
- else { /* Exist, create a temp file in /tmp */
- char *ptr = tempnam("/tmp/", "vcr");
- fname = tmpnam(NULL);
- if (ptr != NULL) {
- strncpy(fname, ptr, L_tmpnam);
- free(ptr);
- }
- strcpy(buf, fname);
- fp = tmpfile();
- }
- if (fp != NULL) {
- if (strncmp(fname, "/tmp/", 5) != 0) {
- fprintf(stderr,
- "Warning: created file %s with default movie list.\n",
- fname);
- }
- else fprintf(stderr, "Warning: using default movie list.\n");
- fprintf(fp, "%s\n", BANNER);
- fprintf(fp, "\
-lemond: (va) Blazers Game 1 (128)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/c1.0.300.128.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/c1.0.300.au\n\
-lemond: (va) Blazers Game 1 (256)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/c1.0.300.256.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/c1.0.300.au\n\
-lemond: (va) Blazers Game 1 (320)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/c1.0.300.320.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/c1.0.300.au\n\
-lemond: (va) Blazers Game 2 (128)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/h1.0.300.128.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/h1.0.300.au\n\
-lemond: (va) Blazers Game 2 (256)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/h1.0.300.256.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/h1.0.300.au\n\
-lemond: (va) Blazers Game 2 (320)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/h1.0.300.320.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/h1.0.300.au\n\
-lemond: (va) Blazers Game 3 (128)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/s1.0.300.128.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/s1.0.300.au\n\
-lemond: (va) Blazers Game 3 (256)\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/s1.0.300.256.mpg\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/s1.0.300.au\n\
-lemond: (vo) Skiing on Mt. Rainer\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/skiRainer.mpeg\n\
-\n\
-\n\
-lemond: (ao) Following the sense (Chinese song)\n\
-\n\
-\n\
-lemond.cse.ogi.edu\n\
-/projects/dsrg/L/multimedia3/sense.au\n\
-");
- fseek(fp, (long)0, 0);
- fgets(buf, 100, fp);
- goto InitBuf_continue;
- /*
- fclose(fp);
- fp = fopen(buf, "r");
- if (fp != NULL) {
- fgets(buf, 100, fp);
- goto InitBuf_continue;
- }
- else {
- fprintf(stderr, "Warning: failed to read newly created %s:", buf);
- perror("");
- }
- */
- }
- else {
- fprintf(stderr, "Warning: failed to create %s:", buf);
- perror("");
- }
- items = 0;
- return;
- }
- }
- if (fgets(buf, 100, fp) == NULL)
- {
- fclose(fp);
- goto InitBuf_exit1;
- }
- buf[strlen(buf)-1] = 0;
- if (strncmp(buf, BANNER, strlen(BANNER)))
- {
- fprintf(stderr, "BANNER in %s not expected\n", fname);
- fprintf(stderr, " Expected: %s\n", BANNER);
- fprintf(stderr, " Actual : %s\n", buf);
- fclose(fp);
- goto InitBuf_exit1;
- }
-
- InitBuf_continue:
-
- items = 0;
- for(;;)
- {
- /*
- fprintf(stderr, "Reading next program.\n");
- */
- Fgets(prog[items].title);
- Fgets(prog[items].vh);
- Fgets(prog[items].vf);
- Fgets(prog[items].ah);
- Fgets(prog[items].af);
- item[items] = (XmString)XmStringCreateLtoR(prog[items].title, XmStringTag);
- if ((++items) >= ITEMS) break;
- }
- /*
- fprintf(stderr, "Total programs %d\n", items);
- */
- fclose(fp);
- if (copyTag) {
- SaveBuf();
- }
-}
-
-static void SaveBuf(void)
-{
- int i;
- FILE * fp;
- char buf[256];
- get_full_path(PROGRAM_FILE, buf, 256);
- fp = fopen(buf, "w");
- if (fp == NULL)
- {
- fprintf(stderr, "Fail to open %s for saving programs", buf);
- perror("");
- return;
- }
- Fputs(BANNER);
- for (i = 0; i < items; i++)
- {
- Fputs(prog[i].title);
- Fputs(prog[i].vh);
- Fputs(prog[i].vf);
- Fputs(prog[i].ah);
- Fputs(prog[i].af);
- }
- fclose(fp);
-}
-
-static void CmdWrite(char * buf, int size)
-{
- if (size == 0) return;
- while (write(cmdSocket, (buf), (size)) == -1)
- {
- if (errno == EINTR) continue;
- perror("UI write to cmdSocket");
- exit(1);
- }
-}
-
-void StartProgram(char * title, char * vh, char * vf, char * ah, char * af)
-{
- extern int cmdBusy;
- char tmp = CmdINIT;
- int len;
- if (!cmdBusy) {
- char *str = title;
- len = strlen(str);
- if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0;
- str = vh;
- len = strlen(str);
- if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0;
- str = vf;
- len = strlen(str);
- if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0;
- str = ah;
- len = strlen(str);
- if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0;
- str = af;
- len = strlen(str);
- if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0;
- XmTextFieldSetString(titlewidget, title);
- cmdBusy = 1;
- CmdWrite(&tmp, 1);
- len = strlen(vh);
- CmdWrite((char *)&len, 4);
- CmdWrite(vh, len);
- len = strlen(vf);
- CmdWrite((char *)&len, 4);
- CmdWrite(vf, len);
- len = strlen(ah);
- CmdWrite((char *)&len, 4);
- CmdWrite(ah, len);
- len = strlen(af);
- CmdWrite((char *)&len, 4);
- CmdWrite(af, len);
- }
- else {
- beep();
- }
-}
-
-static int curListPos(void)
-{
- int * poses, count;
-
- if (XmListGetSelectedPos(wproglist, &poses, &count))
- {
- count = poses[0];
- XtFree((char*)poses);
- /*
- fprintf(stderr, "curListPos: current pos = %d\n", count);
- */
- return count - 1;
- }
- return -1;
-}
-
-
-static void modifyprog(struct ProgramList *p)
-{
- XmString item;
-
- if (items <0 || progid >= items || progid < 0)
- { beep(); return; }
- item = (XmString)XmStringCreateLtoR(p->title, XmStringTag);
- XmListReplaceItemsPos(wproglist, &item, 1, progid+1);
- XmListSelectPos(wproglist, progid+1, 0);
- XmStringFree(item);
- memcpy(&(prog[progid]), p, sizeof(*p));
- SaveBuf();
-}
-
-static void insertprog(struct ProgramList *p)
-{
- XmString item;
-
- if (items <= 0 || items >= ITEMS) return;
- memcpy((char*)&(prog[items]), (char *)p, sizeof(*p));
- item = (XmString)XmStringCreateLtoR(p->title, XmStringTag);
- XmListAddItemUnselected(wproglist, item, items+1);
- XmStringFree(item);
- if (items == 0)
- XmListSelectPos(wproglist, 0, False);
- items ++;
- SaveBuf();
-}
-
-static void verifyCB(Widget w, XtPointer closure, XmTextVerifyCallbackStruct * cd);
-
-static void deleteCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- int i, j;
-
- return;
-
- /*
- if (items <= 0) { beep(); return; }
- j = curListPos();
- if (j == -1) return;
- memcpy(&deletedprog, &prog[j], sizeof(deletedprog));
- for (i = j+1; i < items; i++)
- memcpy(&prog[i-1], &prog[i], sizeof(*prog));
- XmListDeletePos(wproglist, j+1);
- items --;
- SaveBuf();
- */
-}
-
-static void undoCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- return;
- /*
- if (deletedprog.title[0] != 0)
- {
- insertprog(&deletedprog);
- deletedprog.title[0] = 0;
- }
- else
- beep();
- */
-}
-
-static void setposition(Widget w, int x, int y);
-
-static void insertCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- char buf[1000];
-
- return;
-
-#if 0
- if (items >= ITEMS -1)
- {
- beep();
- return;
- }
- XtRemoveAllCallbacks(wprogmodify, XmNmodifyVerifyCallback);
- XtRemoveAllCallbacks(wprogmodify, XmNmotionVerifyCallback);
- progcmd = 0;
- sprintf(buf, " *** append a program ***\n");
- strcat(buf, LINE1);
- strcat(buf, "\n");
- strcat(buf, LINE2);
- strcat(buf, "\n");
- strcat(buf, LINE3);
- strcat(buf, "\n");
- strcat(buf, LINE4);
- strcat(buf, "\n");
- strcat(buf, LINE5);
- strcat(buf, "\n\n");
- XmTextSetString(wprogmodify, buf);
-
- setposition(wprogmodify, titleSize, 1);
- XtAddCallback (wprogmodify, XmNmodifyVerifyCallback, (XtCallbackProc)verifyCB, NULL);
- XtAddCallback (wprogmodify, XmNmotionVerifyCallback, (XtCallbackProc)verifyCB, NULL);
- /*
- XtManageChild(progmodifyshell);
- */
- XtRealizeWidget(progmodifyshell);
-#endif
-}
-
-static void modifyCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- int i;
- char buf[1000];
- if (items == 0)
- {
- beep();
- return;
- }
- XtRemoveAllCallbacks(wprogmodify, XmNmodifyVerifyCallback);
- XtRemoveAllCallbacks(wprogmodify, XmNmotionVerifyCallback);
- progid = i = curListPos();
- progcmd = 1;
- sprintf(buf, " *** modify program: %s ***\n", prog[i].title);
- strcat(buf, LINE1);
- strcat(buf, prog[i].title);
- strcat(buf, "\n");
- strcat(buf, LINE2);
- strcat(buf, prog[i].vh);
- strcat(buf, "\n");
- strcat(buf, LINE3);
- strcat(buf, prog[i].vf);
- strcat(buf, "\n");
- strcat(buf, LINE4);
- strcat(buf, prog[i].ah);
- strcat(buf, "\n");
- strcat(buf, LINE5);
- strcat(buf, prog[i].af);
- strcat(buf, "\n\n");
- XmTextSetString(wprogmodify, buf);
-
- setposition(wprogmodify, titleSize, 1);
- XtAddCallback (wprogmodify, XmNmodifyVerifyCallback, (XtCallbackProc)verifyCB, NULL);
- XtAddCallback (wprogmodify, XmNmotionVerifyCallback, (XtCallbackProc)verifyCB, NULL);
- /*
- XtManageChild(progmodifyshell);
- */
- XtRealizeWidget(progmodifyshell);
-}
-
-static void playCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- /*
- fprintf(stderr, "play");
- */
- if (items > 0)
- {
- int i = curListPos();
- if (i >= items || i < 0)
- return;
- StartProgram(prog[i].title, prog[i].vh, prog[i].vf, prog[i].ah, prog[i].af);
- }
-}
-
-static void dismissCB(Widget W, XtPointer closure, XtPointer call_data)
-{
-
- XtUnrealizeWidget(progshell);
- /*
- XtUnmanageChild(progshell);
- */
-}
-
-static void setposition(Widget w, int x, int y)
-{
- Position x1, y1;
- x1 = charWidth * x + (MarginWidth+4);
- y1 = charHeight * y + (charHeight+MarginHeight+1);
- XmTextSetInsertionPosition(w, XmTextXYToPos(w, x1, y1));
-}
-
-static int getposition(Widget w, XmTextVerifyCallbackStruct * cd,
- int * x, int *y)
-{
- Position x1, y1;
- if (!XmTextPosToXY(w, cd->newInsert, &x1, &y1))
- return 0;
- *x = (x1-(MarginWidth+4))/charWidth;
- *y = (y1-(charHeight+MarginHeight+1))/charHeight;
- if ((*x)*charWidth != x1-(MarginWidth+4) || (*y)*charHeight != y1-(charHeight+MarginHeight+1))
- {
- /*
- fprintf(stderr, "error: TextCursorConversion failed. \007\n");
- fprintf(stderr, "x-%d, x1-%d, y-%d, y1-%d\n", *x, (int)x1, *y, (int)y1);
- */
- return 1;
- }
- return 1;
-
-}
-
-static void modifydismissCB(Widget w, XtPointer closure, XtPointer call_data)
-{
-
- XtUnrealizeWidget(progmodifyshell);
- /*
- XtUnmanageChild(progmodifyshell);
- */
-}
-
-static void modifysaveCB(Widget w, XtPointer closure, XtPointer call_data)
-{
- return;
-
-#if 0
- if (progcmd == 1 && items <= progid)
- {
- beep();
- }
- else if (progcmd == 1 || progcmd == 0)
- {
- char * buf, * ptr, *ptr1;
- struct ProgramList p;
- buf = XmTextGetString(wprogmodify);
- ptr = buf;
- fprintf(stderr, "Buf: %s\n", buf);
- while (*ptr != '\n') ptr ++;
- ptr ++;
-
- ptr1 = ptr + titleSize;
- while (*ptr != '\n') ptr ++;
- (*ptr) = 0; ptr ++;
- strncpy(p.title, ptr1, STRING_SIZE);
- p.title[STRING_SIZE-1] = 0;
-
- ptr1 = ptr + titleSize;
- while (*ptr != '\n') ptr ++;
- (*ptr) = 0; ptr ++;
- strncpy(p.vh, ptr1, STRING_SIZE);
- p.vh[STRING_SIZE-1] = 0;
-
- ptr1 = ptr + titleSize;
- while (*ptr != '\n') ptr ++;
- (*ptr) = 0; ptr ++;
- strncpy(p.vf, ptr1, STRING_SIZE);
- p.vf[STRING_SIZE-1] = 0;
-
- ptr1 = ptr + titleSize;
- while (*ptr != '\n') ptr ++;
- (*ptr) = 0; ptr ++;
- strncpy(p.ah, ptr1, STRING_SIZE);
- p.ah[STRING_SIZE-1] = 0;
-
- ptr1 = ptr + titleSize;
- while (*ptr != '\n') ptr ++;
- (*ptr) = 0;
- strncpy(p.af, ptr1, STRING_SIZE);
- p.af[STRING_SIZE-1] = 0;
- /*
- fprintf(stderr, "*|%s||%s||%s||%s||%s||*\n", p.title, p.vh, p.vf, p.ah, p.af);
- */
- XtFree((char *)buf);
- if (progcmd == 1)
- modifyprog(&p);
- else
- insertprog(&p);
- }
-#endif
-}
-
-static void verifyCB(Widget w, XtPointer closure, XmTextVerifyCallbackStruct * cd)
-{
- int x = 0, y = 0;
-
- if (!getposition(w, cd, &x, &y))
- {
- fprintf(stderr, "error on conversion to x/y\n");
- return;
- }
-/*
- fprintf(stderr, "verifyCB: %d (x-%d, y-%d)\n",cd->newInsert, x, y);
-*/
- if (x < titleSize || x > titleSize+STRING_SIZE || y < 1 || y > 5)
- {
- beep();
- cd->doit = False;
- return;
- }
- else
- return;
-}
-
-static void CreateModifyWindow(Widget parent)
-{
- Arg args[20];
- int n;
- Widget wform, wtext, wdone, wcancel;
- XmFontList fontlist;
- XFontStruct * font;
- XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET;
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR Program List Edit"); n++;
- XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++;
- XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++;
- XtSetArg(args[n], XmNwidth, 700); n++;
- XtSetArg(args[n], XmNheight, 160); n++;
- XtSetArg(args[n], XmNallowShellResize, False); n++;
-
- progmodifyshell = XtAppCreateShell("Program List", "virtual_vcr",
- topLevelShellWidgetClass, display, args, n);
- /*
- progmodifyshell = XmCreateDialogShell(parent, "virtual_vcr", args, n);
- */
- n = 0;
-
- /* Create form widget */
- n = 0;
- XtSetArg (args[n], XmNallowShellResize, False); n++;
- /*
- XtSetArg (args[n], XmNheight, 300); n++;
- XtSetArg (args[n], XmNwidth, 800); n++;
- */
- wform = XmCreateForm(progmodifyshell, "Programs", args, n);
-
- XtManageChild(wform);
-
- font = XLoadQueryFont (XtDisplay (progmodifyshell), "8x13");
- charHeight = 13;
- charWidth = 8;
- fontlist = XmStringCreateFontList (font, cset);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 20); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- wdone = XmCreatePushButton (wform, "Save", args, n);
- XtManageChild(wdone);
- XtAddCallback (wdone, XmNactivateCallback, (XtCallbackProc)modifysaveCB, NULL);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNrightOffset, 20); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- wcancel = XmCreatePushButton (wform, "Dismiss", args, n);
- XtManageChild(wcancel);
- XtAddCallback (wcancel, XmNactivateCallback, (XtCallbackProc)modifydismissCB, NULL);
-
- titleSize = strlen(LINE1);
-
- n=0;
- XtSetArg (args[n], XmNleftOffset, 5); n++;
- XtSetArg (args[n], XmNtopOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNcolumns, titleSize + STRING_SIZE+1); n++;
- XtSetArg(args[n], XmNrows, 7); n++;
-/*
- XtSetArg(args[n], XmNeditable, True); n++;
-*/
- XtSetArg(args[n], XmNeditable, False); n++;
-
- XtSetArg(args[n], XmNmarginHeight, MarginHeight); n++;
- XtSetArg(args[n], XmNmarginWidth, MarginWidth); n++;
- XtSetArg(args[n], XmNborderWidth, 0); n++;
- XtSetArg(args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++;
- /*
- XtSetArg(args[n], XmNvalue, new_string1); n++;
- */
- XtSetArg(args[n], XmNfontList, fontlist); n++;
- wtext = XmCreateText(wform, "Virtual VCR program list modify text", args, n);
-
- XtManageChild(wtext);
-
- XmFontListFree (fontlist);
- wprogmodify = wtext;
-}
-
-Widget CreateProgramWindow(Widget parent, int cmdSock, int * playflag, Widget frametext)
-{
- Arg args[20];
- int n;
- Widget wform, frame1, frame2, wlist,
- wdelete, wundo, winsert, wmodify, wplay, wdismiss;
- XmFontList fontlist;
- XFontStruct * font;
- XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET;
-
- cmdSocket = cmdSock;
- playtag = playflag;
- titlewidget = frametext;
-
- InitBuf();
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR Program List"); n++;
- XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++;
- XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++;
- XtSetArg(args[n], XmNwidth, 396); n++;
- XtSetArg(args[n], XmNheight, 300); n++;
- XtSetArg(args[n], XmNminWidth, 396); n++;
- XtSetArg(args[n], XmNminHeight, 150); n++;
-
- progshell = XtAppCreateShell("Program List", "virtual_vcr",
- topLevelShellWidgetClass, display, args, n);
- /*
- progshell = XmCreateDialogShell(parent, "virtual_vcr", args, n);
- */
- font = XLoadQueryFont (XtDisplay (progshell), "courB14");
- fontlist = XmStringCreateFontList (font, cset);
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Program List"); n++;
- wform = XmCreateForm(progshell, "Programs", args, n);
-
- XtManageChild(wform);
-
- n = 0;
- wdelete = XmCreatePushButton (wform, "Delete", args, n);
- XtManageChild(wdelete);
- XtAddCallback (wdelete, XmNactivateCallback, (XtCallbackProc)deleteCB, NULL);
- wundo = XmCreatePushButton (wform, "Undo", args, n);
- XtManageChild(wundo);
- XtAddCallback (wundo, XmNactivateCallback, (XtCallbackProc)undoCB, NULL);
- winsert = XmCreatePushButton (wform, "Insert", args, n);
- XtManageChild(winsert);
- XtAddCallback (winsert, XmNactivateCallback, (XtCallbackProc)insertCB, NULL);
- wmodify = XmCreatePushButton (wform, "Modify", args, n);
- XtManageChild(wmodify);
- XtAddCallback (wmodify, XmNactivateCallback, (XtCallbackProc)modifyCB, NULL);
- wplay = XmCreatePushButton (wform, "Select", args, n);
- XtManageChild(wplay);
- XtAddCallback (wplay, XmNactivateCallback, (XtCallbackProc)playCB, NULL);
- wdismiss = XmCreatePushButton (wform, "Dismiss", args, n);
- XtManageChild(wdismiss);
- XtAddCallback (wdismiss, XmNactivateCallback, (XtCallbackProc)dismissCB, NULL);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 5); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wdelete, args, n);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 70); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wundo, args, n);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 135); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (winsert, args, n);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 200); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wmodify, args, n);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 265); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wplay, args, n);
-
- n=0;
- XtSetArg (args[n], XmNwidth, 60); n++;
- XtSetArg (args[n], XmNheight, 28); n++;
- XtSetArg (args[n], XmNleftOffset, 330); n++;
- XtSetArg (args[n], XmNbottomOffset, 5); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetValues (wdismiss, args, n);
-
- n = 0;
- XtSetArg (args[n], XmNtopOffset, 2); n++;
- XtSetArg (args[n], XmNleftOffset, 2); n++;
- XtSetArg (args[n], XmNbottomOffset, 38); n++;
- XtSetArg (args[n], XmNrightOffset, 2); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNfontList, fontlist); n++;
- XtSetArg(args[n], XmNvisibleItemCount, NUM_LIST_ITEMS); n++;
- if (items > 0)
- {
- XtSetArg(args[n], XmNitems, item); n++;
- XtSetArg(args[n], XmNitemCount, items); n++;
- XtSetArg(args[n], XmNselectedItems, item); n++;
- XtSetArg(args[n], XmNselectedItemCount, 1); n++;
- }
- wlist = XmCreateScrolledList(wform, "ProgramList", args, n);
- XtManageChild(wlist);
- XmFontListFree(fontlist);
- wproglist = wlist;
- for (n = 0; n < items; n++)
- XmStringFree(item[n]);
- free(item);
-
- n=0;
- XtSetArg (args[n], XmNtopOffset, 2); n++;
- XtSetArg (args[n], XmNleftOffset, 2); n++;
- XtSetArg (args[n], XmNbottomOffset, 38); n++;
- XtSetArg (args[n], XmNrightOffset, 2); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- frame2 = XmCreateFrame (wform, "frame", args, n);
- XtManageChild(frame2);
-
- n=0;
- XtSetArg (args[n], XmNtopOffset, 0); n++;
- XtSetArg (args[n], XmNleftOffset, 0); n++;
- XtSetArg (args[n], XmNbottomOffset, 0); n++;
- XtSetArg (args[n], XmNrightOffset, 0); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- frame1 = XmCreateFrame (wform, "frame", args, n);
- XtManageChild(frame1);
-
- CreateModifyWindow(parent);
-
- return progshell;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h
deleted file mode 100644
index 762a66d184d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* $Id$ */
-
-
-#ifdef __STDC__
-# define P(s) s
-#else
-# define P(s) ()
-#endif
-
-
-/* util.c */
-void correct_underflow P((void ));
-int next_bits P((int num , unsigned int mask ));
-char *get_ext_data P((void ));
-int next_start_code P((void ));
-char *get_extra_bit_info P((void ));
-
-/* video.c */
-void init_stats P((void ));
-void PrintAllStats P((void ));
-double ReadSysClock P((void ));
-void PrintTimeInfo P((void ));
-VidStream *NewVidStream P((void ));
-void DestroyVidStream P((VidStream *astream ));
-PictImage *NewPictImage P((unsigned int width , unsigned int height ));
-void DestroyPictImage P((PictImage *apictimage ));
-int mpegVidRsrc P((char *p ));
-void ToggleBFlag P((void ));
-void TogglePFlag P((void ));
-
-/* parseblock.c */
-void ParseReconBlock P((int n ));
-void ParseAwayBlock P((int n ));
-
-/* motionvector.c */
-void ComputeForwVector P((int *recon_right_for_ptr , int *recon_down_for_ptr ));
-void ComputeBackVector P((int *recon_right_back_ptr , int *recon_down_back_ptr ));
-
-/* decoders.c */
-void init_tables P((void ));
-void decodeDCTDCSizeLum P((unsigned int *value ));
-void decodeDCTDCSizeChrom P((unsigned int *value ));
-void decodeDCTCoeffFirst P((unsigned int *run , int *level ));
-void decodeDCTCoeffNext P((unsigned int *run , int *level ));
-
-/* main.c */
-int get_more_data P((unsigned int *buf_start , int max_length , int *length_ptr , unsigned int **buf_ptr ));
-int main P((int argc , char **argv ));
-void usage P((char *s ));
-
-/* gdith.c */
-void InitColor P((void ));
-int HandleXError P((Display *dpy , XErrorEvent *event ));
-void InstallXErrorHandler P((void ));
-void DeInstallXErrorHandler P((void ));
-void ResizeDisplay P((int w , int h ));
-void InitDisplay P((char *name ));
-void InitGrayDisplay P((char *name ));
-void InitMonoDisplay P((char *name ));
-void InitColorDisplay P((char *name ));
-void ExecuteDisplay P((VidStream *vid_stream ));
-
-/* fs2.c */
-void InitFS2Dither P((void ));
-void FS2DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *disp , int rows , int cols ));
-
-/* fs2fast.c */
-void InitFS2FastDither P((void ));
-void FS2FastDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* fs4.c */
-void InitFS4Dither P((void ));
-void FS4DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *disp , int rows , int cols ));
-
-/* hybrid.c */
-void InitHybridDither P((void ));
-void HybridDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* hybriderr.c */
-void InitHybridErrorDither P((void ));
-void HybridErrorDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* 2x2.c */
-void Init2x2Dither P((void ));
-void RandInit P((int h , int w ));
-void PostInit2x2Dither P((void ));
-void Twox2DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* gray.c */
-void GrayDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* mono.c */
-void MonoDitherImage(register unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w);
-void MonoThresholdImage(unsigned char *lum, unsigned char *cr,
- unsigned char *cb, unsigned char *out,
- int h, int w);
-
-/* jrevdct.c */
-void init_pre_idct P((void ));
-void j_rev_dct_sparse P((DCTBLOCK data , int pos ));
-void j_rev_dct P((DCTBLOCK data ));
-void j_rev_dct_sparse P((DCTBLOCK data , int pos ));
-void j_rev_dct P((DCTBLOCK data ));
-
-/* 24bit.c */
-void InitColorDither P((void ));
-void ColorDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int rows , int cols ));
-
-/* util32.c */
-Visual *FindFullColorVisual P((Display *dpy , int *depth ));
-Window CreateFullColorWindow P((Display *dpy , int x , int y , int w , int h ));
-
-/* ordered.c */
-void InitOrderedDither P((void ));
-void OrderedDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* ordered2.c */
-void InitOrdered2Dither P((void ));
-void Ordered2DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-
-/* mb_ordered.c */
-void InitMBOrderedDither P((void ));
-void MBOrderedDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w ));
-void MBOrderedDitherDisplayCopy P((VidStream *vid_stream , int mb_addr , int motion_forw , int r_right_forw , int r_down_forw , int motion_back , int r_right_back , int r_down_back , unsigned char *past , unsigned char *future ));
-
-#undef P
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp
deleted file mode 100644
index 66ae9219437..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp
+++ /dev/null
@@ -1,989 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with this file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-/* This software is modified on January 15, 1995 by:
- *
- * Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <X11/IntrinsicP.h>
-#include <Xm/DialogS.h>
-#include "mpeg_mib/mibload.h"
-#include "interface/fb.xbm"
-#include "interface/play.xbm"
-#include "interface/step.xbm"
-#include "interface/stop.xbm"
-#include "interface/loop.xbm"
-#include "interface/ff.xbm"
-#include "interface/MainWindow.mib"
-#include "interface/Info.mib"
-#include "video.h"
-
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-
-int cmdBusy = 0;
-
-extern char infomessage[];
-
-/*****************************************************************************/
-
-/* Private Variables and Methods */
-
-static int playtag = 0;
-static int cmdSocket = -1;
-
-/* Intrinsics Application Context */
-static XtAppContext App;
-static Window monitorwindow = (int)NULL;
-static mib_Widget *mainload, *infoload;
-static Widget shell = (int)NULL, infoshell = (int)NULL,
- parashell = (int)NULL, progshell = (int)NULL,
- fileshell = (int)NULL;
-static Widget frametext= (int)NULL;
-static Widget volumescale = (int)NULL, balancescale = (int)NULL,
- speedscale = (int)NULL, positionscale = (int)NULL;
-static int frameshown = 0;
-
-#define MINX 500
-#define MINY 360
-
-static Window displaywin = (int)NULL;
-static int privcolormap = 0;
-
-static void exit_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void info_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void para_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void prog_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void file_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-
-static void loopchange_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void normal_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void fb_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void stop_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void ff_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void step_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void play_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-
-static void volume_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void balance_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void speed_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-static void position_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-
-static void cmdSocket_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-
-static void monitor_expose(Widget, XtPointer, XmDrawingAreaCallbackStruct *);
-
-static void infoclose_callback(Widget, XtPointer, XmAnyCallbackStruct *);
-
-static void CmdWrite(char * buf, int size)
-{
- while (write(cmdSocket, (buf), (size)) == -1)
- {
- if (errno == EINTR) continue;
- perror("UI write to cmdSocket");
- exit(1);
- }
-}
-
-/*****************************************************************************
-
- UICreate: Create/load in a motif interface.
-
- *****************************************************************************/
-
-static void UICreate()
-{
-
- Widget toplevel;
-
- Widget mainwindow,
- temp;
-
- Pixel fg, bg;
- Pixmap button_pix;
-
- XmFontList fontlist;
- XFontStruct * font;
-
- Arg args[20];
- int n, depth;
-
- static String fallbacks[] = {
- "*Foreground: gray20",
- "*BorderWidth: 0",
- "*Background: gray70",
- "*XmToggleButton.selectColor: yellow",
- "*XmToggleButton.indicatorSize: 16",
- "*XmToggleButtonGadget.selectColor: yellow",
- "*XmToggleButtonGadget.indicatorSize: 16",
- "*fontList: -adobe-helvetica-medium-r-normal--14-*-*-*-p-*-iso8859-1",
- "*XmText*fontList: -adobe-courier-medium-r-normal--12-*-*-*-m-70-iso8859-1",
- NULL
- };
-
-/*****************************************************************************/
-
- n = 0;
-
- toplevel = XtAppInitialize(&App, "virtual_vcr", NULL, 0, &argc_share,
- argv_share, fallbacks, args, n);
-
- display = XtDisplay(toplevel);
-
-/******************************************************************************/
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR"); n++;
- XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++;
- XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++;
- XtSetArg(args[n], XmNwidth, MINX); n++;
- XtSetArg(args[n], XmNminWidth, MINX); n++;
- XtSetArg(args[n], XmNheight, MINY); n++;
- XtSetArg(args[n], XmNminHeight, MINY); n++;
-
- shell = XtAppCreateShell("Virtual VCR", "virtual_vcr",
- topLevelShellWidgetClass, display, args, n);
-
-/*****************************************************************************/
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR"); n++;
-
- mainwindow = XmCreateForm(shell, "MainForm", args, n);
- XtManageChild(mainwindow);
- {
- XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET;
- XmString titleString;
-
- font = XLoadQueryFont (XtDisplay (shell), "courB14");
- fontlist = XmStringCreateFontList (font, cset);
-
-
- titleString = XmStringCreateLtoR ("Balance", cset);
- n = 0;
- XtSetArg (args[n], XmNfontList, fontlist); n++;
- XtSetArg (args[n], XmNshowValue, True); n++;
- XtSetArg (args[n], XmNtitleString, titleString); n++;
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- XtSetArg (args[n], XmNmaximum, 100); n++;
- XtSetArg (args[n], XmNvalue, 50); n++;
- XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++;
- XtSetArg (args[n], XmNscaleHeight, 17);n++;
- XtSetArg (args[n], XmNscaleWidth, 100);n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomOffset, 4);n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, 8);n++;
- balancescale = XmCreateScale(mainwindow, "scale", args, n);
- XmStringFree (titleString);
- XtManageChild (balancescale);
- XtAddCallback (balancescale, XmNvalueChangedCallback, (XtCallbackProc)balance_callback, NULL);
- XtAddCallback (balancescale, XmNdragCallback, (XtCallbackProc)balance_callback, NULL);
-
-
- titleString = XmStringCreateLtoR ("Volume", cset);
- n = 0;
- XtSetArg (args[n], XmNfontList, fontlist); n++;
- XtSetArg (args[n], XmNshowValue, True); n++;
- XtSetArg (args[n], XmNtitleString, titleString); n++;
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- XtSetArg (args[n], XmNmaximum, 100); n++;
- XtSetArg (args[n], XmNvalue, DEFAULT_volume); n++;
- XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++;
- XtSetArg (args[n], XmNscaleHeight, 17);n++;
- XtSetArg (args[n], XmNscaleWidth, 100);n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomOffset, 4);n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, 128);n++;
- volumescale = XmCreateScale(mainwindow, "scale", args, n);
- XmStringFree (titleString);
- XtManageChild (volumescale);
- XtAddCallback (volumescale, XmNvalueChangedCallback, (XtCallbackProc)volume_callback, NULL);
- XtAddCallback (volumescale, XmNdragCallback, (XtCallbackProc)volume_callback, NULL);
-
-
- titleString = XmStringCreateLtoR ("Play Speed", cset);
- n = 0;
- XtSetArg (args[n], XmNfontList, fontlist); n++;
- XtSetArg (args[n], XmNshowValue, True); n++;
- XtSetArg (args[n], XmNtitleString, titleString); n++;
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- XtSetArg (args[n], XmNmaximum, 100); n++;
- XtSetArg (args[n], XmNvalue, 50); n++;
- XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++;
- XtSetArg (args[n], XmNscaleHeight, 17);n++;
- XtSetArg (args[n], XmNscaleWidth, 100);n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomOffset, 4);n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, 248);n++;
- speedscale = XmCreateScale(mainwindow, "scale", args, n);
- XmStringFree (titleString);
- XtManageChild (speedscale);
- XtAddCallback (speedscale, XmNvalueChangedCallback, (XtCallbackProc)speed_callback, NULL);
- XtAddCallback (speedscale, XmNdragCallback, (XtCallbackProc)speed_callback, NULL);
-
-
- titleString = XmStringCreateLtoR ("Position", cset);
- n = 0;
- XtSetArg (args[n], XmNfontList, fontlist); n++;
- XtSetArg (args[n], XmNshowValue, True); n++;
- XtSetArg (args[n], XmNtitleString, titleString); n++;
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- XtSetArg (args[n], XmNmaximum, POSITION_RANGE); n++;
- XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++;
- XtSetArg (args[n], XmNscaleHeight, 17);n++;
- XtSetArg (args[n], XmNscaleWidth, 100);n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomOffset, 4);n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, 368);n++;
- positionscale = XmCreateScale(mainwindow, "scale", args, n);
- XmStringFree (titleString);
- XtManageChild (positionscale);
- XtAddCallback (positionscale, XmNvalueChangedCallback, (XtCallbackProc)position_callback, NULL);
- XtAddCallback (positionscale, XmNdragCallback, (XtCallbackProc)position_callback, NULL);
-
- }
-
- mainload = mib_load_interface(mainwindow, MainMib, MI_FROMSTRING);
- XtSetMappedWhenManaged(shell, False);
- XtRealizeWidget(shell);
-
- frametext = mib_find_name(mainload, "TitleText")->me;
- XtVaSetValues(frametext,
- XmNfontList, fontlist,
- XmNcursorPositionVisible, False,
- XmNeditable, False,
- NULL);
-
- temp = mib_find_name(mainload, "Monitor")->me;
- XtAddCallback(temp, XmNexposeCallback,
- (XtCallbackProc) monitor_expose, (XtPointer) NULL);
- XtVaSetValues(temp, XmNforeground,
- BlackPixel(display, DefaultScreen(display)),
- XmNbackground,
- BlackPixel(display, DefaultScreen(display)),
- NULL);
- monitorwindow = XtWindow(temp);
-
- temp = mib_find_name(mainload, "Info")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) info_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Para")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) para_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Prog")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) prog_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "File")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) file_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Exit")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) exit_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Loop")->me;
- XtVaGetValues(temp, XmNforeground, &fg,
- XmNbackground, &bg, XmNdepth, &depth, NULL);
- button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)loop_bits, loop_width, loop_height, fg, bg, depth);
- /*
- {
- int i;
- for (i = 0; i < sizeof(loop_bits); i++)
- loop_bits[i] = ~loop_bits[i];
- }
- */
- XtVaSetValues(temp,
- XmNshadowThickness, 2,
-
- XmNwidth, 45,
- XmNheight, 28,
-
- XmNindicatorType, XmN_OF_MANY,
-
- XmNindicatorOn, False,
-
- XmNfillOnSelect, True,
- XmNlabelType, XmPIXMAP,
- XmNhighlightThickness, 0,
- XmNrubberPositioning, False,
- XmNlabelPixmap, button_pix,
- XmNselectPixmap, button_pix,
-/*
- XmNselectPixmap, (XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)loop_bits, loop_width, loop_height, fg, bg, depth)),
-*/
- NULL);
- XtAddCallback(temp, XmNvalueChangedCallback, (XtCallbackProc) loopchange_callback,
- (XtPointer) NULL);
-/*
- XtAddCallback(temp, XmNarmCallback, (XtCallbackProc) looparm_callback,
- (XtPointer) NULL);
- XtAddCallback(temp, XmNdisarmCallback, (XtCallbackProc) loopdisarm_callback,
- (XtPointer) NULL);
-*/
- temp = mib_find_name(mainload, "Normal")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) normal_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Rewind")->me;
- XtVaGetValues(temp, XmNforeground, &fg,
- XmNbackground, &bg, XmNdepth, &depth, NULL);
- button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)fb_bits, fb_width, fb_height, fg, bg, depth);
- XtVaSetValues(temp, XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, button_pix, NULL);
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) fb_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Stop")->me;
- XtVaGetValues(temp, XmNforeground, &fg,
- XmNbackground, &bg, XmNdepth, &depth, NULL);
- button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)stop_bits, stop_width, stop_height, fg, bg, depth);
- XtVaSetValues(temp, XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, button_pix, NULL);
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) stop_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "FF")->me;
- XtVaGetValues(temp, XmNforeground, &fg,
- XmNbackground, &bg, XmNdepth, &depth, NULL);
- button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)ff_bits, ff_width, ff_height, fg, bg, depth);
- XtVaSetValues(temp, XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, button_pix, NULL);
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) ff_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Step")->me;
- XtVaGetValues(temp, XmNforeground, &fg,
- XmNbackground, &bg, XmNdepth, &depth, NULL);
- button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)step_bits, step_width, step_height, fg, bg, depth);
- XtVaSetValues(temp, XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, button_pix, NULL);
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) step_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(mainload, "Play")->me;
- XtVaGetValues(temp, XmNforeground, &fg,
- XmNbackground, &bg, XmNdepth, &depth, NULL);
- button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display),
- (char *)play_bits, play_width, play_height, fg, bg, depth);
- XtVaSetValues(temp, XmNlabelType, XmPIXMAP,
- XmNlabelPixmap, button_pix, NULL);
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) play_callback,
- (XtPointer) NULL);
-
-/*****************************************************************************/
-
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR Infomation"); n++;
- XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++;
- XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++;
- XtSetArg(args[n], XmNwidth, MINX); n++;
- XtSetArg(args[n], XmNheight, MINY); n++;
- /*
- infoshell = XtAppCreateShell("Info", "virtual_vcr",
- topLevelShellWidgetClass, display, args, n);
- */
- temp = XmCreateDialogShell(shell, "virtual_vcr", args, n);
- n = 0;
- XtSetArg(args[n], XmNtitle, "Virtual VCR Infomation"); n++;
-
- infoshell = XmCreateForm(temp, "virtual_vcr", args, n);
- infoload = mib_load_interface(infoshell, InfoMib,
- MI_FROMSTRING);
-
- temp = mib_find_name(infoload, "Dismiss")->me;
- XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) infoclose_callback,
- (XtPointer) NULL);
-
- temp = mib_find_name(infoload, "TextBig")->me;
- XtVaSetValues(temp, XmNcursorPositionVisible, False,
- XmNeditable, False, NULL);
- XmTextSetString(temp, infomessage);
-
- XmFontListFree (fontlist);
-
- parashell = CreateParameterWindow(shell);
-
- progshell = CreateProgramWindow(shell, cmdSocket, &playtag, frametext);
-
- fileshell = CreateFileWindow(shell, cmdSocket, &playtag, frametext);
-
-}
-
-/*****************************************************************************/
-
-Window MonitorWindow()
-{
- return monitorwindow;
-}
-
-/*****************************************************************************/
-
-void UISetColormap()
-{
- privcolormap = 1;
-}
-
-/*****************************************************************************/
-
-void UISetwin(Window win)
-{
- displaywin = win;
-}
-
-/*****************************************************************************/
-
-void UISetFrame()
-{
- char framestr[100];
-
- sprintf(framestr, "%d of %d", shared->currentDisplay, shared->totalFrames);
- XmTextFieldSetString(frametext, framestr);
-}
-
-/*****************************************************************************/
-
-void UIMinsize(int x, int y)
-{
- int minx;
- int miny;
- int winx;
- int winy;
-
- winx = x;
- winy = y;
-
- x += 30;
- y += 180;
-
- if (x < 450) x = MINX;
- if (y < 350) y = MINY;
-
- minx = x; miny = y;
-
- if (privcolormap)
- {
- XtVaSetValues(shell, XmNcolormap, cmap, NULL);
- }
- if (shell)
- {
- XtResizeWidget(shell, (Dimension)minx, (Dimension)miny, (Dimension)0);
- XtVaSetValues(shell,
- XmNminWidth, MINX,
- XmNminHeight, MINY,
- XmNmaxWidth, minx,
- XmNmaxHeight, miny,
- NULL);
-
- XtMapWidget(shell); /* Map the shell now to avoid disappearing buttons! */
- if (displaywin)
- {
- x = winx; y = winy;
- winx = minx - 30; winy = miny - 180;
- XMoveWindow(display, displaywin, (winx - x)/2, (winy - y)/2+12);
- }
- }
-}
-
-/*****************************************************************************
-
- From here on we have private methods:
-
- *****************************************************************************/
-
-static void exit_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- exit(0);
-}
-
-
-static void info_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- /*
- XtRealizeWidget(infoshell);
- */
- XtManageChild(infoshell);
-}
-
-static void infoclose_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- /*
- XtUnrealizeWidget(infoshell);
- */
- XtUnmanageChild(infoshell);
-}
-
-static void para_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
-
- XtRealizeWidget(parashell);
- /*
- XtManageChild(parashell);
- */
-}
-
-static void prog_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
-
- XtRealizeWidget(progshell);
- /*
- XtManageChild(progshell);
- */
-}
-
-static void file_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- /*
- XtRealizeWidget(fileshell);
- */
- XtManageChild (fileshell);
-}
-
-/*****************************************************************************/
-
-static void loopchange_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- static int loop = 0;
- loop = !loop;
- if (playtag)
- {
- char cmd = loop ? CmdLOOPenable : CmdLOOPdisable;
- CmdWrite(&cmd, 1);
- }
- else
- beep();
-}
-
-static void normal_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-/* set speed bar, suppose speed_callback should be called automatically */
-{
- char cmd = CmdSPEED;
- int value = 50;
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- XmScaleSetValue(speedscale, 50);
-}
-
-static void fb_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- if (playtag && !cmdBusy)
- {
- char cmd = CmdFB;
- cmdBusy = 1;
- CmdWrite(&cmd, 1);
- }
- else
- beep();
-}
-
-static void stop_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- if (playtag && !cmdBusy)
- {
- char cmd = CmdSTOP;
- cmdBusy = 1;
- CmdWrite(&cmd, 1);
- }
- else
- beep();
-}
-
-static void ff_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- if (playtag && !cmdBusy)
- {
- char cmd = CmdFF;
- cmdBusy = 1;
- CmdWrite(&cmd, 1);
- }
- else
- beep();
-}
-
-
-static void step_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- if (playtag && !cmdBusy)
- {
- char cmd = CmdSTEP;
- cmdBusy = 1;
- CmdWrite(&cmd, 1);
- }
- else {
- /*
- beep();
- */
- }
-}
-
-static void play_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- if (playtag && !cmdBusy)
- {
- char cmd = CmdPLAY;
- cmdBusy = 1;
- CmdWrite(&cmd, 1);
- }
- else
- beep();
-}
-
-static void volume_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- char cmd;
- XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs;
- int value = call_value ->value;
-
- switch (call_value->reason)
- {
- case XmCR_VALUE_CHANGED:
- case XmCR_DRAG:
- cmd = CmdVOLUME;
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- break;
- default:
- fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n");
- break;
- }
-}
-
-static void speed_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- char cmd;
- XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs;
- int value = call_value ->value;
-
- switch (call_value->reason)
- {
- case XmCR_VALUE_CHANGED:
- case XmCR_DRAG:
- cmd = CmdSPEED;
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- break;
- default:
- fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n");
- break;
- }
-}
-
-static void balance_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- char cmd;
- XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs;
- int value = call_value ->value;
-
- switch (call_value->reason)
- {
- case XmCR_VALUE_CHANGED:
- case XmCR_DRAG:
- cmd = CmdBALANCE;
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- break;
- default:
- fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n");
- break;
- }
-}
-
-static void position_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- char cmd;
- XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs;
- int value = call_value ->value;
-
- switch (call_value->reason)
- {
- case XmCR_VALUE_CHANGED:
- if (playtag && !cmdBusy)
- {
- cmdBusy = 1;
- cmd = CmdPOSITIONrelease;
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- }
- else
- {
- XmScaleSetValue(positionscale, shared->locationPosition);
- /*
- fprintf(stderr, "UI: shared->cmd = %d\n", shared->cmd);
- if (shared->cmd != CmdPOSITION)
- beep();
- */
- }
-
- break;
- case XmCR_DRAG:
- if (playtag && !cmdBusy)
- {
- cmdBusy = 1;
- cmd = CmdPOSITION;
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- }
- break;
- default:
- fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n");
- break;
- }
-}
-
-static void cmdSocket_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs)
-{
- char cmd;
-/*
- fprintf(stderr, "UI in CmdSocket_callback.\n");
-*/
- while (read(cmdSocket, &cmd, 1) <= 0)
- {
- if (errno == EINTR) return;
- perror("UI by callback read from CmdSocket");
- exit(1);
- }
- if (cmd == CmdDONE || cmd == CmdFAIL)
- {
- cmdBusy --;
- if (shared->cmd == CmdINIT)
- {
- if (cmd == CmdDONE)
- {
- char cmd = CmdSPEED;
- int value = 50;
- XmScaleSetValue(speedscale, 50);
- XmScaleSetValue(positionscale, 0);
- CmdWrite(&cmd, 1);
- CmdWrite((char *)&value, 4);
- /*
- fprintf(stderr, "UI: VCR program successfully initialized.\n");
- */
- playtag = 1;
- }
- else
- {
- fprintf(stderr, "UI: VCR program initialization failed.\n");
- playtag = 0;
- }
- }
- else {
- /*
- fprintf(stderr, "UI: cmd-%d finished successfully.\n", shared->cmd);
- */
- }
- /*
- UISetFrame();
- */
- }
- else
- {
- static int prepos = 0;
- int curpos;
- char * ptr;
-
- if (cmd == CmdVPdisplayFrame) {
- read(cmdSocket, (char *)&ptr, sizeof(char *));
- }
- VPcommand((int)cmd, ptr);
-
- if (cmd == CmdVPaudioPosition)
- {
- curpos = (shared->nextSample * 100) / shared->totalSamples;
- if (shared->cmd == CmdPLAY &&
- (curpos <= prepos - 1 || curpos >= prepos + 1))
- {
- XmScaleSetValue(positionscale, curpos);
- prepos = curpos;
- }
- }
- else if (cmd == CmdVPdisplayFrame && shared->totalFrames)
- {
- curpos = (shared->currentDisplay * 100) / shared->totalFrames;
- if ((shared->cmd == CmdSTEP || shared->cmd == CmdPLAY ||
- shared->cmd == CmdFF || shared->cmd == CmdFB) &&
- (curpos <= prepos - 1 || curpos >= prepos + 1))
- {
- XmScaleSetValue(positionscale, curpos);
- prepos = curpos;
- }
- }
- }
-}
-
-static void monitor_expose(Widget w, XtPointer data,
- XmDrawingAreaCallbackStruct *cbs)
-{
- VPexpose();
-}
-
-#define BUFSIZE 256
-
-void UIprocess(int cmdSock)
-{
- char *title, *vh, *vf, *vb, *ah, *af, *ab;
- int i;
- cmdSocket = cmdSock;
- UICreate();
-
- VPinitWindow(shell, monitorwindow, cmdSock);
- XtAppAddInput(App, cmdSock, (XtPointer)XtInputReadMask,
- (XtInputCallbackProc)cmdSocket_callback, NULL);
-
- title = vh = vf = vb = ah = af = ab = NULL;
-
- for (i = 1; i < argc_share; i++) {
- if (strcmp(argv_share[i], "-v") == 0) {
- if (argc_share > i + 1) {
- i ++;
- vh = argv_share[i];
- }
- else break;
- }
- else if (strcmp(argv_share[i], "-a") == 0) {
- if (argc_share > i + 1) {
- i ++;
- ah = argv_share[i];
- }
- else break;
- }
- else if (strcmp(argv_share[i], "-p") == 0) {
- if (argc_share > i + 1) {
- i ++;
- title = argv_share[i];
- }
- }
- }
-
- if (title != NULL) { /* the init program is supplied by -l */
- FILE * fp;
- char buf[PATH_SIZE];
- char vh[PATH_SIZE];
- char vf[PATH_SIZE];
- char ah[PATH_SIZE];
- char af[PATH_SIZE];
-
- get_full_path(title, buf, 256);
- fp = fopen(buf, "r");
- if (fp != NULL) {
- if ((!feof(fp)) && fgets(buf, PATH_SIZE, fp) != NULL) {
- buf[strlen(buf)-1] = 0;
- }
- else buf[0] = 0;
- if ((!feof(fp)) && fgets(vh, PATH_SIZE, fp) != NULL) {
- vh[strlen(vh)-1] = 0;
- }
- else vh[0] = 0;
- if ((!feof(fp)) && fgets(vf, PATH_SIZE, fp) != NULL) {
- vf[strlen(vf)-1] = 0;
- }
- else vf[0] = 0;
- if ((!feof(fp)) && fgets(ah, PATH_SIZE, fp) != NULL) {
- ah[strlen(ah)-1] = 0;
- }
- else ah[0] = 0;
- if ((!feof(fp)) && fgets(af, PATH_SIZE, fp) != NULL) {
- af[strlen(af)-1] = 0;
- }
- else af[0] = 0;
-
- fclose(fp);
- Fprintf(stderr, "Init program: title %s, vh %s, vf %s, ah %s, af %s\n",
- buf, vh, vf, ah, af);
- StartProgram(buf, vh, vf, ah, af);
- }
- }
- else if (vh != NULL || ah != NULL) {/* init program supplied by -v and -a */
- char *ptr;
-
- /* form the title */
- if (vh != NULL) {
- title = (char *)malloc(strlen(vh) + 1);
- if (title != NULL) {
- strcpy(title, vh);
- }
- }
- else {
- title = (char *)malloc(strlen(ah) + 1);
- if (title != NULL) {
- strcpy(title, ah);
- }
- }
- if (title == NULL) {
- title = "The program from the command line";
- }
-
- /* generate vh and vf */
- if (vh != NULL) {
- if ((ptr = strchr(vh, ':')) != NULL) {
- * ptr = 0;
- vf = ptr + 1;
- }
- else {
- vf = vh;
- vh = "";
- vb = (char *)malloc(BUFSIZE);
- if (vb != NULL) {
- get_full_path(vf, vb, BUFSIZE);
- vf = vb;
- }
- }
- }
- else vh = vf = "";
-
- /* generate ah and af */
- if (ah != NULL) {
- if ((ptr = strchr(ah, ':')) != NULL) {
- * ptr = 0;
- af = ptr + 1;
- }
- else {
- af = ah;
- ah = "";
- ab = (char *)malloc(BUFSIZE);
- if (ab != NULL) {
- get_full_path(af, ab, BUFSIZE);
- af = ab;
- }
- }
- }
- else ah = af = "";
-
- Fprintf(stderr, "Init program: title %s, vh %s, vf %s, ah %s, af %s\n",
- title, vh, vf, ah, af);
- StartProgram(title, vh, vf, ah, af);
- free(title);
- if (ab != NULL) free(ab);
- if (vb != NULL) free(vb);
- }
-
- XtAppMainLoop(App);
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h
deleted file mode 100644
index b1ce065cc10..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with this file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-void UICreate();
-void UIEnd();
-Window MonitorWindow();
-void UISetwin(Window);
-void UIMinsize(int, int);
-void UISetFrame();
-void UISetColormap();
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp
deleted file mode 100644
index 0a39e088109..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp
+++ /dev/null
@@ -1,461 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-#include <stdlib.h>
-#include "video.h"
-#include "proto.h"
-#include "util.h"
-
-/* Declarations of global variables used. */
-
-unsigned int curBits;
-int bitOffset;
-int bufLength;
-unsigned int *bitBuffer;
-
-/* Bit masks used by bit i/o operations. */
-
-unsigned int nBitMask[] = { 0x00000000, 0x80000000, 0xc0000000, 0xe0000000,
- 0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000,
- 0xff000000, 0xff800000, 0xffc00000, 0xffe00000,
- 0xfff00000, 0xfff80000, 0xfffc0000, 0xfffe0000,
- 0xffff0000, 0xffff8000, 0xffffc000, 0xffffe000,
- 0xfffff000, 0xfffff800, 0xfffffc00, 0xfffffe00,
- 0xffffff00, 0xffffff80, 0xffffffc0, 0xffffffe0,
- 0xfffffff0, 0xfffffff8, 0xfffffffc, 0xfffffffe};
-
-unsigned int bitMask[] = { 0xffffffff, 0x7fffffff, 0x3fffffff, 0x1fffffff,
- 0x0fffffff, 0x07ffffff, 0x03ffffff, 0x01ffffff,
- 0x00ffffff, 0x007fffff, 0x003fffff, 0x001fffff,
- 0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff,
- 0x0000ffff, 0x00007fff, 0x00003fff, 0x00001fff,
- 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff,
- 0x000000ff, 0x0000007f, 0x0000003f, 0x0000001f,
- 0x0000000f, 0x00000007, 0x00000003, 0x00000001};
-
-unsigned int rBitMask[] = { 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8,
- 0xfffffff0, 0xffffffe0, 0xffffffc0, 0xffffff80,
- 0xffffff00, 0xfffffe00, 0xfffffc00, 0xfffff800,
- 0xfffff000, 0xffffe000, 0xffffc000, 0xffff8000,
- 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000,
- 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000,
- 0xff000000, 0xfe000000, 0xfc000000, 0xf8000000,
- 0xf0000000, 0xe0000000, 0xc0000000, 0x80000000};
-
-unsigned int bitTest[] = { 0x80000000, 0x40000000, 0x20000000, 0x10000000,
- 0x08000000, 0x04000000, 0x02000000, 0x01000000,
- 0x00800000, 0x00400000, 0x00200000, 0x00100000,
- 0x00080000, 0x00040000, 0x00020000, 0x00010000,
- 0x00008000, 0x00004000, 0x00002000, 0x00001000,
- 0x00000800, 0x00000400, 0x00000200, 0x00000100,
- 0x00000080, 0x00000040, 0x00000020, 0x00000010,
- 0x00000008, 0x00000004, 0x00000002, 0x00000001};
-
-
-/*
- *--------------------------------------------------------------
- *
- * correct_underflow --
- *
- * Called when buffer does not have sufficient data to
- * satisfy request for bits.
- * Calls get_more_data, an application specific routine
- * required to fill the buffer with more data.
- *
- * Results:
- * None really.
- *
- * Side effects:
- * buf_length and buffer fields in curVidStream structure
- * may be changed.
- *
- *--------------------------------------------------------------
- */
-
-void
-correct_underflow() {
-
- int status;
-
- status = get_more_data(curVidStream->buf_start,
- curVidStream->max_buf_length,
- &bufLength, &bitBuffer);
-
- if (status < 0) {
- if (!quietFlag) {
- fprintf (stderr, "\n");
- perror("Unexpected read error.");
- }
- exit(1);
- }
- else if ((status == 0) && (bufLength < 1)) {
- if (!quietFlag) {
- fprintf(stderr, "\nImproper or missing sequence end code.\n");
- }
-#ifdef ANALYSIS
- PrintAllStats();
-#endif
- if (!quietFlag) {
- PrintTimeInfo();
- }
-/*
- if (loopFlag) longjmp(env, 1);
- DestroyVidStream(curVidStream);
-*/
- exit(0);
- }
-#ifdef UTIL2
- curBits = *bitBuffer << bitOffset;
-#else
- curBits = *bitBuffer;
-#endif
-
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * next_bits --
- *
- * Compares next num bits to low order position in mask.
- * Buffer pointer is NOT advanced.
- *
- * Results:
- * TRUE, FALSE, or error code.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-int next_bits(int num, unsigned int mask)
-{
- unsigned int stream;
- int ret_value;
-
- /* If no current stream, return error. */
-
- if (curVidStream == NULL)
- return NO_VID_STREAM;
-
- /* Get next num bits, no buffer pointer advance. */
-
- show_bitsn(num, stream);
-
- /* Compare bit stream and mask. Set return value toTRUE if equal, FALSE if
- differs.
- */
-
- if (mask == stream) {
- ret_value = TRUE;
- } else ret_value = FALSE;
-
- /* Return return value. */
-
- return ret_value;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * get_ext_data --
- *
- * Assumes that bit stream is at begining of extension
- * data. Parses off extension data into dynamically
- * allocated space until start code is hit.
- *
- * Results:
- * Pointer to dynamically allocated memory containing
- * extension data.
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-char *get_ext_data ()
-{
- int size, marker;
- char *dataPtr;
- unsigned int data;
-
- /* Set initial ext data buffer size. */
-
- size = EXT_BUF_SIZE;
-
- /* Allocate ext data buffer. */
-
- dataPtr = (char *) malloc(size);
-
- /* Initialize marker to keep place in ext data buffer. */
-
- marker = 0;
-
- /* While next data is not start code... */
- while (!next_bits(24, 0x000001)) {
-
- /* Get next byte of ext data. */
-
- get_bits8(data);
-
- /* Put ext data into ext data buffer. Advance marker. */
-
- dataPtr[marker] = (char) data;
- marker++;
-
- /* If end of ext data buffer reached, resize data buffer. */
-
- if (marker == size) {
- size += EXT_BUF_SIZE;
- dataPtr = (char *) realloc(dataPtr, size);
- }
- }
-
- /* Realloc data buffer to free any extra space. */
-
- dataPtr = (char *) realloc(dataPtr, marker);
-
- /* Return pointer to ext data buffer. */
-
- return dataPtr;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * next_start_code --
- *
- * Parses off bitstream until start code reached. When done
- * next 4 bytes of bitstream will be start code. Bit offset
- * reset to 0.
- *
- * Results:
- * Status code.
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-int next_start_code()
-{
- int state;
- int byteoff;
- unsigned int data;
-
- /* If no current stream, return error. */
-
- if (curVidStream == NULL)
- return NO_VID_STREAM;
-
- /* If insufficient buffer length, correct underflow. */
-/*
- if (bufLength < 2) {
- correct_underflow();
- }
- */
-
- /* If bit offset not zero, reset and advance buffer pointer. */
-
- byteoff = bitOffset % 8;
-
- if (byteoff != 0) {
- flush_bits((8-byteoff));
- }
-
- /* Set state = 0. */
-
- state = 0;
-
- /* While buffer has data ... */
-
- while(bufLength > 0) {
-
- /* If insufficient data exists, correct underflow. */
-/*
- if (bufLength < 2) {
- correct_underflow();
- }
-*/
- /* If next byte is zero... */
-
- get_bits8(data);
-
- if (data == 0) {
-
- /* If state < 2, advance state. */
-
- if (state < 2) state++;
- }
-
- /* If next byte is one... */
-
- else if (data == 1) {
-
- /* If state == 2, advance state (i.e. start code found). */
-
- if (state == 2) state++;
-
- /* Otherwise, reset state to zero. */
-
- else state = 0;
- }
-
- /* Otherwise byte is neither 1 or 0, reset state to 0. */
-
- else {
- state = 0;
- }
-
- /* If state == 3 (i.e. start code found)... */
-
- if (state == 3) {
-
- /* Set buffer pointer back and reset length & bit offsets so
- next bytes will be beginning of start code.
- */
-
- bitOffset = bitOffset - 24;
-
-#ifdef ANALYSIS
- bitCount -= 24;
-#endif
-
- if (bitOffset < 0) {
- bitOffset = 32 + bitOffset;
- bufLength++;
- bitBuffer--;
-#ifdef UTIL2
- curBits = *bitBuffer << bitOffset;
-#else
- curBits = *bitBuffer;
-#endif
- }
- else {
-#ifdef UTIL2
- curBits = *bitBuffer << bitOffset;
-#else
- curBits = *bitBuffer;
-#endif
- }
-
- /* Return success. */
-
- return OK;
- }
- }
-
- /* Return underflow error. */
-
- return UNDERFLOW;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * get_extra_bit_info --
- *
- * Parses off extra bit info stream into dynamically
- * allocated memory. Extra bit info is indicated by
- * a flag bit set to 1, followed by 8 bits of data.
- * This continues until the flag bit is zero. Assumes
- * that bit stream set to first flag bit in extra
- * bit info stream.
- *
- * Results:
- * Pointer to dynamically allocated memory with extra
- * bit info in it. Flag bits are NOT included.
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-char *get_extra_bit_info ()
-{
- int size, marker;
- char *dataPtr;
- unsigned int data;
-
- /* Get first flag bit. */
- get_bits1(data);
-
- /* If flag is false, return NULL pointer (i.e. no extra bit info). */
-
- if (!data) return NULL;
-
- /* Initialize size of extra bit info buffer and allocate. */
-
- size = EXT_BUF_SIZE;
- dataPtr = (char *) malloc(size);
-
- /* Reset marker to hold place in buffer. */
-
- marker = 0;
-
- /* While flag bit is true. */
-
- while (data) {
-
- /* Get next 8 bits of data. */
- get_bits8(data);
-
- /* Place in extra bit info buffer. */
-
- dataPtr[marker] = (char) data;
- marker++;
-
- /* If buffer is full, reallocate. */
-
- if (marker == size) {
- size += EXT_BUF_SIZE;
- dataPtr = (char *) realloc(dataPtr, size);
- }
-
- /* Get next flag bit. */
- get_bits1(data);
- }
-
- /* Reallocate buffer to free extra space. */
-
- dataPtr = (char *) realloc(dataPtr, marker);
-
- /* Return pointer to extra bit info buffer. */
-
- return dataPtr;
-}
-
-
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h
deleted file mode 100644
index 99e15338b22..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-/* Status codes for bit stream i/o operations. */
-
-#define NO_VID_STREAM -1
-#define UNDERFLOW -2
-#define OK 1
-
-/* Size increment of extension data buffers. */
-
-#define EXT_BUF_SIZE 1024
-
-/* External declarations for bitstream i/o operations. */
-extern unsigned int bitMask[];
-extern unsigned int nBitMask[];
-extern unsigned int rBitMask[];
-extern unsigned int bitTest[];
-
-/* External declarations of bitstream global variables. */
-extern unsigned int curBits;
-extern int bitOffset;
-extern int bufLength;
-extern unsigned int *bitBuffer;
-
-/* Macro for updating bit counter if analysis tool is on. */
-#ifdef ANALYSIS
-#define UPDATE_COUNT(numbits) bitCount += numbits
-#else
-#define UPDATE_COUNT(numbits)
-#endif
-
-#ifdef NO_SANITY_CHECKS
-#define get_bits1(result) \
-{ \
- UPDATE_COUNT(1); \
- result = ((curBits & 0x80000000) != 0); \
- curBits <<= 1; \
- bitOffset++; \
- \
- if (bitOffset & 0x20) { \
- bitOffset = 0; \
- bitBuffer++; \
- curBits = *bitBuffer; \
- bufLength--; \
- } \
-}
-
-#define get_bits2(result) \
-{ \
- UPDATE_COUNT(2); \
- bitOffset += 2; \
- \
- if (bitOffset & 0x20) { \
- bitOffset -= 32; \
- bitBuffer++; \
- bufLength--; \
- if (bitOffset) { \
- curBits |= (*bitBuffer >> (2 - bitOffset)); \
- } \
- result = ((curBits & 0xc0000000) >> 30); \
- curBits = *bitBuffer << bitOffset; \
- } \
- \
- result = ((curBits & 0xc0000000) >> 30); \
- curBits <<= 2; \
-}
-
-#define get_bitsX(num, mask, shift, result) \
-{ \
- UPDATE_COUNT(num); \
- bitOffset += num; \
- \
- if (bitOffset & 0x20) { \
- bitOffset -= 32; \
- bitBuffer++; \
- bufLength--; \
- if (bitOffset) { \
- curBits |= (*bitBuffer >> (num - bitOffset)); \
- } \
- result = ((curBits & mask) >> shift); \
- curBits = *bitBuffer << bitOffset; \
- } \
- else { \
- result = ((curBits & mask) >> shift); \
- curBits <<= num; \
- } \
-}
-#else
-
-#define get_bits1(result) \
-{ \
- /* Check for underflow. */ \
- /* \
- if (bufLength < 2) { \
- correct_underflow(); \
- } */ \
- UPDATE_COUNT(1); \
- result = ((curBits & 0x80000000) != 0); \
- curBits <<= 1; \
- bitOffset++; \
- \
- if (bitOffset & 0x20) { \
- bitOffset = 0; \
- bitBuffer++; \
- curBits = *bitBuffer; \
- bufLength--; \
- } \
-}
-
-#define get_bits2(result) \
-{ \
- /* Check for underflow. */ \
- /* \
- if (bufLength < 2) { \
- correct_underflow(); \
- } */ \
- UPDATE_COUNT(2); \
- bitOffset += 2; \
- \
- if (bitOffset & 0x20) { \
- bitOffset -= 32; \
- bitBuffer++; \
- bufLength--; \
- if (bitOffset) { \
- curBits |= (*bitBuffer >> (2 - bitOffset)); \
- } \
- result = ((curBits & 0xc0000000) >> 30); \
- curBits = *bitBuffer << bitOffset; \
- } \
- \
- result = ((curBits & 0xc0000000) >> 30); \
- curBits <<= 2; \
-}
-
-#define get_bitsX(num, mask, shift, result) \
-{ \
- /* Check for underflow. */ \
- /* \
- if (bufLength < 2) { \
- correct_underflow(); \
- } */ \
- UPDATE_COUNT(num); \
- bitOffset += num; \
- \
- if (bitOffset & 0x20) { \
- bitOffset -= 32; \
- bitBuffer++; \
- bufLength--; \
- if (bitOffset) { \
- curBits |= (*bitBuffer >> (num - bitOffset)); \
- } \
- result = ((curBits & mask) >> shift); \
- curBits = *bitBuffer << bitOffset; \
- } \
- else { \
- result = ((curBits & mask) >> shift); \
- curBits <<= num; \
- } \
-}
-#endif
-
-#define get_bits3(result) get_bitsX(3, 0xe0000000, 29, result)
-#define get_bits4(result) get_bitsX(4, 0xf0000000, 28, result)
-#define get_bits5(result) get_bitsX(5, 0xf8000000, 27, result)
-#define get_bits6(result) get_bitsX(6, 0xfc000000, 26, result)
-#define get_bits7(result) get_bitsX(7, 0xfe000000, 25, result)
-#define get_bits8(result) get_bitsX(8, 0xff000000, 24, result)
-#define get_bits9(result) get_bitsX(9, 0xff800000, 23, result)
-#define get_bits10(result) get_bitsX(10, 0xffc00000, 22, result)
-#define get_bits11(result) get_bitsX(11, 0xffe00000, 21, result)
-#define get_bits12(result) get_bitsX(12, 0xfff00000, 20, result)
-#define get_bits14(result) get_bitsX(14, 0xfffc0000, 18, result)
-#define get_bits16(result) get_bitsX(16, 0xffff0000, 16, result)
-#define get_bits18(result) get_bitsX(18, 0xffffc000, 14, result)
-#define get_bits32(result) get_bitsX(32, 0xffffffff, 0, result)
-
-#define get_bitsn(num, result) get_bitsX((num), nBitMask[num], (32-(num)), result)
-
-#ifdef NO_SANITY_CHECKS
-#define show_bits32(result) \
-{ \
- if (bitOffset) { \
- result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \
- } \
- else { \
- result = curBits; \
- } \
-}
-
-#define show_bitsX(num, mask, shift, result) \
-{ \
- int bO; \
- bO = bitOffset + num; \
- if (bO > 32) { \
- bO -= 32; \
- result = ((curBits & mask) >> shift) | \
- (*(bitBuffer+1) >> (shift + (num - bO))); \
- } \
- else { \
- result = ((curBits & mask) >> shift); \
- } \
-}
-
-#else
-#define show_bits32(result) \
-{ \
- /* Check for underflow. */ \
- /* if (bufLength < 2) { \
- correct_underflow(); \
- } */ \
- if (bitOffset) { \
- result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \
- } \
- else { \
- result = curBits; \
- } \
-}
-
-#define show_bitsX(num, mask, shift, result) \
-{ \
- int bO; \
- \
- /* Check for underflow. */ \
- /* if (bufLength < 2) { \
- correct_underflow(); \
- } */ \
- bO = bitOffset + num; \
- if (bO > 32) { \
- bO -= 32; \
- result = ((curBits & mask) >> shift) | \
- (*(bitBuffer+1) >> (shift + (num - bO))); \
- } \
- else { \
- result = ((curBits & mask) >> shift); \
- } \
-}
-#endif
-
-#define show_bits1(result) show_bitsX(1, 0x80000000, 31, result)
-#define show_bits2(result) show_bitsX(2, 0xc0000000, 30, result)
-#define show_bits3(result) show_bitsX(3, 0xe0000000, 29, result)
-#define show_bits4(result) show_bitsX(4, 0xf0000000, 28, result)
-#define show_bits5(result) show_bitsX(5, 0xf8000000, 27, result)
-#define show_bits6(result) show_bitsX(6, 0xfc000000, 26, result)
-#define show_bits7(result) show_bitsX(7, 0xfe000000, 25, result)
-#define show_bits8(result) show_bitsX(8, 0xff000000, 24, result)
-#define show_bits9(result) show_bitsX(9, 0xff800000, 23, result)
-#define show_bits10(result) show_bitsX(10, 0xffc00000, 22, result)
-#define show_bits11(result) show_bitsX(11, 0xffe00000, 21, result)
-#define show_bits12(result) show_bitsX(12, 0xfff00000, 20, result)
-#define show_bits13(result) show_bitsX(13, 0xfff80000, 19, result)
-#define show_bits14(result) show_bitsX(14, 0xfffc0000, 18, result)
-#define show_bits15(result) show_bitsX(15, 0xfffe0000, 17, result)
-#define show_bits16(result) show_bitsX(16, 0xffff0000, 16, result)
-#define show_bits17(result) show_bitsX(17, 0xffff8000, 15, result)
-#define show_bits18(result) show_bitsX(18, 0xffffc000, 14, result)
-#define show_bits19(result) show_bitsX(19, 0xffffe000, 13, result)
-#define show_bits20(result) show_bitsX(20, 0xfffff000, 12, result)
-#define show_bits21(result) show_bitsX(21, 0xfffff800, 11, result)
-#define show_bits22(result) show_bitsX(22, 0xfffffc00, 10, result)
-#define show_bits23(result) show_bitsX(23, 0xfffffe00, 9, result)
-#define show_bits24(result) show_bitsX(24, 0xffffff00, 8, result)
-#define show_bits25(result) show_bitsX(25, 0xffffff80, 7, result)
-#define show_bits26(result) show_bitsX(26, 0xffffffc0, 6, result)
-#define show_bits27(result) show_bitsX(27, 0xffffffe0, 5, result)
-#define show_bits28(result) show_bitsX(28, 0xfffffff0, 4, result)
-#define show_bits29(result) show_bitsX(29, 0xfffffff8, 3, result)
-#define show_bits30(result) show_bitsX(30, 0xfffffffc, 2, result)
-#define show_bits31(result) show_bitsX(31, 0xfffffffe, 1, result)
-
-#define show_bitsn(num,result) show_bitsX((num), (0xffffffff << (32-(num))), (32-(num)), result)
-
-#ifdef NO_SANITY_CHECKS
-#define flush_bits32 \
-{ \
- UPDATE_COUNT(32); \
- \
- bitBuffer++; \
- bufLength--; \
- curBits = *bitBuffer << bitOffset; \
-}
-
-#define flush_bits(num) \
-{ \
- bitOffset += num; \
- \
- UPDATE_COUNT(num); \
- \
- if (bitOffset & 0x20) { \
- bitOffset -= 32; \
- bitBuffer++; \
- bufLength--; \
- curBits = *bitBuffer << bitOffset; \
- } \
- else { \
- curBits <<= num; \
- } \
-}
-#else
-#define flush_bits32 \
-{ \
- if (curVidStream == NULL) { \
- /* Deal with no vid stream here. */ \
- } \
- /* \
- if (bufLength < 2) { \
- correct_underflow(); \
- } \
- */ \
- UPDATE_COUNT(32); \
- \
- bitBuffer++; \
- bufLength--; \
- curBits = *bitBuffer << bitOffset; \
-}
-
-#define flush_bits(num) \
-{ \
- if (curVidStream == NULL) { \
- /* Deal with no vid stream here. */ \
- } \
- /* \
- if (bufLength < 2) { \
- correct_underflow(); \
- } \
- */ \
- UPDATE_COUNT(num); \
- \
- bitOffset += num; \
- \
- if (bitOffset & 0x20) { \
- bufLength--; \
- bitOffset -= 32; \
- bitBuffer++; \
- curBits = *bitBuffer << bitOffset; \
- } \
- else { \
- curBits <<= num; \
- } \
-}
-#endif
-
-#define UTIL2
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp
deleted file mode 100644
index d94f63f8069..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $Id$ */
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include "video.h"
-#include "proto.h"
-#include "ui.h" /* include user interface */
-
-/*
- * Return a pointer to a full color bit visual on the dpy
- */
-Visual *
-FindFullColorVisual (Display *dpy, int *depth)
-{
- XVisualInfo vinfo;
- XVisualInfo *vinfo_ret;
- int numitems, maxdepth;
-
-#ifdef __cplusplus
- vinfo.c_class = TrueColor;
-#else
- vinfo.class = TrueColor;
-#endif
- vinfo_ret = XGetVisualInfo(dpy, VisualClassMask, &vinfo, &numitems);
-
- if (numitems == 0) return NULL;
-
- maxdepth = 0;
- while(numitems > 0) {
- if (vinfo_ret[numitems-1].depth > maxdepth) {
- maxdepth = vinfo_ret[numitems-1 ].depth;
- }
- numitems--;
- }
- XFree(vinfo_ret);
-
- if (maxdepth < 24) return NULL;
-
- if (XMatchVisualInfo(dpy, DefaultScreen(dpy), maxdepth,
- TrueColor, &vinfo)) {
- *depth = maxdepth;
- return vinfo.visual;
- }
-
- return NULL;
-}
-
-Window
-CreateFullColorWindow (Display *dpy, int x, int y, int w, int h)
-{
- int depth;
- Visual *visual;
- XSetWindowAttributes xswa;
- Window temp;
- unsigned int mask;
- unsigned int valclass;
- int screen;
-
- screen = XDefaultScreen(dpy);
- valclass = InputOutput; /* Could be InputOnly */
- visual = FindFullColorVisual (dpy, &depth);
- if (visual == NULL) {
- return 0;
- }
- mask = CWBackPixel | CWColormap | CWBorderPixel;
- xswa.colormap = XCreateColormap(dpy, XRootWindow(dpy, screen),
- visual, AllocNone);
- xswa.background_pixel = BlackPixel(dpy, DefaultScreen(dpy));
- xswa.border_pixel = WhitePixel(dpy, DefaultScreen(dpy));
-
- temp = XCreateWindow(dpy, MonitorWindow(), x, y, w, h,
- 1, depth, valclass, visual, mask, &xswa);
-
- UISetwin(temp);
-
- return temp;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp
deleted file mode 100644
index 4c3b6c24584..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp
+++ /dev/null
@@ -1,1034 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-#if defined(__svr4__) || defined(IRIX)
-#include <stropts.h>
-#include <sys/conf.h>
-#endif
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-#include "mpeg_shared/filters.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/com.h"
-
-/* magic number -- deviation is considered
- caused by clock drift only if rate <= 1/MAX_CLOCK_DRIFT.
- */
-#define MAX_CLOCK_DRIFT 50
-
-#define SHCODE 0x000001b3
-
-#define max(a,b) ((a)>(b) ? (a) : (b))
-
-static struct block
-{
- unsigned shcode;
- struct block * next;
- int full;
-} ** head, ** tail;
-
-struct header
-{
- struct block *h, *t;
-};
-
-static char * buf;
-static int bufsize;
-static int sid, countid;
-static exit_tag = 0;
-static int conn_tag;
-static int savedSocket;
-
-void VBinitBuf(int size)
-/* size in byte */
-{
- bufsize = size - sizeof(struct header);
- buf = creat_shared_mem(size);
- head = &((struct header *)buf)->h;
- tail = &((struct header *)buf)->t;
- buf += sizeof(struct header);
- sid = creat_semaphore();
- countid = creat_semaphore();
- enter_cs(countid);
- *head = *tail = (struct block *)buf;
- (*tail)->full = 0;
- (*tail)->next = NULL;
- (*tail)->shcode = SHCODE;
-}
-
-char * VBgetBuf(int size) /* block version */
-{
- return 0;
-}
-
-int VBcheckBuf(int size) /* non-block check, return True/False*/
-{
- return 0;
-}
-
-void VBputMsg(char * msgPtr)
-{
-}
-
-char * VBgetMsg() /* block version */
-{
- char *ptr;
-
-#ifdef STAT
- if (shared->collectStat && *head == *tail)
- shared->stat.VBemptyTimes ++;
-#endif
-
- enter_cs(countid);
- enter_cs(sid);
- while (*tail != *head && (*tail)->full == 0)
- *tail = (*tail)->next;
- leave_cs(sid);
- if (*head == *tail)
- {
- fprintf(stderr, "VB: getMsg run out of msg unexpectedly.\n");
- exit(1);
- }
- ptr = ((char*)*tail)+sizeof(**tail)+sizeof(VideoMessage);
- /*
- fprintf(stderr,"VBgetMsg: buf:%x, msg:%x\n", (int)buf, (int)ptr);
- */
- return ptr;
-}
-
-int VBcheckMsg() /* non-block check, return Number of Msgs in buffer */
-{
- return get_semval(countid);
-}
-
-int VBbufEmpty(void)
-{
- /*
- Fprintf(stderr, "VB countid %d\n", get_semval(countid));
- */
- return get_semval(countid) <= 0;
-}
-
-void VBreclaimMsg(char * msgPtr)
-{
- enter_cs(sid);
- *tail = (*tail)->next;
- leave_cs(sid);
-}
-
-void VBdeleteBuf(void)
-{
- remove_shared_mem(buf - sizeof(struct header));
-}
-void VBdeleteSem(void)
-{
- remove_semaphore(sid);
- remove_semaphore(countid);
-}
-
-/* SIGUSR1 from CTR is for killing this process, without affecting any other ones. */
-
-static void usr1_handler(int sig)
-{
- exit_tag = 1;
-}
-
-static void exit_on_kill(void)
-{
- extern void set_exit_routine_tag(int tag);
- set_exit_routine_tag(0);
- ComCloseConn(savedSocket);
- VBdeleteBuf();
- exit(0);
-}
-
-static void usr2_handler(int sig)
-{
- /*
- fprintf(stderr, "VB void usr2_handler (supposed for stat).\n");
- */
-}
-
-static int send_feedback(int sock, int addupf, int addf, int advance)
-{
- int res;
- VideoFeedBackPara para;
- para.cmdsn = htonl(shared->cmdsn);
- para.addUsecPerFrame = htonl(addupf);
- para.addFrames = htonl(addf);
- para.needHeader = htonl(shared->needHeader);
- shared->needHeader = 0;
- para.frameRateLimit1000 =
- htonl((long)(shared->frameRateLimit * 1000.0));
- para.sendPatternGops = htonl(shared->sendPatternGops);
- memcpy(para.sendPattern, shared->sendPattern, PATTERN_SIZE);
- /*
- fprintf(stderr, "VB to send a fb packet...");
- */
- if (conn_tag != 0) { /* packet stream */
- while ((res = write(sock, (char *)&para, sizeof(para))) == -1) {
- if (errno == EINTR)
- continue;
- if (errno == ENOBUFS) {
- perror("VB Warning, fb packet discarded for");
- return -1;
- }
- perror("VB error, fb packet sending failed");
- exit(1);
- }
- }
- else {
- res = write(sock, (char *)&para, sizeof(para));
- if (res == -1) {
- perror("VB error, fb packet sending failed");
- exit(1);
- }
- }
- if (res < sizeof(para)) {
- fprintf(stderr, "VB send_feedback() warn: res %dB < sizeof(para) %dB\n",
- res, sizeof(para));
- }
-#ifdef STAT
- {
- int i;
- if ((i = shared->stat.fbPacketNumber) < MAX_FB_PACKETS) {
- shared->stat.fbPackets[i].frameId = shared->nextFrame;
- shared->stat.fbPackets[i].addUsecPerFrame = addupf;
- shared->stat.fbPackets[i].addFrames = addf;
- shared->stat.fbPackets[i].frames = shared->sendPatternGops *
- shared->patternSize;
- shared->stat.fbPackets[i].framesDropped = shared->framesDropped;
- shared->stat.fbPackets[i].frameRateLimit = shared->frameRateLimit;
- shared->stat.fbPackets[i].advance = advance;
- }
- shared->stat.fbPacketNumber ++;
- }
-#endif
- Fprintf(stderr, "VB sent fb pkt frame%d gop%d addf%d addupf%d frate%5.2f.\n",
- shared->nextFrame, shared->nextGroup,
- addf, addupf, shared->frameRateLimit);
- return 0;
-}
-
-static void skip_message(int fd, VideoMessage * msg)
-{
- char buf[1024];
- if (conn_tag >= 0) {
- int size = msg->msgSize;
- while (size > 0) {
- int res;
- int bytes = size > 1024 ? 1024 : size;
- read_bytes(fd, buf, bytes);
- /*
- if ((res = read(fd, buf, bytes)) < bytes) {
- fprintf(stderr, "VB Error skip_message: try read %dB, got %dB\n",
- bytes, res);
- }
- */
- size -= bytes;
- }
- }
- else { /* discard mode packet stream packet has been read */
- }
- if (exit_tag) exit_on_kill();
-}
-
-void VBprocess(int initSocket, int normalSocket)
-{
- VideoMessage * msg, msghd;
- VideoPacket * packet;
- int len, bsize, msgsn = -1;
- int psize, poffset;
- char * ptr, *ptr1;
- char *tmp_buf = NULL;
- int dataSocket = initSocket;
-
- /* INIT frame is received from CTR through initSocket */
-
-#ifdef STAT
- int to_count = 1;
- int gap_msgsn = -1;
-#endif
-
- /* following variables are for feedback */
- int pcmdsn, pcmd; /* to store the cmdsn and cmd of previous frame,
- to detect new commands */
- int pfid, pgop; /* frame-id of gopid of previous frame */
- int cmdsn = -1; /* cmdsn of previous command */
- int state = 0; /* state of the control law/regulator */
- int startpos; /* gopid or frameid when the regulator is in 'start' state 1 */
- int delay; /* #frames to delay after 'start' */
- int qosRecomputes = 0; /* indicate if qos has been recomputed recently */
- int action_delay; /* microseconds to delay after feedback action */
- int action_time; /* the time when feedback action is taken, used to enforce
- action_delay */
- int upf, cupf; /* upf -- currentUPF as carried in all frames,
- cupf -- real current UPF, being adjusted by FB */
- double fv; /* current buffer fill level in term of #frames */
- double init_fv; /* init_fv and init_pos record the fv value and position
- (frameid or gopid) when fv is very close to med */
- double init_pos;
- int high, low, med; /* median, high and low water marks, in term of #frames */
- int period; /* interms of #frames, (high-med, period) defined the max
- buffer fill drift which can be assumed as caused by
- clock drift */
- Filter * f = NULL; /* buffer fill level filter */
-
- int advance, min_advance; /* in microseconds, advance holds the
- current target buffer-fill-level as
- determined by jitter level
- estimate. min_advance sets a absolute
- minimun level, no matter how low jitter
- level is.
- 'advance' does not change when
- play-speed changes, but med/high/low
- will be updated upon speed change */
- double fav; /* #frames, jitter level output by the filter */
- Filter * fa = NULL; /* jitter filter */
- int reach_limit = 0; /* indicate that the target 'advance' has reached client VB
- buffer limit, and can not further increase, even if
- jitter increases */
- int not_action = 1; /* indicates entering state=3 is not caused by
- feedback action. If not_action = 1 entering state=3
- is caused either by 'start' or speed change, and
- the jitter filter needs to be reset */
-
- exit_tag = 0;
- conn_tag = shared->videoMaxPktSize;
-
- savedSocket = normalSocket;
-#if 0
-#ifdef __svr4__
-
- /* On solaris 2.x for i86pc, a datagram socket may not discard the
- remaining of a message if recv() fails to read the whole
- thing. Following systems are tried but seems doesn't work. So for
- this platform, This causes problem with skip_message() defined
- above, which tries to discard whole packets by reading only a few
- bytes. An alternative here is to allocate a big enough buffer,
- read and discard the whole packet, this is less efficient because
- of more data copy.
-
- But if we call read(2) instead of recv(), then it works.
- */
- if (!conn_tag) {
- len = ioctl(dataSocket, I_SRDOPT, RMSGD); /* discard unread part of the message */
- if (len) perror("error message");
- }
-#endif
-#endif
-
- setsignal(SIGUSR1, usr1_handler);
- setsignal(SIGUSR2, usr2_handler);
-
- if (conn_tag < 0) { /* buffer big enough for discard mode packet stream */
- tmp_buf = (char *)malloc(-conn_tag);
- if (tmp_buf == NULL) {
- fprintf(stderr, "AB failed to allocate %d bytes");
- perror("of tmp_buf");
- exit(1);
- }
- }
-
- for (;;)
- {
- // fprintf(stderr, "VB wait for a new packet.\n");
- if (conn_tag >= 0) {
- len = wait_read_bytes(dataSocket, (char *)&msghd, sizeof(msghd));
- }
- else { /* discard mode packet stream, read all bytes */
- len = read(dataSocket, tmp_buf, -conn_tag);
- memcpy((char *)&msghd, tmp_buf, sizeof(msghd));
- }
- if (exit_tag) exit_on_kill();
- if (len == -1) {
- if (errno == EWOULDBLOCK || errno == EAGAIN) {
- perror("VB sleep for 10ms");
- usleep(10000);
- if (exit_tag) exit_on_kill();
- continue;
- }
- perror("VB read() data");
- exit(1);
- }
- if (len == 0) { /* EOF, connection closed by peer */
- fprintf(stderr, "Error: VB found dataSocket broken\n");
- for (;;) {
- usleep(1000000);
- if (exit_tag) exit_on_kill();
- }
- }
- if (len < sizeof(msghd)) {
- fprintf(stderr, "VD warn: PEEK1ed %dB < expected %dB\n",
- len, sizeof(msghd));
- continue;
- }
-#ifdef NeedByteOrderConversion
- msghd.packetsn = ntohl(msghd.packetsn);
- msghd.packetSize = ntohl(msghd.packetSize);
- msghd.msgsn = ntohl(msghd.msgsn);
- msghd.msgOffset = ntohl(msghd.msgOffset);
- msghd.msgSize = ntohl(msghd.msgSize);
-#endif
- /*
- fprintf(stderr, "VB PEEK1 a msg sn-%d, size-%d, pkt-%d, pktsize-%d\n",
- msghd.msgsn, msghd.msgSize, msghd.packetsn, msghd.packetSize);
- */
-
-
- start_new_packet:
-
-
-#ifdef STAT
- if (to_count) {
- int gap = msghd.msgsn - gap_msgsn;
- gap = (gap >MSGGAP_MAX) ? MSGGAP_MAX : gap < MSGGAP_MIN ? MSGGAP_MIN : gap;
- shared->stat.VBmsgGaps[gap - MSGGAP_MIN] ++;
- if (gap >0) gap_msgsn = msghd.msgsn;
- }
- to_count = 1;
-#endif
- if (msghd.msgsn <= msgsn) /* outdated msg */
- {
- /*
- fprintf(stderr, "VB discard outdated msgsn %d, pktsn %d when expecting first\n",
- msghd.msgsn, msghd.packetsn);
- */
- skip_message(dataSocket, &msghd);
- continue;
- }
- else if (msghd.msgOffset != 0) /* not first msg of a packet */
- {
- /*
- Fprintf(stderr, "VB discard non-first msg msgsn %d, pktsn %d\n",
- msghd.msgsn, msghd.packetsn);
- */
- skip_message(dataSocket, &msghd);
- continue;
- }
- else
- msgsn = msghd.msgsn;
-
- /* allocate packet for the incoming msg */
- bsize = msghd.packetSize + sizeof(**head)*2 + sizeof(msghd);
- bsize = ((bsize+3)>>2)<<2;
- enter_cs(sid);
- if (*head >= *tail)
- {
- if (bufsize - (int)((char*)*head - buf) >= bsize )
- msg =(VideoMessage *)((char*)*head + sizeof(**head));
- else if ((int)((char*)*tail - buf) >= bsize)
- {
- (*head)->next = (struct block *)buf;
- (*head)->full = 0;
- *head = (struct block *)buf;
- msg = (VideoMessage *)(buf + sizeof(**head));
- *head = (struct block *)buf;
- (*head)->shcode = SHCODE;
- }
- else /* not enough buffer, discard current message */
- {
- leave_cs(sid);
-#ifdef STAT
- if (shared->collectStat)
- shared->stat.VBdroppedFrames ++;
-#endif
- /*
- Fprintf(stderr, "VB not enough space 1, drop msg.sn %d pktsn %d\n",
- msghd.msgsn, msghd.packetsn);
- */
- skip_message(dataSocket, &msghd);
- continue;
- }
- }
- else /* *head < *tail */
- if ((char*)*tail - (char*)*head >= bsize)
- msg = (VideoMessage *)((char*)*head + sizeof(**head));
- else /* not enough buffer, abandon current message */
- {
- leave_cs(sid);
-#ifdef STAT
- if (shared->collectStat)
- shared->stat.VBdroppedFrames ++;
-#endif
- /*
- Fprintf(stderr, "VB not enough space 1, drop msg.sn %d pktsn %d\n",
- msghd.msgsn, msghd.packetsn);
- */
- skip_message(dataSocket, &msghd);
- continue;
- }
- leave_cs(sid);
- /*
- fprintf(stderr, "VB allocated a buffer for comming packet.\n");
- */
- psize = msghd.packetSize;
- poffset = 0;
- packet = (VideoPacket *)((char*)msg + sizeof(msghd));
- *(((int*)packet)+(msghd.packetSize>>2)) = 0;
- /* clear the last no more than three bytes, for
- proper detecting the end of packet by VD */
- ptr = (char*)msg;
- for (;;)
- {
- int bytes;
- bytes = sizeof(msghd) + msghd.msgSize;
- if (conn_tag >= 0) {
- len = bytes;
- read_bytes(dataSocket, ptr + sizeof(msghd), bytes - sizeof(msghd));
- }
- else {
- len = bytes;
- memcpy(ptr + sizeof(msghd), tmp_buf + sizeof(msghd), bytes - sizeof(msghd));
- }
- if (exit_tag) exit_on_kill();
- if (len == -1) {
- perror("VB fails to recv data");
- exit(1);
- }
- if (len < bytes) {
- fprintf(stderr, "VB warn: recv() len %dB < bytes %dB\n", len, bytes);
- }
- /* because message header is already PEEKed to msghd before recv(), so we can
- use info in msghd instead of *(VideoMessage*)ptr */
- if (len != sizeof(msghd)+msghd.msgSize)
- /* some of msg contents not successfully received, abandon current packet */
- {
- /*
- fprintf(stderr, "VB got corrupted msg, len=%d, supposed len=%d\n",
- len, sizeof(msghd)+msghd.msgSize);
- */
- break;
- }
- poffset += msghd.msgSize;
- psize -= msghd.msgSize;
- ptr += msghd.msgSize;
- /*
- fprintf(stderr, "VB packet remain size %d\n", psize);
- */
- if (psize == 0)
- {
- /* finished receiving the current packet */
-#ifdef NeedByteOrderConversion
- packet->cmd = ntohl(packet->cmd);
- packet->cmdsn = ntohl(packet->cmdsn);
- packet->sh = ntohl(packet->sh);
- packet->gop = ntohl(packet->gop);
- packet->frame = ntohl(packet->frame);
- packet->display = ntohl(packet->display);
- packet->future = ntohl(packet->future);
- packet->past = ntohl(packet->past);
- packet->currentUPF = ntohl(packet->currentUPF);
- packet->dataBytes = ntohl(packet->dataBytes);
-#endif
- pcmdsn = packet->cmdsn;
- pcmd = packet->cmd;
- pfid = packet->frame;
- pgop = packet->gop;
- shared->VBheadFrame = (pcmd == CmdPLAY) ? pfid : pgop;
-
- shared->currentUPF = packet->currentUPF;
- enter_cs(sid);
- (*head)->full = 1;
- psize = sizeof(**head) + sizeof(*msg) + msghd.packetSize;
- psize = ((psize+3)>>2)<<2;
- ptr = (char*)*head + psize;
- (*head)->next = (struct block *) ptr;
- (*head) = (struct block *)ptr;
- (*head)->shcode = SHCODE;
- leave_cs(countid);
- leave_cs(sid);
-
- /* VB receives all frame except for the INIT one through normalSocket */
- if (dataSocket != normalSocket) {
- /*
- Fprintf(stderr, "VB got INIT frame.\n");
- */
- write(initSocket, (char *)&initSocket, 1); /* write a garbage byte */
- close(initSocket);
- dataSocket = normalSocket;
- }
-
- /* following is synchronization feedback algorithm */
-
- if (shared->config.syncEffective) {
- if (state > 1 && state != 4 && (len = shared->qosRecomputes) != qosRecomputes) {
- /* QoS feedback packet is sent if at any time send pattern is
- recomputed, and sync feedback is not in active state*/
- send_feedback(dataSocket, 0, 0, advance);
- qosRecomputes = len;
- }
- switch (state) {
- case 4: /* active */
- if (pcmdsn != cmdsn) {
- cmdsn = pcmdsn;
- if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) {
- state = 0;
- }
- else {
- state = 1;
- }
- break;
- }
- if (pcmd == CmdPLAY && shared->usecPerFrame != upf) {
- /* jump to state 5 if speed changes */
- state = 5;
- break;
- }
- {
- int interval = shared->usecPerFrame;
- double val = (double)(pcmd == CmdPLAY ?
- pfid - shared->nextFrame :
- (pcmd == CmdFF ?
- pgop - shared->nextGroup :
- shared->nextGroup - pgop));
- fv = DoFilter(f, val); /* get average #frames in the whole client
- pipeline, including all stages */
- val = val - fv;
- fav = DoFilter(fa, val >= 0.0 ? val : -val);
- /* get average #frames jitter in the whole client pipeline */
-
- val = fav * interval * 6;
- /* convert deviation in frame into microseconds, 6 is a magic number */
-
- /* tries to recompute advance (in microseconds), and med/high/low
- in adaptation to current jitter level */
- if ((val > advance && !reach_limit) ||
- (advance > min_advance && val < advance >> 3)) {
- advance = (int) max(2 * val, min_advance);
- med = advance / interval;
- /*
- if (pcmd == CmdPLAY) {
- if (med < shared->VDframeNumber) {
- med = shared->VDframeNumber;
- }
- }
- else
- */
- if (med < 2 ) { /* but keep minimum buffer fill level */
- med = 2;
- }
- if (med > (VB_BUF_SIZE / shared->averageFrameSize) / 2) {
- reach_limit = 1;
- med = (VB_BUF_SIZE / shared->averageFrameSize) / 2;
- Fprintf(stderr,
- "VB VSadvance control: VBbuf limit reached, med %d.\n", med);
- }
- else reach_limit = 0;
- high = med + med / 2;
- low = med - med / 2;
- period = med * MAX_CLOCK_DRIFT;
- Fprintf(stderr,
- "VB: VS advance control: fav %5.2f, med %d, advance %d at nextFrame %d\n",
- fav, med, advance, shared->nextFrame);
- }
- }
- /* record the current time (fid or gopid) if buffer fill level drift
- only very little */
- if ((int)fv == med) {
- init_fv = fv;
- init_pos = pcmd == CmdPLAY ? pfid : pgop;
- break;
- }
- /*
- fprintf(stderr, "VB fb: fv %lf\n", fv);
- */
- /* try send action if low/high water mark is passed, or qos recomputed */
- /* There is problem here, the deltas of upf are sent, instead of upf
- and frame themself. This scheme is not robust in case case feedback
- packets are lost, and get resent */
- len = shared->qosRecomputes;
- if (fv >= high || fv <= low || len != qosRecomputes) {
- int addupf, addf;
- int pos = pcmd == CmdPLAY ? pfid : pgop;
- int dist = (int)(pcmd == CmdFB ? init_pos - pos : pos - init_pos);
- if (fv >= high || fv <= low) {
- if (dist < period) { /* try skip or stall */
- addf = (int)(med - fv);
- addupf = 0;
- }
- else { /* try adjust VS clock rate */
- int added = (int)((double)cupf * (fv - (double)med) / (double) dist);
- addf = (int)(med - fv);
- addupf = added;
- cupf += added;
- }
- state = 6;
- }
- else { /* fb only recomputed sendpattern, no state change */
- addupf = 0;
- addf = 0;
- }
-
- /* tries to send a feedback packet. */
- if (shared->live) { /* no sync feedback with live video */
- qosRecomputes = len;
- }
- else if (send_feedback(dataSocket, addupf, addf, advance) == -1) {
- /* Keep trying action repeatedly if failed to send the action
- packet (by keeping in state 4).
- An action packet can also be lost in the network */
- state = 4;
- }
- else {
- qosRecomputes = len;
- }
- if (state == 6) { /* record the time if an action packet is
- successfully send, and indicate that an
- feedback action leads to state 6, which after
- delay sometime leads to state 3.
- The action_delay should have been related
- to round-trip time. */
- action_time = get_usec();
- action_delay = shared->usecPerFrame * 100;
- not_action = 0;
- }
- }
- break;
- case 6: /* reset after action */
- if (pcmdsn != cmdsn) {
- cmdsn = pcmdsn;
- if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) {
- state = 0;
- }
- else {
- state = 1;
- }
- break;
- }
- if (pcmd == CmdPLAY && shared->usecPerFrame != upf) {
- state = 5;
- break;
- }
- /* Jump to transition state 3 only after delay for some
- time, when feedback action has been taken, and the
- effect has been propogated back to the client */
- if (get_duration(action_time, get_usec()) >= action_delay) {
- state = 3;
- }
- break;
- case 5: /* reset after speed change, feedback stays in this
- state as long as play speed is changing */
- if (pcmdsn != cmdsn) {
- cmdsn = pcmdsn;
- if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) {
- state = 0;
- }
- else {
- state = 1;
- }
- break;
- }
- /* Jump to transition state 3, indicating that the transition
- is not caused by feedback action */
- if (shared->currentUPF == shared->usecPerFrame) {
- not_action = 1;
- state = 3;
- }
- break;
- case 2: /* delay after start, this delay is for avoiding feedback
- action during server fast start-up. */
- if (pcmdsn != cmdsn) {
- cmdsn = pcmdsn;
- if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) {
- state = 0;
- }
- else {
- state = 1;
- }
- break;
- }
- if (pcmd == CmdPLAY) {
- if (pfid - startpos >= delay) {
- advance = shared->VStimeAdvance;
- state = 3;
- }
- }
- else if (pcmd == CmdFF) {
- if (pgop - startpos >= delay) {
- advance = shared->VStimeAdvance;
- state = 3;
- }
- }
- else { /* CmdFB */
- if (startpos - pgop >= delay) {
- advance = shared->VStimeAdvance;
- state = 3;
- }
- }
- break;
- case 3: /* transient state, entered after start-up delay,
- action-delay, or play-speed change */
- if (pcmdsn != cmdsn) {
- cmdsn = pcmdsn;
- if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) {
- state = 0;
- }
- else {
- state = 1;
- }
- break;
- }
- /* Initialize both buffer-fill-level and jitter filters */
- if (f == NULL) {
- f = NewFilter(FILTER_LOWPASS, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- }
- else {
- f = ResetFilter(f, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- }
- if (fa == NULL) {
- fa = NewFilter(FILTER_LOWPASS, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- DoFilter(fa, 0.0);
- }
- else if (not_action) { /* reset jitter level filter only
- if entering this state is not
- cause by feedback action */
- fa = ResetFilter(fa, shared->config.filterPara >= 1 ?
- shared->config.filterPara : 100);
- }
- if (f == NULL || fa == NULL) {
- perror("VB failed to allocate space for filters");
- state = 0;
- }
- else {
- init_fv =
- DoFilter(f, (double)(pcmd == CmdPLAY ?
- pfid - shared->nextFrame :
- (pcmd == CmdFF ?
- pgop - shared->nextGroup :
- shared->nextGroup - pgop)));
- init_pos = pcmd == CmdPLAY ? pfid : pgop;
- upf = shared->currentUPF;
- cupf = upf;
- {
- int interval = shared->usecPerFrame;
-
- /* upon speed change, 'advance', in microseconds, will
- not change, but med/high/low will be updated. This
- may suggest that in the new toolkit version of the
- same feedback systems, the buffer-fill level and
- jitter is measured directly in microseconds, not in
- #frames then converting to microseconds. */
- med = advance / interval;
- /*
- if (pcmd == CmdPLAY) {
- if (med < shared->VDframeNumber) {
- med = shared->VDframeNumber;
- min_advance = advance = med * interval;
- }
- }
- else
- */
- if (med < 2 ) {
- med = 2;
- advance = med * interval;
- min_advance = max(advance, shared->VStimeAdvance);
- }
- else min_advance = shared->VStimeAdvance;
- if (med > (VB_BUF_SIZE / shared->averageFrameSize) / 2) {
- reach_limit = 1;
- med = (VB_BUF_SIZE / shared->averageFrameSize) / 2;
- if (not_action) {
- Fprintf(stderr,
- "VB start/speed-change: VBbuf limit reached, med %d.\n", med);
- }
- }
- else reach_limit = 0;
- }
- high = med + med / 2;
- low = med - med / 2;
- delay = med * (SPEEDUP_INV_SCALE - 1); /* this delay is to avoid
- feedback when VS is in
- fast-start period */
- period = med * MAX_CLOCK_DRIFT;
- if (not_action) {
- Fprintf(stderr,
- "VB start/speed-change: med %d, advance %d at nextFrame %d\n",
- med, advance, shared->nextFrame);
- }
- state = 4;
- }
- break;
- case 0: /* idle */
- if (pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB) {
- cmdsn = pcmdsn;
- state = 1;
- }
- break;
- case 1: /* start */
- if (pcmdsn != cmdsn) {
- cmdsn = pcmdsn;
- if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) {
- state = 0;
- }
- break;
- }
- startpos = pcmd == CmdPLAY ? pfid : pgop;
- advance = shared->VStimeAdvance;
-
- /* following from vs.c:
- timerAdjust = (VStimeAdvance * SPEEDUP_INV_SCALE) / currentUPF;
- */
- med = advance / shared->usecPerFrame;
- /*
- if (pcmd != CmdPLAY) med /= shared->patternSize;
- */
- delay = med * (SPEEDUP_INV_SCALE - 1); /* this delay is to avoid
- feedback when VS is in
- fast-start period */
- not_action = 1;
- state = 2;
- break;
- default:
- fprintf(stderr, "VB: unknown Feedback state %d reached.\n", state);
- state = 0;
- break;
- }
- } /* end if (shared->config.syncEffective) */
- else {
- state = 0;
- }
-#ifdef STAT
- if (shared->collectStat && packet->cmd != CmdREF)
- {
- char * val, * val1;
- int size;
- size = packet->frame;
- shared->stat.VBframesReceived[size >>3] |= 1 << (size % 8);
- val = (char *)*head;
- val1 = (char *)*tail;
- if (val >= val1) /* *head >= *tail */
- size = val - val1;
- else
- size = bufsize - (val1 - val);
- shared->stat.VBmaxBytes = max(shared->stat.VBmaxBytes, size);
- }
-#endif
- /*
- fprintf(stderr, "VB: Packet(%x, buf:%x)=cmd-%d, cmdsn-%d sh-%d, gop-%d\n",
- (int)packet, (int)buf, packet->cmd, packet->cmdsn, packet->sh, packet->gop);
- fprintf(stderr, " frame-%d, display-%d, future-%d, past-%d, bytes-%d\n",
- packet->frame, packet->display, packet->future,
- packet->past, packet->dataBytes);
- */
- break; /* got the whole packet, break to the out-most loop for next packet */
- } /* end if (psize == 0) */
- else if (psize < 0)
- {
- fprintf(stderr, "VB error: received too many msgs for a packet.\n");
- exit(1);
- }
-
- /* try get another message for current packet */
- for (;;)
- {
- if (conn_tag >= 0) {
- len = wait_read_bytes(dataSocket, (char *)&msghd, sizeof(msghd));
- }
- else {
- len = read(dataSocket, tmp_buf, -conn_tag);
- memcpy((char *)&msghd, tmp_buf, sizeof(msghd));
- }
- if (exit_tag) exit_on_kill();
- if (len <= 0)
- {
- if (errno == EWOULDBLOCK || errno == EAGAIN) {
- perror("VB sleep2 for 10ms");
- usleep(10000);
- if (exit_tag) exit_on_kill();
- continue;
- }
- perror("VB recv data(MSG_PEEK)");
- exit(1);
- }
- if (len < sizeof(msghd)) {
- fprintf(stderr, "VD warn: PEEK1ed %dB < expected %dB\n",
- len, sizeof(msghd));
- continue;
- }
-#ifdef NeedByteOrderConversion
- msghd.packetsn = ntohl(msghd.packetsn);
- msghd.packetSize = ntohl(msghd.packetSize);
- msghd.msgsn = ntohl(msghd.msgsn);
- msghd.msgOffset = ntohl(msghd.msgOffset);
- msghd.msgSize = ntohl(msghd.msgSize);
-#endif
- /*
- fprintf(stderr, "VB PEEK2 a msg: sn-%d, size-%d, pkt-%d, pktsize-%d\n",
- msghd.msgsn, msghd.msgSize, msghd.packetsn, msghd.packetSize);
- */
-#ifdef STAT
- {
- int gap = msghd.msgsn - gap_msgsn;
- gap = (gap >MSGGAP_MAX) ? MSGGAP_MAX : gap < MSGGAP_MIN ? MSGGAP_MIN : gap;
- shared->stat.VBmsgGaps[gap - MSGGAP_MIN] ++;
- if (gap >0) gap_msgsn = msghd.msgsn;
- }
-#endif
- if (msghd.msgsn <= msgsn) { /* outdated message, wait for next one */
- /*
- fprintf(stderr, "VB discard outdated or dup msgsn %d, pktsn %d\n",
- msghd.msgsn, msghd.packetsn);
- */
- skip_message(dataSocket, &msghd);
- continue;
- }
- break; /* got a message for current packet */
- } /* end for (;;) */
-
- if (msghd.msgsn > msgsn + 1 || msghd.msgOffset == 0)
- {
- /* message out of order, abandon current packet */
- /*
- fprintf(stderr, "VB msg out of order for current packet, discard it.\n");
- */
-#ifdef STAT
- to_count = 0;
-#endif
- goto start_new_packet;
- }
- else {
- msgsn = msghd.msgsn;
- }
- }
- }
-}
-
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp
deleted file mode 100644
index 1eb9bb214de..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp
+++ /dev/null
@@ -1,929 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <signal.h>
-#include <unistd.h>
-#include <stdlib.h>
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-*/
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-#include "common.h"
-#include "newproto.h"
-#include "global.h"
-#include "dither.h"
-#include "video.h"
-#include "proto.h"
-
-#define MAX_VDBLOCK_NUM 8
-#define CQUEUE_SIZE MAX_VDBLOCK_NUM + 2
-#define ESTACK 0
-#define CQUEUE 1
-
-static int win_width, win_height;
-static int ecountid, ccountid;
-static int sid;
-
-extern VidStream * curVidStream;
-
-static struct shared_mem_block
-{
- int size;
- int block_num;
- int width, height;
- int sptr, qhead, qtail;
- FrameBlock *estack[MAX_VDBLOCK_NUM];
- FrameBlock *cqueue[CQUEUE_SIZE]; /* cqueue will never get full */
-} * shm = NULL;
-
-static void InitDitherEnv(void);
-static void DitherFrame(PictImage * pict, FrameBlock * frame);
-static void DoDitherImage(unsigned char *l, unsigned char *Cr, unsigned char *Cb,
- unsigned char *disp, int h, int w);
-
-void VDinitBuf(int size)
-/* size in bytes */
-{
- shm = (struct shared_mem_block *)creat_shared_mem_id(size, &shared->VDbufId);
- shared->VDbufAddr = (char *)shm;
-
- shm->width = shm->height = 0;
- shm->size = size - sizeof(*shm);
- sid = creat_semaphore();
- ecountid = creat_semaphore();
- ccountid = creat_semaphore();
- enter_cs(ccountid);
- enter_cs(ecountid);
-}
-
-static void put_block(FrameBlock * bptr, int tag)
-{
- if (tag == ESTACK)
- {
- shm->estack[shm->sptr] = bptr;
- shm->sptr ++;
- if (shm->sptr > MAX_VDBLOCK_NUM)
- {
- fprintf(stderr, "VD weird error: ESTACK full.\n");
- exit(1);
- }
- }
- else
- {
- if (shm->qtail == shm->qhead) /* empty queue */
- {
- shm->qtail = 0;
- shm->qhead = 1;
- shm->cqueue[0] = bptr;
- }
- else
- {
- int val = CQUEUE_SIZE;
- int pos = (shm->qhead - 1 + val) % val; /* pos = shm->qhead - 1 */
- if (shared->cmd == CmdPLAY)
- while ((pos + 1) % val != shm->qtail)
- {
- if (shm->cqueue[pos]->display > bptr->display)
- {
- shm->cqueue[(pos + 1) % val] = shm->cqueue[pos];
- pos = (pos - 1 + val) % val; /* pos -= 1 */
- }
- else
- break;
- }
- shm->cqueue[(pos + 1) % val] = bptr;
- shm->qhead = (shm->qhead + 1) % val;
- }
- }
-}
-
-static FrameBlock * get_block(int tag)
-{
- FrameBlock * ptr;
-
- if (tag == ESTACK)
- {
- if (shm->sptr <= 0)
- {
- fprintf(stderr, "VD get_block error: ESTACK empty.\n");
- return NULL;
- }
- shm->sptr --;
- ptr = shm->estack[shm->sptr];
- }
- else
- {
- if (shm->qtail == shm->qhead)
- {
- fprintf(stderr, "VD get_block error: CQUEUE empty.\n");
- return NULL;
- }
- ptr = shm->cqueue[shm->qtail];
- shm->qtail = (shm->qtail + 1) % (CQUEUE_SIZE);
- }
- return ptr;
-}
-
-void VDresizeBuf(int height, int width)
-{
- char * ptr = (char*)shm + sizeof(*shm);
- int imagesize;
- int i;
-
- enter_cs(sid);
-
- if (get_semval(ecountid) < 0) {
- fprintf(stderr, "Error<weird>: pid %d get (ecountid) = %d < 0\n",
- getpid(), get_semval(ecountid));
- exit(1);
- }
- /*
- fprintf(stderr, "VD before resizeBuf(): get_semval(ecountid) = %d\n",
- get_semval(ecountid));
- */
- while (get_semval(ecountid) > 0) enter_cs(ecountid);
-
- shm->width = width;
- shm->height = height;
- width = ((width+15)>>4) << 4;
- height = ((height+15)>>4) << 4;
- imagesize = (((height * width)+3)>>2)<<2;
- if ((ditherType == Twox2_DITHER) || (ditherType == FULL_COLOR_DITHER))
- imagesize <<= 2;
-
- shm->block_num = (shm->size)/(sizeof(FrameBlock) + imagesize);
- if (shm->block_num > MAX_VDBLOCK_NUM)
- shm->block_num = MAX_VDBLOCK_NUM;
-
- Fprintf(stderr, "VD resizeBuf: got %d(max %d) blocks of size %d.\n",
- shm->block_num,
- (shm->size)/(sizeof(FrameBlock) + imagesize),
- (sizeof(FrameBlock) + imagesize));
-
- if (shm->block_num < 3)
- {
- fprintf(stderr,
- "VD error: VDbuf fails to hold at least 3(three) block.\n");
- exit(1);
- }
- shm->sptr = 0; /* empty stack */
- shm->qhead = shm->qtail = 0; /* empty cqueue */
- for (i=0; i<shm->block_num; i++)
- {
- put_block((FrameBlock *)ptr, ESTACK);
- ((FrameBlock *)ptr)->data = (unsigned char *)(ptr + sizeof(FrameBlock));
- ptr += sizeof(FrameBlock) + imagesize;
- leave_cs(ecountid);
- }
- leave_cs(sid);
-
- shared->VDframeNumber = shm->block_num;
- /*
- fprintf(stderr, "VD after resizeBuf(): get_semval(ecountid) = %d\n",
- get_semval(ecountid));
- */
-}
-
-FrameBlock * VDgetBuf(void) /* block version, return with interrupt */
-{
- FrameBlock * ptr;
- enter_cs(ecountid);
- enter_cs(sid);
- ptr = get_block(ESTACK);
- if (ptr != NULL)
- ptr->refcount = 1;
- leave_cs(sid);
- if (ptr == NULL)
- fprintf(stderr, "VD error: VDgetBuf should not return NULL.\n");
- /*
- fprintf(stderr, "pid %d VDgetBuf() %u, ref %d, ecount %d\n",
- getpid(), (unsigned)ptr, ptr->refcount, get_semval(ecountid));
- */
- return ptr;
-}
-
-int VDcheckBuf(void) /* non-block check, return True/False */
-{
- if (get_semval(ecountid) > 0)
- return 1;
- else
- return 0;
-}
-
-void VDputMsg(FrameBlock * msgPtr)
-{
- enter_cs(sid);
- put_block(msgPtr, CQUEUE);
- leave_cs(ccountid);
- leave_cs(sid);
- /*
- fprintf(stderr, "pid %d VDputMsg() %u, ref %d, ccount %d\n",
- getpid(), (unsigned)msgPtr, msgPtr->refcount, get_semval(ccountid));
- */
-}
-
-FrameBlock * VDgetMsg(void) /* block version, return with interrupt */
-{
- FrameBlock * ptr;
- enter_cs(ccountid);
- enter_cs(sid);
- ptr = get_block(CQUEUE);
- leave_cs(sid);
- if (ptr == NULL)
- fprintf(stderr, "VD error: VDgetMsg should not return NULL.\n");
- /*
- fprintf(stderr, "pid %d VDgetMsg() %u, ref %d, ccount %d\n",
- getpid(), (unsigned)ptr, ptr->refcount, get_semval(ccountid));
- */
- return ptr;
-}
-
-int VDcheckMsg(void) /* non-block check, return Number of Msg in buffer */
-{
- return get_semval(ccountid);
-}
-
-int VDbufEmpty(void)
-{
- /*
- Fprintf(stderr, "VD ecountid %d, shm-block_num %d\n",
- get_semval(ecountid), shm->block_num);
- */
- return (get_semval(ecountid) == shm->block_num);
-}
-
-FrameBlock * VDpeekMsg(void)
-{
- FrameBlock * ptr;
-
- enter_cs(sid);
-
- if (shm->qhead == shm->qtail)
- ptr = NULL;
- else
- ptr = shm->cqueue[shm->qtail];
- leave_cs(sid);
- /*
- if (ptr != NULL) {
- fprintf(stderr, "pid %d VDpeekMsg() = %u, ref=%d\n",
- getpid(), (unsigned)ptr, ptr->refcount);
- }
- */
- return ptr;
-}
-
-void VDreferMsg(FrameBlock * msgPtr)
-{
- enter_cs(sid);
- msgPtr->refcount ++;
- leave_cs(sid);
- /*
- fprintf(stderr, "pid %d VDreferMsg() %u, ccount %d\n",
- getpid(), (unsigned)msgPtr, get_semval(ccountid));
- */
-}
-
-void VDreclaimMsg(FrameBlock * msgPtr)
-{
- int ref;
- enter_cs(sid);
- ref = msgPtr->refcount;
- if (msgPtr->refcount <= 1)
- {
- put_block(msgPtr, ESTACK);
- leave_cs(ecountid);
- }
- else
- msgPtr->refcount --;
- leave_cs(sid);
- /*
- fprintf(stderr, "pid %d VDreclaimMsg() %u, ref %d, ecount %d\n",
- getpid(), (unsigned)msgPtr, ref, get_semval(ecountid));
- */
- if (ref <= 0) {
- Fprintf(stderr, "pid %d VDreclaimMsg() %u WEIRD, :ref %d:, ecount %d\n",
- getpid(), (unsigned)msgPtr, ref, get_semval(ecountid));
- }
-}
-
-void VDdeleteBuf(void)
-{
- remove_shared_mem((char*)shm);
-}
-
-void VDdeleteSem(void)
-{
- remove_semaphore(ecountid);
- remove_semaphore(ccountid);
- remove_semaphore(sid);
-}
-
-int
-get_more_data(unsigned int *buf_start, int max_length,
- int *length_ptr, unsigned int **buf_ptr)
-{
- fprintf(stderr,
- "Fatel error: vd.c get_more_data() should not be called, bufLength = %d.!\n",
- *length_ptr);
- fprintf(stderr, " **** Please report this bug. ****\n");
- exit(1);
- return 0;
-}
-
-static void printPacket(VideoPacket *p)
-{
- fprintf(stderr, "VD: Packet(%x)=cmd-%d, cmdsn-%d sh-%d, gop-%d\n",
- (int)p, p->cmd, p->cmdsn, p->sh, p->gop);
- fprintf(stderr, " frame-%d, display-%d, future-%d, past-%d, bytes-%d\n",
- p->frame, p->display, p->future,
- p->past, p->dataBytes);
-}
-
-static void usr1_handler(int sig)
-{
- fprintf(stderr, "VD void usr1_handler.\n");
-}
-
-static void usr2_handler(int sig)
-{
- fprintf(stderr, "VD void usr2_handler\n");
-}
-
-void VDprocess(int CTRpid)
-{
- FrameBlock * curBlk = NULL;
- PictImage * curPict = NULL;
-
- InitDitherEnv();
-
- curVidStream = NewVidStream();
- if (curVidStream == NULL)
- {
- fprintf(stderr, "VD: unable to allocat curVidStream.\n");
- exit(1);
- }
- setsignal(SIGUSR1, usr1_handler);
- setsignal(SIGUSR2, usr2_handler);
-
- for(;;)
- {
- int curcmd, curcmdsn;
- int i;
- int single_tag;
- VideoPacket *p;
-
- if (curBlk != NULL) {
- VDreclaimMsg(curBlk);
- curBlk = NULL;
- }
- p = (VideoPacket*)VBgetMsg(); /* guarranteed to get a Packet */
- /*
- printPacket(p);
- */
- /*
- Fprintf(stderr, "VD: got frame %d\n", p->frame);
- */
- curcmd = shared->cmd;
- curcmdsn = shared->cmdsn;
- if (p->cmdsn != shared->cmdsn || p->cmdsn != curcmdsn)
- {
-
- /*
- fprintf(stderr, "VD: frame not for current Cmd, discard it\n");
-
- printPacket(p);
- */
- VBreclaimMsg((char*)p);
- continue;
- }
- if (curcmd == CmdINIT)
- {
- /* free/allocate all PictImages, resize VDbuffer */
- curVidStream->future = curVidStream->past = curVidStream->current = NULL;
- win_width = ((shared->horizontalSize + 15)>>4)<<4;
- win_height = ((shared->verticalSize + 15)>>4)<<4;
- for (i = 0; i < RING_BUF_SIZE; i++)
- {
- if (curVidStream->ring[i] != NULL)
- DestroyPictImage(curVidStream->ring[i]);
- curVidStream->ring[i] =
- NewPictImage(win_width, win_height);
- }
- for (i = 0; i < 500; i ++) {
- if (!VDbufEmpty()) usleep(1000);
- else break;
- }
- if (!VDbufEmpty()) {
- fprintf(stderr, "VD error<weired>: VDbuf can't become empty.\n");
- exit(1);
- }
- VDresizeBuf(shared->verticalSize, shared->horizontalSize);
- }
- else if (curcmd == CmdPLAY || curcmd == CmdSTEP)
- {
- /* to check if the packet can be decoded or not */
- if (p->future == -1)
- { /* swap because the existing VD decoding algorithm refer to 'future' frame
- to decode a P frame */
- int tmp = p->past;
- p->past = p->future;
- /* following is the bug found on 2-14-96, this may be the cause of decoding
- P frames incorrectly, and showing corrupted messages, when previous I/P
- frames are dropped. This happens frequently when the server is a remote one.
-
- p->future = p->past;
-
- */
- p->future = tmp;
-
- }
- if ((p->future >= 0 &&
- (curVidStream->future == NULL || curVidStream->future->frame != p->future)) ||
- (p->past >= 0 &&
- (curVidStream->past == NULL || curVidStream->past->frame != p->past)))
- {
- /*
- fprintf(stderr,
- "VD: unable to decode packet -- future and/or past frame no available.\n");
- printPacket(p);
- */
- if (curcmd == CmdSTEP && curcmdsn == shared->cmdsn) {
- /*
- Fprintf(stderr, "VD failed to decode f%d, USR1 to CTR for STEP\n", p->frame);
- */
- kill(getppid(), SIGUSR1); /* notify CTR anyway if STEP */
- }
-#ifdef STAT
- else if (shared->collectStat && curcmd == CmdPLAY)
- shared->stat.VDnoRef ++;
-#endif
- VBreclaimMsg((char*)p);
- continue;
- }
- }
- curBlk = VDgetBuf();
-
- single_tag = 0;
- /* to check if it's in time for PLAY, FF and FB */
- if (curcmd == CmdPLAY)
- {
-
-#if 0
- /* checking against sendPattern seems irreasonable, because send-pattern of a less
- frame-rate is not necessarily a subset of the one of a bigger frame-rate.
- */
- /* check against sendPattern */
- if (p->frame - shared->firstGopFrames > 0)
- {
- int i = (p->frame - shared->firstGopFrames) %
- (shared->patternSize * shared->sendPatternGops);
- if (shared->sendPattern[i] == 0)
- {
- VBreclaimMsg((char*)p);
-#ifdef STAT
- if (shared->collectStat)
- shared->stat.VDagainstSendPattern ++;
-#endif
- continue;
- }
- }
-#endif
-
- if (VBcheckMsg() > 0) { /* a frame is to be dropped only if
- there are more frames in VB */
- if (p->past >= 0) { /* 'B' */
- if (p->display <= shared->nextFrame) {
-#ifdef STAT
- if (shared->collectStat)
- shared->stat.VDtooLateB ++;
-#endif
- goto frameTooLate;
- }
- }
- else if (p->future >= 0) { /* 'P' */
- if (shared->lastIframeDecoded + shared->IframeGap <= shared->nextFrame) {
-#ifdef STAT
- if (shared->collectStat)
- shared->stat.VDtooLateP ++;
-#endif
- goto frameTooLate;
- }
- }
- else { /* 'I' */
- if (!shared->live)
- {
- if (p->display + shared->IframeGap <= shared->nextFrame) {
-#ifdef STAT
- if (shared->collectStat)
- shared->stat.VDtooLateI ++;
-#endif
- frameTooLate:
- if (shared->rtplay) /* too late, drop the frame */
- {
- VBreclaimMsg((char*)p);
- /*
- Fprintf(stderr, "VD: frame %d too late, shared->nextFrame %d.\n",
- p->frame, shared->nextFrame);
- */
- continue;
- }
- }
- }
- else { /* live video */
- if (p->display < shared->nextFrame) {
- VBreclaimMsg((char*)p);
- /*
- Fprintf(stderr, "VD live video frame %d too late, nextFrame=%d\n",
- p->frame, shared->nextFrame);
- */
- continue;
- }
- }
- }
- }
- }
- else if (curcmd == CmdFF)
- {
- if (p->gop < shared->nextGroup && VDcheckMsg() > 0)
- {
- /*
- fprintf(stderr, "VD: a frame too late and dropped when FF.\n");
- printPacket(p);
- */
- VBreclaimMsg((char*)p);
- continue;
- }
- }
- else if (curcmd == CmdFB)
- {
- if (p->gop > shared->nextGroup && VDcheckMsg() > 0)
- {
- /*
- fprintf(stderr, "VD: a frame too late and dropped when FB.\n");
- printPacket(p);
- */
- VBreclaimMsg((char*)p);
- continue;
- }
- }
- else
- single_tag = 1;
-
- if (shared->videoFormat == VIDEO_JPEG || shared->videoFormat == VIDEO_SIF) {
- int picsize = win_width * win_height;
- unsigned char * l, *cr, *cb;
-
- if (shared->videoFormat == VIDEO_SIF) {
- l = (unsigned char*)p + sizeof(*p);
- cr = l + picsize;
- cb = l + picsize + (picsize >> 2);
- }
- else { /* decode the JPEG frame */
- l = cr = cb = (unsigned char *)curBlk->data;
- memcpy(l, (unsigned char*)p + sizeof(*p), p->dataBytes);
- }
- DoDitherImage(l, cr, cb,
- (unsigned char *)curBlk->data, win_height, win_width);
- curBlk->sh = p->sh;
- curBlk->gop = p->gop;
- curBlk->frame = p->frame;
- curBlk->display = p->display;
- curBlk->future = p->future;
- curBlk->past = p->past;
- VDputMsg(curBlk);
- curBlk = NULL;
- /*
- Fprintf(stderr, "VD: SIF frame %d decoded.\n", p->frame);
- */
- goto end_decode_loop;
- }
-#ifdef NeedByteOrderConversion
- else {
- unsigned int * ptr = (unsigned int *)((char*)p + sizeof(*p));
- /* the added two extra words to max_buf_length: one is for SHCODE, already
- in right byte order, the second is for prevent calling of get_more_data().
- (which seem required for the UCB decoder used here ), this second word
- contains value used by VB algorithm, and can't be changed elsewhere.
- So they should not be swapped byte order. */
- for (i=0; i<((p->dataBytes + 11)>>2) - 2; i++)
- {
- *ptr = ntohl(*ptr);
- ptr++;
- }
- }
-#endif
-
- if (!mpegVidRsrc((char*)p)) /* successfully decoded */
- {
- curPict = curVidStream->current;
- /*
- fprintf(stderr, "VD successfully decodes a frame.\n");
- printPacket(p);
- */
- if (curcmd == CmdPLAY && shared->rtplay)
- {
- if ((curVidStream->picture.code_type == I_TYPE) ||
- (curVidStream->picture.code_type == P_TYPE))
- {
- if (curVidStream->future == NULL)
- {
- curVidStream->future = curVidStream->current;
- curVidStream->future->locked |= FUTURE_LOCK;
- }
- else
- {
- if (curVidStream->past != NULL)
- {
- curVidStream->past->locked &= ~PAST_LOCK;
- }
- else if (curcmd == CmdPLAY) {
- /* this case should happen only at the begining of PLAY */
- DitherFrame(curVidStream->future, VDgetBuf());
- }
- curVidStream->past = curVidStream->future;
- curVidStream->past->locked &= ~FUTURE_LOCK;
- curVidStream->past->locked |= PAST_LOCK;
- curVidStream->future = curVidStream->current;
- curVidStream->future->locked |= FUTURE_LOCK;
- }
- }
- }
- else if (curcmd == CmdSTEP || curcmd == CmdPLAY) /* !shared->rtplay */
- {
- if ((curVidStream->picture.code_type == I_TYPE) ||
- (curVidStream->picture.code_type == P_TYPE))
- {
- if (curVidStream->future == NULL)
- {
- curVidStream->future = curVidStream->current;
- curVidStream->future->locked |= FUTURE_LOCK;
- }
- else
- {
- if (curVidStream->past != NULL)
- {
- curVidStream->past->locked &= ~PAST_LOCK;
- }
- curVidStream->past = curVidStream->future;
- curVidStream->past->locked &= ~FUTURE_LOCK;
- curVidStream->past->locked |= PAST_LOCK;
- curVidStream->future = curVidStream->current;
- curVidStream->future->locked |= FUTURE_LOCK;
- curPict = curVidStream->past;
- }
- }
- }
- else /* only I-frame for all other Cmds */
- {
- if (curVidStream->future != NULL) {
- curVidStream->future->locked &= ~FUTURE_LOCK;
- curVidStream->future = NULL;
- }
- if (curVidStream->past != NULL)
- {
- curVidStream->past->locked &= ~PAST_LOCK;
- curVidStream->past = NULL;
- }
- /*
- curVidStream->future = curVidStream->current;
- curVidStream->future->locked |= FUTURE_LOCK;
- */
- }
-
- if (p->past == -1 && p->future == -1)
- shared->lastIframeDecoded = p->frame;
-
-#ifdef STAT
- if (shared->collectStat && p->cmd != CmdREF)
- {
- int val = curPict->frame;
- shared->stat.VDframesDecoded[val>>3] |= 1 << (val % 8);
- shared->stat.VDlastFrameDecoded = val;
- }
-#endif
- /*
- if (single_tag && p->cmd != CmdREF)
- {
- fprintf(stderr, "VD: display %d for single.\n", curPict->display);
- }
- */
- /*
- Fprintf(stderr, "p->cmd %d, p->cmdsn %d, shared->cmdsn %d\n",
- p->cmd, p->cmdsn, shared->cmdsn);
- */
- if (p->cmd != CmdREF && curcmdsn == shared->cmdsn) {
- DitherFrame(curPict, curBlk);
- curBlk = NULL;
- }
- }
- else /* decoding failed */
- {
- /*
- fprintf(stderr, "VD error -- tried but failed decoding the packet.\n");
- printPacket(p);
- */
- }
-
- end_decode_loop:
-
- /* signal CTR for singlular operation: STEP, POSITION, INIT */
- if (single_tag && p->cmd != CmdREF && curcmdsn == shared->cmdsn)
- {
- /*
- Fprintf(stderr, "VD decoded f%d, USR1 to CTR\n", p->frame);
- */
- kill(getppid(), SIGUSR1);
- }
- VBreclaimMsg((char*)p);
- }
-}
-
-
-static void InitDitherEnv(void)
-{
- lum_values = (int *) malloc(LUM_RANGE*sizeof(int));
- cr_values = (int *) malloc(CR_RANGE*sizeof(int));
- cb_values = (int *) malloc(CB_RANGE*sizeof(int));
- init_tables();
-
- while (!shared->pixelValid) {
- usleep(10000);
- }
- memcpy(pixel, shared->pixel, 256);
-
- switch (ditherType) {
-
- case HYBRID_DITHER:
-
- InitColor();
- InitHybridDither();
- break;
-
- case HYBRID2_DITHER:
- InitColor();
- InitHybridErrorDither();
- break;
-
- case FS4_DITHER:
- InitColor();
- InitFS4Dither();
- break;
-
- case FS2_DITHER:
- InitColor();
- InitFS2Dither();
- break;
-
- case FS2FAST_DITHER:
- InitColor();
- InitFS2FastDither();
- break;
-
- case Twox2_DITHER:
- InitColor();
- Init2x2Dither();
- PostInit2x2Dither();
- break;
-
- case GRAY_DITHER:
- break;
-
- case FULL_COLOR_DITHER:
- InitColorDither();
- break;
-
- case ORDERED_DITHER:
- InitColor();
- InitOrderedDither();
- break;
-
- case MONO_DITHER:
- case MONO_THRESHOLD:
- break;
-
- case ORDERED2_DITHER:
- InitColor();
- InitOrdered2Dither();
- break;
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * DoDitherImage --
- *
- * Called when image needs to be dithered. Selects correct
- * dither routine based on info in ditherType.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void DoDitherImage(unsigned char *l, unsigned char *Cr, unsigned char *Cb,
- unsigned char *disp, int h, int w)
-{
-
- switch(ditherType) {
- case HYBRID_DITHER:
- HybridDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case HYBRID2_DITHER:
- HybridErrorDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case FS2FAST_DITHER:
- FS2FastDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case FS2_DITHER:
- FS2DitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case FS4_DITHER:
- FS4DitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case Twox2_DITHER:
- Twox2DitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case FULL_COLOR_DITHER:
- ColorDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case GRAY_DITHER:
- GrayDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case NO_DITHER:
- break;
-
- case ORDERED_DITHER:
- OrderedDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case MONO_DITHER:
- MonoDitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case MONO_THRESHOLD:
- MonoThresholdImage(l, Cr, Cb, disp, h, w);
- break;
-
- case ORDERED2_DITHER:
- Ordered2DitherImage(l, Cr, Cb, disp, h, w);
- break;
-
- case MBORDERED_DITHER:
- MBOrderedDitherImage(l, Cr, Cb, disp, h, w);
- break;
- }
-}
-
-static void DitherFrame(PictImage * pict, FrameBlock *frame)
-{
- DoDitherImage((unsigned char *)pict->luminance,
- (unsigned char *)pict->Cr, (unsigned char *)pict->Cb,
- (unsigned char *)frame->data, win_height, win_width);
- frame->sh = pict->sh;
- frame->gop = pict->gop;
- frame->frame = pict->frame;
- frame->display = pict->display;
- frame->future = pict->future;
- frame->past = pict->past;
- VDputMsg(frame);
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp
deleted file mode 100644
index 06549db8205..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp
+++ /dev/null
@@ -1,3756 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* This file contains C code that implements
- * the video decoder model.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#ifndef MIPS
-#include <sys/time.h>
-#else
-#include <sys/types.h>
-#include <sys/system.h>
-#endif
-
-#include "include/common.h"
-#include "decoders.h"
-#include "video.h"
-#include "util.h"
-#include "proto.h"
-#include "global.h"
-#include "ui.h"
-
-/* Declarations of functions. */
-static void ReconIMBlock(VidStream *vid_stream, int bnum);
-static void ReconPMBlock(VidStream *vid_stream, int bnum,
- int recon_right_for, int recon_down_for, int zflag);
-static void ReconBMBlock(VidStream *vid_stream,
- int bnum, int recon_right_back,
- int recon_down_back, int zflag);
-static void ReconBiMBlock(VidStream *vid_stream, int bnum, int recon_right_for,
- int recon_down_for, int recon_right_back,
- int recon_down_back, int zflag);
-static void ReconSkippedBlock(unsigned char *source, unsigned char *dest,
- int row, int col, int row_size, int right, int down,
- int right_half, int down_half, int width);
-static int ParseSeqHead(VidStream *vid_stream);
-static int ParseGOP(VidStream *vid_stream);
-static int ParsePicture(VidStream *vid_stream,TimeStamp time_stamp);
-static int ParseSlice(VidStream *vid_stream);
-static int ParseMacroBlock(VidStream *vid_stream);
-static void ProcessSkippedPFrameMBlocks(VidStream *vid_stream);
-static void ProcessSkippedBFrameMBlocks(VidStream *vid_stream);
-
-extern int ditherType;
-char *ditherFlags;
-
-/* Macro for returning 1 if num is positive, -1 if negative, 0 if 0. */
-
-#define Sign(num) ((num > 0) ? 1 : ((num == 0) ? 0 : -1))
-
-/* Declare global pointer to vid stream used for current decoding. */
-
-VidStream *curVidStream = NULL;
-
-/* Set up array for fast conversion from zig zag order to row/column
- coordinates.
-*/
-
-int zigzag[64][2] = {
- 0, 0, 1, 0, 0, 1, 0, 2, 1, 1, 2, 0, 3, 0, 2, 1, 1, 2, 0, 3, 0, 4, 1, 3,
- 2, 2, 3, 1, 4, 0, 5, 0, 4, 1, 3, 2, 2, 3, 1, 4, 0, 5, 0, 6, 1, 5, 2, 4,
- 3, 3, 4, 2, 5, 1, 6, 0, 7, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7,
- 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6,
- 2, 7, 3, 7, 4, 6, 5, 5, 6, 4, 7, 3, 7, 4, 6, 5, 5, 6, 4, 7, 5, 7, 6, 6,
-7, 5, 7, 6, 6, 7, 7, 7};
-/* Array mapping zigzag to array pointer offset. */
-
-int zigzag_direct[64] = {
- 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12,
- 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35,
- 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
-58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63};
-/* Set up array for fast conversion from row/column coordinates to
- zig zag order.
-*/
-
-int scan[8][8] = {
- {0, 1, 5, 6, 14, 15, 27, 28},
- {2, 4, 7, 13, 16, 26, 29, 42},
- {3, 8, 12, 17, 25, 30, 41, 43},
- {9, 11, 18, 24, 31, 40, 44, 53},
- {10, 19, 23, 32, 39, 45, 52, 54},
- {20, 22, 33, 38, 46, 51, 55, 60},
- {21, 34, 37, 47, 50, 56, 59, 61},
-{35, 36, 48, 49, 57, 58, 62, 63}};
-/* Initialize P and B skip flags. */
-
-static int No_P_Flag = 0;
-static int No_B_Flag = 0;
-
-/* Max lum, chrom indices for illegal block checking. */
-
-static int lmaxx;
-static int lmaxy;
-static int cmaxx;
-static int cmaxy;
-
-/*
- * We use a lookup table to make sure values stay in the 0..255 range.
- * Since this is cropping (ie, x = (x < 0)?0:(x>255)?255:x; ), wee call this
- * table the "crop table".
- * MAX_NEG_CROP is the maximum neg/pos value we can handle.
- */
-
-#define MAX_NEG_CROP 384
-#define NUM_CROP_ENTRIES (256+2*MAX_NEG_CROP)
-#define assertCrop(x) assert(((x) >= -MAX_NEG_CROP) && \
- ((x) <= 256+MAX_NEG_CROP))
-static unsigned char cropTbl[NUM_CROP_ENTRIES];
-
-/*
- The following accounts for time and size spent in various parsing acitivites
- if ANALYSIS has been defined.
-*/
-
-#ifdef ANALYSIS
-
-
-unsigned int bitCount = 0;
-
-int showmb_flag = 0;
-int showEachFlag = 0;
-
-typedef struct {
- int frametype;
- unsigned int totsize;
- unsigned int number;
- unsigned int i_mbsize;
- unsigned int p_mbsize;
- unsigned int b_mbsize;
- unsigned int bi_mbsize;
- unsigned int i_mbnum;
- unsigned int p_mbnum;
- unsigned int b_mbnum;
- unsigned int bi_mbnum;
- unsigned int i_mbcbp[64];
- unsigned int p_mbcbp[64];
- unsigned int b_mbcbp[64];
- unsigned int bi_mbcbp[64];
- unsigned int i_mbcoeff[64];
- unsigned int p_mbcoeff[64];
- unsigned int b_mbcoeff[64];
- unsigned int bi_mbcoeff[64];
- double tottime;
-} Statval;
-
-Statval stat_a[4];
-unsigned int pictureSizeCount;
-unsigned int mbSizeCount;
-unsigned int *mbCBPPtr, *mbCoeffPtr, *mbSizePtr;
-unsigned int cacheHit[8][8];
-unsigned int cacheMiss[8][8];
-
-static void
-init_stat_struct(astat)
- Statval *astat;
-{
- int j;
-
- astat->frametype = 0;
- astat->totsize = 0;
- astat->number = 0;
- astat->i_mbsize = 0;
- astat->p_mbsize = 0;
- astat->b_mbsize = 0;
- astat->bi_mbsize = 0;
- astat->i_mbnum = 0;
- astat->p_mbnum = 0;
- astat->b_mbnum = 0;
- astat->bi_mbnum = 0;
-
- for (j = 0; j < 64; j++) {
-
- astat->i_mbcbp[j] = 0;
- astat->p_mbcbp[j] = 0;
- astat->b_mbcbp[j] = 0;
- astat->bi_mbcbp[j] = 0;
- astat->i_mbcoeff[j] = 0;
- astat->p_mbcoeff[j] = 0;
- astat->b_mbcoeff[j] = 0;
- astat->bi_mbcoeff[j] = 0;
- }
- astat->tottime = 0.0;
-}
-
-void
-init_stats()
-{
- int i, j;
-
- for (i = 0; i < 4; i++) {
- init_stat_struct(&(stat_a[i]));
- stat_a[i].frametype = i;
- }
-
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- cacheHit[i][j] = 0;
- cacheMiss[i][j] = 0;
- }
- }
-
- bitCount = 0;
-}
-
-static void
-PrintOneStat()
-{
- int i;
-
- printf("\n");
- switch (stat_a[0].frametype) {
- case I_TYPE:
- printf("I FRAME\n");
- break;
- case P_TYPE:
- printf("P FRAME\n");
- break;
- case B_TYPE:
- printf("B FRAME\n");
- break;
- }
-
- printf("Size: %d bytes + %d bits\n", stat_a[0].totsize / 8, stat_a[0].totsize % 8);
- if (stat_a[0].i_mbnum > 0) {
- printf("\tI Macro Block Stats:\n");
- printf("\t%d I Macroblocks\n", stat_a[0].i_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[0].i_mbsize / (8 * stat_a[0].i_mbnum),
- (stat_a[0].i_mbsize * stat_a[0].i_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].i_mbcbp[i],
- stat_a[0].i_mbcbp[i + 1], stat_a[0].i_mbcbp[i + 2], stat_a[0].i_mbcbp[i + 3],
- stat_a[0].i_mbcbp[i + 4], stat_a[0].i_mbcbp[i + 5], stat_a[0].i_mbcbp[i + 6],
- stat_a[0].i_mbcbp[i + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].i_mbcoeff[i],
- stat_a[0].i_mbcoeff[i + 1], stat_a[0].i_mbcoeff[i + 2],
- stat_a[0].i_mbcoeff[i + 3], stat_a[0].i_mbcoeff[i + 4],
- stat_a[0].i_mbcoeff[i + 5], stat_a[0].i_mbcoeff[i + 6],
- stat_a[0].i_mbcoeff[i + 7]);
- }
- }
- if (stat_a[0].p_mbnum > 0) {
- printf("\tP Macro Block Stats:\n");
- printf("\t%d P Macroblocks\n", stat_a[0].p_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[0].p_mbsize / (8 * stat_a[0].p_mbnum),
- (stat_a[0].p_mbsize / stat_a[0].p_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].p_mbcbp[i],
- stat_a[0].p_mbcbp[i + 1], stat_a[0].p_mbcbp[i + 2], stat_a[0].p_mbcbp[i + 3],
- stat_a[0].p_mbcbp[i + 4], stat_a[0].p_mbcbp[i + 5], stat_a[0].p_mbcbp[i + 6],
- stat_a[0].p_mbcbp[i + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].p_mbcoeff[i],
- stat_a[0].p_mbcoeff[i + 1], stat_a[0].p_mbcoeff[i + 2],
- stat_a[0].p_mbcoeff[i + 3], stat_a[0].p_mbcoeff[i + 4],
- stat_a[0].p_mbcoeff[i + 5], stat_a[0].p_mbcoeff[i + 6],
- stat_a[0].p_mbcoeff[i + 7]);
- }
- }
- if (stat_a[0].b_mbnum > 0) {
- printf("\tB Macro Block Stats:\n");
- printf("\t%d B Macroblocks\n", stat_a[0].b_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[0].b_mbsize / (8 * stat_a[0].b_mbnum),
- (stat_a[0].b_mbsize / stat_a[0].b_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].b_mbcbp[i],
- stat_a[0].b_mbcbp[i + 1], stat_a[0].b_mbcbp[i + 2], stat_a[0].b_mbcbp[i + 3],
- stat_a[0].b_mbcbp[i + 4], stat_a[0].b_mbcbp[i + 5], stat_a[0].b_mbcbp[i + 6],
- stat_a[0].b_mbcbp[i + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].b_mbcoeff[i],
- stat_a[0].b_mbcoeff[i + 1], stat_a[0].b_mbcoeff[i + 2],
- stat_a[0].b_mbcoeff[i + 3], stat_a[0].b_mbcoeff[i + 4],
- stat_a[0].b_mbcoeff[i + 5], stat_a[0].b_mbcoeff[i + 6],
- stat_a[0].b_mbcoeff[i + 7]);
- }
- }
- if (stat_a[0].bi_mbnum > 0) {
- printf("\tBi Macro Block Stats:\n");
- printf("\t%d Bi Macroblocks\n", stat_a[0].bi_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[0].bi_mbsize / (8 * stat_a[0].bi_mbnum),
- (stat_a[0].bi_mbsize * stat_a[0].bi_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].bi_mbcbp[i],
- stat_a[0].bi_mbcbp[i + 1], stat_a[0].bi_mbcbp[i + 2], stat_a[0].bi_mbcbp[i + 3],
- stat_a[0].bi_mbcbp[i + 4], stat_a[0].bi_mbcbp[i + 5], stat_a[0].bi_mbcbp[i + 6],
- stat_a[0].bi_mbcbp[i + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (i = 0; i < 64; i += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].bi_mbcoeff[i],
- stat_a[0].bi_mbcoeff[i + 1], stat_a[0].bi_mbcoeff[i + 2],
- stat_a[0].bi_mbcoeff[i + 3], stat_a[0].bi_mbcoeff[i + 4],
- stat_a[0].bi_mbcoeff[i + 5], stat_a[0].bi_mbcoeff[i + 6],
- stat_a[0].bi_mbcoeff[i + 7]);
- }
- }
- printf("\nTime to Decode: %g secs.\n", stat_a[0].tottime);
- printf("****************\n");
-}
-
-void
-PrintAllStats()
-{
- int i, j;
- unsigned int supertot, supernum;
- double supertime;
-
- printf("\n");
- printf("General Info: \n");
- printf("Width: %d\nHeight: %d\n", curVidStream->mb_width * 16, curVidStream->mb_height * 16);
-
- for (i = 1; i < 4; i++) {
-
- if (stat_a[i].number == 0)
- continue;
-
- switch (i) {
- case 1:
- printf("I FRAMES\n");
- break;
- case 2:
- printf("P FRAMES\n");
- break;
- case 3:
- printf("B FRAMES\n");
- break;
- }
-
- printf("Number: %d\n", stat_a[i].number);
- printf("Avg. Size: %d bytes + %d bits\n",
- stat_a[i].totsize / (8 * stat_a[i].number), (stat_a[i].totsize / stat_a[i].number) % 8);
- if (stat_a[i].i_mbnum > 0) {
- printf("\tI Macro Block Stats:\n");
- printf("\t%d I Macroblocks\n", stat_a[i].i_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[i].i_mbsize / (8 * stat_a[i].i_mbnum),
- (stat_a[i].i_mbsize / stat_a[i].i_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].i_mbcbp[j],
- stat_a[i].i_mbcbp[j + 1], stat_a[i].i_mbcbp[j + 2], stat_a[i].i_mbcbp[j + 3],
- stat_a[i].i_mbcbp[j + 4], stat_a[i].i_mbcbp[j + 5], stat_a[i].i_mbcbp[j + 6],
- stat_a[i].i_mbcbp[j + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].i_mbcoeff[j],
- stat_a[i].i_mbcoeff[j + 1], stat_a[i].i_mbcoeff[j + 2],
- stat_a[i].i_mbcoeff[j + 3], stat_a[i].i_mbcoeff[j + 4],
- stat_a[i].i_mbcoeff[j + 5], stat_a[i].i_mbcoeff[j + 6],
- stat_a[i].i_mbcoeff[j + 7]);
- }
- }
- if (stat_a[i].p_mbnum > 0) {
- printf("\tP Macro Block Stats:\n");
- printf("\t%d P Macroblocks\n", stat_a[i].p_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[i].p_mbsize / (8 * stat_a[i].p_mbnum),
- (stat_a[i].p_mbsize / stat_a[i].p_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].p_mbcbp[j],
- stat_a[i].p_mbcbp[j + 1], stat_a[i].p_mbcbp[j + 2], stat_a[i].p_mbcbp[j + 3],
- stat_a[i].p_mbcbp[j + 4], stat_a[i].p_mbcbp[j + 5], stat_a[i].p_mbcbp[j + 6],
- stat_a[i].p_mbcbp[j + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].p_mbcoeff[j],
- stat_a[i].p_mbcoeff[j + 1], stat_a[i].p_mbcoeff[j + 2],
- stat_a[i].p_mbcoeff[j + 3], stat_a[i].p_mbcoeff[j + 4],
- stat_a[i].p_mbcoeff[j + 5], stat_a[i].p_mbcoeff[j + 6],
- stat_a[i].p_mbcoeff[j + 7]);
- }
- }
- if (stat_a[i].b_mbnum > 0) {
- printf("\tB Macro Block Stats:\n");
- printf("\t%d B Macroblocks\n", stat_a[i].b_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[i].b_mbsize / (8 * stat_a[i].b_mbnum),
- (stat_a[i].b_mbsize * stat_a[i].b_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].b_mbcbp[j],
- stat_a[i].b_mbcbp[j + 1], stat_a[i].b_mbcbp[j + 2], stat_a[i].b_mbcbp[j + 3],
- stat_a[i].b_mbcbp[j + 4], stat_a[i].b_mbcbp[j + 5], stat_a[i].b_mbcbp[j + 6],
- stat_a[i].b_mbcbp[j + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].b_mbcoeff[j],
- stat_a[i].b_mbcoeff[j + 1], stat_a[i].b_mbcoeff[j + 2],
- stat_a[i].b_mbcoeff[j + 3], stat_a[i].b_mbcoeff[j + 4],
- stat_a[i].b_mbcoeff[j + 5], stat_a[i].b_mbcoeff[j + 6],
- stat_a[i].b_mbcoeff[j + 7]);
- }
- }
- if (stat_a[i].bi_mbnum > 0) {
- printf("\tBi Macro Block Stats:\n");
- printf("\t%d Bi Macroblocks\n", stat_a[i].bi_mbnum);
- printf("\tAvg. Size: %d bytes + %d bits\n",
- stat_a[i].bi_mbsize / (8 * stat_a[i].bi_mbnum),
- (stat_a[i].bi_mbsize * stat_a[i].bi_mbnum) % 8);
- printf("\t\tCoded Block Pattern Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].bi_mbcbp[j],
- stat_a[i].bi_mbcbp[j + 1], stat_a[i].bi_mbcbp[j + 2], stat_a[i].bi_mbcbp[j + 3],
- stat_a[i].bi_mbcbp[j + 4], stat_a[i].bi_mbcbp[j + 5], stat_a[i].bi_mbcbp[j + 6],
- stat_a[i].bi_mbcbp[j + 7]);
- }
- printf("\n\t\tNumber of Coefficients/Block Histogram:\n");
- for (j = 0; j < 64; j += 8) {
- printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].bi_mbcoeff[j],
- stat_a[i].bi_mbcoeff[j + 1], stat_a[i].bi_mbcoeff[j + 2],
- stat_a[i].bi_mbcoeff[j + 3], stat_a[i].bi_mbcoeff[j + 4],
- stat_a[i].bi_mbcoeff[j + 5], stat_a[i].bi_mbcoeff[j + 6],
- stat_a[i].bi_mbcoeff[j + 7]);
- }
- }
- printf("\nAvg. Time to Decode: %f secs.\n",
- (stat_a[i].tottime / ((double) stat_a[i].number)));
- printf("\n");
- printf("*************************\n\n");
- }
-
- supertot = stat_a[1].totsize + stat_a[2].totsize + stat_a[3].totsize;
- supernum = stat_a[1].number + stat_a[2].number + stat_a[3].number;
- supertime = stat_a[1].tottime + stat_a[2].tottime + stat_a[3].tottime;
-
- printf("Total Number of Frames: %d\n", supernum);
- printf("Avg Frame Size: %d bytes %d bits\n",
- supertot / (8 * supernum), (supertot / supernum) % 8);
- printf("Total Time Decoding: %g secs.\n", supertime);
- printf("Avg Decoding Time/Frame: %g secs.\n", supertime / ((double) supernum));
- printf("Avg Decoding Frames/Sec: %g secs.\n", ((double) supernum) / supertime);
- printf("\n");
-
- printf("Cache Hits/Miss\n");
- for (i = 0; i < 8; i++) {
- printf("%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\n",
- cacheHit[i][0], cacheMiss[i][0], cacheHit[i][1], cacheMiss[i][1],
- cacheHit[i][2], cacheMiss[i][2], cacheHit[i][3], cacheMiss[i][3]);
- printf("%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\n",
- cacheHit[i][4], cacheMiss[i][4], cacheHit[i][5], cacheMiss[i][5],
- cacheHit[i][6], cacheMiss[i][6], cacheHit[i][7], cacheMiss[i][7]);
- }
-
-}
-
-static void
-CollectStats()
-{
- int i, j;
-
- i = stat_a[0].frametype;
-
- stat_a[i].totsize += stat_a[0].totsize;
- stat_a[i].number += stat_a[0].number;
- stat_a[i].i_mbsize += stat_a[0].i_mbsize;
- stat_a[i].p_mbsize += stat_a[0].p_mbsize;
- stat_a[i].b_mbsize += stat_a[0].b_mbsize;
- stat_a[i].bi_mbsize += stat_a[0].bi_mbsize;
- stat_a[i].i_mbnum += stat_a[0].i_mbnum;
- stat_a[i].p_mbnum += stat_a[0].p_mbnum;
- stat_a[i].b_mbnum += stat_a[0].b_mbnum;
- stat_a[i].bi_mbnum += stat_a[0].bi_mbnum;
-
- for (j = 0; j < 64; j++) {
-
- stat_a[i].i_mbcbp[j] += stat_a[0].i_mbcbp[j];
- stat_a[i].p_mbcbp[j] += stat_a[0].p_mbcbp[j];
- stat_a[i].b_mbcbp[j] += stat_a[0].b_mbcbp[j];
- stat_a[i].bi_mbcbp[j] += stat_a[0].bi_mbcbp[j];
- stat_a[i].i_mbcoeff[j] += stat_a[0].i_mbcoeff[j];
- stat_a[i].p_mbcoeff[j] += stat_a[0].p_mbcoeff[j];
- stat_a[i].b_mbcoeff[j] += stat_a[0].b_mbcoeff[j];
- stat_a[i].bi_mbcoeff[j] += stat_a[0].bi_mbcoeff[j];
- }
-
- stat_a[i].tottime += stat_a[0].tottime;
-
- init_stat_struct(&(stat_a[0]));
-}
-
-static unsigned int
-bitCountRead()
-{
- return bitCount;
-}
-
-static void
-StartTime()
-{
- stat_a[0].tottime = ReadSysClock();
-}
-
-static void
-EndTime()
-{
- stat_a[0].tottime = ReadSysClock() - stat_a[0].tottime;
-}
-#endif
-
-double realTimeStart;
-int totNumFrames = 0;
-
-double
-ReadSysClock()
-{
- struct timeval tv;
- (void) gettimeofday(&tv, (struct timezone *)NULL);
- return (tv.tv_sec + tv.tv_usec / 1000000.0);
-}
-
-void
-PrintTimeInfo()
-{
- double spent;
-
- spent = ReadSysClock() - realTimeStart;
-
- if (!quietFlag) {
- printf("\nReal Time Spent (After Initializations): %f secs.\n", spent);
- printf("Avg. Frames/Sec: %f\n", ((double) totNumFrames) / spent);
-/*
- print_delta();
-*/
- }
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * NewVidStream --
- *
- * Allocates and initializes a VidStream structure. Takes
- * as parameter requested size for buffer length.
- *
- * Results:
- * A pointer to the new VidStream structure.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-VidStream * NewVidStream(void)
-{
- int i, j;
- VidStream *new_stream;
- static unsigned char default_intra_matrix[64] = {
- 8, 16, 19, 22, 26, 27, 29, 34,
- 16, 16, 22, 24, 27, 29, 34, 37,
- 19, 22, 26, 27, 29, 34, 34, 38,
- 22, 22, 26, 27, 29, 34, 37, 40,
- 22, 26, 27, 29, 32, 35, 40, 48,
- 26, 27, 29, 32, 35, 40, 48, 58,
- 26, 27, 29, 34, 38, 46, 56, 69,
- 27, 29, 35, 38, 46, 56, 69, 83};
-
- /* Allocate memory for new structure. */
-
- new_stream = (VidStream *) malloc(sizeof(VidStream));
-
- /* Initialize pointers to extension and user data. */
-
- new_stream->group.ext_data = new_stream->group.user_data =
- new_stream->picture.extra_info = new_stream->picture.user_data =
- new_stream->picture.ext_data = new_stream->slice.extra_info =
- new_stream->ext_data = new_stream->user_data = NULL;
-
- /* Copy default intra matrix. */
-
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- new_stream->intra_quant_matrix[j][i] = default_intra_matrix[i * 8 + j];
- }
- }
-
- /* Initialize crop table. */
-
- for (i = (-MAX_NEG_CROP); i < NUM_CROP_ENTRIES - MAX_NEG_CROP; i++) {
- if (i <= 0) {
- cropTbl[i + MAX_NEG_CROP] = 0;
- } else if (i >= 255) {
- cropTbl[i + MAX_NEG_CROP] = 255;
- } else {
- cropTbl[i + MAX_NEG_CROP] = i;
- }
- }
-
- /* Initialize non intra quantization matrix. */
-
- for (i = 0; i < 8; i++) {
- for (j = 0; j < 8; j++) {
- new_stream->non_intra_quant_matrix[j][i] = 16;
- }
- }
-
- /* Initialize pointers to image spaces. */
-
- new_stream->current = new_stream->past = new_stream->future = NULL;
- for (i = 0; i < RING_BUF_SIZE; i++) {
- new_stream->ring[i] = NULL;
- }
-
-
- /* Initialize bitstream i/o fields. */
-
- new_stream->max_buf_length = 0;
- new_stream->bit_offset = 0;
- new_stream->buf_length = 0;
- new_stream->buffer = new_stream->buf_start = NULL;
-
-
- /* Return structure. */
-
- return new_stream;
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * DestroyVidStream --
- *
- * Deallocates a VidStream structure.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-DestroyVidStream(VidStream *astream)
-{
- int i;
-
- if (astream->ext_data != NULL)
- free(astream->ext_data);
-
- if (astream->user_data != NULL)
- free(astream->user_data);
-
- if (astream->group.ext_data != NULL)
- free(astream->group.ext_data);
-
- if (astream->group.user_data != NULL)
- free(astream->group.user_data);
-
- if (astream->picture.extra_info != NULL)
- free(astream->picture.extra_info);
-
- if (astream->picture.ext_data != NULL)
- free(astream->picture.ext_data);
-
- if (astream->picture.user_data != NULL)
- free(astream->picture.user_data);
-
- if (astream->slice.extra_info != NULL)
- free(astream->slice.extra_info);
-
- if (astream->buf_start != NULL)
- free(astream->buf_start);
-
- for (i = 0; i < RING_BUF_SIZE; i++) {
- if (astream->ring[i] != NULL) {
- DestroyPictImage(astream->ring[i]);
- astream->ring[i] = NULL;
- }
- }
-
- free((char *) astream);
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * NewPictImage --
- *
- * Allocates and initializes a PictImage structure.
- * The width and height of the image space are passed in
- * as parameters.
- *
- * Results:
- * A pointer to the new PictImage structure.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-PictImage *
-NewPictImage(unsigned int width, unsigned int height)
-{
- PictImage *new_pi;
-
- /* Allocate memory space for new structure. */
-
- new_pi = (PictImage *) malloc(sizeof(PictImage));
- new_pi->luminance = (unsigned char *) malloc(width * height);
- new_pi->Cr = (unsigned char *) malloc(width * height / 4);
- new_pi->Cb = (unsigned char *) malloc(width * height / 4);
-
- /* Reset locked flag. */
-
- new_pi->locked = 0;
-
- /* Return pointer to new structure. */
-
- return new_pi;
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * DestroyPictImage --
- *
- * Deallocates a PictImage structure.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-void
-DestroyPictImage(PictImage *apictimage)
-{
- if (apictimage->luminance != NULL) {
- free(apictimage->luminance);
- }
- if (apictimage->Cr != NULL) {
- free(apictimage->Cr);
- }
- if (apictimage->Cb != NULL) {
- free(apictimage->Cb);
- }
- free(apictimage);
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * mpegVidRsrc --
- *
- * Parses bit stream until a picture is decoded
- *
- * Results:
- * 0 - successfully decoded a frame, -1 - failed
- *
- * Side effects:
- * Bit stream is irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-int mpegVidRsrc(char *packet)
-{
- TimeStamp time_stamp = 0;
- VidStream *vid_stream = curVidStream;
- unsigned int data;
- int i, status;
- VideoPacket *p = (VideoPacket *) packet;
-
- /* initialize buffer info and allocate ring item for current frame */
- (curVidStream->buf_start) = (curVidStream->buffer) =
- (unsigned int *)(packet + sizeof(*p));
- curVidStream->max_buf_length = curVidStream->buf_length =
- (p->dataBytes + 11)>>2;
- curVidStream->bit_offset = 0;
-
- i = 0;
- while (curVidStream->ring[i]->locked != 0)
- if (++i >= RING_BUF_SIZE) {
- perror("VD fatal error. Ring buffer full.");
- exit(1);
- }
- curVidStream->current = curVidStream->ring[i];
- curVidStream->current->sh = p->sh;
- curVidStream->current->gop = p->gop;
- curVidStream->current->frame = p->frame;
- curVidStream->current->display = p->display;
- curVidStream->current->future = p->future;
- curVidStream->current->past = p->past;
-
- bitOffset = curVidStream->bit_offset;
-#ifdef UTIL2
- curBits = *curVidStream->buffer << bitOffset;
-#else
- curBits = *curVidStream->buffer;
-#endif
- bufLength = curVidStream->buf_length;
- bitBuffer = curVidStream->buffer;
-
- /*
- * If called for the INIT command, find start code, make sure it is a
- * sequence start code.
- */
-
- if (shared->cmd == CmdINIT) {
- next_start_code();
- show_bits32(data);
- if (data != SEQ_START_CODE) {
- fprintf(stderr, "VD error: This is not first packet of the an MPEG stream, data %u.", data);
- DestroyVidStream(curVidStream);
- exit(1);
- }
- }
- /* Get next 32 bits (size of start codes). */
-
- show_bits32(data);
-
- /* Process according to start code */
-
- switch (data)
- {
- case SEQ_END_CODE:
-
- /* Display last frame. */
- /*
- fprintf(stderr, "VD: SEQ_END_CODE decoded.\n");
- */
- if (vid_stream->future != NULL)
- {
- vid_stream->current = vid_stream->future;
- return 0;
- }
- else
- {
- fprintf(stderr, "VD error: no more picture for SEQ_END_CODE\n");
- return -1;
- }
-
- case SEQ_START_CODE:
-
- /* Sequence start code. Parse sequence header. */
-
- if (ParseSeqHead(vid_stream) != PARSE_OK)
- {
- fprintf(stderr, "VD error on decoding SequenceHeader.\n");
- return -1;
- }
-
- /*
- * modify vid_stream after sequence start code so that application above can use
- * info in header.
- */
-
- vid_stream->buffer = bitBuffer;
- vid_stream->buf_length = bufLength;
- vid_stream->bit_offset = bitOffset;
- vid_stream->shid = ((VideoPacket *)packet)->sh;
-
- case GOP_START_CODE:
-
- /* Group of Pictures start code. Parse gop header. */
-
- if (ParseGOP(vid_stream) != PARSE_OK)
- {
- fprintf(stderr, "VD error on decoding GOP\n");
- return -1;
- }
-
- vid_stream->gopid = ((VideoPacket *)packet)->gop;
-
- case PICTURE_START_CODE:
-
- /* Picture start code. Parse picture header and first slice header. */
-
- if (vid_stream->gopid != ((VideoPacket *)packet)->gop ||
- vid_stream->shid != ((VideoPacket *)packet)->sh)
- {
- shared->needHeader = 1;
- /*
- fprintf(stderr, "VD error: SeqHeader and/or GOP not available for the picture");
- */
- return -1;
- }
-
- if (ParsePicture(vid_stream, time_stamp) != PARSE_OK)
- {
- /*
- fprintf(stderr, "VD error on parsing Picture header\n");
- */
- return -1;
- }
- /* parse all the following slices */
- for (;;)
- {
- if (ParseSlice(vid_stream) != PARSE_OK)
- {
- fprintf(stderr, "VD error on decoding a Slice header.\n");
- return -1;
- }
- /* Parse all following macroblocks. */
- for (;;)
- {
- int res;
- /* Check to see if actually a startcode and not a macroblock. */
- if (!next_bits(23, 0x00000000))
- {
- /* Not start code. Parse Macroblock. */
- if ((res = ParseMacroBlock(vid_stream)) != PARSE_OK)
- {
- fprintf(stderr, "VD error on parsing a MacroBlock, res = %d\n", res);
- return -1;
- }
- }
- else
- {
- /* Not macroblock, actually start code. Get start code. */
- next_start_code();
- show_bits32(data);
-
- /* If start code is outside range of slice start codes, frame is
- complete, display frame, otherwise another slice */
- if ((data < SLICE_MIN_START_CODE) || (data > SLICE_MAX_START_CODE))
- return 0;
- else
- break;
- }
- }
- }
- break;
- default:
- fprintf(stderr, "VD error: fail to clasify the packet.\n");
- return -1;
- }
- fprintf(stderr, "VD get wired.\n");
- return -1;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * ParseSeqHead --
- *
- * Assumes bit stream is at the begining of the sequence
- * header start code. Parses off the sequence header.
- *
- * Results:
- * Fills the vid_stream structure with values derived and
- * decoded from the sequence header. Allocates the pict image
- * structures based on the dimensions of the image space
- * found in the sequence header.
- *
- * Side effects:
- * Bit stream irreversibly parsed off.
- *
- *--------------------------------------------------------------
- */
-
-static int
-ParseSeqHead(VidStream *vid_stream)
-{
-
- unsigned int data;
- int i;
-
- /* Flush off sequence start code. */
-
- flush_bits32;
-
- /* Get horizontal size of image space. */
-
- get_bits12(data);
- vid_stream->h_size = data;
-
- /* Get vertical size of image space. */
-
- get_bits12(data);
- vid_stream->v_size = data;
-
- /* Calculate macroblock width and height of image space. */
-
- vid_stream->mb_width = (vid_stream->h_size + 15) / 16;
- vid_stream->mb_height = (vid_stream->v_size + 15) / 16;
-
- /* If dither type is MBORDERED allocate ditherFlags. */
-
- if (ditherType == MBORDERED_DITHER) {
- ditherFlags = (char *) malloc(vid_stream->mb_width*vid_stream->mb_height);
- }
-
- /* Initialize lmaxx, lmaxy, cmaxx, cmaxy. */
-
- lmaxx = vid_stream->mb_width*16-1;
- lmaxy = vid_stream->mb_height*16-1;
- cmaxx = vid_stream->mb_width*8-1;
- cmaxy = vid_stream->mb_height*8-1;
-
- /* Parse of aspect ratio code. */
-
- get_bits4(data);
- vid_stream->aspect_ratio = (unsigned char) data;
-
- /* Parse off picture rate code. */
-
- get_bits4(data);
- vid_stream->picture_rate = (unsigned char) data;
-
- /* Parse off bit rate. */
-
- get_bits18(data);
- vid_stream->bit_rate = data;
-
- /* Flush marker bit. */
-
- flush_bits(1);
-
- /* Parse off vbv buffer size. */
-
- get_bits10(data);
- vid_stream->vbv_buffer_size = data;
-
- /* Parse off contrained parameter flag. */
-
- get_bits1(data);
- if (data) {
- vid_stream->const_param_flag = TRUE;
- } else
- vid_stream->const_param_flag = FALSE;
-
- /*
- * If intra_quant_matrix_flag set, parse off intra quant matrix values.
- */
-
- get_bits1(data);
- if (data) {
- for (i = 0; i < 64; i++) {
- get_bits8(data);
-
- vid_stream->intra_quant_matrix[zigzag[i][1]][zigzag[i][0]] =
- (unsigned char) data;
- }
- }
- /*
- * If non intra quant matrix flag set, parse off non intra quant matrix
- * values.
- */
-
- get_bits1(data);
- if (data) {
- for (i = 0; i < 64; i++) {
- get_bits8(data);
-
- vid_stream->non_intra_quant_matrix[zigzag[i][1]][zigzag[i][0]] =
- (unsigned char) data;
- }
- }
- /* Go to next start code. */
-
- next_start_code();
-
- /*
- * If next start code is extension start code, parse off extension data.
- */
-
- if (next_bits(32, EXT_START_CODE)) {
- flush_bits32;
- if (vid_stream->ext_data != NULL) {
- free(vid_stream->ext_data);
- vid_stream->ext_data = NULL;
- }
- vid_stream->ext_data = get_ext_data();
- }
- /* If next start code is user start code, parse off user data. */
-
- if (next_bits(32, USER_START_CODE)) {
- flush_bits32;
- if (vid_stream->user_data != NULL) {
- free(vid_stream->user_data);
- vid_stream->user_data = NULL;
- }
- vid_stream->user_data = get_ext_data();
- }
- return PARSE_OK;
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ParseGOP --
- *
- * Parses of group of pictures header from bit stream
- * associated with vid_stream.
- *
- * Results:
- * Values in gop header placed into video stream structure.
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-static int
-ParseGOP(VidStream *vid_stream)
-{
- unsigned int data;
-
- /* Flush group of pictures start code. WWWWWWOOOOOOOSSSSSSHHHHH!!! */
-
- flush_bits32;
-
- /* Parse off drop frame flag. */
-
- get_bits1(data);
- if (data) {
- vid_stream->group.drop_flag = TRUE;
- } else
- vid_stream->group.drop_flag = FALSE;
-
- /* Parse off hour component of time code. */
-
- get_bits5(data);
- vid_stream->group.tc_hours = data;
-
- /* Parse off minute component of time code. */
-
- get_bits6(data);
- vid_stream->group.tc_minutes = data;
-
- /* Flush marker bit. */
-
- flush_bits(1);
-
- /* Parse off second component of time code. */
-
- get_bits6(data);
- vid_stream->group.tc_seconds = data;
-
- /* Parse off picture count component of time code. */
-
- get_bits6(data);
- vid_stream->group.tc_pictures = data;
- /*
- Fprintf(stderr, "GOP time_code:%d:%02d:%02d-%02d\n",
- vid_stream->group.tc_hours,
- vid_stream->group.tc_minutes,
- vid_stream->group.tc_seconds,
- vid_stream->group.tc_pictures);
- */
- /* Parse off closed gop and broken link flags. */
-
- get_bits2(data);
- if (data > 1) {
- vid_stream->group.closed_gop = TRUE;
- if (data > 2) {
- vid_stream->group.broken_link = TRUE;
- } else
- vid_stream->group.broken_link = FALSE;
- } else {
- vid_stream->group.closed_gop = FALSE;
- if (data) {
- vid_stream->group.broken_link = TRUE;
- } else
- vid_stream->group.broken_link = FALSE;
- }
-
- /* Goto next start code. */
-
- next_start_code();
-
- /* If next start code is extension data, parse off extension data. */
-
- if (next_bits(32, EXT_START_CODE)) {
- flush_bits32;
- if (vid_stream->group.ext_data != NULL) {
- free(vid_stream->group.ext_data);
- vid_stream->group.ext_data = NULL;
- }
- vid_stream->group.ext_data = get_ext_data();
- }
- /* If next start code is user data, parse off user data. */
-
- if (next_bits(32, USER_START_CODE)) {
- flush_bits32;
- if (vid_stream->group.user_data != NULL) {
- free(vid_stream->group.user_data);
- vid_stream->group.user_data = NULL;
- }
- vid_stream->group.user_data = get_ext_data();
- }
- return PARSE_OK;
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ParsePicture --
- *
- * Parses picture header. Marks picture to be presented
- * at particular time given a time stamp.
- *
- * Results:
- * Values from picture header put into video stream structure.
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-static int
-ParsePicture(VidStream *vid_stream,TimeStamp time_stamp)
-{
- unsigned int data;
- int i;
-
- /* Flush header start code. */
- flush_bits32;
-
- /* Parse off temporal reference. */
- get_bits10(data);
- vid_stream->picture.temp_ref = data;
- /*
- Fprintf(stderr, "Pic temp_ref %d\n", vid_stream->picture.temp_ref);
- */
- /* Parse of picture type. */
- get_bits3(data);
- vid_stream->picture.code_type = data;
-
- if ((vid_stream->picture.code_type == B_TYPE) &&
- (No_B_Flag ||
- (vid_stream->past == NULL) ||
- (vid_stream->future == NULL)))
- return SKIP_PICTURE;
-
- if ((vid_stream->picture.code_type == P_TYPE) &&
- (No_P_Flag || (vid_stream->future == NULL)))
- return SKIP_PICTURE;
-
- /* Parse off vbv buffer delay value. */
- get_bits16(data);
- vid_stream->picture.vbv_delay = data;
-
- /* If P or B type frame... */
-
- if ((vid_stream->picture.code_type == 2) || (vid_stream->picture.code_type == 3)) {
-
- /* Parse off forward vector full pixel flag. */
- get_bits1(data);
- if (data)
- vid_stream->picture.full_pel_forw_vector = TRUE;
- else
- vid_stream->picture.full_pel_forw_vector = FALSE;
-
- /* Parse of forw_r_code. */
- get_bits3(data);
-
- /* Decode forw_r_code into forw_r_size and forw_f. */
-
- vid_stream->picture.forw_r_size = data - 1;
- vid_stream->picture.forw_f = (1 << vid_stream->picture.forw_r_size);
- }
- /* If B type frame... */
-
- if (vid_stream->picture.code_type == 3) {
-
- /* Parse off back vector full pixel flag. */
- get_bits1(data);
- if (data)
- vid_stream->picture.full_pel_back_vector = TRUE;
- else
- vid_stream->picture.full_pel_back_vector = FALSE;
-
- /* Parse off back_r_code. */
- get_bits3(data);
-
- /* Decode back_r_code into back_r_size and back_f. */
-
- vid_stream->picture.back_r_size = data - 1;
- vid_stream->picture.back_f = (1 << vid_stream->picture.back_r_size);
- }
- /* Get extra bit picture info. */
-
- if (vid_stream->picture.extra_info != NULL) {
- free(vid_stream->picture.extra_info);
- vid_stream->picture.extra_info = NULL;
- }
- vid_stream->picture.extra_info = get_extra_bit_info();
-
- /* Goto next start code. */
- next_start_code();
-
- /* If start code is extension start code, parse off extension data. */
-
- if (next_bits(32, EXT_START_CODE)) {
- flush_bits32;
-
- if (vid_stream->picture.ext_data != NULL) {
- free(vid_stream->picture.ext_data);
- vid_stream->picture.ext_data = NULL;
- }
- vid_stream->picture.ext_data = get_ext_data();
- }
- /* If start code is user start code, parse off user data. */
-
- if (next_bits(32, USER_START_CODE)) {
- flush_bits32;
-
- if (vid_stream->picture.user_data != NULL) {
- free(vid_stream->picture.user_data);
- vid_stream->picture.user_data = NULL;
- }
- vid_stream->picture.user_data = get_ext_data();
- }
-
- /* Reset past macroblock address field. */
-
- vid_stream->mblock.past_mb_addr = -1;
-
- return PARSE_OK;
-}
-
-/*
- *--------------------------------------------------------------
- *
- * ParseSlice --
- *
- * Parses off slice header.
- *
- * Results:
- * Values found in slice header put into video stream structure.
- *
- * Side effects:
- * Bit stream irreversibly parsed.
- *
- *--------------------------------------------------------------
- */
-
-static int
-ParseSlice(VidStream *vid_stream)
-{
- unsigned int data;
-
- /* Flush slice start code. */
-
- flush_bits(24);
-
- /* Parse off slice vertical position. */
-
- get_bits8(data);
- vid_stream->slice.vert_pos = data;
-
- /* Parse off quantization scale. */
-
- get_bits5(data);
- vid_stream->slice.quant_scale = data;
-
- /* Parse off extra bit slice info. */
-
- if (vid_stream->slice.extra_info != NULL) {
- free(vid_stream->slice.extra_info);
- vid_stream->slice.extra_info = NULL;
- }
- vid_stream->slice.extra_info = get_extra_bit_info();
-
- /* Reset past intrablock address. */
-
- vid_stream->mblock.past_intra_addr = -2;
-
- /* Reset previous recon motion vectors. */
-
- vid_stream->mblock.recon_right_for_prev = 0;
- vid_stream->mblock.recon_down_for_prev = 0;
- vid_stream->mblock.recon_right_back_prev = 0;
- vid_stream->mblock.recon_down_back_prev = 0;
-
- /* Reset macroblock address. */
-
- vid_stream->mblock.mb_address = ((vid_stream->slice.vert_pos - 1) *
- vid_stream->mb_width) - 1;
-
- /* Reset past dct dc y, cr, and cb values. */
-
- vid_stream->block.dct_dc_y_past = 1024;
- vid_stream->block.dct_dc_cr_past = 1024;
- vid_stream->block.dct_dc_cb_past = 1024;
-
- return PARSE_OK;
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ParseMacroBlock --
- *
- * Parseoff macroblock. Reconstructs DCT values. Applies
- * inverse DCT, reconstructs motion vectors, calculates and
- * set pixel values for macroblock in current pict image
- * structure.
- *
- * Results:
- * Here's where everything really happens. Welcome to the
- * heart of darkness.
- *
- * Side effects:
- * Bit stream irreversibly parsed off.
- *
- *--------------------------------------------------------------
- */
-
-static int
-ParseMacroBlock(VidStream *vid_stream)
-{
- int addr_incr;
- unsigned int data;
- int mask, i, recon_right_for, recon_down_for, recon_right_back,
- recon_down_back;
- int zero_block_flag;
- BOOLEAN mb_quant, mb_motion_forw, mb_motion_back, mb_pattern;
- int no_dith_flag = 0;
-
-#ifdef ANALYSIS
- mbSizeCount = bitCountRead();
-#endif
-
- /*
- * Parse off macroblock address increment and add to macroblock address.
- */
- do {
- DecodeMBAddrInc(addr_incr);
- if (addr_incr == MB_ESCAPE) {
- vid_stream->mblock.mb_address += 33;
- addr_incr = MB_STUFFING;
- }
- } while (addr_incr == MB_STUFFING);
- vid_stream->mblock.mb_address += addr_incr;
-
- if (vid_stream->mblock.mb_address > ((vid_stream->mb_height) * (vid_stream->mb_width) - 1))
- {
- fprintf(stderr, "mblock.mb_address-%d, mb_height-%d, mb_width-%d, addr_incr-%d\n",
- vid_stream->mblock.mb_address, vid_stream->mb_height, vid_stream->mb_width, addr_incr);
- return SKIP_TO_START_CODE;
- }
-
- /*
- * If macroblocks have been skipped, process skipped macroblocks.
- */
-
- if (vid_stream->mblock.mb_address - vid_stream->mblock.past_mb_addr > 1) {
- if (vid_stream->picture.code_type == P_TYPE)
- ProcessSkippedPFrameMBlocks(vid_stream);
- else if (vid_stream->picture.code_type == B_TYPE)
- ProcessSkippedBFrameMBlocks(vid_stream);
- }
- /* Set past macroblock address to current macroblock address. */
- vid_stream->mblock.past_mb_addr = vid_stream->mblock.mb_address;
-
- /* Based on picture type decode macroblock type. */
- switch (vid_stream->picture.code_type) {
- case I_TYPE:
- DecodeMBTypeI(mb_quant, mb_motion_forw, mb_motion_back, mb_pattern,
- vid_stream->mblock.mb_intra);
- break;
-
- case P_TYPE:
- DecodeMBTypeP(mb_quant, mb_motion_forw, mb_motion_back, mb_pattern,
- vid_stream->mblock.mb_intra);
- break;
-
- case B_TYPE:
- DecodeMBTypeB(mb_quant, mb_motion_forw, mb_motion_back, mb_pattern,
- vid_stream->mblock.mb_intra);
- break;
- }
-
- /* If quantization flag set, parse off new quantization scale. */
-
- if (mb_quant == TRUE) {
- get_bits5(data);
- vid_stream->slice.quant_scale = data;
- }
- /* If forward motion vectors exist... */
- if (mb_motion_forw == TRUE) {
-
- /* Parse off and decode horizontal forward motion vector. */
- DecodeMotionVectors(vid_stream->mblock.motion_h_forw_code);
-
- /* If horiz. forward r data exists, parse off. */
-
- if ((vid_stream->picture.forw_f != 1) &&
- (vid_stream->mblock.motion_h_forw_code != 0)) {
- get_bitsn(vid_stream->picture.forw_r_size, data);
- vid_stream->mblock.motion_h_forw_r = data;
- }
- /* Parse off and decode vertical forward motion vector. */
- DecodeMotionVectors(vid_stream->mblock.motion_v_forw_code);
-
- /* If vert. forw. r data exists, parse off. */
-
- if ((vid_stream->picture.forw_f != 1) &&
- (vid_stream->mblock.motion_v_forw_code != 0)) {
- get_bitsn(vid_stream->picture.forw_r_size, data);
- vid_stream->mblock.motion_v_forw_r = data;
- }
- }
- /* If back motion vectors exist... */
- if (mb_motion_back == TRUE) {
-
- /* Parse off and decode horiz. back motion vector. */
- DecodeMotionVectors(vid_stream->mblock.motion_h_back_code);
-
- /* If horiz. back r data exists, parse off. */
-
- if ((vid_stream->picture.back_f != 1) &&
- (vid_stream->mblock.motion_h_back_code != 0)) {
- get_bitsn(vid_stream->picture.back_r_size, data);
- vid_stream->mblock.motion_h_back_r = data;
- }
- /* Parse off and decode vert. back motion vector. */
- DecodeMotionVectors(vid_stream->mblock.motion_v_back_code);
-
- /* If vert. back r data exists, parse off. */
-
- if ((vid_stream->picture.back_f != 1) &&
- (vid_stream->mblock.motion_v_back_code != 0)) {
- get_bitsn(vid_stream->picture.back_r_size, data);
- vid_stream->mblock.motion_v_back_r = data;
- }
- }
-#ifdef ANALYSIS
- if (vid_stream->mblock.mb_intra) {
- stat_a[0].i_mbnum++;
- mbCBPPtr = stat_a[0].i_mbcbp;
- mbCoeffPtr = stat_a[0].i_mbcoeff;
- mbSizePtr = &(stat_a[0].i_mbsize);
- } else if (mb_motion_back && mb_motion_forw) {
- stat_a[0].bi_mbnum++;
- mbCBPPtr = stat_a[0].bi_mbcbp;
- mbCoeffPtr = stat_a[0].bi_mbcoeff;
- mbSizePtr = &(stat_a[0].bi_mbsize);
- } else if (mb_motion_back) {
- stat_a[0].b_mbnum++;
- mbCBPPtr = stat_a[0].b_mbcbp;
- mbCoeffPtr = stat_a[0].b_mbcoeff;
- mbSizePtr = &(stat_a[0].b_mbsize);
- } else {
- stat_a[0].p_mbnum++;
- mbCBPPtr = stat_a[0].p_mbcbp;
- mbCoeffPtr = stat_a[0].p_mbcoeff;
- mbSizePtr = &(stat_a[0].p_mbsize);
- }
-#endif
-
- /* If mblock pattern flag set, parse and decode CBP (code block pattern). */
- if (mb_pattern == TRUE) {
- DecodeCBP(vid_stream->mblock.cbp);
- }
- /* Otherwise, set CBP to zero. */
- else
- vid_stream->mblock.cbp = 0;
-
-
-#ifdef ANALYSIS
- mbCBPPtr[vid_stream->mblock.cbp]++;
-#endif
-
- /* Reconstruct motion vectors depending on picture type. */
- if (vid_stream->picture.code_type == P_TYPE) {
-
- /*
- * If no forw motion vectors, reset previous and current vectors to 0.
- */
-
- if (!mb_motion_forw) {
- recon_right_for = 0;
- recon_down_for = 0;
- vid_stream->mblock.recon_right_for_prev = 0;
- vid_stream->mblock.recon_down_for_prev = 0;
- }
- /*
- * Otherwise, compute new forw motion vectors. Reset previous vectors to
- * current vectors.
- */
-
- else {
- ComputeForwVector(&recon_right_for, &recon_down_for);
- }
- }
- if (vid_stream->picture.code_type == B_TYPE) {
-
- /* Reset prev. and current vectors to zero if mblock is intracoded. */
-
- if (vid_stream->mblock.mb_intra) {
- vid_stream->mblock.recon_right_for_prev = 0;
- vid_stream->mblock.recon_down_for_prev = 0;
- vid_stream->mblock.recon_right_back_prev = 0;
- vid_stream->mblock.recon_down_back_prev = 0;
- } else {
-
- /* If no forw vectors, current vectors equal prev. vectors. */
-
- if (!mb_motion_forw) {
- recon_right_for = vid_stream->mblock.recon_right_for_prev;
- recon_down_for = vid_stream->mblock.recon_down_for_prev;
- }
- /*
- * Otherwise compute forw. vectors. Reset prev vectors to new values.
- */
-
- else {
- ComputeForwVector(&recon_right_for, &recon_down_for);
- }
-
- /* If no back vectors, set back vectors to prev back vectors. */
-
- if (!mb_motion_back) {
- recon_right_back = vid_stream->mblock.recon_right_back_prev;
- recon_down_back = vid_stream->mblock.recon_down_back_prev;
- }
- /* Otherwise compute new vectors and reset prev. back vectors. */
-
- else {
- ComputeBackVector(&recon_right_back, &recon_down_back);
- }
-
- /*
- * Store vector existance flags in structure for possible skipped
- * macroblocks to follow.
- */
-
- vid_stream->mblock.bpict_past_forw = mb_motion_forw;
- vid_stream->mblock.bpict_past_back = mb_motion_back;
- }
- }
-
- /* For each possible block in macroblock. */
- if (ditherType == GRAY_DITHER ||
- ditherType == MONO_DITHER ||
- ditherType == MONO_THRESHOLD) {
- for (mask = 32, i = 0; i < 4; mask >>= 1, i++) {
-
- /* If block exists... */
- if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & mask)) {
- zero_block_flag = 0;
- ParseReconBlock(i);
- } else {
- zero_block_flag = 1;
- }
-
- /* If macroblock is intra coded... */
- if (vid_stream->mblock.mb_intra) {
- ReconIMBlock(vid_stream, i);
- } else if (mb_motion_forw && mb_motion_back) {
- ReconBiMBlock(vid_stream, i, recon_right_for, recon_down_for,
- recon_right_back, recon_down_back, zero_block_flag);
- } else if (mb_motion_forw || (vid_stream->picture.code_type == P_TYPE)) {
- ReconPMBlock(vid_stream, i, recon_right_for, recon_down_for,
- zero_block_flag);
- } else if (mb_motion_back) {
- ReconBMBlock(vid_stream, i, recon_right_back, recon_down_back,
- zero_block_flag);
- }
- }
- /* Kill the Chrominace blocks... */
- if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & 0x2)) {
- ParseAwayBlock(4);
- }
- if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & 0x1)) {
- ParseAwayBlock(5);
- }
- } else {
- if ((ditherType == MBORDERED_DITHER) &&
- (vid_stream->mblock.cbp == 0) &&
- (vid_stream->picture.code_type == 3) &&
- (!vid_stream->mblock.mb_intra) &&
- (!(mb_motion_forw && mb_motion_back))) {
- /*
- MBOrderedDitherDisplayCopy(vid_stream, vid_stream->mblock.mb_address,
- mb_motion_forw, recon_right_for, recon_down_for,
- mb_motion_back, recon_right_back, recon_down_back,
- vid_stream->past->display, vid_stream->future->display);
- ditherFlags[vid_stream->mblock.mb_address] = 0;
- no_dith_flag = 1;
- */
- }
- else {
- for (mask = 32, i = 0; i < 6; mask >>= 1, i++) {
-
- /* If block exists... */
- if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & mask)) {
- zero_block_flag = 0;
- ParseReconBlock(i);
- } else {
- zero_block_flag = 1;
- }
-
- /* If macroblock is intra coded... */
- if (vid_stream->mblock.mb_intra) {
- ReconIMBlock(vid_stream, i);
- } else if (mb_motion_forw && mb_motion_back) {
- ReconBiMBlock(vid_stream, i, recon_right_for, recon_down_for,
- recon_right_back, recon_down_back, zero_block_flag);
- } else if (mb_motion_forw || (vid_stream->picture.code_type == P_TYPE)) {
- ReconPMBlock(vid_stream, i, recon_right_for, recon_down_for,
- zero_block_flag);
- } else if (mb_motion_back) {
- ReconBMBlock(vid_stream, i, recon_right_back, recon_down_back,
- zero_block_flag);
- }
- }
- }
- }
-
- if ((ditherType == MBORDERED_DITHER) && (!no_dith_flag)) {
- if ((vid_stream->picture.code_type == 2) &&
- (vid_stream->mblock.cbp == 0) &&
- (!vid_stream->mblock.mb_intra)) {
- /*
- MBOrderedDitherDisplayCopy(vid_stream, vid_stream->mblock.mb_address,
- 1, recon_right_for, recon_down_for,
- 0, 0, 0,
- vid_stream->future->display,
- (unsigned char *) NULL);
- ditherFlags[vid_stream->mblock.mb_address] = 0;
- */
- }
- else {
- ditherFlags[vid_stream->mblock.mb_address] = 1;
- }
- }
-
-
- /* If D Type picture, flush marker bit. */
- if (vid_stream->picture.code_type == 4)
- flush_bits(1);
-
- /* If macroblock was intracoded, set macroblock past intra address. */
- if (vid_stream->mblock.mb_intra)
- vid_stream->mblock.past_intra_addr =
- vid_stream->mblock.mb_address;
-
-#ifdef ANALYSIS
- *mbSizePtr += bitCountRead() - mbSizeCount;
-#endif
- return PARSE_OK;
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ReconIMBlock --
- *
- * Reconstructs intra coded macroblock.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ReconIMBlock(VidStream *vid_stream, int bnum)
-{
- int mb_row, mb_col, row, col, row_size, rr;
- unsigned char *dest;
-
- /* Calculate macroblock row and column from address. */
-
- mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width;
- mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width;
-
-
- /* If block is luminance block... */
-
- if (bnum < 4) {
-
- /* Calculate row and col values for upper left pixel of block. */
-
- row = mb_row * 16;
- col = mb_col * 16;
- if (bnum > 1)
- row += 8;
- if (bnum % 2)
- col += 8;
-
- /* Set dest to luminance plane of current pict image. */
-
- dest = vid_stream->current->luminance;
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width * 16;
- }
- /* Otherwise if block is Cr block... */
-
- else if (bnum == 4) {
-
- /* Set dest to Cr plane of current pict image. */
-
- dest = vid_stream->current->Cr;
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width * 8;
-
- /* Calculate row,col for upper left pixel of block. */
-
- row = mb_row * 8;
- col = mb_col * 8;
- }
- /* Otherwise block is Cb block, and ... */
-
- else {
-
- /* Set dest to Cb plane of current pict image. */
-
- dest = vid_stream->current->Cb;
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width * 8;
-
- /* Calculate row,col for upper left pixel value of block. */
-
- row = mb_row * 8;
- col = mb_col * 8;
- }
-
- /*
- * For each pixel in block, set to cropped reconstructed value from inverse
- * dct.
- */
- {
- short *sp = &vid_stream->block.dct_recon[0][0];
- unsigned char *cm = cropTbl + MAX_NEG_CROP;
- dest += row * row_size + col;
- for (rr = 0; rr < 4; rr++, sp += 16, dest += row_size) {
- dest[0] = cm[sp[0]];
- assertCrop(sp[0]);
- dest[1] = cm[sp[1]];
- assertCrop(sp[1]);
- dest[2] = cm[sp[2]];
- assertCrop(sp[2]);
- dest[3] = cm[sp[3]];
- assertCrop(sp[3]);
- dest[4] = cm[sp[4]];
- assertCrop(sp[4]);
- dest[5] = cm[sp[5]];
- assertCrop(sp[5]);
- dest[6] = cm[sp[6]];
- assertCrop(sp[6]);
- dest[7] = cm[sp[7]];
- assertCrop(sp[7]);
-
- dest += row_size;
- dest[0] = cm[sp[8]];
- assertCrop(sp[8]);
- dest[1] = cm[sp[9]];
- assertCrop(sp[9]);
- dest[2] = cm[sp[10]];
- assertCrop(sp[10]);
- dest[3] = cm[sp[11]];
- assertCrop(sp[11]);
- dest[4] = cm[sp[12]];
- assertCrop(sp[12]);
- dest[5] = cm[sp[13]];
- assertCrop(sp[13]);
- dest[6] = cm[sp[14]];
- assertCrop(sp[14]);
- dest[7] = cm[sp[15]];
- assertCrop(sp[15]);
- }
- }
-}
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ReconPMBlock --
- *
- * Reconstructs forward predicted macroblocks.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ReconPMBlock(VidStream *vid_stream, int bnum,
- int recon_right_for, int recon_down_for, int zflag)
-{
- int mb_row, mb_col, row, col, row_size, rr;
- unsigned char *dest, *past;
- static int right_for, down_for, right_half_for, down_half_for;
- unsigned char *rindex1, *rindex2;
- unsigned char *index;
- short int *blockvals;
-
-#ifdef LOOSE_MPEG
- int maxx, maxy;
- int illegalBlock = 0;
- int row_start, row_end, rfirst, rlast, col_start, col_end, cfirst, clast;
-#endif
-
- /* Calculate macroblock row and column from address. */
-
- mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width;
- mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width;
-
- if (bnum < 4) {
-
- /* Calculate right_for, down_for motion vectors. */
-
- right_for = recon_right_for >> 1;
- down_for = recon_down_for >> 1;
- right_half_for = recon_right_for & 0x1;
- down_half_for = recon_down_for & 0x1;
-
- /* Set dest to luminance plane of current pict image. */
-
- dest = vid_stream->current->luminance;
-
- if (vid_stream->picture.code_type == B_TYPE) {
- if (vid_stream->past != NULL)
- past = vid_stream->past->luminance;
- } else {
-
- /* Set predicitive frame to current future frame. */
-
- if (vid_stream->future != NULL)
- past = vid_stream->future->luminance;
- }
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width << 4;
-
- /* Calculate row,col of upper left pixel in block. */
-
- row = mb_row << 4;
- col = mb_col << 4;
- if (bnum > 1)
- row += 8;
- if (bnum % 2)
- col += 8;
-
-#ifdef LOOSE_MPEG
- /* Check for block illegality. */
-
- maxx = lmaxx; maxy = lmaxy;
-
- if (row + down_for + 7 > maxy) illegalBlock |= 0x4;
- else if (row + down_for < 0) illegalBlock |= 0x1;
-
- if (col + right_for + 7 > maxx) illegalBlock |= 0x2;
- else if (col + right_for < 0) illegalBlock |= 0x8;
-
-#endif
- }
- /* Otherwise, block is NOT luminance block, ... */
-
- else {
-
- /* Construct motion vectors. */
-
- recon_right_for /= 2;
- recon_down_for /= 2;
- right_for = recon_right_for >> 1;
- down_for = recon_down_for >> 1;
- right_half_for = recon_right_for & 0x1;
- down_half_for = recon_down_for & 0x1;
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width << 3;
-
- /* Calculate row,col of upper left pixel in block. */
-
- row = mb_row << 3;
- col = mb_col << 3;
-
-#ifdef LOOSE_MPEG
- /* Check for block illegality. */
-
- maxx = cmaxx; maxy = cmaxy;
-
- if (row + down_for + 7 > maxy) illegalBlock |= 0x4;
- else if (row + down_for < 0) illegalBlock |= 0x1;
-
- if (col + right_for + 7 > maxx) illegalBlock |= 0x2;
- else if (col + right_for < 0) illegalBlock |= 0x8;
-
-#endif
-
- /* If block is Cr block... */
-
- if (bnum == 4) {
-
- /* Set dest to Cr plane of current pict image. */
-
- dest = vid_stream->current->Cr;
-
- if (vid_stream->picture.code_type == B_TYPE) {
-
- if (vid_stream->past != NULL)
- past = vid_stream->past->Cr;
- } else {
- if (vid_stream->future != NULL)
- past = vid_stream->future->Cr;
- }
- }
- /* Otherwise, block is Cb block... */
-
- else {
-
- /* Set dest to Cb plane of current pict image. */
-
- dest = vid_stream->current->Cb;
-
- if (vid_stream->picture.code_type == B_TYPE) {
- if (vid_stream->past != NULL)
- past = vid_stream->past->Cb;
- } else {
- if (vid_stream->future != NULL)
- past = vid_stream->future->Cb;
- }
- }
- }
-
- /* For each pixel in block... */
-
-#ifdef LOOSE_MPEG
-
- if (illegalBlock) {
- if (illegalBlock & 0x1) {
- row_start = 0;
- row_end = row+down_for+8;
- rfirst = rlast = 8 - row_end;
- }
- else if (illegalBlock & 0x4) {
- row_start = row + down_for;
- row_end = maxy+1;
- rlast = row_end - row_start - 1;
- rfirst = 0;
- }
- else {
- row_start = row+down_for;
- row_end = row_start+8;
- rfirst = 0;
- }
-
- if (illegalBlock & 0x8) {
- col_start = 0;
- col_end = col + right_for + 8;
- cfirst = clast = 8 - col_end;
- }
- else if (illegalBlock & 0x2) {
- col_start = col + right_for;
- col_end = maxx + 1;
- clast = col_end - col_start - 1;
- cfirst = 0;
- }
- else {
- col_start = col + right_for;
- col_end = col_start + 8;
- cfirst = 0;
- }
-
- for (rr = row_start; rr < row_end; rr++) {
- rindex1 = past + (rr * row_size) + col_start;
- index = dest + ((row + rfirst) * row_size) + col + cfirst;
- for (cc = col_start; cc < col_end; cc++) {
- *index++ = *rindex1++;
- }
- }
-
- if (illegalBlock & 0x1) {
- for (rr = rlast -1; rr >=0; rr--) {
- index = dest + ((row + rr) * row_size) + col;
- rindex1 = dest + ((row + rlast) * row_size) + col;
- for (cc = 0; cc < 8; cc ++) {
- *index++ = *rindex1++;
- }
- }
- }
- else if (illegalBlock & 0x4) {
- for (rr = rlast+1; rr < 8; rr++) {
- index = dest + ((row + rr) * row_size) + col;
- rindex1 = dest + ((row + rlast) * row_size) + col;
- for (cc = 0; cc < 8; cc ++) {
- *index++ = *rindex1++;
- }
- }
- }
-
- if (illegalBlock & 0x2) {
- for (cc = clast+1; cc < 8; cc++) {
- index = dest + (row * row_size) + (col + cc);
- rindex1 = dest + (row * row_size) + (col + clast);
- for (rr = 0; rr < 8; rr++) {
- *index = *rindex1;
- index += row_size;
- rindex1 += row_size;
- }
- }
- }
- else if (illegalBlock & 0x8) {
- for (cc = clast-1; cc >= 0; cc--) {
- index = dest + (row * row_size) + (col + cc);
- rindex1 = dest + (row * row_size) + (col + clast);
- for (rr = 0; rr < 8; rr++) {
- *index = *rindex1;
- index += row_size;
- rindex1 += row_size;
- }
- }
- }
-
- if (!zflag) {
- for (rr = 0; rr < 8; rr++) {
- index = dest + (row*row_size) + col;
- blockvals = &(vid_stream->block.dct_recon[rr][0]);
- index[0] += blockvals[0];
- index[1] += blockvals[1];
- index[2] += blockvals[2];
- index[3] += blockvals[3];
- index[4] += blockvals[4];
- index[5] += blockvals[5];
- index[6] += blockvals[6];
- index[7] += blockvals[7];
- }
- }
- }
- else {
-
-#endif
-
- index = dest + (row * row_size) + col;
- rindex1 = past + (row + down_for) * row_size + col + right_for;
-
- blockvals = &(vid_stream->block.dct_recon[0][0]);
-
- /*
- * Calculate predictive pixel value based on motion vectors and copy to
- * dest plane.
- */
-
- if ((!down_half_for) && (!right_half_for)) {
- unsigned char *cm = cropTbl + MAX_NEG_CROP;
- if (!zflag)
- for (rr = 0; rr < 4; rr++) {
- index[0] = cm[(int) rindex1[0] + (int) blockvals[0]];
- index[1] = cm[(int) rindex1[1] + (int) blockvals[1]];
- index[2] = cm[(int) rindex1[2] + (int) blockvals[2]];
- index[3] = cm[(int) rindex1[3] + (int) blockvals[3]];
- index[4] = cm[(int) rindex1[4] + (int) blockvals[4]];
- index[5] = cm[(int) rindex1[5] + (int) blockvals[5]];
- index[6] = cm[(int) rindex1[6] + (int) blockvals[6]];
- index[7] = cm[(int) rindex1[7] + (int) blockvals[7]];
- index += row_size;
- rindex1 += row_size;
-
- index[0] = cm[(int) rindex1[0] + (int) blockvals[8]];
- index[1] = cm[(int) rindex1[1] + (int) blockvals[9]];
- index[2] = cm[(int) rindex1[2] + (int) blockvals[10]];
- index[3] = cm[(int) rindex1[3] + (int) blockvals[11]];
- index[4] = cm[(int) rindex1[4] + (int) blockvals[12]];
- index[5] = cm[(int) rindex1[5] + (int) blockvals[13]];
- index[6] = cm[(int) rindex1[6] + (int) blockvals[14]];
- index[7] = cm[(int) rindex1[7] + (int) blockvals[15]];
- blockvals += 16;
- index += row_size;
- rindex1 += row_size;
- }
- else {
- if (right_for & 0x1) {
- /* No alignment, use bye copy */
- for (rr = 0; rr < 4; rr++) {
- index[0] = rindex1[0];
- index[1] = rindex1[1];
- index[2] = rindex1[2];
- index[3] = rindex1[3];
- index[4] = rindex1[4];
- index[5] = rindex1[5];
- index[6] = rindex1[6];
- index[7] = rindex1[7];
- index += row_size;
- rindex1 += row_size;
-
- index[0] = rindex1[0];
- index[1] = rindex1[1];
- index[2] = rindex1[2];
- index[3] = rindex1[3];
- index[4] = rindex1[4];
- index[5] = rindex1[5];
- index[6] = rindex1[6];
- index[7] = rindex1[7];
- index += row_size;
- rindex1 += row_size;
- }
- } else if (right_for & 0x2) {
- /* Half-word bit aligned, use 16 bit copy */
- short *src = (short *)rindex1;
- short *dest = (short *)index;
- row_size >>= 1;
- for (rr = 0; rr < 4; rr++) {
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_size;
- src += row_size;
-
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_size;
- src += row_size;
- }
- } else {
- /* Word aligned, use 32 bit copy */
- int *src = (int *)rindex1;
- int *dest = (int *)index;
- row_size >>= 2;
- for (rr = 0; rr < 4; rr++) {
- dest[0] = src[0];
- dest[1] = src[1];
- dest += row_size;
- src += row_size;
-
- dest[0] = src[0];
- dest[1] = src[1];
- dest += row_size;
- src += row_size;
- }
- }
- }
- } else {
- unsigned char *cm = cropTbl + MAX_NEG_CROP;
- rindex2 = rindex1 + right_half_for + (down_half_for * row_size);
- if (!zflag)
- for (rr = 0; rr < 4; rr++) {
- index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[0]];
- index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[1]];
- index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[2]];
- index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[3]];
- index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[4]];
- index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[5]];
- index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[6]];
- index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[7]];
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
-
- index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[8]];
- index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[9]];
- index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[10]];
- index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[11]];
- index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[12]];
- index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[13]];
- index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[14]];
- index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[15]];
- blockvals += 16;
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
- }
- else
- for (rr = 0; rr < 4; rr++) {
- index[0] = (int) (rindex1[0] + rindex2[0]) >> 1;
- index[1] = (int) (rindex1[1] + rindex2[1]) >> 1;
- index[2] = (int) (rindex1[2] + rindex2[2]) >> 1;
- index[3] = (int) (rindex1[3] + rindex2[3]) >> 1;
- index[4] = (int) (rindex1[4] + rindex2[4]) >> 1;
- index[5] = (int) (rindex1[5] + rindex2[5]) >> 1;
- index[6] = (int) (rindex1[6] + rindex2[6]) >> 1;
- index[7] = (int) (rindex1[7] + rindex2[7]) >> 1;
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
-
- index[0] = (int) (rindex1[0] + rindex2[0]) >> 1;
- index[1] = (int) (rindex1[1] + rindex2[1]) >> 1;
- index[2] = (int) (rindex1[2] + rindex2[2]) >> 1;
- index[3] = (int) (rindex1[3] + rindex2[3]) >> 1;
- index[4] = (int) (rindex1[4] + rindex2[4]) >> 1;
- index[5] = (int) (rindex1[5] + rindex2[5]) >> 1;
- index[6] = (int) (rindex1[6] + rindex2[6]) >> 1;
- index[7] = (int) (rindex1[7] + rindex2[7]) >> 1;
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
- }
- }
-
-#ifdef LOOSE_MPEG
- }
-#endif
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * ReconBMBlock --
- *
- * Reconstructs back predicted macroblocks.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ReconBMBlock(VidStream *vid_stream,
- int bnum, int recon_right_back, int recon_down_back, int zflag)
-{
- int mb_row, mb_col, row, col, row_size, rr;
- unsigned char *dest, *future;
- int right_back, down_back, right_half_back, down_half_back;
- unsigned char *rindex1, *rindex2;
- unsigned char *index;
- short int *blockvals;
-
-#ifdef LOOSE_MPEG
- int illegalBlock = 0;
- int maxx, maxy;
- int row_start, row_end, rlast, rfirst, col_start, col_end, clast, cfirst;
-#endif
-
- /* Calculate macroblock row and column from address. */
-
- mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width;
- mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width;
-
- /* If block is luminance block... */
-
- if (bnum < 4) {
-
- /* Calculate right_back, down_bakc motion vectors. */
-
- right_back = recon_right_back >> 1;
- down_back = recon_down_back >> 1;
- right_half_back = recon_right_back & 0x1;
- down_half_back = recon_down_back & 0x1;
-
- /* Set dest to luminance plane of current pict image. */
-
- dest = vid_stream->current->luminance;
-
- /*
- * If future frame exists, set future to luminance plane of future frame.
- */
-
- if (vid_stream->future != NULL)
- future = vid_stream->future->luminance;
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width << 4;
-
- /* Calculate row,col of upper left pixel in block. */
-
- row = mb_row << 4;
- col = mb_col << 4;
- if (bnum > 1)
- row += 8;
- if (bnum % 2)
- col += 8;
-
-#ifdef LOOSE_MPEG
-
- /* Check for block illegality. */
-
- maxx = lmaxx; maxy = lmaxy;
-
- if (row + down_back + 7 > maxy) illegalBlock |= 0x4;
- else if (row + down_back < 0) illegalBlock |= 0x1;
-
- if (col + right_back + 7 > maxx) illegalBlock |= 0x2;
- else if (col + right_back < 0) illegalBlock |= 0x8;
-
-#endif
-
- }
- /* Otherwise, block is NOT luminance block, ... */
-
- else {
-
- /* Construct motion vectors. */
-
- recon_right_back /= 2;
- recon_down_back /= 2;
- right_back = recon_right_back >> 1;
- down_back = recon_down_back >> 1;
- right_half_back = recon_right_back & 0x1;
- down_half_back = recon_down_back & 0x1;
-
- /* Establish row size. */
-
- row_size = vid_stream->mb_width << 3;
-
- /* Calculate row,col of upper left pixel in block. */
-
- row = mb_row << 3;
- col = mb_col << 3;
-
-#ifdef LOOSE_MPEG
-
- /* Check for block illegality. */
-
- maxx = cmaxx; maxy = cmaxy;
-
- if (row + down_back + 7 > maxy) illegalBlock |= 0x4;
- else if (row + down_back < 0) illegalBlock |= 0x1;
-
- if (col + right_back + 7 > maxx) illegalBlock |= 0x2;
- else if (col + right_back < 0) illegalBlock |= 0x8;
-
-#endif
-
- /* If block is Cr block... */
-
- if (bnum == 4) {
-
- /* Set dest to Cr plane of current pict image. */
-
- dest = vid_stream->current->Cr;
-
- /*
- * If future frame exists, set future to Cr plane of future image.
- */
-
- if (vid_stream->future != NULL)
- future = vid_stream->future->Cr;
- }
- /* Otherwise, block is Cb block... */
-
- else {
-
- /* Set dest to Cb plane of current pict image. */
-
- dest = vid_stream->current->Cb;
-
- /*
- * If future frame exists, set future to Cb plane of future frame.
- */
-
- if (vid_stream->future != NULL)
- future = vid_stream->future->Cb;
- }
- }
-
- /* For each pixel in block do... */
-
-#ifdef LOOSE_MPEG
-
- if (illegalBlock) {
- if (illegalBlock & 0x1) {
- row_start = 0;
- row_end = row+down_back+8;
- rfirst = rlast = 8 - row_end;
- }
- else if (illegalBlock & 0x4) {
- row_start = row + down_back;
- row_end = maxy+1;
- rlast = row_end - row_start - 1;
- rfirst = 0;
- }
- else {
- row_start = row+down_back;
- row_end = row_start+8;
- rfirst = 0;
- }
-
- if (illegalBlock & 0x8) {
- col_start = 0;
- col_end = col + right_back + 8;
- cfirst = clast = 8 - col_end;
- }
- else if (illegalBlock & 0x2) {
- col_start = col + right_back;
- col_end = maxx + 1;
- clast = col_end - col_start - 1;
- cfirst = 0;
- }
- else {
- col_start = col + right_back;
- col_end = col_start + 8;
- cfirst = 0;
- }
-
- for (rr = row_start; rr < row_end; rr++) {
- rindex1 = future + (rr * row_size) + col_start;
- index = dest + ((row + rfirst) * row_size) + col + cfirst;
- for (cc = col_start; cc < col_end; cc++) {
- *index++ = *rindex1++;
- }
- }
-
- if (illegalBlock & 0x1) {
- for (rr = rlast -1; rr >=0; rr--) {
- index = dest + ((row + rr) * row_size) + col;
- rindex1 = dest + ((row + rlast) * row_size) + col;
- for (cc = 0; cc < 8; cc ++) {
- *index++ = *rindex1++;
- }
- }
- }
- else if (illegalBlock & 0x4) {
- for (rr = rlast+1; rr < 8; rr++) {
- index = dest + ((row + rr) * row_size) + col;
- rindex1 = dest + ((row + rlast) * row_size) + col;
- for (cc = 0; cc < 8; cc ++) {
- *index++ = *rindex1++;
- }
- }
- }
-
- if (illegalBlock & 0x2) {
- for (cc = clast+1; cc < 8; cc++) {
- index = dest + (row * row_size) + (col + cc);
- rindex1 = dest + (row * row_size) + (col + clast);
- for (rr = 0; rr < 8; rr++) {
- *index = *rindex1;
- index += row_size;
- rindex1 += row_size;
- }
- }
- }
- else if (illegalBlock & 0x8) {
- for (cc = clast-1; cc >= 0; cc--) {
- index = dest + (row * row_size) + (col + cc);
- rindex1 = dest + (row * row_size) + (col + clast);
- for (rr = 0; rr < 8; rr++) {
- *index = *rindex1;
- index += row_size;
- rindex1 += row_size;
- }
- }
- }
-
- if (!zflag) {
- for (rr = 0; rr < 8; rr++) {
- index = dest + (row*row_size) + col;
- blockvals = &(vid_stream->block.dct_recon[rr][0]);
- index[0] += blockvals[0];
- index[1] += blockvals[1];
- index[2] += blockvals[2];
- index[3] += blockvals[3];
- index[4] += blockvals[4];
- index[5] += blockvals[5];
- index[6] += blockvals[6];
- index[7] += blockvals[7];
- }
- }
- }
- else {
-
-#endif
-
- index = dest + (row * row_size) + col;
- rindex1 = future + (row + down_back) * row_size + col + right_back;
-
- blockvals = &(vid_stream->block.dct_recon[0][0]);
-
- if ((!right_half_back) && (!down_half_back)) {
- unsigned char *cm = cropTbl + MAX_NEG_CROP;
- if (!zflag)
- for (rr = 0; rr < 4; rr++) {
- index[0] = cm[(int) rindex1[0] + (int) blockvals[0]];
- index[1] = cm[(int) rindex1[1] + (int) blockvals[1]];
- index[2] = cm[(int) rindex1[2] + (int) blockvals[2]];
- index[3] = cm[(int) rindex1[3] + (int) blockvals[3]];
- index[4] = cm[(int) rindex1[4] + (int) blockvals[4]];
- index[5] = cm[(int) rindex1[5] + (int) blockvals[5]];
- index[6] = cm[(int) rindex1[6] + (int) blockvals[6]];
- index[7] = cm[(int) rindex1[7] + (int) blockvals[7]];
- index += row_size;
- rindex1 += row_size;
-
- index[0] = cm[(int) rindex1[0] + (int) blockvals[8]];
- index[1] = cm[(int) rindex1[1] + (int) blockvals[9]];
- index[2] = cm[(int) rindex1[2] + (int) blockvals[10]];
- index[3] = cm[(int) rindex1[3] + (int) blockvals[11]];
- index[4] = cm[(int) rindex1[4] + (int) blockvals[12]];
- index[5] = cm[(int) rindex1[5] + (int) blockvals[13]];
- index[6] = cm[(int) rindex1[6] + (int) blockvals[14]];
- index[7] = cm[(int) rindex1[7] + (int) blockvals[15]];
- blockvals += 16;
- index += row_size;
- rindex1 += row_size;
- }
- else {
- if (right_back & 0x1) {
- /* No alignment, use bye copy */
- for (rr = 0; rr < 4; rr++) {
- index[0] = rindex1[0];
- index[1] = rindex1[1];
- index[2] = rindex1[2];
- index[3] = rindex1[3];
- index[4] = rindex1[4];
- index[5] = rindex1[5];
- index[6] = rindex1[6];
- index[7] = rindex1[7];
- index += row_size;
- rindex1 += row_size;
-
- index[0] = rindex1[0];
- index[1] = rindex1[1];
- index[2] = rindex1[2];
- index[3] = rindex1[3];
- index[4] = rindex1[4];
- index[5] = rindex1[5];
- index[6] = rindex1[6];
- index[7] = rindex1[7];
- index += row_size;
- rindex1 += row_size;
- }
- } else if (right_back & 0x2) {
- /* Half-word bit aligned, use 16 bit copy */
- short *src = (short *)rindex1;
- short *dest = (short *)index;
- row_size >>= 1;
- for (rr = 0; rr < 4; rr++) {
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_size;
- src += row_size;
-
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_size;
- src += row_size;
- }
- } else {
- /* Word aligned, use 32 bit copy */
- int *src = (int *)rindex1;
- int *dest = (int *)index;
- row_size >>= 2;
- for (rr = 0; rr < 4; rr++) {
- dest[0] = src[0];
- dest[1] = src[1];
- dest += row_size;
- src += row_size;
-
- dest[0] = src[0];
- dest[1] = src[1];
- dest += row_size;
- src += row_size;
- }
- }
- }
- } else {
- unsigned char *cm = cropTbl + MAX_NEG_CROP;
- rindex2 = rindex1 + right_half_back + (down_half_back * row_size);
- if (!zflag)
- for (rr = 0; rr < 4; rr++) {
- index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[0]];
- index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[1]];
- index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[2]];
- index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[3]];
- index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[4]];
- index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[5]];
- index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[6]];
- index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[7]];
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
-
- index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[8]];
- index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[9]];
- index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[10]];
- index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[11]];
- index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[12]];
- index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[13]];
- index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[14]];
- index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[15]];
- blockvals += 16;
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
- }
- else
- for (rr = 0; rr < 4; rr++) {
- index[0] = (int) (rindex1[0] + rindex2[0]) >> 1;
- index[1] = (int) (rindex1[1] + rindex2[1]) >> 1;
- index[2] = (int) (rindex1[2] + rindex2[2]) >> 1;
- index[3] = (int) (rindex1[3] + rindex2[3]) >> 1;
- index[4] = (int) (rindex1[4] + rindex2[4]) >> 1;
- index[5] = (int) (rindex1[5] + rindex2[5]) >> 1;
- index[6] = (int) (rindex1[6] + rindex2[6]) >> 1;
- index[7] = (int) (rindex1[7] + rindex2[7]) >> 1;
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
-
- index[0] = (int) (rindex1[0] + rindex2[0]) >> 1;
- index[1] = (int) (rindex1[1] + rindex2[1]) >> 1;
- index[2] = (int) (rindex1[2] + rindex2[2]) >> 1;
- index[3] = (int) (rindex1[3] + rindex2[3]) >> 1;
- index[4] = (int) (rindex1[4] + rindex2[4]) >> 1;
- index[5] = (int) (rindex1[5] + rindex2[5]) >> 1;
- index[6] = (int) (rindex1[6] + rindex2[6]) >> 1;
- index[7] = (int) (rindex1[7] + rindex2[7]) >> 1;
- index += row_size;
- rindex1 += row_size;
- rindex2 += row_size;
- }
- }
-
-#ifdef LOOSE_MPEG
- }
-#endif
-
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * ReconBiMBlock --
- *
- * Reconstructs bidirectionally predicted macroblocks.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ReconBiMBlock(VidStream *vid_stream, int bnum, int recon_right_for,
- int recon_down_for, int recon_right_back,
- int recon_down_back, int zflag)
-{
- int mb_row, mb_col, row, col, row_size, rr;
- unsigned char *dest, *past, *future;
- int right_for, down_for, right_half_for, down_half_for;
- int right_back, down_back, right_half_back, down_half_back;
- unsigned char *index, *rindex1, *bindex1;
- short int *blockvals;
- int forw_row_start, back_row_start, forw_col_start, back_col_start;
-
-#ifdef LOOSE_MPEG
- int illegal_forw = 0;
- int illegal_back = 0;
-#endif
-
- /* Calculate macroblock row and column from address. */
-
- mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width;
- mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width;
-
- /* If block is luminance block... */
-
- if (bnum < 4) {
-
- /*
- * Calculate right_for, down_for, right_half_for, down_half_for,
- * right_back, down_bakc, right_half_back, and down_half_back, motion
- * vectors.
- */
-
- right_for = recon_right_for >> 1;
- down_for = recon_down_for >> 1;
- right_half_for = recon_right_for & 0x1;
- down_half_for = recon_down_for & 0x1;
-
- right_back = recon_right_back >> 1;
- down_back = recon_down_back >> 1;
- right_half_back = recon_right_back & 0x1;
- down_half_back = recon_down_back & 0x1;
-
- /* Set dest to luminance plane of current pict image. */
-
- dest = vid_stream->current->luminance;
-
- /* If past frame exists, set past to luminance plane of past frame. */
-
- if (vid_stream->past != NULL)
- past = vid_stream->past->luminance;
-
- /*
- * If future frame exists, set future to luminance plane of future frame.
- */
-
- if (vid_stream->future != NULL)
- future = vid_stream->future->luminance;
-
- /* Establish row size. */
-
- row_size = (vid_stream->mb_width << 4);
-
- /* Calculate row,col of upper left pixel in block. */
-
- row = (mb_row << 4);
- col = (mb_col << 4);
- if (bnum > 1)
- row += 8;
- if (bnum & 0x01)
- col += 8;
-
- forw_col_start = col + right_for;
- forw_row_start = row + down_for;
-
- back_col_start = col + right_back;
- back_row_start = row + down_back;
-
-#ifdef LOOSE_MPEG
-
- /* Check for illegal pred. blocks. */
-
-
- if (forw_col_start+8 > lmaxx) illegal_forw = 1;
- else if (forw_col_start < 0) illegal_forw = 1;
-
- if (forw_row_start+8 > lmaxy) illegal_forw = 1;
- else if (forw_row_start < 0) illegal_forw = 1;
-
- if (back_col_start+8 > lmaxx) illegal_back = 1;
- else if (back_col_start < 0) illegal_back = 1;
-
- if (back_row_start+8 > lmaxy) illegal_back = 1;
- else if (back_row_start < 0) illegal_back = 1;
-
-#endif
-
- }
- /* Otherwise, block is NOT luminance block, ... */
-
- else {
-
- /* Construct motion vectors. */
-
- recon_right_for /= 2;
- recon_down_for /= 2;
- right_for = recon_right_for >> 1;
- down_for = recon_down_for >> 1;
- right_half_for = recon_right_for & 0x1;
- down_half_for = recon_down_for & 0x1;
-
- recon_right_back /= 2;
- recon_down_back /= 2;
- right_back = recon_right_back >> 1;
- down_back = recon_down_back >> 1;
- right_half_back = recon_right_back & 0x1;
- down_half_back = recon_down_back & 0x1;
-
- /* Establish row size. */
-
- row_size = (vid_stream->mb_width << 3);
-
- /* Calculate row,col of upper left pixel in block. */
-
- row = (mb_row << 3);
- col = (mb_col << 3);
-
- forw_col_start = col + right_for;
- forw_row_start = row + down_for;
-
- back_col_start = col + right_back;
- back_row_start = row + down_back;
-
-#ifdef LOOSE_MPEG
-
- /* Check for illegal pred. blocks. */
-
- if (forw_col_start+8 > cmaxx) illegal_forw = 1;
- else if (forw_col_start < 0) illegal_forw = 1;
-
- if (forw_row_start+8 > cmaxy) illegal_forw = 1;
- else if (forw_row_start < 0) illegal_forw = 1;
-
- if (back_col_start+8 > cmaxx) illegal_back = 1;
- else if (back_col_start < 0) illegal_back = 1;
-
- if (back_row_start+8 > cmaxy) illegal_back = 1;
- else if (back_row_start < 0) illegal_back = 1;
-
-#endif
-
- /* If block is Cr block... */
-
- if (bnum == 4) {
-
- /* Set dest to Cr plane of current pict image. */
-
- dest = vid_stream->current->Cr;
-
- /* If past frame exists, set past to Cr plane of past image. */
-
- if (vid_stream->past != NULL)
- past = vid_stream->past->Cr;
-
- /*
- * If future frame exists, set future to Cr plane of future image.
- */
-
- if (vid_stream->future != NULL)
- future = vid_stream->future->Cr;
- }
- /* Otherwise, block is Cb block... */
-
- else {
-
- /* Set dest to Cb plane of current pict image. */
-
- dest = vid_stream->current->Cb;
-
- /* If past frame exists, set past to Cb plane of past frame. */
-
- if (vid_stream->past != NULL)
- past = vid_stream->past->Cb;
-
- /*
- * If future frame exists, set future to Cb plane of future frame.
- */
-
- if (vid_stream->future != NULL)
- future = vid_stream->future->Cb;
- }
- }
-
- /* For each pixel in block... */
-
- index = dest + (row * row_size) + col;
-
-#ifdef LOOSE_MPEG
- if (illegal_forw)
- rindex1 = future + back_row_start * row_size + back_col_start;
- else
-#endif
- rindex1 = past + forw_row_start * row_size + forw_col_start;
-
-#ifdef LOOSE_MPEG
- if (illegal_back)
- bindex1 = past + forw_row_start * row_size + forw_col_start;
- else
-#endif
- bindex1 = future + back_row_start * row_size + back_col_start;
-
- blockvals = (short int *) &(vid_stream->block.dct_recon[0][0]);
-
- {
- unsigned char *cm = cropTbl + MAX_NEG_CROP;
- if (!zflag)
- for (rr = 0; rr < 4; rr++) {
- index[0] = cm[((int) (rindex1[0] + bindex1[0]) >> 1) + blockvals[0]];
- index[1] = cm[((int) (rindex1[1] + bindex1[1]) >> 1) + blockvals[1]];
- index[2] = cm[((int) (rindex1[2] + bindex1[2]) >> 1) + blockvals[2]];
- index[3] = cm[((int) (rindex1[3] + bindex1[3]) >> 1) + blockvals[3]];
- index[4] = cm[((int) (rindex1[4] + bindex1[4]) >> 1) + blockvals[4]];
- index[5] = cm[((int) (rindex1[5] + bindex1[5]) >> 1) + blockvals[5]];
- index[6] = cm[((int) (rindex1[6] + bindex1[6]) >> 1) + blockvals[6]];
- index[7] = cm[((int) (rindex1[7] + bindex1[7]) >> 1) + blockvals[7]];
- index += row_size;
- rindex1 += row_size;
- bindex1 += row_size;
-
- index[0] = cm[((int) (rindex1[0] + bindex1[0]) >> 1) + blockvals[8]];
- index[1] = cm[((int) (rindex1[1] + bindex1[1]) >> 1) + blockvals[9]];
- index[2] = cm[((int) (rindex1[2] + bindex1[2]) >> 1) + blockvals[10]];
- index[3] = cm[((int) (rindex1[3] + bindex1[3]) >> 1) + blockvals[11]];
- index[4] = cm[((int) (rindex1[4] + bindex1[4]) >> 1) + blockvals[12]];
- index[5] = cm[((int) (rindex1[5] + bindex1[5]) >> 1) + blockvals[13]];
- index[6] = cm[((int) (rindex1[6] + bindex1[6]) >> 1) + blockvals[14]];
- index[7] = cm[((int) (rindex1[7] + bindex1[7]) >> 1) + blockvals[15]];
- blockvals += 16;
- index += row_size;
- rindex1 += row_size;
- bindex1 += row_size;
- }
-
- else
- for (rr = 0; rr < 4; rr++) {
- index[0] = (int) (rindex1[0] + bindex1[0]) >> 1;
- index[1] = (int) (rindex1[1] + bindex1[1]) >> 1;
- index[2] = (int) (rindex1[2] + bindex1[2]) >> 1;
- index[3] = (int) (rindex1[3] + bindex1[3]) >> 1;
- index[4] = (int) (rindex1[4] + bindex1[4]) >> 1;
- index[5] = (int) (rindex1[5] + bindex1[5]) >> 1;
- index[6] = (int) (rindex1[6] + bindex1[6]) >> 1;
- index[7] = (int) (rindex1[7] + bindex1[7]) >> 1;
- index += row_size;
- rindex1 += row_size;
- bindex1 += row_size;
-
- index[0] = (int) (rindex1[0] + bindex1[0]) >> 1;
- index[1] = (int) (rindex1[1] + bindex1[1]) >> 1;
- index[2] = (int) (rindex1[2] + bindex1[2]) >> 1;
- index[3] = (int) (rindex1[3] + bindex1[3]) >> 1;
- index[4] = (int) (rindex1[4] + bindex1[4]) >> 1;
- index[5] = (int) (rindex1[5] + bindex1[5]) >> 1;
- index[6] = (int) (rindex1[6] + bindex1[6]) >> 1;
- index[7] = (int) (rindex1[7] + bindex1[7]) >> 1;
- index += row_size;
- rindex1 += row_size;
- bindex1 += row_size;
- }
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * ProcessSkippedPFrameMBlocks --
- *
- * Processes skipped macroblocks in P frames.
- *
- * Results:
- * Calculates pixel values for luminance, Cr, and Cb planes
- * in current pict image for skipped macroblocks.
- *
- * Side effects:
- * Pixel values in pict image changed.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ProcessSkippedPFrameMBlocks(VidStream *vid_stream)
-{
- int row_size, half_row, mb_row, mb_col, row, col, rr;
- int addr, row_incr, half_row_incr, crow, ccol;
- int *dest, *src, *dest1, *src1;
-
- /* Calculate row sizes for luminance and Cr/Cb macroblock areas. */
-
- row_size = vid_stream->mb_width << 4;
- half_row = (row_size >> 1);
- row_incr = row_size >> 2;
- half_row_incr = half_row >> 2;
-
- /* For each skipped macroblock, do... */
-
- for (addr = vid_stream->mblock.past_mb_addr + 1;
- addr < vid_stream->mblock.mb_address; addr++) {
-
- /* Calculate macroblock row and col. */
-
- mb_row = addr / vid_stream->mb_width;
- mb_col = addr % vid_stream->mb_width;
-
- /* Calculate upper left pixel row,col for luminance plane. */
-
- row = mb_row << 4;
- col = mb_col << 4;
-
-
- /* For each row in macroblock luminance plane... */
-
- dest = (int *)(vid_stream->current->luminance + (row * row_size) + col);
- src = (int *)(vid_stream->future->luminance + (row * row_size) + col);
-
- for (rr = 0; rr < 8; rr++) {
-
- /* Copy pixel values from last I or P picture. */
-
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_incr;
- src += row_incr;
-
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_incr;
- src += row_incr;
- }
-
- /*
- * Divide row,col to get upper left pixel of macroblock in Cr and Cb
- * planes.
- */
-
- crow = row >> 1;
- ccol = col >> 1;
-
- /* For each row in Cr, and Cb planes... */
-
- dest = (int *)(vid_stream->current->Cr + (crow * half_row) + ccol);
- src = (int *)(vid_stream->future->Cr + (crow * half_row) + ccol);
- dest1 = (int *)(vid_stream->current->Cb + (crow * half_row) + ccol);
- src1 = (int *)(vid_stream->future->Cb + (crow * half_row) + ccol);
-
- for (rr = 0; rr < 4; rr++) {
-
- /* Copy pixel values from last I or P picture. */
-
- dest[0] = src[0];
- dest[1] = src[1];
-
- dest1[0] = src1[0];
- dest1[1] = src1[1];
-
- dest += half_row_incr;
- src += half_row_incr;
- dest1 += half_row_incr;
- src1 += half_row_incr;
-
- dest[0] = src[0];
- dest[1] = src[1];
-
- dest1[0] = src1[0];
- dest1[1] = src1[1];
-
- dest += half_row_incr;
- src += half_row_incr;
- dest1 += half_row_incr;
- src1 += half_row_incr;
- }
-
- if (ditherType == MBORDERED_DITHER) {
- /*
- MBOrderedDitherDisplayCopy(vid_stream, addr,
- 1, 0, 0, 0, 0, 0,
- vid_stream->future->display,
- (unsigned char *) NULL);
- ditherFlags[addr] = 0;
- */
- }
- }
-
- vid_stream->mblock.recon_right_for_prev = 0;
- vid_stream->mblock.recon_down_for_prev = 0;
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ProcessSkippedBFrameMBlocks --
- *
- * Processes skipped macroblocks in B frames.
- *
- * Results:
- * Calculates pixel values for luminance, Cr, and Cb planes
- * in current pict image for skipped macroblocks.
- *
- * Side effects:
- * Pixel values in pict image changed.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ProcessSkippedBFrameMBlocks(VidStream *vid_stream)
-{
- int row_size, half_row, mb_row, mb_col, row, col, rr;
- int right_half_for, down_half_for, c_right_half_for, c_down_half_for;
- int right_half_back, down_half_back, c_right_half_back, c_down_half_back;
- int addr, right_for, down_for;
- int recon_right_for, recon_down_for;
- int recon_right_back, recon_down_back;
- int right_back, down_back;
- int c_right_for, c_down_for;
- int c_right_back, c_down_back;
- unsigned char forw_lum[256];
- unsigned char forw_cr[64], forw_cb[64];
- unsigned char back_lum[256], back_cr[64], back_cb[64];
- int row_incr, half_row_incr;
- int ccol, crow;
-
- /* Calculate row sizes for luminance and Cr/Cb macroblock areas. */
-
- row_size = vid_stream->mb_width << 4;
- half_row = (row_size >> 1);
- row_incr = row_size >> 2;
- half_row_incr = half_row >> 2;
-
- /* Establish motion vector codes based on full pixel flag. */
-
- if (vid_stream->picture.full_pel_forw_vector) {
- recon_right_for = vid_stream->mblock.recon_right_for_prev << 1;
- recon_down_for = vid_stream->mblock.recon_down_for_prev << 1;
- } else {
- recon_right_for = vid_stream->mblock.recon_right_for_prev;
- recon_down_for = vid_stream->mblock.recon_down_for_prev;
- }
-
- if (vid_stream->picture.full_pel_back_vector) {
- recon_right_back = vid_stream->mblock.recon_right_back_prev << 1;
- recon_down_back = vid_stream->mblock.recon_down_back_prev << 1;
- } else {
- recon_right_back = vid_stream->mblock.recon_right_back_prev;
- recon_down_back = vid_stream->mblock.recon_down_back_prev;
- }
-
-
- /* If only one motion vector, do display copy, else do full
- calculation.
- */
-
- if (ditherType == MBORDERED_DITHER) {
- if (vid_stream->mblock.bpict_past_forw &&
- !vid_stream->mblock.bpict_past_back) {
- for (addr = vid_stream->mblock.past_mb_addr+1;
- addr < vid_stream->mblock.mb_address; addr++) {
- /*
- MBOrderedDitherDisplayCopy(vid_stream, addr,
- 1, recon_right_for, recon_down_for,
- 0, 0, 0, vid_stream->past->display,
- vid_stream->future->display);
- ditherFlags[addr] = 0;
- */
- }
- return;
- }
- if (vid_stream->mblock.bpict_past_back &&
- !vid_stream->mblock.bpict_past_forw) {
- for (addr = vid_stream->mblock.past_mb_addr+1;
- addr < vid_stream->mblock.mb_address; addr++) {
- /*
- MBOrderedDitherDisplayCopy(vid_stream, addr,
- 0, 0, 0,
- 1, recon_right_back, recon_down_back,
- vid_stream->past->display, vid_stream->future->display);
- ditherFlags[addr] = 0;
- */
- }
- return;
- }
- }
-
- /* Calculate motion vectors. */
-
- if (vid_stream->mblock.bpict_past_forw) {
- right_for = recon_right_for >> 1;
- down_for = recon_down_for >> 1;
- right_half_for = recon_right_for & 0x1;
- down_half_for = recon_down_for & 0x1;
-
- recon_right_for /= 2;
- recon_down_for /= 2;
- c_right_for = recon_right_for >> 1;
- c_down_for = recon_down_for >> 1;
- c_right_half_for = recon_right_for & 0x1;
- c_down_half_for = recon_down_for & 0x1;
-
- }
- if (vid_stream->mblock.bpict_past_back) {
- right_back = recon_right_back >> 1;
- down_back = recon_down_back >> 1;
- right_half_back = recon_right_back & 0x1;
- down_half_back = recon_down_back & 0x1;
-
- recon_right_back /= 2;
- recon_down_back /= 2;
- c_right_back = recon_right_back >> 1;
- c_down_back = recon_down_back >> 1;
- c_right_half_back = recon_right_back & 0x1;
- c_down_half_back = recon_down_back & 0x1;
-
- }
- /* For each skipped macroblock, do... */
-
- for (addr = vid_stream->mblock.past_mb_addr + 1;
- addr < vid_stream->mblock.mb_address; addr++) {
-
- /* Calculate macroblock row and col. */
-
- mb_row = addr / vid_stream->mb_width;
- mb_col = addr % vid_stream->mb_width;
-
- /* Calculate upper left pixel row,col for luminance plane. */
-
- row = mb_row << 4;
- col = mb_col << 4;
- crow = row / 2;
- ccol = col / 2;
-
- /* If forward predicted, calculate prediction values. */
-
- if (vid_stream->mblock.bpict_past_forw) {
-
- ReconSkippedBlock(vid_stream->past->luminance, forw_lum,
- row, col, row_size, right_for, down_for,
- right_half_for, down_half_for, 16);
- ReconSkippedBlock(vid_stream->past->Cr, forw_cr, crow,
- ccol, half_row,
- c_right_for, c_down_for, c_right_half_for, c_down_half_for, 8);
- ReconSkippedBlock(vid_stream->past->Cb, forw_cb, crow,
- ccol, half_row,
- c_right_for, c_down_for, c_right_half_for, c_down_half_for, 8);
- }
- /* If back predicted, calculate prediction values. */
-
- if (vid_stream->mblock.bpict_past_back) {
- ReconSkippedBlock(vid_stream->future->luminance, back_lum,
- row, col, row_size, right_back, down_back,
- right_half_back, down_half_back, 16);
- ReconSkippedBlock(vid_stream->future->Cr, back_cr, crow,
- ccol, half_row,
- c_right_back, c_down_back,
- c_right_half_back, c_down_half_back, 8);
- ReconSkippedBlock(vid_stream->future->Cb, back_cb, crow,
- ccol, half_row,
- c_right_back, c_down_back,
- c_right_half_back, c_down_half_back, 8);
- }
- if (vid_stream->mblock.bpict_past_forw &&
- !vid_stream->mblock.bpict_past_back) {
-
- int *dest, *dest1;
- int *src, *src1;
- dest = (int *)(vid_stream->current->luminance + (row * row_size) + col);
- src = (int *)forw_lum;
-
- for (rr = 0; rr < 16; rr++) {
-
- /* memcpy(dest, forw_lum+(rr<<4), 16); */
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_incr;
- src += 4;
- }
-
- dest = (int *)(vid_stream->current->Cr + (crow * half_row) + ccol);
- dest1 = (int *)(vid_stream->current->Cb + (crow * half_row) + ccol);
- src = (int *)forw_cr;
- src1 = (int *)forw_cb;
-
- for (rr = 0; rr < 8; rr++) {
- /*
- * memcpy(dest, forw_cr+(rr<<3), 8); memcpy(dest1, forw_cb+(rr<<3),
- * 8);
- */
-
- dest[0] = src[0];
- dest[1] = src[1];
-
- dest1[0] = src1[0];
- dest1[1] = src1[1];
-
- dest += half_row_incr;
- dest1 += half_row_incr;
- src += 2;
- src1 += 2;
- }
- } else if (vid_stream->mblock.bpict_past_back &&
- !vid_stream->mblock.bpict_past_forw) {
-
- int *src, *src1;
- int *dest, *dest1;
- dest = (int *)(vid_stream->current->luminance + (row * row_size) + col);
- src = (int *)back_lum;
-
- for (rr = 0; rr < 16; rr++) {
- dest[0] = src[0];
- dest[1] = src[1];
- dest[2] = src[2];
- dest[3] = src[3];
- dest += row_incr;
- src += 4;
- }
-
-
- dest = (int *)(vid_stream->current->Cr + (crow * half_row) + ccol);
- dest1 = (int *)(vid_stream->current->Cb + (crow * half_row) + ccol);
- src = (int *)back_cr;
- src1 = (int *)back_cb;
-
- for (rr = 0; rr < 8; rr++) {
- /*
- * memcpy(dest, back_cr+(rr<<3), 8); memcpy(dest1, back_cb+(rr<<3),
- * 8);
- */
-
- dest[0] = src[0];
- dest[1] = src[1];
-
- dest1[0] = src1[0];
- dest1[1] = src1[1];
-
- dest += half_row_incr;
- dest1 += half_row_incr;
- src += 2;
- src1 += 2;
- }
- } else {
-
- unsigned char *src1, *src2, *src1a, *src2a;
- unsigned char *dest, *dest1;
- dest = vid_stream->current->luminance + (row * row_size) + col;
- src1 = forw_lum;
- src2 = back_lum;
-
- for (rr = 0; rr < 16; rr++) {
- dest[0] = (int) (src1[0] + src2[0]) >> 1;
- dest[1] = (int) (src1[1] + src2[1]) >> 1;
- dest[2] = (int) (src1[2] + src2[2]) >> 1;
- dest[3] = (int) (src1[3] + src2[3]) >> 1;
- dest[4] = (int) (src1[4] + src2[4]) >> 1;
- dest[5] = (int) (src1[5] + src2[5]) >> 1;
- dest[6] = (int) (src1[6] + src2[6]) >> 1;
- dest[7] = (int) (src1[7] + src2[7]) >> 1;
- dest[8] = (int) (src1[8] + src2[8]) >> 1;
- dest[9] = (int) (src1[9] + src2[9]) >> 1;
- dest[10] = (int) (src1[10] + src2[10]) >> 1;
- dest[11] = (int) (src1[11] + src2[11]) >> 1;
- dest[12] = (int) (src1[12] + src2[12]) >> 1;
- dest[13] = (int) (src1[13] + src2[13]) >> 1;
- dest[14] = (int) (src1[14] + src2[14]) >> 1;
- dest[15] = (int) (src1[15] + src2[15]) >> 1;
- dest += row_size;
- src1 += 16;
- src2 += 16;
- }
-
-
- dest = vid_stream->current->Cr + (crow * half_row) + ccol;
- dest1 = vid_stream->current->Cb + (crow * half_row) + ccol;
- src1 = forw_cr;
- src2 = back_cr;
- src1a = forw_cb;
- src2a = back_cb;
-
- for (rr = 0; rr < 8; rr++) {
- dest[0] = (int) (src1[0] + src2[0]) >> 1;
- dest[1] = (int) (src1[1] + src2[1]) >> 1;
- dest[2] = (int) (src1[2] + src2[2]) >> 1;
- dest[3] = (int) (src1[3] + src2[3]) >> 1;
- dest[4] = (int) (src1[4] + src2[4]) >> 1;
- dest[5] = (int) (src1[5] + src2[5]) >> 1;
- dest[6] = (int) (src1[6] + src2[6]) >> 1;
- dest[7] = (int) (src1[7] + src2[7]) >> 1;
- dest += half_row;
- src1 += 8;
- src2 += 8;
-
- dest1[0] = (int) (src1a[0] + src2a[0]) >> 1;
- dest1[1] = (int) (src1a[1] + src2a[1]) >> 1;
- dest1[2] = (int) (src1a[2] + src2a[2]) >> 1;
- dest1[3] = (int) (src1a[3] + src2a[3]) >> 1;
- dest1[4] = (int) (src1a[4] + src2a[4]) >> 1;
- dest1[5] = (int) (src1a[5] + src2a[5]) >> 1;
- dest1[6] = (int) (src1a[6] + src2a[6]) >> 1;
- dest1[7] = (int) (src1a[7] + src2a[7]) >> 1;
- dest1 += half_row;
- src1a += 8;
- src2a += 8;
- }
- }
-
- if (ditherType == MBORDERED_DITHER) {
- ditherFlags[addr] = 1;
- }
- }
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * ReconSkippedBlock --
- *
- * Reconstructs predictive block for skipped macroblocks
- * in B Frames.
- *
- * Results:
- * No return values.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ReconSkippedBlock(unsigned char *source, unsigned char *dest,
- int row, int col, int row_size, int right, int down,
- int right_half, int down_half, int width)
-{
- int rr;
- unsigned char *source2;
-
- source += ((row + down) * row_size) + col + right;
-
- if (width == 16) {
- if ((!right_half) && (!down_half)) {
- if (right & 0x1) {
- /* No alignment, use bye copy */
- for (rr = 0; rr < 16; rr++) {
- dest[0] = source[0];
- dest[1] = source[1];
- dest[2] = source[2];
- dest[3] = source[3];
- dest[4] = source[4];
- dest[5] = source[5];
- dest[6] = source[6];
- dest[7] = source[7];
- dest[8] = source[8];
- dest[9] = source[9];
- dest[10] = source[10];
- dest[11] = source[11];
- dest[12] = source[12];
- dest[13] = source[13];
- dest[14] = source[14];
- dest[15] = source[15];
- dest += 16;
- source += row_size;
- }
- } else if (right & 0x2) {
- /* Half-word bit aligned, use 16 bit copy */
- short *src = (short *)source;
- short *d = (short *)dest;
- row_size >>= 1;
- for (rr = 0; rr < 16; rr++) {
- d[0] = src[0];
- d[1] = src[1];
- d[2] = src[2];
- d[3] = src[3];
- d[4] = src[4];
- d[5] = src[5];
- d[6] = src[6];
- d[7] = src[7];
- d += 8;
- src += row_size;
- }
- } else {
- /* Word aligned, use 32 bit copy */
- int *src = (int *)source;
- int *d = (int *)dest;
- row_size >>= 2;
- for (rr = 0; rr < 16; rr++) {
- d[0] = src[0];
- d[1] = src[1];
- d[2] = src[2];
- d[3] = src[3];
- d += 4;
- src += row_size;
- }
- }
- } else {
- source2 = source + right_half + (row_size * down_half);
- for (rr = 0; rr < width; rr++) {
- dest[0] = (int) (source[0] + source2[0]) >> 1;
- dest[1] = (int) (source[1] + source2[1]) >> 1;
- dest[2] = (int) (source[2] + source2[2]) >> 1;
- dest[3] = (int) (source[3] + source2[3]) >> 1;
- dest[4] = (int) (source[4] + source2[4]) >> 1;
- dest[5] = (int) (source[5] + source2[5]) >> 1;
- dest[6] = (int) (source[6] + source2[6]) >> 1;
- dest[7] = (int) (source[7] + source2[7]) >> 1;
- dest[8] = (int) (source[8] + source2[8]) >> 1;
- dest[9] = (int) (source[9] + source2[9]) >> 1;
- dest[10] = (int) (source[10] + source2[10]) >> 1;
- dest[11] = (int) (source[11] + source2[11]) >> 1;
- dest[12] = (int) (source[12] + source2[12]) >> 1;
- dest[13] = (int) (source[13] + source2[13]) >> 1;
- dest[14] = (int) (source[14] + source2[14]) >> 1;
- dest[15] = (int) (source[15] + source2[15]) >> 1;
- dest += width;
- source += row_size;
- source2 += row_size;
- }
- }
- } else { /* (width == 8) */
- assert(width == 8);
- if ((!right_half) && (!down_half)) {
- if (right & 0x1) {
- for (rr = 0; rr < width; rr++) {
- dest[0] = source[0];
- dest[1] = source[1];
- dest[2] = source[2];
- dest[3] = source[3];
- dest[4] = source[4];
- dest[5] = source[5];
- dest[6] = source[6];
- dest[7] = source[7];
- dest += 8;
- source += row_size;
- }
- } else if (right & 0x02) {
- short *d = (short *)dest;
- short *src = (short *)source;
- row_size >>= 1;
- for (rr = 0; rr < width; rr++) {
- d[0] = src[0];
- d[1] = src[1];
- d[2] = src[2];
- d[3] = src[3];
- d += 4;
- src += row_size;
- }
- } else {
- int *d = (int *)dest;
- int *src = (int *)source;
- row_size >>= 2;
- for (rr = 0; rr < width; rr++) {
- d[0] = src[0];
- d[1] = src[1];
- d += 2;
- src += row_size;
- }
- }
- } else {
- source2 = source + right_half + (row_size * down_half);
- for (rr = 0; rr < width; rr++) {
- dest[0] = (int) (source[0] + source2[0]) >> 1;
- dest[1] = (int) (source[1] + source2[1]) >> 1;
- dest[2] = (int) (source[2] + source2[2]) >> 1;
- dest[3] = (int) (source[3] + source2[3]) >> 1;
- dest[4] = (int) (source[4] + source2[4]) >> 1;
- dest[5] = (int) (source[5] + source2[5]) >> 1;
- dest[6] = (int) (source[6] + source2[6]) >> 1;
- dest[7] = (int) (source[7] + source2[7]) >> 1;
- dest += width;
- source += row_size;
- source2 += row_size;
- }
- }
- }
-}
-
-/*
- *--------------------------------------------------------------
- *
- * ToggleBFlag --
- *
- * Called to set no b frame processing flag.
- *
- * Results:
- * No_B_Flag flag is toggled from present value to opposite value.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-ToggleBFlag()
-{
- if (No_B_Flag) {
- No_B_Flag = 0;
- } else
- No_B_Flag = 1;
-}
-
-
-
-
-/*
- *--------------------------------------------------------------
- *
- * TogglePFlag --
- *
- * Called to set no p frame processing flag.
- *
- * Results:
- * No_P_Flag flag is toggled from present value to opposite value.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-TogglePFlag()
-{
- if (No_P_Flag) {
- No_P_Flag = 0;
- } else
- No_P_Flag = 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h
deleted file mode 100644
index 8a9fc3f3ff6..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-#include <stdio.h>
-#include <setjmp.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#ifdef SH_MEM
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <X11/extensions/XShm.h>
-#endif
-
-/* X11/xmd.h correctly defines INT32, etc */
-#ifndef XMD_H
-typedef int INT32;
-typedef short INT16;
-typedef char INT8;
-#endif
-typedef unsigned int UINT32;
-typedef unsigned short UINT16;
-typedef unsigned char UINT8;
-
-/* Define Parsing error codes. */
-
-#define SKIP_PICTURE -10
-#define SKIP_TO_START_CODE -1
-#define PARSE_OK 1
-
-/* Define BOOLEAN, TRUE, and FALSE. */
-
-#define BOOLEAN int
-#define TRUE 1
-
-#define FALSE 0
-
-/* Set ring buffer size. */
-
-#define RING_BUF_SIZE 5
-
-/* Macros for picture code type. */
-
-#define I_TYPE 1
-#define P_TYPE 2
-#define B_TYPE 3
-
-/* Start codes. */
-
-#define SEQ_END_CODE 0x000001b7
-#define SEQ_START_CODE 0x000001b3
-#define GOP_START_CODE 0x000001b8
-#define PICTURE_START_CODE 0x00000100
-#define SLICE_MIN_START_CODE 0x00000101
-#define SLICE_MAX_START_CODE 0x000001af
-#define EXT_START_CODE 0x000001b5
-#define USER_START_CODE 0x000001b2
-
-/* Number of macroblocks to process in one call to mpegVidRsrc. */
-
-#define MB_QUANTUM 100
-
-/* Macros used with macroblock address decoding. */
-
-#define MB_STUFFING 34
-#define MB_ESCAPE 35
-
-/* Lock flags for pict images. */
-
-#define DISPLAY_LOCK 0x01
-#define PAST_LOCK 0x02
-#define FUTURE_LOCK 0x04
-
-#define HYBRID_DITHER 0
-#define HYBRID2_DITHER 1
-#define FS4_DITHER 2
-#define FS2_DITHER 3
-#define FS2FAST_DITHER 4
-#define Twox2_DITHER 5
-#define GRAY_DITHER 6
-#define FULL_COLOR_DITHER 7
-#define NO_DITHER 8
-#define ORDERED_DITHER 9
-#define MONO_DITHER 10
-#define MONO_THRESHOLD 11
-#define ORDERED2_DITHER 12
-#define MBORDERED_DITHER 13
-
-/* External declaration of row,col to zig zag conversion matrix. */
-
-extern int scan[][8];
-
-/* Temporary definition of time stamp structure. */
-
-typedef int TimeStamp;
-
-/* Structure with reconstructed pixel values. */
-
-typedef struct pict_image {
- int sh, gop, frame, display, future, past;
- int locked; /* lock flag. */
- unsigned char *luminance; /* Luminance plane. */
- unsigned char *Cr; /* Cr plane. */
- unsigned char *Cb; /* Cb plane. */
-} PictImage;
-
-/* Group of pictures structure. */
-
-typedef struct GoP {
- BOOLEAN drop_flag; /* Flag indicating dropped frame. */
- unsigned int tc_hours; /* Hour component of time code. */
- unsigned int tc_minutes; /* Minute component of time code. */
- unsigned int tc_seconds; /* Second component of time code. */
- unsigned int tc_pictures; /* Picture counter of time code. */
- BOOLEAN closed_gop; /* Indicates no pred. vectors to
- previous group of pictures. */
- BOOLEAN broken_link; /* B frame unable to be decoded. */
- char *ext_data; /* Extension data. */
- char *user_data; /* User data. */
-} GoP;
-
-/* Picture structure. */
-
-typedef struct pict {
- unsigned int temp_ref; /* Temporal reference. */
- unsigned int code_type; /* Frame type: P, B, I */
- unsigned int vbv_delay; /* Buffer delay. */
- BOOLEAN full_pel_forw_vector; /* Forw. vectors specified in full
- pixel values flag. */
- unsigned int forw_r_size; /* Used for vector decoding. */
- unsigned int forw_f; /* Used for vector decoding. */
- BOOLEAN full_pel_back_vector; /* Back vectors specified in full
- pixel values flag. */
- unsigned int back_r_size; /* Used in decoding. */
- unsigned int back_f; /* Used in decoding. */
- char *extra_info; /* Extra bit picture info. */
- char *ext_data; /* Extension data. */
- char *user_data; /* User data. */
-} Pict;
-
-/* Slice structure. */
-
-typedef struct slice {
- unsigned int vert_pos; /* Vertical position of slice. */
- unsigned int quant_scale; /* Quantization scale. */
- char *extra_info; /* Extra bit slice info. */
-} Slice;
-
-/* Macroblock structure. */
-
-typedef struct macroblock {
- int mb_address; /* Macroblock address. */
- int past_mb_addr; /* Previous mblock address. */
- int motion_h_forw_code; /* Forw. horiz. motion vector code. */
- unsigned int motion_h_forw_r; /* Used in decoding vectors. */
- int motion_v_forw_code; /* Forw. vert. motion vector code. */
- unsigned int motion_v_forw_r; /* Used in decdoinge vectors. */
- int motion_h_back_code; /* Back horiz. motion vector code. */
- unsigned int motion_h_back_r; /* Used in decoding vectors. */
- int motion_v_back_code; /* Back vert. motion vector code. */
- unsigned int motion_v_back_r; /* Used in decoding vectors. */
- unsigned int cbp; /* Coded block pattern. */
- BOOLEAN mb_intra; /* Intracoded mblock flag. */
- BOOLEAN bpict_past_forw; /* Past B frame forw. vector flag. */
- BOOLEAN bpict_past_back; /* Past B frame back vector flag. */
- int past_intra_addr; /* Addr of last intracoded mblock. */
- int recon_right_for_prev; /* Past right forw. vector. */
- int recon_down_for_prev; /* Past down forw. vector. */
- int recon_right_back_prev; /* Past right back vector. */
- int recon_down_back_prev; /* Past down back vector. */
-} Macroblock;
-
-/* Block structure. */
-
-typedef struct block {
- short int dct_recon[8][8]; /* Reconstructed dct coeff matrix. */
- short int dct_dc_y_past; /* Past lum. dc dct coefficient. */
- short int dct_dc_cr_past; /* Past cr dc dct coefficient. */
- short int dct_dc_cb_past; /* Past cb dc dct coefficient. */
-} Block;
-
-/* Video stream structure. */
-
-typedef struct vid_stream {
- int shid; /* id of latest sequence header */
- unsigned int h_size; /* Horiz. size in pixels. */
- unsigned int v_size; /* Vert. size in pixels. */
- unsigned int mb_height; /* Vert. size in mblocks. */
- unsigned int mb_width; /* Horiz. size in mblocks. */
- unsigned char aspect_ratio; /* Code for aspect ratio. */
- unsigned char picture_rate; /* Code for picture rate. */
- unsigned int bit_rate; /* Bit rate. */
- unsigned int vbv_buffer_size; /* Minimum buffer size. */
- BOOLEAN const_param_flag; /* Contrained parameter flag. */
- unsigned char intra_quant_matrix[8][8]; /* Quantization matrix for
- intracoded frames. */
- unsigned char non_intra_quant_matrix[8][8]; /* Quanitization matrix for
- non intracoded frames. */
- char *ext_data; /* Extension data. */
- char *user_data; /* User data. */
- int gopid; /* id of latest group id */
- GoP group; /* Current group of pict. */
- Pict picture; /* Current picture. */
- Slice slice; /* Current slice. */
- Macroblock mblock; /* Current macroblock. */
- Block block; /* Current block. */
- int state; /* State of decoding. */
- int bit_offset; /* Bit offset in stream. */
- unsigned int *buffer; /* Pointer to next byte in
- buffer. */
- int buf_length; /* Length of remaining buffer.*/
- unsigned int *buf_start; /* Pointer to buffer start. */
- int max_buf_length; /* Max lenght of buffer. */
- PictImage *past; /* Past predictive frame. */
- PictImage *future; /* Future predictive frame. */
- PictImage *current; /* Current frame. */
- PictImage *ring[RING_BUF_SIZE]; /* Ring buffer of frames. */
-} VidStream;
-
-/* Declaration of global pointer to current video stream. */
-
-extern VidStream *curVidStream;
-
-/* Declarataion of global display pointer. */
-extern Display *display;
-
-/* Shared memory flag. */
-extern int shmemFlag;
-
-/* Quiet mode flag. */
-extern int quietFlag;
-
-/* Dither flags external declaration. */
-extern char *ditherFlags;
-
-/* Definition of Contant integer scale factor. */
-
-#define CONST_BITS 13
-
-/* Misc DCT definitions */
-#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */
-#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */
-
-#define GLOBAL /* a function referenced thru EXTERNs */
-
-typedef short DCTELEM;
-typedef DCTELEM DCTBLOCK[DCTSIZE2];
-
-
-#ifdef SH_MEM
-extern int gXErrorFlag;
-#endif
-
-extern double realTimeStart;
-extern int totNumFrames;
-extern int loopFlag;
-extern int noDisplayFlag;
-extern jmp_buf env;
-
-#ifdef ANALYSIS
-extern unsigned int bitCount;
-extern int showEachFlag;
-extern unsigned int cacheHit[8][8];
-extern unsigned int cacheMiss[8][8];
-#endif
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp
deleted file mode 100644
index 2248bb52ce3..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp
+++ /dev/null
@@ -1,916 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose, without fee, and without written agreement is
- * hereby granted, provided that the above copyright notice and the following
- * two paragraphs appear in all copies of this software.
- *
- * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
- * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdlib.h>
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-*/
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#ifdef SH_MEM /* this is already defined in video.h */
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <X11/extensions/XShm.h>
-#endif
-
-#include "include/common.h"
-#include "newproto.h"
-#include "global.h"
-#include "dither.h"
-#include "video.h"
-
-#include <math.h>
-#include "proto.h"
-#include "ui.h"
-
-/* Declaration of global variable to hold dither info. */
-
-extern int ditherType;
-
-/* Structures used by the X server. */
-
-extern Display *display;
-extern Colormap cmap;
-
-static int cmdSocket = -1;
-static int win_width, win_height;
-static Window window;
-static GC gc;
-
-static int usingShm = 0;
-#ifdef SH_MEM
-static XShmSegmentInfo shminfo; /* Segment info. */
-#endif
-static XImage *ximage = NULL;
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitColor --
- *
- * Initialized lum, cr, and cb quantized range value arrays.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void
-InitColor()
-{
- int i;
-
- for (i=0; i<LUM_RANGE; i++) {
- lum_values[i] = ((i * 256) / (LUM_RANGE)) + (256/(LUM_RANGE*2));
- }
-
- for (i=0; i<CR_RANGE; i++) {
- cr_values[i] = ((i * 256) / (CR_RANGE)) + (256/(CR_RANGE*2));
- }
-
- for (i=0; i<CB_RANGE; i++) {
- cb_values[i] = ((i * 256) / (CB_RANGE)) + (256/(CB_RANGE*2));
- }
-
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * ConvertColor --
- *
- * Given a l, cr, cb tuple, converts it to r,g,b.
- *
- * Results:
- * r,g,b values returned in pointers passed as parameters.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static void
-ConvertColor(unsigned char l, unsigned char cr, unsigned char cb,
- unsigned char *r, unsigned char *g, unsigned char *b)
-{
- double fl, fcr, fcb, fr, fg, fb;
-
- fl = (double) l;
- fcr = ((double) cr) - 128.0;
- fcb = ((double) cb) - 128.0;
-
-
- fr = fl + (1.40200 * fcb);
- fg = fl - (0.71414 * fcb) - (0.34414 * fcr);
- fb = fl + (1.77200 * fcr);
-
- if (fr < 0.0) fr = 0.0;
- else if (fr > 255.0) fr = 255.0;
-
- if (fg < 0.0) fg = 0.0;
- else if (fg > 255.0) fg = 255.0;
-
- if (fb < 0.0) fb = 0.0;
- else if (fb > 255.0) fb = 255.0;
-
- *r = (unsigned char) fr;
- *g = (unsigned char) fg;
- *b = (unsigned char) fb;
-
-}
-
-#ifdef SH_MEM
-
-int gXErrorFlag = 0;
-
-int HandleXError(Display * dpy, XErrorEvent * event)
-{
- gXErrorFlag = 1;
- return 0;
-}
-
-void InstallXErrorHandler()
-{
- int HandleXError(Display *,XErrorEvent *);
-
- XSetErrorHandler(HandleXError);
- XFlush(display);
-}
-
-void DeInstallXErrorHandler()
-{
- XSetErrorHandler(NULL);
- XFlush(display);
-}
-#endif
-
-/*
- *--------------------------------------------------------------
- *
- * MakeWindow --
- *
- * Create X Window for image display
- *
- * Results:
- * Read the code.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-#ifdef SH_MEM
-int CompletionType = -1;
-#endif
-
-// int XShmGetEventBase (Display*);
-
-static void
-MakeWindow(void)
-{
-
- XSizeHints hint;
- unsigned int fg, bg;
- char *hello = "MPEG Play";
- int screen;
-
- if (ditherType == NO_DITHER) return;
-/*
- UICreate();
-*/
-
-#ifdef SH_MEM
- if (shmemFlag && display != NULL)
- {
- if (!XShmQueryExtension(display))
- {
- shmemFlag = 0;
- fprintf(stderr, "VP: Shared memory not supported, Reverting to normal Xlib.\n");
- }
- else
- {
- shmemFlag = 1;
- /*
- fprintf(stderr, "VP: try using shared mem, but STOPPED temporarily.\n");
- shmemFlag = 0;
- */
- }
- }
- else if (shmemFlag)
- {
- fprintf(stderr, "VP unexpected: display is NULL.\n");
- exit(1);
- }
- if(shmemFlag)
- CompletionType = /*XShmGetEventBase(display) +*/ ShmCompletion;
-#endif
-
- screen = DefaultScreen (display);
-
- /* Fill in hint structure */
-
- hint.x = 0;
- hint.y = 0;
- hint.width = 150;
- hint.height = 150;
- hint.flags = PPosition | PSize;
-
- /* Get some colors */
-
- bg = WhitePixel (display, screen);
- fg = BlackPixel (display, screen);
-
- /* Make the window */
-
- if (ditherType == FULL_COLOR_DITHER) {
- window = CreateFullColorWindow (display, hint.x, hint.y, hint.width, hint.height);
- if (window == 0) {
- fprintf (stderr, "-color option only valid on full color display\n");
- exit (-1);
- }
- } else if (ditherType == MONO_DITHER || ditherType == MONO_THRESHOLD) {
- window = XCreateSimpleWindow (display,
- MonitorWindow(),
- hint.x, hint.y,
- hint.width, hint.height,
- 4, fg, bg);
- UISetwin(window);
- } else {
- XVisualInfo vinfo;
-
- if (!XMatchVisualInfo (display, screen, 8, PseudoColor,
- &vinfo)) {
-
- if (!XMatchVisualInfo(display, screen, 8, GrayScale,
- &vinfo)) {
- fprintf(stderr, "It seems you have a true-color/mono monitor,\n");
- fprintf(stderr, "please try 'vcr -dither color' or 'vcr -dither mono'\n");
- exit(-1);
- }
- }
-
- window = XCreateSimpleWindow (display,
- MonitorWindow(),
- hint.x, hint.y,
- hint.width, hint.height,
- 4, fg, bg);
- UISetwin(window);
- }
-
- XSelectInput(display, window, StructureNotifyMask);
-
- /* Tell other applications about this window */
-
- XSetStandardProperties (display, window, hello, hello, None, NULL, 0, &hint);
-
- /* Map window. */
-
- XMapWindow(display, window);
-
- /* Wait for map. */
- while(1) {
- XEvent xev;
-
- XNextEvent(display, &xev);
- if(xev.type == MapNotify && xev.xmap.event == window)
- break;
- }
- XSelectInput(display, window, NoEventMask);
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitDisplay --
- *
- * Initialized display, sets up colormap, etc.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-
-static char window_name[64];
-#include <string.h>
-
-void InitDisplay(char *name)
-{
-
- int ncolors = LUM_RANGE*CB_RANGE*CR_RANGE;
- XColor xcolor;
- int i, lum_num, cr_num, cb_num;
- unsigned char r, g, b;
- Colormap dcmap;
-
- if (ditherType == NO_DITHER) return;
-
- strcpy(window_name, name);
-
- MakeWindow();
-
- gc = XCreateGC(display, window, 0, 0);
-
- dcmap = cmap = XDefaultColormap(display, DefaultScreen(display));
-
- xcolor.flags = DoRed | DoGreen | DoBlue;
-
- retry_alloc_colors:
- for (i=0; i<ncolors; i++) {
-
- lum_num = (i / (CR_RANGE*CB_RANGE))%LUM_RANGE;
- cr_num = (i / CB_RANGE)%CR_RANGE;
- cb_num = i % CB_RANGE;
-
- ConvertColor(lum_values[lum_num], cr_values[cr_num], cb_values[cb_num], &r, &g, &b);
-
- xcolor.red = r * 256;
- xcolor.green = g * 256;
- xcolor.blue = b * 256;
-
- if(XAllocColor(display, cmap, &xcolor) == 0 && cmap == dcmap) {
- int j;
- unsigned long tmp_pixel;
- XWindowAttributes xwa;
-
- Fprintf(stderr, "Using private colormap.\n");
-
- /* Free colors. */
- for(j = 0; j < i; j ++) {
- tmp_pixel = pixel[j];
- XFreeColors(display, cmap, &tmp_pixel, 1, 0);
- }
-
- XGetWindowAttributes(display, window, &xwa);
- cmap = XCreateColormap(display, window, xwa.visual, AllocNone);
- XSetWindowColormap(display, window, cmap);
- UISetColormap();
-
- goto retry_alloc_colors;
- }
- pixel[i] = xcolor.pixel;
- }
-
- /*
- Fprintf(stderr, "Pixel values allocated for colormap:");
- for (i = 0; i < ncolors; i++) {
- if (!(i % 20)) Fprintf(stderr, "\n");
- Fprintf(stderr, "%3d ", pixel[i]);
- }
- */
-
- ximage = NULL;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitGrayDisplay --
- *
- * Initialized display for gray scale dither.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-#define NUM_COLORS 128
-
-void InitGrayDisplay(char *name)
-{
- int ncolors = NUM_COLORS;
- XColor xcolor;
- int i;
- Colormap dcmap;
-
- MakeWindow();
-
- gc = XCreateGC(display, window, 0, 0);
-
- dcmap = cmap = XDefaultColormap(display, DefaultScreen(display));
-
- xcolor.flags = DoRed | DoGreen | DoBlue;
-
- retry_alloc_grays:
- for (i=0; i<ncolors; i++) {
-
- xcolor.red = (i*2) * 256;
- xcolor.green = (i*2) * 256;
- xcolor.blue = (i*2) * 256;
-
- if(XAllocColor(display, cmap, &xcolor) == 0 && cmap == dcmap) {
- int j;
- unsigned long tmp_pixel;
- XWindowAttributes xwa;
-
- Fprintf(stderr, "Using private colormap.\n");
-
- /* Free colors. */
- for(j = 0; j < i; j ++) {
- tmp_pixel = pixel[j*2];
- XFreeColors(display, cmap, &tmp_pixel, 1, 0);
- }
-
- XGetWindowAttributes(display, window, &xwa);
- cmap = XCreateColormap(display, window, xwa.visual, AllocNone);
- XSetWindowColormap(display, window, cmap);
- UISetColormap();
-
- goto retry_alloc_grays;
- }
- pixel[(i*2)] = xcolor.pixel;
- pixel[(i*2)+1] = xcolor.pixel;
- }
-
- ximage = NULL;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitMonoDisplay --
- *
- * Initialized display for monochrome dither.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void InitMonoDisplay(char *name)
-{
- XGCValues xgcv;
-
- MakeWindow();
-
- xgcv.background = BlackPixel(display, DefaultScreen(display));
- xgcv.foreground = WhitePixel(display, DefaultScreen(display));
-
- gc = XCreateGC(display, window, GCForeground | GCBackground, &xgcv);
-
- ximage = NULL;
-}
-
-
-/*
- *--------------------------------------------------------------
- *
- * InitColorDisplay --
- *
- * Initialized display for full color output.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-void InitColorDisplay(char *name)
-{
-
- MakeWindow();
-
- gc = XCreateGC(display, window, 0, 0);
- ximage = NULL;
-}
-
-
-static void ClearWindow(void)
-{
- int size;
- char * data;
- if ((ditherType == Twox2_DITHER) || (ditherType == FULL_COLOR_DITHER))
- size = win_width * win_height * 4;
- else
- size = win_width * win_height;
- data = (char *)malloc(size);
- if (data != NULL) {
- memset(data, 0, size);
- ximage->data = data;
- XPutImage(display, window, gc, ximage, 0, 0, 0, 0,
- ximage->width, ximage->height);
- XFlush(display);
- ximage->data = NULL;
- free(data);
- }
-}
-
-
-void VPresizeWindow(int h, int w)
-{
- int i;
- char dummy;
- Visual *fc_visual;
- int depth;
- static int ph = 0;
- static int pw = 0;
-
- if (ph == h && pw == w) {
- ClearWindow();
- return;
- }
- ph = h;
- pw = w;
-
- /* Excerpt from man page of XDestroyImage(3X11):
- Note that when the image is created using XCreateImage(),
- XGetImage(), or XSubImage(), the destroy procedure that the
- XDestroyImage function call frees both the image structure
- and the data pointed to by the image structure. */
- if (ximage != NULL) ximage->data = NULL;
-
- if (ditherType == NO_DITHER) return;
-
- win_width = ((w + 15)>>4)<<4;
- win_height = ((h + 15)>>4)<<4;
-
- i = (ditherType == Twox2_DITHER) ? 2 : 1;
- XResizeWindow(display, window, w*i, h*i);
- UIMinsize(w*i, h*i);
-
- /* ximage allocate/resize */
-
-#ifdef SH_MEM
- if (shmemFlag && display != NULL)
- {
- InstallXErrorHandler();
- }
-#endif
-
- if (ximage != NULL)
- {
-#ifdef SH_MEM
- if (shmemFlag && usingShm == 1)
- {
- XDestroyImage(ximage);
- ximage = NULL;
- }
- else
-#endif
- {
- XDestroyImage(ximage);
- ximage = NULL;
- }
- }
-#ifdef SH_MEM
- if (shmemFlag)
- {
- /*
- Visual *fc_visual;
- int depth;
- Visual *FindFullColorVisual();
- */
- usingShm = 1;
-
- if (ditherType == Twox2_DITHER)
- {
- ximage = XShmCreateImage(display, None, 8, ZPixmap, NULL,
- &(shminfo), win_width * 2, win_height * 2);
- }
- else if (ditherType == FULL_COLOR_DITHER)
- {
- fc_visual = FindFullColorVisual(display, &depth);
- ximage = XShmCreateImage(display, fc_visual, depth, ZPixmap,
- NULL, &(shminfo), win_width, win_height);
- }
- else if (ditherType == MONO_DITHER || ditherType == MONO_THRESHOLD)
- {
- ximage = XShmCreateImage(display, None, 1, XYBitmap,
- NULL, &(shminfo), win_width, win_height);
- }
- else
- {
- ximage = XShmCreateImage(display, None, 8, ZPixmap, NULL,
- &(shminfo), win_width, win_height);
- }
- if (ximage == NULL)
- {
- fprintf(stderr, "Shared memory error, disabling.\n");
- goto shmemerror;
- }
-
- if (gXErrorFlag)
- {
- XDestroyImage(ximage);
- ximage = NULL;
- fprintf(stderr, "Shared memory error, disabling.\n");
- gXErrorFlag = 0;
- goto shmemerror;
- }
- }
- else
-#endif
- {
-shmemerror:
-
- usingShm = 0;
-
- if (ditherType == Twox2_DITHER)
- {
- ximage = XCreateImage(display, None, 8, ZPixmap, 0, &dummy,
- win_width * 2,
- win_height * 2, 8, 0);
- }
- else if (ditherType == FULL_COLOR_DITHER)
- {
- fc_visual = FindFullColorVisual(display, &depth);
- ximage = XCreateImage (display, fc_visual, depth, ZPixmap,
- 0, &dummy, win_width,
- win_height, 32, 0);
- }
- else if (ditherType == MONO_DITHER || ditherType == MONO_THRESHOLD)
- {
- ximage = XCreateImage (display, None, 1, XYBitmap, 0, &dummy,
- win_width,
- win_height, 8, 0);
- ximage->byte_order = MSBFirst;
- ximage->bitmap_bit_order = MSBFirst;
- }
- else
- {
- ximage = XCreateImage(display, None, 8, ZPixmap, 0, &dummy,
- win_width,
- win_height, 8, 0);
- }
- if (ximage == NULL)
- {
- perror("VP error: fails to XCreateImage ximage");
- exit(1);
- }
- }
-#ifdef SH_MEM
- if (shmemFlag && display != NULL)
- {
- DeInstallXErrorHandler();
- }
-#endif
- ximage->data = NULL;
- /*
- fprintf(stderr, "win_width %d, win_height %d, times %d\n",
- win_width, win_height, win_width * win_height);
- */
- ClearWindow();
- /*
- fprintf(stderr, "VP window resized as width-%d, height-%d.\n", w, h);
- */
-}
-
-/* parameter 'position' is for VPcontinuous command only */
-void VPcommand(int cmd, char * ptr)
-{
- FrameBlock *buf = (FrameBlock *)ptr;
- /*
- fprintf(stderr, "VP get cmd %d.\n", cmd);
- */
- switch (cmd)
- {
- case CmdVPdisplayFrame:
- if (shared->cmd != CmdSTOP) {
- shared->currentGroup = buf->gop;
- shared->currentFrame = buf->frame;
- shared->currentDisplay = buf->display;
- ximage->data = (char *)buf->data;
- VPexpose();
- }
- VDreclaimMsg(buf);
- return;
-
- case CmdVPinitScreen:
-
- VPresizeWindow(shared->verticalSize, shared->horizontalSize);
- return;
-
- case CmdVPclearScreen:
-
- ClearWindow();
- /*
- fprintf(stderr, "VP screen cleaned for audio-only case.\n");
- */
- break;
-
- default: /* all unknown cmds shall be processed by UI */
-
- break;
- }
-}
-
-void VPexpose(void)
-{
- if (ximage == NULL) {
- return;
- }
- else if (ximage->data == NULL) {
- return;
- }
-#ifdef SH_MEM
- if (shmemFlag && usingShm)
- {
- XShmPutImage(display, window, gc, ximage, 0, 0, 0, 0,
- ximage->width, ximage->height, True);
- XFlush(display);
- while(1)
- {
- XEvent xev;
-
- XNextEvent(display, &xev);
- if(xev.type == CompletionType)
- break;
- }
- }
- else
-#endif
- {
- XPutImage(display, window, gc, ximage, 0, 0, 0, 0,
- ximage->width, ximage->height);
- XFlush(display);
- }
-}
-
-static void DisplayInitialization(void)
-{
-/*
- printf("to initialize display.\n");
-*/
- switch (ditherType) {
-
- case HYBRID_DITHER:
-
- InitColor();
- InitDisplay(displayName);
- break;
-
- case HYBRID2_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case FS4_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case FS2_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case FS2FAST_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case Twox2_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case GRAY_DITHER:
- InitGrayDisplay(displayName);
- break;
-
- case FULL_COLOR_DITHER:
- InitColorDisplay(displayName);
- break;
-
- case NO_DITHER:
- shmemFlag = 0;
- break;
-
- case ORDERED_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case MONO_DITHER:
- case MONO_THRESHOLD:
- InitMonoDisplay(displayName);
- break;
-
- case ORDERED2_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- case MBORDERED_DITHER:
- InitColor();
- InitDisplay(displayName);
- break;
-
- }
-/*
- printf("finished init display.\n");
-*/
-}
-
-void VPinitWindow(Widget shell, Window monitorWindow, int cmdSock)
-{
- cmdSocket = cmdSock;
- lum_values = (int *) malloc(LUM_RANGE*sizeof(int));
- cr_values = (int *) malloc(CR_RANGE*sizeof(int));
- cb_values = (int *) malloc(CB_RANGE*sizeof(int));
-
- DisplayInitialization();
- memcpy(shared->pixel, pixel, 256);
- shared->pixelValid = 1;
-
- free(lum_values);
- free(cr_values);
- free(cb_values);
-#ifdef SH_MEM
- if (shmemFlag && display != NULL)
- {
- InstallXErrorHandler();
-
- shminfo.shmid = shared->VDbufId;
- shminfo.shmaddr = shared->VDbufAddr;
- shminfo.readOnly = False;
- XShmAttach(display, &(shminfo));
- XSync(display, False);
-
- if (gXErrorFlag)
- {
- Fprintf(stderr, "Shared memory error, disabling.\n");
- gXErrorFlag = 0;
- shmemFlag = 0;
- }
- DeInstallXErrorHandler();
- }
-#endif
-
- remove_shmem_id(shared->VDbufId);
- VPresizeWindow(150, 200);
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile
deleted file mode 100644
index 6a65bb6fe2f..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile
+++ /dev/null
@@ -1,284 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIBNAME = libmpeg_mib
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-FILES= mibButton \
- mibDrawArea \
- mibFrame \
- mibLabel \
- mibList \
- mibMenu \
- mibRadioBox \
- mibScale \
- mibScrollBar \
- mibTextBig \
- mibTextBox \
- mibToggle \
- mibload \
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-##LIBS += -lTAO -lACE
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl
-CPPFLAGS += -DSH_MEM -DNDEBUG -DSunOS -DSTAT -I/project/doc/pkg/X11/include
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/mibButton.o .obj/mibButton.so .shobj/mibButton.o .shobj/mibButton.so: mibButton.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibDrawArea.o .obj/mibDrawArea.so .shobj/mibDrawArea.o .shobj/mibDrawArea.so: mibDrawArea.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibFrame.o .obj/mibFrame.so .shobj/mibFrame.o .shobj/mibFrame.so: mibFrame.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibLabel.o .obj/mibLabel.so .shobj/mibLabel.o .shobj/mibLabel.so: mibLabel.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibList.o .obj/mibList.so .shobj/mibList.o .shobj/mibList.so: mibList.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibMenu.o .obj/mibMenu.so .shobj/mibMenu.o .shobj/mibMenu.so: mibMenu.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibRadioBox.o .obj/mibRadioBox.so .shobj/mibRadioBox.o .shobj/mibRadioBox.so: mibRadioBox.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibScale.o .obj/mibScale.so .shobj/mibScale.o .shobj/mibScale.so: mibScale.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibScrollBar.o .obj/mibScrollBar.so .shobj/mibScrollBar.o .shobj/mibScrollBar.so: mibScrollBar.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibTextBig.o .obj/mibTextBig.so .shobj/mibTextBig.o .shobj/mibTextBig.so: mibTextBig.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibTextBox.o .obj/mibTextBox.so .shobj/mibTextBox.o .shobj/mibTextBox.so: mibTextBox.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibToggle.o .obj/mibToggle.so .shobj/mibToggle.o .shobj/mibToggle.so: mibToggle.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-.obj/mibload.o .obj/mibload.so .shobj/mibload.o .shobj/mibload.so: mibload.cpp mibload.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- mibwidgets.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp
deleted file mode 100644
index 27fb20ab24a..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for Button */
-/*****************************************************************************/
-
-mib_Widget *mib_create_Button(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_Button *myres;
- unsigned char *label_text;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
- myres = (mib_Button *)ACE_OS::malloc(sizeof(mib_Button));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(7);
- sprintf(temp->mib_class,"Button");
- temp->mib_class_num = MIB_BUTTON;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
-
- if (mib_fill == WDEFAULT)
- {
- myres->label = (char *)ACE_OS::malloc(strlen(label)+1);
- strcpy(myres->label,label);
- }
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET);
-
- XtSetArg (args[n], XmNlabelString, label_text); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- temp->me = XtCreateManagedWidget(name, xmPushButtonWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WDEFAULT)
- {
- XmStringFree(label_text);
- }
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_Button(mib_Widget *thisw)
-{
- mib_Button *temp = (mib_Button *)thisw->myres;
-
- ACE_OS::free(temp->label);
- ACE_OS::free(temp);
-}
-
-void mib_save_Button(mib_Widget *thisw, FILE *fout)
-{
- mib_Button *temp = (mib_Button *)thisw->myres;
-
- fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label);
-}
-
-void mib_code_gen_Button(mib_Widget *thisw, FILE *fout)
-{
-}
-
-int mib_load_Button(mib_Widget *thisw, mib_Buffer *fin)
-{
- mib_Button *myres;
- unsigned char *label_text;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- Arg args[20];
- int n, got_line, vallen;
-
- myres = (mib_Button *)thisw->myres;
-
- got_line = mib_read_line(fin, res, val);
- if (!got_line)
- return 0;
-
- if (!strcmp(res,"label"))
- {
- vallen = strlen(val);
- if (vallen < 2)
- return 0;
- val[vallen-1] = '\0';
- myres->label = (char *)ACE_OS::malloc(vallen-1);
- sprintf(myres->label,"%s",&(val[1]));
-
- label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET);
-
- n = 0;
- XtSetArg (args[n], XmNlabelString, label_text); n++;
- XtSetValues(thisw->me, args, n);
-
- XmStringFree(label_text);
-
- }
- else
- return 0;
-
- got_line = mib_read_line(fin, res, val);
- if (!got_line)
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp
deleted file mode 100644
index d293ca412bc..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for DrawingArea */
-/*****************************************************************************/
-
-mib_Widget *mib_create_DrawingArea(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_DrawingArea *myres;
- Widget wtemp;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
- myres = (mib_DrawingArea *)ACE_OS::malloc(sizeof(mib_DrawingArea));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(12);
- sprintf(temp->mib_class,"DrawingArea");
- temp->mib_class_num = MIB_DRAWINGAREA;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->nothing = 0;
-
- /* create Xt widget */
-
-
- n = 0;
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNbackground, WhitePixel(dpy, DefaultScreen(dpy))); n++;
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- temp->me = XtCreateManagedWidget(name, xmDrawingAreaWidgetClass,
- temp->parent->me, args, n);
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_DrawingArea(mib_Widget *thisw)
-{
- mib_DrawingArea *temp = (mib_DrawingArea *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_DrawingArea(mib_Widget *thisw, FILE *fout)
-{
-}
-
-int mib_load_DrawingArea(mib_Widget *thisw, mib_Buffer *fin)
-{
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp
deleted file mode 100644
index 0a6c9f16fb6..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for Frames */
-/*****************************************************************************/
-
-mib_Widget *mib_create_Frame(mib_Widget *parent, char *name, char *frame_type,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_Frame *myres;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_Frame *)ACE_OS::malloc(sizeof(mib_Frame));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(6);
- sprintf(temp->mib_class,"Frame");
- temp->mib_class_num = MIB_FRAME;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->shadowtype = 0;
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
-
- if (mib_fill == WDEFAULT)
- if (!strcmp("InFrame",frame_type))
- {
- XtSetArg (args[n], XmNshadowType, XmSHADOW_IN); n++;
- }
- else
- if (!strcmp("OutFrame",frame_type))
- {
- XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++;
- myres->shadowtype = 1;
- }
- else
- if (!strcmp("EtchedInFrame",frame_type))
- {
- XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++;
- myres->shadowtype = 2;
- }
- else
- if (!strcmp("EtchedOutFrame",frame_type))
- {
- XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_OUT); n++;
- myres->shadowtype = 3;
- }
-
- temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_Frame(mib_Widget *thisw)
-{
- mib_Frame *temp = (mib_Frame *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_Frame(mib_Widget *thisw, FILE *fout)
-{
- mib_Frame *temp = (mib_Frame *)thisw->myres;
-
- fprintf(fout,"shadowtype: %d\\n\\\n", temp->shadowtype);
-}
-
-int mib_load_Frame(mib_Widget *thisw, mib_Buffer *fin)
-{
- mib_Frame *myres;
- unsigned char *label_text;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- Arg args[5];
- int n;
-
- myres = (mib_Frame *)thisw->myres;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res,"shadowtype"))
- {
- sscanf(val,"%d",&(myres->shadowtype));
-
- n = 0;
- switch (myres->shadowtype) {
- case 0:
- XtSetArg (args[n], XmNshadowType, XmSHADOW_IN); n++;
- break;
- case 1:
- XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++;
- break;
- case 2:
- XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++;
- break;
- case 3:
- XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_OUT); n++;
- break;
- default:
- break;
- }
- XtSetValues(thisw->me, args, n);
- }
- else
- return 0;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp
deleted file mode 100644
index 9ee5cf87b3e..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for Label */
-/*****************************************************************************/
-
-mib_Widget *mib_create_Label(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_Label *myres;
- unsigned char *label_text;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_Label *)ACE_OS::malloc(sizeof(mib_Label));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(6);
- sprintf(temp->mib_class,"Label");
- temp->mib_class_num = MIB_LABEL;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
-
- if (mib_fill == WDEFAULT)
- {
- myres->label = (char *)ACE_OS::malloc(strlen(label)+1);
- strcpy(myres->label,label);
- }
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET);
-
- XtSetArg (args[n], XmNlabelString, label_text); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- temp->me = XtCreateManagedWidget(name, xmLabelWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WDEFAULT)
- XmStringFree(label_text);
-
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_Label(mib_Widget *thisw)
-{
- mib_Label *temp = (mib_Label *)thisw->myres;
-
- ACE_OS::free(temp->label);
- ACE_OS::free(temp);
-}
-
-void mib_save_Label(mib_Widget *thisw, FILE *fout)
-{
- mib_Label *temp = (mib_Label *)thisw->myres;
-
- fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label);
-}
-
-int mib_load_Label(mib_Widget *thisw, mib_Buffer *fin)
-{
- mib_Label *myres;
- unsigned char *label_text;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- Arg args[5];
- int n, vallen;
-
- myres = (mib_Label *)thisw->myres;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res,"label"))
- {
- vallen = strlen(val);
- if (vallen < 2)
- return 0;
- val[vallen-1] = '\0';
- myres->label = (char *)ACE_OS::malloc(vallen-1);
- sprintf(myres->label,"%s",&(val[1]));
- label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET);
-
- n = 0;
- XtSetArg (args[n], XmNlabelString, label_text); n++;
- XtSetValues(thisw->me, args, n);
-
- XmStringFree(label_text);
- }
- else
- return 0;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp
deleted file mode 100644
index 5fd19422b39..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-static Widget real_list;
-
-/* Code for Lists */
-/*****************************************************************************/
-
-mib_Widget *mib_create_List(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_List *myres;
- Widget wtemp;
- unsigned char *label_text;
- char ttext[30];
- Arg args[20];
- String myname;
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_List *)ACE_OS::malloc(sizeof(mib_List));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(5);
- sprintf(temp->mib_class,"List");
- temp->mib_class_num = MIB_LIST;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy); n++;
- }
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++;
-
- temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass,
- temp->parent->me, args, n);
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNorientation, XmVERTICAL); n++;
-
- if (mib_fill == WEMPTY)
- {
- XtSetArg (args[n], XmNlistSizePolicy, XmCONSTANT); n++;
- }
-
- wtemp = XmCreateScrolledList(temp->me, name, args, n);
- myres->real_list = wtemp;
- real_list = wtemp;
-
- XtManageChild(wtemp);
-
- if (mib_fill != WEMPTY)
- real_list = NULL;
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- label_text = XmStringCreateLtoR("Simple", XmSTRING_DEFAULT_CHARSET);
- XmListAddItem(wtemp, label_text, 0);
- XmStringFree(label_text);
- label_text = XmStringCreateLtoR("List", XmSTRING_DEFAULT_CHARSET);
- XmListAddItem(wtemp, label_text, 0);
- XmStringFree(label_text);
- for (n=0;n<200;n++)
- {
- sprintf(ttext,"Item %d ",n);
- label_text = XmStringCreateLtoR(ttext, XmSTRING_DEFAULT_CHARSET);
- XmListAddItem(wtemp, label_text, 0);
- XmStringFree(label_text);
- }
-
- mib_apply_eventhandlers(temp->me, temp);
- mib_apply_eventhandlers(wtemp, temp);
- }
-
- return temp;
-}
-
-void mib_delete_List(mib_Widget *thisw)
-{
- mib_List *temp = (mib_List *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_List(mib_Widget *thisw, FILE *fout)
-{
-}
-
-int mib_load_List(mib_Widget *thisw, mib_Buffer *fin)
-{
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
-
-
- if (real_list)
- thisw->me = real_list;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp
deleted file mode 100644
index aa1c96b5546..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-static int delhandler; /* delay adding event handler until menu
- is actually created */
-
-/* Code for Menu */
-/*****************************************************************************/
-
-mib_Widget *mib_create_Menu(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_Menu *myres;
- Widget wtemp;
- char label_temp[50];
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_Menu *)ACE_OS::malloc(sizeof(mib_Menu));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(8);
- sprintf(temp->mib_class,"Menu");
- temp->mib_class_num = MIB_MENU;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 0;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->numitems = 0;
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- }
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
-
- temp->me = XtCreateManagedWidget(name, xmRowColumnWidgetClass,
- temp->parent->me, args, n);
-
- n = 0;
-
- delhandler = 1;
- if (mib_fill == WDEFAULT)
- {
- delhandler = 0;
- myres->numitems = 3;
- myres->my_menu = (MenuItem *)ACE_OS::malloc(sizeof(MenuItem) * (myres->numitems+1));
- myres->items = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numitems);
- sprintf(label_temp, "Item 1");
- myres->my_menu[0].label = (char *)ACE_OS::malloc(strlen(label_temp)+1);
- strcpy(myres->my_menu[0].label,label_temp);
- myres->my_menu[0].wclass = &xmPushButtonGadgetClass;
- myres->my_menu[0].mnemonic = '1';
- myres->my_menu[0].accelerator = NULL;
- myres->my_menu[0].accel_text = NULL;
- myres->my_menu[0].accel_text = NULL;
- myres->my_menu[0].callback = NULL;
- myres->my_menu[0].callback_data = NULL;
- myres->my_menu[0].subitems = (struct _menu_item *)1;
-
- sprintf(label_temp, "Item 2");
- myres->my_menu[1].label = (char *)ACE_OS::malloc(strlen(label_temp)+1);
- strcpy(myres->my_menu[1].label,label_temp);
- myres->my_menu[1].wclass = &xmPushButtonGadgetClass;
- myres->my_menu[1].mnemonic = '2';
- myres->my_menu[1].accelerator = NULL;
- myres->my_menu[1].accel_text = NULL;
- myres->my_menu[1].accel_text = NULL;
- myres->my_menu[1].callback = NULL;
- myres->my_menu[1].callback_data = NULL;
- myres->my_menu[1].subitems = (struct _menu_item *)1;
-
- sprintf(label_temp, "Item 3");
- myres->my_menu[2].label = (char *)ACE_OS::malloc(strlen(label_temp)+1);
- strcpy(myres->my_menu[2].label,label_temp);
- myres->my_menu[2].wclass = &xmPushButtonGadgetClass;
- myres->my_menu[2].mnemonic = '2';
- myres->my_menu[2].accelerator = NULL;
- myres->my_menu[2].accel_text = NULL;
- myres->my_menu[2].accel_text = NULL;
- myres->my_menu[2].callback = NULL;
- myres->my_menu[2].callback_data = NULL;
- myres->my_menu[2].subitems = (struct _menu_item *)1;
-
- myres->my_menu[3].label = NULL;
-
- wtemp = BuildMenu(temp->me, XmMENU_OPTION, NULL, 'M', myres->my_menu);
- XtManageChild(wtemp);
- }
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
-
- /* default menu */
-
- if (!delhandler)
- {
- mib_apply_eventhandlers(wtemp, temp);
- mib_apply_eventhandlers(temp->me, temp);
- }
- }
-
- if (mib_fill == WEMPTY)
- delhandler = 0;
-
- return temp;
-}
-
-void mib_delete_Menu(mib_Widget *thisw)
-{
- mib_Menu *temp = (mib_Menu *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_Menu(mib_Widget *thisw, FILE *fout)
-{
- mib_Menu *temp = (mib_Menu *)thisw->myres;
- int count;
-
- fprintf(fout, "numitems: %d\\n\\\n", temp->numitems);
-
- for (count=0; count < temp->numitems; count++)
- {
- fprintf(fout, "item: \\\"%s\\\"\\n\\\n", temp->my_menu[count].label);
- }
-
-}
-
-int mib_load_Menu(mib_Widget *thisw, mib_Buffer *fin)
-{
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- int count, vallen;
- Widget wtemp;
- mib_Menu *myres = (mib_Menu *)thisw->myres;
-
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res, "numitems"))
- {
- myres->numitems = 0;
- sscanf(val, "%d", &(myres->numitems));
- if (!(myres->numitems))
- return 0;
-
- myres->my_menu = (MenuItem *)ACE_OS::malloc(sizeof(MenuItem) * (myres->numitems+1));
- myres->items = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numitems);
- for (count = 0; count < myres->numitems; count++)
- {
- if (!mib_read_line(fin, res, val))
- return 0;
- vallen = strlen(val);
- if (vallen < 2)
- return 0;
- val[vallen-1] = '\0';
- myres->my_menu[count].label = (char *)ACE_OS::malloc(vallen-1);
- sprintf(myres->my_menu[count].label, "%s", &(val[1]));
- myres->my_menu[count].wclass = &xmPushButtonGadgetClass;
- myres->my_menu[count].mnemonic = NULL;
- myres->my_menu[count].accelerator = NULL;
- myres->my_menu[count].accel_text = NULL;
- myres->my_menu[count].accel_text = NULL;
- myres->my_menu[count].callback = NULL;
- myres->my_menu[count].callback_data = NULL;
- myres->my_menu[count].subitems = (struct _menu_item *)1;
- }
- myres->my_menu[myres->numitems].label = NULL;
-
- wtemp = BuildMenu(thisw->me, XmMENU_OPTION, NULL, NULL, myres->my_menu);
- XtManageChild(wtemp);
-
- if (delhandler)
- {
- mib_apply_eventhandlers(wtemp, thisw);
- mib_apply_eventhandlers(thisw->me, thisw);
- }
- else
- thisw->me = wtemp;
-
- for (count = 0; count < myres->numitems; count++)
- {
- /* thisw hack extracts the widget for each item in the menu
- for possible use by the programmer */
- myres->items[count] = (Widget)(myres->my_menu[count].subitems);
- }
-
- }
- else
- return 0;
-
- if (!mib_read_line(fin, res, val))
- return 0;
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp
deleted file mode 100644
index c76992b8e96..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for RadioBox */
-/*****************************************************************************/
-
-mib_Widget *mib_create_RadioBox(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_RadioBox *myres;
- Widget wtemp;
- unsigned char *label_text;
- char label_temp[50];
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_RadioBox *)ACE_OS::malloc(sizeof(mib_RadioBox));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(9);
- sprintf(temp->mib_class,"RadioBox");
- temp->mib_class_num = MIB_RADIOBOX;
-
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 0;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
-
- myres->numlabel = 0;
-
- if (mib_fill == WDEFAULT)
- {
- myres->numlabel = 2;
- myres->labels = (char **)ACE_OS::malloc(10);
- myres->buttons = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numlabel);
- sprintf(label_temp, "Radio 1");
- myres->labels[0] = (char *)ACE_OS::malloc(strlen(label_temp)+1);
- strcpy(myres->labels[0],label_temp);
- sprintf(label_temp, "Radio 2");
- myres->labels[1] = (char *)ACE_OS::malloc(strlen(label_temp)+1);
- strcpy(myres->labels[1],label_temp);
- }
-
-
- /* create Xt widget */
-
- n = 0;
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- temp->me = XmCreateRadioBox(temp->parent->me, "Radio", args, n);
- wtemp = temp->me;
-
-
- if (mib_fill == WDEFAULT)
- {
- n = 0;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- XtCreateManagedWidget("Radio 1", xmToggleButtonGadgetClass,
- wtemp, args, n);
-
- n = 0;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
- XtCreateManagedWidget("Radio 2", xmToggleButtonGadgetClass,
- wtemp, args, n);
- }
-
-
- XtManageChild(wtemp);
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_RadioBox(mib_Widget *thisw)
-{
- mib_RadioBox *temp = (mib_RadioBox *)thisw->myres;
- int count;
-
- for (count=0; count < temp->numlabel; count++)
- ACE_OS::free(temp->labels[count]);
-
- ACE_OS::free(temp);
-}
-
-void mib_save_RadioBox(mib_Widget *thisw, FILE *fout)
-{
- mib_RadioBox *temp = (mib_RadioBox *)thisw->myres;
- int count;
-
- fprintf(fout,"numlabel: %d\\n\\\n", temp->numlabel);
-
- for (count=0; count < temp->numlabel; count++)
- {
- fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->labels[count]);
- }
-}
-
-int mib_load_RadioBox(mib_Widget *thisw, mib_Buffer *fin)
-{
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- int count, vallen, n;
- Arg args[5];
- mib_RadioBox *myres;
-
- myres = (mib_RadioBox *)thisw->myres;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res,"numlabel"))
- {
- myres->numlabel = 0;
- sscanf(val,"%d",&(myres->numlabel));
- if (!(myres->numlabel))
- return 0;
-
- myres->labels = (char **)ACE_OS::malloc((myres->numlabel+1)*4);
- myres->buttons = (Widget *)ACE_OS::malloc(sizeof(Widget)*(myres->numlabel));
- for (count=0; count < myres->numlabel; count++)
- {
- if (!mib_read_line(fin, res, val))
- return 0;
- vallen = strlen(val);
- if (vallen < 2)
- return 0;
- val[vallen-1] = '\0';
- myres->labels[count] = (char *)ACE_OS::malloc(vallen-1);
- sprintf(myres->labels[count],"%s",&(val[1]));
-
- n = 0;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- myres->buttons[count] = XtCreateManagedWidget(myres->labels[count],
- xmToggleButtonGadgetClass, thisw->me, args, n);
-
- }
- }
- else
- return 0;
-
- if (!mib_read_line(fin, res, val))
- return 0;
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp
deleted file mode 100644
index eb58f655481..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-static int scaleflag;
-
-/* Code for Scale */
-/*****************************************************************************/
-
-mib_Widget *mib_create_Scale(mib_Widget *parent, char *name, char *orient,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_Scale *myres;
- Arg args[20];
- int n;
-
-
- scaleflag = 0;
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_Scale *)ACE_OS::malloc(sizeof(mib_Scale));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(10);
- sprintf(temp->mib_class,"Scale");
- temp->mib_class_num = MIB_SCALE;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->orientation = 0;
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
-
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
-
-
- if (mib_fill == WDEFAULT)
- if (!strcmp("VertScale",orient))
- {
- XtSetArg (args[n], XmNorientation, XmVERTICAL); n++;
- }
- else
- if (!strcmp("HorzScale",orient))
- {
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- myres->orientation = 1;
- }
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNshowArrows, False); n++;
- XtSetArg (args[n], XmNsliderSize, 30); n++;
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- temp->me = XtCreateManagedWidget(name, xmScrollBarWidgetClass,
- temp->parent->me, args, n);
- else
- temp->me = XtCreateManagedWidget(name, xmScaleWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WEMPTY)
- scaleflag = 1;
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_Scale(mib_Widget *thisw)
-{
- mib_Scale *temp = (mib_Scale *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_Scale(mib_Widget *thisw, FILE *fout)
-{
- mib_Scale *temp = (mib_Scale *)thisw->myres;
-
- fprintf(fout,"orientation: %d\\n\\\n", temp->orientation);
-}
-
-int mib_load_Scale(mib_Widget *thisw, mib_Buffer *fin)
-{
- mib_Scale *myres;
- unsigned char *label_text;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- Arg args[5];
- int n;
- Dimension myht,mywd;
-
-
- myres = (mib_Scale *)thisw->myres;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res,"orientation"))
- {
- sscanf(val,"%d",&(myres->orientation));
-
- n = 0;
- if (scaleflag)
- {
- if (!myres->orientation)
- {
- XtSetArg (args[n], XmNscaleWidth, thisw->width); n++;
- }
- else
- {
- XtSetArg (args[n], XmNscaleWidth, thisw->height); n++;
- }
-
- XtSetValues(thisw->me, args, n);
-
- }
-
- n = 0;
- switch (myres->orientation) {
- case 0:
- XtSetArg (args[n], XmNorientation, XmVERTICAL); n++;
- break;
- case 1:
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- break;
- default:
- break;
- }
- XtSetValues(thisw->me, args, n);
-
- }
- else
- return 0;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp
deleted file mode 100644
index f8123d8a139..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for ScrollBars */
-/*****************************************************************************/
-
-mib_Widget *mib_create_ScrollBar(mib_Widget *parent, char *name, char *orient,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_ScrollBar *myres;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_ScrollBar *)ACE_OS::malloc(sizeof(mib_ScrollBar));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(10);
- sprintf(temp->mib_class,"ScrollBar");
- temp->mib_class_num = MIB_SCROLLBAR;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->orientation = 0;
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
-
- if (mib_fill == WDEFAULT)
- if (!strcmp("VertScrollBar",orient))
- {
- XtSetArg (args[n], XmNorientation, XmVERTICAL); n++;
- }
- else
- if (!strcmp("HorzScrollBar",orient))
- {
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- myres->orientation = 1;
- }
-
- temp->me = XtCreateManagedWidget(name, xmScrollBarWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_ScrollBar(mib_Widget *thisw)
-{
- mib_ScrollBar *temp = (mib_ScrollBar *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_ScrollBar(mib_Widget *thisw, FILE *fout)
-{
- mib_ScrollBar *temp = (mib_ScrollBar *)thisw->myres;
-
- fprintf(fout,"orientation: %d\\n\\\n", temp->orientation);
-}
-
-int mib_load_ScrollBar(mib_Widget *thisw, mib_Buffer *fin)
-{
- mib_ScrollBar *myres;
- unsigned char *label_text;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- Arg args[5];
- int n;
-
- myres = (mib_ScrollBar *)thisw->myres;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res,"orientation"))
- {
- sscanf(val,"%d",&(myres->orientation));
-
- n = 0;
- switch (myres->orientation) {
- case 0:
- XtSetArg (args[n], XmNorientation, XmVERTICAL); n++;
- break;
- case 1:
- XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++;
- break;
- default:
- break;
- }
- XtSetValues(thisw->me, args, n);
- }
- else
- return 0;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp
deleted file mode 100644
index af814a39fb4..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-static Widget real_text;
-
-/* Code of TextBig */
-/*****************************************************************************/
-
-mib_Widget *mib_create_TextBig(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_TextBig *myres;
- Widget wtemp;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_TextBig *)ACE_OS::malloc(sizeof(mib_TextBig));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(8);
- sprintf(temp->mib_class,"TextBig");
- temp->mib_class_num = MIB_TEXTBIG;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->nothing = 0;
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- }
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++;
-
- temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass,
- temp->parent->me, args, n);
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- XtSetArg (args[n], XmNrows, 200); n++;
- XtSetArg (args[n], XmNcolumns, 200); n++;
- }
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- wtemp = XmCreateScrolledText(temp->me, name, args, n);
- real_text = wtemp;
-
- XtManageChild(wtemp);
-
- if (mib_fill != WEMPTY)
- real_text = NULL;
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- XmTextSetString(wtemp,"Big Text Field\nwith Scrollbars\n\n\n\n\n\n\n ");
-
- mib_apply_eventhandlers(wtemp, temp);
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_TextBig(mib_Widget *thisw)
-{
- mib_TextBig *temp = (mib_TextBig *)thisw->myres;
-
- ACE_OS::free(temp);
-}
-
-void mib_save_TextBig(mib_Widget *thisw, FILE *fout)
-{
-}
-
-int mib_load_TextBig(mib_Widget *thisw, mib_Buffer *fin)
-{
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
-
- if (real_text)
- thisw->me = real_text;
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp
deleted file mode 100644
index 6e537539e40..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for TextBox */
-/*****************************************************************************/
-
-mib_Widget *mib_create_TextBox(mib_Widget *parent, char *name, char *contents,
- int posx, int posy, int width, int height,
- int mib_fill)
-{
- mib_Widget *temp;
- mib_TextBox *myres;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
- myres = (mib_TextBox *)ACE_OS::malloc(sizeof(mib_TextBox));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(8);
- sprintf(temp->mib_class,"TextBox");
- temp->mib_class_num = MIB_TEXTBOX;
- temp->width = width;
- temp->height = height;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 1;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
- myres->init_contents = NULL;
-
- if (mib_fill == WDEFAULT)
- {
- if (contents != NULL)
- {
- myres->init_contents = (char *)ACE_OS::malloc(strlen(contents)+1);
- strcpy(myres->init_contents, contents);
- }
- }
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- }
-
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
-
- temp->me = XtCreateManagedWidget(name, xmTextFieldWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- XmTextFieldSetString(temp->me, "Text Field");
-
- }
-
- return temp;
-}
-
-void mib_delete_TextBox(mib_Widget *thisw)
-{
- mib_TextBox *temp = (mib_TextBox *)thisw->myres;
-
- if (temp->init_contents != NULL)
- ACE_OS::free(temp->init_contents);
-}
-
-void mib_save_TextBox(mib_Widget *thisw, FILE *fout)
-{
-}
-
-int mib_load_TextBox(mib_Widget *thisw, mib_Buffer *fin)
-{
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
-
- if (!mib_read_line(fin, res, val))
- return 0;
-
- if (!strcmp(res,"EndWidget."))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp
deleted file mode 100644
index 95338eb76ab..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-
-/* Author: Daeron Meyer */
-
-#include "mibload.h"
-#include "mibwidgets.h"
-
-extern Display *dpy;
-extern GC mib_gc;
-
-/* Code for Toggle */
-/*****************************************************************************/
-
-mib_Widget *mib_create_Toggle(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill)
-{
- mib_Widget *temp;
- mib_Toggle *myres;
- unsigned char *label_text;
- Arg args[20];
- int n;
-
- /* create the new widget and add it to the tree */
-
- temp = mib_new_mib_Widget();
- if (mib_fill == WDEFAULT)
- mib_add_backward(temp, parent);
- else
- mib_add_mib_Widget(temp, parent);
-
- myres = (mib_Toggle *)ACE_OS::malloc(sizeof(mib_Toggle));
-
- /* initialize public resources */
-
- if (mib_fill == WDEFAULT)
- {
- temp->name = (char *)ACE_OS::malloc(strlen(name)+1);
- strcpy(temp->name,name);
- }
- temp->mib_class = (char *)ACE_OS::malloc(7);
- sprintf(temp->mib_class,"Toggle");
- temp->mib_class_num = MIB_TOGGLE;
- temp->width = 0 /*width*/;
- temp->height = 0 /*height*/;
- temp->topOffset = posy;
- temp->leftOffset = posx;
- temp->bottomOffset = 0;
- temp->rightOffset = 0;
- temp->topAttachment = 1;
- temp->leftAttachment = 1;
- temp->bottomAttachment = 0;
- temp->rightAttachment = 0;
-
- temp->mib_allowresize = 0;
-
- /* initialize private resources */
-
- temp->myres = (void *)myres;
-
- myres->isize = 0;
- if (mib_fill == WDEFAULT)
- {
- myres->label = (char *)ACE_OS::malloc(strlen(label)+1);
- strcpy(myres->label,label);
- }
-
- /* create Xt widget */
-
- n = 0;
-
- if (mib_fill == WDEFAULT)
- {
- label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET);
-
- XtSetArg (args[n], XmNlabelString, label_text); n++;
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, posx);n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, posy);n++;
-/* XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;*/
- }
-
- XtSetArg (args[n], XmNwidth, width); n++;
- XtSetArg (args[n], XmNheight, height); n++;
- XtSetArg (args[n], XmNspacing, 4); n++;
- XtSetArg (args[n], XmNhighlightThickness, 0); n++;
- XtSetArg (args[n], XmNrubberPositioning, False); n++;
- XtSetArg (args[n], XmNindicatorType, XmN_OF_MANY);
-
- temp->me = XtCreateManagedWidget(name, xmToggleButtonWidgetClass,
- temp->parent->me, args, n);
-
- if (mib_fill == WDEFAULT)
- {
- XmStringFree(label_text);
- }
-
- if (mib_fill == WEDIT || mib_fill == WDEFAULT)
- {
- mib_apply_eventhandlers(temp->me, temp);
- }
-
- return temp;
-}
-
-void mib_delete_Toggle(mib_Widget *thisw)
-{
- mib_Toggle *temp = (mib_Toggle *)thisw->myres;
-
- ACE_OS::free(temp->label);
- ACE_OS::free(temp);
-}
-
-void mib_save_Toggle(mib_Widget *thisw, FILE *fout)
-{
- mib_Toggle *temp = (mib_Toggle *)thisw->myres;
-
- fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label);
- fprintf(fout,"indicatorSize: %d\\n\\\n", temp->isize);
-}
-
-int mib_load_Toggle(mib_Widget *thisw, mib_Buffer *fin)
-{
- mib_Toggle *myres;
- unsigned char *label_text;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- Arg args[20];
- int n, got_line, vallen;
-
- myres = (mib_Toggle *)thisw->myres;
-
- got_line = mib_read_line(fin, res, val);
- if (!got_line)
- return 0;
-
- if (!strcmp(res,"label"))
- {
- vallen = strlen(val);
- if (vallen < 2)
- return 0;
- val[vallen-1] = '\0';
- myres->label = (char *)ACE_OS::malloc(vallen-1);
- sprintf(myres->label,"%s",&(val[1]));
-
- label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET);
-
- n = 0;
- XtSetArg (args[n], XmNlabelString, label_text); n++;
- thisw->width = 0;
- thisw->height = 0;
- XtSetArg (args[n], XmNwidth, thisw->width); n++;
- XtSetArg (args[n], XmNheight, thisw->height); n++;
- XtSetValues(thisw->me, args, n);
- XmStringFree(label_text);
-
- }
- else
- return 0;
-
- got_line = mib_read_line(fin, res, val);
- if (!got_line)
- return 0;
-
- if (!strcmp(res, "indicatorSize"))
- {
- sscanf(val, "%d", &(myres->isize));
- if (myres->isize)
- XtVaSetValues(thisw->me, XmNindicatorSize, (Dimension)myres->isize,
- XmNmarginBottom, 0, XmNmarginTop, 0, XmNmarginLeft, 0,
- XmNmarginRight, 0, XmNspacing, 0, NULL);
- got_line = mib_read_line(fin, res, val);
- if (!got_line)
- return 0;
- }
-
- if (strcmp(res,"EndWidget"))
- return 0;
-
- return 1;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp
deleted file mode 100644
index c71bc031b67..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp
+++ /dev/null
@@ -1,801 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with thisw file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include <stdlib.h>
-#include "mibload.h"
-#include "mibwidgets.h"
-
-mib_Widget *mib_root_Widget;
-Display *dpy;
-GC mib_gc;
-static struct _mib_event_handle_funcs {
-#ifdef __cplusplus
- void (*mib_pick_mib_Widget)( Widget, XtPointer,
- XEvent *, Boolean * );
- void (*mib_move_mib_Widget)( Widget, XtPointer,
- XEvent *, Boolean *);
- void (*mib_unpick_mib_Widget)( Widget, XtPointer,
- XEvent *, Boolean * );
-#else
- void (*mib_pick_mib_Widget)(/* Widget, XtPointer,
- XButtonPressedEvent *, Boolean * */);
- void (*mib_move_mib_Widget)(/* Widget, XtPointer,
- XPointerMovedEvent *, Boolean * */);
- void (*mib_unpick_mib_Widget)(/* Widget, XtPointer,
- XButtonReleasedEvent *, Boolean * */);
-#endif
-} mib_events;
-
-mib_widget_funcs mwfuncs[] =
-{
- { NULL, NULL, NULL, NULL, NULL },
- { "TextBox", mib_create_TextBox, mib_delete_TextBox,
- mib_save_TextBox, mib_load_TextBox},
- { "Button", mib_create_Button, mib_delete_Button,
- mib_save_Button, mib_load_Button},
- { "Toggle", mib_create_Toggle, mib_delete_Toggle,
- mib_save_Toggle, mib_load_Toggle},
- { "RadioBox", mib_create_RadioBox, mib_delete_RadioBox,
- mib_save_RadioBox, mib_load_RadioBox},
- { "DrawingArea", mib_create_DrawingArea, mib_delete_DrawingArea,
- mib_save_DrawingArea, mib_load_DrawingArea},
- { "Label", mib_create_Label, mib_delete_Label,
- mib_save_Label, mib_load_Label},
- { "Frame", mib_create_Frame, mib_delete_Frame,
- mib_save_Frame, mib_load_Frame},
- { "ScrollBar", mib_create_ScrollBar, mib_delete_ScrollBar,
- mib_save_ScrollBar, mib_load_ScrollBar},
- { "TextBig", mib_create_TextBig, mib_delete_TextBig,
- mib_save_TextBig, mib_load_TextBig},
- { "List", mib_create_List, mib_delete_List,
- mib_save_List, mib_load_List},
- { "Scale", mib_create_Scale, mib_delete_Scale,
- mib_save_Scale, mib_load_Scale},
- { "Menu", mib_create_Menu, mib_delete_Menu,
- mib_save_Menu, mib_load_Menu},
- { NULL, NULL, NULL, NULL, NULL },
-};
-
-/*****************************************************************************/
-
-void mib_add_mib_Widget(mib_Widget *thisw, mib_Widget *parent)
-{
- mib_Widget *tmp;
-
- if (parent->child == NULL)
- {
- parent->child = thisw;
- thisw->prev = parent;
- thisw->parent = parent;
- thisw->sibling = NULL;
- thisw->child = NULL;
- }
- else
- {
- tmp = parent->child;
- while (tmp->sibling != NULL)
- tmp = tmp->sibling;
- tmp->sibling = thisw;
- thisw->prev = tmp;
- thisw->parent = parent;
- thisw->sibling = NULL;
- thisw->child = NULL;
- }
-}
-
-/*****************************************************************************/
-
-void mib_add_backward(mib_Widget *thisw, mib_Widget *parent)
-{
- mib_Widget *tmp;
-
- if (parent->child == NULL)
- {
- parent->child = thisw;
- thisw->prev = parent;
- thisw->parent = parent;
- thisw->sibling = NULL;
- thisw->child = NULL;
- }
- else
- {
- tmp = parent->child;
- parent->child = thisw;
- thisw->prev = parent;
- thisw->parent = parent;
- thisw->sibling = tmp;
- thisw->child = NULL;
- tmp->prev = thisw;
- }
-}
-
-/*****************************************************************************/
-
-void mib_remove_mib_Widget(mib_Widget *thisw)
-{
- int count;
- mib_Widget *pnt;
-
- XtVaSetValues(mib_root_Widget->me, XmNresizePolicy, XmRESIZE_NONE, NULL);
- XtDestroyWidget(thisw->me);
-
- while (thisw->child != NULL)
- mib_remove_mib_Widget(thisw->child);
-
- if (thisw->parent == thisw)
- {
- mib_clear_myres(thisw);
- return;
- }
-
- if (thisw->prev == thisw->parent)
- {
- thisw->parent->child = thisw->sibling;
- if (thisw->sibling != NULL)
- thisw->sibling->prev = thisw->parent;
- }
- else
- {
- thisw->prev->sibling = thisw->sibling;
- if (thisw->sibling != NULL)
- thisw->sibling->prev = thisw->prev;
- }
-
- mib_clear_myres(thisw);
-}
-
-/*****************************************************************************/
-
-void mib_clear_myres(mib_Widget *thisw)
-{
- ACE_OS::free(thisw->mib_class);
- ACE_OS::free(thisw->name);
-
- if ((thisw->mib_class_num < 1) || (thisw->mib_class_num > MI_NUMCLASSES))
- return;
-
- mwfuncs[thisw->mib_class_num].mib_delete(thisw);
- ACE_OS::free(thisw);
-}
-
-/*****************************************************************************/
-
-mib_Widget *mib_new_mib_Widget()
-{
- mib_Widget *thisw;
- thisw = (mib_Widget *)ACE_OS::malloc(sizeof(mib_Widget));
- thisw->me = NULL;
- thisw->mib_class_num = MIB_NULL;
- thisw->mib_selected = 0;
- thisw->mib_resizing = 0;
- thisw->myres = NULL;
- thisw->parent = NULL;
- thisw->sibling = NULL;
- thisw->prev = NULL;
- thisw->child = NULL;
- thisw->width = 0;
- thisw->height = 0;
- thisw->topAttachment = 0;
- thisw->bottomAttachment = 0;
- thisw->leftAttachment = 0;
- thisw->rightAttachment = 0;
- thisw->topOffset = 0;
- thisw->bottomOffset = 0;
- thisw->leftOffset = 0;
- thisw->rightOffset = 0;
-
- return thisw;
-}
-
-/*****************************************************************************/
-
-mib_Widget *mib_find_name(mib_Widget *temp, char *name)
-{
- mib_Widget *child = temp->child;
- mib_Widget *ret = NULL;
-
- if (!strcmp(temp->name, name))
- return temp;
-
- if (child != NULL)
- if (ret = mib_find_name(child, name))
- return ret;
-
- child = temp->sibling;
- if (child != NULL)
- if (ret = mib_find_name(child, name))
- return ret;
-
- return NULL;
-}
-
-/*****************************************************************************/
-
-Widget
-BuildMenu(Widget parent, int menu_type, char *menu_title, char menu_mnemonic,
- MenuItem *items)
-{
- Widget menu, cascade, widget;
- int i;
- XmString str;
-
- if (menu_type == XmMENU_PULLDOWN || menu_type == XmMENU_OPTION)
- menu = XmCreatePulldownMenu(parent, "_pulldown", NULL, 0);
- else if (menu_type == XmMENU_POPUP)
- menu = XmCreatePopupMenu(parent, "_popup", NULL, 0);
- else {
- XtWarning("Invalid menu type passed to BuildMenu()");
- return NULL;
- }
-
- /* Pulldown menus require a cascade button to be made */
- if (menu_type == XmMENU_PULLDOWN) {
- str = XmStringCreateSimple(menu_title);
- cascade = XtVaCreateManagedWidget(menu_title,
- xmCascadeButtonGadgetClass, parent,
- XmNsubMenuId, menu,
- XmNlabelString, str,
- XmNmnemonic, menu_mnemonic,
- NULL);
- XmStringFree(str);
- } else if (menu_type == XmMENU_OPTION) {
- /* Option menus are a special case, but not hard to handle */
- Arg args[2];
- str = XmStringCreateSimple(menu_title);
- XtSetArg(args[0], XmNsubMenuId, menu);
- XtSetArg(args[1], XmNlabelString, str);
- /* This really isn't a cascade, but thisw is the widget handle
- * we're going to return at the end of the function.
- */
- cascade = XmCreateOptionMenu(parent, menu_title, args, 2);
- XmStringFree(str);
- }
-
- /* Now add the menu items */
- for (i = 0; items[i].label != NULL; i++) {
- /* If subitems exist, create the pull-right menu by calling thisw
- * function recursively. Since the function returns a cascade
- * button, the widget returned is used..
- */
- if (items[i].subitems)
- if (menu_type == XmMENU_OPTION) {
- widget = XtVaCreateManagedWidget(items[i].label,
- *items[i].wclass, menu, NULL);
- items[i].subitems = (struct _menu_item *) widget;
- /* daeron mod (tm) :-) ... we now use thisw to pass back each
- widget we create to the mibMenu functions so that it can
- be stored as part of the mibMenu structure */
-
- /* XtWarning("You can't have submenus from option menu items.");
- continue;*/
- } else
- widget = BuildMenu(menu, XmMENU_PULLDOWN,
- items[i].label, items[i].mnemonic, items[i].subitems);
- else
- {
- widget = XtVaCreateManagedWidget(items[i].label,
- *items[i].wclass, menu,
- NULL);
- /* ditto here from above ... - Daeron mod (tm) */
- items[i].subitems = (struct _menu_item *) widget;
- }
-
- /* Whether the item is a real item or a cascade button with a
- * menu, it can still have a mnemonic.
- */
- if (items[i].mnemonic)
- XtVaSetValues(widget, XmNmnemonic, items[i].mnemonic, NULL);
-
- /* any item can have an accelerator, except cascade menus. But,
- * we don't worry about that; we know better in our declarations.
- */
- if (items[i].accelerator) {
- str = XmStringCreateSimple(items[i].accel_text);
- XtVaSetValues(widget,
- XmNaccelerator, items[i].accelerator,
- XmNacceleratorText, str,
- NULL);
- XmStringFree(str);
- }
-
- if (items[i].callback)
- XtAddCallback(widget,
- (items[i].wclass == &xmToggleButtonWidgetClass ||
- items[i].wclass == &xmToggleButtonGadgetClass)?
- XmNvalueChangedCallback : /* ToggleButton class */
- XmNactivateCallback, /* PushButton class */
- items[i].callback, items[i].callback_data);
- }
-
- /* for popup menus, just return the menu; pulldown menus, return
- * the cascade button; option menus, return the thing returned
- * from XmCreateOptionMenu(). This isn't a menu, or a cascade button!
- */
- return menu_type == XmMENU_POPUP? menu : cascade;
-}
-
-/*****************************************************************************/
-
-mib_Widget *mib_load_interface(Widget parent, char *from, int file_type)
-{
- mib_Buffer thiswfile;
- mib_Widget *thisw;
- FILE *infile;
- char *instring;
- char ch;
-
- thiswfile.buf_type = file_type;
-
- dpy = XtDisplay(parent);
-
- if ((file_type == MI_FROMFILE) || (file_type == MI_EDITFROMFILE))
- {
- if (!(infile = fopen(from,"r")))
- return NULL;
-
- ch = '\0';
- while ((ch != '\n')&&(!feof(infile))) /* throw away first line */
- ch = (char)fgetc(infile);
-
- thiswfile.buffer = (void *)infile;
- thiswfile.point = 0;
-
- if (!mib_load_Root(parent, &thisw, &thiswfile))
- {
- /* delete thisw */
- return NULL;
- }
- else
- {
- fclose(infile);
- return thisw;
- }
- }
- else
- if ((file_type == MI_FROMSTRING) || (file_type == MI_EDITFROMSTRING))
- {
- instring = from;
- if (instring == NULL)
- return NULL;
-
- thiswfile.buffer = (void *)instring;
- thiswfile.buflen = strlen(instring);
- thiswfile.point = 0;
-
- if (!mib_load_Root(parent, &thisw, &thiswfile))
- {
- /* delete thisw */
- return NULL;
- }
- else
- return thisw;
- }
- else
- return NULL;
-
-}
-
-/*****************************************************************************/
-
-int mib_load_mib_class(mib_Widget **thisw, mib_Widget *parent, char *name,
- char *iname, mib_Buffer *fin )
-{
- int namelen, editstate, count, set;
-
- if ((fin->buf_type == MI_EDITFROMFILE) ||
- (fin->buf_type == MI_EDITFROMSTRING))
- editstate = WEDIT;
- else
- editstate = WEMPTY;
-
- namelen = strlen(name);
- if (namelen < 2)
- return 0;
-
- name[namelen-1] = '\0';
- name[0] = ' ';
-
- count = 1;
-
- while (mwfuncs[count].name)
- {
- if (!strcmp(&(name[1]), mwfuncs[count].name))
- {
- *thisw = mwfuncs[count].mib_create(parent, iname, NULL, 0, 0, 0, 0,
- editstate);
- return 1;
- }
- count++;
- }
-
- (*thisw)->parent = (*thisw);
- return 1;
-}
-
-/*****************************************************************************/
-
-mib_Widget *mib_load_public(mib_Widget *root, mib_Widget *thisw, mib_Buffer *fin)
-{
- int got_line, done;
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- char valcp[MI_MAXSTRLEN];
- Arg args[20];
- int mynum, n;
-
- got_line = 1;
- done = 0;
-
- /* thisw loop reads basic info about Widget */
- while (got_line && (!done))
- {
- got_line = mib_read_line(fin, res, val);
- if (!strcmp(res,"Ref"))
- sscanf(val, "%d", &mynum);
- else
- if (!strcmp(res,"Widget"))
- {
- strcpy(valcp,val);
- done = 1;
- }
- }
-
- done = 0;
-
- while (got_line && (!done))
- {
- got_line = mib_read_line(fin, res, val);
- if (!strcmp(res, "Children"))
- n = 0;
- else
- if (!strcmp(res, "Parent")) /* don't support complete widget tree yet */
- n = 0;
- else
- if (!strcmp(res,"Public-"))
- n = 0;
- else
- if (!strcmp(res,"Name"))
- {
- val[strlen(val)-1] = '\0';
- mib_load_mib_class(&thisw, root, valcp, &(val[1]), fin);
- thisw->name = (char *)ACE_OS::malloc(strlen(val));
- sprintf(thisw->name,"%s",&(val[1]));
- thisw->mib_mynum = mynum;
- done = 1;
- }
- else
- return 0;
- }
-
- if (!got_line)
- return NULL;
-
- done = 0;
-
- /* second loop reads public info */
- while (got_line && (!done))
- {
- got_line = mib_read_line(fin, res, val);
- if (!strcmp(res,"Xmwidth"))
- sscanf(val,"%d",&(thisw->width));
- else
- if (!strcmp(res,"Xmheight"))
- sscanf(val,"%d",&(thisw->height));
- else
- if (!strcmp(res,"XmtopAttachment"))
- sscanf(val,"%d",&(thisw->topAttachment));
- else
- if (!strcmp(res,"XmbottomAttachment"))
- sscanf(val,"%d",&(thisw->bottomAttachment));
- else
- if (!strcmp(res,"XmleftAttachment"))
- sscanf(val,"%d",&(thisw->leftAttachment));
- else
- if (!strcmp(res,"XmrightAttachment"))
- sscanf(val,"%d",&(thisw->rightAttachment));
- else
- if (!strcmp(res,"XmtopOffset"))
- sscanf(val,"%d",&(thisw->topOffset));
- else
- if (!strcmp(res,"XmbottomOffset"))
- sscanf(val,"%d",&(thisw->bottomOffset));
- else
- if (!strcmp(res,"XmleftOffset"))
- sscanf(val,"%d",&(thisw->leftOffset));
- else
- if (!strcmp(res,"XmrightOffset"))
- sscanf(val,"%d",&(thisw->rightOffset));
- else
- if (!strcmp(res,"Private-"))
- done = 1;
- }
-
- n = 0;
- if ((fin->buf_type == MI_EDITFROMFILE) ||
- (fin->buf_type == MI_EDITFROMSTRING))
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, thisw->leftOffset); n++;
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, thisw->topOffset); n++;
- if (thisw == root)
- {
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightOffset, thisw->rightOffset); n++;
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomOffset, thisw->bottomOffset); n++;
- }
- }
- else
- {
- if (thisw->leftAttachment)
- {
- XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNleftOffset, thisw->leftOffset);n++;
- }
- if (thisw->topAttachment)
- {
- XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNtopOffset, thisw->topOffset);n++;
- }
- if (thisw->bottomAttachment)
- {
- XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNbottomOffset, thisw->bottomOffset);n++;
- }
- if (thisw->rightAttachment)
- {
- XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg (args[n], XmNrightOffset, thisw->rightOffset);n++;
- }
- }
-
- XtSetArg (args[n], XmNwidth, thisw->width); n++;
- XtSetArg (args[n], XmNheight, thisw->height); n++;
-
- XtSetValues(thisw->me, args, n);
-
- return thisw;
-}
-
-/*****************************************************************************/
-
-int mib_load_private(mib_Widget *thisw, mib_Buffer *fin)
-{
-
- if (thisw->mib_class_num == MIB_NULL)
- return 1;
-
- if ((thisw->mib_class_num < 1) || (thisw->mib_class_num > MI_NUMCLASSES))
- return 0;
-
- mwfuncs[thisw->mib_class_num].mib_load(thisw, fin);
-
- return 1;
-}
-
-/*****************************************************************************/
-
-int mib_load_Root(Widget parent, mib_Widget **thisw, mib_Buffer *fin)
-{
-
- char res[MI_MAXSTRLEN];
- char val[MI_MAXSTRLEN];
- char name[MI_MAXSTRLEN];
- int num_widgets, count, n, got_line;
- Arg args[20];
- XGCValues gcvals;
- XtGCMask val_mask;
- mib_Widget *temp;
-
- got_line = mib_read_line(fin, res, val);
- if (!strcmp(res,"TotalWidgets"))
- sscanf(val, "%d", &num_widgets);
- else
- return 0;
-
- (*thisw) = mib_new_mib_Widget();
- (*thisw)->mib_class = (char*)ACE_OS::malloc(9);
- sprintf((*thisw)->mib_class,"RootForm");
-
-/* (*thisw)->me = XmCreateForm(parent, "MainForm", args, 0); */
-
- (*thisw)->me = parent;
-
- if (!mib_load_public((*thisw), (*thisw), fin))
- return 0;
-
- /* we don't expect any private resources for the root widget */
-
- got_line = mib_read_line(fin, res, val);
- if (strcmp(res,"EndWidget."))
- return 0;
-
-/* XtManageChild((*thisw)->me);
-*/
- XtVaSetValues((*thisw)->me, XmNresizePolicy, XmRESIZE_NONE, NULL);
-
- count = num_widgets - 1;
- while (count > 0)
- {
-
- if (!(temp = mib_load_public((*thisw), temp, fin)))
- {
- /* delete temp */
- return 0;
- }
-
- if (!mib_load_private(temp,fin))
- {
- /* delete temp */
- return 0;
- }
- count--;
-
- }
-
- mib_reset_size((*thisw));
-
- XtVaSetValues((*thisw)->me, XmNresizePolicy, XmRESIZE_ANY, NULL);
-
- val_mask = (long)0;
- mib_gc = XtGetGC((*thisw)->me, val_mask, &gcvals);
-
- return 1;
-}
-
-/*****************************************************************************/
-
-int mib_read_line(mib_Buffer *bufin, char *res, char *val)
-{
- FILE *fin;
- char *strin;
- char ch;
- int count, mark;
- char inbuf[MI_MAXSTRLEN];
-
- if ((bufin->buf_type == MI_FROMFILE) || (bufin->buf_type == MI_EDITFROMFILE))
- {
- fin = (FILE *)bufin->buffer;
- ch = '\0';
- count = 0;
- mark = 0;
- while ((ch != '\n')&&(!feof(fin))&&(count<MI_MAXSTRLEN))
- {
- ch = (char)fgetc(fin);
- if ((mark == 0) && (ch == ':'))
- mark = count;
- if ((ch != '\\')&&(ch != '\n'))
- {
- inbuf[count] = ch;
- count++;
- }
- }
- if (feof(fin))
- return 0;
- inbuf[count] = '\0';
- if (count > 0)
- {
- if (inbuf[count-1] == 'n')
- inbuf[count-1] = '\0';
- }
- else
- return 0;
-
- }
- else
- if ((bufin->buf_type == MI_FROMSTRING) ||
- (bufin->buf_type == MI_EDITFROMSTRING))
- {
- strin = (char *)bufin->buffer;
- count = bufin->point;
- mark = 0;
-
- if (count >= bufin->buflen)
- return 0;
-
- while ((strin[count] != '\n') && (count < bufin->buflen))
- {
- if ((mark == 0) && (strin[count] == ':'))
- mark = count;
- count++;
- }
-
- strin[count] = '\0';
- if (count >= bufin->buflen)
- return 0;
- sprintf(inbuf,"%s",&(strin[bufin->point]));
- strin[count] = '\n';
- if (mark != 0)
- mark -= bufin->point;
- bufin->point = count+1;
- }
- else
- return 0;
-
- if (mark == 0)
- {
- sprintf(res,"%s",inbuf);
- sprintf(val,"\0");
- }
- else
- {
- inbuf[mark] = '\0';
- sprintf(res,"%s",inbuf);
- inbuf[mark] = ' ';
- if ((int)(strlen(inbuf)-mark) > 1)
- sprintf(val,"%s",&(inbuf[mark+2]));
- else
- sprintf(val,"\0");
- }
-
- return 1;
-}
-
-/*****************************************************************************/
-
-void mib_reset_size(mib_Widget *temp)
-{
- Arg args[5];
- int n;
-
- mib_Widget *child = temp->child;
-
- if (temp->mib_class_num != MIB_NULL)
- {
- n = 0;
- XtSetArg (args[n], XmNwidth, temp->width); n++;
- XtSetArg (args[n], XmNheight, temp->height); n++;
-
- XtSetValues(temp->me, args, n);
- }
-
- if (child != NULL)
- mib_reset_size(child);
-
- child = temp->sibling;
- if (child != NULL)
- mib_reset_size(child);
-}
-
-/*****************************************************************************/
-
-#ifdef __cplusplus
-void mib_set_eventhandlers(void a(Widget, XtPointer,
- XEvent *, Boolean * ),
- void b( Widget, XtPointer,
- XEvent *, Boolean* ),
- void c(Widget, XtPointer,
- XEvent *, Boolean *)
- )
-#else
-void mib_set_eventhandlers(void * a, void * b, void * c)
-#endif
-{
- mib_events.mib_pick_mib_Widget = a;
- mib_events.mib_move_mib_Widget = b;
- mib_events.mib_unpick_mib_Widget = c;
-}
-
-/*****************************************************************************/
-
-void mib_apply_eventhandlers(Widget thisw, mib_Widget *actual)
-{
- XtAddEventHandler(thisw, ButtonPressMask, FALSE,
- mib_events.mib_pick_mib_Widget, (XtPointer)actual);
- XtAddEventHandler(thisw, Button3MotionMask, FALSE,
- mib_events.mib_move_mib_Widget, (XtPointer)actual);
- XtAddEventHandler(thisw, ButtonReleaseMask, FALSE,
- mib_events.mib_unpick_mib_Widget, (XtPointer)actual);
-
-}
-
-/*****************************************************************************/
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h
deleted file mode 100644
index 3b20908a333..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with this file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-#include <stdio.h>
-#include <X11/Intrinsic.h>
-#include <X11/Shell.h>
-#include <Xm/Xm.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/RowColumn.h>
-#include <Xm/MainW.h>
-#include <Xm/Label.h>
-#include <Xm/PushB.h>
-#include <Xm/PushBG.h>
-#include <Xm/ToggleB.h>
-#include <Xm/ToggleBG.h>
-#include <Xm/DrawingA.h>
-#include <Xm/CascadeBG.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/Frame.h>
-#include <Xm/BulletinB.h>
-#include <Xm/Scale.h>
-#include <Xm/ScrollBar.h>
-#include <Xm/Form.h>
-#include <Xm/List.h>
-#include <Xm/FileSB.h>
-#include <Xm/AtomMgr.h>
-#include <Xm/Protocols.h>
-#include <Xm/MwmUtil.h>
-#include "ace/OS.h"
-
-
-/* Structure of mib_Widget */
-/*****************************************************************************/
-
-typedef struct _mib_Widget {
- char *mib_class; /* name of mib class (Button, TextBox, etc..)*/
- int mib_class_num; /* class number for ez reference :) */
- int mib_mynum; /* numbering for storage format */
- Widget me; /* Xt widget */
- int mib_selected; /* is selected */
- int mib_resizing; /* is resizing 1, or being moved 0 */
- int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */
- int mib_allowresize; /* can this widget be resized ? */
-
- int clkx, clky; /* where user clicked */
-
- void *myres; /* my resources (different for each widget) */
-
- char *name; /* reference name of this widget */
- int width, height; /* width and height */
-
- int topAttachment, bottomAttachment, leftAttachment, rightAttachment;
- /* attachments 1=attached 0=not-attached */
-
- int topOffset, bottomOffset, leftOffset, rightOffset;
- /* offsets if attached */
-
- struct _mib_Widget *parent; /* pointer to parent */
- struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */
- struct _mib_Widget *prev; /* previous sibling or parent */
- struct _mib_Widget *child; /* linked list of children widgets */
-} mib_Widget;
-
-/* mib_Buffer structure */
-/*****************************************************************************/
-
-typedef struct _mib_Buffer {
- void *buffer; /* pointer to either a file or a char string */
- int buf_type; /* type of buffer (defined above) */
- int point; /* pointer for string */
- int buflen; /* length of string buffer */
-} mib_Buffer;
-
-/* mib_Widget functions */
-/*****************************************************************************/
-
-void mib_add_mib_Widget(mib_Widget *, mib_Widget *);
-void mib_add_backward(mib_Widget *, mib_Widget *);
-void mib_remove_mib_Widget(mib_Widget *);
-void mib_clear_myres(mib_Widget *);
-#ifdef __cplusplus
-mib_Widget *mib_new_mib_Widget();
-#else
-mib_Widget *mib_new_mib_Widget();
-#endif
-mib_Widget *mib_find_name(mib_Widget *, char *);
-mib_Widget *mib_load_interface(Widget, char *, int);
-int mib_count_all(mib_Widget *, int);
-int mib_load_Root(Widget, mib_Widget **, mib_Buffer *);
-mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *);
-int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *,
- mib_Buffer *);
-int mib_load_private(mib_Widget *, mib_Buffer *);
-void mib_reset_size(mib_Widget *);
-int mib_read_line(mib_Buffer *, char *, char *);
-#ifdef __cplusplus
-void mib_set_eventhandlers(void (a)(...), void (b)(...), void (c)(...));
-#else
-void mib_set_eventhandlers(void *, void *, void *);
-#endif
-void mib_apply_eventhandlers(Widget, mib_Widget *);
-
-/* supporting functions and structures */
-/*****************************************************************************/
-
-typedef struct _menu_item {
- char *label;
- WidgetClass *wclass;
- char mnemonic;
- char *accelerator;
- char *accel_text;
-#ifdef __cplusplus
- void (*callback)(Widget,void*,void*);
-#else
- void (*callback)();
-#endif
- XtPointer callback_data;
- struct _menu_item *subitems;
-} MenuItem;
-
-Widget BuildMenu(Widget, int, char *, char, MenuItem *);
-
-/* mib class numbers */
-
-#define MIB_NULL 0
-#define MIB_TEXTBOX 1
-#define MIB_BUTTON 2
-#define MIB_TOGGLE 3
-#define MIB_RADIOBOX 4
-#define MIB_DRAWINGAREA 5
-#define MIB_LABEL 6
-#define MIB_FRAME 7
-#define MIB_SCROLLBAR 8
-#define MIB_TEXTBIG 9
-#define MIB_LIST 10
-#define MIB_SCALE 11
-#define MIB_MENU 12
-
-/* number of classes */
-#define MI_NUMCLASSES 12
-
-/* for specifying creation of a widget with
- default private values, no values at all (empty),
- or no values and editable */
-
-#define WDEFAULT 1
-#define WEMPTY 2
-#define WEDIT 3
-
-/* for specifing whether we are loading an
- interface from a file or from a string and whether it
- is editable :) */
-
-#define MI_FROMFILE 1
-#define MI_EDITFROMFILE 2
-#define MI_FROMSTRING 3
-#define MI_EDITFROMSTRING 4
-
-#define MI_MAXSTRLEN 200 /* maximum string length */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h
deleted file mode 100644
index 778e2338682..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1994 The Geometry Center; University of Minnesota
- 1300 South Second Street; Minneapolis, MN 55454, USA;
-
-This file is free software; you can redistribute it and/or modify it only
-under the the terms of the GNU GENERAL PUBLIC LICENSE which should be
-included along with this file. This software may be obtained via anonymous
-ftp from geom.umn.edu; email: software@geom.umn.edu. */
-
-/* Author: Daeron Meyer */
-
-/* Structure of mib_TextBox */
-/*****************************************************************************/
-
-typedef struct _mib_TextBox {
- char *init_contents; /* initial text contents */
-
-} mib_TextBox;
-
-/* mib_TextBox functions */
-/*****************************************************************************/
-mib_Widget *mib_create_TextBox(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_TextBox(mib_Widget *);
-void mib_save_TextBox(mib_Widget *, FILE *);
-int mib_load_TextBox(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_Button */
-/*****************************************************************************/
-
-typedef struct _mib_Button {
- char *label; /* label on button */
-
-} mib_Button;
-
-/* mib_Button functions */
-/*****************************************************************************/
-mib_Widget *mib_create_Button(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_Button(mib_Widget *);
-void mib_save_Button(mib_Widget *, FILE *);
-int mib_load_Button(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_Toggle */
-/*****************************************************************************/
-
-typedef struct _mib_Toggle {
- char *label; /* label on toggle */
- int isize;
-
-} mib_Toggle;
-
-/* mib_Toggle functions */
-/*****************************************************************************/
-mib_Widget *mib_create_Toggle(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_Toggle(mib_Widget *);
-void mib_save_Toggle(mib_Widget *, FILE *);
-int mib_load_Toggle(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_RadioBox */
-/*****************************************************************************/
-typedef struct _mib_RadioBox {
- char **labels; /* array of labels */
- int numlabel; /* number of labels */
- Widget *buttons; /* pointers to each button */
-
-} mib_RadioBox;
-
-/* mib_RadioBox functions */
-
-/*****************************************************************************/
-mib_Widget *mib_create_RadioBox(mib_Widget *, char *, char*, int, int, int,
- int, int);
-void mib_delete_RadioBox(mib_Widget *);
-void mib_save_RadioBox(mib_Widget *, FILE *);
-int mib_load_RadioBox(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_DrawingArea */
-/*****************************************************************************/
-typedef struct _mib_DrawingArea {
- int nothing; /* couldn't think of anything yet */
-
-} mib_DrawingArea;
-
-/* mib_DrawingArea functions */
-/*****************************************************************************/
-mib_Widget *mib_create_DrawingArea(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_DrawingArea(mib_Widget *);
-void mib_save_DrawingArea(mib_Widget *, FILE *);
-int mib_load_DrawingArea(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_Label */
-/*****************************************************************************/
-typedef struct _mib_Label {
- char *label; /* text in label */
-
-} mib_Label;
-
-/* mib_Label functions */
-/*****************************************************************************/
-mib_Widget *mib_create_Label(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_Label(mib_Widget *);
-void mib_save_Label(mib_Widget *, FILE *);
-int mib_load_Label(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_Frame */
-/*****************************************************************************/
-typedef struct _mib_Frame {
- int shadowtype; /* 0 = in, 1 = out, 2 = etched_in, 3 = etched_out */
-
-} mib_Frame;
-
-/* mib_Frame functions */
-/*****************************************************************************/
-mib_Widget *mib_create_Frame(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_Frame(mib_Widget *);
-void mib_save_Frame(mib_Widget *, FILE *);
-int mib_load_Frame(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_ScrollBar */
-/*****************************************************************************/
-typedef struct _mib_ScrollBar {
- int orientation;
-
-} mib_ScrollBar;
-
-/* mib_ScrollBar functions */
-/*****************************************************************************/
-mib_Widget *mib_create_ScrollBar(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_ScrollBar(mib_Widget *);
-void mib_save_ScrollBar(mib_Widget *, FILE *);
-int mib_load_ScrollBar(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_TextBig */
-/*****************************************************************************/
-typedef struct _mib_TextBig {
- int nothing; /* couldn't think of anything yet */
-
-} mib_TextBig;
-
-/* mib_TextBig functions */
-/*****************************************************************************/
-mib_Widget *mib_create_TextBig(mib_Widget *, char *, char *, int, int, int, int, int);
-void mib_delete_TextBig(mib_Widget *);
-void mib_save_TextBig(mib_Widget *, FILE *);
-int mib_load_TextBig(mib_Widget *, mib_Buffer *);
-
-
-/* Structure of mib_List */
-/*****************************************************************************/
-typedef struct _mib_List {
- Widget real_list;
-
-} mib_List;
-
-/* mib_List functions */
-/*****************************************************************************/
-mib_Widget *mib_create_List(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_List(mib_Widget *);
-void mib_save_List(mib_Widget *, FILE *);
-int mib_load_List(mib_Widget *, mib_Buffer *);
-
-/* Structure of mib_Scale */
-/*****************************************************************************/
-typedef struct _mib_Scale {
- int orientation;
-
-} mib_Scale;
-
-/* mib_Scale functions */
-/*****************************************************************************/
-mib_Widget *mib_create_Scale(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_Scale(mib_Widget *);
-void mib_save_Scale(mib_Widget *, FILE *);
-int mib_load_Scale(mib_Widget *, mib_Buffer *);
-
-/* Structure of mib_Menu */
-/*****************************************************************************/
-typedef struct _mib_Menu {
- int numitems; /* number of items in menu*/
- MenuItem *my_menu; /* array of menu items */
- Widget *items; /* pointers to each item */
-
-} mib_Menu;
-
-/* mib_Menu functions */
-/*****************************************************************************/
-mib_Widget *mib_create_Menu(mib_Widget *, char *, char *, int, int, int,
- int, int);
-void mib_delete_Menu(mib_Widget *);
-void mib_save_Menu(mib_Widget *, FILE *);
-int mib_load_Menu(mib_Widget *, mib_Buffer *);
-
-/*****************************************************************************/
-
-typedef struct _mib_widget_funcs {
- char *name;
-#ifdef __cplusplus
- mib_Widget *(*mib_create)(mib_Widget *parent, char *name, char *label,
- int posx, int posy, int width, int height, int mib_fill);
- void (*mib_delete)(mib_Widget *thisw);
- void (*mib_save)(mib_Widget *thisw, FILE *fout);
- int (*mib_load)(mib_Widget *thisw, mib_Buffer *fin);
-#else
- mib_Widget *(*mib_create)();
- void (*mib_delete)();
- void (*mib_save)();
- int (*mib_load)();
-#endif
-} mib_widget_funcs;
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp
deleted file mode 100644
index b357975017b..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp
+++ /dev/null
@@ -1,2026 +0,0 @@
-// $Id$
-
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#include "Globals.h"
-
-int Mpeg_Global::parentpid = -1;
-int Mpeg_Global::listenSocketIn = -1;
-int Mpeg_Global::listenSocketUn = -1;
-struct linger Mpeg_Global::linger = {1,1};
-int Mpeg_Global::live_audio = 0;
-int Mpeg_Global::live_video = 0; /* 0 - no, 1 - to open, 2 - opened */
-int Mpeg_Global::drift_ppm = 0; /* clock drift in ppm */
-int Mpeg_Global::session_limit = SESSION_NUM;
-int Mpeg_Global::session_num = 0;
-int Mpeg_Global::rttag = 0;
-
-int Video_Timer_Global::timerHeader = 0;
-int Video_Timer_Global::timerGroup = 0;
-int Video_Timer_Global::timerFrame = 0;
-int Video_Timer_Global::timerOn = 0;
-int Video_Timer_Global::timerAdjust = 0;
-int Video_Timer_Global::preTimerVal = 0;
-
-// Initialize the nasty int's, doubles and their friends.
-
-Video_Global::Video_Global (void)
-{
- live_source = 0;
- video_format = 0;
-
- pkts_sent = 0;
- start_time = 0;
-
- conn_tag = 0;
-
- normalExit = 1;
-
- serviceSocket = 0;
- videoSocket = -1;
-
- ACE_OS::memset (videoFile,
- 0,
- PATH_SIZE);
- fp = 0;
-
- needHeader = 0;
-
- lastRef [0] = lastRef [1] = 0;
-
- lastRefPtr = 0;
- currentUPF = 0;
- addedUPF = 0;
- addedSignals = 0;
- VStimeAdvance = 0;
- fps = 0; /* current frames-per-second: playback speed */
- frameRateLimit = 0;
-
- packet = 0;
- packetBufSize = 0;
- msgsn = 0;
- packetsn = 0;
- msgsize = 0;
-
- precmd = 0;
- cmd = 0;
- cmdsn = 0;
- nextFrame = 0;
- nextGroup = 0;
- firstPatternSize = 0;
- firstSendPattern = 0;
- sendPatternGops = 0;
- ACE_OS::memset (sendPattern,
- 0,
- PATTERN_SIZE);
-
-#ifdef STAT
- framesSent = 0;
-#endif /* STAT */
-
- fileSize = 0;
- maxS = 0;
- maxG = 0;
- maxI = 0;
- maxP = 0;
- maxB = 0;
- minS = 0x7fffffff;
- minG = 0x7fffffff;
- minI = 0x7fffffff;
- minP = 0x7fffffff;
- minB = 0x7fffffff;
-
- numS = 0;
- numG = 0;
- numF = 0;
- numI = 0;
- numP = 0;
- numB = 0;
-
- averageFrameSize = 0;
- horizontalSize = 0;
- verticalSize = 0;
- pelAspectRatio = 0;
- pictureRate = 0;
- vbvBufferSize = 0;
- firstGopFrames = 0;
- patternSize = 0;
-
- ACE_OS::memset (pattern,
- 0,
- PATTERN_SIZE);
-
- // struct pointers
- systemHeader = 0;
-
- gopTable = 0;
-
- frameTable = 0;
-
- // playvideo local vars
-
- preGroup = -1;
- preHeader = -1;
- preFrame = -1;
-
- fast_preGroup = -1;
- fast_preHeader= -1;
-}
-
-int
-Video_Global::FBread (char *buf, int size)
-{
- int res;
-
- while ((res = (this->conn_tag >= 0 ? wait_read_bytes (this->videoSocket, buf, size) :
- read (this->videoSocket, buf, size))) == -1)
- {
- if (errno == EINTR) {errno = 0; continue; }
- if (errno == EPIPE || errno == ECONNRESET) exit (0);
- perror ("VS reads Feedback this->packet");
- return -1;
- }
-
- if (res < size)
- {
- if (res)
- // @@ Can you please convert the printfs() and perrors to use
- // the appropriate ACE_DEBUG and ACE_ERROR macros?
- fprintf (stderr, "VS warn: FBread () res %dB < size %dB\n", res, size);
- return -1;
- }
- return 0;
-}
-
-// send a given this->packet pointed by 'this->packet' to the network.
-
-int
-Video_Global::send_to_network (int timeToUse)
-{
- int count = 0;
- VideoMessage * msghd = (VideoMessage *) (((char *) this->packet) - sizeof (VideoMessage));
- int sent = 0;
- int packetSize = ntohl (this->packet->dataBytes);
-
- msghd->packetsn = htonl (this->packetsn ++);
- msghd->packetSize = htonl (packetSize + sizeof (* this->packet));
- /*
- fprintf (stderr, "VS to send pkt %d of size %d.\n",
- ntohl (msghd->this->packetsn), ntohl (msghd->this->packetSize));
- */
-
- {
- VideoMessage * msg = NULL;
- int size = packetSize + sizeof (* this->packet); /* msghd->this->packetSize */
- int offset = 0;
- int targetTime;
-
- if (size > this->msgsize)
- {
- if (!timeToUse)
- {
- timeToUse = (this->msgsize + sizeof (*msg) + 28) * 2;
- /*
- set the max network as 500KB.
- 28 - UDP header size
- */
- /*
- fprintf (stderr, "computed timeToUse %d. ", timeToUse);
- */
- }
- else
- {
- timeToUse = (timeToUse * 7) >> 3;
- /*
- fprintf (stderr, "preset timeToUse %d.", timeToUse);
- */
- timeToUse /= (size + this->msgsize - 1) / this->msgsize;
- timeToUse = min (timeToUse, (this->msgsize + sizeof (*msg) + 28) * 100);
- /* limit min network bandwidth = 10K */
- }
-
- }
- while (size > 0)
- {
- int segsize, sentsize;
- int resent = 0;
-
- if (msg == NULL) { /* first message for current this->packet */
- count = 0;
- msg = msghd;
- targetTime = get_usec ();
- }
- else {
-#if 0
- /* the select () is not precise enough for being used here*/
- int sleepTime;
- targetTime += timeToUse;
- sleepTime = get_duration (get_usec (), targetTime);
- if (sleepTime >= 5000) { /* resolution of timer is 10,000 usec */
- usleep (sleepTime); /* not first message, wait for a while */
- }
-#endif
- /*
- count ++;
- if (! (count % 10)) usleep (10000);
- */
- msg = (VideoMessage *) ((char *)msg + this->msgsize);
- memcpy ((char *)msg, (char *)msghd, sizeof (* msg));
- }
- msg->msgsn = htonl (this->msgsn++);
- msg->msgOffset = htonl (offset);
- msg->msgSize = htonl (min (size, this->msgsize));
-
- segsize = min (size, this->msgsize)+sizeof (*msg);
- if (this->conn_tag != 0) { /* this->packet stream */
- while ((sentsize = write (this->videoSocket, (char *)msg, segsize)) == -1) {
- if (errno == EINTR)
- continue;
- if (errno == ENOBUFS) {
- if (resent) {
- perror ("Warning, pkt discarded because");
- sent = -1;
- break;
- }
- else {
- resent = 1;
- perror ("VS to sleep 5ms");
- usleep (5000);
- continue;
- }
- }
- if (errno != EPIPE) {
- fprintf (stderr, "VS error on send this->packet %d of size %d ",
- this->msgsn-1, min (size, this->msgsize)+sizeof (*msg));
- perror ("");
- }
- exit (errno != EPIPE);
- }
- }
- else {
- sentsize = wait_write_bytes (this->videoSocket, (char *)msg, segsize);
- if (sentsize == -1) {
- if (errno != EPIPE) {
- fprintf (stderr, "VS error on send this->packet %d of size %d ",
- this->msgsn-1, min (size, this->msgsize)+sizeof (*msg));
- perror ("");
- }
- exit (errno != EPIPE);
- }
- }
- if (sentsize < segsize) {
- SFprintf (stderr, "VS warning: message size %dB, sent only %dB\n",
- segsize, sentsize);
- }
- if (sent == -1)
- break;
- /*
- fprintf (stderr, "VS: message %d of size %d sent.\n",
- this->msgsn-1, min (size, this->msgsize)+sizeof (*msg));
- */
- size -= this->msgsize;
- offset += this->msgsize;
- }
- }
- /*
- fprintf (stderr, "sent = %d\n", sent);
- */
- if (!sent) this->pkts_sent ++;
- return sent;
-}
-
-/*
- * send a this->packet with given this->systemHeader (optional), gop (optional) and frame.
- *
- * sh - system header id, if -1, then no system header will be sent.
- * otherwise, only when frame == 0, the given system header will be sent.
- * gop - group of pictures, gop header will be sent when frame == 0
- * (first I frame );
- * frame - frame to be sent, offset internal to given gop.
- */
-
-/* returns: 0 - this->packet sent, -1 - this->packet not sent (failed) */
-
-int
-Video_Global::SendPacket (int shtag, int gop, int frame, int timeToUse)
-/* frame maybe out of range (PLAY, STEP), in this case, END_SEQ is sent
- to force display of last frame in VD */
-{
- char * buf = ((char *) this->packet) + sizeof (VideoPacket);
- int f = this->gopTable[gop].previousFrames + frame;
- int sh = this->gopTable[gop].systemHeader;
- /*
- SFprintf (stderr, "VS to send this->packet gop-%d, frame-%d.\n", gop, frame);
- */
-
- this->packet->currentUPF = ntohl (this->currentUPF);
-
- if (frame >= this->gopTable[gop].totalFrames)
- {
- this->packet->cmd = htonl (this->cmd);
- this->packet->cmdsn = htonl (this->cmdsn);
- this->packet->sh = htonl (sh);
- this->packet->gop = htonl (gop);
- this->packet->frame = htonl (this->numF);
- this->packet->display = htonl (this->numF-1);
- this->packet->future = htonl ((unsigned)-1);
- this->packet->past = htonl ((unsigned)-1);
- this->packet->dataBytes = htonl (4);
- * (int*) ((char*)this->packet + sizeof (*this->packet)) = htonl (SEQ_END_CODE);
-
- return send_to_network (timeToUse);
- }
-
- if (frame)
- shtag = 0;
- else if (this->needHeader)
- {
- shtag = 1;
- this->needHeader = 0;
- }
-
- this->packet->cmd = htonl (this->cmd);
- this->packet->cmdsn = htonl (this->cmdsn);
- this->packet->sh = htonl (sh);
- this->packet->gop = htonl (gop);
- this->packet->frame = htonl (f);
- if (this->frameTable[f].type == 'B')
- {
- int pre1 = -1, pre2 = -1, i = f;
- while (i>0)
- if (this->frameTable[--i].type != 'B')
- {
- pre1 = i;
- break;
- }
- while (i>0)
- if (this->frameTable[--i].type != 'B')
- {
- pre2 = i;
- break;
- }
- if (pre2 == -1)
- {
- /*
- fprintf (stderr,
- "frame %d-%d (%d) is a B without past ref, no to be sent.\n",
- gop, frame, f);
- */
- return -1;
- }
- if (pre1 != this->lastRef[this->lastRefPtr] ||
- pre2 != this->lastRef[1 - this->lastRefPtr])
- {
- /*
- fprintf (stderr,
- "send of B frame %d gaveup for past %d/future %d ref not sent.\n",
- f, pre2, pre1);
- */
- return -1;
- }
- this->packet->display = htonl (f);
- this->packet->future = htonl (pre1);
- this->packet->past = htonl (pre2);
- }
- else
- {
- int next = f;
- int pre = f;
-
- while (next < this->numF && this->frameTable[++next].type == 'B');
- while (pre > 0 && this->frameTable[--pre].type == 'B');
- if (this->frameTable[f].type == 'P' && pre != this->lastRef[this->lastRefPtr])
- {
- /*
- fprintf (stderr,
- "send of P frame %d gaveup for past ref %d not sent.\n",
- f, pre);
- fprintf (stderr, "ref0=%d, ref1=%d, ptr=%d.\n",
- this->lastRef[0], this->lastRef[1], this->lastRefPtr);
- */
- return -1;
- }
- this->packet->display = htonl (next);
- this->packet->future = htonl ((unsigned)-1);
- this->packet->past = htonl (this->frameTable[f].type == 'P' ? pre : (unsigned)-1);
- }
- {
- char * ptr = buf;
- int size = 0, offset = 0, i;
- if (shtag) /* send system header */
- {
- size = this->systemHeader[sh].size;
- FileRead (this->systemHeader[sh].offset, ptr, size);
- ptr += size;
- }
- if (!frame) /* send gop header */
- {
- size = this->gopTable[gop].headerSize;
- FileRead (this->gopTable[gop].offset, ptr, size);
- ptr += size;
- }
- size = this->frameTable[f].size;
- for (i=this->gopTable[gop].previousFrames; i<f; i++)
- offset += this->frameTable[i].size;
- FileRead ((this->gopTable[gop].firstIoffset + offset), ptr, size);
- ptr += size;
- this->packet->dataBytes = htonl (ptr - buf);
- }
-
- {
- int sent = send_to_network (timeToUse);
- if (!sent)
- {
- /*
- fprintf (stderr, "%c%d\n", this->frameTable[f].type, f);
- fprintf (stderr, "%c frame %d sent.\n", this->frameTable[f].type, f);
- */
- if (this->frameTable[f].type != 'B')
- {
- this->lastRefPtr = 1 - this->lastRefPtr;
- this->lastRef[this->lastRefPtr] = f;
- }
- }
- return sent;
- }
-}
-
-int
-Video_Global::CmdRead (char *buf, int psize)
-{
- int res = wait_read_bytes (this->serviceSocket,
- buf,
- psize);
- if (res == 0) return (1);
- if (res == -1) {
- fprintf (stderr, "VS error on read this->cmdSocket, size %d", psize);
- perror ("");
- return (-1);
- }
- return 0;
-}
-
-int
-Video_Global::CmdWrite (char *buf, int size)
-{
- int res = wait_write_bytes (this->serviceSocket, buf, size);
- if (res == -1) {
- if (errno != EPIPE) perror ("VS writes to this->serviceSocket");
- return (-1);
- }
- return 0;
-}
-
-int
-Video_Global::PLAYliveVideo (PLAYpara * para)
-{
- int doscale;
- int count;
- int first_frame;
- int frame = para->nextFrame;
- int nfds = (this->serviceSocket > this->videoSocket ? this->serviceSocket : this->videoSocket) + 1;
- struct fd_set read_mask;
- struct timeval tval = {0, 0};
- double ratio;
- int result;
-
- this->currentUPF = (int) (1000000.0 / this->fps); /* ignore para.usecPerFrame */
- if (this->frameRateLimit < this->fps) {
- doscale = 1;
- ratio = min (this->frameRateLimit, this->fps) / this->fps;
- first_frame = frame;
- count = 0;
- /*
- fprintf (stderr, "doscale %d, this->frameRateLimit %5.2f, this->fps %5.2f, ratio %5.2f\n",
- doscale, this->frameRateLimit, this->fps, ratio);
- */
- }
- else doscale = 0;
- StartPlayLiveVideo ();
-
- for (;;) {
-
- if (doscale) {
- for (;;) {
- if ((int) ((frame - first_frame) * ratio + 0.5) < count) frame ++;
- else break;
- }
- count ++;
- }
- SendPicture (&frame);
- frame ++;
-
- FD_ZERO (&read_mask);
- FD_SET (this->serviceSocket, &read_mask);
- FD_SET (this->videoSocket, &read_mask);
-
- // @@ Is this code actually used anymore, i.e., do we need to
- // ACE-ify it?
-
-#ifdef _HPUX_SOURCE
- if (select (nfds, (int *)&read_mask, NULL, NULL, &tval) == -1)
-#else
- if (select (nfds, &read_mask, NULL, NULL, &tval) == -1)
-#endif
- {
- if (errno == EINTR)
- continue;
- perror ("Error - VS select between service and video sockets");
- StopPlayLiveVideo ();
- exit (1);
-
- }
- if (FD_ISSET (this->serviceSocket, &read_mask)) /* stop */
- {
- u_char tmp;
- result = CmdRead ((char *)&tmp, 1);
- if (result != 0)
- return result;
- if (tmp == CmdCLOSE) {
- StopPlayLiveVideo ();
- exit (0);
- }
- else if (tmp == CmdSTOP) {
- this->cmd = tmp;
- /*
- fprintf (stderr, "VS: this->CmdSTOP. . .\n");
- */
- result = CmdRead ((char *)&this->cmdsn, sizeof (int));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- this->cmdsn = ntohl (this->cmdsn);
-#endif
- StopPlayLiveVideo ();
- break;
- }
- else if (tmp == CmdSPEED)
- {
- SPEEDpara speed_para;
- /*
- fprintf (stderr, "VS: this->CmdSPEED. . .\n");
- */
- result = CmdRead ((char *)&speed_para, sizeof (speed_para));
- if (result != 0)
- return result;
- /* ignore this thing for live video */
- }
- else
- {
- fprintf (stderr, "VS error (live): this->cmd=%d while expect STOP/SPEED.\n", tmp);
- this->normalExit = 0;
- StopPlayLiveVideo ();
- exit (1);
- }
- }
- if (FD_ISSET (this->videoSocket, &read_mask)) /* feedback, only for frame rate
- adjustment */
- {
- VideoFeedBackPara fb_para;
- if (FBread ((char *)&fb_para, sizeof (fb_para)) == -1 ||
- ntohl (fb_para.cmdsn) != this->cmdsn) {
- /*
- SFprintf (stderr, "VS warning: a FB this->packet discarded.\n");
- */
- return 0;
- }
-#ifdef NeedByteOrderConversion
- fb_para.this->frameRateLimit1000 = ntohl (fb_para.this->frameRateLimit1000);
-#endif
- this->frameRateLimit = fb_para.frameRateLimit1000 / 1000.0;
- if (this->frameRateLimit < this->fps) {
- doscale = 1;
- ratio = min (this->frameRateLimit, this->fps) / this->fps;
- first_frame = frame;
- count = 0;
- /*
- fprintf (stderr, "doscale %d, this->frameRateLimit %5.2f, this->fps %5.2f, ratio %5.2f\n",
- doscale, this->frameRateLimit, this->fps, ratio);
- */
- }
- else doscale = 0;
- }
- }
- return 0;
-}
-
-void
-Video_Global::ComputeFirstSendPattern (float limit)
-{
- char * buf = this->firstSendPattern;
- int len = this->firstPatternSize;
- char * pat = (char *)malloc (len);
- int f;
-
- if (pat == NULL) {
- fprintf (stderr, "VS error on allocating %d bytes for computing first SP", len);
- perror ("");
- exit (1);
- }
- for (f = 0; f < len; f ++) {
- pat[f] = this->frameTable[f].type;
- }
- memset (buf, 0, len);
-
- if (limit <= 0)
- limit = 1.0;
-
- f = (int) ((double)len *
- ((double)limit / (1000000.0 / (double)this->currentUPF)) + 0.5);
- /* rounded to integer, instead of truncated */
- if (f >= len)
- f = len;
- else if (f <= 1)
- f = 1;
-
- ComputeSendPattern (pat, buf, len, f);
-
- /*
- f = len - f;
- fprintf (stderr, "this->Firstthis->Sendthis->Pattern (%d frames dropped): ", f);
- {
- int i;
- for (i = 0; i < len; i ++)
- fputc (buf[i] ? pat[i] : '-', stderr);
- }
- fputc ('\n', stderr);
- */
- free (pat);
-}
-
-int
-Video_Global::FrameToGroup (int * frame)
-{
- int f = * frame;
- int i = 0;
- while (i < this->numG && this->gopTable[i].previousFrames <= f) i++;
- i --;
- * frame = f - this->gopTable[i].previousFrames;
- return i;
-}
-
-int
-Video_Global::SendReferences (int group, int frame)
-{
- u_char orgcmd;
- int i, base;
- int pregroup;
- int result;
-
- if (group < 0 || group >= this->numG) return 0;
- if (frame <= 0 || frame >= this->gopTable[group].totalFrames) return 0;
-
- orgcmd = this->cmd;
- this->cmd = CmdREF;
-
- if (group > 0) {
- pregroup = 1;
- base = this->gopTable[group].previousFrames;
- for (i = 0; i <= frame; i ++) {
- if (this->frameTable[i + base].type == 'P') {
- pregroup = 0;
- break;
- }
- }
- }
- else pregroup = 0;
-
- if (pregroup) { /* reference frame can be in previous group */
- pregroup = group -1;
- base = this->gopTable[pregroup].previousFrames;
- for (i = 0; i < this->gopTable[pregroup].totalFrames; i ++) {
- if (this->frameTable[i + base].type != 'B') {
- /*
- SFprintf (stderr, "REF group%d, frame%d\n", pregroup, i);
- */
- result = SendPacket (i == 0, pregroup, i, 0);
- if (result != 0)
- return result;
- }
- }
- }
-
- base = this->gopTable[group].previousFrames;
- for (i = 0; i < frame; i ++) {
- if (this->frameTable[i + base].type != 'B') {
- /*
- SFprintf (stderr, "REF group%d, frame%d\n", group, i);
- */
- SendPacket (i == 0, group, i, 0);
- }
- }
- this->cmd = orgcmd;
-}
-
-void
-Video_Global::GetFeedBack ()
-{
- VideoFeedBackPara para;
- struct itimerval val;
- int timerUsec;
-
- if (FBread ((char *)&para, sizeof (para)) == -1 ||
- ntohl (para.cmdsn) != this->cmdsn) {
- /*
- SFprintf (stderr, "VS warning: a FB this->packet discarded.\n");
- */
- return;
- }
-#ifdef NeedByteOrderConversion
- para.this->needHeader = ntohl (para.this->needHeader);
- para.addUsecPerFrame = ntohl (para.addUsecPerFrame);
- para.addFrames = ntohl (para.addFrames);
- para.this->sendthis->PatternGops = ntohl (para.this->sendthis->PatternGops);
- para.this->frameRateLimit1000 = ntohl (para.this->frameRateLimit1000);
-#endif
- this->frameRateLimit = para.frameRateLimit1000 / 1000.0;
- this->sendPatternGops = para.sendPatternGops;
-
- if (!Video_Timer_Global::timerOn) return;
-
- this->needHeader = para.needHeader;
- memcpy (this->sendPattern, para.sendPattern, PATTERN_SIZE);
- if (para.addFrames <= 0 || Video_Timer_Global::timerAdjust < MAX_TIMER_ADJUST)
- {
- Video_Timer_Global::timerAdjust += para.addFrames * SPEEDUP_INV_SCALE;
- Video_Timer_Global::TimerSpeed ();
- }
- else /* drastic compensation for big gap */
- this->addedSignals += para.addFrames;
- if (para.addUsecPerFrame) {
- this->addedUPF += para.addUsecPerFrame;
- Video_Timer_Global::TimerSpeed ();
- }
- /*
- SFprintf (stderr, "VS fb: addf %d, addupf %d\n",
- para.addFrames, para.addUsecPerFrame);
- */
-}
-
-int
-Video_Global::SendPicture (int * frame)
-{
- int size;
- char * buf = ((char *) this->packet) + sizeof (VideoPacket);
- /*
- SFprintf (stderr, "VS to send picture %d.\n", *frame);
- */
-
- size = ReadLiveVideoPicture (frame, buf, this->packetBufSize);
-
- this->packet->currentUPF = ntohl (this->currentUPF);
- this->packet->cmd = htonl (this->cmd);
- this->packet->cmdsn = htonl (this->cmdsn);
- this->packet->sh = this->packet->gop = this->packet->frame = this->packet->display = htonl (*frame);
- this->packet->future = htonl ((unsigned)-1);
- this->packet->past = htonl ((unsigned)-1);
-
- this->packet->dataBytes = htonl (size);
-
- return send_to_network (this->currentUPF);
-}
-
-int
-Video_Global::ReadInfoFromFile (void)
-{
- int fd = -1, i;
- int fnlen = strlen (this->videoFile);
-
- strcpy (&this->videoFile[fnlen], ".Info");
- fd = open (this->videoFile, O_RDONLY);
- if (fd == -1)
- {
- fprintf (stderr, "Reminder: VS fails to open %s for read, ", this->videoFile);
- perror ("try create one");
- goto fail_ReadInfoFromFile;
- }
- read_int (fd, &i);
- if (i != this->fileSize)
- {
- fprintf (stderr, "Warning: this->fileSize in Info: %d not the same as actual %d.\n",
- i, this->fileSize);
- goto fail_ReadInfoFromFile;
- }
-
- read_int (fd, &this->maxS);
- read_int (fd, &this->maxG);
- read_int (fd, &this->maxI);
- read_int (fd, &this->maxP);
- read_int (fd, &this->maxB);
- read_int (fd, &this->minS);
- read_int (fd, &this->minG);
- read_int (fd, &this->minI);
- read_int (fd, &this->minP);
- read_int (fd, &this->minB);
- read_int (fd, &this->numS);
- read_int (fd, &this->numG);
- read_int (fd, &this->numF);
- read_int (fd, &this->numI);
- read_int (fd, &this->numP);
- read_int (fd, &this->numB);
- read_int (fd, &this->averageFrameSize);
- read_int (fd, &this->horizontalSize);
- read_int (fd, &this->verticalSize);
- read_int (fd, &this->pelAspectRatio);
- read_int (fd, &this->pictureRate);
- read_int (fd, &this->vbvBufferSize);
- read_int (fd, &this->patternSize);
-
- memset (this->pattern, 0, PATTERN_SIZE);
- read_bytes (fd, this->pattern, this->patternSize);
-#ifdef STAT
- this->framesSent = (char *)malloc ((this->numF + 7)>>3);
- if (this->framesSent == NULL)
- {
- fprintf (stderr, "Error: VS fails to alloc mem for this->framesSent for %d frames", this->numF);
- perror ("");
- exit (1);
- }
-#endif
- this->systemHeader = (struct Video_Global::SystemHeader *)malloc (sizeof (struct Video_Global::SystemHeader) * this->numS);
- if (this->systemHeader == NULL)
- {
- perror ("Error: VS error on malloc this->SystemHeader");
- exit (1);
- }
- this->gopTable = (struct Video_Global::GopTable *)malloc (sizeof (struct Video_Global::GopTable) * this->numG);
- if (this->gopTable == NULL)
- {
- perror ("Error: VS error on malloc GopHeader");
- exit (1);
- }
- this->frameTable = (struct Video_Global::FrameTable *)malloc (sizeof (Video_Global::FrameTable) * this->numF);
- if (this->frameTable == NULL)
- {
- perror ("Error: VS error on malloc this->frameTable");
- exit (1);
- }
- this->packetBufSize = this->maxS + this->maxG + max (this->maxI, max (this->maxP, this->maxB));
- this->packet = (VideoPacket *)malloc (sizeof (VideoMessage) + sizeof (VideoPacket) +
- this->packetBufSize);
- if (this->packet == NULL)
- {
- perror ("Error: VS error on malloc this->packet buffer");
- exit (1);
- }
- this->packet = (VideoPacket *) ((char *)this->packet + sizeof (VideoMessage));
-
- for (i = 0; i < this->numS; i ++)
- {
- read_int (fd, (int *)&this->systemHeader[i].offset);
- read_int (fd, &this->systemHeader[i].size);
- }
- for (i = 0; i < this->numG; i ++)
- {
- read_int (fd, &this->gopTable[i].systemHeader);
- read_int (fd, (int *)&this->gopTable[i].offset);
- read_int (fd, &this->gopTable[i].headerSize);
- read_int (fd, &this->gopTable[i].size);
- read_int (fd, &this->gopTable[i].totalFrames);
- read_int (fd, &this->gopTable[i].previousFrames);
- read_int (fd, (int *)&this->gopTable[i].firstIoffset);
- }
- for (i = 0; i < this->numF; i ++)
- {
- read_byte (fd, &this->frameTable[i].type);
- read_short (fd, (short *)&this->frameTable[i].size);
- }
-
- close (fd);
- /*
- fprintf (stderr, "Read Info from %s\n", this->videoFile);
- */
- this->videoFile[fnlen] = 0;
- return 0;
-fail_ReadInfoFromFile:
- if (fd >= 0)
- close (fd);
- this->videoFile[fnlen] = 0;
- /*
- fprintf (stderr, "To scan Info from %s\n", this->videoFile);
- */
- return -1;
-}
-
-void
-Video_Global::WriteInfoToFile (void)
-{
- int fd = -1, i;
- int fnlen = strlen (this->videoFile);
-
- strcpy (&this->videoFile[fnlen], ".Info");
- fd = open (this->videoFile, O_WRONLY | O_CREAT, 0444);
- if (fd == -1)
- {
- fprintf (stderr, "VS fails to open %s for write", this->videoFile);
- perror ("");
- goto fail_WriteInfoToFile;
- }
- write_int (fd, this->fileSize);
- write_int (fd, this->maxS);
- write_int (fd, this->maxG);
- write_int (fd, this->maxI);
- write_int (fd, this->maxP);
- write_int (fd, this->maxB);
- write_int (fd, this->minS);
- write_int (fd, this->minG);
- write_int (fd, this->minI);
- write_int (fd, this->minP);
- write_int (fd, this->minB);
- write_int (fd, this->numS);
- write_int (fd, this->numG);
- write_int (fd, this->numF);
- write_int (fd, this->numI);
- write_int (fd, this->numP);
- write_int (fd, this->numB);
- write_int (fd, this->averageFrameSize);
- write_int (fd, this->horizontalSize);
- write_int (fd, this->verticalSize);
- write_int (fd, this->pelAspectRatio);
- write_int (fd, this->pictureRate);
- write_int (fd, this->vbvBufferSize);
- write_int (fd, this->patternSize);
-
- write_bytes (fd, this->pattern, this->patternSize);
-
- for (i = 0; i < this->numS; i ++)
- {
- write_int (fd, this->systemHeader[i].offset);
- write_int (fd, this->systemHeader[i].size);
- }
- for (i = 0; i < this->numG; i ++)
- {
- write_int (fd, this->gopTable[i].systemHeader);
- write_int (fd, this->gopTable[i].offset);
- write_int (fd, this->gopTable[i].headerSize);
- write_int (fd, this->gopTable[i].size);
- write_int (fd, this->gopTable[i].totalFrames);
- write_int (fd, this->gopTable[i].previousFrames);
- write_int (fd, this->gopTable[i].firstIoffset);
- }
- for (i = 0; i < this->numF; i ++)
- {
- write_byte (fd, this->frameTable[i].type);
- write_short (fd, this->frameTable[i].size);
- }
-
- close (fd);
- this->videoFile[fnlen] = 0;
- return;
-fail_WriteInfoToFile:
- if (fd >= 0)
- close (fd);
- this->videoFile[fnlen] = 0;
- return;
-}
-
-int
-Video_Global::init_MPEG1_video_file (void)
-{
- u_char nb;
- int state = 0;
- u_long fileptr = 0;
- u_long i, j, k;
- int shptr, gopptr, ftptr;
- int inpic = 0;
- u_long picptr = 0;
- int pictype = 0;
- int first = 0;
- int failureType = 0;
-
- this->fp = fopen (this->videoFile, "r");
- if (this->fp == NULL)
- {
- fprintf (stderr, "error on opening video file %s", this->videoFile);
- perror ("");
- return 2;
- }
- if (fseek (this->fp, 0, 2) == -1)
- {
- fprintf (stderr, "File %s not seekable", this->videoFile);
- perror ("");
- return 3;
- }
- this->fileSize = ftell (this->fp);
-
- fseek (this->fp, 0, 0);
-
- if (ReadInfoFromFile ())
- {
- for (;;)
- {
- nextByte;
- if (state >= 0 && nb == 0x00)
- state ++;
- else if (state >= 2 && nb == 0x01)
- state = -1;
- else if (state == -1)
- {
- if (!first) first ++;
- else if (first == 1) first ++;
-
- switch (nb)
- {
- case 0xb7: /* seq_end_code */
- goto exit_phase1;
- break;
- case 0xb3: /* seq_start_code */
- if (first == 1) first = 3;
- if (first != 3)
- {
- fprintf (stderr, "VS error: given file is not in MPEG format.\n");
- return 4;
- }
- this->numS ++;
- break;
- case 0xb8: /* gop_start_code */
- this->numG ++;
- break;
- case 0x00: /* picture_start_code */
- nextByte;
- nextByte;
- nb &= 0x38;
- if (nb == 0x08)
- {
- this->numI ++;
- if (this->numG == 2)
- this->pattern[this->patternSize++] = 'I';
- }
- else if (nb == 0x10)
- {
- this->numP ++;
- if (this->numG == 2)
- this->pattern[this->patternSize++] = 'P';
- }
- else if (nb == 0x18)
- {
- this->numB ++;
- if (this->numG == 2)
- this->pattern[this->patternSize++] = 'B';
- }
- /*
- else
- fprintf (stderr, "VS error: unkonw picture type %d\n", nb);
- */
- break;
- default:
- break;
- }
- state = 0;
- }
- else
- state = 0;
- }
- exit_phase1:
-
- if (first != 3)
- {
- fprintf (stderr, "VS error: given file \"%s\" is not of MPEG format.\n", this->videoFile);
- return 4;
- }
-
- this->pattern[this->patternSize] = 0;
- memset (this->sendPattern, 1, PATTERN_SIZE);
-
- this->numF = this->numI + this->numP + this->numB;
- this->averageFrameSize = fileptr / (unsigned)this->numF;
- /*
- fprintf (stderr, "Pass one finished, total bytes read: %u, average frame size %d\n",
- fileptr, this->averageFrameSize);
- fprintf (stderr, "this->numS-%d, this->numG-%d, this->numF-%d, this->numI-%d, this->numP-%d, this->numB-%d\n",
- this->numS, this->numG, this->numI, this->numI, this->numP, this->numB);
- fprintf (stderr, "this->Pattern detected: %s\n", this->pattern);
- */
- if (this->numF > MAX_FRAMES)
- {
- fprintf (stderr, "VS error: this->Number of frames (%d) is bigger than MAX_FRAMES (%d).\n\
-you need to update the constant definition in common.h and recompile.\n",
- this->numF, MAX_FRAMES);
- return 5;
- }
-
-#ifdef STAT
- this->framesSent = (char *)malloc ((this->numF + 7)>>3);
- if (this->framesSent == NULL)
- {
- fprintf (stderr, "VS fails to alloc mem for this->framesSent for %d frames", this->numF);
- perror ("");
- return 6;
- }
-#endif
-
- this->systemHeader = (struct Video_Global::SystemHeader *)malloc (sizeof (struct Video_Global::SystemHeader) * this->numS);
- if (this->systemHeader == NULL)
- {
- perror ("VS error on malloc this->SystemHeader");
- return 7;
- }
- this->gopTable = (struct Video_Global::GopTable *)malloc (sizeof (struct Video_Global::GopTable) * this->numG);
- if (this->gopTable == NULL)
- {
- perror ("VS error on malloc GopHeader");
- return 8;
- }
- this->frameTable = (struct Video_Global::FrameTable *)malloc (sizeof (Video_Global::FrameTable) * this->numF);
- if (this->frameTable == NULL)
- {
- perror ("VS error on malloc this->frameTable");
- return 9;
- }
-
- rewind (this->fp);
- fileptr = 0;
- state = 0;
- inpic = 0;
- shptr = -1;
- gopptr = -1;
- ftptr = 0;
-
- for (;;)
- {
- nextByte;
- if (state >= 0 && nb == 0x00)
- state ++;
- else if (state >= 2 && nb == 0x01)
- state = -1;
- else if (state == -1)
- {
- switch (nb)
- {
- case 0xb7: /* seq_end_code */
- if (gopptr >= 0 && this->gopTable[gopptr].size == 0)
- this->gopTable[gopptr].size = fileptr - this->gopTable[gopptr].offset - 4;
- computePicSize;
- goto exit_phase2;
- break;
- case 0xb3: /* seq_start_code */
- if (gopptr >= 0 && this->gopTable[gopptr].size == 0)
- this->gopTable[gopptr].size = fileptr - this->gopTable[gopptr].offset - 4;
- computePicSize;
- shptr ++;
- this->systemHeader[shptr].offset = fileptr - 4;
- this->systemHeader[shptr].size = 0;
- break;
- case 0xb8: /* gop_start_code */
- if (this->systemHeader[shptr].size == 0)
- this->systemHeader[shptr].size =fileptr - this->systemHeader[shptr].offset - 4;
- if (gopptr >= 0 && this->gopTable[gopptr].size == 0)
- this->gopTable[gopptr].size = fileptr - this->gopTable[gopptr].offset - 4;
- computePicSize;
- gopptr ++;
- this->gopTable[gopptr].systemHeader = shptr;
- this->gopTable[gopptr].offset = fileptr - 4;
- this->gopTable[gopptr].headerSize = 0;
- this->gopTable[gopptr].size = 0;
- this->gopTable[gopptr].totalFrames = 0;
- this->gopTable[gopptr].previousFrames = gopptr ?
- (this->gopTable[gopptr - 1].totalFrames + this->gopTable[gopptr - 1].previousFrames) : 0;
-
- break;
- case 0x00: /* picture_start_code */
- if (this->gopTable[gopptr].headerSize == 0)
- {
- this->gopTable[gopptr].headerSize = fileptr - this->gopTable[gopptr].offset - 4;
- this->gopTable[gopptr].firstIoffset = fileptr - 4;
- }
- this->gopTable[gopptr].totalFrames ++;
- computePicSize;
- picptr = fileptr - 4;
- nextByte;
- nextByte;
- nb &= 0x38;
- if (nb == 0x08)
- {
- pictype = 'I';
- inpic = 1;
- }
- else if (nb == 0x10)
- {
- pictype = 'P';
- inpic = 1;
- }
- else if (nb == 0x18)
- {
- pictype = 'B';
- inpic = 1;
- }
- break;
- default:
-
- break;
- }
- state = 0;
- }
- else
- state = 0;
- }
-
- exit_phase2:
- for (shptr = 0; shptr<this->numS; shptr++)
- {
- this->maxS = max (this->maxS, this->systemHeader[shptr].size);
- this->minS = min (this->minS, this->systemHeader[shptr].size);
- }
- for (gopptr = 0; gopptr<this->numG; gopptr++)
- {
- this->maxG = max (this->maxG, this->gopTable[gopptr].headerSize);
- this->minG = min (this->minG, this->gopTable[gopptr].headerSize);
- }
- this->packetBufSize = this->maxS + this->maxG + max (this->maxI, max (this->maxP, this->maxB));
- this->packet = (VideoPacket *)malloc (sizeof (VideoMessage) + sizeof (VideoPacket) +
- this->packetBufSize);
- if (this->packet == NULL)
- {
- perror ("VS error on malloc this->packet buffer");
- return 10;
- }
- this->packet = (VideoPacket *) ((char *)this->packet + sizeof (VideoMessage));
- /*
- fprintf (stderr, "Pass 2 finished.\n");
- fprintf (stderr, "this->maxS-%d, this->maxG-%d, this->maxI-%d, this->maxP-%d, this->maxB-%d.\n", this->maxS, this->maxG, this->maxI, this->maxP, this->maxB);
- fprintf (stderr, "this->minS-%d, this->minG-%d, this->minI-%d, this->minP-%d, this->minB-%d.\n", this->minS, this->minG, this->minI, this->minP, this->minB);
- */
- /*
- {
- int i;
-
- fprintf (stderr, "id: offset size -- system header table:\n");
- for (i=0; i<this->numS; i++)
- fprintf (stderr, "%-3d %-9u %d\n", i, this->systemHeader[i].offset, this->systemHeader[i].size);
- fprintf (stderr,
- "id: header offset hdsize totSize frames preframs Ioffset Isize -- GOP\n");
- for (i=0; i<this->numG; i++)
- {
- fprintf (stderr, "%-4d %-8d %-8u %-8d %-8d %-8d %-8d %-8u %d\n",
- i,
- this->gopTable[i].this->systemHeader,
- this->gopTable[i].offset,
- this->gopTable[i].headerSize,
- this->gopTable[i].size,
- this->gopTable[i].totalFrames,
- this->gopTable[i].previousFrames,
- this->gopTable[i].firstIoffset,
- this->frameTable[this->gopTable[i].previousFrames].size
- );
- }
-
- fprintf (stderr, "\nframe information:");
- for (i=0; i<this->numF; i++)
- fprintf (stderr, "%c%c%-8d", (i%10 ? '\0' : '\n'), this->frameTable[i].type, this->frameTable[i].size);
- fprintf (stderr, "\n");
-
- }
- */
- fseek (this->fp, this->systemHeader[0].offset+4, 0);
- nextByte;
- this->horizontalSize = ((int)nb <<4) & 0xff0;
- nextByte;
- this->horizontalSize |= (nb >>4) & 0x0f;
- this->verticalSize = ((int)nb <<8) & 0xf00;
- nextByte;
- this->verticalSize |= (int)nb & 0xff;
- nextByte;
- this->pelAspectRatio = ((int)nb >> 4) & 0x0f;
- this->pictureRate = (int)nb & 0x0f;
- nextByte;
- nextByte;
- nextByte;
- this->vbvBufferSize = ((int)nb << 5) & 0x3e0;
- nextByte;
- this->vbvBufferSize |= ((int)nb >>3) & 0x1f;
- /*
- fprintf (stderr, "SysHeader info: hsize-%d, vsize-%d, pelAspect-%d, rate-%d, vbv-%d.\n",
- this->horizontalSize, this->verticalSize, this->pelAspectRatio, this->pictureRate, this->vbvBufferSize);
- */
- WriteInfoToFile ();
- }
-#if 0
- {
- int i, j = 20;
-
- for (i = this->numG - 1;; i --) {
- if (this->gopTable[i].offset < 4235260) {
- fprintf (stderr, "group %d: offset %ld\n", i, this->gopTable[i].offset);
- if (j -- == 0) break;
- }
- }
- /*
- for (i = 0; i < this->numG; i ++) {
- if (this->gopTable[i].previousFrames > 1800) {
- fprintf (stderr, "group %d: offset %ld pre-frames %d\n",
- i, this->gopTable[i].offset, this->gopTable[i].previousFrames);
- break;
- }
- }
- */
- }
-#endif
- {
- this->firstPatternSize = this->gopTable[0].totalFrames;
- this->firstSendPattern = (char *)malloc (this->firstPatternSize);
- if (this->firstSendPattern == NULL)
- {
- fprintf (stderr, "VS failed to allocate this->firstthis->Sendthis->Pattern for %d frames",
- this->firstPatternSize);
- perror ("");
- return 11;
- }
- }
- this->firstGopFrames = this->gopTable[0].totalFrames;
- return 0;
-}
-int
-Video_Global::play_send (int debug)
-{
- // ACE_DEBUG ((LM_DEBUG,"play_send: sending the frame \n"));
- int curGroup = Video_Timer_Global::timerGroup;
- int curFrame = Video_Timer_Global::timerFrame;
- int curHeader = Video_Timer_Global::timerHeader;
- char * sp;
-
- if (this->preGroup != curGroup ||
- curFrame != this->preFrame)
- {
- int sendStatus = -1;
- int frameStep = 1;
- if (debug)
- cerr << " curgroup = " << curGroup << endl ;
- if (curGroup == 0)
- {
-
- int i = curFrame + 1;
- while (i < this->firstPatternSize &&
- !this->firstSendPattern[i])
- {
- frameStep ++;
- i++;
- }
- }
- else /* (curGroup > 0) */
- {
- int i = curFrame + 1;
- sp = this->sendPattern + ((curGroup - 1) % this->sendPatternGops) * this->patternSize;
- while (i < this->patternSize && !sp[i])
- {
- frameStep ++;
- i++;
- }
- }
- if (curGroup == 0)
- {
- if (debug)
- cerr << "first : " <<
- this->firstSendPattern[curFrame] << endl;
- if (this->firstSendPattern[curFrame])
- sendStatus = 0;
- else /* (!this->firstthis->Sendthis->Pattern[curFrame]) */
- {
- int i = curFrame - 1;
- while (i > 0 && !this->firstSendPattern[i])
- i--;
- if (i > this->preFrame)
- /* the frame (curGroup, i) hasn't been sent yet */
- {
- sendStatus = 0;
- curFrame = i;
- }
- else
- sendStatus = -1;
- if (debug)
- cerr << "SendStatus = " << sendStatus << endl;
- }
- }
- else if (sp[curFrame]) /* curGroup > 0 */
- sendStatus = 0;
- else /* (!sp[curFrame]) */
- {
- int i = curFrame - 1;
- while (i > 0 && !sp[i])
- i--;
- if (curGroup == this->preGroup && i > this->preFrame)
- /* the frame (curGroup, i) hasn't been sent yet */
- {
- sendStatus = 0;
- curFrame = i;
- }
- else
- sendStatus = -1;
- }
- if (!sendStatus)
- {
- // Send the current video frame, calls send_to_network which
- // fragments and sends via blocking write .
- sendStatus = this->SendPacket (this->preHeader != curHeader,
- curGroup, curFrame,
- (this->currentUPF + this->addedUPF) * frameStep);
- if (!sendStatus)
- {
- this->preHeader = curHeader;
- this->preGroup = curGroup;
- this->preFrame = curFrame;
-#ifdef STAT
- if (this->play_para.collectStat)
- {
- int f = this->gopTable[curGroup].previousFrames + curFrame;
- this->framesSent[f>>3] |= (1 << (f % 8));
- }
-#endif
- }
- }
- }
- return 0;
-}
-
-int
-Video_Global::fast_play_send (void)
-{
- if (this->fast_preGroup != Video_Timer_Global::timerGroup)
- {
- this->SendPacket (this->fast_preHeader != Video_Timer_Global::timerHeader, Video_Timer_Global::timerGroup, 0,
- this->fast_para.usecPerFrame * this->patternSize >> 2);
- this->fast_preHeader = Video_Timer_Global::timerHeader;
- this->fast_preGroup = Video_Timer_Global::timerGroup;
- }
- return 0;
-}
-
-int
-Video_Global::position (void)
-{
- int result;
- POSITIONpara pos_para;
- /*
- fprintf (stderr, "POSITION . . .\n");
- */
- result = CmdRead ((char *)&pos_para, sizeof (pos_para));
- if (result != 0)
- return result;
-
- if (this->live_source) return 0;
-
-#ifdef NeedByteOrderConversion
- pos_para.nextGroup = ntohl (pos_para.nextGroup);
- pos_para.sn = ntohl (pos_para.sn);
-#endif
-
- CheckGroupRange (pos_para.nextGroup);
- this->cmdsn = pos_para.sn;
- result = SendPacket (this->numS>1 || pos_para.nextGroup == 0, pos_para.nextGroup, 0, 0);
- return result;
-}
-
-int
-Video_Global::step_video ()
-{
- int group;
- STEPpara step_para;
- int tag = 0;
- int result;
-
- result = CmdRead ((char *)&step_para, sizeof (step_para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- step_para.sn = ntohl (step_para.sn);
- step_para.this->nextFrame = ntohl (step_para.this->nextFrame);
-#endif
-
- this->cmdsn = step_para.sn;
-
- if (!this->live_source) {
- if (step_para.nextFrame >= this->numF) /* send SEQ_END */
- {
- tag = 1;
- step_para.nextFrame --;
- }
- /*
- fprintf (stderr, "STEP . . .frame-%d\n", step_para.this->nextFrame);
- */
- CheckFrameRange (step_para.nextFrame);
- group = FrameToGroup (&step_para.nextFrame);
- if (this->precmd != CmdSTEP && !tag ) {
- result = SendReferences (group, step_para.nextFrame);
- if (result < 0 )
- return result;
- }
- }
- if (this->live_source) StartPlayLiveVideo ();
-
- if (this->live_source) {
- SendPicture (&step_para.nextFrame);
- }
- else if (this->video_format == VIDEO_MPEG1) {
- SendPacket (this->numS>1, group, tag ? this->numF : step_para.nextFrame, 0);
- }
- else {
- fprintf (stderr, "VS: wierd1\n");
- }
-
- if (this->live_source) StopPlayLiveVideo ();
- return 0;
-}
-
-int
-Video_Global::fast_forward (void)
-{
- return this->init_fast_play ();
-}
-
-int
-Video_Global::fast_backward (void)
-{
- return this->init_fast_play ();
-}
-
-int
-Video_Global::stat_stream (void)
-{
- int i, j = 0;
- for (i = 0; i < this->numF; i++)
- {
- short size = htons (this->frameTable[i].size);
- char type = this->frameTable[i].type;
- if (i == this->gopTable[j].previousFrames)
- {
- type = tolower (type);
- j ++;
- }
- CmdWrite ((char *)&type, 1);
- CmdWrite ((char *)&size, 2);
- }
- return 0;
-}
-
-int
-Video_Global::stat_sent (void)
-{
-#ifdef STAT
- CmdWrite ((char *)this->framesSent, (this->numF + 7) / 8);
-#else
- int i;
- char zeroByte = 0;
- for (i = 0; i < (this->numF + 7) / 8; i++)
- CmdWrite ((char *)&zeroByte, 1);
-#endif
- return 0;
-}
-
-int
-Video_Global::init_play (void)
-{
- int result;
-
- ACE_DEBUG ((LM_DEBUG,
- " (%P|%t) this->play ()"));
-
- // this gets the parameters for the play command
- result = this->CmdRead ((char *)&this->play_para, sizeof (this->play_para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- this->play_para.sn = ntohl (this->play_para.sn);
- this->play_para.this->nextFrame = ntohl (this->play_para.this->nextFrame);
- this->play_para.usecPerFrame = ntohl (this->play_para.usecPerFrame);
- this->play_para.framesPerSecond = ntohl (this->play_para.framesPerSecond);
- this->play_para.this->frameRateLimit1000 = ntohl (this->play_para.this->frameRateLimit1000);
- this->play_para.collectStat = ntohl (this->play_para.collectStat);
- this->play_para.this->sendPatternGops = ntohl (this->play_para.this->sendPatternGops);
- this->play_para.this->VStimeAdvance = ntohl (this->play_para.this->VStimeAdvance);
-#endif
-
- this->frameRateLimit = this->play_para.frameRateLimit1000 / 1000.0;
- this->cmdsn = this->play_para.sn;
- this->currentUPF = this->play_para.usecPerFrame;
- this->VStimeAdvance = this->play_para.VStimeAdvance;
-
- {
- int ts = htonl (get_usec ());
- this->CmdWrite ((char *)&ts, sizeof (int));
- }
-
- if (this->live_source || this->video_format != VIDEO_MPEG1) {
- if (this->live_source)
- this->PLAYliveVideo (&this->play_para);
- return 0;
- }
-
- fprintf (stderr, "this->VStimeAdvance from client: %d\n", this->VStimeAdvance);
-
- this->sendPatternGops = this->play_para.sendPatternGops;
- ComputeFirstSendPattern (this->frameRateLimit);
-#ifdef STAT
- if (this->play_para.collectStat)
- memset (this->framesSent, 0, (this->numF + 7)>>3);
-#endif
- CheckFrameRange (this->play_para.nextFrame);
- Video_Timer_Global::timerFrame = this->play_para.nextFrame;
- Video_Timer_Global::timerGroup = FrameToGroup (&Video_Timer_Global::timerFrame);
- Video_Timer_Global::timerHeader = this->gopTable[Video_Timer_Global::timerGroup].systemHeader;
- memcpy (this->sendPattern, this->play_para.sendPattern, PATTERN_SIZE);
- result = SendReferences (Video_Timer_Global::timerGroup, Video_Timer_Global::timerFrame);
- if (result < 0)
- return result;
- Video_Timer_Global::StartTimer ();
-
- // Sends the first frame of the video...
- result = play_send (0);
- return 0;
-}
-
-int
-Video_Global::init_fast_play (void)
-{
- int result;
-
- result = CmdRead ((char *)&this->fast_para, sizeof (this->fast_para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- this->fast_para.sn = ntohl (this->fast_para.sn);
- this->fast_para.this->nextGroup = ntohl (this->fast_para.this->nextGroup);
- this->fast_para.usecPerFrame = ntohl (this->fast_para.usecPerFrame);
- this->fast_para.framesPerSecond = ntohl (this->fast_para.framesPerSecond);
- this->fast_para.this->VStimeAdvance = ntohl (this->fast_para.this->VStimeAdvance);
-#endif
-
- if (this->live_source) return 0;
-
- this->VStimeAdvance = this->fast_para.VStimeAdvance;
- /*
- fprintf (stderr, "this->VStimeAdvance from client: %d\n", this->VStimeAdvance);
- */
- CheckGroupRange (this->fast_para.nextGroup);
- this->cmdsn = this->fast_para.sn;
- Video_Timer_Global::timerGroup = this->fast_para.nextGroup;
- Video_Timer_Global::timerFrame = 0;
- Video_Timer_Global::timerHeader = this->gopTable[Video_Timer_Global::timerGroup].systemHeader;
- this->currentUPF = this->fast_para.usecPerFrame;
- Video_Timer_Global::StartTimer ();
-
- fast_play_send ();
- return 0;
-}
-
-int
-Video_Global::init_video (void)
-{
- INITvideoPara para;
- int failureType = 0;
- int result;
- /*
- fprintf (stderr, "VS about to read Para.\n");
- */
- result = CmdRead ((char *)&para, sizeof (para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl (para.sn);
- para.version = ntohl (para.version);
- para.nameLength = ntohl (para.nameLength);
-#endif
- if (para.nameLength>0)
- {
- result = CmdRead (this->videoFile, para.nameLength);
- if (result != 0)
- return result;
- }
- if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) {
- char errmsg[128];
- this->cmd = CmdFAIL;
- CmdWrite ((char *)&this->cmd, 1);
- if (Mpeg_Global::session_num > Mpeg_Global::session_limit) {
- sprintf (errmsg,
- "Too many sessions being serviced, please try again later.\n");
- }
- else {
- sprintf (errmsg, "Version # not match, VS %d.%02d, Client %d.%02d",
- VERSION / 100, VERSION % 100,
- para.version / 100, para.version % 100);
- }
- write_string (this->serviceSocket, errmsg);
- exit (0);
- }
- this->cmdsn = para.sn;
- /*
- fprintf (stderr, "MPEG file %s got.\n", this->videoFile);
- */
- this->videoFile[para.nameLength] = 0;
-
- if (!strncasecmp ("LiveVideo", this->videoFile, 9)) {
- if (OpenLiveVideo (&this->video_format, &this->horizontalSize,
- &this->verticalSize, &this->averageFrameSize,
- &this->fps, &this->pelAspectRatio) == -1) {
- failureType = 100;
- goto failure;
- }
- if (this->video_format == VIDEO_MPEG2) {
- failureType = 101;
- goto failure;
- }
- this->live_source = 1;
-
- this->fileSize =0x7fffffff;
- this->maxS = this->maxG = this->maxI = this->maxP = this->maxB = this->minS = this->minG = this->minI = this->minP = this->minB = 1;
- this->numS = this->numG = this->numF = this->numI = 0x7fffffff;
- this->numP = this->numB = 0;
- this->vbvBufferSize = 1;
- this->firstGopFrames = 1;
- this->patternSize = 1;
- this->pattern[0] = 'I';
- this->pattern[1] = 0;
- this->packetBufSize = this->verticalSize * this->horizontalSize * 3;
- this->packet = (VideoPacket *)malloc (sizeof (VideoMessage) + sizeof (VideoPacket) +
- this->packetBufSize);
- if (this->packet == NULL)
- {
- perror ("Error: VS error on malloc this->packet buffer");
- exit (1);
- }
- this->packet = (VideoPacket *) ((char *)this->packet + sizeof (VideoMessage));
-
- }
- else {
- static double pictureRateTable[] = {23.976, 24, 25, 29.97, 30, 50, 59.94, 60};
-
- this->video_format = VIDEO_MPEG1;
- failureType = init_MPEG1_video_file ();
- if (failureType) goto failure;
- this->fps = pictureRateTable[this->pictureRate - 1];
- }
-
- {
- INITvideoReply reply;
-
- reply.totalHeaders = htonl (this->numS);
- reply.totalGroups = htonl (this->numG);
- reply.totalFrames = htonl (this->numF);
- reply.sizeIFrame = htonl (this->maxI);
- reply.sizePFrame = htonl (this->maxP);
- reply.sizeBFrame = htonl (this->maxB);
- reply.sizeSystemHeader = htonl (this->maxS);
- reply.sizeGop = htonl (this->maxG);
- reply.averageFrameSize = htonl (this->averageFrameSize);
- reply.verticalSize = htonl (this->verticalSize);
- reply.horizontalSize = htonl (this->horizontalSize);
- reply.pelAspectRatio = htonl (this->pelAspectRatio);
- reply.pictureRate1000 = htonl ((int) (this->fps * 1000));
- reply.vbvBufferSize = htonl (this->vbvBufferSize);
- reply.firstGopFrames = htonl (this->firstGopFrames);
- reply.patternSize = htonl (this->patternSize);
- strncpy (reply.pattern, this->pattern, PATTERN_SIZE);
-
- reply.live = htonl (this->live_source);
- reply.format = htonl (this->video_format);
-
- CmdWrite ((char *)&this->cmd, 1);
-
- CmdWrite ((char *)&reply, sizeof (reply));
-
- /* write the first SH, GOP and IFrame to this->serviceSocket (TCP),
- using code for SendPacket () */
- {
- int tmpSocket = this->videoSocket;
-
- if (this->live_source) StartPlayLiveVideo ();
-
- this->videoSocket = this->serviceSocket;
-
- if (this->live_source) {
- int frame = 0;
- SendPicture (&frame);
- }
- else if (this->video_format == VIDEO_MPEG1) {
- SendPacket (1, 0, 0, 0);
- }
- else {
- fprintf (stderr, "VS: this->video_format %d not supported.\n",
- this->video_format);
- }
- this->videoSocket = tmpSocket;
-
- if (this->live_source) StopPlayLiveVideo ();
- }
-
- return 0;
-
- }
-failure:
- {
- char * msg;
- char errmsg[64];
- this->cmd = CmdFAIL;
- sprintf (errmsg, "VS failed to alloc internal buf (type %d)", failureType);
- CmdWrite ((char *)&this->cmd, 1);
- msg = failureType == 1 ? "not a complete MPEG stream" :
- failureType == 2 ? "can't open MPEG file" :
- failureType == 3 ? "MPEG file is not seekable" :
- failureType == 4 ? "not an MPEG stream" :
- failureType == 5 ?
- "too many frames in MPEG file, need change MAX_FRAMES and recompile VS" :
- failureType == 100 ? "failed to connect to live video source" :
- failureType == 101 ? "live MPEG2 not supported" :
- errmsg;
- write_string (this->serviceSocket, msg);
- exit (0);
- }
-}
-
-//--------------------------------------------------------
-// Video_Timer_Global methods
-void
-Video_Timer_Global::StartTimer (void)
-{
- VIDEO_SINGLETON::instance ()->addedUPF = 0;
- VIDEO_SINGLETON::instance ()->addedSignals = 0;
- timerAdjust = (VIDEO_SINGLETON::instance ()->VStimeAdvance * SPEEDUP_INV_SCALE) / VIDEO_SINGLETON::instance ()->currentUPF;
- /*
- SFprintf (stderr, "VS StartTimer (): fast-start frames %d\n",
- timerAdjust / SPEEDUP_INV_SCALE);
- */
- TimerSpeed ();
- // setsignal (SIGALRM, timerHandler);
- timerOn = 1;
- preTimerVal = get_usec ();
- /*
- fprintf (stderr, "VS: timer started at %d upf.\n", VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF);
- */
-}
-
-void
-Video_Timer_Global::StopTimer (void)
-{
- struct itimerval val;
- // ## I have to incorporate this logic into the changed code
- // setsignal (SIGALRM, SIG_IGN);
- val.it_interval.tv_sec = val.it_value.tv_sec = 0;
- val.it_interval.tv_usec = val.it_value.tv_usec = 0;
- setitimer (ITIMER_REAL, &val, NULL);
- timerOn = 0;
- /*
- fprintf (stderr, "VS: timer stopped.\n");
- */
-}
-
-void
-Video_Timer_Global::TimerSpeed (void)
-{
- struct itimerval val;
- int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF;
- if (Mpeg_Global::drift_ppm) {
- /*
- int drift = (double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0;
- SFprintf (stderr, "Mpeg_Global::drift_ppm %d, usec %d, drift %d, new usec %d\n",
- Mpeg_Global::drift_ppm, usec, drift, usec - drift);
- */
- usec -= (int) ((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0);
- }
- if (timerAdjust > 1)
- usec = (int) (((double)usec * (double) (SPEEDUP_INV_SCALE - 1)) /
- (double)SPEEDUP_INV_SCALE);
- val.it_interval.tv_sec = val.it_value.tv_sec = usec / 1000000;
- val.it_interval.tv_usec = val.it_value.tv_usec = usec % 1000000;
- setitimer (ITIMER_REAL, &val, NULL);
- /*
- SFprintf (stderr,
- "VS TimerSpeed () at %s speed, timerAdjust %d VIDEO_SINGLETON::instance ()->addedSignals %d.\n",
- (timerAdjust > 1) ? "higher" : "normal", timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals);
- */
-
-}
-
-void
-Video_Timer_Global::TimerProcessing (void)
-{
- /*
- fprintf (stderr, "VS: timerHandler...\n");
- */
- if (!timerOn) {
- return;
- }
- if (timerAdjust < 0)
- {
- timerAdjust += SPEEDUP_INV_SCALE;
- return;
- }
- if (timerAdjust >0)
- {
- if ((--timerAdjust) == 0)
- TimerSpeed ();
- }
- if (VIDEO_SINGLETON::instance ()->cmd == CmdPLAY)
- {
- if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1 && timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames - 1)
- {
- timerFrame ++; /* force sending of END_SEQ when PLAY VIDEO_SINGLETON::instance ()->cmd */
- StopTimer ();
- return;
- }
- else
- {
- timerFrame ++;
- if (timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames)
- {
- timerGroup ++;
- timerFrame = 0;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- }
- }
- }
- else {
- if (VIDEO_SINGLETON::instance ()->cmd == CmdFF) {
- if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1) {
- StopTimer ();
- return;
- }
- timerGroup ++;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- }
- else {
- if (timerGroup == 0) {
- StopTimer ();
- return;
- }
- timerGroup --;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- }
- }
-
-}
-
-void
-Video_Timer_Global::timerHandler (int sig)
-{
- // ACE_DEBUG ((LM_DEBUG,
- // "Video_Timer_Global::timerHandler\n"));
-
- int val2, val3;
- int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF;
-
- if (Mpeg_Global::drift_ppm) {
- usec -= (int) ((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0);
- }
-
- if (timerAdjust > 1)
- usec = (int) (((double)usec * (double) (SPEEDUP_INV_SCALE - 1)) /
- (double)SPEEDUP_INV_SCALE);
- val3 = get_duration (preTimerVal, (val2 = get_usec ()));
- /*
- if (val3 >= usec<< 1))
- fprintf (stderr, "Slower: %d out of VIDEO_SINGLETON::instance ()->currentUPF %d.\n",
- val3, usec);
- else
- fprintf (stderr, "+\n");
- */
- preTimerVal = val2;
- if (val3 < 0 || val3 > 100000000)
- val3 = usec;
- val2 = (val3 + (usec>>1)) / usec;
- if (val2 < 0) val2 = 0;
- if (val2) {
- TimerProcessing ();
- val2 --;
- }
- VIDEO_SINGLETON::instance ()->addedSignals += val2;
-
- if (VIDEO_SINGLETON::instance ()->addedSignals) {
- val2 = timerAdjust;
- if (timerAdjust < MAX_TIMER_ADJUST) {
- timerAdjust += VIDEO_SINGLETON::instance ()->addedSignals * SPEEDUP_INV_SCALE;
- if (val2 < SPEEDUP_INV_SCALE) {
- TimerSpeed ();
- }
- }
- else {
- /*
- fprintf (stderr, "VS timerAdjust %d, VIDEO_SINGLETON::instance ()->addedSignals %d, timerFrame %d\n",
- timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals, timerFrame);
- */
- for (val3 = 0; val3 < VIDEO_SINGLETON::instance ()->addedSignals; val3 ++)
- TimerProcessing ();
- }
- VIDEO_SINGLETON::instance ()->addedSignals = 0;
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h
deleted file mode 100644
index 6127c736d18..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#if !defined (MPEG_GLOBAL_H)
-#define MPEG_GLOBAL_H
-
-// Global symbols, these need to become enums eventually.
-
-#define SESSION_NUM 4
-#define CONN_INET 1
-#define CONN_UNIX 2
-#define CONN_ATM 3
-
-#define SERVER_FDTABLE_SIZE 50
-#define CLIENT_FDTABLE_SIZE 10
-
-#define STATE_PENDING 1
-#define STATE_CONTROL 2
-#define STATE_DATA 3
-#define STATE_SINGLE 4
-
-#define min(a, b) ((a) > (b) ? (b) : (a))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
-/* Start codes. */
-
-#define READ_BLOCK_SIZE 512
-#define MAX_TIMER_ADJUST (100 * SPEEDUP_INV_SCALE)
-
-#define SEQ_END_CODE 0x000001b7
-#define SEQ_START_CODE 0x000001b3
-#define GOP_START_CODE 0x000001b8
-#define PICTURE_START_CODE 0x00000100
-#define SLICE_MIN_START_CODE 0x00000101
-#define SLICE_MAX_START_CODE 0x000001af
-#define EXT_START_CODE 0x000001b5
-#define USER_START_CODE 0x000001b2
-
-// Global definitions
-#define nextByte {int val; fileptr ++; \
- if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \
- {\
- perror("Crossed EOF or error while scanning"); \
- return 1; \
- } nb = val;}
-
-#define computePicSize \
- if (inpic) \
- { \
- if (pictype == 'I') \
- { \
- VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \
- VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \
- } \
- else if (pictype == 'P') \
- { \
- VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \
- VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \
- } \
- else \
- { \
- VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \
- VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \
- } \
- VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \
- VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \
- inpic = 0; \
- }
-
-
-#define FileRead(position, buf, size) \
- { \
- if (fseek(VIDEO_SINGLETON::instance ()->fp, (position), 0) == -1) \
- { \
- perror("VS error on fseek VideoFile"); \
- return (-1); \
- } \
- while (fread((buf), (size), 1, VIDEO_SINGLETON::instance ()->fp) == 0) \
- { if (errno == EINTR) { errno = 0; continue;}\
- perror("VS error on fread VideoFile"); \
- return (-1); \
- } \
- }
-
-#define CheckFrameRange(pnextFrame) \
-{ if ((pnextFrame) < 0 || (pnextFrame) >= VIDEO_SINGLETON::instance ()->numF) \
- { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextFrame(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextFrame), VIDEO_SINGLETON::instance ()->numF); \
- return 0; } }
-
-#define CheckGroupRange(pnextGroup) \
-{ if ((pnextGroup) < 0 || (pnextGroup) >= VIDEO_SINGLETON::instance ()->numG) \
- { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextGroup(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextGroup), VIDEO_SINGLETON::instance ()->numG); \
- return 0; } }
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include "ace/Singleton.h"
-#include "include/common.h"
-#include "mpeg_shared/routine.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/com.h"
-#include "mpeg_shared/sendpt.h"
-#include "mpeg_server/server_proto.h"
-#include "mpeg_server/Video_Server.h"
-
-class Mpeg_Global
-{
-public:
- static int parentpid;
-
- static int listenSocketIn;
- static int listenSocketUn;
-
- static struct linger linger;
-
- static int live_audio;
- static int live_video; /* 0 - no, 1 - to open, 2 - opened */
-
- static int drift_ppm; /* clock drift in ppm */
-
- static int session_limit;
- static int session_num;
- static int rttag;
-};
-
-class Video_Global
-{
-public:
- Video_Global ();
-
- int live_source;
- int video_format;
-
- int pkts_sent;
- time_t start_time;
-
- int conn_tag;
-
- int normalExit;
-
- int serviceSocket;
- int videoSocket;
-
- char videoFile[PATH_SIZE];
- FILE *fp;
- int needHeader;
- int lastRef[2];
- int lastRefPtr;
- int currentUPF;
- int addedUPF;
- int addedSignals;
- int VStimeAdvance;
- double fps; /* current frames-per-second: playback speed */
- double frameRateLimit;
-
- VideoPacket * packet;
- int packetBufSize;
- int msgsn;
- int packetsn;
- int msgsize;
-
- unsigned char precmd;
- unsigned char cmd;
- int cmdsn;
- int nextFrame;
- int nextGroup;
- int firstPatternSize;
- char *firstSendPattern;
- int sendPatternGops;
- char sendPattern [PATTERN_SIZE];
-
-#ifdef STAT
- char * framesSent;
-#endif
-
- int fileSize;
- int maxS;
- int maxG;
- int maxI;
- int maxP;
- int maxB;
- int minS;
- int minG;
- int minI;
- int minP;
- int minB;
- int numS;
- int numG;
- int numF;
- int numI;
- int numP;
- int numB;
- int averageFrameSize;
- int horizontalSize;
- int verticalSize;
- int pelAspectRatio;
- int pictureRate;
- int vbvBufferSize;
- int firstGopFrames;
- int patternSize;
- char pattern [PATTERN_SIZE];
-
- struct SystemHeader
- {
- long offset;
- int size;
- } * systemHeader;
-
- struct GopTable
- {
- int systemHeader;
- long offset;
- int headerSize;
- int size;
- int totalFrames;
- int previousFrames;
- long firstIoffset;
- } * gopTable;
-
- struct FrameTable
- {
- char type;
- unsigned short size;
- } * frameTable;
-
- int preGroup;
- int preHeader;
- int preFrame;
-
- // fast video play locals
- FFpara fast_para;
- PLAYpara play_para;
- int fast_preGroup;
- int fast_preHeader;
-
- // globals functions
- int CmdRead (char *buf, int psize);
- int CmdWrite (char *buf, int size);
- int SendPacket (int shtag, int gop, int frame, int timeToUse);
- int FBread (char *buf, int size);
- int PLAYliveVideo (PLAYpara * para);
- void ComputeFirstSendPattern (float limit);
- int FrameToGroup (int * frame);
- int SendReferences (int group, int frame);
- int send_to_network (int timeToUse);
- void GetFeedBack (void);
- int SendPicture (int *frame);
- int ReadInfoFromFile (void);
- void WriteInfoToFile (void);
- int init_MPEG1_video_file (void);
- int play_send (int debug=0);
- int fast_play_send (void);
- int position (void);
- int step_video (void);
- int fast_forward (void);
- int fast_backward (void);
- int stat_stream (void);
- int stat_sent (void);
- int init_play (void);
- int init_fast_play (void);
- int init_video (void);
-};
-
-typedef ACE_TSS_Singleton <Video_Global, ACE_SYNCH_MUTEX> VIDEO_SINGLETON;
-
-class Video_Timer_Global
-// A class that holds the static timer variables defined in the middle
-// of vs.cpp
-{
-public:
- static int timerHeader;
- static int timerGroup;
- static int timerFrame;
- static int timerOn ;
- static int timerAdjust ;
- static int preTimerVal ;
- static void StartTimer (void);
- static void StopTimer(void);
- static void TimerSpeed(void);
- static void TimerProcessing(void);
- static void timerHandler (int sig);
-};
-
-#endif /* define MPEG_GLOBAL_H */
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile
deleted file mode 100644
index 51d929540b5..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile
+++ /dev/null
@@ -1,1371 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIBNAME = libmpeg_server
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-FILES= as las lvs vs Globals Video_Server Video_Control_State
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-
-LIBS += -lTAO -lACE
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG)#-H
-CPPFLAGS += -DSH_MEM -DNDEBUG -DSunOS -DSTAT -I/project/doc/pkg/X11/include -I../include -I../mpeg_shared
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/as.o .obj/as.so .shobj/as.o .shobj/as.so: as.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- server_proto.h Globals.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- Video_Server.h $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i
-.obj/las.o .obj/las.so .shobj/las.o .shobj/las.so: las.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- server_proto.h Globals.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- Video_Server.h $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i
-.obj/lvs.o .obj/lvs.so .shobj/lvs.o .shobj/lvs.so: lvs.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- server_proto.h Globals.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- Video_Server.h $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i
-.obj/vs.o .obj/vs.so .shobj/vs.o .shobj/vs.so: vs.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- server_proto.h Globals.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- Video_Server.h $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i
-.obj/Globals.o .obj/Globals.so .shobj/Globals.o .shobj/Globals.so: Globals.cpp Globals.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- server_proto.h Video_Server.h \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i
-.obj/Video_Server.o .obj/Video_Server.so .shobj/Video_Server.o .shobj/Video_Server.so: Video_Server.cpp Video_Server.h \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Globals.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- server_proto.h Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i
-.obj/Video_Control_State.o .obj/Video_Control_State.so .shobj/Video_Control_State.o .shobj/Video_Control_State.so: Video_Control_State.cpp Video_Control_State.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Singleton.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \
- Video_Server.h $(TAO_ROOT)/tao/TAO.h \
- Globals.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- server_proto.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp
deleted file mode 100644
index 621277652f9..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp
+++ /dev/null
@@ -1,409 +0,0 @@
-// $Id$
-
-#include "Video_Control_State.h"
-#include "Video_Server.h"
-
-
-Video_Control_State::Video_Control_State ()
- : vch_ (VIDEO_CONTROL_HANDLER_INSTANCE::instance ()->get_video_control_handler ())
-{
-}
-
-Video_Control_State::Video_States
-Video_Control_State::get_state (void)
-{
- return this->state_;
-}
-
-CORBA::Boolean
-Video_Control_State::init_video (const Video_Control::INITvideoPara &para)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::close (void)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::stat_sent (void)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::fast_forward (const Video_Control::FFpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::fast_backward (const Video_Control::FFpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::step (const Video_Control::STEPpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::position (const Video_Control::POSITIONpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::speed (const Video_Control::SPEEDpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_State::stop (CORBA::Long cmdsn)
-
-{
- return 0;
-}
-
-// ----------------------------------------------------------------------
-
-Video_Control_Waiting_State::Video_Control_Waiting_State (void)
-{
- //%%
- this->state_ = VIDEO_WAITING;
-}
-
-int
-Video_Control_Waiting_State::handle_input (ACE_HANDLE h)
-{
- int result;
-
- // fprintf (stderr, "VS: waiting for a new command...\n");
-
- VIDEO_SINGLETON::instance ()->precmd = VIDEO_SINGLETON::instance ()->cmd;
- result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- if (result != 0)
- return -1;
- fprintf(stderr, "VS got VIDEO_SINGLETON::instance ()->cmd %d\n", VIDEO_SINGLETON::instance ()->cmd);
-
- switch (VIDEO_SINGLETON::instance ()->cmd)
- {
- case CmdPOSITION:
- case CmdPOSITIONrelease:
- result = VIDEO_SINGLETON::instance ()->position ();
- if (result != 0)
- return result;
- break;
- case CmdSTEP:
- result = VIDEO_SINGLETON::instance ()->step_video ();
- if (result != 0)
- return result;
- break;
- case CmdFF:
- VIDEO_SINGLETON::instance ()->init_fast_play ();
- this->vch_->change_state (VIDEO_CONTROL_FAST_FORWARD_STATE::instance ());
- break;
- case CmdFB:
- VIDEO_SINGLETON::instance ()->init_fast_play ();
- this->vch_->change_state (VIDEO_CONTROL_FAST_BACKWARD_STATE::instance ());
- break;
- case CmdPLAY:
- VIDEO_SINGLETON::instance ()->init_play ();
- this->vch_->change_state (VIDEO_CONTROL_PLAY_STATE::instance ());
- break;
- case CmdCLOSE:
- VIDEO_SINGLETON::instance ()->normalExit = 1;
- ACE_Reactor::instance ()->end_event_loop ();
- break;
- case CmdSTATstream:
- VIDEO_SINGLETON::instance ()->stat_stream ();
- break;
- case CmdSTATsent:
- VIDEO_SINGLETON::instance ()->stat_sent ();
- break;
- default:
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Video_Server: Unknown command %d",
- VIDEO_SINGLETON::instance ()->cmd));
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- return -1;
- }
- // one command was handled successfully
- return 0;
-
-}
-
-CORBA::Boolean
-Video_Control_Waiting_State::init_video (const Video_Control::INITvideoPara &para)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::close (void)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::stat_sent (void)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::fast_forward (const Video_Control::FFpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::fast_backward (const Video_Control::FFpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::step (const Video_Control::STEPpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::position (const Video_Control::POSITIONpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::speed (const Video_Control::SPEEDpara &para)
-
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Waiting_State::stop (CORBA::Long cmdsn)
-
-{
- return 0;
-}
-
-
-// Video_Control_Play_State methods
-
-Video_Control_Play_State::Video_Control_Play_State (void)
-{
- this->state_ = VIDEO_PLAY;
-}
-
-int
-Video_Control_Play_State::handle_input (ACE_HANDLE h)
-{
- fprintf (stderr,"Video_Control_Play_State::handle_input () \n");
-
- char tmp;
- int result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&tmp, 1);
- if (result != 0)
- return result;
-
- if (tmp == CmdCLOSE) {
- ACE_Reactor::instance ()->end_event_loop ();
- return 0;
- }
- else if (tmp == CmdSTOP) {
- VIDEO_SINGLETON::instance ()->cmd = tmp;
- result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn);
-#endif
- Video_Timer_Global::StopTimer();
-
- // VIDEO_SINGLETON::instance ()->state = Video_Global::INVALID;
- // We need to call the read_cmd of the Video_Server to simulate
- // the control going to a switch..
- // VIDEO_SINGLETON::instance ()->read_cmd ();
-
- // Change the state of the video control handler to waiting state
- // to read further commands.
- this->vch_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ());
- return 0;
- }
- else if (tmp == CmdSPEED)
- {
- SPEEDpara para;
- /*
- fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSPEED. . .\n");
- */
- result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.usecPerFrame = ntohl(para.usecPerFrame);
- para.framesPerSecond = ntohl(para.framesPerSecond);
- para.sendPatternGops = ntohl(para.sendPatternGops);
- para.frameRateLimit1000 = ntohl(para.frameRateLimit1000);
-#endif
- VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0;
- VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops;
- VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame;
- VIDEO_SINGLETON::instance ()->addedUPF = 0;
- memcpy(VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE);
- Video_Timer_Global::TimerSpeed ();
- }
- else
- {
- fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while expect STOP/SPEED.\n", tmp);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- ACE_Reactor::instance ()->end_event_loop ();
- return 1;
- }
- VIDEO_SINGLETON::instance ()->play_send ();// simulating the for loop in vs.cpp
- return 0;
-}
-
-Video_Control_Fast_Forward_State::Video_Control_Fast_Forward_State (void)
-{
- this->state_ = VIDEO_FAST_FORWARD;
-}
-
-int
-Video_Control_Fast_Forward_State::handle_input (ACE_HANDLE h)
-{
- int result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- if (result != 0)
- return result;
- if (VIDEO_SINGLETON::instance ()->cmd == CmdCLOSE) {
- ACE_Reactor::instance ()->end_event_loop ();
- return 0;
- // exit(0);
- }
- else if (VIDEO_SINGLETON::instance ()->cmd != CmdSTOP) {
- fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while STOP is expected.\n", VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- ACE_Reactor::instance ()->end_event_loop ();
- return 1;
- // exit(1);
- }
- result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int));
- if (result != 0 )
- return result;
-#ifdef NeedByteOrderConversion
- VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn);
-#endif
- Video_Timer_Global::StopTimer();
- // VIDEO_SINGLETON::instance ()->state = Video_Global::INVALID;
- // VIDEO_SINGLETON::instance ()->read_cmd ();
-
- //Change the video control handler's state to read further commands
- this->vch_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ());
- return 0;
-}
-
-Video_Control_Fast_Backward_State::Video_Control_Fast_Backward_State (void)
-{
- this->state_ = VIDEO_FAST_BACKWARD;
-}
-
-int
-Video_Control_Fast_Backward_State::handle_input (ACE_HANDLE h)
-{
- int result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- if (result != 0)
- return result;
- if (VIDEO_SINGLETON::instance ()->cmd == CmdCLOSE) {
- ACE_Reactor::instance ()->end_event_loop ();
- return 0;
- // exit(0);
- }
- else if (VIDEO_SINGLETON::instance ()->cmd != CmdSTOP) {
- fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while STOP is expected.\n", VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- ACE_Reactor::instance ()->end_event_loop ();
- return 1;
- // exit(1);
- }
- result = VIDEO_SINGLETON::instance ()->CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int));
- if (result != 0 )
- return result;
-#ifdef NeedByteOrderConversion
- VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn);
-#endif
- Video_Timer_Global::StopTimer();
- // VIDEO_SINGLETON::instance ()->state = Video_Global::INVALID;
- // VIDEO_SINGLETON::instance ()->read_cmd ();
-
- //Change the video control handler's state to read further commands
- this->vch_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ());
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h
deleted file mode 100644
index e8de88746f3..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- C++ -*- */
-
-/* $Id$ */
-
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#if !defined (MPEG_VIDEO_CONTROL_STATE_H)
-#define MPEG_VIDEO_CONTROL_STATE_H
-
-#include "ace/Singleton.h"
-#include "mpeg_shared/Video_ControlS.h"
-
-class Video_Control_Handler;
-
-class Video_Control_State
-{
- // = TITLE
- // Defines an abstract class that is used to implement the state
- // pattern for the video control.
- //
- // = DESCRIPTION
- // The various states of the video control are defined by the
- // Video_States enum. They can be implemented by subclassing from
- // this class and overriding the handle_input method.
-public:
- Video_Control_State ();
- // constructor
-
- enum Video_States
- {
- VIDEO_WAITING,
- VIDEO_PLAY = 1,
- VIDEO_FAST_FORWARD = 2,
- VIDEO_FAST_BACKWARD = 3
- };
-
- virtual int handle_input (ACE_HANDLE h = 0) = 0;
- // state pattern - this is handled differently
- // depending on the state
-
- Video_States get_state (void);
- // returns the current state
-
- void set_state (Video_States state);
- // sets the state
-
- virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara &para) ;
-
- virtual CORBA::Boolean stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size) ;
-
- virtual CORBA::Boolean close (void) ;
-
- virtual CORBA::Boolean stat_sent (void) ;
-
- virtual CORBA::Boolean fast_forward (const Video_Control::FFpara &para) ;
-
- virtual CORBA::Boolean fast_backward (const Video_Control::FFpara &para) ;
-
- virtual CORBA::Boolean step (const Video_Control::STEPpara &para) ;
-
- virtual CORBA::Boolean play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts) ;
-
- virtual CORBA::Boolean position (const Video_Control::POSITIONpara &para) ;
-
- virtual CORBA::Boolean speed (const Video_Control::SPEEDpara &para) ;
-
- virtual CORBA::Boolean stop (CORBA::Long cmdsn) ;
-
-protected:
- Video_States state_;
- // State of this object
-
- Video_Control_Handler *vch_;
- // My Video Control Handler
-};
-
-class Video_Control_Waiting_State : public virtual Video_Control_State
-{
- // = TITLE
- // Defines a class that implements the waiting state of the video
- // control state pattern.
-public:
- Video_Control_Waiting_State (void);
- // Default constructor, sets the state to WAITING
-
- virtual int handle_input (ACE_HANDLE h = 0);
- // Called by the Video_Control_handler when control events occur in
- // the waiting state
- virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara &para);
-
- virtual CORBA::Boolean stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size);
-
- virtual CORBA::Boolean close (void);
-
- virtual CORBA::Boolean stat_sent (void);
-
- virtual CORBA::Boolean fast_forward (const Video_Control::FFpara &para);
-
- virtual CORBA::Boolean fast_backward (const Video_Control::FFpara &para);
-
- virtual CORBA::Boolean step (const Video_Control::STEPpara &para);
-
-
- virtual CORBA::Boolean play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts);
-
- virtual CORBA::Boolean position (const Video_Control::POSITIONpara &para);
-
- virtual CORBA::Boolean speed (const Video_Control::SPEEDpara &para);
-
- virtual CORBA::Boolean stop (CORBA::Long cmdsn);
-};
-
-class Video_Control_Play_State : public virtual Video_Control_State
-{
- // = TITLE
- // Defines a class that implements the playing state of the video
- // control state pattern.
-public:
- Video_Control_Play_State (void);
- // Default constructor, sets the state to VIDEO_PLAY
-
- virtual int handle_input (ACE_HANDLE h = 0);
- // Called by the Video_Control_handler when control events occur in
- // the playing state
-};
-
-class Video_Control_Fast_Forward_State : public virtual Video_Control_State
-{
- // = TITLE
- // Defines a class that implements the fast_forward state of the video
- // control state pattern.
-public:
- Video_Control_Fast_Forward_State (void);
- // Default constructor, sets the state to VIDEO_FAST_FORWARD
-
- virtual int handle_input (ACE_HANDLE h = 0);
- // Called by the Video_Control_handler when control events occur in
- // the fast_forward state
-};
-
-class Video_Control_Fast_Backward_State : public virtual Video_Control_State
-{
- // = TITLE
- // Defines a class that implements the fast_backward state of the video
- // control state pattern.
-public:
- Video_Control_Fast_Backward_State (void);
- // Default constructor, sets the state to VIDEO_FAST_BACKWARD
-
- virtual int handle_input (ACE_HANDLE h = 0);
- // Called by the Video_Control_handler when control events occur in
- // the fast_backward state
-};
-
-// @@ Is there a particular reason we need these to be thread-specific singletons?!
-typedef ACE_TSS_Singleton <Video_Control_Waiting_State, ACE_SYNCH_MUTEX>
- VIDEO_CONTROL_WAITING_STATE;
-typedef ACE_TSS_Singleton <Video_Control_Play_State, ACE_SYNCH_MUTEX>
- VIDEO_CONTROL_PLAY_STATE;
-typedef ACE_TSS_Singleton <Video_Control_Fast_Forward_State, ACE_SYNCH_MUTEX>
- VIDEO_CONTROL_FAST_FORWARD_STATE;
-typedef ACE_TSS_Singleton <Video_Control_Fast_Backward_State, ACE_SYNCH_MUTEX>
- VIDEO_CONTROL_FAST_BACKWARD_STATE;
-
-#endif /* MPEG_VIDEO_SERVER_STATE_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp
deleted file mode 100644
index 1a2e4ee8379..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp
+++ /dev/null
@@ -1,529 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#include "Video_Server.h"
-
-// Video_Sig_Handler methods
-// handles the timeout SIGALRM signal
-Video_Sig_Handler::Video_Sig_Handler (Video_Control_Handler *vch)
- : vch_ (vch)
-{
-}
-
-int
-Video_Sig_Handler::register_handler (void)
-{
- // Assign the Sig_Handler a dummy I/O descriptor. Note that even
- // though we open this file "Write Only" we still need to use the
- // ACE_Event_Handler::NULL_MASK when registering this with the
- // ACE_Reactor (see below).
- this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY);
- ACE_ASSERT (this->handle_ != -1);
-
- // Register signal handler object. Note that NULL_MASK is used to
- // keep the ACE_Reactor from calling us back on the "/dev/null"
- // descriptor.
- if (TAO_ORB_Core_instance ()->reactor ()->register_handler
- (this, ACE_Event_Handler::NULL_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
- -1);
-
- // Create a sigset_t corresponding to the signals we want to catch.
- ACE_Sig_Set sig_set;
-
- // sig_set.sig_add (SIGINT);
- // sig_set.sig_add (SIGQUIT);
- sig_set.sig_add (SIGALRM);
-
- // Register the signal handler object to catch the signals.
- if (TAO_ORB_Core_instance ()->reactor ()->register_handler (sig_set,
- this) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
- -1);
- return 0;
-}
-// Called by the ACE_Reactor to extract the fd.
-
-ACE_HANDLE
-Video_Sig_Handler::get_handle (void) const
-{
- return this->handle_;
-}
-
-int
-Video_Sig_Handler::handle_input (ACE_HANDLE)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n"));
- return 0;
-}
-
-int
-Video_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n"));
- return 0;
-}
-
-// This method handles all the signals that are being caught by this
-// object. In our simple example, we are simply catching SIGALRM,
-// SIGINT, and SIGQUIT. Anything else is logged and ignored.
-//
-// There are several advantages to using this approach. First,
-// the behavior triggered by the signal is handled in the main event
-// loop, rather than in the signal handler. Second, the ACE_Reactor's
-// signal handling mechanism eliminates the need to use global signal
-// handler functions and data.
-
-int
-Video_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *)
-{
- // ACE_DEBUG ((LM_DEBUG, "(%t) received signal %S\n", signum));
-
- switch (signum)
- {
- case SIGALRM:
- // Handle the timeout
- Video_Timer_Global::timerHandler (SIGALRM);
- // send the frame
- // cerr << "current state = " << this->vch_->get_state ()->get_state ();
- switch (this->vch_->get_state ()->get_state ())
- {
- case Video_Control_State::VIDEO_PLAY:
- VIDEO_SINGLETON::instance ()->play_send ();
- break;
- case Video_Control_State::VIDEO_FAST_FORWARD:
- // this handles the forward play case!
- VIDEO_SINGLETON::instance ()->fast_play_send ();
- break;
- case Video_Control_State::VIDEO_FAST_BACKWARD:
- // this handles the backward play case!
- VIDEO_SINGLETON::instance ()->fast_play_send ();
- break;
- default:
- break;
- }
- break;
- default:
- ACE_DEBUG ((LM_DEBUG,
- "(%t) %S: not handled, returning to program\n",
- signum));
- break;
- }
- return 0;
-}
-
-// Video_Data_Handler methods
-
-Video_Data_Handler::Video_Data_Handler (int video_data_fd,
- Video_Control_Handler *vch)
- : data_handle_ (video_data_fd),
- vch_ (vch)
-{
-}
-
-ACE_HANDLE
-Video_Data_Handler::get_handle (void) const
-{
- return this->data_handle_ ;
-}
-
-int
-Video_Data_Handler::handle_input (ACE_HANDLE handle)
-{
- fprintf (stderr,"Video_Data_Handler::handle_input ()\n");
-
- switch (this->vch_->get_state ()->get_state ())
- {
- case Video_Control_State::VIDEO_PLAY:
- VIDEO_SINGLETON::instance ()->GetFeedBack ();
- VIDEO_SINGLETON::instance ()->play_send (); // simulating the for loop in playvideo () in vs.cpp
- break;
- case Video_Control_State::VIDEO_FAST_FORWARD:
- case Video_Control_State::VIDEO_FAST_BACKWARD:
- VIDEO_SINGLETON::instance ()->GetFeedBack ();
- VIDEO_SINGLETON::instance ()->fast_play_send (); // simulating the for loop in fast_play
- break;
- }
- return 0;
-}
-
-// Video_Control_Handler methods
-
-Video_Control_Handler::Video_Control_Handler (int control_fd)
- : control_handle_ (control_fd)
-{
-}
-
-// Called by the reactor to extract the handle associated with this handler.
-ACE_HANDLE
-Video_Control_Handler::get_handle (void) const
-{
- return this->control_handle_ ;
-}
-
-// Called by the Reactor when data is ready to be read from the
-// video control handle, which indicates a control message from the client.
-int
-Video_Control_Handler::handle_input (ACE_HANDLE handle)
-{
- if (this->state_->handle_input (handle) != 0)
- return TAO_ORB_Core_instance ()->reactor ()-> remove_handler (this,
- ACE_Event_Handler::READ_MASK);
- else
- return 0;
- // state pattern
-}
-
-// Returns the current state object .
-Video_Control_State *
-Video_Control_Handler::get_state (void)
-{
- return this->state_;
-}
-
-CORBA::Boolean
-Video_Control_Handler::init_video (const Video_Control::INITvideoPara &para,
- CORBA::Environment&)
-{
- //this->state_->init_video (para);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size,
- CORBA::Environment&)
-{
- //this->state_->stat_stream (ch,size);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::close (CORBA::Environment&)
-{
- //this->state_->close ();
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::stat_sent (CORBA::Environment&)
-{
- //this->state_->stat_sent ();
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::fast_forward (const Video_Control::FFpara &para,
- CORBA::Environment&)
-{
- //this->state_->fast_forward (para);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::fast_backward (const Video_Control::FFpara &para,
- CORBA::Environment&)
-{
- //this->state_->fast_backward (para);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::step (const Video_Control::STEPpara &para,
- CORBA::Environment&)
-{
- //this->state_->step (para);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts,
- CORBA::Environment&)
-{
- //this->state_->play (para,vts);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::position (const Video_Control::POSITIONpara &para,
- CORBA::Environment&)
-{
- //this->state_->position (para);
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_Handler::speed (const Video_Control::SPEEDpara &para,
- CORBA::Environment&)
-{
- //this->state_->speed (para);
- return 0;
-}
-
-// ~~ Why do you need the Environment
-
-CORBA::Boolean
-Video_Control_Handler::stop (CORBA::Long cmdsn,
- CORBA::Environment&)
-{
- //this->state_->stop (cmdsn);
- return 0;
-}
-
-// Changes the state of the video control handler from the current
-// state to the state represented by the argument.
-void
-Video_Control_Handler::change_state (Video_Control_State *state)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Video_Control_Handler::Changing to state %d\n",
- state->get_state ()));
- this->state_ = state;
-}
-
-
-
-// ----------------------------------------------------------------------
-// Video_Control_Handler_Instance methods.
-
-// Default constructor
-Video_Control_Handler_Instance::Video_Control_Handler_Instance (void)
-{
-}
-
-// Sets the video_control_handler associated with this instance singleton.
-void
-Video_Control_Handler_Instance::set_video_control_handler (Video_Control_Handler *h)
-{
- this->video_control_handler_ = h;
-}
-
-// Accessor method to the associated video_control_handler
-Video_Control_Handler *
-Video_Control_Handler_Instance::get_video_control_handler (void)
-{
- return this->video_control_handler_;
-}
-
-// ----------------------------------------------------------------------
-// Video_Server methods
-
-// Do-nothing default constructor.
-Video_Server::Video_Server ()
-{
-}
-
-// Constructor with arguments control_fd,data_fd,real-time tag,maximum
-// packet size.Calls the init methods with these arguments.
-Video_Server::Video_Server (int ctr_fd,
- int data_fd,
- int rttag,
- int max_pkt_size)
- : data_handler_ (0),
- control_handler_ (0),
- sig_handler_ (0)
-{
- this->init (ctr_fd,
- data_fd,
- rttag,
- max_pkt_size);
-}
-
-// initialize VIDEO_SINGLETON::instance ()
-// creates a data and control handler for the video
-// server. the control handler will accept
-// commands over TCP, and the data handler will
-// send data packets and recieve feedback packets
-// from the client
-// the reactor_ also gets initialized here
-int
-Video_Server::init (int ctr_fd,
- int data_fd,
- int rttag,
- int max_pkt_size)
-{
- int result;
-
- // Associate the default ACE_Reactor instance as the reactor .
- this->reactor_ = TAO_ORB_Core_instance ()->reactor ();
-
- // Create the control,data and signal handlers.
- ACE_NEW_RETURN (this->control_handler_,
- Video_Control_Handler (ctr_fd),
- -1);
-
- VIDEO_CONTROL_HANDLER_INSTANCE::instance ()->set_video_control_handler (this->control_handler_);
-
- ACE_NEW_RETURN (this->data_handler_ ,
- Video_Data_Handler (data_fd,
- this->control_handler_),
- -1);
-
- ACE_NEW_RETURN (this->sig_handler_,
- Video_Sig_Handler (this->control_handler_),
- -1);
-
- // @@ Can you please change the use of "fd" to "handle" globally?
- // Set the global socket fd's from the arguments.
- VIDEO_SINGLETON::instance ()->serviceSocket = ctr_fd;
- VIDEO_SINGLETON::instance ()->videoSocket = data_fd;
- VIDEO_SINGLETON::instance ()->conn_tag = max_pkt_size;
-
- if (max_pkt_size > 0) VIDEO_SINGLETON::instance ()->msgsize = max_pkt_size;
- else if (max_pkt_size < 0) VIDEO_SINGLETON::instance ()->msgsize = - max_pkt_size;
- else VIDEO_SINGLETON::instance ()->msgsize = 1024 * 1024;
- /*
- SFprintf(stderr, "VS VIDEO_SINGLETON::instance ()->msgsize = %d\n", VIDEO_SINGLETON::instance ()->msgsize);
- */
- VIDEO_SINGLETON::instance ()->msgsize -= sizeof(VideoMessage);
-
- VIDEO_SINGLETON::instance ()->start_time = time(NULL);
-
- // Set the atexit routine
- atexit (on_exit_routine);
-
- VIDEO_SINGLETON::instance ()->lastRef[0] = VIDEO_SINGLETON::instance ()->lastRef[1] = -1;
- VIDEO_SINGLETON::instance ()->lastRefPtr = 0;
-
- VIDEO_SINGLETON::instance ()->init_video ();
-
- if (rttag) {
- if (SetRTpriority("VS", 0) == -1) rttag = 0;
- }
- // sets the video control handler state to be waiting
- this->control_handler_->change_state
- (VIDEO_CONTROL_WAITING_STATE::instance ());
- return 0;
-}
-
-int
-Video_Server::register_handlers (void)
-{
- int result;
-
- // Register the event handlers with the default ACE_REACTOR.
-
- // first the data handler, i.e. UDP
- result = this->reactor_->register_handler (this->data_handler_,
- ACE_Event_Handler::READ_MASK);
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) register_handler for data_handler failed\n"),
- result);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) registered fd for data handler = (%d)\n",
- this->data_handler_->get_handle ()));
-
-
- // next, the control handler, i.e. TCP
- result = this->reactor_->register_handler (this->control_handler_,
- ACE_Event_Handler::READ_MASK);
-
-
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) register_handler for data_handler failed\n"),
- result);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) registered fd for control handler = (%d)\n",
- this->control_handler_->get_handle ()));
-
- // finally, the signal handler, for periodic transmission
- // of packets
- result = this->sig_handler_->register_handler ();
-
-
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) register_handler for sig_handler"
- "failed!\n"),
- -1);
-
- return 0;
-}
-
-void
-Video_Server::on_exit_routine(void)
-{
- struct sockaddr_in peeraddr_in;
- int size = sizeof(peeraddr_in);
- /*
- if (!VIDEO_SINGLETON::instance ()->normalExit) {
- fprintf(stderr, "VS exitting abnormally, dump core...\n");
- kill(getpid(), SIGSEGV);
- usleep(2000000);
- }
- */
- /*
- fprintf(stderr, "A VS session terminated.\n");
- */
- if (getpeername(VIDEO_SINGLETON::instance ()->serviceSocket,
- (struct sockaddr *)&peeraddr_in, &size) == 0 &&
- peeraddr_in.sin_family == AF_INET) {
- if (strncmp(inet_ntoa(peeraddr_in.sin_addr), "129.95.50", 9)) {
- struct hostent *hp;
- time_t val = time(NULL);
- char * buf = ctime(&VIDEO_SINGLETON::instance ()->start_time);
-
- hp = gethostbyaddr((char *)&(peeraddr_in.sin_addr), 4, AF_INET);
- buf[strlen(buf)-1] = 0;
- printf("%s: %s %3dm%02ds %dP %s\n",
- buf,
- hp == NULL ? inet_ntoa(peeraddr_in.sin_addr) : hp->h_name,
- (val - VIDEO_SINGLETON::instance ()->start_time) / 60, (val - VIDEO_SINGLETON::instance ()->start_time) % 60,
- VIDEO_SINGLETON::instance ()->pkts_sent, VIDEO_SINGLETON::instance ()->videoFile);
- }
- }
- /*
- ComCloseConn(VIDEO_SINGLETON::instance ()->serviceSocket);
- ComCloseConn(VIDEO_SINGLETON::instance ()->videoSocket);*/
-}
-
-// Destructor
-Video_Server::~Video_Server ()
-{
- if (this->data_handler_ != 0)
- delete this->data_handler_ ;
- if (this->control_handler_ != 0)
- delete this->control_handler_ ;
- if (this->sig_handler_ != 0)
- delete this->sig_handler_ ;
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h
deleted file mode 100644
index f12c519bfc6..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- C++ -*- */
-/* $Id$ */
-
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#if !defined (MPEG_VIDEO_SERVER_H)
-#define MPEG_VIDEO_SERVER_H
-
-#include "ace/Reactor.h"
-#include "ace/Event_Handler.h"
-
-#include "tao/TAO.h"
-#include "include/common.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/com.h"
-#include "mpeg_shared/routine.h"
-#include "mpeg_shared/sendpt.h"
-#include "mpeg_shared/Video_ControlS.h"
-#include "mpeg_server/server_proto.h"
-#include "mpeg_server/Video_Control_State.h"
-#include "mpeg_server/Globals.h"
-
-class Video_Control_Handler : public virtual ACE_Event_Handler
-{
- // = TITLE
- // Defines the event handler class for the Video Control.
- //
- // = DESCRIPTION
- // This class makes use of a TCP socket.It contains a pointer to
- // the current state which is implemented using the state pattern.
-public:
-
- Video_Control_Handler (int video_control_fd);
- // Construct this handler with a control (TCP) fd
- // %% use sock stream instead of fd
-
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when input events occur (e.g., connection or data).
-
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the handle used by the event_handler.
-
- Video_Control_State *get_state (void);
- // Accessor for the state_
-
- void change_state (Video_Control_State *state);
- // Used to change the state
-
- virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean close (CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean stat_sent (CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean fast_forward (const Video_Control::FFpara &para,
- CORBA::Environment &_tao_environment
- );
-
- virtual CORBA::Boolean fast_backward (const Video_Control::FFpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean step (const Video_Control::STEPpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean position (const Video_Control::POSITIONpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean speed (const Video_Control::SPEEDpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean stop (CORBA::Long cmdsn,
- CORBA::Environment &_tao_environment);
-
-private:
- Video_Control_State *state_;
- // State pattern - pointer to abstract State object
-
- ACE_HANDLE control_handle_;
-};
-
-class Video_Control_Handler_Instance
-{
- // = TITLE
- // Defines a Video_Control_Handler_Instance class which is to be
- // used as a singleton to give access to a Video_Control_Handler
- // instance to the state pattern classes.
- //
- // = DESCRIPTION
- // The Video_Control_Handler has to be set using the
- // set_video_control_handler method.
-public:
- // @@ Please add comments to these methods.
- Video_Control_Handler_Instance (void);
-
- void set_video_control_handler (Video_Control_Handler *h);
-
- Video_Control_Handler *get_video_control_handler (void);
-
-private:
- Video_Control_Handler *video_control_handler_;
-};
-
-// Video_Control_Handler instance singleton.
-//@@ Does this really need to be a thread-specific singleton?
-typedef ACE_TSS_Singleton <Video_Control_Handler_Instance,
- ACE_SYNCH_MUTEX>
- VIDEO_CONTROL_HANDLER_INSTANCE;
-
-class Video_Sig_Handler : public virtual ACE_Event_Handler
-{
- // = TITLE
- // Defines a video signal handler class which registers itself with the
- // default ACE_Reactor::instance () . Handles the
- // SIGALRM signal.
- //
- // = DESCRIPTION
- // This class contains a pointer to a Video_Control_Handler
- // instance and decides the signal action depending on its state.
- // An object of this class is used to periodically send the video
- // frames to the client using the Video_Timer_Global class.
-public:
- Video_Sig_Handler (Video_Control_Handler *vch);
-
- virtual ACE_HANDLE get_handle (void) const;
-
- int register_handler (void);
- // this will register this sig_handler
- // with the reactor for SIGALRM
-
- virtual int shutdown (ACE_HANDLE,
- ACE_Reactor_Mask);
-
- virtual int handle_input (ACE_HANDLE);
-
- virtual int handle_signal (ACE_HANDLE signum,
- siginfo_t * = 0,
- ucontext_t* = 0);
-private:
- ACE_HANDLE handle_;
- // my handle
-
- Video_Control_Handler *vch_;
- // Pointer to the control handler, for accessing
- // the current state of the server.
-};
-
-class Video_Data_Handler : public virtual ACE_Event_Handler
-{
- // = TITLE
- // Defines a event handler for video data using a datagram i.e UDP
- // socket.
- //
- // = DESCRIPTION
- // This takes a pointer to a Video_Control_Handler instance and
- // reacts differently to the events based on the
- // video_control_handler's state.
-public:
- Video_Data_Handler (int video_data_fd,
- Video_Control_Handler *vch);
- // Construct this handler with a data fd
-
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when input events occur (e.g., connection or data).
-
- virtual ACE_HANDLE get_handle (void) const;
- // Get the handle used by this event handler
-
-private:
- ACE_HANDLE data_handle_;
- // my handle
-
- Video_Control_Handler *vch_;
- // Pointer to the control handler, for accessing
- // the current state of the server.
-};
-
-class Video_Server
-{
- // = TITLE
- // Defines a class that abstracts the functionality of a
- // video_server.
- //
- // = DESCRIPTION
- // This registers 3 event handlers with the <ACE_Reactor::instance>,
- // namely a control,data and signal handlers.
-public:
- Video_Server (void);
- // Default constructor
-
- Video_Server (int control_fd,
- int data_fd,
- int rttag,
- int max_pkt_size);
- // constructor taking the handles
-
- ~Video_Server ();
- // Destructor
-
- int init (int control_fd,
- int data_fd,
- int rttag,
- int max_pkt_size);
- // initialize the Video Server.
-
- int register_handlers (void);
- // register the handlers with the reactor
- // and set the control_handler to the WAITING state
-
- static void on_exit_routine(void);
-
-private:
-
- ACE_Reactor* reactor_;
- // alias Reactor ,points to ACE_Reactor::instance ()
-
- Video_Data_Handler* data_handler_;
- // Data Socket Event Handler
-
- Video_Control_Handler* control_handler_;
- // Control Socket Event Handler
-
- Video_Sig_Handler *sig_handler_;
- // signal handler for SIGALRM to periodically send the video frames
- // to the client
-};
-
-#endif /* MPEG_VIDEO_SERVER_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp
deleted file mode 100644
index 560ab606b87..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp
+++ /dev/null
@@ -1,705 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <sys/types.h>
-#include <netdb.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/time.h>
-#include <stdio.h>
-#include <errno.h>
-#include <signal.h>
-#include "include/common.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/routine.h"
-#include "mpeg_shared/com.h"
-#include "server_proto.h"
-
-//extern int Mpeg_Global::session_limit, Mpeg_Global::session_num;
-
-static bytes_sent = 0;
-static time_t start_time;
-
-static int conn_tag;
-
-static int serviceSocket;
-static int audioSocket = -1;
-
-static char audioFile[PATH_SIZE];
-static int fd;
-static AudioParameter audioPara;
-static int totalSamples;
-static int fileSize;
-static unsigned char cmd;
-static live_source = 0;
-
-static int CmdRead(char *buf, int psize)
-{
- int res = wait_read_bytes(serviceSocket, buf, psize);
- if (res == 0) return (1);
- if (res == -1) {
- fprintf(stderr, "AS error on read cmdSocket, size %d", psize);
- perror("");
- return (-1);
- }
- return 0;
-}
-
-static void CmdWrite(char *buf, int size)
-{
- int res = wait_write_bytes(serviceSocket, buf, size);
- if (res == -1) {
- if (errno != EPIPE) perror("AS writes to serviceSocket");
- exit(errno != EPIPE);
- }
-}
-
-static int INITaudio(void)
-{
- int result;
- int failureType; /* 0 - can't open file, 1 - can't open live source */
- INITaudioPara para;
-
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.version = ntohl(para.version);
- para.nameLength = ntohl(para.nameLength);
- para.para.encodeType = ntohl(para.para.encodeType);
- para.para.channels = ntohl(para.para.channels);
- para.para.samplesPerSecond = ntohl(para.para.samplesPerSecond);
- para.para.bytesPerSample = ntohl(para.para.bytesPerSample);
-#endif
- if (para.nameLength>0)
- result = CmdRead(audioFile, para.nameLength);
- if (result != 0)
- return result;
- if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) {
- char errmsg[128];
- cmd = CmdFAIL;
- CmdWrite((char *)&cmd, 1);
- if (Mpeg_Global::session_num > Mpeg_Global::session_limit) {
- sprintf(errmsg,
- "Too many sessions being serviced, please try again later.\n");
- }
- else {
- sprintf(errmsg, "Version # not match, AS %d.%02d, Client %d.%02d",
- VERSION / 100, VERSION % 100,
- para.version / 100, para.version % 100);
- }
- write_string(serviceSocket, errmsg);
- return(1);
- }
- memcpy(&audioPara, &para.para, sizeof(audioPara));
- /*
- fprintf(stderr, "Client Audio para: encode %d, ch %d, sps %d, bps %d.\n",
- para.para.encodeType, para.para.channels,
- para.para.samplesPerSecond, para.para.bytesPerSample);
- */
- audioFile[para.nameLength] = 0;
- {
- int len = strlen(audioFile);
- if (strncasecmp("LiveAudio", audioFile, 9) &&
- strcasecmp(".au", audioFile+len-3)) {
- char errmsg[128];
- cmd = CmdFAIL;
- CmdWrite((char *)&cmd, 1);
- sprintf(errmsg, "%s without suffix .au", audioFile);
- write_string(serviceSocket, errmsg);
- return(1);
- }
- }
- /*
- fprintf(stderr, "Audio file %s got.\n", audioFile);
- */
-
- if (!strncasecmp("LiveAudio", audioFile, 9)) {
- fd = OpenLiveAudio(&(para.para));
- if (fd == -1) {
- failureType = 1;
- goto failure;
- }
- fileSize =0x7fffffff;
- totalSamples = fileSize / audioPara.bytesPerSample;
- live_source = 1;
- }
- else {
- LeaveLiveAudio();
- fd = open(audioFile, O_RDONLY);
- if (fd == -1)
- {
- fprintf(stderr, "AS error on opening audio file %s", audioFile);
- perror("");
- failureType = 0;
- goto failure;
- }
-
- /* Try to get audioFile format audioPara here */
-
- /* figure out totalsamples */
- fileSize = lseek(fd, 0L, SEEK_END);
- lseek(fd, 0L, SEEK_SET);
- totalSamples = fileSize / audioPara.bytesPerSample;
- /*
- fprintf(stderr, "Total Samples=%d in audio file %ss.\n", totalSamples, audioFile);
- */
- }
- {
- INITaudioReply reply;
-
- reply.para.encodeType = htonl(audioPara.encodeType);
- reply.para.channels = htonl(audioPara.channels);
- reply.para.samplesPerSecond = htonl(audioPara.samplesPerSecond);
- reply.para.bytesPerSample = htonl(audioPara.bytesPerSample);
- reply.totalSamples = htonl(totalSamples);
-
- reply.live = htonl(live_source);
- reply.format = htonl(AUDIO_RAW);
-
- CmdWrite((char *)&cmd, 1);
- CmdWrite((char *)&reply, sizeof(reply));
- }
- return 0;
-
- failure:
- {
- /*
- fprintf(stderr, "AS error: failed initializing audio file.\n");
- */
- cmd = CmdFAIL;
- CmdWrite((char *)&cmd, 1);
- write_string(serviceSocket,
- failureType == 0 ? "Failed to open audio file for read." :
- "Failed to connect to live audio source.");
- return(1);
- }
-}
-
-#define DATABUF_SIZE 500
-
-static int databuf_size;
-static int cmdsn;
-static int nextsample;
-static int sps; /* audio play speed given by the client: samples per second */
-static int spslimit;
-static int spp; /* samples per packet */
-static AudioPacket * pktbuf = NULL;
-
-/* send a packet of audio samples to audioSocket
- returns: 0 - no more data from audio file: EOF reached;
- 1 - More data is available from the audio file */
-static int send_packet(int firstSample, int samples)
-{
- long offset = firstSample * audioPara.bytesPerSample;
- int size = samples * audioPara.bytesPerSample;
- char * buf = (char *)pktbuf + sizeof(*pktbuf);
- int len;
- int resent = 0;
- int segsize, sentsize;
-
- if (live_source) {
- len = ReadLiveAudioSamples(buf, samples);
- len *= audioPara.bytesPerSample;
- }
- else {
- lseek(fd, offset, SEEK_SET);
- while ((len = read(fd, buf, size)) == -1) {
- if (errno == EINTR)
- continue; /* interrupted */
- perror("AS error on read audio file");
- return(-1);
- }
- if (len < audioPara.bytesPerSample) {
- return 0;
- }
- }
-
- samples = len / audioPara.bytesPerSample;
- len = samples * audioPara.bytesPerSample;
- bytes_sent += len;
- pktbuf->firstSample = htonl(firstSample);
- pktbuf->samples = htonl(samples);
- pktbuf->actualSamples = htonl(samples);
- pktbuf->dataBytes = htonl(len);
- if (spslimit < sps) { /* interpolation needed */
- SFprintf(stderr, "AS audio sample interpolation not available yet.\n");
- }
- segsize = sizeof(*pktbuf) + len;
- if (conn_tag != 0) {
- while ((sentsize = write(audioSocket, (char *)pktbuf, segsize)) == -1) {
- if (errno == EINTR) /* interrupted */
- continue;
- if (errno == ENOBUFS) {
- if (resent) {
- perror("AS Warning, pkt discarded because");
- break;
- }
- else {
- resent = 1;
- usleep(5000);
- continue;
- }
- }
- if (errno != EPIPE) {
- fprintf(stderr, "AS error on send audio packet %d(%d):",
- firstSample, samples);
- perror("");
- }
- exit((errno != EPIPE));
- }
- }
- else {
- sentsize = wait_write_bytes(audioSocket, (char *)pktbuf, segsize);
- if (sentsize == -1) {
- if (errno != EPIPE) {
- fprintf(stderr, "AS error on send audio packet %d(%d):",
- firstSample, samples);
- perror("");
- }
- exit((errno != EPIPE));
- }
- }
- if (sentsize < segsize) {
- SFprintf(stderr, "AS warning: message size %dB, sent only %dB\n",
- segsize, sentsize);
- }
- /*
- SFprintf(stderr, "AS sent audio packet %d(%d).\n",
- firstSample, samples);
- */
- return (len < size ? 0 : 1);
-}
-
-/* send a packet of audio samples to audioSocket
- returns: 0 - no more data from audio file: EOF reached;
- 1 - More data is available from the audio file */
-static int SendPacket(void)
-{
- int moredata;
- pktbuf->cmdsn = htonl(cmdsn);
- pktbuf->resend = htonl(0);
- pktbuf->samplesPerSecond = htonl(sps);
- moredata = send_packet(nextsample, spp);
- if (moredata) {
- nextsample += spp;
- }
- return moredata;
-}
-
-static void ResendPacket(int firstsample, int samples)
-{
- pktbuf->cmdsn = htonl(cmdsn);
- pktbuf->resend = htonl(1);
- pktbuf->samplesPerSecond = htonl(sps);
- while (samples > 0) {
- int size = samples < spp ? samples : spp;
- send_packet(firstsample, size);
- firstsample += size;
- samples -= size;
- if (samples > 0) {
- usleep(10000);
- }
- }
-}
-
-#define SPEEDUP_SCALE 5
-#define MAX_RESEND_REQS 10
-#define FBBUF_SIZE (sizeof(AudioFeedBackPara) + \
- (MAX_RESEND_REQS - 1) * sizeof(APdescriptor))
-
-static AudioFeedBackPara * fbpara = NULL;
-
-static int PLAYaudio(void)
-{
- int hasdata = 1;
- int addSamples;
- int packets = 0;
- unsigned nextTime;
- int upp; /* micro-seconds per packet */
- int delta_sps = 0; /* compensation for sps from feedback msgs */
- int nfds = (serviceSocket > audioSocket ? serviceSocket : audioSocket) + 1;
- int result;
- /*
- fprintf(stderr, "PLAY . . .\n");
- */
- {
- PLAYaudioPara para;
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.nextSample = ntohl(para.nextSample);
- para.samplesPerSecond = ntohl(para.samplesPerSecond);
- para.samplesPerPacket = ntohl(para.samplesPerPacket);
- para.ABsamples = ntohl(para.ABsamples);
- para.spslimit = ntohl(para.spslimit);
-#endif
- nextsample = para.nextSample;
- cmdsn = para.sn;
- sps = para.samplesPerSecond;
- spslimit = para.spslimit;
- spp = para.samplesPerPacket;
- addSamples = para.ABsamples / 2;
- if (spp * audioPara.bytesPerSample > databuf_size) {
- spp = databuf_size / audioPara.bytesPerSample;
- }
- /*
- SFprintf(stderr, "AS got CmdPLAY: sps %d\n", sps);
- */
- }
- /*
- fprintf(stderr, "AS: nextSampe=%d for PLAY.\n", para.nextSample);
- */
-
- upp = (int)(1000000.0 / ((double)sps / (double)spp));
- nextTime = get_usec();
-
- CmdWrite((char *)&nextTime, sizeof(int));
-
- if (live_source) {
- StartPlayLiveAudio();
- }
-
- for (;;)
- {
- struct fd_set read_mask, write_mask;
- struct timeval tval;
- unsigned curTime = get_usec();
-
- if (hasdata) {
- if (addSamples < - spp) { /* slow down by not sending packets */
- nextTime += upp;
- addSamples += spp;
- }
- else {
- int need_sleep = 0;
- while (nextTime <= curTime && hasdata) {
- if (need_sleep) usleep(5000);
- hasdata = SendPacket();
- need_sleep = 1;
- packets ++;
- nextTime += upp;
- if (addSamples > 0 && packets % SPEEDUP_SCALE == 0) {
- addSamples -= spp;
- usleep(5000);
- hasdata = SendPacket();
- packets ++;
- }
- }
- }
- }
- curTime = nextTime - curTime;
- if (curTime > 5000000) curTime = 5000000; /* limit on 5 second weit time
- in case error happens */
- tval.tv_sec = curTime / 1000000;
- tval.tv_usec = curTime % 1000000;
- FD_ZERO(&read_mask);
- FD_SET(serviceSocket, &read_mask);
- FD_SET(audioSocket, &read_mask);
-#ifdef _HPUX_SOURCE
- if (select(nfds, (int *)&read_mask, NULL, NULL, hasdata ? &tval : NULL) == -1)
-#else
- if (select(nfds, &read_mask, NULL, NULL, hasdata ? &tval : NULL) == -1)
-#endif
- {
- if (errno == EINTR)
- continue;
- perror("AS error on select reading or writing");
- return(-1);
- }
- if (FD_ISSET(serviceSocket, &read_mask)){ /* STOP, SPEED, or CLOSE*/
- unsigned char tmp;
- result = CmdRead((char *)&tmp, 1);
- if (result != 0)
- return result;
- switch (tmp)
- {
- case CmdSPEED:
- {
- SPEEDaudioPara para;
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.samplesPerSecond = ntohl(para.samplesPerSecond);
- para.samplesPerPacket = ntohl(para.samplesPerPacket);
- para.spslimit = ntohl(para.spslimit);
-#endif
- sps = para.samplesPerSecond;
- spslimit = para.spslimit;
- spp = para.samplesPerPacket;
- if (spp * audioPara.bytesPerSample > databuf_size) {
- spp = databuf_size / audioPara.bytesPerSample;
- }
- delta_sps = 0; /* reset compensation value */
- upp = (int)(1000000.0 / ((double)sps / (double)spp));
- /*
- SFprintf(stderr, "AS got CmdSPEED: sps %d\n", sps);
- */
- }
- break;
- case CmdSTOP:
- {
- int val;
- cmd = tmp;
- /*
- fprintf(stderr, "AS: CmdSTOP. . .\n");
- */
- result = CmdRead((char *)&val, sizeof(int));
- if (result != 0)
- return result;
- /*
- CmdWrite(AUDIO_STOP_PATTERN, strlen(AUDIO_STOP_PATTERN));
- */
- if (live_source) {
- StopPlayLiveAudio();
- }
- return 0; /* return from PLAYaudio() */
- }
- case CmdCLOSE:
- if (live_source) {
- StopPlayLiveAudio();
- }
- return(1); /* The whole AS session terminates */
- default:
- if (live_source) {
- StopPlayLiveAudio();
- }
- fprintf(stderr, "AS error: cmd=%d while expects STOP/SPEED/CLOSE.\n", tmp);
- return(-1);
- }
- }
-
- if (FD_ISSET(audioSocket, &read_mask)){ /* Feedback packet */
- int bytes, len;
- for (;;) {
- if (conn_tag >= 0) {
- len = wait_read_bytes(audioSocket, (char *)fbpara, sizeof(*fbpara));
- if (len == 0) return(1); /* connection broken */
- else if (len < 0) { /* unexpected error */
- perror("AS read1 FB");
- return(-1);
- }
- }
- else { /* discard mode packet stream, read the whole packet */
- len = read(audioSocket, (char *)fbpara, FBBUF_SIZE);
- }
- if (len == -1) {
- if (errno == EINTR) continue; /* interrupt */
- else {
- if (errno != EPIPE && errno != ECONNRESET) perror("AS failed to read() fbmsg header");
- break;
- }
- }
- break;
- }
- if (len < sizeof(*fbpara)) {
- if (len > 0) fprintf(stderr,
- "AS warn read() len %dB < sizeof(*fbpara) %dB\n",
- len, sizeof(*fbpara));
- continue;
- }
-#ifdef NeedByteOrderConversion
- fbpara->type = ntohl(fbpara->type);
-#endif
- bytes = (fbpara->type > 0) ?
- sizeof(APdescriptor) * (fbpara->type - 1) :
- 0;
- if (bytes > 0) {
- if (conn_tag >= 0) { /* not discard mode packet stream,
- read the rest of packet */
- len = wait_read_bytes(audioSocket,
- ((char *)fbpara) + sizeof(*fbpara),
- bytes);
- if (len == 0) return(1); /* connection broken */
- else if (len < 0) { /* unexpected error */
- perror("AS read2 FB");
- return(-1);
- }
- len += sizeof(*fbpara);
- }
- }
- bytes += sizeof(*fbpara);
- if (len < bytes) {
- if (len > 0) fprintf(stderr,
- "AS only read partial FBpacket, %dB out of %dB.\n",
- len, bytes);
- continue;
- }
- if (live_source) { /* ignore all feedback messags for live source */
- continue;
- }
-
-#ifdef NeedByteOrderConversion
- fbpara->cmdsn = ntohl(fbpara->cmdsn);
-#endif
- if (len != sizeof(*fbpara) +
- (fbpara->type ? (fbpara->type -1) * sizeof(APdescriptor) : 0)) {
- /* unknown message, discard */
- SFprintf(stderr, "AS Unkown fb msg: len = %d, type = %d\n",
- len, fbpara->type);
- continue;
- }
- if (fbpara->cmdsn != cmdsn) { /* discard the outdated message */
- continue;
- }
-#ifdef NeedByteOrderConversion
- {
- int i, * ptr = (int *)fbpara + 2;
- for (i = 0; i < (len >> 2) - 2; i++) *ptr = ntohl(*ptr);
- }
-#endif
- if (fbpara->type == 0) { /* feedback message */
- /*
- SFprintf(stderr, "AS got fbmsg: addsamples %d, addsps %d\n",
- fbpara->data.fb.addSamples, fbpara->data.fb.addsps);
- */
- addSamples += fbpara->data.fb.addSamples;
- if (fbpara->data.fb.addsps) {
- delta_sps += fbpara->data.fb.addsps;
- upp = (int)(1000000.0 / ((double)(sps + delta_sps) / (double)spp));
- }
- }
- else { /* resend requests */
- APdescriptor * req = &(fbpara->data.ap);
- int i;
- /*
- SFprintf(stderr, "AS got %d resend reqs\n", fbpara->type);
- */
- for (i = 0; i < fbpara->type; i ++) {
- ResendPacket(req->firstSample, req->samples);
- req ++;
- }
- }
- }
- }
-}
-
-static void on_exit_routine(void)
-{
- struct sockaddr_in peeraddr_in;
- int size = sizeof(peeraddr_in);
-
- /*
- fprintf(stderr, "An AS session terminated\n");
- */
- if (getpeername(serviceSocket,
- (struct sockaddr *)&peeraddr_in, &size) == 0 &&
- peeraddr_in.sin_family == AF_INET) {
- if (strncmp(inet_ntoa(peeraddr_in.sin_addr), "129.95.50", 9)) {
- struct hostent *hp;
- time_t val = time(NULL);
- char * buf = ctime(&start_time);
-
- hp = gethostbyaddr((char *)&(peeraddr_in.sin_addr), 4, AF_INET);
- buf[strlen(buf)-1] = 0;
- printf("%s: %s %3dm%02ds %dB %s\n",
- buf,
- hp == NULL ? inet_ntoa(peeraddr_in.sin_addr) : hp->h_name,
- (val - start_time) / 60, (val - start_time) % 60,
- bytes_sent, audioFile);
- }
- }
- ComCloseConn(serviceSocket);
- ComCloseConn(audioSocket);
-}
-
-int AudioServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size)
-{
- int result;
-
- serviceSocket = ctr_fd;
- audioSocket = data_fd;
- conn_tag = max_pkt_size;
-
- if (max_pkt_size < 0) max_pkt_size = -max_pkt_size;
- else if (max_pkt_size == 0) max_pkt_size = 1024 * 1024;
-
- start_time = time(NULL);
-
- atexit(on_exit_routine);
-
- result = INITaudio();
-
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) AudioServer: "),
- result);
-
- fbpara = (AudioFeedBackPara *)malloc(FBBUF_SIZE);
- if (fbpara == NULL) {
- perror("AS failed to allocate mem for fbpara");
- return (-1);
- }
-
- databuf_size = max_pkt_size - sizeof(*pktbuf);
- if (databuf_size > DATABUF_SIZE) databuf_size = DATABUF_SIZE;
-
- pktbuf = (AudioPacket *)malloc(sizeof(*pktbuf) + databuf_size);
- if (pktbuf == NULL) {
- perror("AS failed to allocate mem for pktbuf");
- return(-1);
- }
-
- for (;;)
- {
- /*
- fprintf(stderr, "AS: waiting for a new command...\n");
- */
- result = CmdRead((char *)&cmd, 1);
- if (result != 0)
- return result;
- switch (cmd)
- {
- case CmdPLAY:
- result = PLAYaudio();
- if (result != 0)
- return result;
- break;
- case CmdCLOSE:
- /*
- fprintf(stderr, "a session closed.\n");
- */
- return(0);
- break;
- default:
- fprintf(stderr, "audio channel command %d not recoganizeable\n", cmd);
- break;
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp
deleted file mode 100644
index 3460aa34a3c..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#if 1
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <time.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#include "include/common.h"
-#include "server_proto.h"
-
-#ifdef LIVE_AUDIO
-
-#include <AF/AFlib.h>
-#include <AF/AFUtils.h>
-
-static AFAudioConn *aud;
-static AC ac;
-static AFSetACAttributes attributes;
-static int bps;
-static int nextSample;
-static audioActive = 0;
-
-/*
- * Find a suitable default device
- * Returns -1 if no suitable device can be found.
- */
-static int FindDefaultDevice(AFAudioConn *aud)
-{
- AFDeviceDescriptor *audioDevice;
- int i;
- for(i=0; i<ANumberOfAudioDevices(aud); i++)
- {
- audioDevice = AAudioDeviceDescriptor(aud, i);
- if(audioDevice->inputsFromPhone == 0 && audioDevice->outputsToPhone == 0)
- return i;
- }
- return -1;
-}
-#endif
-
-
-int OpenLiveAudio(AudioParameter * ap)
-{
-#ifndef LIVE_AUDIO
- return -1;
-#else
- int device;
- int gain;
- unsigned int channels;
- int endianflag = 0;
-
- if (!audioActive) return -1;
-
- device = -1;
- attributes.rec_gain = 0;
- attributes.type = UNKNOWN_ENCODETYPE;
-
- if ( (aud = AFOpenAudioConn(NULL)) == NULL)
- {
- fprintf(stderr, "SA error: fails to open default AF connection.\n");
- return -1;
- }
-
- /* set up audio context, find sample size and sample rate
- At this time, we only support default setings */
- device = FindDefaultDevice(aud);
- attributes.type = aud->devices[device].playBufType;
- ac = AFCreateAC(aud, device,
- ACRecordGain | ACEncodingType | endianflag,
- &attributes);
- if (ac == NULL)
- {
- perror("AS error: failed to create ac");
- AFCloseAudioConn(aud);
- return -1;
- }
- if (attributes.type == ap->encodeType) {
- bps = ap->bytesPerSample;
- return 0;
- }
- else {
- fprintf(stderr, "AS error: encodeType %d, client encodeType %d\n",
- attributes.type, ap->encodeType);
- return -1;
- }
-#endif
-}
-
-void StartPlayLiveAudio(void)
-{
-#ifndef LIVE_AUDIO
- return;
-#else
- nextSample = AFGetTime(ac);
- SFprintf(stderr, "LAS nextSample %d\n", nextSample);
- return;
-#endif
-}
-
-void StopPlayLiveAudio(void)
-{
-#ifndef LIVE_AUDIO
- return;
-#else
- return;
-#endif
-}
-
-int ReadLiveAudioSamples(char * buf, int samples)
-{
-#ifndef LIVE_AUDIO
- return 0;
-#else
- /*
- SFprintf(stderr, "LAS to read %d bytes\n", samples * bps);
- */
- AFRecordSamples(ac, nextSample, samples * bps, (unsigned char *)buf, ABlock);
- nextSample += samples;
- /*
- SFprintf(stderr, "LAS read live %d samples\n", samples);
- */
- return samples;
-#endif
-}
-
-#endif
-
-#if 0
-
-/* Following is a version using /dev/audio directly, since /dev/audio can't be
- shared by different sessions, at most one session can be served. */
-
-#include <stdio.h>
-#include <errno.h>
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-*/
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/filio.h>
-#include <sys/stropts.h>
-
-#include <time.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-static int sunfd1;
-static int bps;
-static int nextSample;
-
-
-int OpenLiveAudio(AudioParameter * ap)
-{
- if (!audioActive) return -1;
-
- if ((sunfd1 = open("/dev/audio", O_RDONLY, 0)) < 0) {
- fprintf(stderr, "dda can't open /dev/audio, errno message \" %d \"\n",
- errno);
- return -1;
- }
- bps = ap->bytesPerSample;
- ioctl(sunfd1, I_FLUSH, FLUSHR);
- return 0;
-}
-
-void StartPlayLiveAudio(void)
-{
- ioctl(sunfd1, I_FLUSH, FLUSHR);
-}
-
-void StopPlayLiveAudio(void)
-{
-}
-
-int ReadLiveAudioSamples(char * buf, int samples)
-{
- int bytes = samples * bps;
- int len = read(sunfd1, buf, bytes);
- if (len != bytes) {
- fprintf(stderr, "ReadLive: need %d samples (%dB), read %dB\n",
- samples, bytes, len);
- return len / bps;
- }
- return samples;
-}
-
-#endif
-
-int InitLiveAudio(int argc, char ** argv)
-{
-#ifndef LIVE_AUDIO
- return -1;
-#else
-
- audioActive = 1;
-
- fprintf(stderr, "LAS initialized.\n");
- return 0;
-#endif
-}
-
-void ExitLiveAudio(void)
-{
- return;
-}
-
-void LeaveLiveAudio(void)
-{
- return;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp
deleted file mode 100644
index 96390dbc218..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp
+++ /dev/null
@@ -1,410 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#include <stdio.h>
-#include <errno.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <time.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#include "include/common.h"
-#include "mpeg_shared/routine.h"
-#include "server_proto.h"
-
-#ifdef LIVE_VIDEO
-#include "lvs_shared.h"
-
-LvsSharedData * shared = NULL;
-static int lvspid = -1; /* -1: no lvs, 0 - lvs child, >0 - vs proc */
-static int prefid = -1, first_fid, first_frame;
-static int curbuf;
-
-#define PID_FILE "~/.vcr/lvsPid"
-#define QUALITY_FILE "~/.vcr/lvsQuality"
-
-static int count = 0;
-static unsigned session_time;
-
-static int curpid = 0;
-
-static void on_exit_routine(void)
-{
- char buf[256];
- if (getpid() != curpid) return;
- get_full_path(PID_FILE, buf, 256);
- unlink(buf);
-}
-
-static void register_pid(void)
-{
- char buf[256];
- FILE *fp;
- get_full_path(PID_FILE, buf, 256);
- fp = fopen(buf, "w");
- fprintf(fp, "%d -- pid of current VS process\n", getpid());
- fclose(fp);
-}
-
-static void set_quality_level(void)
-{
- char buf[256];
- FILE *fp;
- int qos = -1;
- get_full_path(QUALITY_FILE, buf, 256);
- fp = fopen(buf, "r");
- if (fp == NULL) return;
-
- fscanf(fp, "%d", &qos);
- fclose(fp);
- if (qos >= 0 && qos <= 100) {
- shared->qos_val = qos;
- }
-}
-
-static void hup_handler(int status)
-{
- setsignal(SIGHUP, SIG_IGN);
- if (getpid() != curpid) return;
- set_quality_level();
- setsignal(SIGHUP, hup_handler);
-}
-
-#endif
-
-int InitLiveVideo(int argc, char ** argv) /* -1 -- failed, 0 - succ */
-{
-#ifndef LIVE_VIDEO
- return -1;
-#else
-/*
-#define BUFSIZE 768 * 576 * 3 / 8
-#define BUFSIZE 640 * 480 * 3 / 2
-*/
-#define BUFSIZE 1024 * 1024
-
- char * buf = creat_shared_mem(BUFSIZE);
- int sid = creat_semaphore();
- int susid = creat_semaphore();
-
- enter_cs(susid);
-
- shared = (LvsSharedData *)buf;
- shared->sid = sid;
- shared->susid = susid;
- shared->initState = 0;
- shared->bufDataBytes = BUFSIZE - sizeof(*shared);
- shared->buf = (LvsBuffer *)((char *)shared + sizeof(*shared));
-
- register_pid();
- set_quality_level();
-
- /* all other fields to be initialized by LVS process */
-
- while ((lvspid = fork()) == -1);
-
- if (lvspid == 0) { /* child process, reading from camera */
- LiveVideoProcess(argc, argv);
- exit(1);
- }
-
- while (shared->initState == 0) usleep(100000); /* wait for SunVideo to init */
-
- if (shared->initState == -1) {
- fprintf(stderr, "LVS error: init of child process failed\n");
- kill(lvspid, SIGINT);
- remove_shared_mem(buf);
- remove_semaphore(sid);
- remove_semaphore(susid);
- lvspid = -1;
- return -1;
- }
- else {
-
- fprintf(stderr, "LVS initialized.\n");
-
- curpid = getpid();
-
- atexit(on_exit_routine);
-
- setsignal(SIGHUP, hup_handler);
-
- return 0;
- }
-#endif
-}
-
-void LeaveLiveVideo(void)
-{
-#ifndef LIVE_VIDEO
- return;
-#else
- if (lvspid == -1) return;
- remove_shared_mem((char *)shared);
- shared = NULL;
-#endif
-}
-
-void ExitLiveVideo(void)
-{
-#ifndef LIVE_VIDEO
- return;
-#else
- if (lvspid == -1) return;
- kill(lvspid, SIGINT);
- remove_semaphore(shared->sid);
- remove_semaphore(shared->susid);
- remove_shared_mem((char *)shared);
- lvspid = -1;
- shared = NULL;
-#endif
-}
-
-int OpenLiveVideo(int * format,
- int * width, int * height,
- int * averageFrameSize,
- double * fps,
- int * pelAspectRatio /* MPEG1 encoding used here */
- ) /* -1 -- failed, 0 - succ */
-{
-#ifndef LIVE_VIDEO
- return -1;
-#else
- if (lvspid == -1) return -1;
- *format = shared->format;
- *width = shared->width;
- *height = shared->height;
- *averageFrameSize = shared->averageFrameSize;
- *fps = shared->fps;
- *pelAspectRatio = shared->pelAspectRatio;
-
- fprintf(stderr, "LVS session %d opened.\n", getpid());
-
- return 0;
-#endif
-}
-
-void StartPlayLiveVideo(void)
-{
-#ifndef LIVE_VIDEO
- return;
-#else
- if (lvspid == -1) return;
-
- count = 0;
- session_time = get_msec();
-
- enter_cs(shared->sid);
-
- prefid = -1;
- first_fid = -1;
- first_frame = -1;
-
- if (shared->activeSessions <= 0) shared->activeSessions = 1;
- else shared->activeSessions ++;
-
- leave_cs(shared->sid);
-
- while (shared->curbuf <= shared->wait_curbuf) {
- /*
- fprintf(stderr, "curbuf %d, wait_curbuf %d\n",
- shared->curbuf, shared->wait_curbuf);
- */
- usleep(10000);
- }
-
- fprintf(stderr, "LVS session %d started\n", getpid());
-
- return;
-#endif
-}
-
-void StopPlayLiveVideo(void)
-{
-#ifndef LIVE_VIDEO
- return;
-#else
- if (lvspid == -1) return;
- enter_cs(shared->sid);
- shared->activeSessions --;
- leave_cs(shared->sid);
-
- fprintf(stderr, "LVS session %d stopped, at %5.2f fps.\n", getpid(),
- ((double)count * 1000.0) / get_duration(session_time, get_msec()));
-
- return;
-#endif
-}
-
-#if 1
-int ReadLiveVideoPicture(int * frame, char * buf, int size) /* ret # bytes */
-{
-#ifndef LIVE_VIDEO
- return 0;
-#else
- int pframe = * frame;
- int ssize;
- int bufptr;
-
- if (lvspid == -1) return 0;
-
- if (first_frame == -1) { /* first frame in current session */
- curbuf = shared->curbuf - 1;
- bufptr = curbuf % shared->bufnum;
- enter_cs(shared->sid);
- }
- else {
- int bufnum = shared->bufnum < 3 ? shared->bufnum : 3;
- do {
- curbuf ++;
- if (curbuf <= shared->curbuf - bufnum) {
- /*
- fprintf(stderr, "LVS session %d skipped %d buffers\n",
- getpid(), shared->curbuf - bufnum + 1 - curbuf);
- */
- curbuf = shared->curbuf - bufnum + 1;
- }
- bufptr = curbuf % shared->bufnum;
- while (shared->buf[bufptr].fid <= prefid) {
- /*
- fprintf(stderr,
- "LVS session %d wait: curbuf %d, shared->curbuf %d, prefid %d, shared->fid %d\n",
- getpid(), curbuf, shared->curbuf, prefid, shared->buf[bufptr].fid);
- */
- enter_cs(shared->sid);
- shared->suscount ++;
- leave_cs(shared->sid);
- enter_cs(shared->susid);
- }
- } while (pframe > first_frame + (shared->buf[bufptr].fid - first_fid));
-
- enter_cs(shared->sid);
- /*
- fprintf(stderr, "pframe %d, aframe %d\n",
- pframe, first_frame + (shared->buf[bufptr].fid - first_fid));
- */
- }
- shared->buf[bufptr].refcnt ++;
- leave_cs(shared->sid);
-
- ssize = shared->buf[bufptr].size;
-
- ssize = (ssize < size ? ssize : size);
- memcpy(buf, shared->buf[bufptr].data, ssize);
-
- enter_cs(shared->sid);
-
- shared->buf[bufptr].refcnt --;
- prefid = shared->buf[bufptr].fid;
- if (first_frame == -1) {
- first_fid = prefid;
- first_frame = * frame;
- }
- else {
- * frame = first_frame + (prefid - first_fid);
- }
- leave_cs(shared->sid);
- /*
- fprintf(stderr,
- "LVS session %d read curbuf %d fid %d, frame %d size %d (ffid %d, fframe %d)\n",
- getpid(), curbuf, prefid, *frame, ssize, first_fid, first_frame);
- */
- /*
- fprintf(stderr, "LVS read fid %d, frame %d\n", prefid, *frame);
- */
- count ++;
- return ssize;
-#endif
-}
-#endif
-
-#if 0
-/* following version is for testing the speed of the vcr path, excluding the
- xil stuff */
-
-static long start_time;
-
-int ReadLiveVideoPicture(int * frame, char * buf, int size) /* ret # bytes */
-{
-#ifndef LIVE_VIDEO
- return 0;
-#else
- int pframe = * frame;
- int ssize;
- char * sbuf;
- if (lvspid == -1) return 0;
-
- loop_begin:
- /*
- enter_cs(shared->sid);
- */
- if (first_frame == -1) {
- first_frame = *frame;
- first_fid = shared->fid;
- start_time = get_msec();
- }
- else {
- int f = first_frame + ((double)get_duration(start_time, get_msec()) /
- ((double)1000.0 / (double)shared->fps));
- if (f < *frame) {
-
- leave_cs(shared->sid);
- /*
- fprintf(stderr, "f=%d < *frame=%d\n", f, *frame);
- */
- usleep(10000);
- goto loop_begin;
- }
- *frame = f;
- }
-
- prefid = shared->fid;
- sbuf = shared->buf[shared->curbuf].data;
- ssize = shared->buf[shared->curbuf].size;
-
- ssize = (ssize < size ? ssize : size);
- memcpy(buf, sbuf, ssize);
- /*
- leave_cs(shared->sid);
- */
- /*
- fprintf(stderr, "LVS read fid %d, frame %d size %d (ffid %d, fframe %d)\n",
- shared->fid, *frame, ssize, first_fid, first_frame);
- */
- count ++;
- return ssize;
-#endif
-}
-#endif
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h
deleted file mode 100644
index 12aab8421c5..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#include "Globals.h"
-
-/* las.c */
-int InitLiveAudio(int argc, char ** argv); /* -1 -- failed, 0 - succ */
-void LeaveLiveAudio(void);
- /* each child forked not doing live audio should call this */
-void ExitLiveAudio(void);
-int OpenLiveAudio(AudioParameter * ap); /* -1 -- failed, 0 - succ */
-void StartPlayLiveAudio(void);
-void StopPlayLiveAudio(void);
-int ReadLiveAudioSamples(char * buf, int samples); /* ret # samples */
-
-/* lvs.c */
-
-int InitLiveVideo(int argc, char ** argv); /* -1 -- failed, 0 - succ */
-void LeaveLiveVideo(void);
- /* each child forked not doing live video should call this */
-void ExitLiveVideo(void);
-int OpenLiveVideo(int * format,
- int * width, int * height,
- int * averageFrameSize,
- double * fps,
- int * pelAspactRatio /* MPEG1 encoding used here */
- ); /* -1 -- failed, 0 - succ */
-void StartPlayLiveVideo(void);
-void StopPlayLiveVideo(void);
-int ReadLiveVideoPicture(int * frame, char * buf, int size); /* ret # bytes */
-
-/*from camera driver definitions */
-
-int LiveVideoProcess(int argc, char ** argv);
-
-/* as.c */
-int AudioServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size);
-
-/* vs.c */
-int VideoServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size);
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp
deleted file mode 100644
index 69ae6898adb..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp
+++ /dev/null
@@ -1,2205 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <netdb.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-#include <sys/time.h>
-#include <stdio.h>
-#include <errno.h>
-#include <signal.h>
-
-#include "include/common.h"
-#include "mpeg_shared/routine.h"
-#include "mpeg_shared/fileio.h"
-#include "mpeg_shared/com.h"
-#include "mpeg_shared/sendpt.h"
-#include "server_proto.h"
-
-
-// %% Move all these functions to the VIDEO_SINGLETON class and remove
-// zombie code like VideoServer ()...
-static int CmdRead(char *buf, int psize)
-{
- int res = wait_read_bytes (VIDEO_SINGLETON::instance ()->serviceSocket,
- buf,
- psize);
- if (res == 0) return(1);
- if (res == -1) {
- fprintf(stderr, "VS error on read VIDEO_SINGLETON::instance ()->cmdSocket, size %d", psize);
- perror("");
- return(-1);
- }
- return 0;
-}
-
-static void CmdWrite(char *buf, int size)
-{
- int res = wait_write_bytes(VIDEO_SINGLETON::instance ()->serviceSocket, buf, size);
- if (res == -1) {
- if (errno != EPIPE) perror("VS writes to VIDEO_SINGLETON::instance ()->serviceSocket");
- exit(errno != EPIPE);
- }
-}
-
-int FBread(char * buf, int size)
-{ int res;
- while ((res = (VIDEO_SINGLETON::instance ()->conn_tag >= 0 ? wait_read_bytes(VIDEO_SINGLETON::instance ()->videoSocket, buf, size) :
- read(VIDEO_SINGLETON::instance ()->videoSocket, buf, size))) == -1)
- {
- if (errno == EINTR) {errno = 0; continue; }
- if (errno == EPIPE || errno == ECONNRESET) exit(0);
- perror("VS reads Feedback VIDEO_SINGLETON::instance ()->packet");
- return -1;
- }
- if (res < size) {
- if (res) fprintf(stderr, "VS warn: FBread() res %dB < size %dB\n", res, size);
- return -1;
- }
- return 0;
-}
-
-
-/* send a given VIDEO_SINGLETON::instance ()->packet pointed by 'VIDEO_SINGLETON::instance ()->packet' to the network */
-
-int send_to_network(int timeToUse)
-{
- int count = 0;
- VideoMessage * msghd = (VideoMessage *)(((char *)VIDEO_SINGLETON::instance ()->packet) - sizeof(VideoMessage));
- int sent = 0;
- int packetSize = ntohl(VIDEO_SINGLETON::instance ()->packet->dataBytes);
-
- msghd->packetsn = htonl(VIDEO_SINGLETON::instance ()->packetsn ++);
- msghd->packetSize = htonl(packetSize + sizeof(* VIDEO_SINGLETON::instance ()->packet));
- /*
- fprintf(stderr, "VS to send pkt %d of size %d.\n",
- ntohl(msghd->VIDEO_SINGLETON::instance ()->packetsn), ntohl(msghd->VIDEO_SINGLETON::instance ()->packetSize));
- */
- {
- VideoMessage * msg = NULL;
- int size = packetSize + sizeof(* VIDEO_SINGLETON::instance ()->packet); /* msghd->VIDEO_SINGLETON::instance ()->packetSize */
- int offset = 0;
- int targetTime;
-
- if (size > VIDEO_SINGLETON::instance ()->msgsize)
- {
-
- if (!timeToUse)
- {
- timeToUse = (VIDEO_SINGLETON::instance ()->msgsize + sizeof(*msg) + 28) * 2;
- /*
- set the max network as 500KB.
- 28 - UDP header size
- */
- /*
- fprintf(stderr, "computed timeToUse %d. ", timeToUse);
- */
- }
- else
- {
- timeToUse = (timeToUse * 7) >> 3;
- /*
- fprintf(stderr, "preset timeToUse %d.", timeToUse);
- */
- timeToUse /= (size + VIDEO_SINGLETON::instance ()->msgsize - 1) / VIDEO_SINGLETON::instance ()->msgsize;
- timeToUse = min(timeToUse, (VIDEO_SINGLETON::instance ()->msgsize + sizeof(*msg) + 28) * 100);
- /* limit min network bandwidth = 10K */
- }
-
- }
- while (size > 0)
- {
- int segsize, sentsize;
- int resent = 0;
-
- if (msg == NULL) { /* first message for current VIDEO_SINGLETON::instance ()->packet */
- count = 0;
- msg = msghd;
- targetTime = get_usec();
- }
- else {
-#if 0
- /* the select() is not precise enough for being used here*/
- int sleepTime;
- targetTime += timeToUse;
- sleepTime = get_duration(get_usec(), targetTime);
- if (sleepTime >= 5000) { /* resolution of timer is 10,000 usec */
- usleep(sleepTime); /* not first message, wait for a while */
- }
-#endif
- /*
- count ++;
- if (!(count % 10)) usleep(10000);
- */
- msg = (VideoMessage *)((char *)msg + VIDEO_SINGLETON::instance ()->msgsize);
- memcpy((char *)msg, (char *)msghd, sizeof(* msg));
- }
- msg->msgsn = htonl(VIDEO_SINGLETON::instance ()->msgsn++);
- msg->msgOffset = htonl(offset);
- msg->msgSize = htonl(min(size, VIDEO_SINGLETON::instance ()->msgsize));
-
- segsize = min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg);
- if (VIDEO_SINGLETON::instance ()->conn_tag != 0) { /* VIDEO_SINGLETON::instance ()->packet stream */
- while ((sentsize = write(VIDEO_SINGLETON::instance ()->videoSocket, (char *)msg, segsize)) == -1) {
- if (errno == EINTR)
- continue;
- if (errno == ENOBUFS) {
- if (resent) {
- perror("Warning, pkt discarded because");
- sent = -1;
- break;
- }
- else {
- resent = 1;
- perror("VS to sleep 5ms");
- usleep(5000);
- continue;
- }
- }
- if (errno != EPIPE) {
- fprintf(stderr, "VS error on send VIDEO_SINGLETON::instance ()->packet %d of size %d ",
- VIDEO_SINGLETON::instance ()->msgsn-1, min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg));
- perror("");
- }
- exit(errno != EPIPE);
- }
- }
- else {
- sentsize = wait_write_bytes(VIDEO_SINGLETON::instance ()->videoSocket, (char *)msg, segsize);
- if (sentsize == -1) {
- if (errno != EPIPE) {
- fprintf(stderr, "VS error on send VIDEO_SINGLETON::instance ()->packet %d of size %d ",
- VIDEO_SINGLETON::instance ()->msgsn-1, min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg));
- perror("");
- }
- exit(errno != EPIPE);
- }
- }
- if (sentsize < segsize) {
- SFprintf(stderr, "VS warning: message size %dB, sent only %dB\n",
- segsize, sentsize);
- }
- if (sent == -1)
- break;
- /*
- fprintf(stderr, "VS: message %d of size %d sent.\n",
- VIDEO_SINGLETON::instance ()->msgsn-1, min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg));
- */
- size -= VIDEO_SINGLETON::instance ()->msgsize;
- offset += VIDEO_SINGLETON::instance ()->msgsize;
- }
- }
- /*
- fprintf(stderr, "sent = %d\n", sent);
- */
- if (!sent) VIDEO_SINGLETON::instance ()->pkts_sent ++;
- return sent;
-}
-
-/*
- * send a VIDEO_SINGLETON::instance ()->packet with given VIDEO_SINGLETON::instance ()->systemHeader (optional), gop (optional) and frame.
- *
- * sh - system header id, if -1, then no system header will be sent.
- * otherwise, only when frame == 0, the given system header will be sent.
- * gop - group of pictures, gop header will be sent when frame == 0
- * (first I frame );
- * frame - frame to be sent, offset internal to given gop.
- */
-
-/* returns: 0 - VIDEO_SINGLETON::instance ()->packet sent, -1 - VIDEO_SINGLETON::instance ()->packet not sent (failed) */
-static int SendPacket(int shtag, int gop, int frame, int timeToUse)
-/* frame maybe out of range (PLAY, STEP), in this case, END_SEQ is sent
- to force display of last frame in VD */
-{
- char * buf = ((char *) VIDEO_SINGLETON::instance ()->packet) + sizeof(VideoPacket);
- int f = VIDEO_SINGLETON::instance ()->gopTable[gop].previousFrames + frame;
- int sh = VIDEO_SINGLETON::instance ()->gopTable[gop].systemHeader;
- /*
- SFprintf(stderr, "VS to send VIDEO_SINGLETON::instance ()->packet gop-%d, frame-%d.\n", gop, frame);
- */
-
- VIDEO_SINGLETON::instance ()->packet->currentUPF = ntohl(VIDEO_SINGLETON::instance ()->currentUPF);
-
- if (frame >= VIDEO_SINGLETON::instance ()->gopTable[gop].totalFrames)
- {
- VIDEO_SINGLETON::instance ()->packet->cmd = htonl(VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->packet->cmdsn = htonl(VIDEO_SINGLETON::instance ()->cmdsn);
- VIDEO_SINGLETON::instance ()->packet->sh = htonl(sh);
- VIDEO_SINGLETON::instance ()->packet->gop = htonl(gop);
- VIDEO_SINGLETON::instance ()->packet->frame = htonl(VIDEO_SINGLETON::instance ()->numF);
- VIDEO_SINGLETON::instance ()->packet->display = htonl(VIDEO_SINGLETON::instance ()->numF-1);
- VIDEO_SINGLETON::instance ()->packet->future = htonl((unsigned)-1);
- VIDEO_SINGLETON::instance ()->packet->past = htonl((unsigned)-1);
- VIDEO_SINGLETON::instance ()->packet->dataBytes = htonl(4);
- *(int*)((char*)VIDEO_SINGLETON::instance ()->packet + sizeof(*VIDEO_SINGLETON::instance ()->packet)) = htonl(SEQ_END_CODE);
-
- return send_to_network(timeToUse);
- }
-
- if (frame)
- shtag = 0;
- else if (VIDEO_SINGLETON::instance ()->needHeader)
- {
- shtag = 1;
- VIDEO_SINGLETON::instance ()->needHeader = 0;
- }
-
- VIDEO_SINGLETON::instance ()->packet->cmd = htonl(VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->packet->cmdsn = htonl(VIDEO_SINGLETON::instance ()->cmdsn);
- VIDEO_SINGLETON::instance ()->packet->sh = htonl(sh);
- VIDEO_SINGLETON::instance ()->packet->gop = htonl(gop);
- VIDEO_SINGLETON::instance ()->packet->frame = htonl(f);
- if (VIDEO_SINGLETON::instance ()->frameTable[f].type == 'B')
- {
- int pre1 = -1, pre2 = -1, i = f;
- while (i>0)
- if (VIDEO_SINGLETON::instance ()->frameTable[--i].type != 'B')
- {
- pre1 = i;
- break;
- }
- while (i>0)
- if (VIDEO_SINGLETON::instance ()->frameTable[--i].type != 'B')
- {
- pre2 = i;
- break;
- }
- if (pre2 == -1)
- {
- /*
- fprintf(stderr,
- "frame %d-%d (%d) is a B without past ref, no to be sent.\n",
- gop, frame, f);
- */
- return -1;
- }
- if (pre1 != VIDEO_SINGLETON::instance ()->lastRef[VIDEO_SINGLETON::instance ()->lastRefPtr] ||
- pre2 != VIDEO_SINGLETON::instance ()->lastRef[1 - VIDEO_SINGLETON::instance ()->lastRefPtr])
- {
- /*
- fprintf(stderr,
- "send of B frame %d gaveup for past %d/future %d ref not sent.\n",
- f, pre2, pre1);
- */
- return -1;
- }
- VIDEO_SINGLETON::instance ()->packet->display = htonl(f);
- VIDEO_SINGLETON::instance ()->packet->future = htonl(pre1);
- VIDEO_SINGLETON::instance ()->packet->past = htonl(pre2);
- }
- else
- {
- int next = f;
- int pre = f;
-
- while (next < VIDEO_SINGLETON::instance ()->numF && VIDEO_SINGLETON::instance ()->frameTable[++next].type == 'B');
- while (pre > 0 && VIDEO_SINGLETON::instance ()->frameTable[--pre].type == 'B');
- if (VIDEO_SINGLETON::instance ()->frameTable[f].type == 'P' && pre != VIDEO_SINGLETON::instance ()->lastRef[VIDEO_SINGLETON::instance ()->lastRefPtr])
- {
- /*
- fprintf(stderr,
- "send of P frame %d gaveup for past ref %d not sent.\n",
- f, pre);
- fprintf(stderr, "ref0=%d, ref1=%d, ptr=%d.\n",
- VIDEO_SINGLETON::instance ()->lastRef[0], VIDEO_SINGLETON::instance ()->lastRef[1], VIDEO_SINGLETON::instance ()->lastRefPtr);
- */
- return -1;
- }
- VIDEO_SINGLETON::instance ()->packet->display = htonl(next);
- VIDEO_SINGLETON::instance ()->packet->future = htonl((unsigned)-1);
- VIDEO_SINGLETON::instance ()->packet->past = htonl(VIDEO_SINGLETON::instance ()->frameTable[f].type == 'P' ? pre : (unsigned)-1);
- }
- {
- char * ptr = buf;
- int size = 0, offset = 0, i;
- if (shtag) /* send system header */
- {
- size = VIDEO_SINGLETON::instance ()->systemHeader[sh].size;
- FileRead(VIDEO_SINGLETON::instance ()->systemHeader[sh].offset, ptr, size);
- ptr += size;
- }
- if (!frame) /* send gop header */
- {
- size = VIDEO_SINGLETON::instance ()->gopTable[gop].headerSize;
- FileRead(VIDEO_SINGLETON::instance ()->gopTable[gop].offset, ptr, size);
- ptr += size;
- }
- size = VIDEO_SINGLETON::instance ()->frameTable[f].size;
- for (i=VIDEO_SINGLETON::instance ()->gopTable[gop].previousFrames; i<f; i++)
- offset += VIDEO_SINGLETON::instance ()->frameTable[i].size;
- FileRead((VIDEO_SINGLETON::instance ()->gopTable[gop].firstIoffset + offset), ptr, size);
- ptr += size;
- VIDEO_SINGLETON::instance ()->packet->dataBytes = htonl(ptr - buf);
- }
-
- {
- int sent = send_to_network(timeToUse);
- if (!sent)
- {
- /*
- fprintf(stderr, "%c%d\n", VIDEO_SINGLETON::instance ()->frameTable[f].type, f);
- fprintf(stderr, "%c frame %d sent.\n", VIDEO_SINGLETON::instance ()->frameTable[f].type, f);
- */
- if (VIDEO_SINGLETON::instance ()->frameTable[f].type != 'B')
- {
- VIDEO_SINGLETON::instance ()->lastRefPtr = 1 - VIDEO_SINGLETON::instance ()->lastRefPtr;
- VIDEO_SINGLETON::instance ()->lastRef[VIDEO_SINGLETON::instance ()->lastRefPtr] = f;
- }
- }
- return sent;
- }
-}
-
-
-int SendReferences(int group, int frame)
-{
- unsigned char orgcmd;
- int i, base;
- int pregroup;
- int result;
-
- if (group < 0 || group >= VIDEO_SINGLETON::instance ()->numG) return 0;
- if (frame <= 0 || frame >= VIDEO_SINGLETON::instance ()->gopTable[group].totalFrames) return 0;
-
- orgcmd = VIDEO_SINGLETON::instance ()->cmd;
- VIDEO_SINGLETON::instance ()->cmd = CmdREF;
-
- if (group > 0) {
- pregroup = 1;
- base = VIDEO_SINGLETON::instance ()->gopTable[group].previousFrames;
- for (i = 0; i <= frame; i ++) {
- if (VIDEO_SINGLETON::instance ()->frameTable[i + base].type == 'P') {
- pregroup = 0;
- break;
- }
- }
- }
- else pregroup = 0;
-
- if (pregroup) { /* reference frame can be in previous group */
- pregroup = group -1;
- base = VIDEO_SINGLETON::instance ()->gopTable[pregroup].previousFrames;
- for (i = 0; i < VIDEO_SINGLETON::instance ()->gopTable[pregroup].totalFrames; i ++) {
- if (VIDEO_SINGLETON::instance ()->frameTable[i + base].type != 'B') {
- /*
- SFprintf(stderr, "REF group%d, frame%d\n", pregroup, i);
- */
- result = SendPacket(i == 0, pregroup, i, 0);
- if (result != 0)
- return result;
- }
- }
- }
-
- base = VIDEO_SINGLETON::instance ()->gopTable[group].previousFrames;
- for (i = 0; i < frame; i ++) {
- if (VIDEO_SINGLETON::instance ()->frameTable[i + base].type != 'B') {
- /*
- SFprintf(stderr, "REF group%d, frame%d\n", group, i);
- */
- SendPacket(i == 0, group, i, 0);
- }
- }
- VIDEO_SINGLETON::instance ()->cmd = orgcmd;
-}
-
-int SendPicture(int * frame)
-{
- int size;
- char * buf = ((char *) VIDEO_SINGLETON::instance ()->packet) + sizeof(VideoPacket);
- /*
- SFprintf(stderr, "VS to send picture %d.\n", *frame);
- */
-
- size = ReadLiveVideoPicture(frame, buf, VIDEO_SINGLETON::instance ()->packetBufSize);
-
- VIDEO_SINGLETON::instance ()->packet->currentUPF = ntohl(VIDEO_SINGLETON::instance ()->currentUPF);
- VIDEO_SINGLETON::instance ()->packet->cmd = htonl(VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->packet->cmdsn = htonl(VIDEO_SINGLETON::instance ()->cmdsn);
- VIDEO_SINGLETON::instance ()->packet->sh = VIDEO_SINGLETON::instance ()->packet->gop = VIDEO_SINGLETON::instance ()->packet->frame = VIDEO_SINGLETON::instance ()->packet->display = htonl(*frame);
- VIDEO_SINGLETON::instance ()->packet->future = htonl((unsigned)-1);
- VIDEO_SINGLETON::instance ()->packet->past = htonl((unsigned)-1);
-
- VIDEO_SINGLETON::instance ()->packet->dataBytes = htonl(size);
-
- return send_to_network(VIDEO_SINGLETON::instance ()->currentUPF);
-}
-
-static int ReadInfoFromFile(void)
-{
- int fd = -1, i;
- int fnlen = strlen(VIDEO_SINGLETON::instance ()->videoFile);
-
- strcpy(&VIDEO_SINGLETON::instance ()->videoFile[fnlen], ".Info");
- fd = open(VIDEO_SINGLETON::instance ()->videoFile, O_RDONLY);
- if (fd == -1)
- {
- fprintf(stderr, "Reminder: VS fails to open %s for read, ", VIDEO_SINGLETON::instance ()->videoFile);
- perror("try create one");
- goto fail_ReadInfoFromFile;
- }
- read_int(fd, &i);
- if (i != VIDEO_SINGLETON::instance ()->fileSize)
- {
- fprintf(stderr, "Warning: VIDEO_SINGLETON::instance ()->fileSize in Info: %d not the same as actual %d.\n",
- i, VIDEO_SINGLETON::instance ()->fileSize);
- goto fail_ReadInfoFromFile;
- }
-
- read_int(fd, &VIDEO_SINGLETON::instance ()->maxS);
- read_int(fd, &VIDEO_SINGLETON::instance ()->maxG);
- read_int(fd, &VIDEO_SINGLETON::instance ()->maxI);
- read_int(fd, &VIDEO_SINGLETON::instance ()->maxP);
- read_int(fd, &VIDEO_SINGLETON::instance ()->maxB);
- read_int(fd, &VIDEO_SINGLETON::instance ()->minS);
- read_int(fd, &VIDEO_SINGLETON::instance ()->minG);
- read_int(fd, &VIDEO_SINGLETON::instance ()->minI);
- read_int(fd, &VIDEO_SINGLETON::instance ()->minP);
- read_int(fd, &VIDEO_SINGLETON::instance ()->minB);
- read_int(fd, &VIDEO_SINGLETON::instance ()->numS);
- read_int(fd, &VIDEO_SINGLETON::instance ()->numG);
- read_int(fd, &VIDEO_SINGLETON::instance ()->numF);
- read_int(fd, &VIDEO_SINGLETON::instance ()->numI);
- read_int(fd, &VIDEO_SINGLETON::instance ()->numP);
- read_int(fd, &VIDEO_SINGLETON::instance ()->numB);
- read_int(fd, &VIDEO_SINGLETON::instance ()->averageFrameSize);
- read_int(fd, &VIDEO_SINGLETON::instance ()->horizontalSize);
- read_int(fd, &VIDEO_SINGLETON::instance ()->verticalSize);
- read_int(fd, &VIDEO_SINGLETON::instance ()->pelAspectRatio);
- read_int(fd, &VIDEO_SINGLETON::instance ()->pictureRate);
- read_int(fd, &VIDEO_SINGLETON::instance ()->vbvBufferSize);
- read_int(fd, &VIDEO_SINGLETON::instance ()->patternSize);
-
- memset(VIDEO_SINGLETON::instance ()->pattern, 0, PATTERN_SIZE);
- read_bytes(fd, VIDEO_SINGLETON::instance ()->pattern, VIDEO_SINGLETON::instance ()->patternSize);
-#ifdef STAT
- VIDEO_SINGLETON::instance ()->framesSent = (char *)malloc((VIDEO_SINGLETON::instance ()->numF + 7)>>3);
- if (VIDEO_SINGLETON::instance ()->framesSent == NULL)
- {
- fprintf(stderr, "Error: VS fails to alloc mem for VIDEO_SINGLETON::instance ()->framesSent for %d frames", VIDEO_SINGLETON::instance ()->numF);
- perror("");
- exit(1);
- }
-#endif
- VIDEO_SINGLETON::instance ()->systemHeader = (struct Video_Global::SystemHeader *)malloc(sizeof(struct Video_Global::SystemHeader) * VIDEO_SINGLETON::instance ()->numS);
- if (VIDEO_SINGLETON::instance ()->systemHeader == NULL)
- {
- perror("Error: VS error on malloc VIDEO_SINGLETON::instance ()->SystemHeader");
- exit(1);
- }
- VIDEO_SINGLETON::instance ()->gopTable = (struct Video_Global::GopTable *)malloc(sizeof(struct Video_Global::GopTable) * VIDEO_SINGLETON::instance ()->numG);
- if (VIDEO_SINGLETON::instance ()->gopTable == NULL)
- {
- perror("Error: VS error on malloc GopHeader");
- exit(1);
- }
- VIDEO_SINGLETON::instance ()->frameTable = (struct Video_Global::FrameTable *)malloc(sizeof(Video_Global::FrameTable) * VIDEO_SINGLETON::instance ()->numF);
- if (VIDEO_SINGLETON::instance ()->frameTable == NULL)
- {
- perror("Error: VS error on malloc VIDEO_SINGLETON::instance ()->frameTable");
- exit(1);
- }
- VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->maxS + VIDEO_SINGLETON::instance ()->maxG + max(VIDEO_SINGLETON::instance ()->maxI, max(VIDEO_SINGLETON::instance ()->maxP, VIDEO_SINGLETON::instance ()->maxB));
- VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)malloc(sizeof(VideoMessage) + sizeof(VideoPacket) +
- VIDEO_SINGLETON::instance ()->packetBufSize);
- if (VIDEO_SINGLETON::instance ()->packet == NULL)
- {
- perror("Error: VS error on malloc VIDEO_SINGLETON::instance ()->packet buffer");
- exit(1);
- }
- VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)((char *)VIDEO_SINGLETON::instance ()->packet + sizeof(VideoMessage));
-
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numS; i ++)
- {
- read_int(fd, (int *)&VIDEO_SINGLETON::instance ()->systemHeader[i].offset);
- read_int(fd, &VIDEO_SINGLETON::instance ()->systemHeader[i].size);
- }
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numG; i ++)
- {
- read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].systemHeader);
- read_int(fd, (int *)&VIDEO_SINGLETON::instance ()->gopTable[i].offset);
- read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].headerSize);
- read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].size);
- read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].totalFrames);
- read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames);
- read_int(fd, (int *)&VIDEO_SINGLETON::instance ()->gopTable[i].firstIoffset);
- }
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numF; i ++)
- {
- read_byte(fd, &VIDEO_SINGLETON::instance ()->frameTable[i].type);
- read_short(fd, (short *)&VIDEO_SINGLETON::instance ()->frameTable[i].size);
- }
-
- close(fd);
- /*
- fprintf(stderr, "Read Info from %s\n", VIDEO_SINGLETON::instance ()->videoFile);
- */
- VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0;
- return 0;
- fail_ReadInfoFromFile:
- if (fd >= 0)
- close(fd);
- VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0;
- /*
- fprintf(stderr, "To scan Info from %s\n", VIDEO_SINGLETON::instance ()->videoFile);
- */
- return -1;
-}
-
-static void WriteInfoToFile(void)
-{
- int fd = -1, i;
- int fnlen = strlen(VIDEO_SINGLETON::instance ()->videoFile);
-
- strcpy(&VIDEO_SINGLETON::instance ()->videoFile[fnlen], ".Info");
- fd = open(VIDEO_SINGLETON::instance ()->videoFile, O_WRONLY | O_CREAT, 0444);
- if (fd == -1)
- {
- fprintf(stderr, "VS fails to open %s for write", VIDEO_SINGLETON::instance ()->videoFile);
- perror("");
- goto fail_WriteInfoToFile;
- }
- write_int(fd, VIDEO_SINGLETON::instance ()->fileSize);
- write_int(fd, VIDEO_SINGLETON::instance ()->maxS);
- write_int(fd, VIDEO_SINGLETON::instance ()->maxG);
- write_int(fd, VIDEO_SINGLETON::instance ()->maxI);
- write_int(fd, VIDEO_SINGLETON::instance ()->maxP);
- write_int(fd, VIDEO_SINGLETON::instance ()->maxB);
- write_int(fd, VIDEO_SINGLETON::instance ()->minS);
- write_int(fd, VIDEO_SINGLETON::instance ()->minG);
- write_int(fd, VIDEO_SINGLETON::instance ()->minI);
- write_int(fd, VIDEO_SINGLETON::instance ()->minP);
- write_int(fd, VIDEO_SINGLETON::instance ()->minB);
- write_int(fd, VIDEO_SINGLETON::instance ()->numS);
- write_int(fd, VIDEO_SINGLETON::instance ()->numG);
- write_int(fd, VIDEO_SINGLETON::instance ()->numF);
- write_int(fd, VIDEO_SINGLETON::instance ()->numI);
- write_int(fd, VIDEO_SINGLETON::instance ()->numP);
- write_int(fd, VIDEO_SINGLETON::instance ()->numB);
- write_int(fd, VIDEO_SINGLETON::instance ()->averageFrameSize);
- write_int(fd, VIDEO_SINGLETON::instance ()->horizontalSize);
- write_int(fd, VIDEO_SINGLETON::instance ()->verticalSize);
- write_int(fd, VIDEO_SINGLETON::instance ()->pelAspectRatio);
- write_int(fd, VIDEO_SINGLETON::instance ()->pictureRate);
- write_int(fd, VIDEO_SINGLETON::instance ()->vbvBufferSize);
- write_int(fd, VIDEO_SINGLETON::instance ()->patternSize);
-
- write_bytes(fd, VIDEO_SINGLETON::instance ()->pattern, VIDEO_SINGLETON::instance ()->patternSize);
-
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numS; i ++)
- {
- write_int(fd, VIDEO_SINGLETON::instance ()->systemHeader[i].offset);
- write_int(fd, VIDEO_SINGLETON::instance ()->systemHeader[i].size);
- }
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numG; i ++)
- {
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].systemHeader);
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].offset);
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].headerSize);
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].size);
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].totalFrames);
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames);
- write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].firstIoffset);
- }
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numF; i ++)
- {
- write_byte(fd, VIDEO_SINGLETON::instance ()->frameTable[i].type);
- write_short(fd, VIDEO_SINGLETON::instance ()->frameTable[i].size);
- }
-
- close(fd);
- VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0;
- return;
- fail_WriteInfoToFile:
- if (fd >= 0)
- close(fd);
- VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0;
- return;
-}
-
-/*
-#define nextByte {fileptr ++; \
- if (fread(&nb, 1, 1, fp) == 0) \
- { \
- perror("VS Crossed EOF or error while scanning"); \
- return 1; \
- } }
-
-*/
-
-#define nextByte {int val; fileptr ++; \
- if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \
- {\
- perror("Crossed EOF or error while scanning"); \
- return 1; \
- } nb = val;}
-
-#define computePicSize \
- if (inpic) \
- { \
- if (pictype == 'I') \
- { \
- VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \
- VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \
- } \
- else if (pictype == 'P') \
- { \
- VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \
- VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \
- } \
- else \
- { \
- VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \
- VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \
- } \
- VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \
- VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \
- inpic = 0; \
- }
-
-static int init_MPEG1_video_file(void)
-{
- unsigned char nb;
- int state = 0;
- unsigned long fileptr = 0;
- unsigned long i, j, k;
- int shptr, gopptr, ftptr;
- int inpic = 0;
- unsigned long picptr = 0;
- int pictype = 0;
- int first = 0;
- int failureType = 0;
-
- VIDEO_SINGLETON::instance ()->fp = fopen(VIDEO_SINGLETON::instance ()->videoFile, "r");
- if (VIDEO_SINGLETON::instance ()->fp == NULL)
- {
- fprintf(stderr, "error on opening video file %s", VIDEO_SINGLETON::instance ()->videoFile);
- perror("");
- return 2;
- }
- if (fseek(VIDEO_SINGLETON::instance ()->fp, 0, 2) == -1)
- {
- fprintf(stderr, "File %s not seekable", VIDEO_SINGLETON::instance ()->videoFile);
- perror("");
- return 3;
- }
- VIDEO_SINGLETON::instance ()->fileSize = ftell(VIDEO_SINGLETON::instance ()->fp);
-
- fseek(VIDEO_SINGLETON::instance ()->fp, 0, 0);
-
- if (ReadInfoFromFile())
- {
- for (;;)
- {
- nextByte;
- if (state >= 0 && nb == 0x00)
- state ++;
- else if (state >= 2 && nb == 0x01)
- state = -1;
- else if (state == -1)
- {
- if (!first) first ++;
- else if (first == 1) first ++;
-
- switch (nb)
- {
- case 0xb7: /* seq_end_code */
- goto exit_phase1;
- break;
- case 0xb3: /* seq_start_code */
- if (first == 1) first = 3;
- if (first != 3)
- {
- fprintf(stderr, "VS error: given file is not in MPEG format.\n");
- return 4;
- }
- VIDEO_SINGLETON::instance ()->numS ++;
- break;
- case 0xb8: /* gop_start_code */
- VIDEO_SINGLETON::instance ()->numG ++;
- break;
- case 0x00: /* picture_start_code */
- nextByte;
- nextByte;
- nb &= 0x38;
- if (nb == 0x08)
- {
- VIDEO_SINGLETON::instance ()->numI ++;
- if (VIDEO_SINGLETON::instance ()->numG == 2)
- VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize++] = 'I';
- }
- else if (nb == 0x10)
- {
- VIDEO_SINGLETON::instance ()->numP ++;
- if (VIDEO_SINGLETON::instance ()->numG == 2)
- VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize++] = 'P';
- }
- else if (nb == 0x18)
- {
- VIDEO_SINGLETON::instance ()->numB ++;
- if (VIDEO_SINGLETON::instance ()->numG == 2)
- VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize++] = 'B';
- }
- /*
- else
- fprintf(stderr, "VS error: unkonw picture type %d\n", nb);
- */
- break;
- default:
- break;
- }
- state = 0;
- }
- else
- state = 0;
- }
- exit_phase1:
-
- if (first != 3)
- {
- fprintf(stderr, "VS error: given file \"%s\" is not of MPEG format.\n", VIDEO_SINGLETON::instance ()->videoFile);
- return 4;
- }
-
- VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize] = 0;
- memset(VIDEO_SINGLETON::instance ()->sendPattern, 1, PATTERN_SIZE);
-
- VIDEO_SINGLETON::instance ()->numF = VIDEO_SINGLETON::instance ()->numI + VIDEO_SINGLETON::instance ()->numP + VIDEO_SINGLETON::instance ()->numB;
- VIDEO_SINGLETON::instance ()->averageFrameSize = fileptr / (unsigned)VIDEO_SINGLETON::instance ()->numF;
- /*
- fprintf(stderr, "Pass one finished, total bytes read: %u, average frame size %d\n",
- fileptr, VIDEO_SINGLETON::instance ()->averageFrameSize);
- fprintf(stderr, "VIDEO_SINGLETON::instance ()->numS-%d, VIDEO_SINGLETON::instance ()->numG-%d, VIDEO_SINGLETON::instance ()->numF-%d, VIDEO_SINGLETON::instance ()->numI-%d, VIDEO_SINGLETON::instance ()->numP-%d, VIDEO_SINGLETON::instance ()->numB-%d\n",
- VIDEO_SINGLETON::instance ()->numS, VIDEO_SINGLETON::instance ()->numG, VIDEO_SINGLETON::instance ()->numI, VIDEO_SINGLETON::instance ()->numI, VIDEO_SINGLETON::instance ()->numP, VIDEO_SINGLETON::instance ()->numB);
- fprintf(stderr, "VIDEO_SINGLETON::Instance ()->Pattern detected: %s\n", VIDEO_SINGLETON::instance ()->pattern);
- */
- if (VIDEO_SINGLETON::instance ()->numF > MAX_FRAMES)
- {
- fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->Number of frames (%d) is bigger than MAX_FRAMES (%d).\n\
- you need to update the constant definition in common.h and recompile.\n",
- VIDEO_SINGLETON::instance ()->numF, MAX_FRAMES);
- return 5;
- }
-
-#ifdef STAT
- VIDEO_SINGLETON::instance ()->framesSent = (char *)malloc((VIDEO_SINGLETON::instance ()->numF + 7)>>3);
- if (VIDEO_SINGLETON::instance ()->framesSent == NULL)
- {
- fprintf(stderr, "VS fails to alloc mem for VIDEO_SINGLETON::instance ()->framesSent for %d frames", VIDEO_SINGLETON::instance ()->numF);
- perror("");
- return 6;
- }
-#endif
-
- VIDEO_SINGLETON::instance ()->systemHeader = (struct Video_Global::SystemHeader *)malloc(sizeof(struct Video_Global::SystemHeader) * VIDEO_SINGLETON::instance ()->numS);
- if (VIDEO_SINGLETON::instance ()->systemHeader == NULL)
- {
- perror("VS error on malloc VIDEO_SINGLETON::instance ()->SystemHeader");
- return 7;
- }
- VIDEO_SINGLETON::instance ()->gopTable = (struct Video_Global::GopTable *)malloc(sizeof(struct Video_Global::GopTable) * VIDEO_SINGLETON::instance ()->numG);
- if (VIDEO_SINGLETON::instance ()->gopTable == NULL)
- {
- perror("VS error on malloc GopHeader");
- return 8;
- }
- VIDEO_SINGLETON::instance ()->frameTable = (struct Video_Global::FrameTable *)malloc(sizeof(Video_Global::FrameTable) * VIDEO_SINGLETON::instance ()->numF);
- if (VIDEO_SINGLETON::instance ()->frameTable == NULL)
- {
- perror("VS error on malloc VIDEO_SINGLETON::instance ()->frameTable");
- return 9;
- }
-
- rewind(VIDEO_SINGLETON::instance ()->fp);
- fileptr = 0;
- state = 0;
- inpic = 0;
- shptr = -1;
- gopptr = -1;
- ftptr = 0;
-
- for (;;)
- {
- nextByte;
- if (state >= 0 && nb == 0x00)
- state ++;
- else if (state >= 2 && nb == 0x01)
- state = -1;
- else if (state == -1)
- {
- switch (nb)
- {
- case 0xb7: /* seq_end_code */
- if (gopptr >= 0 && VIDEO_SINGLETON::instance ()->gopTable[gopptr].size == 0)
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4;
- computePicSize;
- goto exit_phase2;
- break;
- case 0xb3: /* seq_start_code */
- if (gopptr >= 0 && VIDEO_SINGLETON::instance ()->gopTable[gopptr].size == 0)
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4;
- computePicSize;
- shptr ++;
- VIDEO_SINGLETON::instance ()->systemHeader[shptr].offset = fileptr - 4;
- VIDEO_SINGLETON::instance ()->systemHeader[shptr].size = 0;
- break;
- case 0xb8: /* gop_start_code */
- if (VIDEO_SINGLETON::instance ()->systemHeader[shptr].size == 0)
- VIDEO_SINGLETON::instance ()->systemHeader[shptr].size =fileptr - VIDEO_SINGLETON::instance ()->systemHeader[shptr].offset - 4;
- if (gopptr >= 0 && VIDEO_SINGLETON::instance ()->gopTable[gopptr].size == 0)
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4;
- computePicSize;
- gopptr ++;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].systemHeader = shptr;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset = fileptr - 4;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize = 0;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = 0;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].totalFrames = 0;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].previousFrames = gopptr ?
- (VIDEO_SINGLETON::instance ()->gopTable[gopptr - 1].totalFrames + VIDEO_SINGLETON::instance ()->gopTable[gopptr - 1].previousFrames) : 0;
-
- break;
- case 0x00: /* picture_start_code */
- if (VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize == 0)
- {
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4;
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].firstIoffset = fileptr - 4;
- }
- VIDEO_SINGLETON::instance ()->gopTable[gopptr].totalFrames ++;
- computePicSize;
- picptr = fileptr - 4;
- nextByte;
- nextByte;
- nb &= 0x38;
- if (nb == 0x08)
- {
- pictype = 'I';
- inpic = 1;
- }
- else if (nb == 0x10)
- {
- pictype = 'P';
- inpic = 1;
- }
- else if (nb == 0x18)
- {
- pictype = 'B';
- inpic = 1;
- }
- break;
- default:
-
- break;
- }
- state = 0;
- }
- else
- state = 0;
- }
-
- exit_phase2:
- for (shptr = 0; shptr<VIDEO_SINGLETON::instance ()->numS; shptr++)
- {
- VIDEO_SINGLETON::instance ()->maxS = max(VIDEO_SINGLETON::instance ()->maxS, VIDEO_SINGLETON::instance ()->systemHeader[shptr].size);
- VIDEO_SINGLETON::instance ()->minS = min(VIDEO_SINGLETON::instance ()->minS, VIDEO_SINGLETON::instance ()->systemHeader[shptr].size);
- }
- for (gopptr = 0; gopptr<VIDEO_SINGLETON::instance ()->numG; gopptr++)
- {
- VIDEO_SINGLETON::instance ()->maxG = max(VIDEO_SINGLETON::instance ()->maxG, VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize);
- VIDEO_SINGLETON::instance ()->minG = min(VIDEO_SINGLETON::instance ()->minG, VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize);
- }
- VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->maxS + VIDEO_SINGLETON::instance ()->maxG + max(VIDEO_SINGLETON::instance ()->maxI, max(VIDEO_SINGLETON::instance ()->maxP, VIDEO_SINGLETON::instance ()->maxB));
- VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)malloc(sizeof(VideoMessage) + sizeof(VideoPacket) +
- VIDEO_SINGLETON::instance ()->packetBufSize);
- if (VIDEO_SINGLETON::instance ()->packet == NULL)
- {
- perror("VS error on malloc VIDEO_SINGLETON::instance ()->packet buffer");
- return 10;
- }
- VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)((char *)VIDEO_SINGLETON::instance ()->packet + sizeof(VideoMessage));
- /*
- fprintf(stderr, "Pass 2 finished.\n");
- fprintf(stderr, "VIDEO_SINGLETON::instance ()->maxS-%d, VIDEO_SINGLETON::instance ()->maxG-%d, VIDEO_SINGLETON::instance ()->maxI-%d, VIDEO_SINGLETON::instance ()->maxP-%d, VIDEO_SINGLETON::instance ()->maxB-%d.\n", VIDEO_SINGLETON::instance ()->maxS, VIDEO_SINGLETON::instance ()->maxG, VIDEO_SINGLETON::instance ()->maxI, VIDEO_SINGLETON::instance ()->maxP, VIDEO_SINGLETON::instance ()->maxB);
- fprintf(stderr, "VIDEO_SINGLETON::instance ()->minS-%d, VIDEO_SINGLETON::instance ()->minG-%d, VIDEO_SINGLETON::instance ()->minI-%d, VIDEO_SINGLETON::instance ()->minP-%d, VIDEO_SINGLETON::instance ()->minB-%d.\n", VIDEO_SINGLETON::instance ()->minS, VIDEO_SINGLETON::instance ()->minG, VIDEO_SINGLETON::instance ()->minI, VIDEO_SINGLETON::instance ()->minP, VIDEO_SINGLETON::instance ()->minB);
- */
- /*
- {
- int i;
-
- fprintf(stderr, "id: offset size -- system header table:\n");
- for (i=0; i<VIDEO_SINGLETON::instance ()->numS; i++)
- fprintf(stderr, "%-3d %-9u %d\n", i, VIDEO_SINGLETON::instance ()->systemHeader[i].offset, VIDEO_SINGLETON::instance ()->systemHeader[i].size);
- fprintf(stderr,
- "id: header offset hdsize totSize frames preframs Ioffset Isize -- GOP\n");
- for (i=0; i<VIDEO_SINGLETON::instance ()->numG; i++)
- {
- fprintf(stderr, "%-4d %-8d %-8u %-8d %-8d %-8d %-8d %-8u %d\n",
- i,
- VIDEO_SINGLETON::instance ()->gopTable[i].VIDEO_SINGLETON::instance ()->systemHeader,
- VIDEO_SINGLETON::instance ()->gopTable[i].offset,
- VIDEO_SINGLETON::instance ()->gopTable[i].headerSize,
- VIDEO_SINGLETON::instance ()->gopTable[i].size,
- VIDEO_SINGLETON::instance ()->gopTable[i].totalFrames,
- VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames,
- VIDEO_SINGLETON::instance ()->gopTable[i].firstIoffset,
- VIDEO_SINGLETON::instance ()->frameTable[VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames].size
- );
- }
-
- fprintf(stderr, "\nframe information:");
- for (i=0; i<VIDEO_SINGLETON::instance ()->numF; i++)
- fprintf(stderr, "%c%c%-8d", (i%10 ? '\0' : '\n'), VIDEO_SINGLETON::instance ()->frameTable[i].type, VIDEO_SINGLETON::instance ()->frameTable[i].size);
- fprintf(stderr, "\n");
-
- }
- */
- fseek(VIDEO_SINGLETON::instance ()->fp, VIDEO_SINGLETON::instance ()->systemHeader[0].offset+4, 0);
- nextByte;
- VIDEO_SINGLETON::instance ()->horizontalSize = ((int)nb <<4) & 0xff0;
- nextByte;
- VIDEO_SINGLETON::instance ()->horizontalSize |= (nb >>4) & 0x0f;
- VIDEO_SINGLETON::instance ()->verticalSize = ((int)nb <<8) & 0xf00;
- nextByte;
- VIDEO_SINGLETON::instance ()->verticalSize |= (int)nb & 0xff;
- nextByte;
- VIDEO_SINGLETON::instance ()->pelAspectRatio = ((int)nb >> 4) & 0x0f;
- VIDEO_SINGLETON::instance ()->pictureRate = (int)nb & 0x0f;
- nextByte;
- nextByte;
- nextByte;
- VIDEO_SINGLETON::instance ()->vbvBufferSize = ((int)nb << 5) & 0x3e0;
- nextByte;
- VIDEO_SINGLETON::instance ()->vbvBufferSize |= ((int)nb >>3) & 0x1f;
- /*
- fprintf(stderr, "SysHeader info: hsize-%d, vsize-%d, pelAspect-%d, rate-%d, vbv-%d.\n",
- VIDEO_SINGLETON::instance ()->horizontalSize, VIDEO_SINGLETON::instance ()->verticalSize, VIDEO_SINGLETON::instance ()->pelAspectRatio, VIDEO_SINGLETON::instance ()->pictureRate, VIDEO_SINGLETON::instance ()->vbvBufferSize);
- */
- WriteInfoToFile();
- }
-#if 0
- {
- int i, j = 20;
-
- for (i = VIDEO_SINGLETON::instance ()->numG - 1;; i --) {
- if (VIDEO_SINGLETON::instance ()->gopTable[i].offset < 4235260) {
- fprintf(stderr, "group %d: offset %ld\n", i, VIDEO_SINGLETON::instance ()->gopTable[i].offset);
- if (j -- == 0) break;
- }
- }
- /*
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numG; i ++) {
- if (VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames > 1800) {
- fprintf(stderr, "group %d: offset %ld pre-frames %d\n",
- i, VIDEO_SINGLETON::instance ()->gopTable[i].offset, VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames);
- break;
- }
- }
- */
- }
-#endif
- {
- VIDEO_SINGLETON::instance ()->firstPatternSize = VIDEO_SINGLETON::instance ()->gopTable[0].totalFrames;
- VIDEO_SINGLETON::instance ()->firstSendPattern = (char *)malloc(VIDEO_SINGLETON::instance ()->firstPatternSize);
- if (VIDEO_SINGLETON::instance ()->firstSendPattern == NULL)
- {
- fprintf(stderr, "VS failed to allocate VIDEO_SINGLETON::instance ()->firstVIDEO_SINGLETON::instance ()->SendVIDEO_SINGLETON::Instance ()->Pattern for %d frames",
- VIDEO_SINGLETON::instance ()->firstPatternSize);
- perror("");
- return 11;
- }
- }
- VIDEO_SINGLETON::instance ()->firstGopFrames = VIDEO_SINGLETON::instance ()->gopTable[0].totalFrames;
- return 0;
-}
-
- int INITvideo(void)
-{
- INITvideoPara para;
- int failureType = 0;
- int result;
- /*
- fprintf(stderr, "VS about to read Para.\n");
- */
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.version = ntohl(para.version);
- para.nameLength = ntohl(para.nameLength);
-#endif
- if (para.nameLength>0)
- {
- result = CmdRead(VIDEO_SINGLETON::instance ()->videoFile, para.nameLength);
- if (result != 0)
- return result;
- }
- if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) {
- char errmsg[128];
- VIDEO_SINGLETON::instance ()->cmd = CmdFAIL;
- CmdWrite((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- if (Mpeg_Global::session_num > Mpeg_Global::session_limit) {
- sprintf(errmsg,
- "Too many sessions being serviced, please try again later.\n");
- }
- else {
- sprintf(errmsg, "Version # not match, VS %d.%02d, Client %d.%02d",
- VERSION / 100, VERSION % 100,
- para.version / 100, para.version % 100);
- }
- write_string(VIDEO_SINGLETON::instance ()->serviceSocket, errmsg);
- exit(0);
- }
- VIDEO_SINGLETON::instance ()->cmdsn = para.sn;
- /*
- fprintf(stderr, "MPEG file %s got.\n", VIDEO_SINGLETON::instance ()->videoFile);
- */
- VIDEO_SINGLETON::instance ()->videoFile[para.nameLength] = 0;
-
- if (!strncasecmp("LiveVideo", VIDEO_SINGLETON::instance ()->videoFile, 9)) {
- if (OpenLiveVideo(&VIDEO_SINGLETON::instance ()->video_format, &VIDEO_SINGLETON::instance ()->horizontalSize,
- &VIDEO_SINGLETON::instance ()->verticalSize, &VIDEO_SINGLETON::instance ()->averageFrameSize,
- &VIDEO_SINGLETON::instance ()->fps, &VIDEO_SINGLETON::instance ()->pelAspectRatio) == -1) {
- failureType = 100;
- goto failure;
- }
- if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG2) {
- failureType = 101;
- goto failure;
- }
- VIDEO_SINGLETON::instance ()->live_source = 1;
-
- VIDEO_SINGLETON::instance ()->fileSize =0x7fffffff;
- VIDEO_SINGLETON::instance ()->maxS = VIDEO_SINGLETON::instance ()->maxG = VIDEO_SINGLETON::instance ()->maxI = VIDEO_SINGLETON::instance ()->maxP = VIDEO_SINGLETON::instance ()->maxB = VIDEO_SINGLETON::instance ()->minS = VIDEO_SINGLETON::instance ()->minG = VIDEO_SINGLETON::instance ()->minI = VIDEO_SINGLETON::instance ()->minP = VIDEO_SINGLETON::instance ()->minB = 1;
- VIDEO_SINGLETON::instance ()->numS = VIDEO_SINGLETON::instance ()->numG = VIDEO_SINGLETON::instance ()->numF = VIDEO_SINGLETON::instance ()->numI = 0x7fffffff;
- VIDEO_SINGLETON::instance ()->numP = VIDEO_SINGLETON::instance ()->numB = 0;
- VIDEO_SINGLETON::instance ()->vbvBufferSize = 1;
- VIDEO_SINGLETON::instance ()->firstGopFrames = 1;
- VIDEO_SINGLETON::instance ()->patternSize = 1;
- VIDEO_SINGLETON::instance ()->pattern[0] = 'I';
- VIDEO_SINGLETON::instance ()->pattern[1] = 0;
- VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->verticalSize * VIDEO_SINGLETON::instance ()->horizontalSize * 3;
- VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)malloc(sizeof(VideoMessage) + sizeof(VideoPacket) +
- VIDEO_SINGLETON::instance ()->packetBufSize);
- if (VIDEO_SINGLETON::instance ()->packet == NULL)
- {
- perror("Error: VS error on malloc VIDEO_SINGLETON::instance ()->packet buffer");
- exit(1);
- }
- VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)((char *)VIDEO_SINGLETON::instance ()->packet + sizeof(VideoMessage));
-
- }
- else {
- static double pictureRateTable[] = {23.976, 24, 25, 29.97, 30, 50, 59.94, 60};
-
- VIDEO_SINGLETON::instance ()->video_format = VIDEO_MPEG1;
- failureType = init_MPEG1_video_file();
- if (failureType) goto failure;
- VIDEO_SINGLETON::instance ()->fps = pictureRateTable[VIDEO_SINGLETON::instance ()->pictureRate - 1];
- }
-
- {
- INITvideoReply reply;
-
- reply.totalHeaders = htonl(VIDEO_SINGLETON::instance ()->numS);
- reply.totalGroups = htonl(VIDEO_SINGLETON::instance ()->numG);
- reply.totalFrames = htonl(VIDEO_SINGLETON::instance ()->numF);
- reply.sizeIFrame = htonl(VIDEO_SINGLETON::instance ()->maxI);
- reply.sizePFrame = htonl(VIDEO_SINGLETON::instance ()->maxP);
- reply.sizeBFrame = htonl(VIDEO_SINGLETON::instance ()->maxB);
- reply.sizeSystemHeader = htonl(VIDEO_SINGLETON::instance ()->maxS);
- reply.sizeGop = htonl(VIDEO_SINGLETON::instance ()->maxG);
- reply.averageFrameSize = htonl(VIDEO_SINGLETON::instance ()->averageFrameSize);
- reply.verticalSize = htonl(VIDEO_SINGLETON::instance ()->verticalSize);
- reply.horizontalSize = htonl(VIDEO_SINGLETON::instance ()->horizontalSize);
- reply.pelAspectRatio = htonl(VIDEO_SINGLETON::instance ()->pelAspectRatio);
- reply.pictureRate1000 = htonl((int)(VIDEO_SINGLETON::instance ()->fps * 1000));
- reply.vbvBufferSize = htonl(VIDEO_SINGLETON::instance ()->vbvBufferSize);
- reply.firstGopFrames = htonl(VIDEO_SINGLETON::instance ()->firstGopFrames);
- reply.patternSize = htonl(VIDEO_SINGLETON::instance ()->patternSize);
- strncpy(reply.pattern, VIDEO_SINGLETON::instance ()->pattern, PATTERN_SIZE);
-
- reply.live = htonl(VIDEO_SINGLETON::instance ()->live_source);
- reply.format = htonl(VIDEO_SINGLETON::instance ()->video_format);
-
- CmdWrite((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
-
- CmdWrite((char *)&reply, sizeof(reply));
-
- /* write the first SH, GOP and IFrame to VIDEO_SINGLETON::instance ()->serviceSocket (TCP),
- using code for SendPacket() */
- {
- int tmpSocket = VIDEO_SINGLETON::instance ()->videoSocket;
-
- if (VIDEO_SINGLETON::instance ()->live_source) StartPlayLiveVideo();
-
- VIDEO_SINGLETON::instance ()->videoSocket = VIDEO_SINGLETON::instance ()->serviceSocket;
-
- if (VIDEO_SINGLETON::instance ()->live_source) {
- int frame = 0;
- SendPicture(&frame);
- }
- else if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG1) {
- SendPacket(1, 0, 0, 0);
- }
- else {
- fprintf(stderr, "VS: VIDEO_SINGLETON::instance ()->video_format %d not supported.\n",
- VIDEO_SINGLETON::instance ()->video_format);
- }
- VIDEO_SINGLETON::instance ()->videoSocket = tmpSocket;
-
- if (VIDEO_SINGLETON::instance ()->live_source) StopPlayLiveVideo();
- }
-
- return 0;
-
- }
- failure:
- {
- char * msg;
- char errmsg[64];
- VIDEO_SINGLETON::instance ()->cmd = CmdFAIL;
- sprintf(errmsg, "VS failed to alloc internal buf (type %d)", failureType);
- CmdWrite((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- msg = failureType == 1 ? "not a complete MPEG stream" :
- failureType == 2 ? "can't open MPEG file" :
- failureType == 3 ? "MPEG file is not seekable" :
- failureType == 4 ? "not an MPEG stream" :
- failureType == 5 ?
- "too many frames in MPEG file, need change MAX_FRAMES and recompile VS" :
- failureType == 100 ? "failed to connect to live video source" :
- failureType == 101 ? "live MPEG2 not supported" :
- errmsg;
- write_string(VIDEO_SINGLETON::instance ()->serviceSocket, msg);
- exit(0);
- }
-}
-
-#define CheckGroupRange(pnextGroup) \
-{ if ((pnextGroup) < 0 || (pnextGroup) >= VIDEO_SINGLETON::instance ()->numG) \
- { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextGroup(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextGroup), VIDEO_SINGLETON::instance ()->numG); \
- return 0; } }
-
-#define CheckFrameRange(pnextFrame) \
-{ if ((pnextFrame) < 0 || (pnextFrame) >= VIDEO_SINGLETON::instance ()->numF) \
- { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextFrame(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextFrame), VIDEO_SINGLETON::instance ()->numF); \
- return 0; } }
-
-int FrameToGroup(int * frame)
-{
- int f = * frame;
- int i = 0;
- while (i < VIDEO_SINGLETON::instance ()->numG && VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames <= f) i++;
- i --;
- * frame = f - VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames;
- return i;
-}
-
-static int POSITIONvideo()
-{
- int result;
- POSITIONpara para;
- /*
- fprintf(stderr, "POSITION . . .\n");
- */
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-
- if (VIDEO_SINGLETON::instance ()->live_source) return 0;
-
-#ifdef NeedByteOrderConversion
- para.VIDEO_SINGLETON::instance ()->nextGroup = ntohl(para.VIDEO_SINGLETON::instance ()->nextGroup);
- para.sn = ntohl(para.sn);
-#endif
-
- CheckGroupRange(para.nextGroup);
- VIDEO_SINGLETON::instance ()->cmdsn = para.sn;
- result = SendPacket(VIDEO_SINGLETON::instance ()->numS>1 || para.nextGroup == 0, para.nextGroup, 0, 0);
- return result;
-}
-
-static int STEPvideo()
-{
- int group;
- STEPpara para;
- int tag = 0;
- int result;
-
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.VIDEO_SINGLETON::instance ()->nextFrame = ntohl(para.VIDEO_SINGLETON::instance ()->nextFrame);
-#endif
-
- VIDEO_SINGLETON::instance ()->cmdsn = para.sn;
-
- if (!VIDEO_SINGLETON::instance ()->live_source) {
- if (para.nextFrame >= VIDEO_SINGLETON::instance ()->numF) /* send SEQ_END */
- {
- tag = 1;
- para.nextFrame --;
- }
- /*
- fprintf(stderr, "STEP . . .frame-%d\n", para.VIDEO_SINGLETON::instance ()->nextFrame);
- */
- CheckFrameRange(para.nextFrame);
- group = FrameToGroup(&para.nextFrame);
- if (VIDEO_SINGLETON::instance ()->precmd != CmdSTEP && !tag ) {
- result = SendReferences(group, para.nextFrame);
- if (result < 0 )
- return result;
- }
- }
- if (VIDEO_SINGLETON::instance ()->live_source) StartPlayLiveVideo();
-
- if (VIDEO_SINGLETON::instance ()->live_source) {
- SendPicture(&para.nextFrame);
- }
- else if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG1) {
- SendPacket(VIDEO_SINGLETON::instance ()->numS>1, group, tag ? VIDEO_SINGLETON::instance ()->numF : para.nextFrame, 0);
- }
- else {
- fprintf(stderr, "VS: wierd1\n");
- }
-
- if (VIDEO_SINGLETON::instance ()->live_source) StopPlayLiveVideo();
- return 0;
-}
-
-static int timerHeader, timerGroup, timerFrame;
-static int timerOn = 0;
-static int timerAdjust = 0;
-static int preTimerVal = 0;
-static void StopTimer(void);
-static void TimerSpeed(void);
-static void TimerProcessing(void);
-
-static void timerHandler(int sig)
-{
- int val2, val3;
- int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF;
-
- if (Mpeg_Global::drift_ppm) {
- usec -= (int)((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0);
- }
-
- if (timerAdjust > 1)
- usec = (int)(((double)usec * (double)(SPEEDUP_INV_SCALE - 1)) /
- (double)SPEEDUP_INV_SCALE);
- val3 = get_duration(preTimerVal, (val2 = get_usec()));
- /*
- if (val3 >= usec<< 1))
- fprintf(stderr, "Slower: %d out of VIDEO_SINGLETON::instance ()->currentUPF %d.\n",
- val3, usec);
- else
- fprintf(stderr, "+\n");
- */
- preTimerVal = val2;
- if (val3 < 0 || val3 > 100000000)
- val3 = usec;
- val2 = (val3 + (usec>>1)) / usec;
- if (val2 < 0) val2 = 0;
- if (val2) {
- TimerProcessing();
- val2 --;
- }
- VIDEO_SINGLETON::instance ()->addedSignals += val2;
-
- if (VIDEO_SINGLETON::instance ()->addedSignals) {
- val2 = timerAdjust;
- if (timerAdjust < MAX_TIMER_ADJUST) {
- timerAdjust += VIDEO_SINGLETON::instance ()->addedSignals * SPEEDUP_INV_SCALE;
- if (val2 < SPEEDUP_INV_SCALE) {
- TimerSpeed();
- }
- }
- else {
- /*
- fprintf(stderr, "VS timerAdjust %d, VIDEO_SINGLETON::instance ()->addedSignals %d, timerFrame %d\n",
- timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals, timerFrame);
- */
- for (val3 = 0; val3 < VIDEO_SINGLETON::instance ()->addedSignals; val3 ++)
- TimerProcessing();
- }
- VIDEO_SINGLETON::instance ()->addedSignals = 0;
- }
-}
-
-static void TimerProcessing(void)
-{
-/*
- fprintf(stderr, "VS: timerHandler...\n");
-*/
- if (!timerOn) {
- return;
- }
- if (timerAdjust < 0)
- {
- timerAdjust += SPEEDUP_INV_SCALE;
- return;
- }
- if (timerAdjust >0)
- {
- if ((--timerAdjust) == 0)
- TimerSpeed();
- }
- if (VIDEO_SINGLETON::instance ()->cmd == CmdPLAY)
- {
- if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1 && timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames - 1)
- {
- timerFrame ++; /* force sending of END_SEQ when PLAY VIDEO_SINGLETON::instance ()->cmd */
- StopTimer();
- return;
- }
- else
- {
- timerFrame ++;
- if (timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames)
- {
- timerGroup ++;
- timerFrame = 0;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- }
- }
- }
- else {
- if (VIDEO_SINGLETON::instance ()->cmd == CmdFF) {
- if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1) {
- StopTimer();
- return;
- }
- timerGroup ++;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- }
- else {
- if (timerGroup == 0) {
- StopTimer();
- return;
- }
- timerGroup --;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- }
- }
-}
-
-static void StartTimer(void)
-{
- VIDEO_SINGLETON::instance ()->addedUPF = 0;
- VIDEO_SINGLETON::instance ()->addedSignals = 0;
- timerAdjust = (VIDEO_SINGLETON::instance ()->VStimeAdvance * SPEEDUP_INV_SCALE) / VIDEO_SINGLETON::instance ()->currentUPF;
- /*
- SFprintf(stderr, "VS StartTimer(): fast-start frames %d\n",
- timerAdjust / SPEEDUP_INV_SCALE);
- */
- TimerSpeed();
- setsignal(SIGALRM, timerHandler);
- timerOn = 1;
- preTimerVal = get_usec();
- /*
- fprintf(stderr, "VS: timer started at %d upf.\n", VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF);
- */
-}
-
-static void TimerSpeed(void)
-{
- struct itimerval val;
- int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF;
- if (Mpeg_Global::drift_ppm) {
- /*
- int drift = (double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0;
- SFprintf(stderr, "Mpeg_Global::drift_ppm %d, usec %d, drift %d, new usec %d\n",
- Mpeg_Global::drift_ppm, usec, drift, usec - drift);
- */
- usec -= (int)((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0);
- }
- if (timerAdjust > 1)
- usec = (int)(((double)usec * (double)(SPEEDUP_INV_SCALE - 1)) /
- (double)SPEEDUP_INV_SCALE);
- val.it_interval.tv_sec = val.it_value.tv_sec = usec / 1000000;
- val.it_interval.tv_usec = val.it_value.tv_usec = usec % 1000000;
- setitimer(ITIMER_REAL, &val, NULL);
- /*
- SFprintf(stderr,
- "VS TimerSpeed() at %s speed, timerAdjust %d VIDEO_SINGLETON::instance ()->addedSignals %d.\n",
- (timerAdjust > 1) ? "higher" : "normal", timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals);
- */
-}
-
-static void StopTimer()
-{
- struct itimerval val;
- setsignal(SIGALRM, SIG_IGN);
- val.it_interval.tv_sec = val.it_value.tv_sec = 0;
- val.it_interval.tv_usec = val.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &val, NULL);
- timerOn = 0;
- /*
- fprintf(stderr, "VS: timer stopped.\n");
- */
-}
-
-void GetFeedBack()
-{
- VideoFeedBackPara para;
- struct itimerval val;
- int timerUsec;
-
- if (FBread((char *)&para, sizeof(para)) == -1 ||
- ntohl(para.cmdsn) != VIDEO_SINGLETON::instance ()->cmdsn) {
- /*
- SFprintf(stderr, "VS warning: a FB VIDEO_SINGLETON::instance ()->packet discarded.\n");
- */
- return;
- }
-#ifdef NeedByteOrderConversion
- para.VIDEO_SINGLETON::instance ()->needHeader = ntohl(para.VIDEO_SINGLETON::instance ()->needHeader);
- para.addUsecPerFrame = ntohl(para.addUsecPerFrame);
- para.addFrames = ntohl(para.addFrames);
- para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops = ntohl(para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops);
- para.VIDEO_SINGLETON::instance ()->frameRateLimit1000 = ntohl(para.VIDEO_SINGLETON::instance ()->frameRateLimit1000);
-#endif
- VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0;
- VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops;
-
- if (!timerOn) return;
-
- VIDEO_SINGLETON::instance ()->needHeader = para.needHeader;
- memcpy(VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE);
- if (para.addFrames <= 0 || timerAdjust < MAX_TIMER_ADJUST)
- {
- timerAdjust += para.addFrames * SPEEDUP_INV_SCALE;
- TimerSpeed();
- }
- else /* drastic compensation for big gap */
- VIDEO_SINGLETON::instance ()->addedSignals += para.addFrames;
- if (para.addUsecPerFrame) {
- VIDEO_SINGLETON::instance ()->addedUPF += para.addUsecPerFrame;
- TimerSpeed();
- }
- /*
- SFprintf(stderr, "VS fb: addf %d, addupf %d\n",
- para.addFrames, para.addUsecPerFrame);
- */
-}
-
-static int FastVideoPlay(void)
-{
- int result;
- FFpara para;
- int preGroup = -1;
- int preHeader = -1;
- int nfds = (VIDEO_SINGLETON::instance ()->serviceSocket > VIDEO_SINGLETON::instance ()->videoSocket ? VIDEO_SINGLETON::instance ()->serviceSocket : VIDEO_SINGLETON::instance ()->videoSocket) + 1;
-
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.VIDEO_SINGLETON::instance ()->nextGroup = ntohl(para.VIDEO_SINGLETON::instance ()->nextGroup);
- para.usecPerFrame = ntohl(para.usecPerFrame);
- para.framesPerSecond = ntohl(para.framesPerSecond);
- para.VIDEO_SINGLETON::instance ()->VStimeAdvance = ntohl(para.VIDEO_SINGLETON::instance ()->VStimeAdvance);
-#endif
-
- if (VIDEO_SINGLETON::instance ()->live_source) return 0;
-
- VIDEO_SINGLETON::instance ()->VStimeAdvance = para.VStimeAdvance;
- /*
- fprintf(stderr, "VIDEO_SINGLETON::instance ()->VStimeAdvance from client: %d\n", VIDEO_SINGLETON::instance ()->VStimeAdvance);
- */
- CheckGroupRange(para.nextGroup);
- VIDEO_SINGLETON::instance ()->cmdsn = para.sn;
- timerGroup = para.nextGroup;
- timerFrame = 0;
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame;
- StartTimer();
-
- for (;;)
- {
- struct fd_set read_mask;
-/*
- fprintf(stderr, "VS: FF/FB - a loop begines. . .\n");
-*/
- if (preGroup != timerGroup)
- {
- SendPacket(preHeader != timerHeader, timerGroup, 0,
- para.usecPerFrame * VIDEO_SINGLETON::instance ()->patternSize >> 2);
- preHeader = timerHeader;
- preGroup = timerGroup;
- }
-
- FD_ZERO(&read_mask);
- FD_SET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask);
- FD_SET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask);
-#ifdef _HPUX_SOURCE
- if (select(nfds, (int *)&read_mask, NULL, NULL, NULL) == -1)
-#else
- if (select(nfds, &read_mask, NULL, NULL, NULL) == -1)
-#endif
- {
- if (errno == EINTR)
- {
- ACE_DEBUG ((LM_DEBUG,
- "PLAYVIDEO:select EINTR signal \n"));
- continue;
- }
- perror("Error - VS select between service and video sockets");
- exit(1);
-
- }
- if (FD_ISSET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask)) /* stop */
- {
- result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- if (result != 0)
- return result;
- if (VIDEO_SINGLETON::instance ()->cmd == CmdCLOSE) {
- exit(0);
- }
- else if (VIDEO_SINGLETON::instance ()->cmd != CmdSTOP) {
- fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while STOP is expected.\n", VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- exit(1);
- }
- result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int));
- if (result != 0 )
- return result;
-#ifdef NeedByteOrderConversion
- VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn);
-#endif
- StopTimer();
- break;
- }
- if (FD_ISSET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask)) /* feedback, speed adjustment */
- {
- ACE_DEBUG((LM_DEBUG,
- "FastVideo Play:Data socket selected"));
- GetFeedBack();
- }
- ACE_DEBUG((LM_DEBUG,
- "none of the sockets selected \n"));
- }
- return 0;
-}
-
-static void FFvideo()
-{
- /*
- fprintf(stderr, "FF . . .\n");
- */
- FastVideoPlay();
-}
-
-static void FBvideo()
-{
- /*
- fprintf(stderr, "FB . . . \n");
- */
- FastVideoPlay();
-}
-
-void ComputeFirstSendPattern(float limit)
-{
- char * buf = VIDEO_SINGLETON::instance ()->firstSendPattern;
- int len = VIDEO_SINGLETON::instance ()->firstPatternSize;
- char * pat = (char *)malloc(len);
- int f;
-
- if (pat == NULL) {
- fprintf(stderr, "VS error on allocating %d bytes for computing first SP", len);
- perror("");
- exit(1);
- }
- for (f = 0; f < len; f ++) {
- pat[f] = VIDEO_SINGLETON::instance ()->frameTable[f].type;
- }
- memset(buf, 0, len);
-
- if (limit <= 0)
- limit = 1.0;
-
- f = (int)((double)len *
- ((double)limit / (1000000.0 / (double)VIDEO_SINGLETON::instance ()->currentUPF)) + 0.5);
- /* rounded to integer, instead of truncated */
- if (f >= len)
- f = len;
- else if (f <= 1)
- f = 1;
-
- ComputeSendPattern(pat, buf, len, f);
-
- /*
- f = len - f;
- fprintf(stderr, "VIDEO_SINGLETON::instance ()->FirstVIDEO_SINGLETON::instance ()->SendVIDEO_SINGLETON::Instance ()->Pattern (%d frames dropped): ", f);
- {
- int i;
- for (i = 0; i < len; i ++)
- fputc(buf[i] ? pat[i] : '-', stderr);
- }
- fputc('\n', stderr);
- */
- free(pat);
-}
-
- int PLAYliveVideo(PLAYpara * para)
-{
- int doscale;
- int count;
- int first_frame;
- int frame = para->nextFrame;
- int nfds = (VIDEO_SINGLETON::instance ()->serviceSocket > VIDEO_SINGLETON::instance ()->videoSocket ? VIDEO_SINGLETON::instance ()->serviceSocket : VIDEO_SINGLETON::instance ()->videoSocket) + 1;
- struct fd_set read_mask;
- struct timeval tval = {0, 0};
- double ratio;
- int result;
-
- VIDEO_SINGLETON::instance ()->currentUPF = (int)(1000000.0 / VIDEO_SINGLETON::instance ()->fps); /* ignore para.usecPerFrame */
- if (VIDEO_SINGLETON::instance ()->frameRateLimit < VIDEO_SINGLETON::instance ()->fps) {
- doscale = 1;
- ratio = min(VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps) / VIDEO_SINGLETON::instance ()->fps;
- first_frame = frame;
- count = 0;
- /*
- fprintf(stderr, "doscale %d, VIDEO_SINGLETON::instance ()->frameRateLimit %5.2f, VIDEO_SINGLETON::instance ()->fps %5.2f, ratio %5.2f\n",
- doscale, VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps, ratio);
- */
- }
- else doscale = 0;
- StartPlayLiveVideo();
-
- for (;;) {
-
- if (doscale) {
- for (;;) {
- if ((int)((frame - first_frame) * ratio + 0.5) < count) frame ++;
- else break;
- }
- count ++;
- }
- SendPicture(&frame);
- frame ++;
-
- FD_ZERO(&read_mask);
- FD_SET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask);
- FD_SET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask);
-#ifdef _HPUX_SOURCE
- if (select(nfds, (int *)&read_mask, NULL, NULL, &tval) == -1)
-#else
- if (select(nfds, &read_mask, NULL, NULL, &tval) == -1)
-#endif
- {
- if (errno == EINTR)
- continue;
- perror("Error - VS select between service and video sockets");
- StopPlayLiveVideo();
- exit(1);
-
- }
- if (FD_ISSET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask)) /* stop */
- {
- unsigned char tmp;
- result = CmdRead((char *)&tmp, 1);
- if (result != 0)
- return result;
- if (tmp == CmdCLOSE) {
- StopPlayLiveVideo();
- exit(0);
- }
- else if (tmp == CmdSTOP) {
- VIDEO_SINGLETON::instance ()->cmd = tmp;
- /*
- fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSTOP. . .\n");
- */
- result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn);
-#endif
- StopPlayLiveVideo();
- break;
- }
- else if (tmp == CmdSPEED)
- {
- SPEEDpara para;
- /*
- fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSPEED. . .\n");
- */
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
- /* ignore this thing for live video */
- }
- else
- {
- fprintf(stderr, "VS error(live): VIDEO_SINGLETON::instance ()->cmd=%d while expect STOP/SPEED.\n", tmp);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- StopPlayLiveVideo();
- exit(1);
- }
- }
- if (FD_ISSET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask)) /* feedback, only for frame rate
- adjustment */
- {
- VideoFeedBackPara para;
- if (FBread((char *)&para, sizeof(para)) == -1 ||
- ntohl(para.cmdsn) != VIDEO_SINGLETON::instance ()->cmdsn) {
- /*
- SFprintf(stderr, "VS warning: a FB VIDEO_SINGLETON::instance ()->packet discarded.\n");
- */
- return 0;
- }
-#ifdef NeedByteOrderConversion
- para.VIDEO_SINGLETON::instance ()->frameRateLimit1000 = ntohl(para.VIDEO_SINGLETON::instance ()->frameRateLimit1000);
-#endif
- VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0;
- if (VIDEO_SINGLETON::instance ()->frameRateLimit < VIDEO_SINGLETON::instance ()->fps) {
- doscale = 1;
- ratio = min(VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps) / VIDEO_SINGLETON::instance ()->fps;
- first_frame = frame;
- count = 0;
- /*
- fprintf(stderr, "doscale %d, VIDEO_SINGLETON::instance ()->frameRateLimit %5.2f, VIDEO_SINGLETON::instance ()->fps %5.2f, ratio %5.2f\n",
- doscale, VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps, ratio);
- */
- }
- else doscale = 0;
- }
- }
- return 0;
-}
-
-static int PLAYvideo()
-{
- PLAYpara para;
- int preGroup = -1;
- int preHeader = -1;
- int preFrame = -1;
- int result;
-
- fprintf(stderr, "PLAY . . .\n");
-
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.VIDEO_SINGLETON::instance ()->nextFrame = ntohl(para.VIDEO_SINGLETON::instance ()->nextFrame);
- para.usecPerFrame = ntohl(para.usecPerFrame);
- para.framesPerSecond = ntohl(para.framesPerSecond);
- para.VIDEO_SINGLETON::instance ()->frameRateLimit1000 = ntohl(para.VIDEO_SINGLETON::instance ()->frameRateLimit1000);
- para.collectStat = ntohl(para.collectStat);
- para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops = ntohl(para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops);
- para.VIDEO_SINGLETON::instance ()->VStimeAdvance = ntohl(para.VIDEO_SINGLETON::instance ()->VStimeAdvance);
-#endif
-
- VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0;
- VIDEO_SINGLETON::instance ()->cmdsn = para.sn;
- VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame;
- VIDEO_SINGLETON::instance ()->VStimeAdvance = para.VStimeAdvance;
-
- {
- int ts = htonl(get_usec());
- CmdWrite((char *)&ts, sizeof(int));
- }
-
- if (VIDEO_SINGLETON::instance ()->live_source || VIDEO_SINGLETON::instance ()->video_format != VIDEO_MPEG1) {
- if (VIDEO_SINGLETON::instance ()->live_source)
- PLAYliveVideo (&para);
- return 0;
- }
-
-
- fprintf(stderr, "VIDEO_SINGLETON::instance ()->VStimeAdvance from client: %d\n", VIDEO_SINGLETON::instance ()->VStimeAdvance);
-
- VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops;
- ComputeFirstSendPattern(VIDEO_SINGLETON::instance ()->frameRateLimit);
-#ifdef STAT
- if (para.collectStat)
- memset(VIDEO_SINGLETON::instance ()->framesSent, 0, (VIDEO_SINGLETON::instance ()->numF + 7)>>3);
-#endif
- CheckFrameRange(para.nextFrame);
- timerFrame = para.nextFrame;
- timerGroup = FrameToGroup(&timerFrame);
- timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader;
- memcpy(VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE);
- result = SendReferences(timerGroup, timerFrame);
- if (result < 0)
- return result;
- StartTimer();
-
- fprintf (stderr, "VS Going into the for loop\n");
- for (;;)
- {
- int curGroup = timerGroup;
- int curFrame = timerFrame;
- int curHeader = timerHeader;
- char * sp;
- struct fd_set read_mask;
- int nfds = (VIDEO_SINGLETON::instance ()->serviceSocket > VIDEO_SINGLETON::instance ()->videoSocket ? VIDEO_SINGLETON::instance ()->serviceSocket : VIDEO_SINGLETON::instance ()->videoSocket) + 1;
-
- if (preGroup != curGroup || curFrame != preFrame)
- {
- int sendStatus = -1;
- int frameStep = 1;
- if (curGroup == 0)
- {
- int i = curFrame + 1;
- while (i < VIDEO_SINGLETON::instance ()->firstPatternSize && !VIDEO_SINGLETON::instance ()->firstSendPattern[i])
- {
- frameStep ++;
- i++;
- }
- }
- else /* (curGroup > 0) */
- {
- int i = curFrame + 1;
- sp = VIDEO_SINGLETON::instance ()->sendPattern + ((curGroup - 1) % VIDEO_SINGLETON::instance ()->sendPatternGops) * VIDEO_SINGLETON::instance ()->patternSize;
- while (i < VIDEO_SINGLETON::instance ()->patternSize && !sp[i])
- {
- frameStep ++;
- i++;
- }
- }
- if (curGroup == 0)
- {
- if (VIDEO_SINGLETON::instance ()->firstSendPattern[curFrame])
- sendStatus = 0;
- else /* (!VIDEO_SINGLETON::instance ()->firstVIDEO_SINGLETON::instance ()->SendVIDEO_SINGLETON::Instance ()->Pattern[curFrame]) */
- {
- int i = curFrame - 1;
- while (i > 0 && !VIDEO_SINGLETON::instance ()->firstSendPattern[i])
- i--;
- if (i > preFrame)
- /* the frame (curGroup, i) hasn't been sent yet */
- {
- sendStatus = 0;
- curFrame = i;
- }
- else
- sendStatus = -1;
- }
- }
- else if (sp[curFrame]) /* curGroup > 0 */
- sendStatus = 0;
- else /* (!sp[curFrame]) */
- {
- int i = curFrame - 1;
- while (i > 0 && !sp[i])
- i--;
- if (curGroup == preGroup && i > preFrame)
- /* the frame (curGroup, i) hasn't been sent yet */
- {
- sendStatus = 0;
- curFrame = i;
- }
- else
- sendStatus = -1;
- }
- if (!sendStatus)
- {
- // Send the current video frame, calls send_to_network which
- // fragments and sends via blocking write .
- sendStatus = SendPacket(preHeader != curHeader,
- curGroup, curFrame,
- (VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF) * frameStep);
- if (!sendStatus)
- {
- preHeader = curHeader;
- preGroup = curGroup;
- preFrame = curFrame;
-#ifdef STAT
- if (para.collectStat)
- {
- int f = VIDEO_SINGLETON::instance ()->gopTable[curGroup].previousFrames + curFrame;
- VIDEO_SINGLETON::instance ()->framesSent[f>>3] |= (1 << (f % 8));
- }
-#endif
- }
- }
- }
-
- // Wait for a command on serviceSocket or Feedback on videoSocket (UDP)
- FD_ZERO(&read_mask);
- FD_SET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask);
- FD_SET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask);
-#ifdef _HPUX_SOURCE
- if (select(nfds, (int *)&read_mask, NULL, NULL, NULL) == -1)
-#else
- if (select(nfds, &read_mask, NULL, NULL, NULL) == -1)
-#endif
- {
- if (errno == EINTR) /* select() interrupted */
- {
- ACE_DEBUG ((LM_DEBUG,
- "PLAYVideo:Select interrupted coninuing..\n"));
- continue;
- }
- perror("Error - VS select between service and video sockets");
- exit(1);
-
- }
- if (FD_ISSET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask)) /* stop, speed change, loop swap */
- {
- ACE_DEBUG ((LM_DEBUG,
- "PLAYvideo:serviceSocket selected \n"));
- unsigned char tmp;
- result = CmdRead((char *)&tmp, 1);
- if (result != 0)
- return result;
-
- if (tmp == CmdCLOSE) {
- exit(0);
- }
- else if (tmp == CmdSTOP) {
- VIDEO_SINGLETON::instance ()->cmd = tmp;
- /*
- fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSTOP. . .\n");
- */
- result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn);
-#endif
- StopTimer();
- break;
- }
- else if (tmp == CmdSPEED)
- {
- SPEEDpara para;
- /*
- fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSPEED. . .\n");
- */
- result = CmdRead((char *)&para, sizeof(para));
- if (result != 0)
- return result;
-#ifdef NeedByteOrderConversion
- para.sn = ntohl(para.sn);
- para.usecPerFrame = ntohl(para.usecPerFrame);
- para.framesPerSecond = ntohl(para.framesPerSecond);
- para.sendPatternGops = ntohl(para.sendPatternGops);
- para.frameRateLimit1000 = ntohl(para.frameRateLimit1000);
-#endif
- VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0;
- VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops;
- VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame;
- VIDEO_SINGLETON::instance ()->addedUPF = 0;
- memcpy(VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE);
- TimerSpeed();
- }
- else
- {
- fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while expect STOP/SPEED.\n", tmp);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- exit(1);
- }
- }
- if (FD_ISSET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask)) /* feedBack, speed adjustment */
- {
- ACE_DEBUG ((LM_DEBUG,
- "PLAYVIDEO:Data SOCKET selected\n"));
- GetFeedBack();
- }
- ACE_DEBUG ((LM_DEBUG,
- "PLAYVIDEO:none selected\n"));
- }
- return 0;
-}
-
-#include <ctype.h>
-
-static void STATstream(void)
-{
- int i, j = 0;
- for (i = 0; i < VIDEO_SINGLETON::instance ()->numF; i++)
- {
- short size = htons(VIDEO_SINGLETON::instance ()->frameTable[i].size);
- char type = VIDEO_SINGLETON::instance ()->frameTable[i].type;
- if (i == VIDEO_SINGLETON::instance ()->gopTable[j].previousFrames)
- {
- type = tolower(type);
- j ++;
- }
- CmdWrite((char *)&type, 1);
- CmdWrite((char *)&size, 2);
- }
-}
-
-static void STATsent(void)
-{
-#ifdef STAT
- CmdWrite((char *)VIDEO_SINGLETON::instance ()->framesSent, (VIDEO_SINGLETON::instance ()->numF + 7) / 8);
-#else
- int i;
- char zeroByte = 0;
- for (i = 0; i < (VIDEO_SINGLETON::instance ()->numF + 7) / 8; i++)
- CmdWrite((char *)&zeroByte, 1);
-#endif
-}
-
-static void on_exit_routine(void)
-{
- struct sockaddr_in peeraddr_in;
- int size = sizeof(peeraddr_in);
- /*
- if (!VIDEO_SINGLETON::instance ()->normalExit) {
- fprintf(stderr, "VS exitting abnormally, dump core...\n");
- kill(getpid(), SIGSEGV);
- usleep(2000000);
- }
- */
- /*
- fprintf(stderr, "A VS session terminated.\n");
- */
- if (getpeername(VIDEO_SINGLETON::instance ()->serviceSocket,
- (struct sockaddr *)&peeraddr_in, &size) == 0 &&
- peeraddr_in.sin_family == AF_INET) {
- if (strncmp(inet_ntoa(peeraddr_in.sin_addr), "129.95.50", 9)) {
- struct hostent *hp;
- time_t val = time(NULL);
- char * buf = ctime(&VIDEO_SINGLETON::instance ()->start_time);
-
- hp = gethostbyaddr((char *)&(peeraddr_in.sin_addr), 4, AF_INET);
- buf[strlen(buf)-1] = 0;
- printf("%s: %s %3dm%02ds %dP %s\n",
- buf,
- hp == NULL ? inet_ntoa(peeraddr_in.sin_addr) : hp->h_name,
- (val - VIDEO_SINGLETON::instance ()->start_time) / 60, (val - VIDEO_SINGLETON::instance ()->start_time) % 60,
- VIDEO_SINGLETON::instance ()->pkts_sent, VIDEO_SINGLETON::instance ()->videoFile);
- }
- }
- ComCloseConn(VIDEO_SINGLETON::instance ()->serviceSocket);
- ComCloseConn(VIDEO_SINGLETON::instance ()->videoSocket);
-}
-
-int VideoServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size)
-{
- int result;
-
- VIDEO_SINGLETON::instance ()->serviceSocket = ctr_fd;
- VIDEO_SINGLETON::instance ()->videoSocket = data_fd;
- VIDEO_SINGLETON::instance ()->conn_tag = max_pkt_size;
-
- if (max_pkt_size > 0) VIDEO_SINGLETON::instance ()->msgsize = max_pkt_size;
- else if (max_pkt_size < 0) VIDEO_SINGLETON::instance ()->msgsize = - max_pkt_size;
- else VIDEO_SINGLETON::instance ()->msgsize = 1024 * 1024;
- /*
- SFprintf(stderr, "VS VIDEO_SINGLETON::instance ()->msgsize = %d\n", VIDEO_SINGLETON::instance ()->msgsize);
- */
- VIDEO_SINGLETON::instance ()->msgsize -= sizeof(VideoMessage);
-
- VIDEO_SINGLETON::instance ()->start_time = time(NULL);
-
- atexit(on_exit_routine);
-
- VIDEO_SINGLETON::instance ()->lastRef[0] = VIDEO_SINGLETON::instance ()->lastRef[1] = -1;
- VIDEO_SINGLETON::instance ()->lastRefPtr = 0;
-
- result = INITvideo();
-
- if (result != 0)
- return result;
-
- if (rttag) {
- if (SetRTpriority("VS", 0) == -1) rttag = 0;
- }
-
- for (;;)
- {
-
- fprintf(stderr, "VS: waiting for a new command...\n");
-
- VIDEO_SINGLETON::instance ()->precmd = VIDEO_SINGLETON::instance ()->cmd;
- result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1);
- if (result != 0)
- {
- cerr << result;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) VideoServer "),
- result);
- }
- fprintf(stderr, "VS got VIDEO_SINGLETON::instance ()->cmd %d\n", VIDEO_SINGLETON::instance ()->cmd);
-
- switch (VIDEO_SINGLETON::instance ()->cmd)
- {
- case CmdPOSITION:
- case CmdPOSITIONrelease:
- result = POSITIONvideo();
- if (result != 0)
- return result;
- break;
- case CmdSTEP:
- result = STEPvideo();
- if (result != 0)
- return result;
- break;
- case CmdFF:
- FFvideo();
- break;
- case CmdFB:
- FBvideo();
- break;
- case CmdPLAY:
- result = PLAYvideo();
- if (result != 0)
- return result;
- break;
- case CmdCLOSE:
- /*
- fprintf(stderr, "a session closed.\n");
- VIDEO_SINGLETON::instance ()->normalExit =1;
- */
- // exit(0);
- return 0;
- break;
- case CmdSTATstream:
- STATstream();
- break;
- case CmdSTATsent:
- STATsent();
- break;
- default:
- fprintf(stderr,
- "VS error: video channel command %d not known.\n", VIDEO_SINGLETON::instance ()->cmd);
- VIDEO_SINGLETON::instance ()->normalExit = 0;
- return -1;
- break;
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile
deleted file mode 100644
index eede6dbb217..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile
+++ /dev/null
@@ -1,670 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIBNAME = libmpeg_shared
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-FILES = $(IDL_FILES)
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-
-#TAO_IDLFLAGS = -Wb,export_macro=TAO_ORBSVCS_Export -Wb,export_include=orbsvcs_export.h
-
-IDL_FILES = Video_ControlS Video_ControlC
-
-FILES += com fileio filters routine sendpt Video_Control_i
-
-LDFLAGS += -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG)#-H
-
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)
-
-LIBS += -lTAO -lACE
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-##LDFLAGS += -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG)#-H
-CPPFLAGS += -DSH_MEM -DNEBUG -DSunOS -DSTAT
-
-.PRECIOUS: Video_ControlS.cpp Video_ControlC.cpp
-
-idl_stubs: $(addsuffix .h, $(IDL_FILES))
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/Video_ControlS.o .obj/Video_ControlS.so .shobj/Video_ControlS.o .shobj/Video_ControlS.so: Video_ControlS.cpp Video_ControlS.h Video_ControlC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_ControlC.i Video_ControlS.i
-.obj/Video_ControlC.o .obj/Video_ControlC.so .shobj/Video_ControlC.o .shobj/Video_ControlC.so: Video_ControlC.cpp Video_ControlC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_ControlC.i Video_ControlS.h Video_ControlS.i
-.obj/com.o .obj/com.so .shobj/com.o .shobj/com.so: com.cpp \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i fileio.h \
- routine.h com.h
-.obj/fileio.o .obj/fileio.so .shobj/fileio.o .shobj/fileio.so: fileio.cpp routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i fileio.h
-.obj/filters.o .obj/filters.so .shobj/filters.o .shobj/filters.so: filters.cpp filters.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-.obj/routine.o .obj/routine.so .shobj/routine.o .shobj/routine.so: routine.cpp routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-.obj/sendpt.o .obj/sendpt.so .shobj/sendpt.o .shobj/sendpt.so: sendpt.cpp sendpt.h
-.obj/Video_Control_i.o .obj/Video_Control_i.so .shobj/Video_Control_i.o .shobj/Video_Control_i.so: Video_Control_i.cpp Video_Control_i.h \
- Video_ControlS.h Video_ControlC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- Video_ControlC.i Video_ControlS.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl
deleted file mode 100644
index db91a0449ab..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl
+++ /dev/null
@@ -1,105 +0,0 @@
-// -*- C++ -*-
-
-// $Id$
-
-interface Video_Control
-{
-
- const long VIDEO_PATTERN_SIZE = 100;
- struct INITvideoPara
- {
- long sn;
- long version;
- long nameLength; /* the length of the video file */
- /* this structure is followed by a zero-terminated file name as follows:
- char videoFile[];
- */
- };
-
- struct INITvideoReply
- {
- long live;
- long format;
-
- long totalHeaders;
- long totalFrames;
- long totalGroups;
- long horizontalSize;
- long verticalSize;
- long pelAspectRatio;
- long pictureRate1000;
- long vbvBufferSize;
- long sizeIFrame;
- long sizePFrame;
- long sizeBFrame;
- long sizeSystemHeader;
- long sizeGop;
- long averageFrameSize;
- long firstGopFrames;
- long patternSize;
- sequence <char> pattern;
- };
-
- /* CmdPOSITION, CmdPOSITIONrelease: followed by following parameter */
- struct POSITIONpara
- {
- long sn;
- long nextGroup;
- };
-
- /* CmdSTEP: followed by following parameter */
- struct STEPpara
- {
- long sn;
- long nextFrame;
- };
-
- /* CmdFF, CmdFB: followed by following parameter */
- struct FFpara
- {
- long sn;
- long nextGroup;
- long usecPerFrame;
- long framesPerSecond;
- long VStimeAdvance;
- };
-
- /*CmdPLAY: followed by following parameter */
- struct PLAYpara
- {
- long sn;
- long collectStat;
- long nextFrame;
- long usecPerFrame;
- long framesPerSecond;
- long frameRateLimit1000;
- long VStimeAdvance;
- long sendPatternGops;
- sequence <char> sendPattern;
- };
-
- /* CmdSPEED: parameter */
- struct SPEEDpara
- {
- long sn;
- long usecPerFrame;
- long framesPerSecond;
- long frameRateLimit1000;
- long sendPatternGops;
- sequence <char> sendPattern;
- };
-
-
- boolean init_video (in INITvideoPara para);
- boolean stat_stream (out char ch, out long size);
- boolean close ();
- boolean stat_sent ();
- boolean fast_forward (in FFpara para);
- boolean fast_backward (in FFpara para);
- boolean step (in STEPpara para);
- boolean play (in PLAYpara para, out long vts);
- boolean position (in POSITIONpara para);
- boolean speed (in SPEEDpara para);
- boolean stop (in long cmdsn);
-};
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.cpp
deleted file mode 100644
index 7fd12b2407e..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// $Id$
-
-#include "Video_Control_i.h"
-
-Video_Control_i::Video_Control_i ()
-{
-}
-
-CORBA::Boolean
-Video_Control_i::init_video (const Video_Control::INITvideoPara &para,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::close (CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::stat_sent (CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::fast_forward (const Video_Control::FFpara &para,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::fast_backward (const Video_Control::FFpara &para,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::step (const Video_Control::STEPpara &para,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::position (const Video_Control::POSITIONpara &para,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::speed (const Video_Control::SPEEDpara &para,
- CORBA::Environment&)
-{
- return 0;
-}
-
-
-CORBA::Boolean
-Video_Control_i::stop (CORBA::Long cmdsn,
- CORBA::Environment&)
-{
- return 0;
-}
-
-Video_Control_i::~Video_Control_i ()
-{
-
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.h
deleted file mode 100644
index 63b6f07efa9..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if !defined (AV_VIDEO_CONTROL_H)
-#define AV_VIDEO_CONTROL_H
-
-
-#include "Video_ControlS.h"
-
-class Video_Control_i
- : public virtual POA_Video_Control
-{
-public:
- Video_Control_i ();
- virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean stat_stream (CORBA::Char_out ch,
- CORBA::Long_out size,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean close (CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean stat_sent (CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean fast_forward (const Video_Control::FFpara &para,
- CORBA::Environment &_tao_environment
- );
-
- virtual CORBA::Boolean fast_backward (const Video_Control::FFpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean step (const Video_Control::STEPpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean play (const Video_Control::PLAYpara &para,
- CORBA::Long_out vts,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean position (const Video_Control::POSITIONpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean speed (const Video_Control::SPEEDpara &para,
- CORBA::Environment &_tao_environment);
-
- virtual CORBA::Boolean stop (CORBA::Long cmdsn,
- CORBA::Environment &_tao_environment);
-
- virtual ~Video_Control_i (void);
-
-};
-
-#endif /* if !defined (AV_VIDEO_CONTROL_H) */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp
deleted file mode 100644
index b0863619538..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp
+++ /dev/null
@@ -1,1635 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <ctype.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <sys/un.h>
-#include <time.h>
-#include <sys/time.h>
-#include "include/common.h"
-#include "fileio.h"
-#include "routine.h"
-#include "com.h"
-#include "ace/OS.h"
-
-#ifdef NATIVE_ATM
-#include "atmcom.h"
-#endif
-
-#define CONN_INET 1
-#define CONN_UNIX 2
-#define CONN_ATM 3
-
-#define SERVER_FDTABLE_SIZE 50
-#define CLIENT_FDTABLE_SIZE 10
-
-#define STATE_PENDING 1
-#define STATE_CONTROL 2
-#define STATE_DATA 3
-#define STATE_SINGLE 4
-
-static int inet_port;
-static char * unix_port, * atm_port;
-
-static struct FdTable
-{
- int fd; /* -1 -- free item, >=0 -- fd value */
- int type;
- unsigned stime; /* setup time, in seconds */
- int state;
-} * fdTable = NULL;
-static int size = 0;
-
-int ComInitClient(int pinet_port, char * punix_port, char * patm_port)
-{
- int i;
-
- inet_port = pinet_port;
- unix_port = punix_port;
- atm_port = patm_port;
- if (size) {
- fprintf(stderr,
- "Error ComInitClient: pid %d already done ComInitClient/Server\n",
- getpid());
- return -1;
- }
- size = CLIENT_FDTABLE_SIZE;
- fdTable = (struct FdTable *)ACE_OS::malloc(size * sizeof(*fdTable));
- if (fdTable == NULL) {
- fprintf(stderr,
- "Error ComInitClient: pid %d failed to allocated fdTable space:",
- getpid());
- perror("");
- return -1;
- }
- for (i = 0; i < size; i ++) {
- fdTable[i].fd = -1;
- }
-#ifdef NATIVE_ATM
- return ATMinitClient(atm_port);
-#else
- return 0;
-#endif
-}
-
-void ComCloseClient(void)
-{
- int i;
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd >= 0) ComCloseConn(fdTable[i].fd);
- }
-#ifdef NATIVE_ATM
- ATMcloseClient();
-#endif
- return;
-}
-
-int ComCloseFd(int fd)
-{
- int i;
- if (!size) {
- fprintf(stderr,
- "Error ComCloseFd: pid %d not done ComInitClient/Server yet.\n",
- getpid());
- return -1;
- }
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == fd) break;
- }
- if (i < size) {
- fdTable[i].fd = -1;
- if (fdTable[i].type == CONN_ATM) {
-#ifdef NATIVE_ATM
- return ATMcloseFd(fd);
-#else
- fprintf(stderr,
- "Error ComCloseFd: pid %d CONN_ATM not supported.\n",
- getpid());
- return -1;
-#endif
- }
- else {
- close(fd);
- }
- return 0;
- }
- else {
- fprintf(stderr,
- "Error ComCloseFd: pid %d can't find fd %d in table\n",
- getpid(), fd);
- return -1;
- }
-}
-
-int ComCloseConn(int fd)
-{
- int i;
- if (!size) {
- fprintf(stderr,
- "Error ComCloseConn: pid %d not done ComInitClient/Server yet.\n",
- getpid());
- return -1;
- }
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == fd) break;
- }
- if (i < size) {
- fdTable[i].fd = -1;
- if (fdTable[i].type == CONN_ATM) {
-#ifdef NATIVE_ATM
- return ATMcloseConn(fd);
-#else
- fprintf(stderr,
- "Error ComCloseConn: pid %d CONN_ATM not supported.\n",
- getpid());
- return -1;
-#endif
- }
- else {
- close(fd);
- }
- return 0;
- }
- else {
- fprintf(stderr,
- "Error ComCloseConn: pid %d can't find fd %d in table\n",
- getpid(), fd);
- return -1;
- }
-}
-
-/* address format: [ATM:|INET:]real_address | ""
-
- "" -- UNIX socket, reliable byte stream
- [INET:]real_address -- INET sockets, reliable control byte stream, and
- *max_pkt_size == 0 : reliable data byte stream, or
- != 0 : unreliable packet stream;
- ATM:real_address -- ATM sockets, both data and control are
- unreliable packet streams;
- DATM:real_address -- INET/UNIX control reliable byte stream
- and ATM unreliable byte stream;
-
- Communication between client and server:
-
- ctr_fd: client --> server server --> client
- -2: conn-less INET Open udp sock, send addr in net byte order
- <port, addr> <port(short), addr(long)>
- -1: conn-orient Send value of fd, wait to be paired
- cfd>=0: data sock Paired with cfd and return.
- */
-
-int ComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size)
-{
- int i;
- int cfd, dfd, csocktype, dsocktype;
- int conn_tag = !(*max_pkt_size);
- struct sockaddr_in addressIn;
- struct sockaddr_un addressUn;
-
- if (!size) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d not done ComInitClient/Server yet.\n",
- getpid());
- return -1;
- }
-
- cfd = 0;
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) cfd ++;
- }
- if (cfd < 2) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d no faTable entry for the pair",
- getpid());
- return -1;
- }
-
- /* tell the type of connections to establish:
- If the server is on the same host, then UNIX socket is used */
- if (address[0] == 0) {
- csocktype = CONN_UNIX;
- dsocktype = CONN_UNIX;
- }
- else if (!strncasecmp(address, "atm:", 4)) {
- address += 4;
- csocktype = CONN_ATM;
- dsocktype = CONN_ATM;
- }
- else if (!strncasecmp(address, "datm:", 5)) {
- address += 5;
- csocktype = CONN_INET;
- dsocktype = CONN_ATM;
- }
- else {
- csocktype = CONN_INET;
- dsocktype = CONN_INET;
- }
- if (csocktype == CONN_INET || dsocktype == CONN_INET) {
- struct hostent *hp;
- char hostname[100];
- addressIn.sin_family = AF_INET;
- if (!strncasecmp(address, "inet:", 5)) {
- address += 5;
- }
- if (isascii(address[0]) && isdigit(address[0]))
- addressIn.sin_addr.s_addr = inet_addr(address);
- else {
- if ((hp = gethostbyname(address)) == NULL) { /* No such host! */
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d host %s can't be found:",
- getpid(), address);
- perror("");
- return -1;
- }
- if (hp->h_addrtype != AF_INET) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d host %s is not of INET type address.\n",
- getpid(), address);
- return -1;
- }
- memcpy((char *)&addressIn.sin_addr.s_addr, (char *)hp->h_addr,
- sizeof(addressIn.sin_addr.s_addr));
- /*
- bcopy((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr,
- sizeof(addressIn.sin_addr.s_addr));
- */
- }
- if (get_hostname(hostname, 100)) {
- fprintf(stderr, "Error ComOpenConnPair: pid %d failed to get_hostname:",
- getpid());
- perror("");
- return -1;
- }
- if ((hp = gethostbyname(hostname)) == NULL) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to its own IP address:",
- getpid());
- perror("");
- return -1;
- }
- if (hp->h_addrtype != AF_INET) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d own address is not INET type",
- getpid());
- return -1;
- }
-
- if (!memcmp((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr,
- sizeof(addressIn.sin_addr.s_addr))) {
- if (csocktype == CONN_INET) csocktype = CONN_UNIX;
- if (dsocktype == CONN_INET) dsocktype = CONN_UNIX;
- }
- }
-
- /* build appropriate type of Connections to Server */
- if (csocktype == CONN_UNIX && dsocktype == CONN_UNIX) {
- /* build UNIX connection to server */
- addressUn.sun_family = AF_UNIX;
- strncpy(addressUn.sun_path, unix_port,
- sizeof(struct sockaddr_un) - sizeof(short));
- cfd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (cfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open UNIX cfd:",
- getpid());
- perror("");
- return -1;
- }
- usleep(10000); /* this is for waiting for the uncaught signal mentioned
- below */
- if (connect(cfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to conn UNIX cfd to server:",
- getpid());
- perror("");
- i = -3; /* I don't understand why when connect() returns EINTR, the connection
- is still built, and the other end can still get what written at
- this end, 'i = -3' is a garbage to be written. */
- write(cfd, &i, 4);
- close(cfd);
- return -1;
- }
- if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write -1 to UNIX cfd:",
- getpid());
- perror("");
- close(cfd);
- return -1;
- }
-
- dfd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (dfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open UNIX dfd:",
- getpid());
- perror("");
- close(cfd);
- return -1;
- }
- usleep(10000);
- if (connect(dfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to conn UNIX dfd to server:",
- getpid());
- perror("");
- i = -3;
- write(dfd, &i, 4);
- close(cfd);
- close(dfd);
- return -1;
- }
- if (time_write_int(dfd, i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write (cfd) to UNIX dfd:",
- getpid());
- perror("");
- close(cfd);
- close(dfd);
- return -1;
- }
- *max_pkt_size = 0;
- }
- else if (csocktype == CONN_INET && dsocktype == CONN_INET) {
- /* build TCP connection to server */
- addressIn.sin_port = htons(inet_port);
- cfd = socket(AF_INET, SOCK_STREAM, 0);
- if (cfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open TCP cfd:",
- getpid());
- perror("");
- return -1;
- }
- usleep(10000);
- if (connect(cfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to conn TCP cfd to server:",
- getpid());
- perror("");
- i = -3;
- write(cfd, &i, 4);
- close(cfd);
- return -1;
- }
- if (conn_tag) { /* create a second connection with server */
- if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write -1 to TCP cfd:",
- getpid());
- perror("");
- close(cfd);
- return -1;
- }
- dfd = socket(AF_INET, SOCK_STREAM, 0);
- if (dfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open TCP dfd:",
- getpid());
- perror("");
- close(cfd);
- return -1;
- }
- usleep(10000);
- if (connect(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to conn TCP dfd to server:",
- getpid());
- perror("");
- i = -3;
- write(dfd, &i, 4);
- close(cfd);
- close(dfd);
- return -1;
- }
- if (time_write_int(dfd, i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write (cfd) to TCP dfd:",
- getpid());
- perror("");
- close(cfd);
- close(dfd);
- return -1;
- }
- *max_pkt_size = 0;
- }
- else { /* create a UDP socket for data */
- dfd = socket(AF_INET, SOCK_DGRAM, 0);
- if (dfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open UDP dfd:",
- getpid());
- perror("");
- close(cfd);
- return -1;
- }
- memset((char *)&addressIn, 0, sizeof(addressIn));
-
- i = sizeof(addressIn);
- if (getsockname(cfd, (struct sockaddr *)&addressIn, &i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to getsocketname on TCP cfd:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
-
- addressIn.sin_family = AF_INET;
- addressIn.sin_port = 0;
- if (bind(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to bind UDP dfd:",
- getpid());
- perror("");
- close(cfd);
- close(dfd);
- return -1;
- }
- if (time_write_int(cfd, -2) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write -2 to TCP cfd:",
- getpid());
- perror("");
- close(cfd);
- close(dfd);
- return -1;
- }
-
- i = sizeof(addressIn);
- if (getsockname(dfd, (struct sockaddr *)&addressIn, &i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to getsocketname on UDP fd:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
- if (time_write_bytes(cfd, (char *)&addressIn.sin_port, sizeof(short)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write (port) to TCP cfd:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
-
- fprintf(stderr, "ComOpenConnPair local UDP socket: addr - %s, port - %u.\n",
- inet_ntoa(addressIn.sin_addr), ntohs(addressIn.sin_port));
-
-
- fprintf(stderr, "ComOpenConnPair UDP port %d (should be > 0)\n",
- ntohs(addressIn.sin_port));
-
- /*
- i = sizeof(addressIn);
- if (getsockname(cfd, (struct sockaddr *)&addressIn, &i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to getsocketname on TCP cfd:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
- */
- if (time_write_bytes(cfd, (char *)&addressIn.sin_addr.s_addr, sizeof(int)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write (IP addr) to TCP cfd:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
-
- fprintf(stderr, "ComOpenConnPair TCP cfd socket: addr - %s, port - %u.\n",
- inet_ntoa(addressIn.sin_addr), ntohs(addressIn.sin_port));
-
- if (time_read_bytes(cfd, (char *)&addressIn.sin_port, sizeof(short)) == -1 ||
- time_read_bytes(cfd, (char *)&addressIn.sin_addr.s_addr, sizeof(int)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to read (IP addr/port) from TCP cfd:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
- usleep(10000);
- if (connect(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed conn UDP dfd to peer:",
- getpid());
- perror("");
- close(cfd);
- close(dfd);
- return -1;
- }
-
- fprintf(stderr, "ComOpenConnPair UDP dfd connects to host-%s (port %u)\n",
- inet_ntoa(addressIn.sin_addr),
- ntohs(addressIn.sin_port));
-
-#ifndef LINUX
- /* adjust the dfd REVBUF size */
- {
- int len;
- len = INET_SOCKET_BUFFER_SIZE + 100;
- /*
- if (setsockopt(dfd, SOL_SOCKET, SO_SNDBUF, (char *)&len, sizeof(len)) == -1) {
- fprintf(stderr,
- "Warning ComOpenConnPair: pid %d failed to set UDP dfd-snd to size %d:",
- getpid(), len);
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
- */
- len = 65536;
- while (setsockopt(dfd, SOL_SOCKET, SO_RCVBUF, (char *)&len, sizeof(len)) == -1) {
- len -= 1024;
- if (len < 8192) break;
- /*
- fprintf(stderr,
- "Warning ComOpenConnPair: pid %d failed to set UDP dfd-rcv to size %d:",
- getpid(), len);
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- */
- }
- if (getuid() == DEVELOPER_UID)
- fprintf(stderr, "Set UDP dfd-rcv to %dB\n", len);
- }
-#endif
- *max_pkt_size = - INET_SOCKET_BUFFER_SIZE;
- /* UDP sockets on HP and SUN are discard mode */
- }
- if (setsockopt(cfd, IPPROTO_TCP, TCP_NODELAY,
- (const char *)&i, sizeof(i)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to setsockopt on TCP cfd with TCP_NODELAY:",
- getpid());
- perror("");
- close(dfd);
- close(cfd);
- return -1;
- }
- }
- else if (dsocktype == CONN_ATM) { /* CONN_ATM */
-#ifdef NATIVE_ATM
- if (csocktype == CONN_INET) {
- /* build TCP connection to server */
- addressIn.sin_port = htons(inet_port);
- cfd = socket(AF_INET, SOCK_STREAM, 0);
- if (cfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open TCP1 cfd:",
- getpid());
- perror("");
- return -1;
- }
- usleep(10000);
- if (connect(cfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to conn TCP1 cfd to server:",
- getpid());
- perror("");
- i = -3;
- write(cfd, &i, 4);
- close(cfd);
- return -1;
- }
- }
- else if (csocktype == CONN_UNIX) {
- /* build UNIX connection to server */
- addressUn.sun_family = AF_UNIX;
- strncpy(addressUn.sun_path, unix_port,
- sizeof(struct sockaddr_un) - sizeof(short));
- cfd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (cfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open UNIX1 cfd:",
- getpid());
- perror("");
- return -1;
- }
- usleep(10000); /* this is for waiting for the uncaught signal mentioned
- below */
- if (connect(cfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to conn UNIX1 cfd to server:",
- getpid());
- perror("");
- i = -3; /* I don't understand why when select() returns EINTR, the connection
- is still built, and the other end can still get what written at
- this end, 'i = -3' is a garbage to be written. */
- write(cfd, &i, 4);
- close(cfd);
- return -1;
- }
- }
- else { /* CONN_ATM */
- cfd = ATMopenConn(address, max_pkt_size);
- if (cfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open ATM cfd conn:",
- getpid());
- perror("");
- return -1;
- }
- usleep(100000); /* be nice to buggy ATM driver */
- }
- if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write -1 to %s cfd:",
- getpid(),
- (csocktype == CONN_UNIX) ? "UNIX1" :
- (csocktype == CONN_INET) ? "INET1" : "ATM");
- perror("");
- if (csocktype == CONN_ATM) ATMcloseConn(cfd);
- else close(cfd);
- return -1;
- }
-
- dfd = ATMopenConn(address, max_pkt_size);
- if (dfd == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to open ATM dfd conn:",
- getpid());
- perror("");
- ATMcloseConn(cfd);
- return -1;
- }
- usleep(100000); /* be nice to buggy ATM driver */
- if (time_write_int(dfd, i) == -1) {
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d failed to write (cfd) to ATM dfd:",
- getpid());
- perror("");
- ATMcloseConn(cfd);
- ATMcloseConn(dfd);
- return -1;
- }
-#else
- fprintf(stderr,
- "Error ComOpenConnPair: pid %d addresstype %d not supported\n",
- getpid(), dsocktype);
- return -1;
-#endif
- }
- for (i = 0; i < size; i ++) { /* guaranteed to succeed */
- if (fdTable[i].fd == -1) break;
- }
- if (i < size) {
- fdTable[i].fd = cfd;
- fdTable[i].type = csocktype;
- fdTable[i].stime = get_sec();
- fdTable[i].state = STATE_CONTROL;
- }
- else {
- fprintf(stderr, "<Weird>Error ComOpenConnPair: no entry for cfd %d\n", cfd);
- return -1;
- }
- for (; i < size; i ++) {
- if (fdTable[i].fd == -1) break;
- }
- if (i < size) {
- fdTable[i].fd = dfd;
- fdTable[i].type = dsocktype;
- fdTable[i].stime = get_sec();
- fdTable[i].state = STATE_DATA;
- }
- else {
- fprintf(stderr, "<Wierd>Error ComOpenConnPair: no entry for dfd %d\n", dfd);
- return -1;
- }
- *ctr_fd = cfd;
- *data_fd = dfd;
- return 0;
-}
-
-/* returns: -1 -- failed, >=0 -- fd */
-int ComOpenConn(char * address, int *max_pkt_size)
-{
- int i;
- int fd, socktype;
- struct sockaddr_in addressIn;
- struct sockaddr_un addressUn;
-
- if (!size) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d not done ComInitClient/Server yet.\n",
- getpid());
- return -1;
- }
-
- fd = 0;
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) fd ++;
- }
- if (fd < 1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d no faTable entry for the pair",
- getpid());
- return -1;
- }
-
- /* tell the type of connections to establish:
- If the server is on the same host, then UNIX socket is used */
- if (address[0] == 0) {
- socktype = CONN_UNIX;
- }
- else if (!strncasecmp(address, "atm:", 4)) {
- address += 4;
- socktype = CONN_ATM;
- }
- else if (!strncasecmp(address, "datm:", 5)) {
- address += 5;
- socktype = CONN_ATM;
- }
- else {
- socktype = CONN_INET;
- }
- if (socktype == CONN_INET) {
- struct hostent *hp;
- char hostname[100];
- addressIn.sin_family = AF_INET;
- if (!strncasecmp(address, "inet:", 5)) {
- address += 5;
- }
- if (isascii(address[0]) && isdigit(address[0]))
- addressIn.sin_addr.s_addr = inet_addr(address);
- else {
- if ((hp = gethostbyname(address)) == NULL) { /* No such host! */
- fprintf(stderr,
- "Error ComOpenConn: pid %d host %s can't be found:",
- getpid(), address);
- perror("");
- return -1;
- }
- if (hp->h_addrtype != AF_INET) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d host %s is not of INET type address.\n",
- getpid(), address);
- return -1;
- }
- memcpy((char *)&addressIn.sin_addr.s_addr, (char *)hp->h_addr,
- sizeof(addressIn.sin_addr.s_addr));
- /*
- bcopy((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr,
- sizeof(addressIn.sin_addr.s_addr));
- */
- }
- if (get_hostname(hostname, 100)) {
- fprintf(stderr, "Error ComOpenConn: pid %d failed to get_hostname:",
- getpid());
- perror("");
- return -1;
- }
- if ((hp = gethostbyname(hostname)) == NULL) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to its own IP address:",
- getpid());
- perror("");
- return -1;
- }
- if (hp->h_addrtype != AF_INET) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d own address is not INET type",
- getpid());
- return -1;
- }
-
- if (!memcmp((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr,
- sizeof(addressIn.sin_addr.s_addr))) {
- if (socktype == CONN_INET) socktype = CONN_UNIX;
- }
- }
-
- /* build appropriate type of Connections to Server */
- if (socktype == CONN_UNIX) {
- /* build UNIX connection to server */
- addressUn.sun_family = AF_UNIX;
- strncpy(addressUn.sun_path, unix_port,
- sizeof(struct sockaddr_un) - sizeof(short));
- fd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to open UNIX fd:",
- getpid());
- perror("");
- return -1;
- }
- if (connect(fd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to conn UNIX fd to server:",
- getpid());
- perror("");
- close(fd);
- return -1;
- }
- *max_pkt_size = 0;
- }
- else if (socktype == CONN_INET) {
- /* build TCP connection to server */
- addressIn.sin_port = htons(inet_port);
- fd = socket(AF_INET, SOCK_STREAM, 0);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to open TCP fd:",
- getpid());
- perror("");
- return -1;
- }
- if (connect(fd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to conn TCP fd to server:",
- getpid());
- perror("");
- close(fd);
- return -1;
- }
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,
- (const char *)&i, sizeof(i)) == -1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to setsockopt on TCP fd with TCP_NODELAY:",
- getpid());
- perror("");
- close(fd);
- return -1;
- }
- *max_pkt_size = 0;
- }
- else if (socktype == CONN_ATM) { /* CONN_ATM */
-#ifdef NATIVE_ATM
- /* CONN_ATM */
- fd = ATMopenConn(address, max_pkt_size);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComOpenConn: pid %d failed to open ATM fd conn:",
- getpid());
- perror("");
- return -1;
- }
-#else
- fprintf(stderr,
- "Error ComOpenConn: pid %d addresstype %d not supported\n",
- getpid(), socktype);
- return -1;
-#endif
- }
- for (i = 0; i < size; i ++) { /* guaranteed to succeed */
- if (fdTable[i].fd == -1) break;
- }
- if (i < size) {
- fdTable[i].fd = fd;
- fdTable[i].type = socktype;
- fdTable[i].stime = get_sec();
- fdTable[i].state = STATE_SINGLE;
- return fd;
- }
- else {
- fprintf(stderr, "<Weird>Error ComOpenConn: no entry for fd %d\n", fd);
- return -1;
- }
-}
-
-
-static int fd_unix, fd_inet, fd_atm; /* for use in the server side */
-
-
-int ComInitServer(int pinet_port, char * punix_port, char * patm_port)
-{
- int i;
-
- struct sockaddr_in myaddr_in;
- struct sockaddr_un myaddr_un;
-
- inet_port = pinet_port;
- unix_port = punix_port;
- atm_port = patm_port;
-
- if (size) {
- fprintf(stderr,
- "Error ComInitServer: pid %d already done ComInitServer/Server\n",
- getpid());
- return -1;
- }
- size = CLIENT_FDTABLE_SIZE;
- // create and initialize the File Descriptor Table
- fdTable = (struct FdTable *)ACE_OS::malloc(size * sizeof(*fdTable));
- if (fdTable == NULL) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to allocated fdTable space:",
- getpid());
- perror("");
- return -1;
- }
- for (i = 0; i < size; i ++) {
- fdTable[i].fd = -1;
- }
- // Set all the file descriptor for atm ,inet and unix to be -1
- fd_atm = fd_inet = fd_unix = -1;
-
- memset((char *)&myaddr_in, 0, sizeof(struct sockaddr_in));
- memset((char *)&myaddr_un, 0, sizeof(struct sockaddr_un));
-
- myaddr_in.sin_family = AF_INET;
-
- myaddr_in.sin_addr.s_addr = htonl(INADDR_ANY);
- myaddr_in.sin_port = htons((short)inet_port);
-
- /* setup INET listen socket */
- fd_inet = socket(AF_INET, SOCK_STREAM, 0);
- if (fd_inet == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to open fd_inet:",
- getpid());
- perror("");
- goto open_fd_unix;
- }
-
- i = 1;
- if (setsockopt(fd_inet, SOL_SOCKET, SO_REUSEADDR,
- (const char *)&i, sizeof(i)) == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to setsockopt fd_inet with REUSEADDR:",
- getpid());
- perror("");
- close(fd_inet);
- fd_inet = -1;
- goto open_fd_unix;
- }
-
- if (bind(fd_inet, (struct sockaddr *)&myaddr_in, sizeof(struct sockaddr_in)) == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to bind fd_inet:",
- getpid());
- perror("");
- close(fd_inet);
- fd_inet = -1;
- goto open_fd_unix;
- }
- if (listen(fd_inet, 2) == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to listen on fd_inet:",
- getpid());
- perror("");
- close(fd_inet);
- fd_inet = -1;
- goto open_fd_unix;
- }
-
- open_fd_unix:
-
- myaddr_un.sun_family = AF_UNIX;
- strncpy(myaddr_un.sun_path, unix_port,
- (sizeof(struct sockaddr_un) - sizeof(short)));
- fd_unix = socket(AF_UNIX, SOCK_STREAM, 0);
- if (fd_unix == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to open fd_unix:",
- getpid());
- perror("");
- goto open_fd_atm;
- }
- if ((bind(fd_unix, (struct sockaddr *)&myaddr_un,
- sizeof(struct sockaddr_un))) == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to bind fd_unix:",
- getpid());
- perror("");
- close(fd_unix);
- fd_unix = -1;
- goto open_fd_atm;
- }
- if ((listen(fd_unix, 2)) == -1) {
- fprintf(stderr,
- "Error ComInitServer: pid %d failed to liston on fd_unix:",
- getpid());
- perror("");
- close(fd_unix);
- fd_unix = -1;
- goto open_fd_atm;
- }
-
- open_fd_atm:
-
-#ifdef NATIVE_ATM
- fd_atm = ATMinitServer(atm_port);
-#endif
-
- if (fd_inet >= 0 || fd_unix >= 0 || fd_atm >= 0) return 0;
- else return -1;
-}
-
-void ComCloseListen(void)
-{
- if (fd_atm >= 0) {
-#ifdef NATIVE_ATM
- /* fd_atm is not connected to a user_plane, ignore
- ATMcloseFd(fd_atm);
- */
- close(fd_atm);
- fd_atm = -1;
-#else
- fprintf(stderr, "Error ComCloseListen: CONN_ATM not supported.\n");
-#endif
- }
- if (fd_unix >= 0) {
- close(fd_unix);
- fd_unix = -1;
- }
- if (fd_inet >= 0) {
- close(fd_inet);
- fd_inet = -1;
- }
- return;
-}
-
-void ComCloseServer(void)
-{
- int i;
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd >= 0) ComCloseConn(fdTable[i].fd);
- }
- if (fd_atm >= 0) {
-#ifdef NATIVE_ATM
- /* fd_atm not connected to a user-plane, igore it
- ATMcloseConn(fd_atm);
- */
- close(fd_atm);
- fd_atm = -1;
-#else
- fprintf(stderr, "Error ComCloseServer: CONN_ATM not supported.\n");
-#endif
- }
- if (fd_unix >= 0) {
- close(fd_unix);
- fd_unix = -1;
- unlink(unix_port);
- }
- if (fd_inet >= 0) {
- close(fd_inet);
- fd_inet = -1;
- }
-#ifdef NATIVE_ATM
- ATMcloseServer();
-#endif
- return;
-}
-
-static int change_option(int fd)
-{
- struct linger linger = {1, 1};
- int i = 1;
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,
- (const char *)&i, sizeof(i)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to setsockopt on fd_inet:",
- getpid());
- perror("");
- return -1;
- }
- /* data socket also NODELAY */
- if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (const char *)&linger,
- sizeof(linger)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to linger on fd_inet:",
- getpid());
- perror("");
- return -1;
- }
- return 0;
-}
-
-int ComGetConnPair(int *ctr_fd, int *data_fd, int *max_pkt_size)
-{
- int i;
- int fd, fdType;
- int addrlen;
- struct sockaddr_in peeraddr_in;
- struct fd_set read_mask;
- struct timeval tval;
- int nfds;
-
- fd = 0;
- addrlen = get_sec();
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) {
- fd ++;
- }
- else if (fdTable[i].type == STATE_PENDING &&
- get_duration(fdTable[i].stime, addrlen) > 10) {
- fprintf(stderr,
- "ComGetConnPair: pid %d closed fd %d (PENDING >= 10 sec)\n",
- getpid(), fdTable[i].fd);
- ComCloseConn(fdTable[i].fd);
- fdTable[i].fd = -1;
- fd ++;
- }
- }
- if (fd < 2) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d no faTable entry for the pair",
- getpid());
- return -1;
- }
-
- FD_ZERO(&read_mask);
- if (fd_inet >= 0) FD_SET(fd_inet, &read_mask);
- if (fd_unix >= 0) FD_SET(fd_unix, &read_mask);
- if (fd_atm >= 0) FD_SET(fd_atm, &read_mask);
-
- tval.tv_sec = 1; /* wait at most 1 second */
- tval.tv_usec = 0;
-
-
- nfds = fd_inet;
- if (fd_unix > nfds) nfds = fd_unix;
- if (fd_atm > nfds) nfds = fd_atm;
- // nfds now holds the highest numbered open file descriptor
- nfds ++; // increment so that select can use o to nfds -1 no. of
- // file descriptors.
- errno = 0;
- // fd is here used as the result of the select call
-#ifdef _HPUX_SOURCE
- if ((fd = select(nfds, (int *)&read_mask, NULL, NULL, &tval)) == -1)
-#else
- if ((fd = select(nfds, &read_mask, NULL, NULL, &tval)) == -1)
-#endif
- {
-
- if (errno == EINTR) return -1;
-
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed on select():",
- getpid());
- perror("");
- return -1;
- }
- if (fd == 0) return -1; /* time expire */
-
- fd = -1;
- // fd will be reused inside this code as the accepted socket.
- if (fd == -1 && fd_unix >= 0 && FD_ISSET(fd_unix, &read_mask)) {
- struct sockaddr_un peeraddr_un;
-
- fprintf(stderr, "Server to accept a UNIX connection.\n");
-
- addrlen = sizeof(struct sockaddr_un);
- fd = accept(fd_unix, (struct sockaddr *)&peeraddr_un, &addrlen);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to accpet on fd_unix:",
- getpid());
- perror("");
- }
- else fdType = CONN_UNIX;
- *max_pkt_size = 0;
- }
- // fd here is the result of the accept for unix if fd_unix is valid
- // Hence if fd_unix is present then this won't be called if the
- // accept for the fd_unix succeeds.
- if (fd == -1 && fd_inet >= 0 && FD_ISSET(fd_inet, &read_mask)) {
-
- fprintf(stderr, "Server to accept a INET connection.\n");
-
- addrlen = sizeof(struct sockaddr_in);
- fd = accept(fd_inet, (struct sockaddr *)&peeraddr_in, &addrlen);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to accpet on fd_inet:",
- getpid());
- perror("");
- }
- else fdType = CONN_INET;
- *max_pkt_size = 0;
- }
- if (fd == -1 && fd_atm >= 0 && FD_ISSET(fd_atm, &read_mask)) {
-#ifdef NATIVE_ATM
- fd = ATMaccept(fd_atm, max_pkt_size);
- fdType = CONN_ATM;
-#else
- fprintf(stderr,
- "Error ComGetConnPair: pid %d CONN_ATM not supported.\n",
- getpid());
-#endif
- }
- // fd = -1 implies accept failed in any of the active connections
- // which came out of the select call.
- if (fd == -1) return -1;
-
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) break;
- }
- // Enter the accepted fd in the file descriptor Table
- if (i < size) {
- fdTable[i].fd = fd;
- fdTable[i].type = fdType;
- fdTable[i].stime = get_sec();
- }
- else {
- fprintf(stderr, "Weird\n");
- }
-
- // read the port number for the UDP socket of the client
- if (time_read_int(fd, &nfds) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to read int from %s fd:",
- getpid(),
- fdType == CONN_ATM ? "ATM" :
- fdType == CONN_INET ? "INET" : "UNIX");
- perror("");
- ComCloseConn(fd);
- return -1;
- }
- fprintf (stderr,
- " Received int nfds = %d \n",
- nfds);
- // nfds holds the int read in time_read_int
- // if nfds is -1 then read int error.
- fprintf(stderr, "ComGetConnPair got %s fd = %d with value %d\n",
- fdType == CONN_ATM ? "ATM" :
- fdType == CONN_INET ? "INET" : "UNIX",
- fd, nfds);
-
- if (nfds >= 0) { /* can be paired and return */
- // This is the success case where you got a control fd and a data fd.
- fdTable[i].state = STATE_DATA;
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == nfds) break;
- }
- if (i < size && fdTable[i].state == STATE_PENDING) {
- fdTable[i].state = STATE_CONTROL;
- }
- else {
- if (i >= 0) fprintf(stderr, "<Weird> i %d\n", i);
- ComCloseConn(fd);
- return -1;
- }
- // ????
- *ctr_fd = fdTable[i].fd;
- *data_fd = fd;
- return 0;
- }
- else if (nfds == -1) { /* wait to be paired */
- fdTable[i].state = STATE_PENDING;
- // fd is the inet or unix accepted socket.
- // why is anyone writing the fd to the peer?
- // looks like he is indicating an error to the client!!
- // is this a hack ;-(
- if (time_write_int(fd, fd) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to write (fd) to %s fd:",
- getpid(),
- fdType == CONN_ATM ? "ATM" :
- fdType == CONN_INET ? "INET" : "UNIX");
- perror("");
- ComCloseConn(fd);
- return -1;
- }
- if (fdType == CONN_INET && change_option(fd) == -1) {
- ComCloseConn(fd);
- }
- return -1;
- }
- else if (nfds == -2) { /* inet case only, UDP data sock is requested */
- int dfd;
- struct sockaddr_in * in = &(peeraddr_in);
-
- fdTable[i].state = STATE_CONTROL;
-
- if (fdType == CONN_INET && change_option(fd) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to change options of TCP cfd:",
- getpid());
- ComCloseConn(fd);
- return -1;
- }
-
- dfd = socket(AF_INET, SOCK_DGRAM, 0);
- if (dfd == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to open dfd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- return -1;
- }
- memset((char *)in, 0, sizeof(* in));
-
- addrlen = sizeof(*in);
- if (getsockname(fd, (struct sockaddr *)in, &addrlen) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to getsockname of fd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
-
- in->sin_family = AF_INET;
- in->sin_port = 0;
- /*
- in->sin_addr.s_addr = htonl(INADDR_ANY);
- */
- if (bind(dfd, (struct sockaddr *)in, sizeof(* in)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to bind dfd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
- addrlen = sizeof(*in);
- if (getsockname(dfd, (struct sockaddr *)in, &addrlen) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to getsockname of dfd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
- if (time_write_bytes(fd, (char *)&in->sin_port, sizeof(short)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to write (dfd.port) to fd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
- /*
- addrlen = sizeof(*in);
- if (getsockname(fd, (struct sockaddr *)in, &addrlen) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to getsockname of fd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
- */
- if (time_write_bytes(fd, (char *)&in->sin_addr.s_addr, sizeof(int)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to write (dfd.IPaddr) to fd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
-
- fprintf(stderr, "ComGetConnPair local UDP socket: addr - %s, port - %u.\n",
- inet_ntoa(in->sin_addr), ntohs(in->sin_port));
-
- if (time_read_bytes(fd, (char *)&in->sin_port, sizeof(short)) == -1 ||
- time_read_bytes(fd, (char *)&in->sin_addr.s_addr, sizeof(int)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to read (port, IPaddr) from fd:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
- usleep(10000);
- if (connect(dfd, (struct sockaddr *)in, sizeof(*in)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed conn UDP dfd to peer:",
- getpid());
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
-#if 0
- {
- int len;
- len = 65536; /* INET_SOCKET_BUFFER_SIZE + 100; */
- /*
- if (setsockopt(dfd, SOL_SOCKET, SO_SNDBUF, (char *)&len, sizeof(len)) == -1) {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d failed to set UDP dfd-snd to size %d:",
- getpid(), len);
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- }
- */
- len = 65536;
- while (setsockopt(dfd, SOL_SOCKET, SO_RCVBUF, (char *)&len, sizeof(len)) == -1) {
- len -= 1024;
- if (len < 8192) break;
- /*
- fprintf(stderr,
- "Warning ComGetConnPair: pid %d failed to set UDP dfd-rcv to size %d:",
- getpid(), len);
- perror("");
- ComCloseConn(fd);
- close(dfd);
- return -1;
- */
- }
- if (getuid() == DEVELOPER_UID)
- fprintf(stderr,"Set UDP dfd-rcv to %dB\n", len);
- }
-#endif
- // Most common return case where the server creates a UDP socket ,
- // writes the port and ip addr and also gets the client's UDP
- // endpoint .
- *max_pkt_size = - INET_SOCKET_BUFFER_SIZE; /* UDP sockets on HP and SUN
- are known to be discard mode */
-
- fprintf(stderr, "ComGetConnPair UDP dfd connects to host-%s (port %u)\n",
- inet_ntoa(in->sin_addr), ntohs(in->sin_port));
-
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) break;
- }
- if (i < size) {
- fdTable[i].fd = dfd;
- fdTable[i].type = CONN_INET;
- fdTable[i].stime = get_sec();
- fdTable[i].state = STATE_DATA;
-
- *ctr_fd = fd;
- *data_fd = dfd;
- return 0;
- }
- else {
- fprintf(stderr, "ComGetConnPair <Weird>: no space left\n");
- return -1;
- }
- }
- else {
- fprintf(stderr,
- "Error ComGetConnPair: pid %d get invalid value %d from fd\n",
- getpid(), nfds);
- ComCloseConn(fd);
- }
- return -1;
-}
-
-/* returns: -1 -- failed, >= 0 -- fd */
-int ComGetConn(int *max_pkt_size)
-{
- int i;
- int fd, fdType;
- int addrlen;
- struct fd_set read_mask;
- struct timeval tval;
- int nfds;
-
- fd = 0;
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) {
- fd ++;
- }
- }
- if (fd < 1) {
- fprintf(stderr,
- "Error ComGetConn: pid %d no faTable entry for the pair",
- getpid());
- return -1;
- }
-
- FD_ZERO(&read_mask);
- if (fd_inet >= 0) FD_SET(fd_inet, &read_mask);
- if (fd_unix >= 0) FD_SET(fd_unix, &read_mask);
- if (fd_atm >= 0) FD_SET(fd_atm, &read_mask);
-
- tval.tv_sec = 1; /* wait at most 1 second */
- tval.tv_usec = 0;
-
- nfds = fd_inet;
- if (fd_unix > nfds) nfds = fd_unix;
- if (fd_atm > nfds) nfds = fd_atm;
- nfds ++;
- errno = 0;
-#ifdef _HPUX_SOURCE
- if ((fd = select(nfds, (int *)&read_mask, NULL, NULL, &tval)) == -1)
-#else
- if ((fd = select(nfds, &read_mask, NULL, NULL, &tval)) == -1)
-#endif
- {
-
- if (errno == EINTR) return -1;
-
- fprintf(stderr,
- "Error ComGetConn: pid %d failed on select():",
- getpid());
- perror("");
- return -1;
- }
- if (fd == 0) return -1; /* time expire */
-
- fd = -1;
-
- if (fd == -1 && fd_unix >= 0 && FD_ISSET(fd_unix, &read_mask)) {
- struct sockaddr_un peeraddr_un;
-
- fprintf(stderr, "Server to accept a UNIX connection.\n");
-
- addrlen = sizeof(struct sockaddr_un);
- fd = accept(fd_unix, (struct sockaddr *)&peeraddr_un, &addrlen);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComGetConn: pid %d failed to accpet on fd_unix:",
- getpid());
- perror("");
- }
- else fdType = CONN_UNIX;
- *max_pkt_size = 0;
- }
- if (fd == -1 && fd_inet >= 0 && FD_ISSET(fd_inet, &read_mask)) {
- struct sockaddr_in peeraddr_in;
-
- fprintf(stderr, "Server to accept a INET connection.\n");
-
- addrlen = sizeof(struct sockaddr_in);
- fd = accept(fd_inet, (struct sockaddr *)&peeraddr_in, &addrlen);
- if (fd == -1) {
- fprintf(stderr,
- "Error ComGetConn: pid %d failed to accpet on fd_inet:",
- getpid());
- perror("");
- }
- else fdType = CONN_INET;
- *max_pkt_size = 0;
- }
- if (fd == -1 && fd_atm >= 0 && FD_ISSET(fd_atm, &read_mask)) {
-#ifdef NATIVE_ATM
- fd = ATMaccept(fd_atm, max_pkt_size);
- fdType = CONN_ATM;
-#else
- fprintf(stderr,
- "Error ComGetConn: pid %d CONN_ATM not supported.\n",
- getpid());
-#endif
- }
- if (fd == -1) return -1;
-
- for (i = 0; i < size; i ++) {
- if (fdTable[i].fd == -1) break;
- }
- if (i < size) {
- fdTable[i].fd = fd;
- fdTable[i].type = fdType;
- fdTable[i].stime = get_sec();
- fdTable[i].state = STATE_SINGLE;
- return fd;
- }
- else {
- fprintf(stderr, "Weird\n");
- ComCloseConn(fd);
- return -1;
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h
deleted file mode 100644
index 27fc36256cc..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-/*
-Some assumptions about the streams created in this file:
-
- PACKET STREAM:
-
- * send(), recv() may not work, we can only use
- read()/write().
-
- * write(): either send the whole packet, or send nothing
-
- * read(): read() will read the minimun of the
- requested number of bytes and current packet size.
- read() can read part of a packet, but it
- will not read cross packet boundaris
-
- There are two modes: non-discard and dicard. If a packets is
- not read all its bytes, the remaining bytes will be
- or not be discarded.
-
- This is indicated by if (*max_pkt_size) is positive
- (non-discard) or negative (discard)
-
- BYTE_STREAM: reliable
-
- * write(): might write only part of requested bytes
- each time. (this is the case in SunOS4)
-
- * read(): might read less than requested bytes.
- (this is the case in SunOS4).
-*/
-
-/* returns: -1 -- failed, 0 -- successful */
-int ComInitClient(int inet_port, char * unix_port, char * atm_port);
-
-void ComCloseClient(void);
-
-/* address format: [ATM:|INET:]real_address | ""
-
- "" -- UNIX socket, reliable byte stream
- [INET:]real_address -- INET sockets, reliable control byte stream, and
- *max_pkt_size == 0 : reliable data byte stream, or
- != 0 : unreliable packet stream;
- ATM:real_address -- ATM sockets, both data and control are
- unreliable packet streams;
- DATM:real_address -- INET/UNIX control reliable byte stream
- and ATM unreliable byte stream;
-
- returns: -1 -- failed, 0 -- successful
- *ctr_fd -- control connection file descriptor
- *data_fd -- data connection file descriptor
- *max_pkt_size -- == 0 : reliable BYTE_STREAM
- > 0 : unreliable non-discard PACKET STREAM
- with given maximum packet size (bytes);
- < 0 : unreliable discard PACKET STREAM
- with given maximum packet size (bytes);
-
- It is suggested that if a BYTE_STREAM is not known to be discarded,
- than it is safer to indicate it as discard.
- */
-int ComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size);
-
-
-/* returns: -1 -- failed, >=0 -- fd */
-int ComOpenConn(char * address, int *max_pkt_size);
-
-/* returns: -1 -- failed, 0 -- successful */
-int ComCloseFd(int fd);
-
-/* returns: -1 -- failed, 0 -- successful */
-int ComCloseConn(int fd);
-
-/* returns: -1 -- failed, 0 -- successful */
-int ComInitServer(int inet_port, char * unix_port, char * atm_port);
-
-void ComCloseListen(void);
-
-void ComCloseServer(void);
-
-/* returns: -1 -- failed, 0 -- successful
- *max_pkt_size is used only for returning value
-*/
-int ComGetConnPair(int *ctr_fd, int *data_fd, int *max_pkt_size);
-
-/* returns: -1 -- failed, >= 0 -- fd */
-int ComGetConn(int *max_pkt_size);
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp
deleted file mode 100644
index b016ea5ff17..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp
+++ /dev/null
@@ -1,406 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <pwd.h>
-#include <grp.h>
-#include <time.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <netinet/in.h>
-#include "routine.h"
-#include "fileio.h"
-/*
- Statfile(filename, sb)
- input: filename - path name of a directory entry;
- output: sb - StatBuf structure of the given directory entry;
- returns: 0 - successful, -1 - failed, with errno indicating error
- */
-int StatFile(char *filename, struct StatBuf * sb)
-{
- struct stat statbuf;
- struct passwd *pw;
- struct group *grp;
-
- if (stat(filename, &statbuf) == -1)
- return -1;
-
- sb->mode = statbuf.st_mode;
- sb->size = statbuf.st_size;
-
- strcpy(sb->ctime, ctime(&(statbuf.st_ctime)));
- sb->ctime[strlen(sb->ctime)-1] = 0; /* remove CR */
-
- if ((pw = getpwuid(statbuf.st_uid)) == NULL)
- sprintf(sb->uid, "%-10d", statbuf.st_uid);
- else
- strncpy(sb->uid, pw->pw_name, 32);
-
- if ((grp = getgrgid(statbuf.st_gid)) == NULL)
- sprintf(sb->gid, "%-10d", statbuf.st_gid);
- else
- strncpy(sb->gid, grp->gr_name, 32);
-}
-
-/*
- read_bytes(s, buf, size)
- input: s - socket to read from
- buf - address of a buffer for the read
- size - number of bytes to read
- output: non
- action: try read given number of bytes, all errors are reported, and
- cause program to exit.
-*/
-void read_bytes(int s, char * buf, int size)
-{
- int val, remain = size;
- char * ptr = buf;
-
- if (size == 0) return;
-
- for (;;)
- {
- val = read(s, ptr, remain);
-
- if (val == -1 && (errno == EINTR || errno == EAGAIN | errno == EWOULDBLOCK))
- { /* interrupted or need to wait, try again */
- if (errno == EAGAIN | errno == EWOULDBLOCK) usleep(10000);
- errno = 0;
- continue;
- }
- if (val == -1)
- {
- perror("Error -- Read from socket");
- exit(1);
- }
- if (val == 0) /* EOF encountered */
- {
- fprintf(stderr, "Error -- EOF reached while trying to read %d bytes.\n", size);
- exit(1);
- }
- ptr += val;
- remain -= val;
- if (remain < 0) /* weird thing is happening */
- {
- fprintf(stderr, "Error: read too much from socket, %d out of %d bytes.\n",
- size-remain, size);
- exit(1);
- }
- if (remain == 0)
- break;
- }
-}
-
-int wait_read_bytes(int s, char *buf, int size)
-{
- int val, remain = size;
- char * ptr = buf;
-
- if (size == 0) return 1;
-
- for (;;)
- {
- val = read(s, ptr, remain);
-
- if (val == -1 && (errno == EINTR || errno == EAGAIN | errno == EWOULDBLOCK))
- { /* interrupted or need to wait, try again */
- if (errno == EAGAIN | errno == EWOULDBLOCK) usleep(10000);
- errno = 0;
- continue;
- }
- if (val == -1)
- {
- /*
- perror("Error -- wait_read from socket");
- */
- return -1;
- }
- if (val == 0) /* EOF encountered */
- {
- /*
- fprintf(stderr, "Warn pid %d -- EOF on wait_read %d bytes.\n",
- getpid(), size);
- */
- return 0;
- }
- ptr += val;
- remain -= val;
- if (remain < 0) /* weird thing is happening */
- {
- fprintf(stderr,
- "Error: weird, read too much from socket, %d out of %d bytes.\n",
- size-remain, size);
- return -1;
- }
- if (remain == 0)
- break;
- }
- return size;
-}
-
-#define WAIT_DURATION 5000000
-
-int time_read_bytes(int s, char * buf, int size)
-{
- int val, remain = size;
- char * ptr = buf;
- long start = get_usec();
-
- int times = 0;
-
- if (size == 0) return 0;
-
- for (;;) {
- struct fd_set read_mask;
- struct timeval tval = {0, 0};
-
- FD_ZERO(&read_mask);
- FD_SET(s, &read_mask);
-#ifdef _HPUX_SOURCE
- if (select(s+1, (int *)&read_mask, NULL, NULL, &tval) <= 0)
-#else
- if (select(s+1, &read_mask, NULL, NULL, &tval) <= 0)
-#endif
- {
- /*
- if (get_duration(start, get_usec()) < WAIT_DURATION) {
- usleep(10000);
- continue;
- }
- */
- if (times < WAIT_DURATION / 10000) {
- usleep(10000);
- times ++;
- continue;
- }
- else {
- fprintf(stderr, "time_read_bytes() %d seconds expired\n",
- WAIT_DURATION/1000000);
- return -1;
- }
- }
-
- if (!(FD_ISSET(s, &read_mask))) continue;
-
- val = read(s, ptr, 1);
-
- if (val == -1 && (errno == EINTR))
- { /* interrupted or need to wait, try again */
- errno = 0;
- continue;
- }
- if (val == -1)
- {
- perror("Error -- time_read_bytes() from socket");
- return -1;
- }
- if (val == 0) /* EOF encountered */
- {
- /*
- fprintf(stderr, "Error -- EOF reached while trying to read %d bytes.\n", size);
- */
- return -1;
- /* 'continue' causes infinite loop if the pipe is closed by peer
- continue;
- */
- }
- ptr += val;
- remain -= val;
- if (remain == 0)
- return 0;
- }
-}
-
-/*
- write_bytes(sock, data, len):
- try write len byte of data to sock, report all errors by
- warning message.
-*/
-void write_bytes(int sock, char * data, int len)
-{
- while (len > 0) {
- int res = write(sock, data, len);
- if (res == -1) {
- if (errno == EINTR || errno == EAGAIN) continue;
- fprintf(stderr, "Error pid %d", getpid());
- perror(" -- failed to write all bytes to socket");
- exit(1);
- }
- len -= res;
- data += res;
- }
-}
-
-int time_write_bytes(int sock, char * data, int plen)
-{
- int len = plen;
- while (len > 0) {
- int res = write(sock, data, len);
- if (res == -1) {
- if (errno == EINTR || errno == EAGAIN) continue;
- fprintf(stderr, "Error pid %d", getpid());
- perror(" -- failed to time_write all bytes to socket");
- return -1;
- }
- len -= res;
- data += res;
- }
- return plen;
-}
-
-int wait_write_bytes(int sock, char * data, int plen)
-{
- int len = plen;
- while (len > 0) {
- int res = write(sock, data, len);
- if (res == -1) {
- if (errno == EINTR || errno == EAGAIN) continue;
- /*
- fprintf(stderr, "Error pid %d", getpid());
- perror(" -- failed to wait_write all bytes to socket");
- */
- return -1;
- }
- len -= res;
- data += res;
- }
- return plen;
-}
-
-/* read_byte:
- read one byte from sock to buffer data */
-
-void read_byte(int sock, char * data)
-{
- read_bytes(sock, data, 1);
-}
-
-/* read_short:
- read a short integer from socket sock to buffer data,
- byte order conversion is also done.
-*/
-void read_short(int sock, short * data)
-{
- read_bytes(sock, (char *)data, sizeof(short));
- *data = ntohs(*data);
-}
-
-/* read_int:
- read a integer from socket sock to buffer data,
- byte order conversion is also done */
-
-void read_int(int sock, int * data)
-{
- read_bytes(sock, (char *)data, sizeof(int));
- *data = ntohl(*data);
-}
-
-int time_read_int(int sock, int * data)
-{
- if (time_read_bytes(sock, (char *)data, sizeof(int)) == -1) {
- return -1;
- }
- *data = ntohl(*data);
- return 0;
-}
-
-/* read a string. Returns the length of the string.
- transfer through the socket.
- but the string in buffer might have been truncated.
- the returned string is '\0' terminated */
-
-int read_string(int sock, char *data, int maxlen)
-{
- int len;
- read_int(sock, &len);
- if (len == 0)
- {
- data[0] = 0;
- return 0;
- }
- if (len < maxlen)
- {
- read_bytes(sock, data, len);
- data[len] = 0;
- }
- else
- {
- int i;
- char tmp;
- read_bytes(sock, data, maxlen-1);
- data[maxlen-1] = 0;
- for (i = 0; i < len - maxlen + 1; i ++) /* discard extra data */
- read_byte(sock, &tmp);
- }
- return len;
-}
-
-
-/* write_byte:
- write a byte to socket sock */
-
-void write_byte(int sock, char data)
-{
- write_bytes(sock, &data, 1);
-}
-
-/* write_short:
- byte order convert the short integer in data and write to socket sock */
-
-void write_short(int sock, short data)
-{
- short val = htons(data);
- write_bytes(sock, (char *)&val, sizeof(short));
-}
-
-/* write_int:
- byte order convert the integer in data and write to socket sock */
-void write_int(int sock, int data)
-{
- int val = htonl(data);
- write_bytes(sock, (char *)&val, sizeof(int));
-}
-
-int time_write_int(int sock, int data)
-{
- int val = htonl(data);
- return time_write_bytes(sock, (char *)&val, sizeof(int));
-}
-
-/* write a string in data to socket sock, the string is led by a length */
-
-void write_string(int sock, char *data)
-{
- int len = strlen(data);
-
- write_int(sock, len);
- write_bytes(sock, data, len);
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h
deleted file mode 100644
index 46432a71797..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-/* data structure used by StatFile() */
-
-#if !defined (_MPEG_FILE_IO_H)
-#define _MPEG_FILE_IO_H
-
-struct StatBuf
-{
- unsigned short mode;
- long size;
- char uid[32];
- char gid[32];
- char ctime[32];
-};
-
-/* protocol of functions defined in shared.c */
-
-int StatFile(char *filename, struct StatBuf * sb);
-
-
-
-/* Following read...()'s would exit(1) if requested bytes can not be
- read, and EOF or error other than EINTR, EAGAIN or EWOULDBLOCK is
- encountered */
-
-void read_bytes(int s, char * buf, int size);
-
-void read_byte(int sock, char * data);
-
-void read_short(int sock, short * data);
-
-void read_int(int sock, int * data);
-
-int read_string(int sock, char *data, int maxlen); /* returns the length of a stream */
-
-
-/* Following write...()'s would exit(1) if requested bytes can not
- be written to socket because of error has happened*/
-
-void write_bytes(int sock, char * data, int len);
-
-void write_byte(int sock, char data);
-
-void write_short(int sock, short data);
-
-void write_int(int sock, int data);
-
-void write_string(int sock, char *data);
-
-
-/* following returns: 0 -- succ, -1 -- failed.
- time_read*() will wait at most 5 seconds before they return */
-
-int time_read_bytes(int s, char * buf, int size);
-
-int time_read_int(int sock, int * data);
-
-int time_write_bytes(int sock, char * data, int len);
-
-int time_write_int(int sock, int data);
-
-
-/* Following read...()'s would return 0/-1 if requested bytes can not
- be read, and EOF (return 0) or error (return -1) other than EINTR,
- EAGAIN or EWOULDBLOCK is encountered */
-
-int wait_read_bytes(int s, char *buf, int size);
-
-
-/* Following write...()'s would return 0/-1 if requested bytes can not
- be written and error (return -1) other than EINTR, EAGAIN or is
- encountered */
-
-int wait_write_bytes(int s, char *buf, int size);
-
-#endif /* _MPEG_FILE_IO_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp
deleted file mode 100644
index 05361167127..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp
+++ /dev/null
@@ -1,367 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <limits.h> /* INT_MIN, INT_MAX are defined here */
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-/*
-#include <stdlib.h>
-#include <sys/time.h>
-#include <sys/types.h>
-*/
-#include "filters.h"
-#include "ace/OS.h"
-
-#define BUFSIZE 256
-#define maxval(a,b) ((a) > (b) ? (a) : (b))
-#define minval(a,b) ((a) < (b) ? (a) : (b))
-
-static float FLOAT_MIN = (float)INT_MIN;
-static float FLOAT_MAX = (float)INT_MAX;
-
-AverageFilter * NewAverageFilter(int nsamples)
-{
- AverageFilter * f;
- f = (AverageFilter *) ACE_OS::malloc(sizeof(*f));
- if (f == NULL)
- return NULL;
- f->type = FILTER_AVERAGE;
- f->nsamples = nsamples;
- f->buf = (double *)ACE_OS::malloc(nsamples * sizeof(double));
- if (f->buf == NULL) {
- ACE_OS::free(f);
- return NULL;
- }
- f->count = 0;
- f->ptr = 0;
- f->sum = 0;
- return f;
-}
-
-AverageFilter * ResetAverageFilter(AverageFilter *f, int nsamples)
-{
- if (f->nsamples != nsamples) {
- ACE_OS::free(f->buf);
- f->nsamples = nsamples;
- f->buf = (double *)ACE_OS::malloc(nsamples * sizeof(double));
- if (f->buf == NULL) {
- ACE_OS::free(f);
- return NULL;
- }
- }
- f->count = 0;
- f->ptr = 0;
- f->sum = 0;
- return f;
-}
-
-void FreeAverageFilter(AverageFilter * f)
-{
- ACE_OS::free(f->buf);
- ACE_OS::free(f);
-}
-
-double DoAverageFilter(AverageFilter *f, double value)
-{
- int offset;
- double oldval = f->buf[f->ptr];
- f->buf[f->ptr] = value;
- f->ptr = (f->ptr + 1) % f->nsamples;
- f->sum += value;
- if (f->count >= f->nsamples) {
- f->sum -= oldval;
- }
- else {
- f->count ++;
- }
- return (double)(f->sum) / (double)f->count;
-}
-
-
-LowPassFilter * NewLowPassFilter(double Rvalue)
-{
- LowPassFilter * f;
- f = (LowPassFilter *)ACE_OS::malloc(sizeof(*f));
- if (f == NULL) {
- return NULL;
- }
- if (Rvalue > 1.0) {
- Rvalue = 1.0;
- }
- else if (Rvalue < 0.0) {
- Rvalue = 0.0;
- }
- f->type = FILTER_LOWPASS;
- f->count = 0;
- f->maxcount = (int)(1.0 / maxval(Rvalue, 0.0001));
- f->R = Rvalue;
- f->result = FLOAT_MIN;
- return f;
-}
-
-LowPassFilter * ResetLowPassFilter(LowPassFilter * f, double Rvalue)
-{
- if (Rvalue > 1.0) {
- Rvalue = 1.0;
- }
- else if (Rvalue < 0.0) {
- Rvalue = 0.0;
- }
- f->count = 0;
- f->maxcount = (int)(1.0 / maxval(Rvalue, 0.0001));
- f->R = Rvalue;
- f->result = FLOAT_MIN;
- return f;
-}
-
-void FreeLowPassFilter(LowPassFilter * f)
-{
- ACE_OS::free(f);
-}
-
-double DoLowPassFilter(LowPassFilter * f, double value)
-{
- if (f->count <= f->maxcount) {
- if (!f->count) {
- f->count ++;
- return (f->result = value);
- }
- f->count ++;
- return (f->result = (1.0 - (1.0/(double)f->count)) * f->result +
- (1.0/(double)f->count) * value);
- }
- return (f->result = (1.0 - f->R) * f->result + f->R * value);
-}
-
-MedianFilter * NewMedianFilter(int nsamples)
-{
- int minv = 0, maxv = 1;
- MedianFilter * f;
- f = (MedianFilter *) ACE_OS::malloc(sizeof(*f));
- if (f == NULL)
- return NULL;
- f->type = FILTER_MEDIAN;
- f->nsamples = nsamples;
- f->max = maxval(maxv, minv);
- f->min = minval(maxv, minv);
- f->statsize = f->max - f->min + 1;
- f->buf = (int *)ACE_OS::malloc(nsamples * sizeof(int));
- if (f->buf == NULL) {
- ACE_OS::free(f);
- return NULL;
- }
- f->stat = (int *)ACE_OS::malloc(f->statsize * sizeof(int));
- if (f->stat == NULL) {
- ACE_OS::free(f->buf);
- ACE_OS::free(f);
- return NULL;
- }
- f->count = 0;
- f->ptr = 0;
- f->med = 0;
- f->below = 0;
- memset(f->stat, 0, f->statsize * sizeof(int));
- return f;
-}
-
-MedianFilter * ResetMedianFilter(MedianFilter * f, int nsamples)
-{
- if (f->nsamples != nsamples) {
- ACE_OS::free(f->buf);
- f->nsamples = nsamples;
- f->buf = (int *)ACE_OS::malloc(nsamples * sizeof(int));
- if (f->buf == NULL) {
- ACE_OS::free(f);
- return NULL;
- }
- }
- f->count = 0;
- f->ptr = 0;
- f->med = 0;
- f->below = 0;
- memset(f->stat, 0, f->statsize * sizeof(int));
- return f;
-}
-
-void FreeMedianFilter(MedianFilter * f)
-{
- ACE_OS::free(f->buf);
- ACE_OS::free(f->stat);
- ACE_OS::free(f);
-}
-
-double DoMedianFilter(MedianFilter *f, double pvalue)
-{
- int value = (int)pvalue;
- int offset;
- int oldval = f->buf[f->ptr];
- if (value > f->max) {
- int * oldstat = f->stat;
- int oldsize = f->statsize;
- f->max = value + 10;
- f->statsize = f->max - f->min + 1;
- f->stat = (int *)ACE_OS::malloc(f->statsize * sizeof(int));
- if (f->stat == NULL) {
- fprintf(stderr, "MedianFilter Failed to extend up stat to % items",
- f->statsize);
- perror("");
- exit(1);
- }
- memset((char *)(f->stat) + sizeof(int) * oldsize, 0,
- sizeof(int) * (f->statsize - oldsize));
- memcpy(f->stat, oldstat, oldsize * sizeof(int));
- }
- else if (value < f->min) {
- int * oldstat = f->stat;
- int oldsize = f->statsize;
- f->min = value - 10;
- f->statsize = f->max - f->min + 1;
- f->stat = (int *)ACE_OS::malloc(f->statsize * sizeof(int));
- if (f->stat == NULL) {
- fprintf(stderr, "MedianFilter Failed to extend down stat to % items",
- f->statsize);
- perror("");
- exit(1);
- }
- memset(f->stat, 0, sizeof(int) * (f->statsize - oldsize));
- memcpy((char *)(f->stat) + sizeof(int) * (f->statsize - oldsize),
- oldstat, sizeof(int) * oldsize);
- f->med += f->statsize - oldsize;
- }
- f->buf[f->ptr] = value;
- f->ptr = (f->ptr + 1) % f->nsamples;
- offset = value - f->min;
- if (offset < 0) {
- offset = 0;
- }
- else if (offset >= f->statsize) {
- offset = f->statsize - 1;
- }
- f->stat[offset] ++;
- if (offset < f->med) {
- f->below ++;
- }
- if (f->count >= f->nsamples) {
- offset = oldval - f->min;
- if (offset < 0) {
- offset = 0;
- }
- else if (offset >= f->statsize) {
- offset = f->statsize - 1;
- }
- f->stat[offset] --;
- if (offset < f->med) {
- f->below --;
- }
- }
- else {
- f->count ++;
- }
- oldval = f->count >> 1;
- if (f->below > oldval) {
- offset = f->med - 1;
- while (offset >= 0 && (f->below - f->stat[offset]) > oldval) {
- f->below -= f->stat[offset];
- offset --;
- }
- f->med = offset + 1;
- }
- else {
- offset = f->med;
- while (offset < f->statsize && (f->below + f->stat[offset]) <= oldval) {
- f->below += f->stat[offset];
- offset ++;
- }
- f->med = offset;
- }
- return (double)(f->med + f->min);
-}
-
-Filter * NewFilter(int type, int parameter)
-{
- switch (type) {
- case FILTER_LOWPASS:
- return (Filter *)NewLowPassFilter(1.0/(double)parameter);
- case FILTER_MEDIAN:
- return (Filter *)NewMedianFilter(parameter);
- case FILTER_AVERAGE:
- return (Filter *)NewAverageFilter(parameter);
- default:
- break;
- }
- return NULL;
-}
-
-Filter * ResetFilter(Filter * f, int parameter)
-{
- switch (f->type) {
- case FILTER_LOWPASS:
- return (Filter *)ResetLowPassFilter((LowPassFilter *)f, 1.0/(double)parameter);
- case FILTER_MEDIAN:
- return (Filter *)ResetMedianFilter((MedianFilter *)f, parameter);
- case FILTER_AVERAGE:
- return (Filter *)ResetAverageFilter((AverageFilter *)f, parameter);
- default:
- break;
- }
- return NULL;
-}
-
-void FreeFilter(Filter * f)
-{
- switch (f->type) {
- case FILTER_LOWPASS:
- FreeLowPassFilter((LowPassFilter *)f);
- break;
- case FILTER_MEDIAN:
- FreeMedianFilter((MedianFilter *)f);
- break;
- case FILTER_AVERAGE:
- FreeAverageFilter((AverageFilter *)f);
- break;
- default:
- break;
- }
-}
-
-double DoFilter(Filter *f, double value)
-{
- switch (f->type) {
- case FILTER_LOWPASS:
- return DoLowPassFilter((LowPassFilter *)f, value);
- break;
- case FILTER_MEDIAN:
- return DoMedianFilter((MedianFilter *)f, value);
- break;
- case FILTER_AVERAGE:
- return DoAverageFilter((AverageFilter *)f, value);
- break;
- default:
- break;
- }
- return FLOAT_MIN;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h
deleted file mode 100644
index 7befdfaa20d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#define FILTER_LOWPASS 0
-#define FILTER_MEDIAN 1
-#define FILTER_AVERAGE 2
-
-typedef struct MedianFilter {
- int type;
- int * buf;
- int nsamples;
- int count;
- int ptr;
- int * stat;
- int statsize;
- int max, min;
- int med; /* median offset to stat */
- int below; /* total points below the med entry */
-} MedianFilter;
-
-typedef struct LowPassFilter {
- int type;
- int count;
- int maxcount;
- double R;
- double result;
-} LowPassFilter;
-
-typedef struct AverageFilter {
- int type;
- double * buf;
- int nsamples;
- int ptr;
- double sum;
- int count;
-} AverageFilter;
-
-typedef union Filter {
- int type;
- MedianFilter m;
- AverageFilter a;
- LowPassFilter l;
-} Filter;
-
-Filter * NewFilter(int type, int parameter);
-Filter * ResetFilter(Filter * f, int parameter);
-void FreeFilter(Filter * f);
-double DoFilter(Filter *f, double value);
-
-MedianFilter * NewMedianFilter(int nsamples);
-MedianFilter * ResetMedianFilter(MedianFilter * f, int nsamples);
-void FreeMedianFilter(MedianFilter * f);
-double DoMedianFilter(MedianFilter *f, double value);
-
-AverageFilter * NewAverageFilter(int nsamples);
-AverageFilter * ResetAverageFilter(AverageFilter * f, int nsamples);
-void FreeAverageFilter(AverageFilter * f);
-double DoAverageFilter(AverageFilter *f, double value);
-
-LowPassFilter * NewLowPassFilter(double R);
-LowPassFilter * ResetLowPassFilter(LowPassFilter * f, double R);
-void FreeLowPassFilter(LowPassFilter * f);
-double DoLowPassFilter(LowPassFilter *f, double value);
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp
deleted file mode 100644
index 53808c491dd..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp
+++ /dev/null
@@ -1,506 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <time.h>
-#include <unistd.h>
-#include <limits.h>
-#ifdef __svr4__
-#include <sys/systeminfo.h>
-#endif
-#ifdef _HPUX_SOURCE
-#include <sys/rtprio.h>
-#elif defined(__svr4__)
-#include <sys/priocntl.h>
-#include <sys/rtpriocntl.h>
-#include <sys/tspriocntl.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/sem.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <sys/param.h>
-#include <string.h>
-#include "routine.h"
-
-#define TEST_TYPE 1
-#define SIGSETMASK 0
-#define stacksize 10000
-#define TIME_ROUND 4000
-#define BLOCK_NUM 5
-#define DELTA_MSEC 20
-
-int get_hostname(char *name, int len)
-{
-#ifdef __svr4__
- if (sysinfo(SI_HOSTNAME, name, len) == -1) return -1;
- else return 0;
-#else
- return ACE_OS::hostname(name, len);
-#endif
-}
-
-long get_usec(void)
-{
- struct timeval tp;
- struct timezone tzp;
- int err;
- if (err=gettimeofday(&tp, &tzp))
- {
- return 0;
- }
- else {
- /*
- return ((long)1000000)*(tp.tv_sec%TIME_ROUND) + (tp.tv_usec);
- */
- return ((long)1000000)*(tp.tv_sec) + (tp.tv_usec);
- }
-}
-
-long get_msec(void)
-{
- struct timeval tp;
- struct timezone tzp;
- int err;
- if (err=gettimeofday(&tp, &tzp))
- {
- return 0;
- }
- else
- {
- return ((long)1000)*(tp.tv_sec) + (tp.tv_usec / 1000);
- }
-}
-
-long get_sec(void)
-{
- struct timeval tp;
- struct timezone tzp;
- int err;
- if (err=gettimeofday(&tp, &tzp))
- {
- return 0;
- }
- else
- {
- return tp.tv_sec;
- }
-}
-
-/* returns the difference of the two usec time values */
-
-long get_duration(long val1, long val2)
-{
- /*
- return val2>=val1 ? val2-val1 : (val2+TIME_ROUND-val1);
- */
- return val2>=val1 ? val2-val1 : ((LONG_MAX - val1) + (val2 - LONG_MIN) + 1);
-}
-
-#ifdef LINUX
-#else
-void usleep(unsigned int usec)
-{
- struct timeval val;
-
- if (usec <= 0) return;
- val.tv_sec = usec / 1000000;
- val.tv_usec = usec % 1000000;
- if (select(0, NULL, NULL, NULL, &val) == -1 && errno != 4)
- {
- perror("sleep with select");
- exit(1);
- }
-}
-#endif
-
-void beep(void)
-{
- fprintf(stderr, "\007");
-}
-
-#ifndef FreeBSD
-#include <malloc.h>
-#endif
-#include <sys/shm.h>
-
-void remove_shmem_id(int id)
-{
- shmctl(id, IPC_RMID, NULL);
-#if 0
- /* weird also on some sunOs4 machines */
- /* weird, HPUX always report error on this operation */
- if (errno)
- {
- fprintf(stderr, "shmctl shm_id:%d to IPC_RMID error:", id);
- perror("");
- }
-#endif
-}
-
-char * creat_shared_mem_id(int size, int * id)
-{
- char * shm;
- int shm_id;
-
- shm_id = shmget(IPC_PRIVATE, size, IPC_CREAT | 0666);
- if (shm_id == -1)
- {
- shm_id = shmget(IPC_PRIVATE, 0, IPC_CREAT | 0666);
- if (shm_id == -1)
- {
- perror("Shared MEM shmget1 error");
- exit(1);
- }
- else
- {
- if (shmctl(shm_id, IPC_RMID, NULL) == -1)
- {
- perror("Shared MEM shmctl error");
- exit(1);
- }
- shm_id = shmget(IPC_PRIVATE, 0, IPC_CREAT | 0666);
- if (shm_id == -1)
- {
- perror("Shared MEM shmget2 error");
- exit(1);
- }
- }
- }
- shm = (char *)shmat(shm_id, (char *)0, 0);
- if ((int)shm == -1)
- {
- perror("Shared MEM shmat error");
- exit(1);
- }
- *id = shm_id;
- return shm;
-}
-
-char * creat_shared_mem(int size)
-{
- int shm_id;
- char * shm = creat_shared_mem_id(size, &shm_id);
- remove_shmem_id(shm_id);
- return shm;
-}
-
-void remove_shared_mem(char *ptr)
-{
- shmdt(ptr);
-}
-
-#define SEM_NUM 20
-static int semId = -1;
-static int masterPid = -1;
-static int nextSem = -1;
-
-void enter_cs(int semaphore_id)
-{
- struct sembuf sop;
- sop.sem_num = semaphore_id;
- sop.sem_op = -1;
- sop.sem_flg = 0;
- while (semop(semId, &sop, 1) == -1)
- {
- if (errno == EINTR)
- continue;
- fprintf(stderr, "semop(enter_cs) error: pid=%d", getpid());
- perror("");
- exit(1);
- }
-}
-
-void leave_cs(int semaphore_id)
-{
- struct sembuf sop;
- sop.sem_num = semaphore_id;
- sop.sem_op = 1;
- sop.sem_flg = 0;
- while (semop(semId, &sop, 1) == -1)
- {
- if (errno == EINTR)
- continue;
- fprintf(stderr, "semop(leave_cs) error, pid=%d", getpid());
- perror("");
- exit(1);
- }
-}
-
-int creat_semaphore(void)
-{
- int i;
- int sem_val;
- int semaphore_id;
- if (semId == -1) {
- semId = semget(IPC_PRIVATE, SEM_NUM, IPC_CREAT | 0666);
- if (semId == -1) {
- perror("Semaphore semget error");
- exit(1);
- }
- masterPid = getpid();
- nextSem = 0;
- }
- else if (masterPid != getpid()) {
- fprintf(stderr, "Error: this creat_semaphore() assumes semaphores are allocated\n");
- fprintf(stderr, " only in single process %d, while current pid=%d\n",
- masterPid, getpid());
- exit(1);
- }
- semaphore_id = nextSem ++;
- if (semaphore_id >= SEM_NUM) {
- fprintf(stderr, "Error: all of %d semaphores used up.\n", SEM_NUM);
- exit(1);
- }
- sem_val = semctl(semId, semaphore_id, GETVAL, 0);
-/*
- fprintf(stderr, "Initial semaphore value: %d\n", sem_val);
-*/
- if (sem_val == 0)
- leave_cs(semaphore_id);
- return semaphore_id;
-}
-
-void delete_semaphore()
-{
- if (masterPid == getpid() && semId >= 0) {
- semctl(semId, 0, IPC_RMID, 0);
- } else {
- if (masterPid != getpid())
- fprintf(stderr, "Pid %d not supposed to remove semId created by pid %d\n",
- getpid(), masterPid);
- else
- fprintf(stderr, "The semaphore has been deleted.\n");
- }
- return;
-}
-
-void remove_semaphore(int sid)
-{
- return;
- /* semctl(semId, semaphore_id, IPC_RMID, 0); */
-}
-
-int get_semval(int sid)
-{
- int val, val1 = 0;
- errno = 0;
- val = semctl(semId, sid, GETVAL, 0);
- if (val == -1) {
- perror("getting value of a semaphore");
- exit(1);
- }
- /*
- if (val == 0) {
- fprintf(stderr, "pid %d to call semctl(%d, 0, GETZCNT)\n", getpid(), sid);
- val = semctl(semId, 0, GETZCNT, 0);
- if (val == -1) {
- perror("getting semzcnt of a semaphore");
- exit(1);
- }
-
- fprintf(stderr, "pid %d to call semctl(%d, 0, GETNCNT)\n", getpid(), sid);
- usleep(10000000);
- val1 = semctl(semId, sid, GETNCNT, 0);
- if (val1 == -1) {
- perror("getting semncnt of a semaphore");
- }
- fprintf(stderr, "pid %d to called semctl(GETNCNT)\n", getpid());
-
- fprintf(stderr, "Semval val %d, val1 %d\n", val, val1);
- return (0-(val + val1));
- }
- else
- */
- return val;
-}
-
-void get_full_path(char *filename, char * buffer, int bufsize)
-{
- char path[MAXPATHLEN];
-
- path[0] = 0;
-
- if (*filename == '/')
- strncpy(path, filename, MAXPATHLEN);
- else if (*filename == '~')
- {
- char * env = getenv("HOME");
- if (env != NULL)
- {
- strncpy(path, env, MAXPATHLEN);
- strncat(path, filename+1, MAXPATHLEN - strlen(path));
- }
- else
- strncpy(path, filename, MAXPATHLEN);
- }
- else /* from current dir */
- {
- getcwd(path, MAXPATHLEN);
- if (errno)
- strncpy(path, filename, MAXPATHLEN);
- else
- {
- path[MAXPATHLEN-4] = 0;
- strcat(path, "/");
- strncat(path, filename, MAXPATHLEN - strlen(path));
- }
- }
- path[MAXPATHLEN-1] = 0;
- strncpy(buffer, path, bufsize);
- buffer[bufsize-1] = 0;
- /*
- fprintf(stderr, "%s extended to %s\n", filename, buffer);
- */
-}
-
-void setsignal(int sig, void (func)(int))
-{
-#ifdef _HPUX_SOURCE
- struct sigvec sv;
-
- sv.sv_handler = func;
- sv.sv_mask = 0;
- sv.sv_flags = 0;
- if (sigvector (sig, &sv, (struct sigvec *) NULL) == -1) {
- fprintf(stderr, "sigvector(%d) error", sig);
- perror("");
- exit(1);
- }
-#elif defined(__svr4__) || defined(IRIX)
- if (sigset(sig, func) == SIG_ERR) {
- fprintf(stderr, "sigset(%d,func) error", sig);
- perror("");
- exit(1);
- }
-#elif defined(SunOS) || defined(FreeBSD) || defined(ULTRIX) || defined(LINUX)
- {
- struct sigaction act;
- act.sa_handler = func;
-#ifdef FreeBSD
- act.sa_flags = SV_INTERRUPT;
-#else
- act.sa_flags =/* SA_INTERRUPT;*/ SA_RESTART;
-#endif
- // @@ Naga commented this line.
- // act.sa_mask = 0;
- if (!sigaction(sig, &act, NULL)) return;
- fprintf(stderr, "sigaction(%d,...) error", sig);
- perror("");
- exit(1);
- }
- /*
- if (signal(sig, func) == SIG_ERR) {
- fprintf(stderr, "signal(%d,func) error", sig);
- perror("");
- exit(1);
- }
- */
-#else
- fprintf(stderr,
- "Error: code for setsignal(%d,func) is missing in source/mpeg_shared/routine.cpp\n",
- sig);
- exit(1);
-#endif
-}
-
-/* set to 'pri': 0 -lowest RT, higher value higher RT priority. -1 - Time Sharing.
- For HPUX, 0 -> 127, 1 -> 127, ..., pri -> 127 - pri;
- For Solaris, -> 0, 1 -> 1, pri -> pri;
-
- The function returns 0 on success, -1 on failure
- */
-int SetRTpriority(char *msg, int pri)
-{
- if (pri >= 0) {
-#ifdef _HPUX_SOURCE
- if (rtprio(0, 127 - pri) == -1)
- {
- fprintf(stderr, "%s fails to be set to RT priority %d", msg, 127 - pri);
- perror("");
- return -1;
- }
- return 0;
-#elif defined(__svr4__)
- pcinfo_t pci;
- pcparms_t pcp;
- rtparms_t * rtp = (rtparms_t *)pcp.pc_clparms;
- strcpy(pci.pc_clname, "RT");
- if (priocntl(P_PID, P_MYID, PC_GETCID, (char *)&pci) == -1) {
- fprintf(stderr, "%s priocntl(PC_GETCID) failed for RT pri %d", msg, pri);
- perror("");
- return -1;
- }
- pcp.pc_cid = pci.pc_cid;
- rtp->rt_pri = pri;
- rtp->rt_tqsecs = 0;
- rtp->rt_tqnsecs = 10000000; /* 10 (ten) milliseconds */
- if (priocntl(P_PID, P_MYID, PC_SETPARMS, (char *)&pcp) == -1) {
- fprintf(stderr, "%s priocntl(PC_SETPARMS) failed for RT pri %d", msg, pri);
- perror("");
- return -1;
- }
- return 0;
-#else
- fprintf(stderr, "%s warning: RT priority not available on this arch.\n", msg);
- return -1;
-#endif
- }
- else { /* set to TS priority */
-#ifdef _HPUX_SOURCE
- if (rtprio(0, RTPRIO_RTOFF) == -1) {
- fprintf(stderr, "%s fails to be set to RTPRIO_RTOFF", msg);
- perror("");
- return -1;
- }
- return 0;
-#elif defined(__svr4__)
- pcinfo_t pci;
- pcparms_t pcp;
- tsparms_t * tsp = (tsparms_t *)pcp.pc_clparms;
- strcpy(pci.pc_clname, "TS");
- if (priocntl(P_PID, P_MYID, PC_GETCID, (char *)&pci) == -1) {
- fprintf(stderr, "%s priocntl(PC_GETCID) failed for TS priority", msg);
- perror("");
- return -1;
- }
- pcp.pc_cid = pci.pc_cid;
- tsp->ts_uprilim = 0;
- tsp->ts_upri = 0;
- if (priocntl(P_PID, P_MYID, PC_SETPARMS, (char *)&pcp) == -1) {
- fprintf(stderr, "%s priocntl(PC_SETPARMS) failed for TS priority", msg);
- perror("");
- return -1;
- }
- return 0;
-#endif
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h
deleted file mode 100644
index 64ca7b138ee..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-/* routine.c */
-#if !defined (_MPEG_ROUTINE_H)
-#define _MPEG_ROUTINE_H
-
-#include "include/common.h"
-#ifdef LINUX
-#else
-void usleep(unsigned int usec);
-#endif
-void beep(void);
-int get_hostname(char *name, int len);
-long get_usec(void);
-long get_msec(void);
-long get_sec(void);
-long get_duration(long valstart, long valstop);
-void remove_shmem_id(int id);
-char * creat_shared_mem_id(int size, int * id);
-char * creat_shared_mem(int size);
-void remove_shared_mem(char *ptr);
-void enter_cs(int semaphore_id);
-void leave_cs(int semaphore_id);
-int creat_semaphore(void);
-void remove_semaphore(int sid);
-int get_semval(int sid);
-void get_full_path(char *filename, char * buffer, int bufsize);
-void setsignal(int sig, void (func)(int));
-int SetRTpriority(char *msg, int pri);
-
-#endif /* _MPEG_ROUTINE_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp
deleted file mode 100644
index e6e69f4228d..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <string.h>
-#include "sendpt.h"
-
-/* parameters:
- pat -- pattern
- buf -- buffer for holding sendpattern computed;
- len -- length of pattern and send pattern (number of frames);
- f -- number of frames to send (represented by result send pattern);
-*/
-void ComputeSendPattern(char * pat, char * buf, int len, int f)
-{
- memset(buf, 0, len);
- if (f >= len)
- {
- memset(buf, 1, len);
- }
- else if (f <= 1)
- {
- buf[0] = 1;
- }
- else
- {
- int i, is = 0, ps = 0, bs = 0;
-
- memset(buf, 1, len);
- for (i = 0; i < len; i++)
- {
- if (pat[i] == 'I')
- is ++;
- else if (pat[i] == 'P')
- ps ++;
- else /* B frame */
- bs ++;
- }
- f = len - f; /* number of frames to drop */
- if (f < bs) /* drops only B frames */
- {
- double scale = (double)bs / (double)f;
- int ptr = 0, ptr1 = 0;
- for (i = 0; i < len; i ++)
- {
- if (pat[i] == 'B')
- {
- if ( ptr == (int) ((double)ptr1 * scale + 0.5))
- {
- buf[i] = 0;
- ptr1 ++;
- }
- ptr ++;
- }
- }
- goto endOfCompute;
- }
-
- /* drop all B frames */
- for (i = 0; i < len; i ++)
- if (pat[i] == 'B')
- buf[i] = 0;
-
- if (f == bs)
- goto endOfCompute;
-
- if (f > bs && f < bs + ps) /* drop also some P frames */
- {
- int ptr = len - 1;
- for (i = 0; i < is; i ++)
- {
- int j;
- for (j = 0; j < (f - bs) / is; j ++)
- {
- while (pat[ptr] != 'P') ptr --;
- buf[ptr] = 0;
- ptr --;
- }
- while (pat[ptr] != 'I') ptr --;
- }
- ptr = len - 1;
- for (i = 0; i < (f - bs) % is; i ++)
- {
- while (pat[ptr] != 'P' || buf[ptr] == 0) ptr --;
- buf[ptr] = 0;
- while (pat[ptr] != 'I') ptr --;
- }
- goto endOfCompute;
- }
-
- /* drop all P frames */
- for (i = 0; i < len; i ++)
- if (pat[i] == 'P')
- buf[i] = 0;
-
- if (f > bs + ps) /* needs to drop some I frames */
- {
- double scale = (double)is / (double)(f - bs - ps);
- int ptr = 0, ptr1 = 0;
- for (i = 0; i < len; i ++)
- {
- if (pat[i] == 'I')
- {
- if ( ptr == (int) ((double)ptr1 * scale + 0.5))
- {
- buf[i] = 0;
- ptr1 ++;
- }
- ptr ++;
- }
- }
- goto endOfCompute;
- }
- }
- endOfCompute:;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h
deleted file mode 100644
index f6c011916ff..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-/* parameters:
- pat -- pattern
- buf -- buffer for holding sendpattern computed;
- len -- length of pattern and send pattern (number of frames);
- f -- number of frames to send (represented by result send pattern);
-*/
-void ComputeSendPattern(char * pat, char * buf, int len, int f);
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile
deleted file mode 100644
index 3d193a572ba..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile
+++ /dev/null
@@ -1,258 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-BIN = server
-
-BUILD = $(BIN)
-
-# On non-Windows environment, we should at least define
-# the export_include IDL flag.
-FILES= server
-
-DEFS = $(addsuffix .h,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-
-LIBS += -lTAO -lACE
-
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets (and local hacks)
-#----------------------------------------------------------------------------
-
-LDFLAGS += -lmpeg_server -lmpeg_shared -lmpeg_mib
-MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source
-CPPFLAGS += -I$(MPEG_ROOT)/include -I$(MPEG_ROOT)/mpeg_shared -I$(MPEG_ROOT)/mpeg_server -I$(MPEG_ROOT)/mpeg_client
-CPPFLAGS += -DSH_MEM -DNDEBUG -DSunOS -DSTAT -I../include -I../mpeg_shared
-CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG)#-H
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp server.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_CODgram.h \
- $(ACE_ROOT)/ace/SOCK_CODgram.i \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \
- $(TAO_ROOT)/tao/TAO.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \
- $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control_i.h \
- ../mpeg_server/Video_Server.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp
deleted file mode 100644
index 760332925c3..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp
+++ /dev/null
@@ -1,604 +0,0 @@
-// $Id$
-
-#include "server.h"
-#include "Video_Server.h"
-
-// creates a svc handler by passing "this", i.e. a reference to the
-// acceptor that created it this is needed by the svc_handler to
-// remove the acceptor handle from the reactor called by the acceptor
-// to create a new svc_handler to handle the new connection.
-
-int
-AV_Acceptor::make_svc_handler (AV_Svc_Handler *&sh)
-{
- ACE_NEW_RETURN (sh,
- // AV_Svc_Handler (ACE_Reactor::instance (),
- AV_Svc_Handler (TAO_ORB_Core_instance ()->reactor (),
- this),
- -1);
- return 0;
-}
-
-// Initialize the svc_handler, and the acceptor.
-
-AV_Svc_Handler::AV_Svc_Handler (ACE_Reactor *reactor,
- AV_Acceptor *acceptor)
- : ACE_Svc_Handler <ACE_SOCK_STREAM,
- ACE_NULL_SYNCH> (0, 0, reactor),
- acceptor_ (acceptor)
-{
-}
-
-// Client connected to our control port called by the reactor
-// (acceptor).
-
-int
-AV_Svc_Handler::open (void *)
-{
- // Lets use threads at a later point. The current scheme works fine
- // with fork.. this will activate a thread this->activate
- // (THR_BOUND);
- switch (ACE_OS::fork ("child"))
- {
- case -1:
- // fork failed!!
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) fork failed\n"),
- -1);
- case 0:
- // I am the child. i should handle this connection close down
- // the "listen-mode" socket
- // ACE_Reactor::instance ()->remove_handler
- TAO_ORB_Core_instance ()-> reactor ()->remove_handler
- (this->acceptor_->get_handle (),
- ACCEPT_MASK);
-
- // Handle this connection in the same thread.
- this->svc ();
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Child returning from AV_Svc_handler::open\n"));
- return 0;
-
- default:
- // i am the parent. i should go back and listen for more
- // connections
-
- // (1) "this" will commit suicide, because this svc_handler is not required
- // in the parent. otherwise, a new AV_Svc_handler will be created
- // for each connection, and will never go away, i.e. a memory leak
- // will result.
- // (2) also, this closes down the "connected socket" in the
- // parent, so that when the child closes down its connected
- // socket the connection is actually closed. otherwise, the
- // connection would remain open forever because the parent still
- // has a connected socket.
- this->destroy ();
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Parent Returning from AV_Svc_Handler::open\n"));
- return 0;
- }
- return 0;
-}
-
-// this will handle the connection
-int
-AV_Svc_Handler::svc (void)
-{
- int result;
- result = this->handle_connection ();
-
- if (result != 0)
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) AV_Svc_Handler::svc exiting\n"));
-
- return result;
-}
-
-// handles the connection
-
-int
-AV_Svc_Handler::handle_connection (ACE_HANDLE)
-{
- int junk;
- int result;
- u_short port;
- ACE_UINT32 ip;
-
- // Client is sending us JUNK
- this->peer ().recv_n (&junk, sizeof junk);
-
- // Client is sending us it's port number
- this->peer ().recv_n (&port, sizeof port);
-
- // Client is sending us it's IP addr
- this->peer ().recv_n (&ip, sizeof ip);
-
- this->client_data_addr_.set (port,
- ip,
- 0);
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Client IP == %s, "
- "Client Port == %d\n",
- client_data_addr_.get_host_name (),
- client_data_addr_.get_port_number ()));
-
- this->server_data_addr_.set ((unsigned short)0);
-
- // "Connect" our dgram to the client endpoint.
- if (this->dgram_.open (client_data_addr_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) UDP open failed: %p\n"),
- -1);
-
- if (this->dgram_.get_local_addr (this->server_data_addr_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) UDP get_local_addr failed: %p\n"),
- -1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) UDP IP address is %s, and the port number is %d\n",
- this->server_data_addr_.get_host_addr (),
- this->server_data_addr_.get_port_number ()));
-
- port = this->server_data_addr_.get_port_number ();
-
- // %% we need to fix this ?
- // XXX this is a hack to get my IP address set correctly! By default,
- // get_ip_address is returning 0.0.0.0, even after calling
- // get_local_addr () !!
- this->server_data_addr_.set (port,
- this->server_data_addr_.get_host_name ());
-
- ip = this->server_data_addr_.get_ip_address ();
-
- port = htons (port);
- ip = htonl (ip);
- // Client wants us to send the port number first
- this->peer ().send_n (&port,
- (int) sizeof (u_short));
-
- // Client wants us to send it the IP address
- this->peer ().send_n (&ip,
- (int) sizeof (ACE_UINT32));
-
- // Client is sending us a command
- u_char cmd;
- if (this->peer ().recv_n (&cmd,
- 1) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%P|%t, Command recieve failed: %p"),
- -1);
- // Change these CMD's to enums and put them in a "appropriate" namespace
- switch (cmd)
- {
- case CmdINITvideo:
- {
- // %% what does this do ?!!
- if (Mpeg_Global::live_audio) LeaveLiveAudio ();
- /* result = VideoServer (this->peer ().get_handle (),
- this->dgram_.get_handle (),
- Mpeg_Global::rttag,
- -INET_SOCKET_BUFFER_SIZE);
- */
-
- ACE_NEW_RETURN (this->vs_,
- Video_Server (this->peer ().get_handle (),
- this->dgram_.get_handle (),
- Mpeg_Global::rttag,
- -INET_SOCKET_BUFFER_SIZE),
- -1);
-
- // registers the video server handlers.
- result = this->vs_->register_handlers ();
-
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) handle_connection: "),
- result);
- return result;
-
- }
- break;
- default:
- if (Mpeg_Global::live_audio)
- LeaveLiveAudio ();
- result = AudioServer (this->peer ().get_handle (),
- this->dgram_.get_handle (),
- Mpeg_Global::rttag,
- -INET_SOCKET_BUFFER_SIZE);
- // ACE_Reactor::instance ()->end_event_loop ();
- TAO_ORB_Core_instance ()->reactor ()->end_event_loop ();
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t)handle_connection : "),
- result);
- return result;
-
- }
-
- return 0;
-}
-
-int
-AV_Svc_Handler::close (u_long)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t)AV_Svc_Handler::close called \n"));
- return 0;
-}
-
-int
-AV_Svc_Handler::handle_timeout (const ACE_Time_Value &,
- const void *arg)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t)AV_Svc_Handler::handle_timeout called \n"));
- return 0;
-}
-
-// AV_Server_Sig_Handler routines
-
-AV_Server_Sig_Handler::AV_Server_Sig_Handler (void)
-{
-}
-
-int
-AV_Server_Sig_Handler::register_handler (void)
-{
- // Assign the Sig_Handler a dummy I/O descriptor. Note that even
- // though we open this file "Write Only" we still need to use the
- // ACE_Event_Handler::NULL_MASK when registering this with the
- // ACE_Reactor (see below).
- this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY);
- ACE_ASSERT (this->handle_ != -1);
-
- // Register signal handler object. Note that NULL_MASK is used to
- // keep the ACE_Reactor from calling us back on the "/dev/null"
- // descriptor.
-
- // if (ACE_Reactor::instance ()->register_handler
- if (TAO_ORB_Core_instance ()->reactor ()->register_handler
- (this, ACE_Event_Handler::NULL_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
- -1);
-
- // Create a sigset_t corresponding to the signals we want to catch.
- ACE_Sig_Set sig_set;
-
- // handles these signals.
- sig_set.sig_add (SIGCHLD);
- sig_set.sig_add (SIGBUS);
- sig_set.sig_add (SIGINT);
- sig_set.sig_add (SIGTERM);
-
- // Register the signal handler object to catch the signals.
- // if (ACE_Reactor::instance ()->register_handler (sig_set,
- if (TAO_ORB_Core_instance ()->reactor ()->register_handler (sig_set,
- this) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
- -1);
-
- return 0;
-}
-
-// Called by the ACE_Reactor to extract the fd.
-ACE_HANDLE
-AV_Server_Sig_Handler::get_handle (void) const
-{
- return this->handle_;
-}
-
-int
-AV_Server_Sig_Handler::handle_input (ACE_HANDLE)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n"));
- return 0;
-}
-
-int
-AV_Server_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n"));
- return 0;
-}
-
-// This method handles all the signals that are being caught by this
-// object. In our simple example, we are simply catching SIGALRM,
-// SIGINT, and SIGQUIT. Anything else is logged and ignored.
-//
-// There are several advantages to using this approach. First,
-// the behavior triggered by the signal is handled in the main event
-// loop, rather than in the signal handler. Second, the ACE_Reactor's
-// signal handling mechanism eliminates the need to use global signal
-// handler functions and data.
-
-int
-AV_Server_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *)
-{
- // ACE_DEBUG ((LM_DEBUG, "(%t) received signal %S\n", signum));
-
- switch (signum)
- {
- case SIGCHLD:
- // Handle the death of child signal.
- this->clear_child (SIGCHLD);
- break;
- case SIGBUS:
- // Handle the Bus error signal
- case SIGINT:
- // Handle the interrupt signal
- case SIGTERM:
- // Handle the process termination signal.
- this->int_handler (signum);
- break;
- default:
- ACE_DEBUG ((LM_DEBUG,
- "(%t) %S: not handled, returning to program\n",
- signum));
- break;
- }
- return 0;
-}
-
-// SIGCHLD handler
-void
-AV_Server_Sig_Handler::clear_child (int sig)
-{
- int pid;
- int status;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Reaping the children\n"));
- // reap the children
- while ((pid = ACE_OS::waitpid (-1,
- &status,
- WNOHANG)) > 0)
- {
- // decrement the count of number of active children
- Mpeg_Global::session_num --;
-
- if (status == 0)
- continue;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) VCRS: child %d (status %d) ",
- pid,
- status));
-
- // %% what does the following do
- if (WIFEXITED(status))
- {
- // @@ Can you replace these fprintfs with the appropriate
- // ACE_DEBUG/ACE_ERROR macros?!
- fprintf(stderr, "exited with status %d\n", WEXITSTATUS(status));
- }
- else if (WIFSIGNALED(status))
- {
- // %% can we remove the below ?
-#if defined(_HPUX_SOURCE) || defined(__svr4__) || defined(IRIX)
- fprintf(stderr, "terminated at signal %d%s.\n", WTERMSIG(status),
- WCOREDUMP(status) ? ", core dumped" : "");
-#else
- fprintf(stderr, "terminated at signal %d.\n", WTERMSIG(status));
-#endif
- }
- else if (WIFSTOPPED(status))
- fprintf(stderr, "stopped at signal %d\n", WSTOPSIG(status));
- }
-}
-
-// ctrl-c, Bus error, interrupt sig handler
-void
-AV_Server_Sig_Handler::int_handler (int sig)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) killed by signal %d",
- sig));
- exit (0);
-}
-
-// AV_Server routines
-
-// Default Constructor
-AV_Server::AV_Server ()
-{
- this->signal_handler_ = new AV_Server_Sig_Handler ;
- this->orb_manager_ = new TAO_ORB_Manager ;
- this->video_control_ = new Video_Control_i;
-}
-
-// %% move to the destructor or sig handler
-void
-AV_Server::on_exit_routine (void)
-{
- // %% what does the following do
- if (Mpeg_Global::parentpid != ACE_OS::getpid ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Process is exiting\n"));
- return;
- }
-
- // %% what does the following do
- if (Mpeg_Global::live_audio > 1) ExitLiveAudio ();
- if (Mpeg_Global::live_video > 1) ExitLiveVideo ();
- // ComCloseServer();
-}
-
-
-// Parses the command line arguments
-int
-AV_Server::parse_args (int argc,
- char **argv)
-{
- ACE_Get_Opt get_opts (argc, argv, "rd:s:vamh");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'r': // real time flag
- Mpeg_Global::rttag = 1;
- break;
- case 'd': // clock drift in ppm
- Mpeg_Global::drift_ppm = ACE_OS::atoi (get_opts.optarg);
- break;
- case 's':// limit on number of sessions
- Mpeg_Global::session_limit = ACE_OS::atoi (get_opts.optarg);
- break;
- case 'v':// live video flag
- Mpeg_Global::live_video = 1;
- break;
- case 'a':// live audio flag
- Mpeg_Global::live_audio = 1;
- break;
- case 'm':// remove flag
- ACE_OS::unlink (VCR_UNIX_PORT);
- break;
- case '?':
- case 'h':// help flag
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s [-r ] [-m]\n"
- " [-d#int(clock drift in ppm)]\n"
- " [-s#int(limit on number of sessions)]\n"
- " [-v] [-a] [-?] [-h]",
- argv [0]));
- return -1;
- }
- return 0;
-}
-
-
-// Initializes the mpeg server
-int
-AV_Server::init (int argc,
- char **argv,
- CORBA::Environment& env)
-{
- int result;
-
- // Initialize the orb_manager
- this->orb_manager_->init_child_poa (argc,
- argv,
- "child_poa",
- env);
- TAO_CHECK_ENV_RETURN (env,-1);
-
- this->orb_manager_->activate_under_child_poa ("Video_Control",
- this->video_control_,
- env);
- TAO_CHECK_ENV_RETURN (env,-1);
-
- result = this->parse_args (argc, argv);
- if (result < 0)
- return result;
-
- // Register the various signal handlers with the reactor.
- result = this->signal_handler_->register_handler ();
-
- if (result < 0)
- return result;
-
- Mpeg_Global::parentpid = ACE_OS::getpid ();
-
- ::atexit (on_exit_routine);
-
- // %%
- if (Mpeg_Global::live_audio)
- {
- if (InitLiveAudio (argc, argv) == -1)
- Mpeg_Global::live_audio = 0;
- else
- Mpeg_Global::live_audio = 2;
- }
-
- if (Mpeg_Global::live_video)
- {
- if (InitLiveVideo (argc, argv) == -1)
- Mpeg_Global::live_video = 0;
- else
- Mpeg_Global::live_video = 2;
- }
-
- // open LOG_DIR/vcrsSession.log as the stdout
- // if not, use /dev/null
- {
- char buf [100];
- ACE_OS::sprintf (buf,
- "%s%s",
- LOG_DIR,
- "vcrsSession.log");
-
- if (::freopen (buf,
- "a",
- stdout) == NULL)
- {
- ::freopen ("/dev/null",
- "w",
- stdout);
- }
- }
- return 0;
-}
-
-// Runs the mpeg server
-int
-AV_Server::run (CORBA::Environment& env)
-{
- int result;
- this->server_control_addr_.set (VCR_TCP_PORT);
-
- // "listen" on the socket
- if (this->acceptor_.open (this->server_control_addr_,
- TAO_ORB_Core_instance ()->reactor ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1);
-
- // ACE_Reactor::instance ()->run_event_loop ();
-
- // Run the ORB event loop
- this->orb_manager_->run (env);
-
- TAO_CHECK_ENV_RETURN (env,-1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P)AV_Server::run () "
- "came out of the (acceptor) "
- "event loop %p\n",
- "run_event_loop\n"));
-}
-
-AV_Server::~AV_Server (void)
-{
- if (this->signal_handler_ != 0)
- delete this->signal_handler_;
-}
-
-int
-main (int argc, char **argv)
-{
- AV_Server vcr_server;
-
- TAO_TRY
- {
- // parses the arguments, and initializes the server
- if (vcr_server.init (argc, argv,TAO_TRY_ENV) < 0)
- return 1;
-
- // runs the reactor event loop
- vcr_server.run (TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Exception");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h
deleted file mode 100644
index 41aab3ad711..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- c++ -*- */
-/* $Id$ */
-
-// ============================================================================
-//
-// = LIBRARY
-// server
-//
-// = FILENAME
-// server.h
-//
-// = DESCRIPTION
-// @@ Please add a synopsis of this file.
-//
-// = AUTHORS
-// Sumedh Mungee (sumedh@cs.wustl.edu)
-// Nagarajan Surendran (naga@cs.wustl.edu)
-//
-// ============================================================================
-
-#if !defined (TAO_AV_SERVER_H)
-#define TAO_AV_SERVER_H
-
-#include "ace/Get_Opt.h"
-#include "ace/Acceptor.h"
-#include "ace/Svc_Handler.h"
-#include "ace/SOCK_Acceptor.h"
-#include "ace/INET_Addr.h"
-#include "ace/SOCK_CODgram.h"
-#include "ace/Select_Reactor.h"
-
-#include "common.h"
-#include "server_proto.h"
-#include "fileio.h"
-#include "routine.h"
-#include "com.h"
-#include "Video_Control_i.h"
-
-#if defined (NATIVE_ATM)
-#include "atmcom.h"
-#endif /* NATIVE_ATM */
-
-// @@ Make sure you use the -I option in the makefile to avoid having to use the ../... pathname stuff..
-#include "../mpeg_server/Video_Server.h"
-
-// Forward declaration.
-class AV_Svc_Handler;
-
-// @@ We should probably try to replace the ACE_Acceptor with the
-// ACE_Strategy_Acceptor using the ACE_Process_Strategy...
-class AV_Acceptor
- : public virtual ACE_Acceptor <AV_Svc_Handler, ACE_SOCK_ACCEPTOR>
-{
- // = TITLE
- // This defines a AV_Acceptor which is an Acceptor and
- // overrides the make_svc_handler method of the Acceptor.
- //
- // = DESCRIPTION
- // This class overrides the Acceptor's make_svc_handler so that a
- // AV_Svc_Handler can be created with a non-default constructor.
-public:
- virtual int make_svc_handler (AV_Svc_Handler *&sh);
- // Create a new <AV_Svc_Handler> passing 'this' to the service
- // handler.
-};
-
-class AV_Svc_Handler
- : public virtual ACE_Svc_Handler <ACE_SOCK_STREAM, ACE_NULL_SYNCH>
-{
- // = TITLE
- // This class defines the service handler for a new connection to
- // the AV_Server.
- //
- // =DESCRIPTION
- // This calls the handle_connection method for a new connection
- // which demuxes the connection to a video or audio server
- // depending on the connection request.
-public:
- // = Initialization method.
- AV_Svc_Handler (ACE_Reactor * = 0,
- AV_Acceptor * = 0);
-
- virtual int open (void *);
- // Perform the work of the SVC_HANDLER. Called by the acceptor
- // when a new connection shows up
-
- virtual int handle_connection (ACE_HANDLE = ACE_INVALID_HANDLE);
- // Handle one client connection.
-
- virtual int svc (void);
- // Thread method
-
- virtual int close (u_long);
- // Called if ACE_Svc_Handler is closed down unexpectedly.
-
- int handle_timeout (const ACE_Time_Value &,
- const void *arg);
- // handle the timeout
-
-private:
-
- ACE_SOCK_CODgram dgram_;
- // the UDP data socket
-
- ACE_INET_Addr server_data_addr_;
- // Data (UDP) Address of this server.
-
- ACE_INET_Addr client_data_addr_;
- // Data (UDP) Address of the client.
-
- AV_Acceptor *acceptor_;
- // Pointer to the Acceptor that created us so that we can remove it
- // from the <ACE_Reactor> when we <fork>.
-
- // @@ need a similar component for audio!
- Video_Server *vs_;
-};
-
-class AV_Server_Sig_Handler
- : public virtual ACE_Event_Handler
-{
-public:
- AV_Server_Sig_Handler (void);
-
- virtual ACE_HANDLE get_handle (void) const;
-
- int register_handler (void);
- // this will register this sig_handler
- // with the reactor for SIGCHLD,SIGTERM,SIGINT
-
- virtual int shutdown (ACE_HANDLE,
- ACE_Reactor_Mask);
-
- virtual int handle_input (ACE_HANDLE);
- // handle input on the dummy handle.
-
- virtual int handle_signal (ACE_HANDLE signum,
- siginfo_t * = 0,
- ucontext_t* = 0);
- // handles the SIGCHLD,SIGTERM,SIGINT for the parent process i.e
- // the main thread..
-
- void int_handler (int sig);
- // Signal handler function for SIGTERM,SIGBUS,SIGINT
-
- void clear_child (int sig);
- // Signal handler function for SIGCHLD
-private:
- ACE_HANDLE handle_;
- // dummy handle for the sig handler.
-};
-
-class AV_Server
-{
- // = TITLE
- // Defines a class that abstracts the functionality of a
- // video and audio server.
- //
- // = DESCRIPTION
- // Using the class is as simple as calling init () first and then
- // run. It uses an acceptor with the default ACE_Reactor::instance ().
-public:
- AV_Server ();
- // constructor
-
- int init (int argc,
- char **argv,
- CORBA::Environment& env);
- // Initialize the AV_Server
-
- int run (CORBA::Environment& env);
- // Run the AV_Server
-
- static void on_exit_routine (void);
- // Routine called when this process exits.
-
- ~AV_Server ();
- // Destructor
-private:
-
- TAO_ORB_Manager *orb_manager_;
- // the TAO ORB manager.
-
- Video_Control_i *video_control_;
- // The Video_Control implementation object.
-
- AV_Acceptor acceptor_;
- // the acceptor
-
- AV_Server_Sig_Handler *signal_handler_;
- // Signal handler for SIGCHLD,SIGINT,SIGTERM,SIGBUS
-
- ACE_INET_Addr server_control_addr_;
- // Control (TCP) Address of this server.
-
- int parse_args (int argcs,
- char **argv);
- // parse the arguments
-};
-
-#endif /* TAO_AV_SERVER_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp
deleted file mode 100644
index fd232eb1a62..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-/* $Id$ */
-/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology
- * P.O.Box 91000-1000, Portland, OR 97291, USA;
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of O.G.I. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. O.G.I. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Shanwei Cen
- * Department of Computer Science and Engineering
- * email: scen@cse.ogi.edu
- */
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <errno.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <time.h>
-#include <sys/time.h>
-#include "../include/common.h"
-#include "../mpeg_shared/com.h"
-#include "../mpeg_shared/routine.h"
-#include "../mpeg_server/proto.h"
-
-#define SESSION_NUM 4
-
-static int parentpid = -1;
-
-static int listenSocketIn = -1;
-static int listenSocketUn = -1;
-
-static struct linger linger = {1,1};
-
-static int live_audio = 0, live_video = 0; /* 0 - no, 1 - to open, 2 - opened */
-
-int drift_ppm = 0; /* clock drift in ppm */
-
-int session_limit = SESSION_NUM;
-int session_num = 0;
-
-static void int_handler(int sig)
-{
- /*
- fprintf(stderr, "process %d killed by sig %d\n", getpid(), sig);
- */
- exit(0);
-}
-
-static void on_exit_routine(void)
-{
- if (parentpid != getpid()) {
- /*
- fprintf(stderr, "process %d exiting...\n", getpid());
- */
- return;
- }
- /*
- fprintf(stderr, "deamon exiting . . .\n");
- */
- if (live_audio > 1) ExitLiveAudio();
- if (live_video > 1) ExitLiveVideo();
- ComCloseServer();
-}
-
-static void clear_child(int sig)
-{
- int pid;
- int status;
-
- while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
- {
- session_num --;
-
- if (status == 0) {
- continue;
- }
- fprintf(stderr, "VCRS: child %d (status %d) ", pid, status);
- if (WIFEXITED(status)) {
- fprintf(stderr, "exited with status %d\n", WEXITSTATUS(status));
- }
- else if (WIFSIGNALED(status)) {
-#if defined(_HPUX_SOURCE) || defined(__svr4__) || defined(IRIX)
- fprintf(stderr, "terminated at signal %d%s.\n", WTERMSIG(status),
- WCOREDUMP(status) ? ", core dumped" : "");
-#else
- fprintf(stderr, "terminated at signal %d.\n", WTERMSIG(status));
-#endif
- }
- else if (WIFSTOPPED(status)) {
- fprintf(stderr, "stopped at signal %d\n", WSTOPSIG(status));
- }
-
- }
-}
-
-main(int argc, char *argv[])
-{
- int i, rttag = 0;
- int addrlen;
-
- for (i = 1; i < argc; i++) {
- if (!strcmp(argv[i], "-rt")) {
- rttag = 1;
- }
- else if (!strcmp(argv[i], "-nrt")) {
- rttag = 0;
- }
- else if (!strncmp(argv[i], "-d", 2)) {
- sscanf(&argv[i][2], "%d", &drift_ppm);
- }
- else if (!strncmp(argv[i], "-s", 2)) {
- sscanf(&argv[i][2], "%d", &session_limit);
- if (session_limit < 1)
- session_limit = SESSION_NUM;
- }
- else if (!strcmp(argv[i], "-lv")) {
- live_video = 1;
- }
- else if (!strcmp(argv[i], "-la")) {
- live_audio = 1;
- }
- else if (!strcmp(argv[i], "-rm")) {
- unlink(VCR_UNIX_PORT);
- }
- else if (!strncmp(argv[i], "-he", 3)) {
- fprintf(stderr, "Usage: %s [-rt] [-nrt] [-rm]\n", argv[0]);
- fprintf(stderr, " [-d#int(clock drift in ppm)]\n");
- fprintf(stderr, " [-s#int(limit on number of sessions)]\n");
- exit(1);
- }
- }
- if (drift_ppm) {
- fprintf(stderr, "Clock set to drift at %d ppm (positive is faster and neg. slower)\n",
- drift_ppm);
- }
-
- setsignal(SIGCHLD, clear_child);
- setsignal(SIGPIPE, SIG_IGN);
- setsignal(SIGBUS, int_handler);
- setsignal(SIGINT, int_handler);
- setsignal(SIGTERM, int_handler);
- setsignal(SIGALRM, SIG_IGN);
-
- parentpid = getpid();
-
- atexit(on_exit_routine);
-
- if (live_audio) {
- if (InitLiveAudio(argc, argv) == -1)
- live_audio = 0;
- else
- live_audio = 2;
- }
-
- if (live_video) {
- if (InitLiveVideo(argc, argv) == -1)
- live_video = 0;
- else
- live_video = 2;
- }
-
- ComInitServer(VCR_TCP_PORT, VCR_UNIX_PORT, VCR_ATM_PORT);
-
- /*
- setpgrp();
- */
- {
- char buf[100];
- sprintf(buf, "%s%s", LOG_DIR, "vcrsSession.log");
- if (freopen(buf, "a", stdout) == NULL) {
- freopen("/dev/null", "w", stdout);
- }
- }
-
- for (;;)
- {
- int val;
- unsigned char cmd;
- int serverpid = -1;
- int cfd, dfd;
- int max_pkt_size;
-
- if (ComGetConnPair(&cfd, &dfd, &max_pkt_size) == -1) continue;
-
- if ((serverpid = fork()) == -1)
- {
- perror("VCRS error on creating service process");
- exit(1);
- }
- session_num ++;
- if (serverpid > 0) /* parent process for forking servers */
- {
- ComCloseFd(cfd);
- ComCloseFd(dfd);
- continue;
- }
- else
- {
- if (session_num > session_limit) {
- time_t t;
- char *buf;
- t = time(NULL);
- buf = ctime(&t);
- buf[strlen(buf) - 1] = 0;
- fprintf(stderr, "VCRS: %s, session_limit %d, session_number %d\n",
- buf, session_limit, session_num);
- }
-
- if ((val = read(cfd, &cmd, 1)) < 0)
- {
- perror("VCRS fails to read command from service socket");
- exit(1);
- }
- if (val == 0) {
- fprintf(stderr, "Remote client has closed connection.\n");
- ComCloseConn(cfd);
- ComCloseConn(dfd);
- /* continue; -- I don't know why I wrote this line? scen 5-12-96 */
- exit(0);
- }
- ComCloseListen();
- if (cmd == CmdINITvideo)
- {
- /*
- fprintf(stderr, "Server forked a VideoServer process.\n");
- */
- if (live_audio) LeaveLiveAudio();
- VideoServer(cfd, dfd, rttag, max_pkt_size);
- fprintf(stderr, "Weird: video server returned.\n");
- }
- else
- {
- /*
- fprintf(stderr, "Server forked a AudioServer process.\n");
- */
- if (live_video) LeaveLiveVideo();
- AudioServer(cfd, dfd, rttag, max_pkt_size);
- fprintf(stderr, "Weird: audio server returned.\n");
- }
- exit(1);
- }
- }
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1 b/TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1
deleted file mode 100644
index 24e9688f674..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1
+++ /dev/null
@@ -1,610 +0,0 @@
-.\" Copyright (c) 1995 Oregon Graduate Institute
-.TH vcr 1 "November 1995" "MPEG video audio player"
-
-.SH NAME
-.B vcr vcrs
-\- Distributed, real-time synchronized video audio player, version 2.0
-.SH SYNOPSIS
-
-.B vcrs
-[
-.B \-rt
-] [
-.B \-rm
-] [
-.B \-s\fIsession_limit\fP
-] [
-.B \-help
-]
-
-.B vcr
-[
-.B\-rt
-] [
-.B \-shmem
-] [
-.B \-rmsem
-]
-.ti +5n
-[
-.BR \-dither " ordered\||\|ordered2\||\|fs4\||\|fs2\||\|fs2fast\||\|hybrid\||\|
-.if n .ti +5n
- hybrid2\||\|2x2\||\|gray\||\|color\||\|mono\||\|threshold
-]
-.if n .ti +5n
-[
-.I X-window options
-]
-.if n .ti +5n
-[
-.BR \-v " \fI[hostname:]video-filename\fP"
-]
-.if n .ti +5n
-[
-.BR \-a " \fI[hostname:]audio-filename\fP"
-]
-.if n .ti +5n
-[
-.BR \-p " \fImovie-file-name\fP"
-]
-.if n .ti +5n
-[
-.BR \-l " \fImovie-list-file-name\fP"
-]
-.if n .ti +5n
-[
-.BR \-quiet
-]
-.if n .ti +5n
-[
-.BR \-help
-]
-.SH DESCRIPTION
-
-The player plays \fBMPEG\-1\fP video and \fB8\-bit mu\-law (Sun
-Sparc)\fP audio. It supports
-following \fBfour types\fP of playback:
-.TP
-\ \ \ \(bu
-Plays both video and audio synchronously, in real-time mode. Video
-frames, or even audio samples are dropped if needed.
-.TP
-\ \ \ \(bu
-Plays video only, in real-time mode. Video frames are dropped if
-needed.
-.TP
-\ \ \ \(bu
-Plays video only, in best-effort mode, video frames are played as fast
-as possible.
-.TP
-\ \ \ \(bu
-Plays audio only, in real time mode.
-.PP
-
-When video/audio is played in \fBreal-time\fP mode, play speed (defined in
-terms of frames-per-second (fps) for video and samples-per-second (sps)
-for audio) can be specified through a speed scale. If audio is played at a
-speed other than the recording (normal) speed, samples are interpolated.
-
-When video is played in \fBbest-effort\fP mode, the player tries its
-best to play video frame by frame, and not to drop frames. This mode
-is not supported very well. Now and then some frames may be
-dropped. Audio is disabled in this mode.
-
-As well as various types of playback, the player also supports other
-common VCR functions such as fast forward, rewind, step
-(forward), random positioning, etc..
-
-The player is of \fBdistributed architecture\fP, with servers and
-clients communicating across Internet. A \fBserver\fP resides on a
-host, and services coming audio/video retrieval requests from clients.
-A \fBclient\fP receives instructions from the user, makes connection
-to servers, buffers incoming streams, decodes video frames,
-interpolates audio samples, and outputs audio and video to
-corresponding devices in a timely manner. A client can connect to
-different servers for audio and video streams, and still plays them
-synchronously.
-
-
-.SH SERVER
-
-To start the server, type:
-
-.B vcrs
-[
-.B \-rt
-] [
-.B \-rm
-] [
-.B \-s\fIsession_limit\fP
-] [
-.B \-help
-]
-
-One host can have a SINGLE server running, which responds to
-connection requests from all clients to that host. Subsequent
-invocation is terminated with an error message.
-
-\fBOptions\fP
-
-.IP "\fB-rt\fP"
-On \fBhpux\fP, \fBsparc-sunos5.3\fP and \fBi86pc-solaris2.4\fP, if you
-have real-time execution privilege, you can start the server with
-the option \fB\-rt\fP to get better service.
-
-.IP "\fB-rm\fP"
-With option \fB\-rm\fP, the server will try to remove socket names
-left by previous crashed invocations before initialization.
-
-.IP "\fB-s\fIsession_limit\fP"
-
-With the option of \fB\-s\fP followed by a positive integer, e.g.
-\fB-s2\fP, \fB-s4\fP or \fB-s10\fP, the number of sessions
-serviced by the server at any time will be limited to be no more than
-the given number. Both audio and video sessions are counted. The
-default session number limit is \fB4\fI.
-
-.IP "\fB-help\fP"
-This option tells the server to print all available options and then
-quit.
-
-.PP
-
-In a video session, the server tries to find a
-corresponding \fB.Info\fP file describing the structure of the MPEG
-file of the session. If this fails, the server scans the MPEG file for
-structure information and tries to create the \fB.Info\fP file. For
-big MPEG files, this scanning process may take quite a few minutes
-(some times even tens of minutes). If the \fB.Info\fP file is found,
-the server simply reads structure information from it.
-
-.SH CLIENT
-
-The client program is available on \fBsun4\fP, \fBhpux\fP and
-\fBi86pc-solaris2.4\fP. It needs a \fBMotif\fP environment, and
-outputs audio to the default \fBAudioFile\fP server. If the client
-fails to connect to the default AudioFile server, then the audio is
-disabled.
-
-To start the client, type:
-
-.B vcr
-[
-.B\-rt
-] [
-.B \-shmem
-] [
-.B \-rmsem
-]
-.ti +5n
-[
-.BR \-dither " ordered\||\|ordered2\||\|fs4\||\|fs2\||\|fs2fast\||\|hybrid\||\|
-.if n .ti +5n
- hybrid2\||\|2x2\||\|gray\||\|color\||\|mono\||\|threshold
-]
-.if n .ti +5n
-[
-.I X-window options
-]
-.if n .ti +5n
-[
-.BR \-v " \fI[hostname:]video-filename\fP"
-]
-.if n .ti +5n
-[
-.BR \-a " \fI[hostname:]audio-filename\fP"
-]
-.if n .ti +5n
-[
-.BR \-p " \fImovie-file-name\fP"
-]
-.if n .ti +5n
-[
-.BR \-l " \fImovie-list-file-name\fP"
-]
-.if n .ti +5n
-[
-.BR \-quiet
-]
-.if n .ti +5n
-[
-.BR \-help
-]
-
-\fBOptions\fP
-
-.IP \fB-rt\fP
-On \fBhpux\fP, and \fBi86pc-solaris2.4\fP, if you have real-time
-execution privilege, with this option you may get better service.
-.IP \fB-shmem\fP
-With this option, the client tries to output video frames to the
-X-server via shared memory instead of sockets.
-.IP \fB-rmsem\fP
-With this option, prior to initialization, the client tries to remove
-\fBall\fP existing semaphore and shared memory ids you have access to.
-\fBBe careful\fP, with this option, you also face the danger of
-removing semaphores or shared memory ids being used by other programs,
-as well as all the ones created by failed invocation of the player. See
-\fBSemaphore ids and shared memory ids used up\fP in \fBKNOWN PROBLEMS\fP
-section.
-.IP "\fB-dither\fP ordered|ordered2|fs4|fs2|fs2fast|hybrid|"
- hybrid2|2x2|gray|color|mono|threshold
-
-This option specifies the type of dithering performed on video frames
-in order to be displayed on an X-window. The default is
-\fIordered\fP. \fIcolor\fP only works with full color (24-bit)
-displays. All others work with 8-bit color displays. \fImono\fP and
-\fIthreshold\fP also work with mono displays. Different types of
-dithering have different computational complexity and offer different
-image quality.
-.IP "\fIX-window options\fP"
-All standard X-window Toolkit command line options are accepted
-(see \fBX\fP(1)).
-.IP "\fB-v\fP \fI[hostname:]video-filename\fP"
-The very first program for the player can be specified in command line
-with \fB-v\fP and/or \fB-a\fP options, for video and/or audio streams
-respectively.
-
-This option specifies a video stream. If the \fIhostname\fP part is
-given, the client tries to connect to a running server on the given
-host, and plays the given file. If the hostname part is missing, the
-client assumes there is a running server on the local host or tries to
-fork one. and tries to connect to it.
-
-.IP "\fB-a\fP \fI[hostname:]audio-filename\fP"
-This option specifies an audio stream of the very first program.
-Only file names with suffix \fB.au\fP are accepted as audio files.
-.IP "\fB-p\fP \fImovie-file-name\fP"
-This option specifies a file specifying a movie to be played upon
-client startup. A movies file contains \fBfive lines\fP lines: title,
-video host name, video file path, audio host name, and audio file path.
-.IP "\fB-l\fP \fImovie-list-file-name\fP"
-This option specifies a movie list file to replace the default movie
-list file \fI$(HOME)/.vcr/vcrPrograms\fP. A movie list file contains a
-banner line, followed by a list of movies.
-.IP "\fB-quiet\fP"
-This option tells the client not to print any text message. This is
-useful when the player is invoked from within a web browser.
-.IP "\fB-help\fP"
-This option tells the client to print all available options and quit.
-
-.PP
-
-\fBOperations\fP
-
-There are \fBtwelve buttons\fP and \fBfour scales\fP defined in the top-level window.
-Buttons from left to right are:
-.PP
-.IP \fIExit\fP
-Exits the client right away.
-.IP \fIInfo\fP
-Pops up a window containing information about the player.
-.IP \fIPara\fP
-Pops up a window with a list of parameters. Parameter values
-can be viewed and modified through this window.
-.IP \fIProg\fP
-Pops up a window with a list of programs. You
-can select a program from this list to play.
-.IP \fIFile\fP
-This is an alternative way to select programs. pressing this button
-pops up a standard Motif file selection window. You can select
-audio/video file on local host to play. The client assumes a running
-server on local host, or tries to fork one.
-
-File names with suffix \fB.au\fP are accepted as audio, and file
-names with suffices \fB.mpg\fP, or \fB.mpeg\fP (some or all letters in
-the suffices can be upper-case ones) as MPEG video. Other types of
-file names are rejected.
-
-Selection of a new program causes the current program to be discarded.
-.IP \fILoop\fP
-A toggle button. When pressed, the current program is played
-repeatedly until stopped explicitly by the user, otherwise, playback stops when
-program end is hit. This button has no effect on rewind and fast
-forward.
-.IP \fINorm\fP
-Restores play speed to the normal (recording) speed.
-.IP \fIRewind\fP
-For video programs. Plays backward from the current position at a
-speed given by the parameter \fI(Rewind frames-per-second)\fP. Only first
-frames of MPEG picture groups (I-frames) are played. Audio is
-disabled.
-.IP \fIStop\fP
-Stops active playback, fast forward or rewind.
-.IP \fIFast-Forward\fP
-For video programs. Plays forward from the current position at a speed
-given by the parameter \fI(FF frames-per-second)\fP. Only first frames of MPEG
-picture groups (I-frames) are played. Audio is disabled.
-.IP \fIPlay\fP
-Plays the program from the current position in one of the two modes,
-depending on if video is involved and the value of an parameter \fI(Real
-time(audio on)(tag))\fP:
-.RS
-.IP -
-Best-effort mode, if the parameter is off (0), and video is involved.
-.IP -
-Real-time mode, otherwise.
-.RE
-.IP \fIStep\fP
-Steps forward for one frame from the current position.
-.PP
-Clicking on buttons \fIRewind\fP, \fIFast-Forward\fP, \fIPlay\fP and
-\fIStep\fP and dragging the \fIPlay-Speed\fP scale all stop current
-active rewind, fast forward, or play.
-
-.B "Four scales \fP from left to right are:"
-
-.IP \fIBalance\fP
-Currently not functional, because only mono audio is
-supported.
-.IP \fIVolume\fP
-Audio volume.
-.IP \fIPlay-Speed\fP
-Specifies play speed for real-time mode playback. This scale is not
-completely linear, with a special middle point (\fB50\fP).
-.RS
-.IP \fB50\fP
-normal (recording) speed.
-.IP "\fB[1 - 50)\fP"
-linear speed value increase from zero to the normal speed.
-.IP "\fB(50 - 100]\fP"
-Linear speed value increase from the normal speed to the maximum
-speed given by the parameter \fI(Video max frames-per-second)\fP when
-video is involved in the current program, or \fI(Audio max
-samples-per-second)\fP when only audio is involved.
-.RE
-This scale also defines the upper-limit of the best-effort playback
-speed.
-.IP \fIPosition\fP
-This scale has multiple functionalities:
-.RS
-.IP -
-Indicates the beginning position for rewind, fast forward and
-playback.
-.IP -
-Shows the current position during rewind, fast forward, and playback.
-.IP -
-Random positioning: you can set the position by dragging the
-slider. when video is involved, the first frame of the picture group
-at the current position is displayed.
-.RE
-.PP
-.B "Program list"
-
-.B Program list
-is maintained through the \fBprogram list\fP window, which is popped up by
-clicking the \fIProg\fP button in the main window. Currently only \fISelect\fP
-and \fIDismiss\fP buttons are fully functional, and contents of a selected
-program can be viewed (but not modified) by pressing the \fIModify\fP
-button. To select a program, \fBhighlight\fP the desired item and
-click \fISelect\fP. To modify the program list, edit the program file given
-below.
-
-.B "Parameters"
-
-.B Parameters
-are viewed and maintained through the parameter window, which is activated
-by clicking the \fIPara\fP button in the main window. To update a parameter,
-\fBhighlight\fP the item, enter the new value in the text window next
-to the \fIUpdate\fP button, and press \fIUpdate\fP. Following parameters
-are supported:
-
-.IP "\fIReal time (audio on)(tag)\fP"
-Best-effort play mode when this parameter is 0 and video is involved
-in the current program, otherwise real-time play mode. Default: 1,
-range: 0, non-0.
-.IP "\fIVideo max frames-per-second\fP"
-For video programs, real-time mode play speed when speed scale has a
-value of 100. Default: 60, range: > the normal speed.
-.IP "\fIAudio max samples-per-second\fP"
-For audio-only programs, play speed when speed scale has a value of
-100. Default: 16000, range: > the normal speed.
-.IP "\fIFF frames-per-second\fP"
-Fast forward speed. Default: 150, range: > 0.
-.IP "\fIRewind frames-per-second\fP"
-Rewind speed. Default: 150, range: > 0.
-.IP "\fIFeedback delay (msec)\fP"
-Currently not used.
-.IP "\fIAudio output mask\fP"
-Currently not used.
-.IP "\fIAudio_para.encodeType\fP"
-Currently not used.
-.IP "\fIAudio_para.channels\fP"
-Currently not used.
-.IP "\fIAudio_para.samplesPerSecond\fP"
-Currently not used.
-.IP "\fIAudio_para.bytesPerSamples\fP"
-Currently not used.
-.IP "\fIAudio timer interval (millisec)\fP"
-For audio-only programs. Playback
-timer interval in milliseconds. Playback of audio and video is
-driven by a timer in the client. Default: 500, range: > 0.
-.IP "\fIAudio buffered intervals\fP"
-For audio-only programs. This number of timer intervals of audio
-samples are to be buffered in the AudioFile server internal buffer. This
-parameter and the previous one determine how many milliseconds of
-audio samples are to be buffered in AudioFile. Buffering too
-many samples reduces responsiveness, too few may degrade playback
-quality. Default: 2, range: > 0.
-.IP "\fIFrames per audio play\fP"
-For audio+video programs, this parameter determines the ratio of the
-audio timer interval over the video timer interval. Default: 4,
-range: > 0.
-.IP "\fIAudio forward (samples)\fP"
-For audio+video programs, this number of samples of audio is
-played ahead of video stream. This is supposed to compensate the
-delay in AudioFile server. Default: 800, range: > 0.
-.IP "\fIVS work-ahead (milli-seconds)\fP"
-For video program, this number of milli-seconds the player tries to
-keep the video server ahead of the client during playback, rewind and
-fast forward.
-
-If the parameter \fISync effective\fP has a value of non-0, then this
-parameter gives the initial value of the VS work-ahead time, and the
-actual work ahead time is adjusted according to current network delay
-jitter level. If a value less than the default is set, then the
-default instead of the given one is used by the player.
-
-Default: 100, range: >= Default.
-
-.IP "\fIFrame rate limit (fps, float)\fP"
-For video programs. In real-time play mode, if current play speed is
-higher than the value of this parameter, then this
-parameter defines the maximum frame rate the player tries to play.
-Default: 60.0, range: >0.
-.IP "\fICollect statistics(tag)\fP"
-For video programs. If both the server and the client programs are compiled
-with STAT defined, this tag indicates that, at the end of a playback
-session, when \fIStop\fP button is pressed (or in loop-back mode when the
-end of the program is reached) statistics is collected to file
-stat.\fIn\fP in current directory (from which the client is
-invoked). Default: 0, range: 0, non-0.
-.IP "\fICollect video structure info(tag)\fP"
-For video programs. If both the server and the client programs are compiled
-with STAT defined, this tag indicates that, upon successful
-initialization of a video stream, structure information of the MPEG
-stream is collected to a file named struct.\fIn\fP in
-current directory Default: 0, range: 0, non-0.
-.IP "\fISync effective(tag)\fP"
-For video programs, when set, server/client synchronization control is
-effective during playback, rewind and fast forward. Default: 1, range:
-0, non-0.
-.IP "\fIQoS effective(tag)\fP"
-For video programs, when set, automatic frame rate control is
-effective during playback. Default: 1, range: 0, non-0.
-.IP "\fIAudio offset(samples)\fP"
-For audio+video programs. The player assumes that in a program, audio
-and video are recorded strictly synchronously. But it is usually not
-the case, and there is a certain amount of timing shift between audio
-and video. This parameter specifies audio forward offset against video
-in order to compensate the shift. Default: 0, range: integer
-.IP "\fIFilter parameter(1/R or n-samples)\fP"
-Parameter of the filters for client/server synchronization and frame rate
-control. Default: 50, range: > 0.
-.IP "\fIMax send pattern frames\fP"
-This parameter sets the granularity of the frame rate control
-algorithm. Default: 60, range: > 0.
-.IP "\fIReliable byte-stream audio (tag)\fP"
-In the case when the server is on a remote host, when this tag is set,
-the client establishes a TCP connection to the server for shipping
-audio samples, otherwise a UDP is used. The client always setup a TCP
-connection to the server for control messages, no matter what value
-the tag is.
-.IP "\fIReliable byte-stream video (tag)\fP"
-Similar effort as previous tag, but for video channel.
-.IP "\fIVerbose message(tag)\fP"
-If this tag is set, then verbose message is printed (provided that
-command line option \fB-quiet\fP is not specified. Otherwise the
-client will still print some, but less verbose message.
-.PP
-Parameter setting is for experienced user only. It is suggested that
-you leave values of most parameters as default. If you like to change
-some of them, be careful. It may make the player behave improperly. In
-case you made some change, the player fails to work, and you are
-unable to undo the change, delete the parameter file shown below and
-restart the client.
-
-.SH FILES
-
-.IP "\fI($HOME)/.vcr/vcrPrograms\fP"
-Program file. If this file is absent, it is created with a default
-movie list of several basketball game sample movies in it. The movies
-in the default movies list are maintained at CSE OGI. In a movie list
-file, the first line is a banner. Following this line, each contiguous
-four lines describe a movie: video host, MPEG file path, audio host,
-audio file path. You may edit the movie list fileto include any movies
-you like.
-
-.IP "\fI($HOME)/.vcr/vcrParameters\fP"
-Parameter file. When absent, the system default parameter values
-apply. Whenever you update a parameter, this parameter file is also
-created or updated.
-
-.SH KNOWN PROBLEMS
-
-.B "The player stalls"
-when or after playing audio program at very \fBlow speed\fP, or the
-product of \fI(Audio timer interval)\fP and \fI(Audio buffered intervals)\fP
-parameters \fBtoo large\fP, or \fI(Frames per audio play)\fP too
-large. This is because the client tries to put too many audio
-samples to AudioFile each time, blocking itself for output.
-
-In this version of the player, when an video+audio program is played,
-some conditions are checked and low speed limit is enforced. You
-are not able to set too low play speed (even if you set the speed
-slider to 0 position). But the conditions might not be sufficient.
-
-.B "Play at too high speed\fP,"
-or \fI(Audio timer interval)\fP too small, or \fI(Video max
-frames-per-second)\fP, \fI(FF frames-per-second)\fP, or \fI(Rewind
-frames-per-second)\fP too high, presentation quality may be worse than
-expected. This is because of the resolution limit of the UNIX interval
-timer, which is about 10 milliseconds.
-
-.B "When Play speed jump from high to very low\fP,"
-a few seconds of worse-than-expected video presentation quality may be
-experienced. Because at high speed, the video server usually drops
-frames, and play speed changes, the player does not flush the video
-pipeline.
-
-Various problems may be experienced if the \fBparameter\fP values are too
-far from their default. The parameter values are seldomly guarded.
-
-.B "Audio doesn't work when played across the Internet\fP."
-This is because audio is retrieved from the audio server to the
-client via TCP, and the Internet TCP connection fails to provide
-enough (e.g. 8KB/s) sustained bandwidth. In this case, all audio
-samples would be too late showing up at the client, and thus are
-dropped.
-
-.B "X shared memory problem\fP."
-Parts of the user interface may not work correctly when the player
-outputs to X-window via shared memory (with option \fB-shmem\fP). For
-example, some of the buttons may not show up. Usually, the missing
-buttons will show up by iconifying the user interface.
-
-.B "Core dump."
-The player may core dump when playing a specific MPEG stream, at a
-specific position. This may be because the parameters in the MPEG
-stream is out of the ability of the decoder code. Upon core dump, you
-may want to reproduce the problem, and recompile the player with
-option -DNDEBUG, run the player again to see if any assertions fails.
-
-.B "Semaphore or shared memory ids used up\fP."
-When this happens, an error shmget() or semget() is reported by the
-player. This may happen if previous invocation(s) of the player have
-exit abnormally causing core dump, and you try to run the player
-again. Because semaphores and shared memory segments might not be
-reclaimed when the player exits abnormally. You may run the client
-with option \fB\-rmsem\fP to remove all existing semaphores and shared
-memory ids accessable by you. See description of \fB\-rmsem\fP. If
-\fB-rmsem\fP does not work, you may need to use tools like
-\fBipcrm(1)\fP.
-
-.B "Undeleted UNIX socket pathes /tmp/vcrs*\fP"
-Some UNIX socket names may remain in /tmp directory as "vcrs*", if the
-server or the client has terminated abnormally.
-
-.SH BUG REPORT
-
-If you experience problems, look at the above KNOWN PROBLEM section
-first. If the problem is not described, try to reproduce the problem, and
-\fBreport bug\fP to \fBscen@cse.ogi.edu\fP. Thanks.
-
-.SH COPYRIGHT
-
-This software is covered by copyrights. It contains code contributed
-by the author and several other parties. Please see the beginning of
-source files and copyright file(s) in the root directory of the source
-kit.
-
-.SH SEE ALSO
-
-.B "AF\fP(1), \fBX\fP(1)"
-
-.SH AUTHOR
-
- Shanwei Cen
- Department of Computer Science and Engineering
- Oregon Graduate Institute of Science and Technology
- scen@cse.ogi.edu
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1 b/TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1
deleted file mode 100644
index a9769fc8944..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1
+++ /dev/null
@@ -1 +0,0 @@
-.so vcr.1
diff --git a/TAO/orbsvcs/tests/AVStreams/server.cpp b/TAO/orbsvcs/tests/AVStreams/server.cpp
deleted file mode 100644
index 849a7182826..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/tests/AVStreams
-//
-// = FILENAME
-// server.cpp
-//
-// = DESCRIPTION
-// Test server for the AVStreams demo
-//
-// = AUTHORS
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "server.h"
-
-// Callbacks made by the AVStreams library into the application.
-
-Video_Server_StreamEndPoint::Video_Server_StreamEndPoint (void)
-{
-}
-
-void
-Video_Server_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-}
-
-void
-Video_Server_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-}
-
-void
-Video_Server_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-}
-
-CORBA::Boolean
-Video_Server_StreamEndPoint::handle_connection_requested (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 1;
-}
-
-// Main program.
-
-int
-main (int argc, char *argv[])
-{
- TAO_TRY
- {
- TAO_ORB_Manager orb_manager;
-
- // Initialize the ORB.
- orb_manager.init (argc,
- argv,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Create server-side MMDevice.
- TAO_Server_MMDevice <Video_Server_StreamEndPoint> *mmdevice_impl;
- ACE_NEW_RETURN (mmdevice_impl,
- TAO_Server_MMDevice <Video_Server_StreamEndPoint>,
- -1);
- TAO_CHECK_ENV;
-
- // Activate the MMDevice, i.e., register with POA.
- CORBA::String_var s = orb_manager.activate (mmdevice_impl,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Print the IOR.
- ACE_DEBUG ((LM_DEBUG,
- "\nThe IOR is: <%s>\n",
- s.in ()));
-
- // Run the ORB Event loop.
- orb_manager.run (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- TAO_TRY_ENV.print_exception ("System Exception");
- return -1;
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- TAO_TRY_ENV.print_exception ("User Exception");
- return -1;
- }
- TAO_ENDTRY;
- ACE_DEBUG ((LM_DEBUG,
- "\nServer is terminating"));
- return 0;
-}
-
diff --git a/TAO/orbsvcs/tests/AVStreams/server.h b/TAO/orbsvcs/tests/AVStreams/server.h
deleted file mode 100644
index a8222dea9c9..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/server.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/tests/AVStreams
-//
-// = FILENAME
-// server.h
-//
-// = DESCRIPTION
-// Test server for the AVStreams demo
-//
-// = AUTHORS
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (AVSTREAMS_SERVER_H)
-#define AVSTREAMS_SERVER_H
-
-#include "orbsvcs/AV/AVStreams_i.h"
-#include "tao/tao_util.h"
-
-class Video_Server_StreamEndPoint : public virtual TAO_Server_StreamEndPoint
-{
- // = TITLE
- // Server Stream Endpoint for A/V Streams demo.
- //
- // = DESCRIPTION
- // Encapsulates server side transport functionality.
-public:
- Video_Server_StreamEndPoint (void);
- // Constructor.
-
- virtual void handle_stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles stream stoppage.
-
- virtual void handle_start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles stream start. Starts the flow of data.
-
- virtual void handle_destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles the destruction of the stream, tears down the transport.
-
- virtual CORBA::Boolean handle_connection_requested (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Handles stream bind, establishes the transport.
-};
-
-#endif /* AVSTREAMS_SERVER_H */
diff --git a/TAO/orbsvcs/tests/AVStreams/sfp/Makefile b/TAO/orbsvcs/tests/AVStreams/sfp/Makefile
deleted file mode 100644
index 9a73f45dc64..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/sfp/Makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Top-level Makefile for the AVStreams demo of the TAO ORB
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-LDLIBS = -lorbsvcs -lTAO
-
-PROG_SRCS = main.cpp
-
-LSRC = $(PROG_SRCS)
-
-AVStreams_SERVER_OBJS = server.o
-AVStreams_CLIENT_OBJS = client.o
-
-COSPROPERTY_OBJS = main.o
-
-BIN = client
-
-BUILD = $(BIN)
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-server:$(addprefix $(VDIR),$(AVStreams_SERVER_OBJS))
- $(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS)
-
-client:$(addprefix $(VDIR),$(AVStreams_CLIENT_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS)
-
-#main: $(addprefix $(VDIR), $(COSPROPERTY_OBJS))
-# $(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS)
-
-
-realclean: clean
- -/bin/rm -rf
-
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/AVStreams/sfp/client.cpp b/TAO/orbsvcs/tests/AVStreams/sfp/client.cpp
deleted file mode 100644
index 487b644b8ba..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/sfp/client.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-#include "ace/Message_Block.h"
-#include "orbsvcs/AV/sfp.h"
-
-const char *buf = "Hello Worldasdasda sda sdasd adasdaddd\n";
-
-main ()
-{
-
- // ----------------------------------------------------------------------
- // start message
-
- SFP_Encoder encoder;
-
- ACE_Message_Block *start_message =
- encoder.encode_start_message ();
-
- SFP_Decoder decoder;
-
- decoder.decode_start_message (start_message);
-
- // ----------------------------------------------------------------------
- // start reply
-
- ACE_Message_Block *start_reply_message =
- encoder.encode_start_reply_message ();
-
- decoder.decode_start_reply_message (start_reply_message);
-
-
- // ----------------------------------------------------------------------
- // simple frame
-
- ACE_Message_Block *message;
-
- ACE_NEW_RETURN (message,
- ACE_Message_Block (buf),
- -1);
-
- message->length (::strlen (buf));
-
- ACE_Message_Block *mb = encoder.encode_simple_frame (message);
-
- decoder.decode_simple_frame (mb);
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/AVStreams/sfp/svc.conf b/TAO/orbsvcs/tests/AVStreams/sfp/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/sfp/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/tests/AVStreams/svc.conf b/TAO/orbsvcs/tests/AVStreams/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/tests/AVStreams/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/tests/CosPropertyService/Makefile b/TAO/orbsvcs/tests/CosPropertyService/Makefile
deleted file mode 100644
index 277a9044d52..00000000000
--- a/TAO/orbsvcs/tests/CosPropertyService/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-LDLIBS = -lorbsvcs -lTAO
-
-PROG_SRCS = main.cpp
-
-LSRC = $(PROG_SRCS)
-
-#AVStreams_SERVER_OBJS = server.o
-#AVStreams_CLIENT_OBJS = client.o
-
-COSPROPERTY_OBJS = main.o
-
-#BIN = server client
-BIN = main
-BUILD = $(BIN)
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-#server:$(addprefix $(VDIR),$(AVStreams_SERVER_OBJS))
-#$(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#client:$(addprefix $(VDIR),$(AVStreams_CLIENT_OBJS))
-#$(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-main: $(addprefix $(VDIR), $(COSPROPERTY_OBJS))
- $(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-
-realclean: clean
- -/bin/rm -rf
-
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
diff --git a/TAO/orbsvcs/tests/CosPropertyService/main.cpp b/TAO/orbsvcs/tests/CosPropertyService/main.cpp
deleted file mode 100644
index bf7341b1d7a..00000000000
--- a/TAO/orbsvcs/tests/CosPropertyService/main.cpp
+++ /dev/null
@@ -1,591 +0,0 @@
-// $Id$
-
-// =========================================================================================================
-//
-// = FILE
-// Program to test the property services.
-//
-// = DESCRIPTION
-// - Instantiates TAO_PropertySet
-// - Uses the fns implemented
-// - Shows the results
-//
-// = AUTHOR
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// =========================================================================================================
-
-#include "orbsvcs/Property/CosPropertyService_i.h"
-#include "tao/any.h"
-#include "tao/corbacom.h"
-#include "tao/tao_util.h"
-
-class TAO_PropertySet_Tester
-{
- // = TITLE
- // The testing code for the PropertySet interface are grouped
- // under the functions of this class.
- //
- // = DESCRIPTION
- // Go thru the functions to understand the usage of the various
- // methods of the PropertySet interaface.
-public:
- friend class TAO_PropertyNamesIterator_Tester;
- // He has to instantiate TAO_NamesIterator class using the instance
- // of TAO_PropertySet.
-
- TAO_PropertySet_Tester (void);
- // Constructor.
-
- ~TAO_PropertySet_Tester (void);
- // Destructor.
-
- int test_define_property (CORBA::Environment &env);
- // Defines a char,a short, a long, a float and a string property.
-
- int test_get_number_of_properties (CORBA::Environment &env);
- // Gets the number of properties currently defined in the PropertySet.
-
- int test_delete_property (const char *property_name,
- CORBA::Environment &env);
- // Delete a given property.
-
- int test_is_property_defined (CORBA::Environment &env);
- // Check the following properties are defined or
- // no. "char_property", "short_property" and a "string_property".
-
- int test_get_property_value (CORBA::Environment &env);
- // Get the "float_property" and "string_property" and print them
- // out.
-
- int test_delete_properties (CORBA::Environment &env);
- // Delete char, short,long, and string properties.
-
- int test_delete_all_properties (CORBA::Environment &env);
- // Delete all the properties.
-
- int test_define_properties (CORBA::Environment &env);
- // Define a sequence of properties. a char, a short, a long, a float
- // and a string.
-
-private:
- TAO_PropertySet property_set_;
- // The PropertySet.
-};
-
-class TAO_PropertyNamesIterator_Tester
-{
- // = TITLE
- // The testing code for the PropertyNamesIterator interface are grouped
- // under the functions of this class.
- //
- // = DESCRIPTION
- // Go thru the functions to understand the usage of the various
- // methods of the PropertyNamesIterator interaface.
-public:
- TAO_PropertyNamesIterator_Tester (TAO_PropertySet_Tester &propertyset_tester);
- // Constructor. To make names iterator from the property set object.
-
- ~TAO_PropertyNamesIterator_Tester (void);
- // Destructor.
-
- int test_next_one (CORBA::Environment &env);
- // Test next one method. Iterate thru all the names in the
- // PropertySet and print them out.
-
- int test_reset (CORBA::Environment &env);
- // Test the reset method.
-
- int test_next_n (size_t n, CORBA::Environment &env);
- // Test the next_n method.
-private:
- TAO_PropertyNamesIterator iterator_;
- // Our names iterator.
-};
-
-
-// Constructor.
-TAO_PropertySet_Tester::TAO_PropertySet_Tester (void)
-{
-}
-
-// Destructor.
-TAO_PropertySet_Tester::~TAO_PropertySet_Tester (void)
-{
-}
-
-// Defines a char, a short, a long, a float and a string.
-int
-TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking define_property\n"));
-
- CORBA::Any anyval;
-
- // Prepare a char and "define" that in the PropertySet.
- CORBA::Char ch = '#';
- anyval <<= from_char (ch);
- ch = '*';
- anyval >>= to_char (ch);
- ACE_DEBUG ((LM_DEBUG,
- "Main : Char ch = %c\n",
- ch));
- property_set_.define_property ("char_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Prepare a Short and "define" that in the PropertySet.
- CORBA::Short s = 3;
- anyval <<= s;
- s = 7;
- anyval >>= s;
- ACE_DEBUG ((LM_DEBUG,
- "Main : Short s = %d\n",
- s));
- property_set_.define_property ("short_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
-
- // Prepare a Long and "define" that in the PropertySet.
- CORBA::Long l = 931232;
- anyval <<= l;
- l = 931233;
- anyval >>= l;
- ACE_DEBUG ((LM_DEBUG,
- "Main : Long l = %d\n",
- l));
- CORBA::Any newany(anyval);
-
- property_set_.define_property ("long_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Prepare a Float and "define" that in the PropertySet.
- CORBA::Float f = 3.14;
- anyval <<= f;
- f = 4.14;
- anyval >>= f;
- ACE_DEBUG ((LM_DEBUG,
- "Main : Float f = %f\n",
- f));
- property_set_.define_property ("float_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Prepare a String and "define" that in the PropertySet.
- ACE_DEBUG ((LM_DEBUG,
- "Main: Any holding String\n"));
- CORBA::String_var strvar (CORBA::string_dup ("Test_String"));
- anyval <<= strvar.in ();
- CORBA::String newstr;
- anyval >>= newstr;
- ACE_DEBUG ((LM_DEBUG,
- "Main: String : %s, From any : %s\n",
- strvar.in (),
- newstr));
- property_set_.define_property ("string_property",
- anyval,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- return 0;
-}
-
-// Testing, get_number_of_properties.
-int
-TAO_PropertySet_Tester::test_get_number_of_properties (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Main : Number of props : %d\n",
- property_set_.get_number_of_properties (env)));
- TAO_CHECK_ENV_RETURN (env, 1);
-
- return 0;
-}
-
-// Testing the delete_property. Delets property, with the given name,
-// if that exsists.
-int
-TAO_PropertySet_Tester::test_delete_property (const char *property_name,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG, "\nChecking delete_property\n"));
- property_set_.delete_property (property_name,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- return 0;
-}
-
-// Gets the value of "short_property" and "string_property".
-
-int
-TAO_PropertySet_Tester::test_get_property_value (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking get_property_value\n"));
-
- CORBA::Any_ptr anyptr = property_set_.get_property_value ("short_property",
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Get the short value.
- if (anyptr != 0)
- {
- CORBA::Short s;
- *anyptr >>= s;
- ACE_DEBUG ((LM_DEBUG,
- "Short %d\n",
- s));
- }
- else
- ACE_DEBUG ((LM_DEBUG,
- "Short property not found\n"));
- // Get the string.
- anyptr = property_set_.get_property_value ("string_property",
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
- if (anyptr != 0)
- {
- CORBA::String str;
- *anyptr >>= str;
- ACE_DEBUG ((LM_DEBUG,
- "Str %s\n", str));
- }
- else
- ACE_DEBUG ((LM_DEBUG,
- "string_property not found\n"));
- return 0;
-}
-
-// Check the following properties are defined or no. "short_property",
-// "string_property" and "char_property".
-
-int
-TAO_PropertySet_Tester::test_is_property_defined (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking is_property_defined ()\n"));
- if (property_set_.is_property_defined ("short_property",
- env) == CORBA::B_FALSE)
- ACE_DEBUG ((LM_DEBUG,
- "short_property not defined\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "short_property defined\n"));
- TAO_CHECK_ENV_RETURN (env, 1);
- if (property_set_.is_property_defined ("string_property",
- env) == CORBA::B_FALSE)
- ACE_DEBUG ((LM_DEBUG,
- "string_property not defined\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "string_property defined\n"));
- TAO_CHECK_ENV_RETURN (env, 1);
- if (property_set_.is_property_defined ("char_property",
- env) == CORBA::B_FALSE)
- ACE_DEBUG ((LM_DEBUG,
- "char_property not defined\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "char_property defined\n"));
- TAO_CHECK_ENV_RETURN (env, 1);
-
- return 0;
-}
-
-// Make a sequence of property names and delete them from the
-// PropertySet. Deleting char, short, long, float and string
-// properties.
-int
-TAO_PropertySet_Tester::test_delete_properties (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking delete_properties == Deleting a sequence of Properties\n"));
- CosPropertyService::PropertyNames prop_names;
- prop_names.length (4);
- prop_names [0] = CORBA::string_dup ("char_property");
- prop_names [1] = CORBA::string_dup ("short_property");
- prop_names [2] = CORBA::string_dup ("long_property");
- prop_names [3] = CORBA::string_dup ("float_property");
- ACE_DEBUG ((LM_DEBUG,
- "Length of sequence %d, Maxlength : %d\n",
- prop_names.length (),
- prop_names.maximum ()));
- property_set_.delete_properties (prop_names,
- env);
- TAO_CHECK_ENV_RETURN (env, 0);
-
- return 0;
-}
-
-// Defines a sequnce of properties containing, char, short, long,
-// float and string property in the property set.
-int
-TAO_PropertySet_Tester::test_define_properties (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking define_properties == Defining sequence of properties\n"));
- // TAO_TRY
- // {
- CosPropertyService::Properties nproperties;
- nproperties.length (5);
- CORBA::Any anyval;
- // Prepare a char and "define" that in the PropertySet.
- CORBA::Char ch = '#';
- anyval <<= from_char (ch);
- ch = '*';
- anyval >>= to_char (ch);
- nproperties[0].property_name = CORBA::string_copy ("char_property");
- nproperties[0].property_value <<= from_char (ch);
-
- // Prepare a Short and "define" that in the PropertySet.
- CORBA::Short s = 3;
- anyval <<= s;
- s = 7;
- anyval >>= s;
- nproperties[1].property_name = CORBA::string_copy ("short_property");
- nproperties[1].property_value <<= s;
-
- // Prepare a Long and "define" that in the PropertySet.
- CORBA::Long l = 931232;
- anyval <<= l;
- l = 931233;
- anyval >>= l;
- nproperties[2].property_name = CORBA::string_copy ("long_property");
- nproperties[2].property_value <<= l;
-
- // Prepare a Float and "define" that in the PropertySet.
- CORBA::Float f = 3.14;
- anyval <<= f;
- f = 4.14;
- anyval >>= f;
- nproperties[3].property_name = CORBA::string_copy ("float_property");
- nproperties[3].property_value <<= f;
-
- // Prepare a String and "define" that in the PropertySet.
- CORBA::String_var strvar (CORBA::string_dup ("Test_String"));
- anyval <<= strvar.in ();
- nproperties[4].property_name = CORBA::string_copy ("string_property");
- nproperties[4].property_value <<= strvar.in ();
-
- // Define this sequence of properties now.
- property_set_.define_properties (nproperties, env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- return 0;
-}
-
-// Delete all the properties.
-int
-TAO_PropertySet_Tester::test_delete_all_properties (CORBA::Environment &env)
-{
- // Deleting all the properties
- ACE_DEBUG ((LM_DEBUG,
- "\nChecking delete_all_properties\n"));
- if (property_set_.delete_all_properties (env) == CORBA::B_TRUE)
- ACE_DEBUG ((LM_DEBUG,
- "All properties deleted, I guess\n"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "delete_all_properties failed\n"));
- return 0;
-}
-
-// Constructor. To make names iterator from the property set object.
-TAO_PropertyNamesIterator_Tester::TAO_PropertyNamesIterator_Tester (TAO_PropertySet_Tester &propertyset_tester)
- : iterator_ (propertyset_tester.property_set_)
-{
-}
-
-// Destructor.
-TAO_PropertyNamesIterator_Tester::~TAO_PropertyNamesIterator_Tester (void)
-{
-}
-
-// Test next one method. Iterate thru all the names in the
-// PropertySet and print them out.
-int
-TAO_PropertyNamesIterator_Tester::test_next_one (CORBA::Environment &env)
-{
- CORBA::String_var strvar;
- ACE_DEBUG ((LM_DEBUG,
- "\nTesting next_one of NamesIterator, Iterating thru names.\n"));
- // Let us iterate, now.
- while (iterator_.next_one (strvar.out (), env) != CORBA::B_FALSE)
- {
- TAO_CHECK_ENV_RETURN (env, 1);
- ACE_DEBUG ((LM_DEBUG, "Str : %s\n", strvar.in ()));
- }
- return 0;
-}
-
-// Reset the names iterator.
-int
-TAO_PropertyNamesIterator_Tester::test_reset (CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Resetting (reset ()) the NamesIterator."));
- iterator_.reset (env);
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-// Test the next_n method. Get the next n names and print them all.
-int
-TAO_PropertyNamesIterator_Tester::test_next_n (size_t n,
- CORBA::Environment &env)
-{
- CosPropertyService::PropertyNames_var pnames_var;
- ACE_DEBUG ((LM_DEBUG,
- "Checking next_n (), next %d\n",
- n));
- if (iterator_.next_n (n, pnames_var.out (), env) == CORBA::B_FALSE)
- {
- // Return if no more items in the iterator.
- TAO_CHECK_ENV_RETURN (env, 1);
- ACE_DEBUG ((LM_DEBUG,
- "Iterator has no more items\n"));
- return 0;
- }
- TAO_CHECK_ENV_RETURN (env, 1);
- for (size_t i = 0; i < pnames_var.in ().length (); i++)
- ACE_DEBUG ((LM_DEBUG,
- "str %s \n",
- (const char *) pnames_var[i]));
- return 0;
-}
-
-int
-main (int argc, char *argv [])
-{
- TAO_TRY
- {
- CORBA::ORB_var orb_var = CORBA::ORB_init (argc,
- argv,
- "internet",
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // = Checking PropertySet interface.
-
- ACE_DEBUG ((LM_DEBUG,
- "\nTAO_PropertySet Testing\n"));
- TAO_PropertySet_Tester propertyset_tester;
-
- // Checking define_property. define a char, a short,a long, a float
- // and a string.
- propertyset_tester.test_define_property (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test the number of properties and print it out.
- propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test delete property. Delete "string_property"
- propertyset_tester.test_delete_property ("string_property", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test the number of properties and print it out.
- propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test delete_properties. Delete char, short, long and float.
- propertyset_tester.test_delete_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test the number of properties and print it out.
- propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Define a sequence of properties. char, short, long, float and
- // string.
- propertyset_tester.test_define_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test the number of properties and print it out.
- propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Checking get_property_value. get the value of short and string.
- propertyset_tester.test_get_property_value (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Checking delete_all_properties.
- propertyset_tester.test_delete_all_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test the number of properties and print it out.
- propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Define a sequence of properties. char, short, long, float and
- // string.
- propertyset_tester.test_define_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Test the number of properties and print it out.
- propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // = Checking the PropertyNamesIterator interface.
-
- ACE_DEBUG ((LM_DEBUG,
- "\nTAO_PropertyNamesIterator Testing\n"));
-
- // Construct the names iterator from the PropertySet object.
- TAO_PropertyNamesIterator_Tester names_iterator_tester (propertyset_tester);
-
- // Checking next_one. Iterate thru the property names.
- names_iterator_tester.test_next_one (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Checking the reset () method.
- names_iterator_tester.test_reset (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Iterating again thru the property names.
- names_iterator_tester.test_next_one (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Reset again.
- names_iterator_tester.test_reset (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Checking next_n. Prints out all the names it has got.
- names_iterator_tester.test_next_n (6, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Try next_n without resetting.
- names_iterator_tester.test_next_n (6, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- TAO_TRY_ENV.print_exception ("System Exception");
- return -1;
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- TAO_TRY_ENV.print_exception ("User Exception");
- return -1;
- }
- TAO_ENDTRY;
- return 0;
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp
deleted file mode 100644
index 9de9966deaa..00000000000
--- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp
+++ /dev/null
@@ -1,612 +0,0 @@
-//
-// $Id$
-//
-
-#include "ace/Get_Opt.h"
-
-#include "tao/Timeprobe.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event_Service_Constants.h"
-#include "orbsvcs/Scheduler_Factory.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "EC_Multiple.h"
-
-// ************************************************************
-
-EC_Proxy::EC_Proxy (void)
- : consumer_ (this),
- supplier_ (this)
-{
-}
-
-EC_Proxy::~EC_Proxy (void)
-{
-}
-
-int
-EC_Proxy::open (RtecEventChannelAdmin::EventChannel_ptr remote_ec,
- RtecEventChannelAdmin::EventChannel_ptr local_ec,
- const RtecEventChannelAdmin::ConsumerQOS& subscriptions,
- const RtecEventChannelAdmin::SupplierQOS& publications,
- CORBA::Environment &_env)
-{
- ACE_UNUSED_ARG (_env);
-
- TAO_TRY
- {
- // = Connect as a supplier to the local EC
- RtecEventChannelAdmin::SupplierAdmin_var supplier_admin =
- local_ec->for_suppliers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->consumer_proxy_ =
- supplier_admin->obtain_push_consumer (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushSupplier_var supplier_ref =
- this->supplier_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->consumer_proxy_->connect_push_supplier (supplier_ref.in (),
- publications,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin =
- remote_ec->for_consumers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->supplier_proxy_ =
- consumer_admin->obtain_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushConsumer_var consumer_ref =
- this->consumer_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->supplier_proxy_->connect_push_consumer (consumer_ref.in (),
- subscriptions,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("EC_Proxy::open");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-void
-EC_Proxy::disconnect_push_consumer (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Supplier-consumer received disconnect from channel.\n"));
-}
-
-void
-EC_Proxy::disconnect_push_supplier (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Supplier received disconnect from channel.\n"));
-}
-
-void
-EC_Proxy::push (const RtecEventComm::EventSet &events,
- CORBA::Environment & _env)
-{
- // ACE_DEBUG ((LM_DEBUG, "EC_Proxy::push - "));
-
- if (events.length () == 0)
- {
- // ACE_DEBUG ((LM_DEBUG, "no events\n"));
- return;
- }
-
- ACE_DEBUG ((LM_DEBUG, "ECP: %d event(s)\n", events.length ()));
-
- // @@ TODO, there is an extra data copy here, we should do the event
- // modification without it and only compact the necessary events.
- int count = 0;
- RtecEventComm::EventSet out (events.length ());
- for (u_int i = 0; i < events.length (); ++i)
- {
- if (events[i].ttl_ > 0)
- {
- count++;
- out.length (count);
- out[count - 1] = events[i];
- out[count - 1].ttl_--;
- }
- }
-
- if (count > 0)
- {
- this->consumer_proxy_->push (events, _env);
- }
-}
-
-// ****************************************************************
-
-Test_ECP::Test_ECP (void)
- : consumer_ (this),
- supplier_ (this),
- event_a_ (0),
- event_b_ (0),
- event_c_ (0),
- interval_ (250)
-{
-}
-
-int
-Test_ECP::run (int argc, char* argv[])
-{
- TAO_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (this->parse_args (argc, argv))
- return 1;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to get the Naming Service.\n"),
- 1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_Scheduler_Factory::use_config (naming_context.in ());
-
- RtecEventChannelAdmin::EventChannel_var local_ec =
- this->get_ec (naming_context.in (),
- this->lcl_ec_name_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventChannelAdmin::EventChannel_var remote_ec =
- this->get_ec (naming_context.in (),
- this->rmt_ec_name_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (this->connect_supplier (local_ec.in (),
- TAO_TRY_ENV) == -1)
- return 1;
-
- if (this->connect_consumer (local_ec.in (),
- TAO_TRY_ENV) == -1)
- return 1;
-
- if (this->connect_ecp (local_ec.in (),
- remote_ec.in (),
- TAO_TRY_ENV) == -1)
- return 1;
-
- orb->run ();
- }
- TAO_CATCH (CORBA::SystemException, sys_ex)
- {
- TAO_TRY_ENV.print_exception ("SYS_EX");
- }
- TAO_ENDTRY;
- return 0;
-}
-
-RtecEventChannelAdmin::EventChannel_ptr
-Test_ECP::get_ec (CosNaming::NamingContext_ptr naming_context,
- const char* ec_name,
- CORBA::Environment &_env)
-{
- CosNaming::Name channel_name (1);
- channel_name.length (1);
- channel_name[0].id = CORBA::string_dup (ec_name);
-
- CORBA::Object_ptr ec_ptr =
- naming_context->resolve (channel_name, _env);
- if (_env.exception () != 0 || CORBA::is_nil (ec_ptr))
- return RtecEventChannelAdmin::EventChannel::_nil ();
-
- return RtecEventChannelAdmin::EventChannel::_narrow (ec_ptr, _env);
-}
-
-int
-Test_ECP::connect_supplier (RtecEventChannelAdmin::EventChannel_ptr local_ec,
- CORBA::Environment &_env)
-{
- TAO_TRY
- {
- char buf[BUFSIZ];
- ACE_OS::strcpy (buf, "supplier@");
- ACE_OS::strcat (buf, this->lcl_ec_name_);
-
- RtecScheduler::Scheduler_ptr server =
- ACE_Scheduler_Factory::server ();
-
- RtecScheduler::handle_t rt_info =
- server->create (buf, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- server->set (rt_info,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- this->interval_ * 10000, // @@ Make it parametric
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->supplier_id_ = ACE::crc32 (buf);
-
- ACE_SupplierQOS_Factory qos;
- qos.insert (this->supplier_id_,
- ACE_ES_EVENT_UNDEFINED + this->event_a_,
- rt_info, 1);
- qos.insert (this->supplier_id_,
- ACE_ES_EVENT_UNDEFINED + this->event_b_,
- rt_info, 1);
- qos.insert (this->supplier_id_,
- ACE_ES_EVENT_SHUTDOWN,
- rt_info, 1);
-
- RtecEventChannelAdmin::SupplierAdmin_var supplier_admin =
- local_ec->for_suppliers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->consumer_proxy_ =
- supplier_admin->obtain_push_consumer (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushSupplier_var objref =
- this->supplier_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->consumer_proxy_->connect_push_supplier (objref.in (),
- qos.get_SupplierQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_RETHROW_RETURN (-1);
- }
- TAO_ENDTRY;
- return 0;
-}
-
-int
-Test_ECP::connect_consumer (RtecEventChannelAdmin::EventChannel_ptr local_ec,
- CORBA::Environment &_env)
-{
- TAO_TRY
- {
- RtecScheduler::Scheduler_ptr server =
- ACE_Scheduler_Factory::server ();
-
- char buf[BUFSIZ];
- ACE_OS::strcpy (buf, "consumer@");
- ACE_OS::strcat (buf, this->lcl_ec_name_);
-
- RtecScheduler::handle_t rt_info =
- server->create (buf, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- server->set (rt_info,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- this->interval_ * 10000, // @@ Make it parametric
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_Time_Value tv_timeout (0, this->interval_ * 1000);
- TimeBase::TimeT timeout;
- ORBSVCS_Time::Time_Value_to_TimeT (timeout, tv_timeout);
-
- ACE_ConsumerQOS_Factory qos;
- qos.start_disjunction_group ();
- qos.insert_type (ACE_ES_EVENT_SHUTDOWN,
- rt_info);
- qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT,
- timeout,
- rt_info);
- qos.insert_type (ACE_ES_EVENT_UNDEFINED + this->event_a_,
- rt_info);
- qos.insert_type (ACE_ES_EVENT_UNDEFINED + this->event_c_,
- rt_info);
-
- // = Connect as a consumer.
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin =
- local_ec->for_consumers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->supplier_proxy_ =
- consumer_admin->obtain_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushConsumer_var objref =
- this->consumer_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->supplier_proxy_->connect_push_consumer (objref.in (),
- qos.get_ConsumerQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_RETHROW_RETURN (-1);
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-int
-Test_ECP::connect_ecp (RtecEventChannelAdmin::EventChannel_ptr local_ec,
- RtecEventChannelAdmin::EventChannel_ptr remote_ec,
- CORBA::Environment &_env)
-{
- TAO_TRY
- {
- RtecScheduler::Scheduler_ptr server =
- ACE_Scheduler_Factory::server ();
-
- // Generate its ConsumerQOS
- char rmt[BUFSIZ];
- ACE_OS::strcpy (rmt, "ecp@");
- ACE_OS::strcat (rmt, this->rmt_ec_name_);
-
- RtecScheduler::handle_t rmt_info =
- server->create (rmt, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- server->set (rmt_info,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- this->interval_ * 10000,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_ConsumerQOS_Factory consumer_qos;
- consumer_qos.start_disjunction_group ();
- consumer_qos.insert_type (ACE_ES_EVENT_UNDEFINED + this->event_a_,
- rmt_info);
- consumer_qos.insert_type (ACE_ES_EVENT_UNDEFINED + this->event_c_,
- rmt_info);
-
-
- // Generate its SupplierQOS
- char lcl[BUFSIZ];
- ACE_OS::strcpy (lcl, "ecp@");
- ACE_OS::strcat (lcl, this->lcl_ec_name_);
-
- RtecScheduler::handle_t lcl_info =
- server->create (lcl, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- server->set (lcl_info,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- this->interval_ * 10000,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::ULong supplier_id = ACE::crc32 (lcl);
-
- ACE_SupplierQOS_Factory supplier_qos;
- supplier_qos.insert (supplier_id,
- ACE_ES_EVENT_UNDEFINED + this->event_a_,
- lcl_info, 1);
- supplier_qos.insert (supplier_id,
- ACE_ES_EVENT_UNDEFINED + this->event_c_,
- lcl_info, 1);
-
- this->ecp_.open (remote_ec, local_ec,
- consumer_qos.get_ConsumerQOS (),
- supplier_qos.get_SupplierQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_RETHROW_RETURN (-1);
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-void
-Test_ECP::disconnect_push_consumer (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Supplier-consumer received disconnect from channel.\n"));
-}
-
-void
-Test_ECP::disconnect_push_supplier (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Supplier received disconnect from channel.\n"));
-}
-
-void
-Test_ECP::push (const RtecEventComm::EventSet &events,
- CORBA::Environment & _env)
-{
- // ACE_DEBUG ((LM_DEBUG, "EC_Proxy::push - "));
-
- if (events.length () == 0)
- {
- ACE_DEBUG ((LM_DEBUG, "no events\n"));
- return;
- }
-
- ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ()));
-
- for (u_int i = 0; i < events.length (); ++i)
- {
- const RtecEventComm::Event& e = events[i];
- if (e.type_ == ACE_ES_EVENT_INTERVAL_TIMEOUT)
- {
- // Generate some random events (acting as a supplier)...
- int n = 2; // ACE_OS::rand () % 2;
- RtecEventComm::EventSet sent (n);
- sent.length (n);
-
- for (int j = 0; j < n; ++j)
- {
- RtecEventComm::Event& s = sent[j];
- s.source_ = this->supplier_id_;
- s.ttl_ = 1;
-
- // @@ TOTAL HACK
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (s.creation_time_, t);
- s.ec_recv_time_ = ORBSVCS_Time::zero;
- s.ec_send_time_ = ORBSVCS_Time::zero;
-
- s.data_.x = 0;
- s.data_.y = 0;
-
- if (j % 2 == 0)
- {
- // Generate an A event...
- s.type_ = ACE_ES_EVENT_UNDEFINED + this->event_a_;
- }
- else
- {
- s.type_ = ACE_ES_EVENT_UNDEFINED + this->event_b_;
- }
- }
- this->consumer_proxy_->push (sent, _env);
- ACE_DEBUG ((LM_DEBUG, "Sent %d events\n",
- n));
- }
- else if (e.type_ == ACE_ES_EVENT_SHUTDOWN)
- {
- // @@ TODO
- }
- else
- {
- // Print out the events received...
- ACE_DEBUG ((LM_DEBUG, "Received event %d from %04.4x\n",
- e.type_, e.source_));
- }
- }
-}
-
-int
-Test_ECP::parse_args (int argc, char *argv [])
-{
- ACE_Get_Opt get_opt (argc, argv, "l:r:a:b:c:t:");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'l':
- this->lcl_ec_name_ = get_opt.optarg;
- break;
- case 'r':
- this->rmt_ec_name_ = get_opt.optarg;
- break;
- case 'a':
- this->event_a_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'b':
- this->event_b_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'c':
- this->event_c_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case 't':
- this->interval_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-l local_ec_name "
- "-r remote_ec_name "
- "<-a event_type_a> "
- "<-b event_type_b> "
- "<-c event_type_c> "
- "-t event_interval "
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- if (this->event_a_ <= 0
- || this->event_b_ <= 0
- || this->event_c_ <= 0 )
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s: you must specify the event types\n",
- argv[0]));
- return -1;
- }
-
- return 0;
-}
-
-// ****************************************************************
-
-int
-main (int argc, char *argv [])
-{
- Test_ECP test;
- return test.run (argc, argv);
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_PushConsumer_Adapter<Test_ECP>;
-template class ACE_PushSupplier_Adapter<Test_ECP>;
-template class ACE_PushConsumer_Adapter<EC_Proxy>;
-template class ACE_PushSupplier_Adapter<EC_Proxy>;
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_PushConsumer_Adapter<Test_ECP>
-#pragma instantiate ACE_PushSupplier_Adapter<Test_ECP>
-#pragma instantiate ACE_PushConsumer_Adapter<EC_Proxy>
-#pragma instantiate ACE_PushSupplier_Adapter<EC_Proxy>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h
deleted file mode 100644
index 5503863c9be..00000000000
--- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = DESCRIPTION
-// This test attempts to communicate several Event Channels.
-// The test hardcodes all the objects involved (consumers,
-// suppliers, proxies, etc.); the objective is to gain understanding
-// on the architecture needed to exploit locality in the Event
-// cycle, not to provide a definite solution.
-//
-// ============================================================================
-
-#if !defined (EC_MULTIPLE_H)
-#define EC_MULTIPLE_H
-
-#include "ace/SString.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/RtecEventCommS.h"
-#include "orbsvcs/Channel_Clients_T.h"
-
-
-class EC_Proxy
-// = TITLE
-// Event Channel Proxy.
-//
-// = DESCRIPTION
-// This class mediates among two event channels, it connects as a
-// consumer of events with a remote event channel, and as a supplier
-// of events with the local EC.
-// As a consumer it gives a QoS designed to only accept the events
-// in which *local* consumers are interested.
-// Eventually the local EC should create this object and compute its
-// QoS in an automated manner; but this requires some way to filter
-// out the peers registered as consumers, otherwise we will get
-// loops in the QoS graph.
-// It uses exactly the same set of events in the publications list
-// when connected as a supplier.
-//
-// = NOTES
-// An alternative implementation would be to register with the
-// remote EC as a supplier, and then filter on the remote EC, but
-// one of the objectives is to minimize network traffic.
-// On the other hand the events will be pushed to remote consumers,
-// event though they will be dropped upon receipt (due to the TTL
-// field); IMHO this is another suggestion that the EC needs to know
-// (somehow) which consumers are truly its peers in disguise.
-//
-// = ALTERNATIVES
-// Check http://www.cs.wustl.edu/~coryan/Multiple_EC.html for a
-// discussion on that topic.
-//
-{
-public:
- EC_Proxy (void);
- ~EC_Proxy (void);
-
- int open (RtecEventChannelAdmin::EventChannel_ptr remote_ec,
- RtecEventChannelAdmin::EventChannel_ptr local_ec,
- const RtecEventChannelAdmin::ConsumerQOS& subscriptions,
- const RtecEventChannelAdmin::SupplierQOS& publications,
- CORBA::Environment &_env);
- // Establish the connections.
-
- void disconnect_push_supplier (CORBA::Environment &);
- // The channel is disconnecting.
-
- void disconnect_push_consumer (CORBA::Environment &);
- // The channel is disconnecting.
-
- void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
- // This is the Consumer side behavior, it pushes the events to the
- // local event channel.
-
-private:
- ACE_PushConsumer_Adapter<EC_Proxy> consumer_;
- ACE_PushSupplier_Adapter<EC_Proxy> supplier_;
-
- RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_;
- RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
-};
-
-class Test_ECP
-//
-// = TITLE
-// A simple test for the EC_Proxy class.
-//
-// = DESCRIPTION
-// This class is design to exercise several features of the EC_Proxy
-// class and the multiple EC architecture.
-// We want to create two EC, each one having a single supplier and a
-// single consumer.
-// + To test the remote facilities the consumer register for both a
-// local event and a remote one.
-// + To test the remote filtering features the remote consumer only
-// wants one of the local events, and this event is generated less
-// frequently.
-//
-// This class creates the local ECP a consumer and a supplier, it
-// uses the command line to figure the
-//
-{
-public:
- Test_ECP (void);
-
- int run (int argc, char* argv[]);
- // Execute the test.
-
- void disconnect_push_supplier (CORBA::Environment &);
- void disconnect_push_consumer (CORBA::Environment &);
- void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
- // Implement the consumer and supplier upcalls.
-
-
-private:
- int parse_args (int argc, char* argv[]);
-
- RtecEventChannelAdmin::EventChannel_ptr
- get_ec (CosNaming::NamingContext_ptr naming_context,
- const char* ec_name,
- CORBA::Environment &_env);
-
- int connect_supplier (RtecEventChannelAdmin::EventChannel_ptr local_ec,
- CORBA::Environment &_env);
- int connect_consumer (RtecEventChannelAdmin::EventChannel_ptr local_ec,
- CORBA::Environment &_env);
- int connect_ecp (RtecEventChannelAdmin::EventChannel_ptr local_ec,
- RtecEventChannelAdmin::EventChannel_ptr remote_ec,
- CORBA::Environment &_env);
-
-private:
- ACE_PushConsumer_Adapter<Test_ECP> consumer_;
- ACE_PushSupplier_Adapter<Test_ECP> supplier_;
-
- EC_Proxy ecp_;
-
- RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_;
- RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
-
- RtecEventComm::EventSourceID supplier_id_;
-
- char* rmt_ec_name_;
- char* lcl_ec_name_;
-
- int event_a_;
- int event_b_;
- int event_c_;
-
- int interval_;
-};
-
-
-#endif /* EC_MULTIPLE_H */
diff --git a/TAO/orbsvcs/tests/EC_Multiple/Makefile b/TAO/orbsvcs/tests/EC_Multiple/Makefile
deleted file mode 100644
index 02857ff1761..00000000000
--- a/TAO/orbsvcs/tests/EC_Multiple/Makefile
+++ /dev/null
@@ -1,266 +0,0 @@
-# $Id$
-
-BIN = EC_Multiple
-
-BUILD = $(BIN)
-
-EC_MULTIPLE_SRCS= \
- EC_Multiple.cpp
-
-LSRC= \
- $(EC_MULTIPLE_SRCS) \
-
-EC_MULTIPLE_OBJS = $(EC_MULTIPLE_SRCS:.cpp=.o)
-
-LDLIBS= -lorbsvcs -lTAO
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifdef quantify
- CCFLAGS += -Dquantify
- CPPFLAGS += -I/pkg/purify/quantify-2.1-solaris2
-endif # quantify
-
-#### Local rules and variables...
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-# Leave the scheduler output out if this is a config run.
-ifeq ($(runtime),1)
-EC_MULTIPLE_CONFIG_OBJS=EC_Multiple_Scheduler_Runtime.o
-endif # runtime
-
-ifeq ($(probe),1)
- CCFLAGS += -DACE_ENABLE_TIMEPROBES
-endif # probe
-
-EC_Multiple: $(addprefix $(VDIR),$(EC_MULTIPLE_OBJS) $(EC_MULTIPLE_CONFIG_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/EC_Multiple.o .obj/EC_Multiple.so .shobj/EC_Multiple.o .shobj/EC_Multiple.so: EC_Multiple.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(TAO_ROOT)/tao/Timeprobe.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- EC_Multiple.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/EC_Multiple/README b/TAO/orbsvcs/tests/EC_Multiple/README
deleted file mode 100644
index 8b7c3cffb4e..00000000000
--- a/TAO/orbsvcs/tests/EC_Multiple/README
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id$
-
- This test ilustrates how to connect multiple ECs.
-
- The test requires the several other processes are running, the
-user must remember to assign a different port to each one:
-
-$ Naming_Service
-$ Scheduling_Service -ORBport 10030
-
- we must run at least two EC, each one with a different name:
-
-$ Event_Service -ORBport 10040 -n EC1
-$ Event_Service -ORBport 10050 -n EC2
-
- then we run two instances of the test, configuring the events
-that are local, only remote, remote and local:
-
-$ EC_Multiple -ORBport 10060 -l EC1 -r EC2 -a 1 -b 2 -c 3
-$ EC_Multiple -ORBport 10070 -l EC2 -r EC1 -a 4 -b 3 -c 2
-
- In this examples the first test treats EC1 as a local EC, and
-EC2 as remote, it generates events <1> and <2> and listens to events
-<1> and <3>. The second instance treats EC2 as local an EC1 as
-remote, generates events <4> and <3> but listens to <4> and <2>.
-
- Note how this configuration will have pure local events, some
-events that are both local and remote. Right now you have to examine
-the output carefully to notice what is happening.
-
- Another configuration of interest is:
-
-$ EC_Multiple -ORBport 10060 -l EC1 -r EC2 -a 1 -b 2 -c 2
-$ EC_Multiple -ORBport 10070 -l EC2 -r EC1 -a 4 -b 2 -c 2
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp
deleted file mode 100644
index fa075a5c216..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp
+++ /dev/null
@@ -1,926 +0,0 @@
-// $Id$
-
-#include <limits.h>
-#if defined (quantify)
- #include <quantify.h>
-#endif /* quantify */
-
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-#include "ace/Profile_Timer.h"
-
-#include "tao/Timeprobe.h"
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event_Service_Constants.h"
-#include "orbsvcs/Scheduler_Factory.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "Event_Latency.h"
-
-static const char usage [] = "[-? |\n"
-" [-c <consumers> [4]]\n"
-" [-d directly connect all consumers/suppliers\n"
-" [-j to collect jitter statistics]\n"
-" [-m <count> of messages to send [10]]\n"
-" [-s <suppliers>, [1]]\n"
-" [-t <timeout interval>, msec [250]]]";
-
-// Configuration parameters.
-static u_int consumers = 1;
-static u_int suppliers = 1;
-static u_int total_messages = 10;
-static int measure_jitter = 0;
-static u_int timeout_interval = 250; // msec
-
-static int short_circuit_EC = 0;
-static int shutting_down = 0;
-
-// This is global to allow the Supplier to short ciruit the EC
-// and talk directly to consumers. For testing only :-)
-static Latency_Consumer **consumer;
-
-// ************************************************************
-
-Latency_Consumer::Latency_Consumer (const int measure_jitter)
- : measure_jitter_ (measure_jitter),
- min_latency_ (INT_MAX),
- max_latency_ (INT_MIN),
- total_latency_ (0),
- total_pushes_ (0),
- min_to_ec_ (INT_MAX),
- max_to_ec_ (INT_MIN),
- sum_to_ec_ (0),
- min_in_ec_ (INT_MAX),
- max_in_ec_ (INT_MIN),
- sum_in_ec_ (0),
- min_from_ec_ (INT_MAX),
- max_from_ec_ (INT_MIN),
- sum_from_ec_ (0)
-{
-}
-
-int
-Latency_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
- const char *my_name)
-{
- entry_point (my_name);
- TAO_TRY
- {
- RtecScheduler::Scheduler_ptr server =
- ACE_Scheduler_Factory::server ();
-
- rt_info_ =
- server->create (my_name, TAO_TRY_ENV);
- server->set (rt_info_,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- 0,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- TAO_TRY_ENV);
-
- // Create the event that we're registering for.
- ACE_ConsumerQOS_Factory dependencies;
- dependencies.start_disjunction_group ();
- dependencies.insert_type (ACE_ES_EVENT_NOTIFICATION, rt_info_);
- dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_);
-
- this->channel_admin_ = ec;
-
- // = Connect as a consumer.
- this->consumer_admin_ =
- channel_admin_->for_consumers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->suppliers_ =
- consumer_admin_->obtain_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushConsumer_var objref =
- this->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->suppliers_->connect_push_consumer (objref.in (),
- dependencies.get_ConsumerQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Latency_Consumer::open: "
- "subscribe failed.\n"), -1);
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Latency_Consumer::open: "
- "unexpected exception.\n"), -1);
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-void
-Latency_Consumer::disconnect_push_consumer (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG, "Consumer received disconnect from channel.\n"));
-}
-
-void
-Latency_Consumer::push (const RtecEventComm::EventSet &events,
- CORBA::Environment &)
-{
- // ACE_DEBUG ((LM_DEBUG, "Latency_Consumer:push - "));
- ACE_TIMEPROBE ("push event to consumer");
-
- if (events.length () == 0)
- {
- // ACE_DEBUG ((LM_DEBUG, "no events\n"));
- return;
- }
- // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ()));
-
-#if defined (quantify)
- // If measuring jitter, just Quantify the supplier-consumer path.
- if (measure_jitter)
- {
- quantify_stop_recording_data ();
- }
-#endif /* quantify */
-
- for (CORBA::ULong i = 0; i < events.length (); ++i)
- {
- if (events[i].type_ == ACE_ES_EVENT_SHUTDOWN)
- {
- ACE_DEBUG ((LM_DEBUG, "Latency Consumer: received shutdown event\n"));
- this->shutdown ();
- }
- else
- {
- if (measure_jitter_)
- {
- ACE_hrtime_t creation;
- ORBSVCS_Time::TimeT_to_hrtime (creation,
- events[i].creation_time_);
-
- ACE_hrtime_t ec_recv;
- ORBSVCS_Time::TimeT_to_hrtime (ec_recv,
- events[i].ec_recv_time_);
-
- ACE_hrtime_t ec_send;
- ORBSVCS_Time::TimeT_to_hrtime (ec_send,
- events[i].ec_send_time_);
-
- const ACE_hrtime_t now = ACE_OS::gethrtime ();
- const ACE_hrtime_t elapsed = now - creation;
- // Note: the division by 1 provides transparent support of
- // ACE_U_LongLong.
- ACE_Time_Value latency (elapsed / ACE_ONE_SECOND_IN_NSECS,
- (elapsed / 1 % ACE_ONE_SECOND_IN_NSECS) / 1000);
-
- const ACE_hrtime_t to_ec_nsecs = ec_recv - creation;
- ACE_Time_Value to_ec (to_ec_nsecs / ACE_ONE_SECOND_IN_NSECS,
- (to_ec_nsecs / 1 % ACE_ONE_SECOND_IN_NSECS) / 1000);
-
- const ACE_hrtime_t in_ec_nsecs = ec_send - ec_recv;
- ACE_Time_Value in_ec (in_ec_nsecs / ACE_ONE_SECOND_IN_NSECS,
- (in_ec_nsecs / 1 % ACE_ONE_SECOND_IN_NSECS) / 1000);
-
- const ACE_hrtime_t from_ec_nsecs = now - ec_send;
- ACE_Time_Value from_ec (from_ec_nsecs / ACE_ONE_SECOND_IN_NSECS,
- (from_ec_nsecs / 1 % ACE_ONE_SECOND_IN_NSECS) / 1000);
-
- if (! shutting_down)
- {
- ++total_pushes_;
- if (min_latency_ > latency) min_latency_ = latency;
- if (max_latency_ < latency) max_latency_ = latency;
- total_latency_ += latency;
- if (min_to_ec_ > to_ec) min_to_ec_ = to_ec;
- if (max_to_ec_ < to_ec) max_to_ec_ = to_ec;
- sum_to_ec_ += to_ec;
- if (min_in_ec_ > in_ec) min_in_ec_ = in_ec;
- if (max_in_ec_ < in_ec) max_in_ec_ = in_ec;
- sum_in_ec_ += in_ec;
- if (min_from_ec_ > from_ec) min_from_ec_ = from_ec;
- if (max_from_ec_ < from_ec) max_from_ec_ = from_ec;
- sum_from_ec_ += from_ec;
- }
- }
- }
-
- }
-}
-
-void
-Latency_Consumer::shutdown (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) %s shutting down.\n", entry_point ()));
-
- TAO_TRY
- {
- // Disconnect from the push supplier.
- this->suppliers_->disconnect_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "@@ we should shutdown here!!!\n"));
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "(%t) %s Latency_Consumer::shutdown: unexpected exception.\n",
- entry_point ()));
- }
- TAO_ENDTRY;
-}
-
-
-void
-Latency_Consumer::print_stats () /* const */
-{
- if (measure_jitter_)
- {
- double lat_min =
- (min_latency_.sec () * 1000000.0 + min_latency_.usec ()) / 1000.0;
- double lat_max =
- (max_latency_.sec () * 1000000.0 + max_latency_.usec ()) / 1000.0;
- double lat_avg =
- (total_latency_.sec () * 1000000.0 +total_latency_.usec ()) / total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: Latency in msec (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), lat_min, lat_max, lat_avg));
-
- double to_ec_min =
- (min_to_ec_.sec () * 1000000.0 + min_to_ec_.usec ()) / 1000.0;
- double to_ec_max =
- (max_to_ec_.sec () * 1000000.0 + max_to_ec_.usec ()) / 1000.0;
- double to_ec_avg =
- (sum_to_ec_.sec () * 1000000.0 + sum_to_ec_.usec ()) / total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: From test to EC (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), to_ec_min, to_ec_max, to_ec_avg));
-
- double in_ec_min =
- (min_in_ec_.sec () * 1000000.0 + min_in_ec_.usec ()) / 1000.0;
- double in_ec_max =
- (max_in_ec_.sec () * 1000000.0 + max_in_ec_.usec ()) / 1000.0;
- double in_ec_avg =
- (sum_in_ec_.sec () * 1000000.0 + sum_in_ec_.usec ()) / total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: In the EC (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), in_ec_min, in_ec_max, in_ec_avg));
-
- double from_ec_min =
- (min_from_ec_.sec () * 1000000.0 + min_from_ec_.usec ()) / 1000.0;
- double from_ec_max =
- (max_from_ec_.sec () * 1000000.0 + max_from_ec_.usec ()) / 1000.0;
- double from_ec_avg =
- (sum_from_ec_.sec () * 1000000.0 + sum_from_ec_.usec ()) / total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: From EC to test (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), from_ec_min, from_ec_max, from_ec_avg));
-
- }
-}
-
-
-// ************************************************************
-
-Latency_Supplier::Supplier::Supplier (Latency_Supplier* impl)
- : impl_ (impl)
-{
-}
-
-void Latency_Supplier::Supplier::disconnect_push_supplier
- (CORBA::Environment &_env)
-{
- this->impl_->disconnect_push_supplier (_env);
-}
-
-Latency_Supplier::Consumer::Consumer (Latency_Supplier* impl)
- : impl_ (impl)
-{
-}
-
-void Latency_Supplier::Consumer::disconnect_push_consumer
- (CORBA::Environment &_env)
-{
- this->impl_->disconnect_push_consumer (_env);
-}
-
-void Latency_Supplier::Consumer::push
- (const RtecEventComm::EventSet &events,
- CORBA::Environment &_env)
-{
- this->impl_->push (events, _env);
-}
-
-// ************************************************************
-
-Latency_Supplier::Latency_Supplier (const u_int total_messages,
- CORBA::Long supplier_id,
- const int timestamp)
- : total_messages_ (total_messages),
- supplier_id_ (supplier_id),
- timestamp_ (timestamp),
- total_sent_ (0),
- master_ (0),
- supplier_ (new Supplier (this)),
- consumer_ (new Consumer (this))
-{
-}
-
-Latency_Supplier::~Latency_Supplier (void)
-{
- delete this->consumer_;
- delete this->supplier_;
-}
-
-int
-Latency_Supplier::open_supplier (RtecEventChannelAdmin::EventChannel_ptr ec,
- const char *name, int master)
-{
- this->entry_point (name);
- master_ = master;
- TAO_TRY
- {
- this->channel_admin_ = ec;
-
- RtecScheduler::Scheduler_ptr server =
- ACE_Scheduler_Factory::server ();
-
- this->rt_info_ =
- server->create (name, TAO_TRY_ENV);
-
- server->set (rt_info_,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- timeout_interval * 10000,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_SupplierQOS_Factory publications;
- publications.insert (supplier_id_,
- ACE_ES_EVENT_NOTIFICATION,
- rt_info_, 1);
- publications.insert (supplier_id_,
- ACE_ES_EVENT_SHUTDOWN,
- rt_info_, 1);
-
- // = Connect as a supplier.
- this->supplier_admin_ =
- channel_admin_->for_suppliers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->consumers_ =
- supplier_admin_->obtain_push_consumer (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushSupplier_var objref =
- this->supplier_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- consumers_->connect_push_supplier (objref.in (),
- publications.get_SupplierQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Latency_Supplier::open");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-void
-Latency_Supplier::disconnect_push_consumer (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG, "Supplier-consumer received disconnect from channel.\n"));
-}
-
-void
-Latency_Supplier::disconnect_push_supplier (CORBA::Environment &)
-{
- ACE_DEBUG ((LM_DEBUG, "Supplier received disconnect from channel.\n"));
-}
-
-int
-Latency_Supplier::start_generating_events (void)
-{
- const ACE_hrtime_t now = ACE_OS::gethrtime ();
- test_start_time_.set (now / 1000000000, (now / 1 % 1000000000) / 1000);
-
- TAO_TRY
- {
- ACE_Time_Value tv_timeout (0, timeout_interval * 1000);
- TimeBase::TimeT timeout;
- ORBSVCS_Time::Time_Value_to_TimeT (timeout, tv_timeout);
-
- ACE_DEBUG ((LM_DEBUG,
- "start generating events: "
- "timeout.low = %d "
- "timeout.high = %d "
- "interval = %d "
- "tv.msec () = %d\n",
- timeout.low,
- timeout.high,
- timeout_interval,
- tv_timeout.msec ()));
-
- ACE_ConsumerQOS_Factory dependencies;
- dependencies.start_disjunction_group ();
- dependencies.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT,
- timeout,
- rt_info_);
- if (!master_)
- dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_);
-
- // = Connect as a consumer.
- consumer_admin_ =
- channel_admin_->for_consumers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- suppliers_ =
- consumer_admin_->obtain_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventComm::PushConsumer_var objref =
- this->consumer_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->suppliers_->connect_push_consumer (objref.in (),
- dependencies.get_ConsumerQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Latency_Supplier::generate_events:"
- " unexpected exception.\n"), -1);
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-void
-Latency_Supplier::push (const RtecEventComm::EventSet &events,
- CORBA::Environment & _env)
-{
- // ACE_DEBUG ((LM_DEBUG, "Latency_Supplier::push - "));
- ACE_UNUSED_ARG (_env);
-
- if (events.length () == 0)
- {
- // ACE_DEBUG ((LM_DEBUG, "no events\n"));
- return;
- }
-
- // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ()));
-
- for (CORBA::ULong i = 0; i < events.length (); ++i)
- {
- if (!master_ && events[i].type_ == ACE_ES_EVENT_SHUTDOWN)
- {
- ACE_DEBUG ((LM_DEBUG, "Latency Supplier: received shutdown event\n"));
- this->shutdown ();
- }
- else if (events[i].type_ == ACE_ES_EVENT_INTERVAL_TIMEOUT)
- {
- // Create the event to send.
- RtecEventComm::Event event;
- event.source_ = supplier_id_;
- event.type_ = ACE_ES_EVENT_NOTIFICATION;
- ++total_sent_;
-
- if (timestamp_)
- {
- // @@ David, event.time_ is now a long. I'm not sure if
- // this calculation is correct now. For the moment beign
- // I use a global variable instead.
- // const ACE_hrtime_t now = ACE_OS::gethrtime ();
- // event.time_.set (now / ACE_ONE_SECOND_IN_NSECS,
- // (now % ACE_ONE_SECOND_IN_NSECS) / 1000);
-
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (event.creation_time_, t);
- }
-
- // @@ ACE_TIMEPROBE_RESET;
- // @@ ACE_TIMEPROBE ("start with new event in Supplier");
-
- TAO_TRY
- {
- if (short_circuit_EC)
- {
- for (u_int cons = 0; cons < consumers; ++cons)
- {
- // This constructor is fast.
- const RtecEventComm::EventSet es (1, 1, &event);
- consumer [cons]->push (es, TAO_TRY_ENV);
- }
- }
- else
- {
-#if defined (quantify)
- // If measuring jitter, just Quantify the supplier-consumer path.
- if (measure_jitter)
- {
- quantify_start_recording_data ();
- }
-#endif /* quantify */
-
- ACE_TIMEPROBE (" supplier starts pushing event");
-
- RtecEventComm::EventSet events (1);
- events.length (1);
- events[0] = event;
- consumers_->push (events, TAO_TRY_ENV);
-
- ACE_TIMEPROBE (" supplier ends pushing event");
- }
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::push:"
- " unexpected exception.\n",
- entry_point ()));
- }
- TAO_ENDTRY;
-
- // Check if we're done.
- if (master_ && (total_sent_ >= total_messages_))
- this->shutdown ();
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "(%t) %s received unexpected events: ",
- entry_point ()));
- // ::dump_sequence (events);
- return;
- }
- }
-}
-
-void
-Latency_Supplier::shutdown (void)
-{
- shutting_down = 1;
-
- #if defined (quantify)
- // Need to stop recording here even if testing for jitter, because
- // recording is still probably enabled.
- quantify_stop_recording_data ();
- if (! measure_jitter)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) stopped Quantify recording\n"));
- }
- #endif /* quantify */
-
- const ACE_hrtime_t now = ACE_OS::gethrtime ();
- test_stop_time_.set (now / ACE_ONE_SECOND_IN_NSECS,
- (now / 1 % ACE_ONE_SECOND_IN_NSECS) / 1000);
-
- static int total_iterations = 1;
- if (--total_iterations > 0)
- {
- total_sent_ = 0;
- return;
- }
-
- TAO_TRY
- {
- if (master_)
- {
- // Create the shutdown message.
- RtecEventComm::Event event;
- event.source_ = supplier_id_;
- event.type_ = ACE_ES_EVENT_SHUTDOWN;
-
- // Push the shutdown event.
- RtecEventComm::EventSet events (1);
- events.length (1);
- events[0] = event;
- consumers_->push (events, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
-
- // Disconnect from the channel.
- consumers_->disconnect_push_consumer (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Disconnect from the push supplier.
- suppliers_->disconnect_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (master_)
- {
- // @@ TODO: Do this portably (keeping the ORB_ptr returned from
- // ORB_init)
- channel_admin_->destroy (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- TAO_ORB_Core_instance ()->orb ()->shutdown ();
- }
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::shutdown:"
- " unexpected exception.\n",
- entry_point ()));
- TAO_TRY_ENV.print_exception ("Latency_Supplier::shutdown");
- }
- TAO_ENDTRY;
-}
-
-
-void
-Latency_Supplier::print_stats () /* const */
-{
- ACE_Time_Value test_elapsed_time (test_stop_time_ - test_start_time_);
- const u_int elapsed = test_elapsed_time.sec () * 1000000 +
- test_elapsed_time.usec (); // usec
-
- ACE_DEBUG ((LM_TRACE,
- "%s: delivered %u events to %u consumer(s) in %u msec;\n"
- " per-event average was %8.3f msec.\n",
- entry_point (),
- total_sent_,
- consumers / suppliers + consumers % suppliers,
- elapsed / 1000,
- (double) elapsed / total_sent_ / 1000.0));
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// function get_options
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-static
-unsigned int
-get_options (int argc, char *argv [])
-{
- ACE_Get_Opt get_opt (argc, argv, "Oc:djm:s:t:?");
- int opt;
- int temp;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt) {
- case 'c':
- if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
- {
- consumers = (u_int) temp;
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: number of consumers must be > 0",
- argv[0]), 1);
- }
- break;
- case 'd':
- short_circuit_EC = 1;
- break;
- case 'j':
- measure_jitter = 1;
- break;
- case 'm':
- if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
- {
- total_messages = (u_int) temp;
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: count must be > 0",
- argv[0]), 1);
- }
- break;
- case 's':
- if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
- {
- suppliers = (u_int) temp;
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: number of suppliers must be > 0",
- argv[0]), 1);
- }
- break;
- case 't':
- if (ACE_OS::atoi (get_opt.optarg) >= 0)
- {
- timeout_interval = ACE_OS::atoi (get_opt.optarg);
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: timeout must be >= 0",
- argv[0]), 1);
- }
- break;
- case '?':
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s %s\n",
- argv[0], usage));
- ACE_OS::exit (0);
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: unknown arg, -%c\n"
- "Usage: %s %s\n",
- argv[0], char(opt),
- argv[0], usage), 1);
- }
- }
-
- if (argc != get_opt.optind)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: too many arguments\n"
- "Usage: %s %s\n",
- argv[0], argv[0], usage), 1);
- }
-
- return 0;
-}
-
-//
-// function main
-//
-int
-main (int argc, char *argv [])
-{
- if (ACE_OS::sched_params (
- ACE_Sched_Params (
- ACE_SCHED_FIFO,
- ACE_Sched_Params::priority_min (ACE_SCHED_FIFO),
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_MAX, "Latency: user is not superuser, "
- "so remain in time-sharing class\n"));
- }
- else
- {
- ACE_DEBUG ((LM_ERROR, "%p\n", "Latency"));
- }
- }
-
- u_int i;
-
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to get the Naming Service.\n"),
- 1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_Scheduler_Factory::use_config (naming_context.in ());
-
- if (get_options (argc, argv))
- ACE_OS::exit (-1);
-
- // Allocate the timeprobe instance now, so we don't measure
- // the cost of doing it later.
- ACE_TIMEPROBE_RESET;
-
- CosNaming::Name channel_name (1);
- channel_name.length (1);
- channel_name[0].id = CORBA::string_dup ("EventService");
-
- CORBA::Object_var ec_obj =
- naming_context->resolve (channel_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- RtecEventChannelAdmin::EventChannel_var ec =
- RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Create supplier(s).
- Latency_Supplier **supplier;
- ACE_NEW_RETURN (supplier, Latency_Supplier *[suppliers], -1);
- for (i = 0; i < suppliers; ++i)
- {
- int supplier_timestamps = (i==0);
- ACE_NEW_RETURN (supplier [i],
- Latency_Supplier (total_messages,
- measure_jitter,
- supplier_timestamps),
- -1);
- char supplier_name [BUFSIZ];
- sprintf (supplier_name, "supplier-%d", i+1);
- // Only the first supplier timestamps its messages.
- int master = (i==0);
- if (supplier [i]->open_supplier (ec.ptr (),
- supplier_name,
- master) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Supplier open failed.\n"), -1);
- }
-
- // Create consumers.
- ACE_NEW_RETURN (consumer, Latency_Consumer *[consumers], -1);
- for (i = 0; i < consumers; ++i)
- {
- ACE_NEW_RETURN (consumer [i], Latency_Consumer (measure_jitter), -1);
- char buf [BUFSIZ];
- sprintf (buf, "consumer-%d", i+1);
-
- if (consumer [i]->open_consumer (ec.ptr (), buf) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Someone was feeling introverted.\n"),
- -1);
- }
-
- #if defined (quantify)
- if (! measure_jitter)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) start Quantify recording\n"));
- quantify_start_recording_data ();
- }
- #endif /* quantify */
-
- // Tell supplier(s) to generate events.
- for (i = 0; i < suppliers; ++i)
- {
- if (supplier [i]->start_generating_events () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "generate_events failed.\n"), -1);
- }
-
- orb->run ();
-
- for (i = 0; i < suppliers; ++i)
- {
- supplier [i]->print_stats ();
- delete supplier[i];
- TAO_CHECK_ENV;
- }
- delete [] supplier;
-
- for (i = 0; i < consumers; ++i)
- {
- consumer [i]->print_stats ();
- delete consumer [i];
- TAO_CHECK_ENV;
- }
- delete [] consumer;
-
- ACE_TIMEPROBE_PRINT;
- ACE_TIMEPROBE_FINI;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SYS_EX");
- }
- TAO_ENDTRY;
-
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp
deleted file mode 100644
index 4c6e04cfa4f..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp
+++ /dev/null
@@ -1,103 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Event_Latency" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Event_Latency - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Latency.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Latency.mak" CFG="Event_Latency - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Event_Latency - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Event_Latency - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Event_Latency - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "Event_Latency - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /I "..\..\.." /I "..\..\..\.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Event_Latency - Win32 Release"
-# Name "Event_Latency - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Latency.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Latency.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw
deleted file mode 100644
index 97233be6dbc..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Event_Latency"=.\Event_Latency.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h
deleted file mode 100644
index 45efe67da1c..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE Event Service Benchmarks
-//
-// = FILENAME
-// Latency.h
-//
-// = AUTHOR
-// David Levine (levine@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-//
-// ============================================================================
-
-#if !defined (EVENT_LATENCY_H)
-#define EVENT_LATENCY_H
-
-#include "ace/SString.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/RtecEventCommS.h"
-
-class Latency_Consumer : public POA_RtecEventComm::PushConsumer
-// = TITLE
-// Latency Consumer
-//
-// = DESCRIPTION
-// Simple example of a consumer that registers for supplier
-// notifications.
-{
-public:
- Latency_Consumer (const int measure_jitter = 0);
- // Construction. The default of not measuring jitter provides
- // a "null" push routine, for measuring aggregate timing.
-
- int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
- const char *my_name);
- // Uses the name server to obtain a reference to the <supplier_name>
- // and registers with channel to receive notifications from the
- // supplier. Also registers to receive shutdown messages from the
- // supplier. Stores <my_name> for printing out messages. Returns 0
- // on success, -1 on failure.
-
- virtual void disconnect_push_consumer (CORBA::Environment &);
- // The channel is disconnecting.
-
- void entry_point (const char*);
- const char *entry_point () const;
-
- void print_stats () /* const */;
- // Print timing statistics.
-
-// (not protected to allow short-circuiting) protected:
- virtual void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
- // If the <events>[0] is a notification, prints out the data from
- // the supplier. If its a shutdown message, the consumer
- // disconnects from the channel.
-
-protected:
- void shutdown (void);
- // Disconnect from the Event Service.
-
- // = Event channel adminstration references.
- RtecEventChannelAdmin::EventChannel_var channel_admin_;
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
- RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_;
-
-private:
- RtecScheduler::handle_t rt_info_;
-
- int measure_jitter_;
-
- ACE_Time_Value min_latency_;
- ACE_Time_Value max_latency_;
- ACE_Time_Value total_latency_;
- u_long total_pushes_;
- // Registers and counters for keeping track of latency statistics.
-
- ACE_Time_Value min_to_ec_;
- ACE_Time_Value max_to_ec_;
- ACE_Time_Value sum_to_ec_;
- // Statitics on time to get to the EC.
-
- ACE_Time_Value min_in_ec_;
- ACE_Time_Value max_in_ec_;
- ACE_Time_Value sum_in_ec_;
- // Statitics on time spent in the EC.
-
- ACE_Time_Value min_from_ec_;
- ACE_Time_Value max_from_ec_;
- ACE_Time_Value sum_from_ec_;
- // Statitics on time spent since the EC put the event on the wire
- // and it gets here.
-
- ACE_CString entry_point_;
-};
-
-// ************************************************************
-
-class Latency_Supplier
-// = TITLE
-// Latency Supplier
-//
-// = DESCRIPTION
-// Generates event nofications and a shutdown message.
-{
-public:
-
- //
- // This class provides IS-A Consumer and Supplier of events. But
- // inheritance from two skeleton classes is non-complaint (or at
- // least won't work with TAO). We use smaller implementation classes
- // that delegate on Latency_Supplier to do the job.
- //
- class Supplier : public POA_RtecEventComm::PushSupplier {
- public:
- virtual void disconnect_push_supplier (CORBA::Environment &);
- // The channel is disconnecting.
-
- private:
- Supplier (Latency_Supplier* impl);
- friend class Latency_Supplier;
-
- private:
- Latency_Supplier* impl_;
- };
-
- class Consumer : public POA_RtecEventComm::PushConsumer {
- public:
- virtual void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
- // The channel pushed some events to us.
-
- virtual void disconnect_push_consumer (CORBA::Environment &);
- // The channel is disconnecting.
-
- private:
- Consumer (Latency_Supplier* impl);
- friend class Latency_Supplier;
-
- private:
- Latency_Supplier* impl_;
- };
-
- Latency_Supplier (const u_int total_messages,
- CORBA::Long supplier_id,
- const int timestamp = 0);
- // Construction. Requires the total number of messages to be
- // sent. If the timestamp flag is enabled, then events are
- // timestamped, e.g., for use in measuring jitter.
-
- ~Latency_Supplier (void);
-
- int open_supplier (RtecEventChannelAdmin::EventChannel_ptr event_channel,
- const char *name, int master);
- // Registers with the name server under the given <name>. Also
- // connects to the Event Channel as a supplier of notifications and
- // shutdown messages. If <master> != 0, then the supplier will
- // destroy the channel upon shutting down. Returns 0 on success, -1
- // on failure.
-
- void disconnect_push_supplier (CORBA::Environment &);
- // The channel is disconnecting.
-
- void disconnect_push_consumer (CORBA::Environment &);
- // The channel is disconnecting.
-
- void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
- // Takes a timestamp and then pushes event_ to all consumers, either
- // directly, or via a channel.
-
- int start_generating_events (void);
- // Called when the supplier should start generating events.
- // Registers with the Event Channel to receive timeouts every .25
- // seconds. Will generate some number of events and then send a
- // shutdown message. Returns 0 on success, -1 on failure.
-
- void entry_point (const char *);
- const char *entry_point () const;
-
- void print_stats () /* const */;
- // Print timing statistics.
-
-protected:
-
- void shutdown (void);
- // Disconnect from the Event Service.
-
- // = Event Channel adminstration references.
- RtecEventChannelAdmin::EventChannel_var channel_admin_;
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
- RtecEventChannelAdmin::ProxyPushConsumer_var consumers_;
- RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_;
- RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_;
-
-private:
- RtecScheduler::handle_t rt_info_;
-
- u_int total_messages_;
- // How many events to push before ending the test.
-
- CORBA::Long supplier_id_;
- // Our supplier ID.
-
- int timestamp_;
- // Flag indicating whether or not to timestamp outgoing events.
-
- u_int total_sent_;
- // How many events we've pushed.
-
- ACE_Time_Value test_start_time_;
- ACE_Time_Value test_stop_time_;
- // Start/stop times, marking the time period when events are
- // sent to consumers.
-
- int master_;
-
- ACE_CString entry_point_;
-
- Supplier* supplier_;
- Consumer* consumer_;
-};
-
-void Latency_Consumer::entry_point(const char* s)
-{
- entry_point_ = s;
-}
-
-const char* Latency_Consumer::entry_point (void) const
-{
- return entry_point_.fast_rep ();
-}
-
-void Latency_Supplier::entry_point(const char* s)
-{
- entry_point_ = s;
-}
-
-const char* Latency_Supplier::entry_point (void) const
-{
- return entry_point_.fast_rep ();
-}
-
-#endif /* EVENT_LATENCY_H */
diff --git a/TAO/orbsvcs/tests/Event_Latency/Makefile b/TAO/orbsvcs/tests/Event_Latency/Makefile
deleted file mode 100644
index 078fbe5049b..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Makefile
+++ /dev/null
@@ -1,270 +0,0 @@
-# $Id$
-
-BIN = Event_Latency
-
-BUILD = $(BIN)
-
-EVENT_LATENCY_SRCS= \
- Event_Latency.cpp
-
-LSRC= \
- $(EVENT_LATENCY_SRCS) \
-
-EVENT_LATENCY_OBJS = $(EVENT_LATENCY_SRCS:.cpp=.o)
-
-LDLIBS= -lorbsvcs -lTAO
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifdef quantify
- CCFLAGS += -Dquantify
- CPPFLAGS += -I/pkg/purify/quantify-2.1-solaris2
-endif # quantify
-
-#### Local rules and variables...
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-# Leave the scheduler output out if this is a config run.
-ifeq ($(runtime),1)
-EVENT_LATENCY_CONFIG_OBJS=Event_Latency_Scheduler_Runtime.o
-endif # runtime
-
-ifeq ($(probe),1)
- CCFLAGS += -DACE_ENABLE_TIMEPROBES
-endif # probe
-
-Event_Latency: $(addprefix $(VDIR),$(EVENT_LATENCY_OBJS) $(EVENT_LATENCY_CONFIG_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/Event_Latency.o .obj/Event_Latency.so .shobj/Event_Latency.o .shobj/Event_Latency.so: Event_Latency.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(ACE_ROOT)/ace/Profile_Timer.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Profile_Timer.i \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(TAO_ROOT)/tao/Timeprobe.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- Event_Latency.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/Event_Latency/svc.conf b/TAO/orbsvcs/tests/Event_Latency/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/tests/Logger/Logger.dsw b/TAO/orbsvcs/tests/Logger/Logger.dsw
deleted file mode 100644
index f6006d20cb7..00000000000
--- a/TAO/orbsvcs/tests/Logger/Logger.dsw
+++ /dev/null
@@ -1,41 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "client"=.\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "server"=.\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/tests/Logger/Makefile b/TAO/orbsvcs/tests/Logger/Makefile
deleted file mode 100644
index 6772bdf0352..00000000000
--- a/TAO/orbsvcs/tests/Logger/Makefile
+++ /dev/null
@@ -1,271 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Top-level Makefile for the Logger Service of the TAO ORB
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif # ! TAO_ROOT
-
-LDLIBS = -lorbsvcs -lTAO
-
-PROG_SRCS = logger_i.cpp
-
-LSRC = $(PROG_SRCS)
-
-logger_SVR_OBJS = svr.o logger_i.o
-logger_CLT_OBJS = clnt.o
-
-BIN = svr clnt
-BUILD = $(BIN)
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-svr: $(addprefix $(VDIR),$(logger_SVR_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-clnt: $(addprefix $(VDIR),$(logger_CLT_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-########
-# Sanity check builds by running basic functionality tests.
-#
-# "sleep 5" in the server startup is usually enough to get the
-# objref into the file so the client can read it.
-#
-check: $(TESTS)
- @echo "testing with 'cube' calls, stub + DII, IOR strings"
- @./svr -i30 -o non-internet > obj.1 & sleep 5
- @./clnt -n250 -O `cat obj.1` -x
- @echo ''
- @echo "testing request forwarding with 'cube' calls, stub + DII"
- @./svr -f -i30 > obj.2 & sleep 5
- @./clnt -n250 -O `cat obj.2` -x
- @echo ''
- @echo "testing transmission of primitive data types"
- @./test1_svr -i30 > obj.3 & sleep 5
- @./test1_clnt -n50 -O `cat obj.3` -x
- @echo ''
-# @echo "testing echo of primitive data values"
-# @./echo_svr -i30 > obj.4 & sleep 5
-# @./echo_clnt -O `cat obj.4` -x
-# @echo ''
- @echo "testing with 'cube' calls, MT-ized (no forwarding)"
- @./svr -t -i30 -o non-internet > obj.5 & sleep 5
- @./clnt -n250 -O `cat obj.5` -x
- @echo ''
-
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf loggerC.* loggerS.*
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/logger_i.o .obj/logger_i.so .shobj/logger_i.o .shobj/logger_i.so: logger_i.cpp \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerC.i \
- logger_i.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerS.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/Logger/client.dsp b/TAO/orbsvcs/tests/Logger/client.dsp
deleted file mode 100644
index b09e5bbd7ae..00000000000
--- a/TAO/orbsvcs/tests/Logger/client.dsp
+++ /dev/null
@@ -1,89 +0,0 @@
-# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=client - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\..\.." /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\.." /I "..\..\.." /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "client - Win32 Release"
-# Name "client - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\clnt.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/Logger/clnt.cpp b/TAO/orbsvcs/tests/Logger/clnt.cpp
deleted file mode 100644
index 76bffe1ae75..00000000000
--- a/TAO/orbsvcs/tests/Logger/clnt.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/bin/Logger
-//
-// = FILENAME
-// clnt.cpp
-//
-// = DESCRIPTION
-// This program tests an implementation of a logger service. It uses the
-// Logger_Factory server to create a number of logger objects. It then
-// uses their object references to test functions supported by the
-// logger server.
-//
-// = AUTHORS
-// Sergio Flores-Gaitan
-//
-// ============================================================================
-
-#include "ace/INET_Addr.h"
-#include "ace/SOCK_Dgram_Mcast.h"
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/LoggerC.h"
-#include "clnt.h"
-
-// constructor
-
-Logger_Client::Logger_Client (void)
- : test_nesting_ (0)
-{
-}
-
-// Parses the command line arguments and returns an error status.
-
-int
-Logger_Client::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "dn");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- break;
- case 'n':
- this->test_nesting_++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-n]"
- "\n"
- " -d: increase debug level\n"
- " -n: test nesting in Naming Service\n",
- this->argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-// Execute client example code.
-
-int
-Logger_Client::run (void)
-{
- TAO_TRY
- {
- CORBA::String_var msg1 =
- CORBA::string_copy ("Logging at logger 1");
- this->logger_1_->log (msg1.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::String_var msg2 =
- CORBA::string_copy ("Logging at logger 2");
- this->logger_2_->log (msg2.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("run");
- return -1;
- }
- TAO_ENDTRY;
- return 0;
-}
-
-Logger_Client::~Logger_Client (void)
-{
-}
-
-int
-Logger_Client::init (int argc, char **argv)
-{
- this->argc_ = argc;
- this->argv_ = argv;
-
- TAO_TRY
- {
- // Initialize ORB.
- this->orb_ =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- this->orb_->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- -1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "Obtained naming_context\n"));
-
- // Parse command line and verify parameters.
- if (this->parse_args () == -1)
- return -1;
-
- CosNaming::Name factory_name(1);
- factory_name.length (1);
- factory_name[0].id = CORBA::string_dup ("logger_factory");
-
- CORBA::Object_var factory_ref =
- naming_context->resolve (factory_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- /// The following resolve() must fail with an exception.
-
- CosNaming::Name factory_name2(1);
- factory_name2.length (1);
- factory_name2[0].id = CORBA::string_dup ("logger_factory2");
-
- CORBA::Object_var factory_ref2 =
- naming_context->resolve (factory_name2, TAO_TRY_ENV);
-
- if (TAO_TRY_ENV.exception ())
- {
- CosNaming::NamingContext::NotFound_ptr ex;
- ex = CosNaming::NamingContext::NotFound::_narrow (TAO_TRY_ENV.exception ());
- if (ex != 0)
- TAO_TRY_ENV.print_exception ("Negative test case for name not found, succeeded\n");
- else
- TAO_TRY_ENV.print_exception ("Negative test case for name not found, FAILED!\n");
- }
-
- if (CORBA::is_nil (factory_ref.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, "resolved to nil object"), -1);
-
- ACE_DEBUG ((LM_DEBUG, "Logger_Factory resolved\n"));
-
- Logger_Factory_var factory =
- Logger_Factory::_narrow (factory_ref.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (CORBA::is_nil (factory.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, "narrow returned nil"), -1);
-
- ACE_DEBUG ((LM_DEBUG, "Logger_Factory narrowed\n"));
-
- CORBA::String_var str =
- this->orb_->object_to_string (factory.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "The factory IOR is <%s>\n", str.in ()));
-
- // Now retrieve the Logger obj ref corresponding to key1 and key2
- this->logger_1_ = factory->make_logger ("key1", TAO_TRY_ENV);
- TAO_CHECK_ENV;
- this->logger_2_ = factory->make_logger ("key2", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "Created two loggers"));
-
- if (CORBA::is_nil (this->logger_1_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, "nil logger1"), -1);
-
- if (CORBA::is_nil (this->logger_2_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, "nil logger2"), -1);
-
- ACE_DEBUG ((LM_DEBUG, "Created two loggers\n"));
-
- if (this->test_nesting_)
- {
- CosNaming::Name nested(1);
- nested.length (1);
- nested[0].id = CORBA::string_dup ("my_naming_context_1");
-
- CosNaming::NamingContext_var nc1 =
- naming_context->bind_new_context (nested, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (CORBA::is_nil (nc1.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, "nil nested context"), -1);
-
- ACE_DEBUG ((LM_DEBUG, "Nested naming context created\n"));
-
- CosNaming::Name logger1_name (1);
- logger1_name.length (1);
- logger1_name[0].id = CORBA::string_dup ("logger_1_");
- nc1->bind (logger1_name, this->logger_1_.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "Bind in nested context succeded\n"));
-
- nc1->unbind (logger1_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "Unbind in nested context succeded\n"));
-
- // destroy the naming context created above.
- nc1->destroy (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "destroy of nested context succeded\n"));
- }
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("init");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-// This function runs the test.
-
-int
-main (int argc, char **argv)
-{
- Logger_Client logger_client;
-
- if (logger_client.init (argc, argv) != 0)
- return 1;
-
- return logger_client.run ();
-}
diff --git a/TAO/orbsvcs/tests/Logger/clnt.h b/TAO/orbsvcs/tests/Logger/clnt.h
deleted file mode 100644
index f7acdf7ef5b..00000000000
--- a/TAO/orbsvcs/tests/Logger/clnt.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/bin/Logger
-//
-// = FILENAME
-// clnt.h
-//
-// = DESCRIPTION
-// This program tests an implementation of a logger service. It uses the
-// Logger_Factory server to create a number of logger objects. It then
-// uses their object references to test functions supported by the
-// logger server.
-//
-// = AUTHORS
-// Sergio Flores-Gaitan
-//
-// ============================================================================
-
-
-#include "ace/Get_Opt.h"
-#include "tao/corba.h"
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/LoggerC.h"
-
-class Logger_Client
- // = TITLE
- // Defines a class that encapsulates behaviour of the Logger client
- // example. Provides a better understanding of the logic in an
- // object oriented way.
- //
- // = DESCRIPTION
- // This class declares an interface to run the example client for
- // Logger CORBA server. All the complexity for initializing the
- // server is hidden in the class. Just the run() interface is needed.
-{
-public:
- // = Constructor and destructor.
- Logger_Client (void);
- ~Logger_Client (void);
-
- int run (void);
- // Execute client example code.
-
- int init (int argc, char **argv);
- // Initialize the client communication endpoint with server.
-
-private:
- int parse_args (void);
- // Parses the arguments passed on the command line.
-
- int argc_;
- // # of arguments on the command line.
-
- char **argv_;
- // arguments from command line.
-
- int test_nesting_;
- // Test nested naming context or not.
-
- CORBA::ORB_var orb_;
- // Keep a pointer to the orb, to avoid accidental deletes.
-
- Logger_var logger_1_;
- // Logger obj ref
-
- Logger_var logger_2_;
- // Logger obj ref
-};
diff --git a/TAO/orbsvcs/tests/Logger/logger_i.cpp b/TAO/orbsvcs/tests/Logger/logger_i.cpp
deleted file mode 100644
index 8d3892b2648..00000000000
--- a/TAO/orbsvcs/tests/Logger/logger_i.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// $Id$
-
-#include "ace/ACE.h"
-#include "orbsvcs/LoggerC.h"
-#include "logger_i.h"
-
-Logger_ptr
-Logger_Factory_i::make_logger (const char* name,
- CORBA::Environment &_env)
-{
- Logger_i *l = new Logger_i (name);
- return l->_this (_env);
-}
-
-Logger_Factory_i::Logger_Factory_i (void)
-{
-}
-
-Logger_i::Logger_i (const char* name)
- : name_ (ACE_OS::strdup (name))
-{
-}
-
-Logger_i::~Logger_i (void)
-{
- ACE_OS::free (this->name_);
-}
-
-void
-Logger_i::log (const char* message, CORBA::Environment &_env)
-{
-}
diff --git a/TAO/orbsvcs/tests/Logger/logger_i.h b/TAO/orbsvcs/tests/Logger/logger_i.h
deleted file mode 100644
index 91e00f59683..00000000000
--- a/TAO/orbsvcs/tests/Logger/logger_i.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- C++ -*- */
-#if !defined (LOGGER_I_H)
-#define LOGGER_I_H
-
-#include "orbsvcs/LoggerS.h"
-
-class Logger_Factory_i : public virtual POA_Logger_Factory
-{
-public:
- Logger_Factory_i (void);
- // constructor.
-
- virtual Logger_ptr make_logger (const char *name,
- CORBA::Environment &_env);
- // This function creates and returns a logger with the given name.
-};
-
-class Logger_i : public virtual POA_Logger
-{
-public:
- Logger_i (const char* name);
- // constructor
-
- virtual ~Logger_i (void);
- // destructor
-
- virtual void log (const char *message,
- CORBA::Environment &_env);
-
-private:
- char *name_;
- // logger identification
-};
-
-#endif /* LOGGER_I_H */
diff --git a/TAO/orbsvcs/tests/Logger/server.dsp b/TAO/orbsvcs/tests/Logger/server.dsp
deleted file mode 100644
index df4499cf819..00000000000
--- a/TAO/orbsvcs/tests/Logger/server.dsp
+++ /dev/null
@@ -1,93 +0,0 @@
-# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=server - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\..\.." /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\.." /I "..\..\.." /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "server - Win32 Release"
-# Name "server - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\logger_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\svr.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/Logger/svc.conf b/TAO/orbsvcs/tests/Logger/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/tests/Logger/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/tests/Logger/svr.cpp b/TAO/orbsvcs/tests/Logger/svr.cpp
deleted file mode 100644
index 54aab944dee..00000000000
--- a/TAO/orbsvcs/tests/Logger/svr.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/tests/Logger
-//
-// = FILENAME
-// svr.cpp
-//
-// = DESCRIPTION
-// This program is an implementation of a simple logger service.
-// Whatever is sent to it through its interface is displayed on stdout.
-// It uses the Logger_Factory server to create logger objects.
-//
-// = AUTHORS
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/LoggerS.h"
-#include "logger_i.h"
-
-int
-main (int argc, char ** argv)
-{
- TAO_TRY
- {
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Initialize the Object Adapter
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil(poa_object.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to resolve the Name Service.\n"),
- 1);
-
- ACE_DEBUG ((LM_DEBUG, "Naming Service resolved.\n"));
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "CosNaming::NamingContext::_narrow() ok.\n"));
-
- // create a factory implementation
- Logger_Factory_i factory_impl;
-
- Logger_Factory_var factory =
- factory_impl._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::String_var str =
- orb->object_to_string (factory.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "The factory IOR is <%s>\n", str.in ()));
-
- // Register the servant with the Naming Context....
- CosNaming::Name factory_name (1);
- factory_name.length (1);
- factory_name[0].id = CORBA::string_dup ("logger_factory");
- naming_context->bind (factory_name, factory.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
-// naming_context->bind (factory_name, factory.in (), TAO_TRY_ENV);
-// if (TAO_TRY_ENV.exception () != 0)
-// { TAO_TRY_ENV.print_exception ("bind: name already bound\n");
-// return -1;
-// }
-
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "running logging service\n"));
- if (orb->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1);
-
-
- // unbind the logger factory name
- naming_context->unbind (factory_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("logger_service");
- }
- TAO_ENDTRY;
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/Makefile b/TAO/orbsvcs/tests/Makefile
deleted file mode 100644
index 32984bb6e7b..00000000000
--- a/TAO/orbsvcs/tests/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-DIRS = Simple_Naming \
- Logger \
- Event_Latency \
- EC_Multiple \
-
-ifdef av
-## Add the implementation files
-DIRS += AVStreams\
- CosPropertyService
-endif
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU
-
diff --git a/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp b/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp
deleted file mode 100644
index a0e07c0e1c2..00000000000
--- a/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp
+++ /dev/null
@@ -1,235 +0,0 @@
-#include "Strategy_Scheduler.h"
-
-// period times, in 100 nanoseconds
-#define ONE_HZ 10000000
-#define FIVE_HZ 2000000
-#define TEN_HZ 1000000
-#define TWENTY_HZ 500000
-
-typedef RtecScheduler::handle_t handle_t;
-typedef RtecScheduler::Dependency_Info Dependency_Info;
-typedef RtecScheduler::Preemption_Priority Preemption_Priority;
-typedef RtecScheduler::OS_Priority OS_Priority;
-typedef RtecScheduler::Sub_Priority Sub_Priority;
-typedef RtecScheduler::RT_Info RT_Info;
-typedef RtecScheduler::Time Time;
-typedef RtecScheduler::Period Period;
-typedef RtecScheduler::Info_Type Info_Type;
-typedef RtecScheduler::Dependency_Type Dependency_Type;
-
-
-void setup_rt_info (RT_Info &info, const char *entry_point, u_long period,
- u_long execution, RtecScheduler::Criticality criticality,
- RtecScheduler::Importance importance, u_long threads)
-{
- // copy the passed entry point string into the RT_Info
- info.entry_point = CORBA::string_dup (entry_point);
-
- // initialize other values
- info.handle = 0;
- info.worst_case_execution_time = execution;
- info.typical_execution_time = execution;
- info.cached_execution_time = 0;
- info.period = period;
- info.criticality = criticality;
- info.importance = importance;
- info.quantum = 0;
- info.threads = threads;
- info.priority = 0;
- info.dynamic_subpriority = 0;
- info.static_subpriority = 0;
- info.preemption_priority = 0;
- info.info_type = RtecScheduler::OPERATION;
- info.volatile_token = 0;
-}
-
-int register_rt_info (ACE_Scheduler &scheduler, RtecScheduler::RT_Info &info)
-{
- int result = 0;
-
- if (scheduler.register_task (&info, info.handle) != ACE_Scheduler::SUCCEEDED)
- {
- result = 1;
- printf ("Could not register info for \"%s\"\n", info.entry_point);
- }
-
- return result;
-}
-
-void setup_conjunction (RT_Info &info, const char *entry_point)
-{
- // copy the passed entry point string into the RT_Info
- info.entry_point = CORBA::string_dup (entry_point);
-
- // initialize other values
- info.handle = 0;
- info.worst_case_execution_time = 0;
- info.typical_execution_time = 0;
- info.cached_execution_time = 0;
- info.period = 0;
- info.criticality = RtecScheduler::VERY_LOW_CRITICALITY;
- info.importance = RtecScheduler::VERY_LOW_IMPORTANCE;
- info.quantum = 0;
- info.threads = 0;
- info.priority = 0;
- info.dynamic_subpriority = 0;
- info.static_subpriority = 0;
- info.preemption_priority = 0;
- info.info_type = RtecScheduler::CONJUNCTION;
- info.volatile_token = 0;
-}
-
-void setup_disjunction (RT_Info &info, const char *entry_point)
-{
- // copy the passed entry point string into the RT_Info
- info.entry_point = CORBA::string_dup (entry_point);
-
- // initialize other values
- info.handle = 0;
- info.worst_case_execution_time = 0;
- info.typical_execution_time = 0;
- info.cached_execution_time = 0;
- info.period = 0;
- info.criticality = RtecScheduler::VERY_LOW_CRITICALITY;
- info.importance = RtecScheduler::VERY_LOW_IMPORTANCE;
- info.quantum = 0;
- info.threads = 0;
- info.priority = 0;
- info.dynamic_subpriority = 0;
- info.static_subpriority = 0;
- info.preemption_priority = 0;
- info.info_type = RtecScheduler::DISJUNCTION;
- info.volatile_token = 0;
-}
-
-
-int run_schedule (ACE_Scheduler_Strategy &strategy, const char *output_filename, const char *heading)
-{
-// RtecScheduler::RT_Info low_10, low_20, high_10, high_20;
- RtecScheduler::RT_Info low_1, low_5, low_10, low_20;
- RtecScheduler::RT_Info high_1, high_5, high_10, high_20;
-
- ACE_Strategy_Scheduler scheduler (strategy);
-
- setup_rt_info (low_1, "low_1", ONE_HZ, 180000, RtecScheduler::LOW_CRITICALITY, RtecScheduler::HIGH_IMPORTANCE, 1);
- setup_rt_info (low_5, "low_5", FIVE_HZ, 180000, RtecScheduler::LOW_CRITICALITY, RtecScheduler::HIGH_IMPORTANCE, 1);
- setup_rt_info (low_10, "low_10", TEN_HZ, 180000, RtecScheduler::LOW_CRITICALITY, RtecScheduler::HIGH_IMPORTANCE, 1);
- setup_rt_info (low_20, "low_20", TWENTY_HZ, 180000, RtecScheduler::LOW_CRITICALITY, RtecScheduler::HIGH_IMPORTANCE, 1);
- setup_rt_info (high_1, "high_1", ONE_HZ, 180000, RtecScheduler::HIGH_CRITICALITY, RtecScheduler::LOW_IMPORTANCE, 1);
- setup_rt_info (high_5, "high_5", FIVE_HZ, 180000, RtecScheduler::HIGH_CRITICALITY, RtecScheduler::LOW_IMPORTANCE, 1);
- setup_rt_info (high_10, "high_10", TEN_HZ, 180000, RtecScheduler::HIGH_CRITICALITY, RtecScheduler::LOW_IMPORTANCE, 1);
- setup_rt_info (high_20, "high_20", TWENTY_HZ, 180000, RtecScheduler::HIGH_CRITICALITY, RtecScheduler::LOW_IMPORTANCE, 1);
-
- if (
- register_rt_info (scheduler, low_1) ||
- register_rt_info (scheduler, low_5) ||
- register_rt_info (scheduler, low_10) ||
- register_rt_info (scheduler, low_20) ||
- register_rt_info (scheduler, high_1) ||
- register_rt_info (scheduler, high_5) ||
- register_rt_info (scheduler, high_10) ||
- register_rt_info (scheduler, high_20))
- {
- return -1;
- }
-
- ACE_Scheduler::status_t status = scheduler.schedule ();
- switch (status)
- {
- case ACE_Scheduler::SUCCEEDED:
- case ACE_Scheduler::ST_UTILIZATION_BOUND_EXCEEDED:
-
- status = scheduler.output_timeline (output_filename, heading);
- switch (status)
- {
- case ACE_Scheduler::SUCCEEDED:
- case ACE_Scheduler::ST_UTILIZATION_BOUND_EXCEEDED:
- break;
-
- default :
- printf ("scheduler.output_timeline (\"%s\") failed: returned %d\n",
- output_filename, status);
- return -1;
- }
-
- break;
-
- default :
-
- printf ("scheduler.schedule () failed: returned %d\n", status);
- return -1;
- }
-
- return 0;
-}
-
-int main ()
-{
- int result = 0;
-
- // create a bunch of different strategies, indicating the minimum critical
- // priority level (number of priority levels in critical set - 1) for each.
-
- ACE_RMS_Scheduler_Strategy rms_strategy (3);
-// ACE_RMS_Scheduler_Strategy rms_strategy (1);
-
- ACE_MLF_Scheduler_Strategy mlf_strategy (0);
- ACE_EDF_Scheduler_Strategy edf_strategy (0);
-
- ACE_RMS_Dyn_Scheduler_Strategy rms_dyn_strategy (3);
-// ACE_RMS_Dyn_Scheduler_Strategy rms_dyn_strategy (1);
-
- ACE_MUF_Scheduler_Strategy muf_strategy (0);
-
- result = run_schedule (rms_strategy, "RMS_Timelines", "RMS Scheduling Strategy");
- if (result < 0)
- {
- printf ("run_schedule (rms_strategy, \"RMS_Timelines\", \"RMS Scheduling Strategy\") returned %d\n",
- result);
- return 1;
- }
-
- result = run_schedule (mlf_strategy, "MLF_Timelines", "MLF Scheduling Strategy");
- if (result < 0)
- {
- printf ("run_schedule (mlf_strategy, \"MLF_Timelines\", \"MLF Scheduling Strategy\") returned %d\n",
- result);
- return 1;
- }
-
- result = run_schedule (edf_strategy, "EDF_Timelines", "EDF Scheduling Strategy");
- if (result < 0)
- {
- printf ("run_schedule (edf_strategy, \"EDF_Timelines\", \"EDF Scheduling Strategy\") returned %d\n",
- result);
- return 1;
- }
-
- result = run_schedule (rms_dyn_strategy, "RMS_Dyn_Timelines", "RMS-Dynamic Scheduling Strategy");
- if (result < 0)
- {
- printf ("run_schedule (rms_dyn_strategy, \"RMS_Dyn_Timelines\", \"RMS-Dynamic Scheduling Strategy\") returned %d\n",
- result);
- return 1;
- }
-
- result = run_schedule (muf_strategy, "MUF_Timelines", "MUF Scheduling Strategy");
- if (result < 0)
- {
- printf ("run_schedule (muf_strategy, \"MUF_Timelines\", \"MUF Scheduling Strategy\") returned %d\n",
- result);
- return 1;
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-// template class ACE_Ordered_MultiSet<Dispatch_Entry_Link>;
-
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-// #pragma instantiate ACE_Ordered_MultiSet<Dispatch_Entry_Link>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ \ No newline at end of file
diff --git a/TAO/orbsvcs/tests/Simple_Naming/Makefile b/TAO/orbsvcs/tests/Simple_Naming/Makefile
deleted file mode 100644
index ade4074ca71..00000000000
--- a/TAO/orbsvcs/tests/Simple_Naming/Makefile
+++ /dev/null
@@ -1,225 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-LDLIBS = -lorbsvcs -lTAO
-
-CLNT_SRCS = clnt.cpp
-
-LSRC = $(CLNT_SRCS)
-
-CLNT_OBJS = $(CLNT_SRCS:.cpp=.o)
-
-BIN = clnt
-BUILD = $(BIN)
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-ifndef TAO_ROOT
-TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/clnt.o .obj/clnt.so .shobj/clnt.o .shobj/clnt.so: clnt.cpp clnt.h \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(TAO_ROOT)/tao/corba.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Svc_Handler.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(TAO_ROOT)/tao/compat/objbase.h \
- $(TAO_ROOT)/tao/compat/initguid.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(TAO_ROOT)/tao/Align.h \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/Client_Strategy_Factory.h \
- $(TAO_ROOT)/tao/Server_Strategy_Factory.h \
- $(TAO_ROOT)/tao/default_client.h \
- $(TAO_ROOT)/tao/default_server.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.h \
- $(TAO_ROOT)/tao/ORB_Strategies_T.i \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/Request.h \
- $(TAO_ROOT)/tao/Server_Request.h \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Marshal.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(TAO_ROOT)/tao/Stub.h \
- $(TAO_ROOT)/tao/POA.h \
- $(TAO_ROOT)/tao/POAC.h \
- $(TAO_ROOT)/tao/POAC.i \
- $(TAO_ROOT)/tao/Servant_Base.h \
- $(TAO_ROOT)/tao/POAS.h \
- $(TAO_ROOT)/tao/POAS.i \
- $(TAO_ROOT)/tao/Object_Table.h \
- $(TAO_ROOT)/tao/Connect.h \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(TAO_ROOT)/tao/Operation_Table.h \
- $(TAO_ROOT)/tao/debug.h \
- $(TAO_ROOT)/tao/IIOP_Object.h \
- $(TAO_ROOT)/tao/IIOP_ORB.h \
- $(TAO_ROOT)/tao/IIOP_Interpreter.h \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/ORB_Core.i \
- $(ACE_ROOT)/ace/Dynamic_Service.h \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/Stub.i \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/Marshal.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/IIOP_ORB.i \
- $(TAO_ROOT)/tao/IIOP_Object.i \
- $(TAO_ROOT)/tao/Server_Request.i \
- $(TAO_ROOT)/tao/params.i \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/default_client.i \
- $(TAO_ROOT)/tao/default_server.i \
- $(TAO_ROOT)/tao/Connect.i \
- $(TAO_ROOT)/tao/Request.i \
- $(TAO_ROOT)/tao/singletons.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw b/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw
deleted file mode 100644
index 015f303d8bd..00000000000
--- a/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "client"=.\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.dsp b/TAO/orbsvcs/tests/Simple_Naming/client.dsp
deleted file mode 100644
index a492a626e12..00000000000
--- a/TAO/orbsvcs/tests/Simple_Naming/client.dsp
+++ /dev/null
@@ -1,88 +0,0 @@
-# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=client - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs"
-
-!ELSEIF "$(CFG)" == "client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs"
-
-!ENDIF
-
-# Begin Target
-
-# Name "client - Win32 Release"
-# Name "client - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\clnt.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/Simple_Naming/clnt.cpp b/TAO/orbsvcs/tests/Simple_Naming/clnt.cpp
deleted file mode 100644
index 67a6e64ffaf..00000000000
--- a/TAO/orbsvcs/tests/Simple_Naming/clnt.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/bin/Naming_Service/TAO
-//
-// = FILENAME
-// clnt.cpp
-//
-// = DESCRIPTION
-// This class implements a simple "cube" CORBA client for the CosNaming
-// example using stubs generated by the TAO ORB IDL compiler.
-//
-// = AUTHORS
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "clnt.h"
-
-// constructor
-
-CosNaming_Client::CosNaming_Client (void)
- : argc_ (0),
- argv_ (0),
- exit_later_ (0)
-{
-}
-
-// Parses the command line arguments and returns an error status.
-
-int
-CosNaming_Client::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "dx");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- break;
- case 'x':
- this->exit_later_++;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-x]"
- "\n",
- this->argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-// Execute client example code.
-
-int
-CosNaming_Client::run (void)
-{
- // @@ TODO, add some interesting test here, maybe creating some
- // nested naming contexts and registering a number of objreferences
- // in there.
- // We could even use the iterators.
- return 0;
-}
-
-CosNaming_Client::~CosNaming_Client (void)
-{
-}
-
-int
-CosNaming_Client::init (int argc, char **argv)
-{
- this->argc_ = argc;
- this->argv_ = argv;
-
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- -1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Parse command line and verify parameters.
- if (this->parse_args () == -1)
- return -1;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("init");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-// This function runs the test.
-
-int
-main (int argc, char **argv)
-{
- CosNaming_Client cosnaming_client;
-
- if (cosnaming_client.init (argc, argv) == -1)
- return 1;
-
- return cosnaming_client.run ();
-}
diff --git a/TAO/orbsvcs/tests/Simple_Naming/clnt.h b/TAO/orbsvcs/tests/Simple_Naming/clnt.h
deleted file mode 100644
index 213daf2be6e..00000000000
--- a/TAO/orbsvcs/tests/Simple_Naming/clnt.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/orbsvcs/tests
-//
-// = FILENAME
-// clnt.h
-//
-// = DESCRIPTION
-// This class tests the facilities to connect to the naming service.
-//
-// = AUTHORS
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "ace/Get_Opt.h"
-#include "tao/corba.h"
-#include "orbsvcs/CosNamingC.h"
-
-class CosNaming_Client
- // = TITLE
- // Defines a class that encapsulates behaviour of the CosNaming client
- // example. Provides a better understanding of the logic in an
- // object oriented way.
- //
- // = DESCRIPTION
- // This class declares an interface to run the example client for
- // CosNaming CORBA server. All the complexity for initializing the
- // server is hidden in the class. Just the run() interface is needed.
-{
-public:
- // = Constructor and destructor.
- CosNaming_Client (void);
- ~CosNaming_Client (void);
-
- int run (void);
- // Execute client example code.
-
- int init (int argc, char **argv);
- // Initialize the client communication endpoint with server.
-
-private:
- int parse_args (void);
- // Parses the arguments passed on the command line.
-
- int argc_;
- // # of arguments on the command line.
-
- char **argv_;
- // arguments from command line.
-
- int exit_later_;
- // Flag to tell server to not exit immediately.
-};
diff --git a/TAO/orbsvcs/tests/Simple_Naming/svc.conf b/TAO/orbsvcs/tests/Simple_Naming/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/orbsvcs/tests/Simple_Naming/svc.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id$
-#
-# This file contains a sample ACE_Service_Config configuration
-# file specifying the strategy factories utilized by an application
-# using TAO. There are currently only two possible factories:
-# Client_Strategy_Factory and Server_Strategy_Factory. These names
-# must be used as the second argument to their corresponding line,
-# because that's what the ORB uses to find the desired factory.
-#
-# Note that there are two unordinary characteristics of the way *this*
-# file is set up:
-# - both client and server strategies are specified in the same
-# file, which would only make sense for co-located clients & servers
-# - both of the factories are actually sourced out of libTAO.so
-# (TAO.DLL on Win32), and they would normally be in a separate
-# dll from the TAO ORB Core.
-#
-# The options which can be passed to the Resource Factory are:
-#
-# -ORBresources <which>
-# where <which> can be 'global' to specify globally-held resources,
-# or 'tss' to specify thread-specific resources.
-#
-# The options which can be passed to the Client are:
-# <none currently>
-#
-# The options which can be passed to the Server are:
-#
-# -ORBconcurrency <which>
-# where <which> can be 'thread-per-connection' to specify
-# use of the ACE_Threaded_Strategy concurrency strategy,
-# or 'reactive' to specify use of the ACE_Reactive_Strategy
-# concurrency strategy.
-#
-# -ORBthreadflags <flags>
-# specifies the default thread flags to use, where <flags> is a
-# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP,
-# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid
-# on every platform.
-#
-# -ORBdemuxstrategy <which>
-# where <which> can be one of 'dynamic', 'linear', 'active', or 'user',
-# and specifies the type of object lookup strategy used internally.
-# -ORBtablesize <unsigned>
-# specifies the size of the object table
-#
-dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global"
-dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()
-dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128"
diff --git a/TAO/orbsvcs/tests/Trading_Service/Makefile b/TAO/orbsvcs/tests/Trading_Service/Makefile
deleted file mode 100644
index e6af2389f07..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#----------------------------------------------------------------------------
-#
-# $Id$
-#
-#----------------------------------------------------------------------------
-
-#---------------
-# STL (start)
-#---------------
-
-include $(STL_ROOT)/config/local.cfg
-
-CC_INCLUDES += -I$(STD)
-CC_INCLUDES += -pta
-
-CPPFLAGS += \
- -I$(TOOLKIT) \
- $(CC_INCLUDES) \
- $(CC_FLAGS) \
- $(CC_DEFINES) \
- $(CC_EH) \
- $(CC_MT)
-
-ifndef exceptions
-CPPFLAGS += -DOS_NO_EXCEPTION_SPECIFIER
-else
-CPPFLAGS += -DOS_STL_ASSERT
-endif
-
-LDFLAGS += -L$(STL_ROOT)/lib
-
-#---------------
-# STL (end)
-#---------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-static_libs_only=1
-BIN = export_test import_test
-
-MAKEFILE = Makefile
-LIBNAME = TTest
-LIB = $(LIBNAME).a
-SHLIB = $(LIBNAME).$(SOEXT)
-
-IDL_FILES = TTestC \
- TTestS \
-
-FILES = $(IDL_FILES) \
- TT_Info \
- Service_Type_Exporter \
- Offer_Exporter \
- Offer_Importer
-
-DCFLAGS = -g
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -L$(STL_ROOT)/lib
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H
-
-LSRC = $(addsuffix .cpp,$(FILES))
-LDLIBS = -lTTest -lorbsvcs -lospace -lTAO
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-
-INSTALL=
-
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-.PRECIOUS: TTestS.cpp TTestS.h TTestC.cpp TTestC.h
-
-clean:
- -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state
-
-realclean: clean
- -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES))
-
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.cpp b/TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.cpp
deleted file mode 100644
index 145496cce17..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-#include "Offer_Exporter.h"
-
-template<class T>
-class Simple_DP_Evaluation_Handler
- : public TAO_DP_Evaluation_Handler
-{
-public:
- Simple_DP_Evaluation_Handler (T dp);
-
- virtual CORBA::Any* evalDP (const CORBA::Any& extra_info,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure));
-
-private:
-
- T dp_;
-};
-
-
-template <class T>
-Simple_DP_Evaluation_Handler<T>::Simple_DP_Evaluation_Handler (T dp)
- : dp_ (dp)
-{
-}
-
-template <class T> CORBA::Any*
-Simple_DP_Evaluation_Handler<T>::evalDP (const CORBA::Any& extra_info,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure))
-{
- CORBA::Any* return_value = 0;
-
- ACE_NEW_RETURN (return_value, CORBA::Any, return_value);
-
- (*return_value) <<= this->dp_;
- return return_value;
-}
-
-TAO_Offer_Exporter::
-TAO_Offer_Exporter (CosTrading::Register_ptr register_if,
- CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException))
- : register_ (register_if)
-{
- this->create_offers ();
- this->admin_ = register_if->admin_if (_env);
- TAO_CHECK_ENV_RETURN (_env,);
-}
-
-TAO_Offer_Exporter::~TAO_Offer_Exporter (void)
-{
- for (int i = 0; i < NUM_OFFERS; i++)
- {
- delete dp_plotters_[i].remove_handler
- (TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE]);
- delete dp_plotters_[i].remove_handler
- (TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING]);
- delete dp_printers_[i].remove_handler
- (TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_USER_QUEUE]);
- delete dp_printers_[i].remove_handler
- (TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_FILE_SIZES_PENDING]);
- delete dp_fs_[i].remove_handler
- (TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING]);
- }
-}
-
-void
-TAO_Offer_Exporter::export_offers (CORBA::Environment& _env)
-{
- ACE_DEBUG ((LM_DEBUG, "Exporting offers.\n"));
-
- TAO_TRY
- {
- for (int i = 0; i < NUM_OFFERS; i++)
- {
- this->register_->export (this->plotter_[i]._this (TAO_TRY_ENV),
- TT_Info::INTERFACE_NAMES[1],
- this->props_plotters_[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->register_->export (this->printer_[i]._this (TAO_TRY_ENV),
- TT_Info::INTERFACE_NAMES[2],
- this->props_printers_[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->register_->export (this->fs_[i]._this (TAO_TRY_ENV),
- TT_Info::INTERFACE_NAMES[3],
- this->props_fs_[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::export_offers");
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
-
-void
-TAO_Offer_Exporter::withdraw_offers (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId))
-{
- ACE_DEBUG ((LM_DEBUG, "Withdrawing all offers.\n"));
-
- TAO_TRY
- {
- CORBA::ULong length;
- CORBA::ULong amount = NUM_OFFERS;
-
- CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (_env);
- TAO_CHECK_ENV;
-
- if (offer_id_seq.ptr () != 0)
- {
- length = offer_id_seq->length ();
- for (int i = 0; i < length; i++)
- {
- this->register_->withdraw (offer_id_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::export_offers");
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
-
-void
-TAO_Offer_Exporter::describe_offers (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId))
-{
- ACE_DEBUG ((LM_DEBUG, "Describing all offers.\n"));
-
- TAO_TRY
- {
- CORBA::ULong length;
- CORBA::ULong amount = NUM_OFFERS;
-
- CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (_env);
- TAO_CHECK_ENV;
-
- if (offer_id_seq.ptr () != 0)
- {
- length = offer_id_seq->length ();
- for (int i = 0; i < length; i++)
- {
- CosTrading::Register::OfferInfo_var offer_info =
- this->register_->describe (offer_id_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "Offer Id: %s\n", (const char *) offer_id_seq[i]));
- ACE_DEBUG ((LM_DEBUG, "Service Type: %s\n", offer_info->type.in ()));
- TT_Info::dump_properties (offer_info->properties);
- ACE_DEBUG ((LM_DEBUG, "------------------------------"));
- }
- }
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::export_offers");
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
-
-void
-TAO_Offer_Exporter::modify_offers (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId,
- CosTrading::IllegalPropertyName,
- CosTrading::Register::UnknownPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::Register::MandatoryProperty,
- CosTrading::Register::ReadonlyProperty,
- CosTrading::DuplicatePropertyName))
-
-{
-}
-
-void
-TAO_Offer_Exporter::
-withdraw_offers_using_constraints (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Register::NoMatchingOffers))
-{
-}
-
-CosTrading::OfferIdSeq*
-TAO_Offer_Exporter::grab_offerids (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented))
-{
- ACE_DEBUG ((LM_DEBUG, "Grabbing all offer ids.\n"));
-
- CosTrading::OfferIdSeq_ptr offer_id_seq;
- TAO_TRY
- {
- CORBA::ULong length;
- CosTrading::OfferIdIterator_ptr offer_id_iter;
-
- this->admin_->list_offers (NUM_OFFERS,
- CosTrading::OfferIdSeq_out (offer_id_seq),
- CosTrading::OfferIdIterator_out (offer_id_iter),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (! CORBA::is_nil (offer_id_iter) && offer_id_seq != 0)
- {
- CORBA::Boolean any_left = CORBA::B_FALSE;
- CosTrading::OfferIdSeq_ptr id_seq;
- CosTrading::OfferIdIterator_var (offer_id_iter);
-
- do
- {
- any_left =
- offer_id_iter->next_n (length,
- CosTrading::OfferIdSeq_out (id_seq),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::OfferIdSeq_var id_seq (id_seq);
- int offers = id_seq->length ();
- int old_length = offer_id_seq->length ();
- offer_id_seq->length (old_length + offers);
-
- for (int i = 0; i < offers; i++)
- (*offer_id_seq)[i + old_length] = id_seq[i];
-
- } while (any_left);
- }
-
- return offer_id_seq;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::grab_offerids");
- TAO_RETHROW_RETURN (offer_id_seq);
- }
- TAO_ENDTRY;
-}
-
-void
-TAO_Offer_Exporter::create_offers (void)
-{
- int counter = 0;
- char name[BUFSIZ];
- char description[BUFSIZ];
- CORBA::Any extra_info;
- TAO_Sequences::StringSeq string_seq (4);
- TAO_Sequences::ULongSeq ulong_seq (4);
- CosTradingDynamic::DynamicProp_var dp_user_queue;
- CosTradingDynamic::DynamicProp_var dp_file_queue;
-
- // Initialize plotters
- for (int i = 0; i < NUM_OFFERS; i++)
- {
- ACE_OS::sprintf (name, "Plotter #%d", i);
- ACE_OS::sprintf (description,
- "%s is a plotter. It plots stuff. Like charts.",
- name);
-
- for (int j = 0; j < 4; j++, counter = (counter + 1) % NUM_OFFERS)
- {
- string_seq[j] = TT_Info::USERS [counter];
- ulong_seq[j] = counter * 10000;
- }
- /*
- dp_user_queue =
- this->dp_plotters_[i].register_handler
- (TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE],
- TT_Info::PLOTTER_PROPERTY_TYPES[TT_Info::PLOTTER_USER_QUEUE],
- extra_info,
- new Simple_DP_Evaluation_Handler<TAO_Sequences::StringSeq> (string_seq));
-
- dp_file_queue =
- this->dp_plotters_[i].register_handler
- (TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING],
- TT_Info::PLOTTER_PROPERTY_TYPES[TT_Info::PLOTTER_FILE_SIZES_PENDING],
- extra_info,
- new Simple_DP_Evaluation_Handler<TAO_Sequences::ULongSeq> (ulong_seq));
- */
- this->props_plotters_[i].length (9);
- this->props_plotters_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME];
- this->props_plotters_[i][0].value <<= name;
- this->props_plotters_[i][1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION];
- this->props_plotters_[i][1].value <<= TT_Info::LOCATIONS[i];
- this->props_plotters_[i][2].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION];
- this->props_plotters_[i][2].value <<= description;
- this->props_plotters_[i][3].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_NUM_COLORS];
- this->props_plotters_[i][3].value <<= (i * 2);
- this->props_plotters_[i][4].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_AUTO_LOADING];
- this->props_plotters_[i][4].value <<= CORBA::Any::from_boolean ((CORBA::Boolean) (i % 2));
- this->props_plotters_[i][5].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_COST_PER_PAGE];
- this->props_plotters_[i][5].value <<= (CORBA::Float) i;
- this->props_plotters_[i][6].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_MODEL_NUMBER];
- this->props_plotters_[i][6].value <<= TT_Info::MODEL_NUMBERS[i];
- this->props_plotters_[i][7].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE];
- // this->props_plotters_[i][7].value <<= dp_user_queue.in ();
- this->props_plotters_[i][8].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING];
- // this->props_plotters_[i][8].value <<= dp_file_queue.in ();
- }
-
- // Initialize printers
- for (i = 0; i < NUM_OFFERS; i++)
- {
- ACE_OS::sprintf (name, "Printer #%d", i);
- ACE_OS::sprintf (description,
- "%s is a printer. It prints stuff. Like reports.",
- name);
-
- for (int j = 0; j < 4; j++, counter = (counter + 1) % NUM_OFFERS)
- {
- string_seq[j] = TT_Info::USERS [counter];
- ulong_seq[j] = counter * 10000;
- }
- /*
- dp_user_queue =
- this->dp_printers_[i].register_handler
- (TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_USER_QUEUE],
- TT_Info::PRINTER_PROPERTY_TYPES[TT_Info::PRINTER_USER_QUEUE],
- extra_info,
- new Simple_DP_Evaluation_Handler<TAO_Sequences::StringSeq> (string_seq));
-
- dp_file_queue =
- this->dp_printers_[i].register_handler
- (TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_FILE_SIZES_PENDING],
- TT_Info::PRINTER_PROPERTY_TYPES[TT_Info::PRINTER_FILE_SIZES_PENDING],
- extra_info,
- new Simple_DP_Evaluation_Handler<TAO_Sequences::ULongSeq> (ulong_seq));
- */
- this->props_printers_[i].length (10);
- this->props_printers_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME];
- this->props_printers_[i][0].value <<= name;
- this->props_printers_[i][1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION];
- this->props_printers_[i][1].value <<= TT_Info::LOCATIONS[i];
- this->props_printers_[i][2].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION];
- this->props_printers_[i][2].value <<= description;
- this->props_printers_[i][3].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_COLOR];
- this->props_printers_[i][3].value <<= CORBA::Any::from_boolean ((CORBA::Boolean) (i % 2));
- this->props_printers_[i][4].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_DOUBLE_SIDED];
- this->props_printers_[i][4].value <<= CORBA::Any::from_boolean ((CORBA::Boolean) ((i + 1) % 2));
- this->props_printers_[i][5].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_COST_PER_PAGE];
- this->props_printers_[i][5].value <<= (CORBA::Float) i;
- this->props_printers_[i][6].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_MODEL_NUMBER];
- this->props_printers_[i][6].value <<= TT_Info::MODEL_NUMBERS[i];
- this->props_printers_[i][7].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_PAGES_PER_SEC];
- this->props_printers_[i][7].value <<= (CORBA::UShort) i;
- this->props_printers_[i][8].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_USER_QUEUE];
- // this->props_printers_[i][8].value <<= dp_user_queue.in ();
- this->props_printers_[i][9].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_FILE_SIZES_PENDING];
- // this->props_printers_[i][9].value <<= dp_file_queue.in ();
- }
-
- // Initialize FileSystem
- for (i = 0; i < NUM_OFFERS; i++)
- {
- CosTradingDynamic::DynamicProp_var dp_space_left;
-
- ACE_OS::sprintf (name, "File System #%d", i);
- ACE_OS::sprintf (description,
- "%s is a File System. It stores stuff. Like files.",
- name);
-
- dp_space_left =
- this->dp_fs_[i].register_handler
- (TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING],
- TT_Info::FILESYSTEM_PROPERTY_TYPES[TT_Info::SPACE_REMAINING],
- extra_info,
- new Simple_DP_Evaluation_Handler<CORBA::ULong> (i * 4434343));
-
- this->props_fs_[i].length (6);
- this->props_fs_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME];
- this->props_fs_[i][0].value <<= name;
- this->props_fs_[i][1].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::LOCATION];
- this->props_fs_[i][1].value <<= TT_Info::LOCATIONS[i];
- this->props_fs_[i][2].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::DESCRIPTION];
- this->props_fs_[i][2].value <<= description;
- this->props_fs_[i][0].name = TT_Info::REMOTE_IO_PROPERTY_NAMES[TT_Info::NAME];
- this->props_fs_[i][0].value <<= name;
- this->props_fs_[i][1].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::DISK_SIZE];
- this->props_fs_[i][1].value <<= (CORBA::ULong) i * 2000000;
- this->props_fs_[i][2].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING];
- // this->props_fs_[i][2].value <<= dp_space_left.in ();
- this->props_fs_[i][0].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::PERMISSION_LEVEL];
- this->props_fs_[i][0].value <<= (CORBA::UShort) i + 1;
- }
-}
diff --git a/TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.h b/TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.h
deleted file mode 100644
index ad16221c3cf..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/Offer_Exporter.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// $Id$
-
-// ========================================================================
-//
-// = FILE
-// Offer_Exporter.h
-//
-// = DESCRIPTION
-// Class that tests the Trading Service's Register Interface
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#ifndef TAO_OFFER_EXPORTER_H
-#define TAO_OFFER_EXPORTER_H
-
-#include "TT_Info.h"
-#include "orbsvcs/Trader/Dynamic_Property.h"
-
-class TAO_Offer_Exporter
-{
-public:
-
- TAO_Offer_Exporter (CosTrading::Register_ptr register_if,
- CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- ~TAO_Offer_Exporter (void);
-
- void export_offers (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::Register::InvalidObjectRef,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::Register::InterfaceTypeMismatch,
- CosTrading::IllegalPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::MissingMandatoryProperty,
- CosTrading::DuplicatePropertyName));
-
- void withdraw_offers (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId));
-
- void describe_offers (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId));
-
- void modify_offers (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented,
- CosTrading::IllegalOfferId,
- CosTrading::UnknownOfferId,
- CosTrading::Register::ProxyOfferId,
- CosTrading::IllegalPropertyName,
- CosTrading::Register::UnknownPropertyName,
- CosTrading::PropertyTypeMismatch,
- CosTrading::ReadonlyDynamicProperty,
- CosTrading::Register::MandatoryProperty,
- CosTrading::Register::ReadonlyProperty,
- CosTrading::DuplicatePropertyName));
-
- void withdraw_offers_using_constraints (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Register::NoMatchingOffers));
-
-private:
-
- CosTrading::OfferIdSeq* grab_offerids (CORBA::Environment& env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::NotImplemented));
-
- void create_offers (void);
-
- CosTrading::Register_var register_;
- CosTrading::Admin_var admin_;
-
- TT_Info::Printer printer_[NUM_OFFERS];
- TT_Info::Plotter plotter_[NUM_OFFERS];
- TT_Info::File_System fs_[NUM_OFFERS];
-
- TAO_Dynamic_Property dp_plotters_[NUM_OFFERS];
- TAO_Dynamic_Property dp_printers_[NUM_OFFERS];
- TAO_Dynamic_Property dp_fs_[NUM_OFFERS];
-
- CosTrading::PropertySeq props_plotters_[NUM_OFFERS];
- CosTrading::PropertySeq props_printers_[NUM_OFFERS];
- CosTrading::PropertySeq props_fs_[NUM_OFFERS];
-};
-
-#endif /* TAO_OFFER_EXPORTER_H */
diff --git a/TAO/orbsvcs/tests/Trading_Service/Offer_Importer.cpp b/TAO/orbsvcs/tests/Trading_Service/Offer_Importer.cpp
deleted file mode 100644
index c468e3257af..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/Offer_Importer.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-#include "Offer_Importer.h"
-#include "orbsvcs/Trader/Policy_Manager.h"
-
-TAO_Offer_Importer::TAO_Offer_Importer (CosTrading::Lookup_ptr lookup_if)
- : lookup_ (lookup_if)
-{
-}
-
-void
-TAO_Offer_Importer::perform_queries (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName))
-{
- TAO_TRY
- {
- TAO_Policy_Manager policies;
- CosTrading::Lookup::SpecifiedProps desired_props;
-
- for (int i = 0; i < TT_Info::NUM_QUERIES; i++)
- {
- ACE_DEBUG ((LM_DEBUG, "Performing query for %s.\n", TT_Info::QUERIES[i][0]));
- ACE_DEBUG ((LM_DEBUG, "Query: %s\n", TT_Info::QUERIES[i][1]));
- ACE_DEBUG ((LM_DEBUG, "Preferences: %s\n", TT_Info::QUERIES[i][2]));
-
- CosTrading::OfferSeq_ptr offer_seq_out = 0;
- CosTrading::OfferIterator_ptr offer_iterator_out = 0;
- CosTrading::PolicyNameSeq_ptr limits_applied_out = 0;
-
- this->lookup_->query (TT_Info::QUERIES[i][0],
- TT_Info::QUERIES[i][1],
- TT_Info::QUERIES[i][2],
- policies.policy_seq (),
- desired_props,
- 8,
- CosTrading::OfferSeq_out (offer_seq_out),
- CosTrading::OfferIterator_out (offer_iterator_out),
- CosTrading::PolicyNameSeq_out (limits_applied_out),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::OfferSeq_var offer_seq (offer_seq_out);
- CosTrading::OfferIterator_var offer_iterator (offer_iterator_out);
- CosTrading::PolicyNameSeq_var limits_applied (limits_applied_out);
- ACE_DEBUG ((LM_DEBUG, "Results:\n\n"));
-
- this->display_results (offer_seq.in (),
- offer_iterator.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("TAO_Offer_Importer::perform_queries");
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
-
-void
-TAO_Offer_Importer::perform_federated_queries (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName))
-{
-}
-
-void
-TAO_Offer_Importer::display_results (const CosTrading::OfferSeq& offer_seq,
- CosTrading::OfferIterator_ptr offer_iterator,
- CORBA::Environment& _env) const
- TAO_THROW_SPEC ((CORBA::SystemException))
-{
- for (int length = offer_seq.length (), i = 0; i < length; i++)
- TT_Info::dump_properties (offer_seq[i].properties);
-
- TAO_TRY
- {
- if (! CORBA::is_nil (offer_iterator))
- {
- CORBA::Boolean any_left = CORBA::B_FALSE;
-
- do
- {
- CosTrading::OfferSeq_ptr iter_offers_out;
- any_left =
- offer_iterator->next_n (length,
- CosTrading::OfferSeq_out (iter_offers_out),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::OfferSeq_var iter_offers (iter_offers_out);
- CosTrading::PropertySeq& props = iter_offers[i].properties;
- for (length = iter_offers->length (), i = 0; i < length; i++)
- TT_Info::dump_properties (props);
-
- } while (any_left);
- }
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("TAO_Offer_Importer::display_results");
- TAO_RETHROW;
- }
- TAO_ENDTRY;
-}
diff --git a/TAO/orbsvcs/tests/Trading_Service/Offer_Importer.h b/TAO/orbsvcs/tests/Trading_Service/Offer_Importer.h
deleted file mode 100644
index 2ef86269d40..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/Offer_Importer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id$
-
-// ========================================================================
-//
-// = FILE
-// Offer_Importer.h
-//
-// = DESCRIPTION
-// Class that tests the Trading Service's Lookup Interface
-//
-// = AUTHOR
-// Seth Widoff <sbw1@cs.wustl.edu>
-//
-// =======================================================================
-
-#ifndef TAO_OFFER_IMPORTER
-#define TAO_OFFER_IMPORTER
-
-#include "TT_Info.h"
-
-class TAO_Offer_Importer
-{
-public:
-
- TAO_Offer_Importer (CosTrading::Lookup_ptr lookup_if);
-
- void perform_queries (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName));
-
- void perform_federated_queries (CORBA::Environment& _env)
- TAO_THROW_SPEC ((CORBA::SystemException,
- CosTrading::IllegalServiceType,
- CosTrading::UnknownServiceType,
- CosTrading::IllegalConstraint,
- CosTrading::Lookup::IllegalPreference,
- CosTrading::Lookup::IllegalPolicyName,
- CosTrading::Lookup::PolicyTypeMismatch,
- CosTrading::Lookup::InvalidPolicyValue,
- CosTrading::IllegalPropertyName,
- CosTrading::DuplicatePropertyName,
- CosTrading::DuplicatePolicyName));
-private:
-
- void display_results (const CosTrading::OfferSeq& offer_seq,
- CosTrading::OfferIterator_ptr offer_iterator,
- CORBA::Environment& _env) const
- TAO_THROW_SPEC ((CORBA::SystemException));
-
- CosTrading::Lookup_var lookup_;
-
-};
-
-#endif /* TAO_OFFER_IMPORTER */
diff --git a/TAO/orbsvcs/tests/Trading_Service/TT_Info.cpp b/TAO/orbsvcs/tests/Trading_Service/TT_Info.cpp
deleted file mode 100644
index f4bb8621265..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/TT_Info.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-#include "TT_Info.h"
-#include "orbsvcs/Trader/Property_Evaluator.h"
-
-const char* TT_Info::INTERFACE_NAMES[] =
-{
- "Remote_IO",
- "Plotter",
- "Printer",
- "File_System",
- "PostScript_Printer"
-};
-
-const char* TT_Info::REMOTE_IO_NAME = "Remote_IO";
-
-const char* TT_Info::REMOTE_IO_PROPERTY_NAMES[] =
-{
- "Name",
- "Aliases",
- "Location",
- "Description"
-};
-
-CORBA::TypeCode_ptr TT_Info::REMOTE_IO_PROPERTY_TYPES[] =
-{
- CORBA::_tc_string,
- CORBA::_tc_string,
- CORBA::_tc_string
-};
-
-CosTradingRepos::ServiceTypeRepository::PropertyMode
-TT_Info::REMOTE_IO_PROPERTY_MODES[] =
-{
- CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
-};
-
-const char* TT_Info::PLOTTER_NAME = "Plotter";
-
-const char* TT_Info::PLOTTER_PROPERTY_NAMES[] =
-{
- "Num_Colors",
- "Auto_Loading",
- "Cost_Per_Page",
- "Model_Number",
- "User_Queue",
- "File_Sizes_Pending"
-};
-
-CORBA::TypeCode_ptr TT_Info::PLOTTER_PROPERTY_TYPES[] =
-{
- CORBA::_tc_long,
- CORBA::_tc_boolean,
- CORBA::_tc_float,
- CORBA::_tc_string,
- TAO_Sequences::_tc_StringSeq,
- TAO_Sequences::_tc_ULongSeq
-};
-
-CosTradingRepos::ServiceTypeRepository::PropertyMode
-TT_Info::PLOTTER_PROPERTY_MODES[] =
-{
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL
-};
-
-const char* TT_Info::PRINTER_NAME = "Printer";
-
-const char* TT_Info::PRINTER_PROPERTY_NAMES[] =
-{
- "Color",
- "Double_Sided",
- "Cost_Per_Page",
- "Model_Number",
- "Pages_Per_Sec",
- "User_Queue",
- "File_Sizes_Pending"
-};
-
-CORBA::TypeCode_ptr TT_Info::PRINTER_PROPERTY_TYPES[] =
-{
- CORBA::_tc_boolean,
- CORBA::_tc_boolean,
- CORBA::_tc_float,
- CORBA::_tc_string,
- CORBA::_tc_ushort,
- TAO_Sequences::_tc_StringSeq,
- TAO_Sequences::_tc_ULongSeq
-};
-
-CosTradingRepos::ServiceTypeRepository::PropertyMode
-TT_Info::PRINTER_PROPERTY_MODES[] =
-{
- CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL
-};
-
-const char* TT_Info::FILESYSTEM_NAME = "File_System";
-
-const char* TT_Info::FILESYSTEM_PROPERTY_NAMES[] =
-{
- "Disk_Space",
- "Space_Remaining",
- "Permission_Level"
-};
-
-CORBA::TypeCode_ptr TT_Info::FILESYSTEM_PROPERTY_TYPES[] =
-{
- CORBA::_tc_ulong,
- CORBA::_tc_ulong,
- CORBA::_tc_ushort
-};
-
-CosTradingRepos::ServiceTypeRepository::PropertyMode
-TT_Info::FILESYSTEM_PROPERTY_MODES[] =
-{
- CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL,
- CosTradingRepos::ServiceTypeRepository::PROP_NORMAL
-};
-
-const char* TT_Info::PS_PRINTER_PROPERTY_NAMES[] =
-{
- "Version"
-};
-
-
-const char* TT_Info::PS_PRINTER_NAME = "PostScript_Printer";
-
-CORBA::TypeCode_ptr TT_Info::PS_PRINTER_PROPERTY_TYPES[] =
-{
- CORBA::_tc_ushort
-};
-
-CosTradingRepos::ServiceTypeRepository::PropertyMode
-TT_Info::PS_PRINTER_PROPERTY_MODES[] =
-{
- CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY
-};
-
-const char* TT_Info::LOCATIONS[] =
-{
- "Bryan 509",
- "Bryan 503",
- "Dunker 102",
- "Jolley 408",
- "Lopata 401",
- "January 110",
- "Cupples I 30",
- "Cupples II 201",
- "Urbauer 321",
- "Umrath 302",
- "Wilson 110",
- "Olin 239",
- "Simon 238",
- "Rebstock 232",
- "McMillan 123"
-};
-
-const char* TT_Info::USERS[] =
-{
- "sbw1",
- "schmidt",
- "naga",
- "alex",
- "mk1",
- "marina",
- "sumedh",
- "sergio",
- "coryan",
- "cdgill",
- "levine",
- "jxh",
- "irfan",
- "nanbor",
- "eea1",
- "brunsch"
-};
-
-const char* TT_Info::MODEL_NUMBERS[] =
-{
- "HP238293892bn2398",
- "PK92839nkse092309",
- "8328323n293kljs98",
- "29309sjdkq34jksd2",
- "09q834efjhqw834q3",
- "q9834fdkjwq0934kf",
- "q834jfda09q834djk",
- "kajsd09q384kjda90",
- "9p83q4jklsdj098q3",
- "09a834ojfda09wu3r",
- "09234kejdfq934jed",
- "0q83kjefd09384jda",
- "asdfj0283jkdf0923",
- "kladfp72wu34j230f",
- "9q834jidlj234ujof"
-};
-
-const int TT_Info::NUM_QUERIES = 1;
-const char* TT_Info::QUERIES[][3] =
-{
- {INTERFACE_NAMES[REMOTE_IO], "", ""}
-};
-
-
-void
-TT_Info::dump_properties (const CosTrading::PropertySeq& prop_seq)
-{
- CORBA::Environment env;
- TAO_Property_Evaluator prop_eval (prop_seq);
-
- for (int length = prop_seq.length (), k = 0; k < length; k++)
- {
- CORBA::Any* value = 0;
- CORBA::TypeCode_ptr tc = 0;
- ACE_DEBUG ((LM_DEBUG, "%30s: ", prop_seq[k].name.in ()));
- TAO_TRY
- {
- value = prop_eval.property_value(k, env);
- TAO_CHECK_ENV;
-
- tc = value->type ();
- }
- TAO_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG, "Error retrieving property value.\n"));
- }
- TAO_ENDTRY;
-
- if (tc == 0)
- continue;
- else if (tc->equal (CORBA::_tc_float, env))
- {
- CORBA::Float f;
- (*value) >>= f;
- ACE_DEBUG ((LM_DEBUG, "%f\n", f));
- }
- else if (tc->equal (CORBA::_tc_double, env))
- {
- CORBA::Double d;
- (*value) >>= d;
- ACE_DEBUG ((LM_DEBUG, "%f\n", d));
- }
- else if (tc->equal (CORBA::_tc_boolean, env))
- {
- CORBA::Boolean b = 0;
- (*value) >>= CORBA::Any::to_boolean(b);
- ACE_DEBUG ((LM_DEBUG, "%s\n", b ? "TRUE" : "FALSE"));
- }
- else if (tc->equal (CORBA::_tc_short, env))
- {
- CORBA::Short s;
- (*value) >>= s;
- ACE_DEBUG ((LM_DEBUG, "%d\n", s));
- }
- else if (tc->equal (CORBA::_tc_ushort, env))
- {
- CORBA::UShort u;
- (*value) >>= u;
- ACE_DEBUG ((LM_DEBUG, "%d\n", u));
- }
- else if (tc->equal (CORBA::_tc_ulong, env))
- {
- CORBA::ULong ulong;
- (*value) >>= ulong;
- ACE_DEBUG ((LM_DEBUG, "%d\n", ulong));
- }
- else if (tc->equal (CORBA::_tc_string, env))
- {
- CORBA::String_var s;
- (*value) >>= s.out ();
- ACE_DEBUG ((LM_DEBUG, "%s\n", s.in ()));
- }
- else if (tc->equal (TAO_Sequences::_tc_StringSeq, env))
- {
- TAO_Sequences::StringSeq str_seq;
- //(*value) >>= str_seq;
-
- for (int length = str_seq.length (), i = 0; i < length; i++)
- ACE_DEBUG ((LM_DEBUG, "%s ", (const char *) str_seq[i]));
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
- }
- else if (tc->equal (TAO_Sequences::_tc_ULongSeq, env))
- {
- TAO_Sequences::ULongSeq ulong_seq;
- // (*value) >>= ulong_seq;
-
- for (int length = ulong_seq.length (), i = 0; i < length; i++)
- ACE_DEBUG ((LM_DEBUG, "%d ", ulong_seq[i]));
-
- ACE_DEBUG ((LM_DEBUG, "\n"));
- }
- }
-}
-
diff --git a/TAO/orbsvcs/tests/Trading_Service/TT_Info.h b/TAO/orbsvcs/tests/Trading_Service/TT_Info.h
deleted file mode 100644
index 736fe4f0093..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/TT_Info.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#ifndef TAO_TRADER_TEST_UTILS_H
-#define TAO_TRADER_TEST_UTILS_H
-
-#include "TTestS.h"
-#include "orbsvcs/SequencesC.h"
-#include "orbsvcs/CosTradingC.h"
-
-class TT_Info
-{
-public:
-
- static void dump_properties (const CosTrading::PropertySeq& prop_seq);
- // Dump the contents of this property sequence.
-
- enum INTERFACES
- {
- REMOTE_IO,
- PLOTTER,
- PRINTER,
- FILESYSTEM,
- PS_PRINTER
- };
-
- class Remote_Output : public POA_TAO_Trader_Test::Remote_Output
- {
- public:
- Remote_Output (void) {}
- };
-
- class Printer : public POA_TAO_Trader_Test::Printer
- {
- public:
- Printer (void) {}
- };
-
- class Plotter : public POA_TAO_Trader_Test::Plotter
- {
- public:
- Plotter (void) {}
- };
-
- class File_System : public POA_TAO_Trader_Test::File_System
- {
- public:
- File_System (void) {}
- };
-
- class PostScript_Printer : public POA_TAO_Trader_Test::PostScript_Printer
- {
- public:
- PostScript_Printer (void) {}
- };
-
-#define NUM_TYPES 5
- static const char* INTERFACE_NAMES[];
-
- // = Remote IO property descriptions
-
- enum REMOTE_IO_PROPERTIES
- {
- NAME,
- LOCATION,
- DESCRIPTION
- };
-
- static const char* REMOTE_IO_NAME;
- static const char* REMOTE_IO_PROPERTY_NAMES[];
- static CORBA::TypeCode_ptr REMOTE_IO_PROPERTY_TYPES[];
- static CosTradingRepos::ServiceTypeRepository::PropertyMode REMOTE_IO_PROPERTY_MODES[];
-
-
- // = Plotter property descriptions
-
- enum PLOTTER_PROPERTIES
- {
- PLOTTER_NUM_COLORS,
- PLOTTER_AUTO_LOADING,
- PLOTTER_COST_PER_PAGE,
- PLOTTER_MODEL_NUMBER,
- PLOTTER_USER_QUEUE,
- PLOTTER_FILE_SIZES_PENDING
- };
-
- static const char* PLOTTER_NAME;
- static const char* PLOTTER_PROPERTY_NAMES[];
- static CORBA::TypeCode_ptr PLOTTER_PROPERTY_TYPES[];
- static CosTradingRepos::ServiceTypeRepository::PropertyMode PLOTTER_PROPERTY_MODES[];
-
- // = Printer property descriptions
-
- enum PRINTER_PROPERTIES
- {
- PRINTER_COLOR,
- PRINTER_DOUBLE_SIDED,
- PRINTER_COST_PER_PAGE,
- PRINTER_MODEL_NUMBER,
- PRINTER_PAGES_PER_SEC,
- PRINTER_USER_QUEUE,
- PRINTER_FILE_SIZES_PENDING
- };
-
- static const char* PRINTER_NAME;
- static const char* PRINTER_PROPERTY_NAMES[];
- static CORBA::TypeCode_ptr PRINTER_PROPERTY_TYPES[];
- static CosTradingRepos::ServiceTypeRepository::PropertyMode PRINTER_PROPERTY_MODES[];
-
- // = File System Property Descriptions
-
- enum FILESYSTEM_PROPERTIES
- {
- DISK_SIZE,
- SPACE_REMAINING,
- PERMISSION_LEVEL
- };
-
- static const char* FILESYSTEM_NAME;
- static const char* FILESYSTEM_PROPERTY_NAMES[];
- static CORBA::TypeCode_ptr FILESYSTEM_PROPERTY_TYPES[];
- static CosTradingRepos::ServiceTypeRepository::PropertyMode FILESYSTEM_PROPERTY_MODES[];
-
-
- // = PostScript Printer property descriptions.
-
- enum PS_PRINTER_PROPERTIES
- {
- VERSION
- };
-
- static const char* PS_PRINTER_NAME;
- static const char* PS_PRINTER_PROPERTY_NAMES[];
- static CORBA::TypeCode_ptr PS_PRINTER_PROPERTY_TYPES[];
- static CosTradingRepos::ServiceTypeRepository::PropertyMode PS_PRINTER_PROPERTY_MODES[];
-
- // = Offer Info
-
-#define NUM_OFFERS 15
- static const char* LOCATIONS[];
- static const char* USERS[];
- static const char* MODEL_NUMBERS[];
-
- // = Query info
-
- static const int NUM_QUERIES;
- static const char* QUERIES[][3];
-};
-
-#endif /* TAO_TRADER_TEST_UTILS_H */
diff --git a/TAO/orbsvcs/tests/Trading_Service/TTest.idl b/TAO/orbsvcs/tests/Trading_Service/TTest.idl
deleted file mode 100644
index 59145c58dc3..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/TTest.idl
+++ /dev/null
@@ -1,28 +0,0 @@
-module TAO_Trader_Test
-{
-
-interface Remote_Output
-{
-};
-
-interface Plotter : Remote_Output
-{
-};
-
-interface Printer : Remote_Output
-{
-};
-
-interface File_System : Remote_Output
-{
-};
-
-interface PostScript_Printer : Remote_Output
-{
-};
-
-};
-
-
-
-
diff --git a/TAO/orbsvcs/tests/Trading_Service/export_test.cpp b/TAO/orbsvcs/tests/Trading_Service/export_test.cpp
deleted file mode 100644
index e4a462af2ca..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/export_test.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-#include "Offer_Exporter.h"
-#include "Service_Type_Exporter.h"
-
-int
-main (int argc, char** argv)
-{
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Bootstrap to the Lookup interface.
- ACE_DEBUG ((LM_ERROR, "Bootstrap to the Lookup interface.\n"));
- CORBA::Object_var trading_obj =
- orb->resolve_initial_references ("TradingService");
-
- if (CORBA::is_nil (trading_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- -1);
-
- // Narrow the lookup interface.
- ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n"));
- CosTrading::Lookup_var lookup_if =
- CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Obtain the register interface
- ACE_DEBUG ((LM_DEBUG, "Obtaining the register interface.\n"));
- CosTrading::Register_var register_if =
- lookup_if->register_if (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Obtain the Service Type Repository.
- ACE_DEBUG ((LM_DEBUG, "Obtaining the Service Type Repository.\n"));
- CosTrading::TypeRepository_ptr obj = lookup_if->type_repos (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Narrow the Service Type Repository.
- ACE_DEBUG ((LM_DEBUG, "Narrowing the Service Type Repository.\n"));
- CosTradingRepos::ServiceTypeRepository_var tr =
- CosTradingRepos::ServiceTypeRepository::_narrow (obj, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- /*
- // Run the Service Type Exporter tests
- ACE_DEBUG ((LM_DEBUG, "Running the Service Type Exporter tests.\n"));
- TAO_Service_Type_Exporter type_exporter (tr.ptr ());
-
- type_exporter.remove_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- type_exporter.add_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- type_exporter.list_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- type_exporter.describe_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- type_exporter.fully_describe_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Run the Offer Exporter tests
- ACE_DEBUG ((LM_DEBUG, "Running the Offer Exporter tests.\n"));
- TAO_Offer_Exporter offer_exporter (register_if.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.withdraw_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.export_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.modify_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.withdraw_offers_using_constraints (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.withdraw_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_exporter.export_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Begin trading!
- if (orb->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1);
- */
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("main");
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "Trader Export Tests Failed"), -1);
- }
- TAO_ENDTRY;
-}
diff --git a/TAO/orbsvcs/tests/Trading_Service/import_test.cpp b/TAO/orbsvcs/tests/Trading_Service/import_test.cpp
deleted file mode 100644
index 9398d052c1e..00000000000
--- a/TAO/orbsvcs/tests/Trading_Service/import_test.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include "Offer_Importer.h"
-
-int
-main (int argc, char** argv)
-{
- TAO_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
-
- // Bootstrap to the Lookup interface.
- ACE_DEBUG ((LM_ERROR, "Bootstrap to the Lookup interface.\n"));
- CORBA::Object_var trading_obj =
- orb->resolve_initial_references ("TradingService");
-
- if (CORBA::is_nil (trading_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- -1);
-
- // Narrow the lookup interface.
- ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n"));
- CosTrading::Lookup_var lookup_if =
- CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Run the Offer Importer tests
- ACE_DEBUG ((LM_DEBUG, "Running the Offer Importer tests.\n"));
- TAO_Offer_Importer offer_importer (lookup_if.in ());
-
- offer_importer.perform_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- offer_importer.perform_federated_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "Trader Import Tests Failed."), -1);
- }
- TAO_ENDTRY;
-}