summaryrefslogtreecommitdiff
path: root/ace/CLASSIX/Addr.h
blob: 77664defc356391c552d235b136ab78efd5acf25 (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
93
94
95
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    ipp_ace
// 
// = FILENAME
//    CLASSIX_Addr.h
//
// = AUTHOR
//    Wei Chiang
//
// = COPYRIGHT
//     Copyright 1998 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 <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 "CLASSIX/Addr.i"
#endif /* __ACE_INLINE__ */

#endif /* ACE_CLASSIX_ADDR_H */