forked from bg111/asterisk-chan-dongle
-
Notifications
You must be signed in to change notification settings - Fork 105
/
pdiscovery.h
36 lines (29 loc) · 1.02 KB
/
pdiscovery.h
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
28
29
30
31
32
33
34
35
36
/*
Copyright (C) 2011 bg <bg_one@mail.ru>
*/
#ifndef CHAN_DONGLE_PDISCOVERY_H_INCLUDED
#define CHAN_DONGLE_PDISCOVERY_H_INCLUDED
#include "export.h" /* EXPORT_DECL EXPORT_DEF */
enum INTERFACE_TYPE {
INTERFACE_TYPE_DATA = 0,
INTERFACE_TYPE_VOICE,
// INTERFACE_TYPE_COM,
INTERFACE_TYPE_NUMBERS,
};
struct pdiscovery_ports {
char * ports[INTERFACE_TYPE_NUMBERS];
};
struct pdiscovery_result {
char * imei;
char * imsi;
struct pdiscovery_ports ports;
};
struct pdiscovery_cache_item;
EXPORT_DECL void pdiscovery_init();
EXPORT_DECL void pdiscovery_fini();
/* return non-zero if found */
EXPORT_DECL int pdiscovery_lookup(const char * device, const char * imei, const char * imsi, char ** dport, char ** aport);
EXPORT_DECL const struct pdiscovery_result * pdiscovery_list_begin(const struct pdiscovery_cache_item ** opaque);
EXPORT_DECL const struct pdiscovery_result * pdiscovery_list_next(const struct pdiscovery_cache_item ** opaque);
EXPORT_DECL void pdiscovery_list_end();
#endif /* CHAN_DONGLE_PDISCOVERY_H_INCLUDED */