hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "wifi_util_wrapper.h"
#include "WifiUtil.h"
 
#ifdef __cplusplus
extern "C" {
#endif
 
static WifiUtil *get_instance() {
    static WifiUtil *wifi_util = NULL;
    if (!wifi_util)
        wifi_util = new WifiUtil();
    return wifi_util;
}
 
char *get_wifi_list(void) {
    
    std::string list = get_instance()->getWifiListJson();
    return strdup(list.c_str());
}
 
char *get_device_context(void) {
    std::string list = get_instance()->getDeviceContextJson();
    return strdup(list.c_str());
}
#ifdef __cplusplus
};
#endif