Merge pull request #3125 from janbar/noepg_timeline_crash
[vuplus_xbmc] / lib / DllTimidity.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-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 class DllTimidityInterface
26 {
27 public:
28     virtual ~DllTimidityInterface() {}
29     virtual int Init()=0;
30     virtual int LoadMID(const char* szFileName)=0;
31     virtual void FreeMID(int mid)=0;
32     virtual int FillBuffer(int mid, char* buffer, int length)=0;
33     virtual unsigned long Seek(int mid, unsigned long iTimePos)=0;
34     virtual const char* GetTitle(int mid)=0;
35     virtual const char* GetArtist(int mid)=0;
36     virtual unsigned long GetLength(int mid)=0;
37 };
38
39 class DllTimidity : public DllDynamic, DllTimidityInterface
40 {
41   DECLARE_DLL_WRAPPER(DllTimidity, DLL_PATH_MID_CODEC)
42   DEFINE_METHOD0(int, Init)
43   DEFINE_METHOD1(int, LoadMID, (const char* p1))
44   DEFINE_METHOD1(void, FreeMID, (int p1))
45   DEFINE_METHOD3(int, FillBuffer, (int p1, char* p2, int p3))
46   DEFINE_METHOD2(unsigned long, Seek, (int p1, unsigned long p2))
47   DEFINE_METHOD1(const char*, GetTitle, (int p1))
48   DEFINE_METHOD1(const char*, GetArtist, (int p1))
49   DEFINE_METHOD1(unsigned long, GetLength, (int p1))
50   BEGIN_METHOD_RESOLVE()
51     RESOLVE_METHOD_RENAME(DLL_Init, Init)
52     RESOLVE_METHOD_RENAME(DLL_LoadMID, LoadMID)
53     RESOLVE_METHOD_RENAME(DLL_FreeMID, FreeMID)
54     RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
55     RESOLVE_METHOD_RENAME(DLL_Seek, Seek)
56     RESOLVE_METHOD_RENAME(DLL_GetTitle, GetTitle)
57     RESOLVE_METHOD_RENAME(DLL_GetArtist, GetArtist)
58     RESOLVE_METHOD_RENAME(DLL_GetLength, GetLength)
59   END_METHOD_RESOLVE()
60 };
61