1 /*****************************************************************************
\r
2 * vlc.h: a VLC plugin for Mozilla
\r
3 *****************************************************************************
\r
4 * Copyright (C) 2002-2005 the VideoLAN team
\r
5 * $Id: vlcruntime.h 14466 2006-02-22 23:34:54Z dionoea $
\r
7 * Authors: Damien Fouilleul <damien.fouilleul@laposte.net>
\r
9 * This program is free software; you can redistribute it and/or modify
\r
10 * it under the terms of the GNU General Public License as published by
\r
11 * the Free Software Foundation; either version 2 of the License, or
\r
12 * (at your option) any later version.
\r
14 * This program is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU General Public License for more details.
\r
19 * You should have received a copy of the GNU General Public License
\r
20 * along with this program; if not, write to the Free Software
\r
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
\r
22 *****************************************************************************/
\r
25 ** defined runtime script objects
\r
28 #include "nporuntime.h"
\r
30 class LibvlcRootNPObject: public RuntimeNPObject
\r
33 LibvlcRootNPObject(NPP instance, const NPClass *aClass);
\r
34 virtual ~LibvlcRootNPObject();
\r
37 friend class RuntimeNPClass<LibvlcRootNPObject>;
\r
39 static const int propertyCount;
\r
40 static const NPUTF8 * const propertyNames[];
\r
42 InvokeResult getProperty(int index, NPVariant &result);
\r
44 static const int methodCount;
\r
45 static const NPUTF8 * const methodNames[];
\r
49 NPObject *playlistObj;
\r
53 class LibvlcAudioNPObject: public RuntimeNPObject
\r
56 LibvlcAudioNPObject(NPP instance, const NPClass *aClass) :
\r
57 RuntimeNPObject(instance, aClass) {};
\r
58 virtual ~LibvlcAudioNPObject() {};
\r
61 friend class RuntimeNPClass<LibvlcAudioNPObject>;
\r
63 static const int propertyCount;
\r
64 static const NPUTF8 * const propertyNames[];
\r
66 InvokeResult getProperty(int index, NPVariant &result);
\r
67 InvokeResult setProperty(int index, const NPVariant &value);
\r
69 static const int methodCount;
\r
70 static const NPUTF8 * const methodNames[];
\r
72 InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
\r
75 class LibvlcInputNPObject: public RuntimeNPObject
\r
78 LibvlcInputNPObject(NPP instance, const NPClass *aClass) :
\r
79 RuntimeNPObject(instance, aClass) {};
\r
81 virtual ~LibvlcInputNPObject() {};
\r
84 friend class RuntimeNPClass<LibvlcInputNPObject>;
\r
86 static const int propertyCount;
\r
87 static const NPUTF8 * const propertyNames[];
\r
89 InvokeResult getProperty(int index, NPVariant &result);
\r
90 InvokeResult setProperty(int index, const NPVariant &value);
\r
92 static const int methodCount;
\r
93 static const NPUTF8 * const methodNames[];
\r
96 class LibvlcPlaylistNPObject: public RuntimeNPObject
\r
99 LibvlcPlaylistNPObject(NPP instance, const NPClass *aClass) :
\r
100 RuntimeNPObject(instance, aClass) {};
\r
101 virtual ~LibvlcPlaylistNPObject() {};
\r
104 friend class RuntimeNPClass<LibvlcPlaylistNPObject>;
\r
106 static const int propertyCount;
\r
107 static const NPUTF8 * const propertyNames[];
\r
109 InvokeResult getProperty(int index, NPVariant &result);
\r
111 static const int methodCount;
\r
112 static const NPUTF8 * const methodNames[];
\r
114 InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
\r
116 void parseOptions(const NPString &s, int *i_options, char*** ppsz_options);
\r
117 void parseOptions(NPObject *obj, int *i_options, char*** ppsz_options);
\r
120 class LibvlcVideoNPObject: public RuntimeNPObject
\r
123 LibvlcVideoNPObject(NPP instance, const NPClass *aClass) :
\r
124 RuntimeNPObject(instance, aClass) {};
\r
125 virtual ~LibvlcVideoNPObject() {};
\r
128 friend class RuntimeNPClass<LibvlcVideoNPObject>;
\r
130 static const int propertyCount;
\r
131 static const NPUTF8 * const propertyNames[];
\r
133 InvokeResult getProperty(int index, NPVariant &result);
\r
134 InvokeResult setProperty(int index, const NPVariant &value);
\r
136 static const int methodCount;
\r
137 static const NPUTF8 * const methodNames[];
\r
139 InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);
\r