blob: 7e174e7ff93495efc89e2eda3270cb5103af221c (
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
|
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO/orbsvcs/ImplRepo_Service
//
// = FILENAME
// Repository.h
//
// = DESCRIPTION
// This class implements the Repository for the Implementation Repository.
//
// = AUTHOR
// Darrell Brunsch <brunsch@cs.wustl.edu>
//
// ============================================================================
#if !defined (REPOSITORY_H)
#define REPOSITORY_H
#include "ace/Naming_Context.h"
class Repository
{
public:
Repository ();
// Default Constructor
struct Record
{
char *comm_line;
char *env;
char *wdir;
char *host;
unsigned short port;
char *ping_ior;
};
int add (const char *key, const Repository::Record &rec);
// Add a new server to the Repository
int update (const char *key, const Repository::Record &rec);
// Updates an existing key with <rec>
int remove (const char *key);
// Removes the server from the Repository
int resolve (const char *key, Repository::Record &rec);
// Find the key record in the Repository
// = Accessor methods
int get_comm_line (const char *key, char *&comm_line);
int get_env (const char *key, char *&env);
int get_wdir (const char *key, char *&wdir);
int get_ping_ior (const char *key, char *&ping_ior);
int get_hostport (const char *key, char *&host, unsigned short &port);
// Dump method
void dump (void);
private:
ACE_Naming_Context repository_;
};
#endif /* REPOSITORY_H */
|