OpenDDS  Snapshot(2023/04/28-20:55)
Ice.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_DCPS_ICE_H
9 #define OPENDDS_DCPS_ICE_H
10 
11 #include "dcps_export.h"
12 #include "GuidUtils.h"
13 #include "PoolAllocationBase.h"
14 #include "PoolAllocator.h"
15 #include "Serializer.h"
16 
17 #include "dds/DdsDcpsInfoUtilsC.h"
18 
19 #include "ace/INET_Addr.h"
20 
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 
26 
27 namespace OpenDDS {
28 namespace ICE {
29 
30 enum AgentType {
31  FULL = 0x0,
32  LITE = 0x1,
33 };
34 
36  HOST = 0x0,
39  RELAYED = 0x3,
40 };
41 
43 
45 
47  // Transport - UDP or TCP
48  std::string foundation;
49  // Component ID
50  ACE_UINT32 priority;
52  // Related Address and Port
53  // Extensibility Parameters
54 
55  ACE_INET_Addr base; // Not sent.
56 
57  bool operator==(const Candidate& other) const
58  {
59  return
60  this->address == other.address &&
61  this->foundation == other.foundation &&
62  this->priority == other.priority &&
63  this->type == other.type;
64  }
65 };
66 
67 struct AgentInfo {
68 
70 
71  typedef OPENDDS_VECTOR(Candidate) CandidatesType;
72  typedef CandidatesType::const_iterator const_iterator;
73 
74  CandidatesType candidates;
76  // Connectivity-Check Pacing Value
77  std::string username;
78  std::string password;
79  // Extensions
80 
81  const_iterator begin() const
82  {
83  return candidates.begin();
84  }
85  const_iterator end() const
86  {
87  return candidates.end();
88  }
89  bool operator==(const AgentInfo& other) const
90  {
91  return
92  this->username == other.username &&
93  this->password == other.password &&
94  this->type == other.type &&
95  this->candidates == other.candidates;
96  }
97  bool operator!=(const AgentInfo& other) const
98  {
99  return !(*this == other);
100  }
101 };
102 
103 typedef OPENDDS_MAP(OPENDDS_STRING, ICE::AgentInfo) AgentInfoMap;
104 
105 } // namespace ICE
106 } // namespace OpenDDS
107 
109 
110 #endif /* OPENDDS_ICE_H */
AgentType type
Definition: Ice.h:75
bool operator==(const Candidate &other) const
Definition: Ice.h:57
typedef OPENDDS_MAP(OPENDDS_STRING, ICE::AgentInfo) AgentInfoMap
ACE_INET_Addr base
Definition: Ice.h:55
AgentType
Definition: Ice.h:30
bool operator==(const AgentInfo &other) const
Definition: Ice.h:89
ACE_INET_Addr address
Definition: Ice.h:46
#define OPENDDS_STRING
bool operator!=(const AgentInfo &other) const
Definition: Ice.h:97
CandidatesType::const_iterator const_iterator
Definition: Ice.h:72
CandidateType type
Definition: Ice.h:51
std::string username
Definition: Ice.h:77
CandidatesType candidates
Definition: Ice.h:74
std::string foundation
Definition: Ice.h:48
const_iterator end() const
Definition: Ice.h:85
const_iterator begin() const
Definition: Ice.h:81
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
std::string password
Definition: Ice.h:78
CandidateType
Definition: Ice.h:35
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
ACE_UINT32 priority
Definition: Ice.h:50
typedef OPENDDS_VECTOR(ACE_INET_Addr) AddressListType