[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / cdrip / DllOgg.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, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #if (defined HAVE_CONFIG_H) && (!defined WIN32)
24   #include "config.h"
25 #endif
26 #include <ogg/ogg.h>
27 #include "utils/log.h"
28 #include "DynamicDll.h"
29
30 class DllOggInterface
31 {
32 public:
33   virtual int ogg_page_eos(ogg_page *og)=0;
34   virtual int ogg_stream_init(ogg_stream_state *os, int serialno)=0;
35   virtual int ogg_stream_clear(ogg_stream_state *os)=0;
36   virtual int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og)=0;
37   virtual int ogg_stream_flush(ogg_stream_state *os, ogg_page *og)=0;
38   virtual int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op)=0;
39   virtual ~DllOggInterface() {}
40 };
41
42 class DllOgg : public DllDynamic, DllOggInterface
43 {
44   DECLARE_DLL_WRAPPER(DllOgg, DLL_PATH_OGG)
45   DEFINE_METHOD1(int, ogg_page_eos, (ogg_page *p1))
46   DEFINE_METHOD2(int, ogg_stream_init, (ogg_stream_state *p1, int p2))
47   DEFINE_METHOD1(int, ogg_stream_clear, (ogg_stream_state *p1))
48   DEFINE_METHOD2(int, ogg_stream_pageout, (ogg_stream_state *p1, ogg_page *p2))
49   DEFINE_METHOD2(int, ogg_stream_flush, (ogg_stream_state *p1, ogg_page *p2))
50   DEFINE_METHOD2(int, ogg_stream_packetin, (ogg_stream_state *p1, ogg_packet *p2))
51   BEGIN_METHOD_RESOLVE()
52     RESOLVE_METHOD(ogg_page_eos)
53     RESOLVE_METHOD(ogg_stream_init)
54     RESOLVE_METHOD(ogg_stream_clear)
55     RESOLVE_METHOD(ogg_stream_pageout)
56     RESOLVE_METHOD(ogg_stream_flush)
57     RESOLVE_METHOD(ogg_stream_packetin)
58   END_METHOD_RESOLVE()
59 };