NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
ble_hs_periodic_sync_priv.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef H_BLE_HS_PERIODIC_SYNC_
21#define H_BLE_HS_PERIODIC_SYNC_
22
23#include <inttypes.h>
24#include "nimble/porting/nimble/include/os/queue.h"
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29struct ble_hs_periodic_sync {
30 SLIST_ENTRY(ble_hs_periodic_sync) next;
31 uint16_t sync_handle;
32 ble_addr_t advertiser_addr;
33 uint8_t adv_sid;
34
35 ble_gap_event_fn *cb;
36 void *cb_arg;
37
38 struct ble_npl_event lost_ev;
39};
40
41struct ble_hs_periodic_sync *ble_hs_periodic_sync_alloc(void);
42void ble_hs_periodic_sync_free(struct ble_hs_periodic_sync *psync);
43void ble_hs_periodic_sync_insert(struct ble_hs_periodic_sync *psync);
44void ble_hs_periodic_sync_remove(struct ble_hs_periodic_sync *psync);
45struct ble_hs_periodic_sync *ble_hs_periodic_sync_find_by_handle(uint16_t sync_handle);
46struct ble_hs_periodic_sync *ble_hs_periodic_sync_find(const ble_addr_t *addr,
47 uint8_t sid);
48struct ble_hs_periodic_sync *ble_hs_periodic_sync_first(void);
49int ble_hs_periodic_sync_init(void);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif