simplernble 1.2.1-dev140 → 1.2.1-dev145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native/VERSION +1 -1
- package/native/simpleble/CMakeLists.txt +1 -0
- package/native/simpleble/include/simpleble/Advanced.h +10 -5
- package/native/simpleble/src/backends/plain/AdvancedPlain.cpp +48 -0
- package/package.json +1 -1
- package/prebuilt/release/SimpleBLE.xcframework/Info.plist +5 -5
- package/prebuilt/release/SimpleBLE.xcframework/ios-arm64/libsimpleble.a +0 -0
- package/prebuilt/release/SimpleBLE.xcframework/ios-arm64_x86_64-simulator/libsimpleble.a +0 -0
- package/prebuilt/release/include/simpleble/Advanced.h +10 -5
package/native/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.1-
|
|
1
|
+
1.2.1-dev145
|
|
@@ -212,6 +212,7 @@ if(SIMPLEBLE_PLAIN)
|
|
|
212
212
|
message(STATUS "Plain Flavor Requested")
|
|
213
213
|
|
|
214
214
|
target_sources(simpleble PRIVATE
|
|
215
|
+
${CMAKE_CURRENT_SOURCE_DIR}/src/backends/plain/AdvancedPlain.cpp
|
|
215
216
|
${CMAKE_CURRENT_SOURCE_DIR}/src/backends/plain/BackendPlain.cpp)
|
|
216
217
|
elseif(SIMPLEBLE_BACKEND_LINUX)
|
|
217
218
|
message(STATUS "Linux Host Detected")
|
|
@@ -96,7 +96,8 @@ namespace SimpleBLE::Advanced::MacOS {
|
|
|
96
96
|
*
|
|
97
97
|
* This changes only the advertisement payload, not the system Bluetooth or GAP
|
|
98
98
|
* device name. Configure it before starting the local peripheral. Passing
|
|
99
|
-
* std::nullopt removes the override.
|
|
99
|
+
* std::nullopt removes the override. Other backends, such as Dongl, throw
|
|
100
|
+
* OperationNotSupported.
|
|
100
101
|
*/
|
|
101
102
|
void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral,
|
|
102
103
|
std::optional<std::string> local_name);
|
|
@@ -106,7 +107,8 @@ void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral
|
|
|
106
107
|
*
|
|
107
108
|
* This does not scan or guarantee that a returned peripheral is reachable.
|
|
108
109
|
* Invalid identifiers and identifiers unknown to CoreBluetooth are omitted.
|
|
109
|
-
* The adapter must be powered on.
|
|
110
|
+
* The adapter must be powered on. Other backends, such as Dongl, throw
|
|
111
|
+
* OperationNotSupported.
|
|
110
112
|
*
|
|
111
113
|
* NOTE: "Cached" refers to CoreBluetooth's system cache, not SimpleBLE's
|
|
112
114
|
* in-memory cache.
|
|
@@ -127,7 +129,8 @@ namespace SimpleBLE::Advanced::iOS {
|
|
|
127
129
|
* This changes only the advertisement payload, not the system Bluetooth or GAP
|
|
128
130
|
* device name. CoreBluetooth does not advertise the local name while the app is
|
|
129
131
|
* in the background. Configure it before starting the local peripheral. Passing
|
|
130
|
-
* std::nullopt removes the override.
|
|
132
|
+
* std::nullopt removes the override. Other backends, such as Dongl, throw
|
|
133
|
+
* OperationNotSupported.
|
|
131
134
|
*/
|
|
132
135
|
void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral,
|
|
133
136
|
std::optional<std::string> local_name);
|
|
@@ -137,7 +140,8 @@ void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral
|
|
|
137
140
|
*
|
|
138
141
|
* This does not scan or guarantee that a returned peripheral is reachable.
|
|
139
142
|
* Invalid identifiers and identifiers unknown to CoreBluetooth are omitted.
|
|
140
|
-
* The adapter must be powered on.
|
|
143
|
+
* The adapter must be powered on. Other backends, such as Dongl, throw
|
|
144
|
+
* OperationNotSupported.
|
|
141
145
|
*
|
|
142
146
|
* NOTE: "Cached" refers to CoreBluetooth's system cache, not SimpleBLE's
|
|
143
147
|
* in-memory cache.
|
|
@@ -180,7 +184,8 @@ namespace SimpleBLE::Advanced::Linux {
|
|
|
180
184
|
*
|
|
181
185
|
* This changes only the advertisement payload, not the adapter alias or GAP
|
|
182
186
|
* device name. Configure it before starting the local peripheral. Passing
|
|
183
|
-
* std::nullopt removes the override.
|
|
187
|
+
* std::nullopt removes the override. Other backends, such as Dongl, throw
|
|
188
|
+
* OperationNotSupported.
|
|
184
189
|
*/
|
|
185
190
|
void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral,
|
|
186
191
|
std::optional<std::string> local_name);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#include <simpleble/Advanced.h>
|
|
2
|
+
#include <simpleble/Exceptions.h>
|
|
3
|
+
|
|
4
|
+
// NOTE: PLAIN replaces the native backend, so it provides the platform functions that Advanced.h declares, and none of
|
|
5
|
+
// them is supported.
|
|
6
|
+
|
|
7
|
+
#if defined(__APPLE__) && TARGET_OS_OSX
|
|
8
|
+
namespace SimpleBLE::Advanced::MacOS {
|
|
9
|
+
|
|
10
|
+
void set_advertisement_local_name(Local::Peripheral& peripheral, std::optional<std::string> local_name) {
|
|
11
|
+
throw Exception::OperationNotSupported();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
std::vector<Peripheral> retrieve_cached_peripherals(Adapter& adapter,
|
|
15
|
+
const std::vector<BluetoothAddress>& identifiers) {
|
|
16
|
+
throw Exception::OperationNotSupported();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
} // namespace SimpleBLE::Advanced::MacOS
|
|
20
|
+
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
#if defined(__APPLE__) && TARGET_OS_IOS
|
|
24
|
+
namespace SimpleBLE::Advanced::iOS {
|
|
25
|
+
|
|
26
|
+
void set_advertisement_local_name(Local::Peripheral& peripheral, std::optional<std::string> local_name) {
|
|
27
|
+
throw Exception::OperationNotSupported();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
std::vector<Peripheral> retrieve_cached_peripherals(Adapter& adapter,
|
|
31
|
+
const std::vector<BluetoothAddress>& identifiers) {
|
|
32
|
+
throw Exception::OperationNotSupported();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
} // namespace SimpleBLE::Advanced::iOS
|
|
36
|
+
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
#if defined(__linux__) && !defined(__ANDROID__)
|
|
40
|
+
namespace SimpleBLE::Advanced::Linux {
|
|
41
|
+
|
|
42
|
+
void set_advertisement_local_name(Local::Peripheral& peripheral, std::optional<std::string> local_name) {
|
|
43
|
+
throw Exception::OperationNotSupported();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
} // namespace SimpleBLE::Advanced::Linux
|
|
47
|
+
|
|
48
|
+
#endif
|
package/package.json
CHANGED
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>libsimpleble.a</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>libsimpleble.a</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>libsimpleble.a</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>libsimpleble.a</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
@@ -96,7 +96,8 @@ namespace SimpleBLE::Advanced::MacOS {
|
|
|
96
96
|
*
|
|
97
97
|
* This changes only the advertisement payload, not the system Bluetooth or GAP
|
|
98
98
|
* device name. Configure it before starting the local peripheral. Passing
|
|
99
|
-
* std::nullopt removes the override.
|
|
99
|
+
* std::nullopt removes the override. Other backends, such as Dongl, throw
|
|
100
|
+
* OperationNotSupported.
|
|
100
101
|
*/
|
|
101
102
|
void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral,
|
|
102
103
|
std::optional<std::string> local_name);
|
|
@@ -106,7 +107,8 @@ void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral
|
|
|
106
107
|
*
|
|
107
108
|
* This does not scan or guarantee that a returned peripheral is reachable.
|
|
108
109
|
* Invalid identifiers and identifiers unknown to CoreBluetooth are omitted.
|
|
109
|
-
* The adapter must be powered on.
|
|
110
|
+
* The adapter must be powered on. Other backends, such as Dongl, throw
|
|
111
|
+
* OperationNotSupported.
|
|
110
112
|
*
|
|
111
113
|
* NOTE: "Cached" refers to CoreBluetooth's system cache, not SimpleBLE's
|
|
112
114
|
* in-memory cache.
|
|
@@ -127,7 +129,8 @@ namespace SimpleBLE::Advanced::iOS {
|
|
|
127
129
|
* This changes only the advertisement payload, not the system Bluetooth or GAP
|
|
128
130
|
* device name. CoreBluetooth does not advertise the local name while the app is
|
|
129
131
|
* in the background. Configure it before starting the local peripheral. Passing
|
|
130
|
-
* std::nullopt removes the override.
|
|
132
|
+
* std::nullopt removes the override. Other backends, such as Dongl, throw
|
|
133
|
+
* OperationNotSupported.
|
|
131
134
|
*/
|
|
132
135
|
void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral,
|
|
133
136
|
std::optional<std::string> local_name);
|
|
@@ -137,7 +140,8 @@ void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral
|
|
|
137
140
|
*
|
|
138
141
|
* This does not scan or guarantee that a returned peripheral is reachable.
|
|
139
142
|
* Invalid identifiers and identifiers unknown to CoreBluetooth are omitted.
|
|
140
|
-
* The adapter must be powered on.
|
|
143
|
+
* The adapter must be powered on. Other backends, such as Dongl, throw
|
|
144
|
+
* OperationNotSupported.
|
|
141
145
|
*
|
|
142
146
|
* NOTE: "Cached" refers to CoreBluetooth's system cache, not SimpleBLE's
|
|
143
147
|
* in-memory cache.
|
|
@@ -180,7 +184,8 @@ namespace SimpleBLE::Advanced::Linux {
|
|
|
180
184
|
*
|
|
181
185
|
* This changes only the advertisement payload, not the adapter alias or GAP
|
|
182
186
|
* device name. Configure it before starting the local peripheral. Passing
|
|
183
|
-
* std::nullopt removes the override.
|
|
187
|
+
* std::nullopt removes the override. Other backends, such as Dongl, throw
|
|
188
|
+
* OperationNotSupported.
|
|
184
189
|
*/
|
|
185
190
|
void SIMPLEBLE_EXPORT set_advertisement_local_name(Local::Peripheral& peripheral,
|
|
186
191
|
std::optional<std::string> local_name);
|