summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Interoperable_Naming/ncontextext_client_i.h
blob: 11f367176f8b69808854aa04dd34c8a08ce08f5b (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
// -*- C++ -*-
// $Id$

// ===========================================================
//
// = LIBRARY
//    TAO/ORBSVCS/tests/SimpleNaming
//
// = FILENAME
//    ncontextext_client_i.h
//
// = DESCRIPTION
//    This class implements a simple CORBA client which
//    converts a Name to a string and viceversa, forms a IIOPNAME
//    url address and can resolve a stringified name.
//
// = AUTHORS
//    Priyanka Gontla <pgontla@ece.uci.edu>
//
//============================================================


#if !defined (NCONTEXTEXT_CLIENT_I_H)
#define NCONTEXTEXT_CLIENT_I_H

#include "Web_ServerC.h"
#include "orbsvcs/orbsvcs/CosNamingC.h"

class NContextExt_Client_i
{
  // = TITLE
  //     NContextExt Client Implementation
  //
  // = DESCRIPTION
  //

 public:
  // = COnstructor and destructor.
  NContextExt_Client_i (void);
  ~NContextExt_Client_i (void);

  int run (ACE_ENV_SINGLE_ARG_DECL);
  // Execute the client example code.

  int init (int argc, char **argv);
  // Initialize the client communication endpoint with the server.

 private:

  int parse_args (void);
  // Parses the arguments passed on the command line.

  void print_values (CosNaming::Name name,
                     CORBA::String_var str_name,
                     CosNaming::Name nm,
                     CORBA::String_var obj_name,
                     CORBA::String_var url_string);
  // Prints the values of the original name, strigified name and
  // destringified name. Also, prints the value of the address of the
  // naming context, a name that identifies a binding in that naming
  // context and the corresponding iioploc URL
  // representation.

  char * get_name (void);
  // Generates a random name

    int argc_;
  // # of arguments on the command line.

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

  CosNaming::NamingContextExt_var naming_context_;
  // Naming context

  CORBA::Boolean view_;
  // Flag to check if '-v' option is set.

};

#endif /* NCONTEXTEXT_CLIENT_I_H */