4 * Copyright (C) 2011-2013 Team XBMC
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)
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.
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/>.
23 #include "DynamicDll.h"
25 #include <shairport/shairport.h>
27 class DllLibShairportInterface
30 virtual ~DllLibShairportInterface() {}
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;
40 class DllLibShairport : public DllDynamic, DllLibShairportInterface
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))
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)