Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
Plugin.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_BT_PLUGIN_H
6#define ICE_BT_PLUGIN_H
7
8#include <Ice/Plugin.h>
9
10#ifndef ICEBT_API
11# if defined(ICE_STATIC_LIBS)
12# define ICEBT_API /**/
13# elif defined(ICEBT_API_EXPORTS)
14# define ICEBT_API ICE_DECLSPEC_EXPORT
15# else
16# define ICEBT_API ICE_DECLSPEC_IMPORT
17# endif
18#endif
19
20namespace IceBT
21{
22
24typedef std::map<std::string, std::string> PropertyMap;
25
27typedef std::map<std::string, PropertyMap> DeviceMap;
28
29#ifndef ICE_CPP11_MAPPING
35{
36public:
37
43 virtual void discovered(const std::string& addr, const PropertyMap& props) = 0;
44};
46#endif
47
53{
54public:
55
64#ifdef ICE_CPP11_MAPPING
65 virtual void startDiscovery(const std::string& address,
66 std::function<void(const std::string& addr, const PropertyMap& props)> cb) = 0;
67#else
68 virtual void startDiscovery(const std::string& address, const DiscoveryCallbackPtr& cb) = 0;
69#endif
70
76 virtual void stopDiscovery(const std::string& address) = 0;
77
83 virtual DeviceMap getDevices() const = 0;
84};
86
87}
88
89#endif
#define ICEBT_API
Definition Plugin.h:16
#define ICE_DEFINE_PTR(TPtr, T)
Definition Config.h:377
An application can receive discovery notifications by implementing the DiscoveryCallback interface.
Definition Plugin.h:35
virtual void discovered(const std::string &addr, const PropertyMap &props)=0
Called for each discovered device.
Represents the IceBT plug-in object.
Definition Plugin.h:53
virtual DeviceMap getDevices() const =0
Retrieve a snapshot of all known remote devices.
virtual void startDiscovery(const std::string &address, const DiscoveryCallbackPtr &cb)=0
Start Bluetooth device discovery on the adapter with the specified address.
virtual void stopDiscovery(const std::string &address)=0
Stops Bluetooth device discovery on the adapter with the specified address.
Definition Handle.h:143
Definition Shared.h:78
A communicator plug-in.
Definition Plugin.h:198
Definition Plugin.h:21
std::map< std::string, std::string > PropertyMap
A name-value map.
Definition Plugin.h:24
IceUtil::Handle< DiscoveryCallback > DiscoveryCallbackPtr
Definition Plugin.h:45
std::map< std::string, PropertyMap > DeviceMap
A collection of properties for each device.
Definition Plugin.h:27