Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Address.h
Go to the documentation of this file.
1 #ifndef QPID_ADDRESS_H
2 #define QPID_ADDRESS_H
3 
4 /*
5  *
6  * Copyright (c) 2006 The Apache Software Foundation
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 
22 #include "qpid/sys/IntegerTypes.h"
24 #include <iosfwd>
25 #include <string>
26 
27 namespace qpid {
28 namespace client { struct ConnectionSettings; }
29 
30 
34 struct Address {
35 public:
36  static const std::string TCP; // Default TCP protocol tag.
37  static const uint16_t AMQP_PORT=5672; // Default AMQP port.
38 
40  const std::string& protocol_=std::string(),
41  const std::string& host_=std::string(),
42  uint16_t port_=0
43  ) : protocol(protocol_), host(host_), port(port_) {}
44 
45  std::string protocol;
46  std::string host;
48 };
49 
50 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Address& addr);
51 QPID_COMMON_EXTERN bool operator==(const Address& x, const Address& y);
52 QPID_COMMON_EXTERN bool operator!=(const Address& x, const Address& y);
53 
54 } // namespace qpid
55 
56 #endif
std::string host
Definition: Address.h:46
static const std::string TCP
Definition: Address.h:36
#define QPID_COMMON_INLINE_EXTERN
uint16_t port
Definition: Address.h:47
static const uint16_t AMQP_PORT
Definition: Address.h:37
QPID_COMMON_INLINE_EXTERN Address(const std::string &protocol_=std::string(), const std::string &host_=std::string(), uint16_t port_=0)
Definition: Address.h:39
std::ostream & operator<<(std::ostream &os, const Address &addr)
std::string protocol
Definition: Address.h:45
unsigned short uint16_t
Definition: IntegerTypes.h:25
bool operator==(const Address &x, const Address &y)
Contains the protocol address of an AMQP broker.
Definition: Address.h:34
Settings for a Connection.
#define QPID_COMMON_EXTERN
bool operator!=(const Address &x, const Address &y)

Qpid C++ API Reference
Generated on Wed Aug 27 2014 for Qpid C++ Client API by doxygen 1.8.5