Merge pull request #473 from Montellese/onplaybackspeedchanged
[vuplus_xbmc] / xbmc / network / DllLibPlist.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2011 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 #include <plist/plist.h>
27
28 class DllLibPlistInterface
29 {
30 public:
31   virtual ~DllLibPlistInterface() {}
32
33   virtual void        plist_from_bin        (const char *plist_bin,   uint32_t length, plist_t * plist  )=0;
34   virtual plist_t     plist_new_dict        (void                                                       )=0;
35   virtual uint32_t    plist_dict_get_size   (plist_t node                                               )=0;
36   virtual void        plist_get_string_val  (plist_t node,            char **val                        )=0;
37   virtual void        plist_get_real_val    (plist_t node,            double *val                       )=0;
38   virtual plist_t     plist_dict_get_item   (plist_t node,            const char* key                   )=0;
39   virtual void        plist_free            (plist_t plist                                              )=0;
40 #ifdef TARGET_WINDOWS
41   virtual void        plist_free_string_val (char *val                                                  )=0;
42 #endif
43
44 };
45
46 class DllLibPlist : public DllDynamic, DllLibPlistInterface
47 {
48   DECLARE_DLL_WRAPPER(DllLibPlist, DLL_PATH_LIBPLIST)
49   DEFINE_METHOD0(plist_t,       plist_new_dict)
50   DEFINE_METHOD1(uint32_t,      plist_dict_get_size,  (plist_t p1))
51   DEFINE_METHOD1(void,          plist_free,           (plist_t p1))
52   DEFINE_METHOD2(void,          plist_get_string_val, (plist_t p1,      char **p2))
53   DEFINE_METHOD2(void,          plist_get_real_val,   (plist_t p1,      double *p2))
54   DEFINE_METHOD2(plist_t,       plist_dict_get_item,  (plist_t p1,      const char* p2))
55   DEFINE_METHOD3(void,          plist_from_bin,       (const char *p1,  uint32_t p2, plist_t *p3))
56 #ifdef TARGET_WINDOWS
57   DEFINE_METHOD1(void,          plist_free_string_val, (char *p1))
58 #endif
59
60
61   BEGIN_METHOD_RESOLVE()
62     RESOLVE_METHOD_RENAME(plist_new_dict,         plist_new_dict)    
63     RESOLVE_METHOD_RENAME(plist_free,             plist_free)
64     RESOLVE_METHOD_RENAME(plist_dict_get_size,    plist_dict_get_size)
65     RESOLVE_METHOD_RENAME(plist_from_bin,         plist_from_bin)
66     RESOLVE_METHOD_RENAME(plist_get_real_val,     plist_get_real_val)
67     RESOLVE_METHOD_RENAME(plist_get_string_val,   plist_get_string_val)
68     RESOLVE_METHOD_RENAME(plist_dict_get_item,    plist_dict_get_item)
69 #ifdef TARGET_WINDOWS
70     RESOLVE_METHOD_RENAME(plist_free_string_val,  plist_free_string_val)
71 #endif
72
73   END_METHOD_RESOLVE()
74 };
75