1 /*****************************************************************************
\r
2 * npolibvlc.h: official Javascript APIs
\r
3 *****************************************************************************
\r
4 * Copyright (C) 2002-2006 the VideoLAN team
\r
6 * Authors: Damien Fouilleul <damien.fouilleul@laposte.net>
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; either version 2 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License
\r
19 * along with this program; if not, write to the Free Software
\r
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
\r
21 *****************************************************************************/
\r
24 ** defined runtime script objects
\r
27 #include "nporuntime.h"
\r
29 class LibvlcRootNPObject: public RuntimeNPObject
\r
32 friend class RuntimeNPClass<LibvlcRootNPObject>;
\r
34 LibvlcRootNPObject(NPP instance, const NPClass *aClass);
\r
35 virtual ~LibvlcRootNPObject();
\r
37 static const int propertyCount;
\r
38 static const NPUTF8 * const propertyNames[];
\r
40 InvokeResult getProperty(int index, NPVariant &result);
\r
42 static const int methodCount;
\r
43 static const NPUTF8 * const methodNames[];
\r
47 NPObject *playlistObj;
\r
51 class LibvlcAudioNPObject: public RuntimeNPObject
\r
54 LibvlcAudioNPObject(NPP instance, const NPClass *aClass) :
\r
55 RuntimeNPObject(instance, aClass) {};
\r
56 virtual ~LibvlcAudioNPObject() {};
\r
58 friend class RuntimeNPClass<LibvlcAudioNPObject>;
\r
60 static const int propertyCount;
\r
61 static const NPUTF8 * const propertyNames[];
\r
63 InvokeResult getProperty(int index, NPVariant &result);
\r
64 InvokeResult setProperty(int index, const NPVariant &value);
\r
66 static const int methodCount;
\r
67 static const NPUTF8 * const methodNames[];
\r
69 InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
\r
72 class LibvlcInputNPObject: public RuntimeNPObject
\r
75 friend class RuntimeNPClass<LibvlcInputNPObject>;
\r
77 LibvlcInputNPObject(NPP instance, const NPClass *aClass) :
\r
78 RuntimeNPObject(instance, aClass) {};
\r
80 virtual ~LibvlcInputNPObject() {};
\r
82 static const int propertyCount;
\r
83 static const NPUTF8 * const propertyNames[];
\r
85 InvokeResult getProperty(int index, NPVariant &result);
\r
86 InvokeResult setProperty(int index, const NPVariant &value);
\r
88 static const int methodCount;
\r
89 static const NPUTF8 * const methodNames[];
\r
92 class LibvlcPlaylistNPObject: public RuntimeNPObject
\r
95 friend class RuntimeNPClass<LibvlcPlaylistNPObject>;
\r
97 LibvlcPlaylistNPObject(NPP instance, const NPClass *aClass) :
\r
98 RuntimeNPObject(instance, aClass) {};
\r
99 virtual ~LibvlcPlaylistNPObject() {};
\r
101 static const int propertyCount;
\r
102 static const NPUTF8 * const propertyNames[];
\r
104 InvokeResult getProperty(int index, NPVariant &result);
\r
106 static const int methodCount;
\r
107 static const NPUTF8 * const methodNames[];
\r
109 InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
\r
111 void parseOptions(const NPString &s, int *i_options, char*** ppsz_options);
\r
112 void parseOptions(NPObject *obj, int *i_options, char*** ppsz_options);
\r
115 class LibvlcVideoNPObject: public RuntimeNPObject
\r
118 friend class RuntimeNPClass<LibvlcVideoNPObject>;
\r
120 LibvlcVideoNPObject(NPP instance, const NPClass *aClass) :
\r
121 RuntimeNPObject(instance, aClass) {};
\r
122 virtual ~LibvlcVideoNPObject() {};
\r
124 static const int propertyCount;
\r
125 static const NPUTF8 * const propertyNames[];
\r
127 InvokeResult getProperty(int index, NPVariant &result);
\r
128 InvokeResult setProperty(int index, const NPVariant &value);
\r
130 static const int methodCount;
\r
131 static const NPUTF8 * const methodNames[];
\r
133 InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
\r