Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
00001 #ifndef QPID_ADDRESS_H 00002 #define QPID_ADDRESS_H 00003 00004 /* 00005 * 00006 * Copyright (c) 2006 The Apache Software Foundation 00007 * 00008 * Licensed under the Apache License, Version 2.0 (the "License"); 00009 * you may not use this file except in compliance with the License. 00010 * You may obtain a copy of the License at 00011 * 00012 * http://www.apache.org/licenses/LICENSE-2.0 00013 * 00014 * Unless required by applicable law or agreed to in writing, software 00015 * distributed under the License is distributed on an "AS IS" BASIS, 00016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00017 * See the License for the specific language governing permissions and 00018 * limitations under the License. 00019 * 00020 */ 00021 00022 #include "qpid/sys/IntegerTypes.h" 00023 #include "qpid/CommonImportExport.h" 00024 #include <iosfwd> 00025 #include <string> 00026 00027 namespace qpid { 00028 namespace client { struct ConnectionSettings; } 00029 00030 00034 struct Address { 00035 public: 00036 static const std::string TCP; // Default TCP protocol tag. 00037 static const uint16_t AMQP_PORT=5672; // Default AMQP port. 00038 00039 QPID_COMMON_INLINE_EXTERN explicit Address( 00040 const std::string& protocol_=std::string(), 00041 const std::string& host_=std::string(), 00042 uint16_t port_=0 00043 ) : protocol(protocol_), host(host_), port(port_) {} 00044 00045 std::string protocol; 00046 std::string host; 00047 uint16_t port; 00048 }; 00049 00050 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Address& addr); 00051 QPID_COMMON_EXTERN bool operator==(const Address& x, const Address& y); 00052 00053 } // namespace qpid 00054 00055 #endif