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