[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / filesystem / DllHDHomeRun.h
1 #pragma once
2 /*
3  *      Copyright (C) 2005-2013 Team XBMC
4  *      http://www.xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program 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
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, see
18  *  <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 #include "DynamicDll.h"
23 #include "lib/libhdhomerun/hdhomerun.h"
24
25 class DllHdHomeRunInterface
26 {
27 public:
28   virtual ~DllHdHomeRunInterface() {}
29   virtual int           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)=0;
30   virtual struct hdhomerun_device_t*  device_create_from_str(const char *device_str, struct hdhomerun_debug_t *dbg)=0;
31   virtual void          device_destroy(struct hdhomerun_device_t *hd)=0;
32   virtual int           device_stream_start(struct hdhomerun_device_t *hd)=0;
33   virtual uint8_t*      device_stream_recv(struct hdhomerun_device_t *hd, size_t max_size, size_t* pactual_size)=0;
34   virtual void          device_stream_stop(struct hdhomerun_device_t *hd)=0;
35   virtual int           device_set_tuner_channel(struct hdhomerun_device_t *hd, const char *channel)=0;
36   virtual int           device_set_tuner_program(struct hdhomerun_device_t *hd, const char *program)=0;
37   virtual int           device_set_tuner_from_str(struct hdhomerun_device_t *hd, const char *tuner_str)=0;
38   virtual void          device_set_tuner(struct hdhomerun_device_t *hd, unsigned int tuner)=0;
39   virtual int           device_get_tuner_status(struct hdhomerun_device_t *hd, char **pstatus_str, struct hdhomerun_tuner_status_t *status)=0;
40 };
41
42 class DllHdHomeRun : public DllDynamic, public DllHdHomeRunInterface
43 {
44   DECLARE_DLL_WRAPPER(DllHdHomeRun, DLL_PATH_LIBHDHOMERUN)
45   DEFINE_METHOD5(int, discover_find_devices_custom, (uint32_t p1, uint32_t p2, uint32_t p3, struct hdhomerun_discover_device_t p4[], int p5))
46   DEFINE_METHOD2(struct hdhomerun_device_t*, device_create_from_str, (const char* p1, struct hdhomerun_debug_t *p2))
47   DEFINE_METHOD1(void, device_destroy, (struct hdhomerun_device_t* p1))
48   DEFINE_METHOD1(int, device_stream_start, (struct hdhomerun_device_t* p1))
49   DEFINE_METHOD3(uint8_t*, device_stream_recv, (struct hdhomerun_device_t* p1, size_t p2, size_t* p3))
50   DEFINE_METHOD1(void, device_stream_stop, (struct hdhomerun_device_t* p1))
51   DEFINE_METHOD2(int, device_set_tuner_channel, (struct hdhomerun_device_t *p1, const char *p2))
52   DEFINE_METHOD2(int, device_set_tuner_program, (struct hdhomerun_device_t *p1, const char *p2))
53   DEFINE_METHOD2(int, device_set_tuner_from_str, (struct hdhomerun_device_t *p1, const char *p2))
54   DEFINE_METHOD2(void, device_set_tuner, (struct hdhomerun_device_t *p1, unsigned int p2))
55   DEFINE_METHOD3(int, device_get_tuner_status, (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3));
56   BEGIN_METHOD_RESOLVE()
57     RESOLVE_METHOD_RENAME(hdhomerun_discover_find_devices_custom, discover_find_devices_custom)
58     RESOLVE_METHOD_RENAME(hdhomerun_device_create_from_str, device_create_from_str)
59     RESOLVE_METHOD_RENAME(hdhomerun_device_destroy, device_destroy)
60     RESOLVE_METHOD_RENAME(hdhomerun_device_stream_start, device_stream_start)
61     RESOLVE_METHOD_RENAME(hdhomerun_device_stream_recv, device_stream_recv)
62     RESOLVE_METHOD_RENAME(hdhomerun_device_stream_stop, device_stream_stop)
63     RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_channel, device_set_tuner_channel)
64     RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_program, device_set_tuner_program)
65     RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_from_str, device_set_tuner_from_str)
66     RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner, device_set_tuner)
67     RESOLVE_METHOD_RENAME(hdhomerun_device_get_tuner_status, device_get_tuner_status)
68   END_METHOD_RESOLVE()
69 };
70