Merge remote-tracking branch 'fetzerch/feature-edl' into pvrapi_1_7_0. Github issue...
[vuplus_xbmc] / lib / DllASAP.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://www.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, write to
19  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20  *  http://www.gnu.org/copyleft/gpl.html
21  *
22  */
23
24 #include "DynamicDll.h"
25
26 typedef int abool;
27
28 typedef struct {
29   char author[128];
30   char name[128];
31   int year;
32   int month;
33   int day;
34   int channels;
35   int duration;
36 } ASAP_SongInfo;
37
38 class DllASAPInterface
39 {
40 public:
41   virtual ~DllASAPInterface() {}
42   virtual int asapGetSongs(const char *filename)=0;
43   virtual abool asapGetInfo(const char *filename, int song, ASAP_SongInfo *songInfo)=0;
44   virtual abool asapLoad(const char *filename, int song, int *channels, int *duration)=0;
45   virtual void asapSeek(int position)=0;
46   virtual int asapGenerate(void *buffer, int buffer_len)=0;
47 };
48
49 class DllASAP : public DllDynamic, DllASAPInterface
50 {
51   DECLARE_DLL_WRAPPER(DllASAP, DLL_PATH_ASAP_CODEC)
52   DEFINE_METHOD1(int, asapGetSongs, (const char *p1))
53   DEFINE_METHOD3(abool, asapGetInfo, (const char *p1, int p2, ASAP_SongInfo *p3))
54   DEFINE_METHOD4(abool, asapLoad, (const char *p1, int p2, int *p3, int *p4))
55   DEFINE_METHOD1(void, asapSeek, (int p1))
56   DEFINE_METHOD2(int, asapGenerate, (void *p1, int p2))
57   BEGIN_METHOD_RESOLVE()
58     RESOLVE_METHOD(asapGetSongs)
59     RESOLVE_METHOD(asapGetInfo)
60     RESOLVE_METHOD(asapLoad)
61     RESOLVE_METHOD(asapSeek)
62     RESOLVE_METHOD(asapGenerate)
63   END_METHOD_RESOLVE()
64 };