48
48
namespace ble {
49
49
50
50
class PalGenericAccessService ;
51
+
51
52
class PalSecurityManager ;
53
+
52
54
class PalGap ;
55
+
53
56
class BLEInstanceBase ;
54
57
58
+ namespace impl {
59
+
55
60
class Gap :
56
- public ble::interface::Gap,
57
61
public PalConnectionMonitor,
58
- public PalGapEventHandler
59
- {
62
+ public PalGapEventHandler {
60
63
friend PalConnectionMonitor;
61
64
friend PalGapEventHandler;
62
65
friend PalGap;
63
66
friend BLEInstanceBase;
67
+
68
+ using EventHandler = ::ble::Gap::EventHandler;
69
+ using GapShutdownCallback_t = ::ble::Gap::GapShutdownCallback_t;
70
+ using GapShutdownCallbackChain_t = ::ble::Gap::GapShutdownCallbackChain_t ;
64
71
public:
72
+ using PreferredConnectionParams_t = ::ble::Gap::PreferredConnectionParams_t ;
73
+
65
74
/* *
66
75
* Default peripheral privacy configuration.
67
76
*/
@@ -98,6 +107,7 @@ class Gap :
98
107
);
99
108
100
109
ble_error_t destroyAdvertisingSet (advertising_handle_t handle);
110
+
101
111
#endif // BLE_FEATURE_EXTENDED_ADVERTISING
102
112
103
113
ble_error_t setAdvertisingParameters (
@@ -124,6 +134,7 @@ class Gap :
124
134
ble_error_t stopAdvertising (advertising_handle_t handle);
125
135
126
136
bool isAdvertisingActive (advertising_handle_t handle);
137
+
127
138
#endif // BLE_ROLE_BROADCASTER
128
139
129
140
#if BLE_ROLE_BROADCASTER
@@ -146,6 +157,7 @@ class Gap :
146
157
ble_error_t stopPeriodicAdvertising (advertising_handle_t handle);
147
158
148
159
bool isPeriodicAdvertisingActive (advertising_handle_t handle);
160
+
149
161
#endif // BLE_ROLE_BROADCASTER
150
162
#endif // BLE_FEATURE_PERIODIC_ADVERTISING
151
163
@@ -161,6 +173,7 @@ class Gap :
161
173
);
162
174
163
175
ble_error_t stopScan ();
176
+
164
177
#endif // BLE_ROLE_OBSERVER
165
178
166
179
#if BLE_ROLE_OBSERVER
@@ -198,6 +211,7 @@ class Gap :
198
211
ble_error_t clearPeriodicAdvertiserList ();
199
212
200
213
uint8_t getMaxPeriodicAdvertiserListSize ();
214
+
201
215
#endif // BLE_ROLE_OBSERVER
202
216
#endif // BLE_FEATURE_PERIODIC_ADVERTISING
203
217
@@ -210,6 +224,7 @@ class Gap :
210
224
);
211
225
212
226
ble_error_t cancelConnect ();
227
+
213
228
#endif // BLE_ROLE_CENTRAL
214
229
215
230
#if BLE_FEATURE_CONNECTABLE
@@ -246,6 +261,7 @@ class Gap :
246
261
connection_handle_t connectionHandle,
247
262
local_disconnection_reason_t reason
248
263
);
264
+
249
265
#endif // BLE_FEATURE_CONNECTABLE
250
266
#if BLE_FEATURE_PHY_MANAGEMENT
251
267
@@ -262,6 +278,7 @@ class Gap :
262
278
const phy_set_t *rxPhys,
263
279
coded_symbol_per_bit_t codedSymbol
264
280
);
281
+
265
282
#endif // BLE_FEATURE_PHY_MANAGEMENT
266
283
267
284
#if BLE_FEATURE_PRIVACY
@@ -277,6 +294,7 @@ class Gap :
277
294
ble_error_t getPeripheralPrivacyConfiguration (
278
295
peripheral_privacy_configuration_t *configuration
279
296
);
297
+
280
298
#endif // BLE_ROLE_BROADCASTER
281
299
282
300
#if BLE_ROLE_OBSERVER
@@ -288,6 +306,7 @@ class Gap :
288
306
ble_error_t getCentralPrivacyConfiguration (
289
307
central_privacy_configuration_t *configuration
290
308
);
309
+
291
310
#endif // BLE_ROLE_OBSERVER
292
311
#endif // BLE_FEATURE_PRIVACY
293
312
@@ -321,12 +340,14 @@ class Gap :
321
340
GapShutdownCallbackChain_t &onShutdown ();
322
341
323
342
#if !defined(DOXYGEN_ONLY)
343
+
324
344
/*
325
345
* API reserved for the controller driver to set the random static address.
326
346
* Setting a new random static address while the controller is operating is
327
347
* forbidden by the Bluetooth specification.
328
348
*/
329
- ble_error_t setRandomStaticAddress (const ble::address_t & address);
349
+ ble_error_t setRandomStaticAddress (const ble::address_t &address);
350
+
330
351
#endif // !defined(DOXYGEN_ONLY)
331
352
332
353
/* ===================================================================== */
@@ -335,7 +356,8 @@ class Gap :
335
356
private:
336
357
/* Disallow copy and assignment. */
337
358
Gap (const Gap &);
338
- Gap& operator =(const Gap &);
359
+
360
+ Gap &operator =(const Gap &);
339
361
340
362
Gap (
341
363
PalEventQueue &event_queue,
@@ -507,6 +529,7 @@ class Gap :
507
529
);
508
530
509
531
void on_scan_timeout ();
532
+
510
533
void process_legacy_scan_timeout ();
511
534
512
535
private:
@@ -598,6 +621,7 @@ class Gap :
598
621
bool _user_manage_connection_parameter_requests : 1 ;
599
622
};
600
623
624
+ } // namespace impl
601
625
} // namespace ble
602
626
603
627
#endif // IMPL_GAP_GAP_H
0 commit comments