1 /*
2  * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #include "esp_log.h"
10 #include "esp_err.h"
11 #include "esp_wifi_types.h"
12 #include "esp_netif.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #ifdef CONFIG_ESP_WIFI_NAN_ENABLE
19 
20 /**
21   * @brief      Initialize the NAN App and required Data Structures
22   *
23   * @attention  This API should be called in esp_wifi_init()
24   */
25 void esp_nan_app_init(void);
26 
27 /**
28   * @brief      De-initialize the NAN App and complete the cleanup
29   *
30   * @attention  This API should be called in esp_wifi_deinit()
31   */
32 void esp_nan_app_deinit(void);
33 
34 /**
35   * @brief      NAN App action handler for NAN Started event. Sets up other event handlers and
36   *             initializes NAN App context
37   *
38   * @attention  This API should be called in WIFI_EVENT_NAN_STARTED event handler
39   *
40   * @param      nan_netif  Netif handle corresponding to NAN interface.
41   */
42 void esp_nan_action_start(esp_netif_t *nan_netif);
43 
44 /**
45   * @brief      NAN App action handler for NAN Stopped event. Clears other event handlers and
46   *             resets NAN App context
47   *
48   * @attention  This API should be called in WIFI_EVENT_NAN_STOPPED event handler
49   */
50 void esp_nan_action_stop(void);
51 
52 #endif /* CONFIG_ESP_WIFI_NAN_ENABLE */
53 
54 #ifdef __cplusplus
55 }
56 #endif
57