summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/On_Demand_Loading/Dir_Service_i.h
blob: 46b0050d0a1481464aceb4bcc13b688c4e197d21 (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
// $Id$

// ================================================================
//
// = FILENAME
//     Dir_Service.h
//
// = DESCRIPTION
//     This is a customised servant-- a dynamic linked library which 
//     provides directory information.
//
// = AUTHOR
//     Kirthika Parameswaran <kirthika@cs.wustl.edu>
//
// ================================================================

#ifndef DIR_SERVICE_I_H
#define DIR_SERVICE_I_H

#include "Dir_ServiceS.h"

class GENERIC_SERVANT_Export Dir_Service_i : public POA_Dir_Service
{
  //=  TITLE
  //   Directory Service object.
  //
  //=  DESCRIPTION
  //   Provides directory assistance.
 public:
  
  Dir_Service_i (CORBA::ORB_ptr orb,
                 PortableServer::POA_ptr poa);
  // Initialization.
  
  ~Dir_Service_i (void);
  // Destruction.

  PortableServer::POA_ptr _default_POA (CORBA::Environment &env);
  // Returns the Default POA of this Servant object  

  CORBA::Long tele_number (const char* name,
                           CORBA::Environment &env );
  // The telephone number is returned.

  void end_note (CORBA::Environment &env);
  // Just a word of thanks.

  void area_codes_info (CORBA::Environment &env);
  // Extra area codes information provided.  

  void shutdown (CORBA::Environment &env);
  // Shutdown the ORB.
 
 private:
  CORBA::ORB_var orb_;
  // Keep a pointer to the ORB so we can shut it down.

  PortableServer::POA_var poa_;
  // Implement a different _default_POA()

};

#endif /* DIR_SERVICE_I_H */