Merge pull request #4791 from jmarshallnz/playlist_settings
[vuplus_xbmc] / lib / DllNosefart.h
1 #pragma once
2 /*
3  *      Copyright (C) 2005-2013 Team XBMC
4  *      http://xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, see
18  *  <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 #include "DynamicDll.h"
23
24 class DllNosefartInterface
25 {
26 public:
27     virtual ~DllNosefartInterface() {}
28     virtual void* LoadNSF(const char* szFileName)=0;
29     virtual void FreeNSF(void*)=0;
30     virtual int StartPlayback(void* nsf, int track)=0;
31     virtual long FillBuffer(void* nsf, char* buffer, int size)=0;
32     virtual void FrameAdvance(void* nsf)=0;
33     virtual int GetPlaybackRate(void* nsf)=0;
34     virtual int GetNumberOfSongs(void* nsf)=0;
35     virtual char* GetTitle(void* nsf)=0;
36     virtual char* GetArtist(void* nsf)=0;
37 };
38
39 class DllNosefart : public DllDynamic, DllNosefartInterface
40 {
41   DECLARE_DLL_WRAPPER(DllNosefart, DLL_PATH_NSF_CODEC)
42   DEFINE_METHOD1(void*, LoadNSF, (const char* p1))
43   DEFINE_METHOD1(void, FreeNSF, (void* p1))
44   DEFINE_METHOD2(int, StartPlayback, (void* p1, int p2))
45   DEFINE_METHOD3(long, FillBuffer, (void* p1, char* p2, int p3))
46   DEFINE_METHOD1(void, FrameAdvance, (void* p1))
47   DEFINE_METHOD1(int, GetPlaybackRate, (void* p1))
48   DEFINE_METHOD1(int, GetNumberOfSongs, (void* p1))
49   DEFINE_METHOD1(char*, GetTitle, (void* p1))
50   DEFINE_METHOD1(char*, GetArtist, (void* p1))
51   BEGIN_METHOD_RESOLVE()
52     RESOLVE_METHOD_RENAME(DLL_LoadNSF, LoadNSF)
53     RESOLVE_METHOD_RENAME(DLL_FreeNSF, FreeNSF)
54     RESOLVE_METHOD_RENAME(DLL_StartPlayback, StartPlayback)
55     RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
56     RESOLVE_METHOD_RENAME(DLL_FrameAdvance, FrameAdvance)
57     RESOLVE_METHOD_RENAME(DLL_GetPlaybackRate, GetPlaybackRate)
58     RESOLVE_METHOD_RENAME(DLL_GetNumberOfSongs, GetNumberOfSongs)
59     RESOLVE_METHOD_RENAME(DLL_GetTitle, GetTitle)
60     RESOLVE_METHOD_RENAME(DLL_GetArtist, GetArtist)
61   END_METHOD_RESOLVE()
62 };