Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / Time_Service / Server_i.h
bloba2d898301fbf1a42e369002284b0b8fb384fc7f5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Server_i.h
7 * @author Vishal Kachroo <vishal@cs.wustl.edu>
8 */
9 //=============================================================================
12 #ifndef SERVER_I_H
13 #define SERVER_I_H
15 #include "ace/Get_Opt.h"
16 #include "ace/Log_Msg.h"
17 #include "tao/Utils/ORB_Manager.h"
18 #include "orbsvcs/CosNamingC.h"
19 #include "orbsvcs/Naming/Naming_Client.h"
20 #include "orbsvcs/Time/TAO_Time_Service_Server.h"
22 /**
23 * @class Server_i
25 * @brief CORBA Server implementation.
27 * A CORBA server that initializes the <TimeService Server>
28 * servant implementation and the ORB.
30 class Server_i
32 public:
33 /// Constructor.
34 Server_i (void);
36 /// Destructor.
37 ~Server_i (void);
39 /// Initialize the Server state.
40 int init (int argc,
41 ACE_TCHAR *argv[]);
43 /// Run the orb.
44 int run (void);
46 /// Initialises the name client.
47 int init_naming_service ();
49 /// Create the time server object.
50 int create_server (void);
52 /// Register the time server object with the Naming Service.
53 int register_server (void);
55 /// Parse the commandline arguments.
56 int parse_args (int argc,
57 ACE_TCHAR* argv[]);
59 private:
61 /// My orb.
62 CORBA::ORB_var orb_;
64 /// The ORB manager.
65 TAO_ORB_Manager orb_manager_;
67 /// File where the IOR of the Clerk object is stored.
68 FILE *ior_output_file_;
70 /// An instance of the name server used for registering the
71 /// <TimeService Server> object.
72 TAO_Naming_Client naming_client_;
74 /// Implementation of the <TimeService> Server object.
75 TAO_Time_Service_Server *time_service_server_impl_;
77 /// Reference of the time server.
78 CosTime::TimeService_var time_service_server_;
80 /// Naming context for the Naming Service.
81 CosNaming::NamingContext_var time_service_server_context_;
84 #endif /* SERVER_I_H */