Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
EndpointInfo.h
1// Copyright (c) ZeroC, Inc.
2
3#ifndef ICE_BT_ENDPOINT_INFO_H
4#define ICE_BT_ENDPOINT_INFO_H
5
6#include "Ice/Endpoint.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 Bluetooth endpoint information.
20 /// @headerfile IceBT/IceBT.h
21 class ICEBT_API EndpointInfo final : public Ice::EndpointInfo
22 {
23 public:
24 ~EndpointInfo() final;
25 EndpointInfo(const EndpointInfo&) = delete;
26 EndpointInfo& operator=(const EndpointInfo&) = delete;
27
28 [[nodiscard]] std::int16_t type() const noexcept final { return _type; }
29 [[nodiscard]] bool secure() const noexcept final { return _secure; }
30
31 /// The address configured with the endpoint.
32 const std::string addr;
33
34 /// The UUID configured with the endpoint.
35 const std::string uuid;
36
37 /// @private
38 EndpointInfo(bool compress, std::string addr, std::string uuid, std::int16_t type, bool secure)
39 : Ice::EndpointInfo{compress},
40 addr{std::move(addr)},
41 uuid{std::move(uuid)},
42 _type{type},
43 _secure{secure}
44 {
45 }
46
47 private:
48 const std::int16_t _type;
49 const bool _secure;
50 };
51
52 /// A shared pointer to an EndpointInfo.
53 using EndpointInfoPtr = std::shared_ptr<EndpointInfo>;
54}
55
56#if defined(__clang__)
57# pragma clang diagnostic pop
58#elif defined(__GNUC__)
59# pragma GCC diagnostic pop
60#endif
61
62#endif
std::int16_t type() const noexcept final
Returns the type of the endpoint.
const std::string addr
The address configured with the endpoint.
const std::string uuid
The UUID configured with the endpoint.
bool secure() const noexcept final
Returns true if this endpoint's transport uses SSL, false otherwise.
const bool compress
Specifies whether or not compression should be used if available when using this endpoint.
Definition Endpoint.h:81
Base class for the endpoint info classes.
Definition Endpoint.h:59
std::shared_ptr< EndpointInfo > EndpointInfoPtr
A shared pointer to an EndpointInfo.
The Bluetooth transport plug-in.
The Ice RPC framework.
Definition SampleEvent.h:59