1 #define ACE_BUILD_SVC_DLL
3 #include "ace/Stream.h"
5 #include "ace/Module.h"
6 #include "ace/svc_export.h"
9 typedef ACE_Task
<ACE_SYNCH
> MT_Task
;
10 typedef ACE_Stream
<ACE_SYNCH
> MT_Stream
;
11 typedef ACE_Module
<ACE_SYNCH
> MT_Module
;
13 class ACE_Svc_Export Test_Task
: public MT_Task
16 //FUZZ: disable check_for_lack_ACE_OS
17 virtual int open (void *);
18 virtual int close (u_long
);
19 //FUZZ: enable check_for_lack_ACE_OS
21 virtual int init (int, ACE_TCHAR
*[]);
23 virtual int suspend ();
24 virtual int resume ();
28 Test_Task::open (void *)
31 ACE_TEXT ("opening %s\n"),
32 this->name () ? this->name () : ACE_TEXT ("task")));
37 Test_Task::close (u_long
)
40 ACE_TEXT ("closing %s\n"),
41 this->name () ? this->name () : ACE_TEXT ("task")));
49 ACE_TEXT ("suspending in %s\n"),
50 this->name () ? this->name () : ACE_TEXT ("task")));
58 ACE_TEXT ("resuming in %s\n"),
59 this->name () ? this->name () : ACE_TEXT ("task")));
64 Test_Task::init (int, ACE_TCHAR
*[])
67 ACE_TEXT ("initializing %s\n"),
68 this->name () ? this->name () : ACE_TEXT ("task")));
77 ACE_TEXT ("finalizing %s (%@)\n"),
78 this->name () ? this->name () : ACE_TEXT ("task"),
83 // Factories used to control configuration.
85 ACE_SVC_FACTORY_DECLARE (Test_Task
)
86 ACE_SVC_FACTORY_DEFINE (Test_Task
)
88 // Dynamically linked functions used to control configuration.
90 extern "C" ACE_Svc_Export MT_Stream
*make_stream ();
91 extern "C" ACE_Svc_Export MT_Module
*make_da ();
92 extern "C" ACE_Svc_Export MT_Module
*make_ea ();
93 extern "C" ACE_Svc_Export MT_Module
*make_mr ();
104 return new MT_Module (ACE_TEXT ("Device_Adapter"),
105 new Test_Task
, new Test_Task
);
111 return new MT_Module (ACE_TEXT ("Event_Analyzer"),
112 new Test_Task
, new Test_Task
);
118 return new MT_Module (ACE_TEXT ("Multicast_Router"),
119 new Test_Task
, new Test_Task
);