Merge pull request #4676 from jmarshallnz/dont_set_scraper_on_tvshow_on_nfo
[vuplus_xbmc] / xbmc / network / DllLibShairport.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2011-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "DynamicDll.h"
24
25 #include <shairport/shairport.h>
26
27 class DllLibShairportInterface
28 {
29 public:
30   virtual ~DllLibShairportInterface() {}
31
32   virtual int   shairport_main(int argc, char **argv    )=0;
33   virtual void  shairport_exit(void                     )=0;
34   virtual int   shairport_loop(void                     )=0;
35   virtual int   shairport_is_running(void               )=0;
36   virtual void  shairport_set_ao(struct AudioOutput *ao        )=0;
37   virtual void  shairport_set_printf(struct printfPtr *funcPtr)=0;
38 };
39
40 class DllLibShairport : public DllDynamic, DllLibShairportInterface
41 {
42   DECLARE_DLL_WRAPPER(DllLibShairport, DLL_PATH_LIBSHAIRPORT)
43   DEFINE_METHOD0(void,  shairport_exit)
44   DEFINE_METHOD0(int,   shairport_loop)
45   DEFINE_METHOD0(int,   shairport_is_running)
46   DEFINE_METHOD1(void,  shairport_set_ao, (struct AudioOutput *p1))
47   DEFINE_METHOD1(void,  shairport_set_printf, (struct printfPtr *p1))  
48   DEFINE_METHOD2(int,   shairport_main, (int p1, char **p2))
49
50
51   BEGIN_METHOD_RESOLVE()
52     RESOLVE_METHOD_RENAME(shairport_exit,         shairport_exit)    
53     RESOLVE_METHOD_RENAME(shairport_loop,         shairport_loop)
54     RESOLVE_METHOD_RENAME(shairport_is_running,   shairport_is_running)
55     RESOLVE_METHOD_RENAME(shairport_main,         shairport_main)
56     RESOLVE_METHOD_RENAME(shairport_set_ao,       shairport_set_ao)
57     RESOLVE_METHOD_RENAME(shairport_set_printf,   shairport_set_printf)
58   END_METHOD_RESOLVE()
59 };