blob: 998d2e17895b55805896b8346e25c81467af0926 (
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
|
// -*- c++ -*-
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO/tests/Concurrency
//
// = FILENAME
// CC_naming_service.h
//
// = DESCRIPTION
// This class implements the naming services necessary to test the
// concurrency service.
//
// = AUTHORS
// Torben Worm <tworm@cs.wustl.edu>
//
// ============================================================================
#include "tao/corba.h"
#include "orbsvcs/CosConcurrencyControlC.h"
#include "orbsvcs/CosNamingC.h"
#if !defined (_CC_NAMING_SERVICE_H_)
#define _CC_NAMING_SERVICE_H_
class CC_naming_service
{
// = TITLE
// Defines a class that encapsulates the necessary naming service
// functions for the concurrency service.
//
// = DESCRIPTION
// This class declares an interface to the naming service for the
// concurrency service tests.
public:
CC_naming_service (CORBA::ORB_var orb_);
// Default constructor
~CC_naming_service (void);
// Default destructor.
CORBA::Object_var get_obj_from_name (char *c_name, char *name,
CORBA::Environment &_env);
// Lookup a name in the naming service (context, name)
void
bind_name (char *n,
CORBA::Object_ptr obj,
CORBA::Environment &_env);
// Bind a name in the concurrency context.
CosConcurrencyControl::LockSetFactory_var get_lock_set_factory (void);
// Gets the cc lock set factory which is common for all tests.
private:
int init_naming_service (void);
// Function to initialize the naming service.
CosNaming::NamingContext_var naming_context_;
// Naming service object for this object.
char *cc_factory_key_;
// Key of factory obj ref.
CORBA::ORB_var orb_;
// Remember our orb.
CosConcurrencyControl::LockSetFactory_var factory_;
// factory pointer for the lock set.
};
#endif /* !defined (_CC_NAMING_SERVICE_H_) */
|