Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
ConnectionInfo.h
1// Copyright (c) ZeroC, Inc.
2
3#ifndef ICE_BT_CONNECTION_INFO_H
4#define ICE_BT_CONNECTION_INFO_H
5
6#include "Ice/Connection.h"
7#include "Types.h"
8
9#if defined(__clang__)
10# pragma clang diagnostic push
11# pragma clang diagnostic ignored "-Wshadow-field-in-constructor"
12#elif defined(__GNUC__)
13# pragma GCC diagnostic push
14# pragma GCC diagnostic ignored "-Wshadow"
15#endif
16
17namespace IceBT
18{
19 /// Provides access to the details of a Bluetooth connection.
20 /// @headerfile IceBT/IceBT.h
21 class ICEBT_API ConnectionInfo final : public Ice::ConnectionInfo
22 {
23 public:
24 ~ConnectionInfo() final;
25 ConnectionInfo(const ConnectionInfo&) = delete;
26 ConnectionInfo& operator=(const ConnectionInfo&) = delete;
27
28 /// The local Bluetooth address.
29 const std::string localAddress;
30
31 /// The local RFCOMM channel.
32 const int localChannel;
33
34 /// The remote Bluetooth address.
35 const std::string remoteAddress;
36
37 /// The remote RFCOMM channel.
38 const int remoteChannel;
39
40 /// The UUID of the service being offered (in a server) or targeted (in a client).
41 const std::string uuid;
42
43 /// The connection buffer receive size.
44 const int rcvSize;
45
46 /// The connection buffer send size.
47 const int sndSize;
48
49 /// @private
50 ConnectionInfo(
51 bool incoming,
52 std::string adapterName,
53 std::string connectionId,
54 std::string localAddress,
55 int localChannel,
56 std::string remoteAddress,
57 int remoteChannel,
58 std::string uuid,
59 int rcvSize,
60 int sndSize)
61 : Ice::ConnectionInfo{incoming, std::move(adapterName), std::move(connectionId)},
62 localAddress{std::move(localAddress)},
64 remoteAddress{std::move(remoteAddress)},
66 uuid{std::move(uuid)},
69 {
70 }
71
72 /// @private
73 ConnectionInfo(bool incoming, std::string adapterName, std::string connectionId)
74 : ConnectionInfo{incoming, std::move(adapterName), std::move(connectionId), "", -1, "", -1, "", 0, 0}
75 {
76 }
77 };
78
79 /// A shared pointer to a ConnectionInfo.
80 using ConnectionInfoPtr = std::shared_ptr<ConnectionInfo>;
81}
82
83#if defined(__clang__)
84# pragma clang diagnostic pop
85#elif defined(__GNUC__)
86# pragma GCC diagnostic pop
87#endif
88
89#endif
const int remoteChannel
The remote RFCOMM channel.
const std::string remoteAddress
The remote Bluetooth address.
const int sndSize
The connection buffer send size.
const int rcvSize
The connection buffer receive size.
const int localChannel
The local RFCOMM channel.
const std::string uuid
The UUID of the service being offered (in a server) or targeted (in a client).
const std::string localAddress
The local Bluetooth address.
Provides access to the details of a Bluetooth connection.
const std::string connectionId
The connection ID.
Definition Connection.h:182
const bool incoming
Indicates whether the connection is an incoming connection.
Definition Connection.h:176
const std::string adapterName
The name of the adapter associated with the connection.
Definition Connection.h:179
Base class for all connection info classes.
Definition Connection.h:164
std::shared_ptr< ConnectionInfo > ConnectionInfoPtr
A shared pointer to a ConnectionInfo.
The Bluetooth transport plug-in.
The Ice RPC framework.
Definition SampleEvent.h:59