Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET
Apache Qpid Documentation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qpid
framing
ProtocolVersion.h
Go to the documentation of this file.
1
/*
2
*
3
* Licensed to the Apache Software Foundation (ASF) under one
4
* or more contributor license agreements. See the NOTICE file
5
* distributed with this work for additional information
6
* regarding copyright ownership. The ASF licenses this file
7
* to you under the Apache License, Version 2.0 (the
8
* "License"); you may not use this file except in compliance
9
* with the License. You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing,
14
* software distributed under the License is distributed on an
15
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
* KIND, either express or implied. See the License for the
17
* specific language governing permissions and limitations
18
* under the License.
19
*
20
*/
21
#ifndef _ProtocolVersion_
22
#define _ProtocolVersion_
23
24
#include "
qpid/framing/amqp_types.h
"
25
#include "
qpid/CommonImportExport.h
"
26
27
#include <string>
28
29
namespace
qpid
30
{
31
namespace
framing
32
{
33
34
class
QPID_COMMON_CLASS_EXTERN
ProtocolVersion
35
{
36
private
:
37
uint8_t
major_;
38
uint8_t
minor_;
39
uint8_t
protocol_;
40
41
public
:
42
explicit
ProtocolVersion
(
uint8_t
_major=0,
uint8_t
_minor=0,
uint8_t
_protocol=0)
43
: major_(_major), minor_(_minor), protocol_(_protocol) {}
44
45
QPID_COMMON_INLINE_EXTERN
uint8_t
getMajor
()
const
{
return
major_; }
46
QPID_COMMON_INLINE_EXTERN
void
setMajor
(
uint8_t
major) { major_ = major; }
47
QPID_COMMON_INLINE_EXTERN
uint8_t
getMinor
()
const
{
return
minor_; }
48
QPID_COMMON_INLINE_EXTERN
void
setMinor
(
uint8_t
minor) { minor_ = minor; }
49
QPID_COMMON_INLINE_EXTERN
uint8_t
getProtocol
()
const
{
return
protocol_; }
50
QPID_COMMON_INLINE_EXTERN
void
setProtocol
(
uint8_t
protocol
) { protocol_ =
protocol
; }
51
QPID_COMMON_EXTERN
const
std::string toString()
const
;
52
53
QPID_COMMON_EXTERN
ProtocolVersion
& operator=(
ProtocolVersion
p);
54
55
QPID_COMMON_EXTERN
bool
operator==
(
ProtocolVersion
p)
const
;
56
QPID_COMMON_INLINE_EXTERN
bool
operator!=
(
ProtocolVersion
p)
const
{
return
! (*
this
== p); }
57
QPID_COMMON_EXTERN
static
uint8_t
AMQP
;
58
QPID_COMMON_EXTERN
static
uint8_t
LEGACY_AMQP
;
59
QPID_COMMON_EXTERN
static
uint8_t
TLS
;
60
QPID_COMMON_EXTERN
static
uint8_t
SASL
;
61
};
62
63
}
// namespace framing
64
}
// namespace qpid
65
66
67
#endif // ifndef _ProtocolVersion_
Qpid C++ API Reference
Generated on Thu Mar 28 2013 for Qpid C++ Client API by
1.8.3.1