Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Bug_3068_Regression / test_i.h
blob3eaeba850d69a3d80aeddc07a4b08f4b297213ca
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file test_i.h
7 * @author Balachandran Natarajan <bala@cs.wustl.edu>
8 */
9 //=============================================================================
12 #ifndef TAO_BIDIRECTIONAL_TEST_I_H
13 #define TAO_BIDIRECTIONAL_TEST_I_H
15 #include "testS.h"
16 #include "ace/Task.h"
17 #include "ace/Synch.h"
18 #include "ace/Condition_T.h"
20 class Caller : public ACE_Task_Base
22 public:
23 Caller (Callback_ptr cb, CORBA::ORB_ptr orb);
24 void go ();
26 int svc ();
28 private:
29 Callback_var cbobj_;
30 CORBA::ORB_var orb_;
31 TAO_SYNCH_MUTEX lock_;
32 ACE_Condition<TAO_SYNCH_MUTEX> cond_;
33 bool going_;
34 CORBA::OctetSeq payload_;
38 /**
39 * @class Callback_i
41 * @brief A callback object to the "client"
43 * To test that the server can call the client on the same
44 * connection that was established by the client
46 class Callback_i : public POA_Callback
48 public:
49 /// ctor
50 Callback_i (CORBA::ORB_ptr orb);
52 /// Safe way to shutdown
53 void shutdown ();
55 /// The callback method
56 void callback_method (const CORBA::OctetSeq& payload);
58 private:
59 /// The orb
60 CORBA::ORB_var orb_;
63 /**
64 * @class Simple_Server_i
66 * @brief Simpler Server implementation
68 * Implements the Simple_Server interface in test.idl
69 * for (int loop = 0; loop < 10; loop++)
71 class Simple_Server_i : public POA_Simple_Server
73 public:
74 /// ctor
75 Simple_Server_i (CORBA::ORB_ptr orb);
77 // = The Simple_Server methods.
78 void ow_test ();
80 CORBA::Long test_method (CORBA::Boolean do_callback);
82 void callback_object (Callback_ptr callback);
84 void shutdown ();
86 private:
87 /// The ORB
88 CORBA::ORB_var orb_;
90 /// Callback Object
91 Caller *caller_;
93 /// Number of times the callback needs to be called
94 int ow_count_;
97 #if defined(__ACE_INLINE__)
98 #include "test_i.inl"
99 #endif /* __ACE_INLINE__ */
101 #endif /* TAO_BIDIRECTIONAL_TEST_I_H */