blob: 03e4f66d4e839d1a6a8b5dd5066393e247f0a054 (
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
|
// -*- C++ -*-
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO/orbsvcs/tests/ImplRepo
//
// = FILENAME
// IR_Helper.h
//
// = DESCRIPTION
// Class which contains basic operations needed by a server to use the IR.
//
// = AUTHORS
// Darrell Brunsch <brunsch@cs.wustl.edu>
//
// ============================================================================
#if !defined (IR_HELPER_H)
#define IR_HELPER_H
#include "tao/TAO.h"
#include "../../ImplRepo_Service/ImplRepoC.h"
class POA_Ping_Object;
class IR_Helper
// = TITLE
// Implementation Repository Helper Class
//
// = DESCRIPTION
// Contains basic IR operations required by a server.
//
{
public:
IR_Helper (char *server_name, PortableServer::POA_ptr poa, CORBA::ORB_ptr orb, int debug = 0);
// Constructor
~IR_Helper ();
// Destructor
void notify_startup (CORBA_Environment &_env = CORBA_Environment::default_environment ());
// Notify the IR that the server is now running.
void notify_shutdown (CORBA_Environment &_env = CORBA_Environment::default_environment ());
// Notify the IR that the server has been shut down.
int register_server (const char *comm_line,
const char *environment = "",
const char *working_dir = "",
CORBA_Environment &_env = CORBA_Environment::default_environment ());
// Tell the IR how to start yourself up.
void change_object (CORBA::Object_ptr obj,
CORBA_Environment &_env = CORBA_Environment::default_environment ());
// Convert an object into a IR controlled object.
private:
int read_ir_ior (CORBA_Environment &_env = CORBA_Environment::default_environment ());
char *name_;
char *ir_key_;
Implementation_Repository::INET_Addr *ir_addr_;
POA_Ping_Object *ping_;
CORBA::Object_ptr ping_ptr_;
Implementation_Repository *implrepo_;
PortableServer::POA_var poa_;
CORBA::ORB_var orb_;
int debug_;
};
#endif /* IR_HELPER_H */
|