Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / BiDirectional / test_i.h
blob7536e63f0d68dc63d71b742e64281f8860d82edb
2 //=============================================================================
3 /**
4 * @file test_i.h
6 * @author Balachandran Natarajan <bala@cs.wustl.edu>
7 */
8 //=============================================================================
11 #ifndef TAO_BIDIRECTIONAL_TEST_I_H
12 #define TAO_BIDIRECTIONAL_TEST_I_H
14 #include "testS.h"
16 /**
17 * @class Callback_i
19 * @brief A callback object to the "client"
21 * To test that the server can call the client on the same
22 * connection that was established by the client
24 class Callback_i : public POA_Callback
26 public:
27 /// ctor
28 Callback_i (CORBA::ORB_ptr orb);
30 /// Safe way to shutdown
31 void shutdown (void);
33 /// The callback method
34 void callback_method (void);
36 private:
37 /// The orb
38 CORBA::ORB_var orb_;
42 /**
43 * @class Simple_Server_i
45 * @brief Simpler Server implementation
47 * Implements the Simple_Server interface in test.idl
49 class Simple_Server_i : public POA_Simple_Server
51 public:
52 /// ctor
53 Simple_Server_i (CORBA::ORB_ptr orb, int no_iterations);
55 // = The Simple_Server methods.
56 CORBA::Long test_method (CORBA::Boolean do_callback);
58 void callback_object (Callback_ptr callback);
60 void shutdown (void);
62 int call_client (void);
64 private:
65 /// The ORB
66 CORBA::ORB_var orb_;
68 /// Flag to indicate, whether we are ready for a remote call.
69 int flag_;
71 /// Callback Object
72 Callback_var callback_;
74 /// Number of times the callback needs to be called
75 int no_iterations_;
78 #if defined(__ACE_INLINE__)
79 #include "test_i.inl"
80 #endif /* __ACE_INLINE__ */
82 #endif /* TAO_BIDIRECTIONAL_TEST_I_H */