summaryrefslogtreecommitdiff
path: root/ace/CLASSIX/CLASSIX_Addr.h
blob: f3cbae992ffd14ef6aac5d26767651c85a046437 (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
82
83
84
85
86
87
88
89
90
91
92
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    ACE
// 
// = FILENAME
//    CLASSIX_Addr.h
//
// = AUTHOR
//    Nokia Telecommunications
//
// ============================================================================

#if !defined (ACE_CLASSIX_ADDR_H)
#define ACE_CLASSIX_ADDR_H

#include "ace/ACE.h"
#include "ace/Addr.h"

#include <ipc/chIpc.h>
#include <ace/CLASSIX/CLASSIX_OS.h>

class ACE_Export ACE_CLASSIX_Addr : public ACE_Addr
{
  // = TITLE
  //    Defines the ClassiX IPC address format.
  //    
  // = DESCRIPTION
  //   This class defines basic interfaces for "ACE-like" address for
  //   Chorus port.
public:
  enum 
  {
    ACE_CLASSIX_ADDR_UNKNOWN = ACE_INVALID_HANDLE, /* K_NONEPORT */
    ACE_CLASSIX_ADDR_DEFAULT = K_DEFAULTPORT,
    AF_CLASSIX               = AF_MAX + 1
  };
    
  enum Addr_Type
  {
    PORT,			// use Peer_Port
    GROUP,			// use Peer_Group
    STAMP,			// use peer_Stamp
    DYNAMIC,		        // use Peer_Group
    UNDEFINED
  };


  /* -----------------------------------------------------*/
  // = INITIALIZATION
  ACE_CLASSIX_Addr(int /* size of the underlying address structure*/);
  virtual ~ACE_CLASSIX_Addr (void);


  /* -----------------------------------------------------*/
  // = Direct initialization methods (useful after the object has been
  // constructed).
  // Returns 0 on success, -1 otherwise.
  // 

  /* -----------------------------------------------------*/
  // = ACCESS
  // 
  virtual const KnUniqueId& get_id (void) const;
  // Returns a reference to the unique identifier

  virtual ACE_HANDLE get_port_number(void) const;
  virtual ACE_HANDLE get_handle(void) const;
  // Returns the local port no( can be used as an ACE_HANDLE)

  virtual int is_configured(void) const;
  // Returns 1, if address information is proper; Returns 0 otherwise
  virtual ACE_CLASSIX_Addr::Addr_Type is_type(void) const;
  // returns the type of the address

  // = HELPER
  virtual void dump(void) const;

  ACE_ALLOC_HOOK_DECLARE;
  // Declares the dynamic allocation hooks.

private:
};

#if defined (__ACE_INLINE__)
#include "ace/CLASSIX/CLASSIX_Addr.i"
#endif /* __ACE_INLINE__ */

#endif /* ACE_CLASSIX_ADDR_H */