Merge pull request #4324 from FernetMenta/wasapi
[vuplus_xbmc] / lib / libhdhomerun / hdhomerun_discover.h
1 /*
2  * hdhomerun_discover.h
3  *
4  * Copyright © 2006-2007 Silicondust Engineering Ltd. <www.silicondust.com>.
5  *
6  * This library is free software; you can redistribute it and/or 
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 3 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
18  * 
19  * As a special exception to the GNU Lesser General Public License,
20  * you may link, statically or dynamically, an application with a
21  * publicly distributed version of the Library to produce an
22  * executable file containing portions of the Library, and
23  * distribute that executable file under terms of your choice,
24  * without any of the additional requirements listed in clause 4 of
25  * the GNU Lesser General Public License.
26  * 
27  * By "a publicly distributed version of the Library", we mean
28  * either the unmodified Library as distributed by Silicondust, or a
29  * modified version of the Library that is distributed under the
30  * conditions defined in the GNU Lesser General Public License.
31  */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 struct hdhomerun_discover_device_t {
37         uint32_t ip_addr;
38         uint32_t device_type;
39         uint32_t device_id;
40 };
41
42 /*
43  * Find devices.
44  *
45  * The device information is stored in caller-supplied array of hdhomerun_discover_device_t vars.
46  * Multiple attempts are made to find devices.
47  * Execution time is 1 second.
48  *
49  * Set target_ip to zero to auto-detect IP address.
50  *
51  * Returns the number of devices found.
52  * Retruns -1 on error.
53  */
54 extern LIBTYPE int hdhomerun_discover_find_devices_custom(uint32_t target_ip, uint32_t device_type, uint32_t device_id, struct hdhomerun_discover_device_t result_list[], int max_count);
55
56 /*
57  * Verify that the device ID given is valid.
58  *
59  * The device ID contains a self-check sequence that detects common user input errors including
60  * single-digit errors and two digit transposition errors.
61  *
62  * Returns TRUE if valid.
63  * Returns FALSE if not valid.
64  */
65 extern LIBTYPE bool_t hdhomerun_discover_validate_device_id(uint32_t device_id);
66
67 #ifdef __cplusplus
68 }
69 #endif