summaryrefslogtreecommitdiff
path: root/TAO/examples/Callback_Quoter/Server_i.h
blob: 3467cb4e7c3e2e593f06721c111ce2207edc8d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* -*- C++ -*- */
// $Id$

// ===========================================================
//
//
// = LIBRARY
//    TAO/examples/Callback_Quoter
//
// = FILENAME
//    Server_i.h
//
// = DESCRIPTION
//    Definition of the Callback_Quoter Server_i class.
//
// = AUTHOR
//    Kirthika Parameswaran <kirthika@cs.wustl.edu>
//
// ===========================================================

#if !defined (SERVER_I_H)
#define SERVER_I_H

#include "Supplier_i.h"
#include "SupplierS.h"
#include "tao/TAO.h"
#include "orbsvcs/CosNamingS.h"
#include "orbsvcs/Naming/Naming_Utils.h"

class Server_i
{
  // = TITLE
  //    The class defines the callback quoter server. It sets up the Orb
  //    manager and registers the Supplier servant object.

public:
  // = Initialization and termination methods.
  Server_i (void);
  // Constructor.

  ~Server_i (void);
  // Destructor.

  int init (int argc,
	    char *argv[],
	    CORBA::Environment &env);
  // Initialize the server.

  int run (CORBA::Environment &env);
  // Run the ORB.

private:
  int parse_args (void);
  // Parses the command line arguments.

  int init_naming_service (CORBA::Environment &env);
  // Initialises the name server and registers the Echo server object
  // name with the name server.

  FILE *ior_output_file_;
  // File where the IOR of the server object is stored.

  int argc_;
  // Number of command line arguments.

  char **argv_;
  // The command line arguments.

  CosNaming::NamingContext_var naming_context_;
  // Naming context for the naming service.

  TAO_Naming_Server naming_server_;
  // An instance of the name server, wherein the naming context
  // containg the factory of objects will be registered.

  TAO_ORB_Manager orb_manager_;
  // The tao orb manager object.

  Supplier_i supplier_i_;
  // The servant object registered with the orb.

  int using_naming_service_;
  // This specifies whether the naming service is to be used.
};

#endif /* SERVER_I_H */