mirror of
https://github.com/Team-Resurgent/XBMC4Xbox.git
synced 2026-08-15 11:18:13 -07:00
If ever adding the XBMC4Xbox source to GitHub use "git add -f -A" or it wont add all the files.
71 lines
4.1 KiB
C++
71 lines
4.1 KiB
C++
#pragma once
|
|
/*
|
|
* Copyright (C) 2005-2013 Team XBMC
|
|
* http://xbmc.org
|
|
*
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This Program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with XBMC; see the file COPYING. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#include "DynamicDll.h"
|
|
#include "lib/libhdhomerun/hdhomerun.h"
|
|
|
|
class DllHdHomeRunInterface
|
|
{
|
|
public:
|
|
virtual ~DllHdHomeRunInterface() {}
|
|
virtual int discover_find_devices(uint32_t device_type, struct hdhomerun_discover_device_t result_list[], int max_count)=0;
|
|
virtual struct hdhomerun_device_t* device_create_from_str(const char *device_str)=0;
|
|
virtual void device_destroy(struct hdhomerun_device_t *hd)=0;
|
|
virtual int device_stream_start(struct hdhomerun_device_t *hd)=0;
|
|
virtual uint8_t* device_stream_recv(struct hdhomerun_device_t *hd, unsigned int max_size, unsigned int* pactual_size)=0;
|
|
virtual void device_stream_stop(struct hdhomerun_device_t *hd)=0;
|
|
virtual int device_set_tuner_channel(struct hdhomerun_device_t *hd, const char *channel)=0;
|
|
virtual int device_set_tuner_program(struct hdhomerun_device_t *hd, const char *program)=0;
|
|
virtual int device_set_tuner_from_str(struct hdhomerun_device_t *hd, const char *tuner_str)=0;
|
|
virtual void device_set_tuner(struct hdhomerun_device_t *hd, unsigned int tuner)=0;
|
|
virtual int device_get_tuner_status(struct hdhomerun_device_t *hd, char **pstatus_str, struct hdhomerun_tuner_status_t *status)=0;
|
|
};
|
|
|
|
class DllHdHomeRun : public DllDynamic, public DllHdHomeRunInterface
|
|
{
|
|
DECLARE_DLL_WRAPPER(DllHdHomeRun, Q:\\system\\hdhomerun.dll)
|
|
DEFINE_METHOD3(int, discover_find_devices, (uint32_t p1, struct hdhomerun_discover_device_t p2[], int p3))
|
|
DEFINE_METHOD1(struct hdhomerun_device_t*, device_create_from_str, (const char* p1))
|
|
DEFINE_METHOD1(void, device_destroy, (struct hdhomerun_device_t* p1))
|
|
DEFINE_METHOD1(int, device_stream_start, (struct hdhomerun_device_t* p1))
|
|
DEFINE_METHOD3(uint8_t*, device_stream_recv, (struct hdhomerun_device_t* p1, unsigned int p2, unsigned int* p3))
|
|
DEFINE_METHOD1(void, device_stream_stop, (struct hdhomerun_device_t* p1))
|
|
DEFINE_METHOD2(int, device_set_tuner_channel, (struct hdhomerun_device_t *p1, const char *p2))
|
|
DEFINE_METHOD2(int, device_set_tuner_program, (struct hdhomerun_device_t *p1, const char *p2))
|
|
DEFINE_METHOD2(int, device_set_tuner_from_str, (struct hdhomerun_device_t *p1, const char *p2))
|
|
DEFINE_METHOD2(void, device_set_tuner, (struct hdhomerun_device_t *p1, unsigned int p2))
|
|
DEFINE_METHOD3(int, device_get_tuner_status, (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3));
|
|
BEGIN_METHOD_RESOLVE()
|
|
RESOLVE_METHOD_RENAME(hdhomerun_discover_find_devices, discover_find_devices)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_create_from_str, device_create_from_str)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_destroy, device_destroy)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_stream_start, device_stream_start)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_stream_recv, device_stream_recv)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_stream_stop, device_stream_stop)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_channel, device_set_tuner_channel)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_program, device_set_tuner_program)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_from_str, device_set_tuner_from_str)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner, device_set_tuner)
|
|
RESOLVE_METHOD_RENAME(hdhomerun_device_get_tuner_status, device_get_tuner_status)
|
|
END_METHOD_RESOLVE()
|
|
};
|
|
|