]> git.sesse.net Git - vlc/blob - mozilla/vlcpeer.h
Simplification assuming that sizeof(char) = 1
[vlc] / mozilla / vlcpeer.h
1 /*****************************************************************************
2  * vlcpeer.h: scriptable peer descriptor
3  *****************************************************************************
4  * Copyright (C) 2002-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Samuel Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 #ifndef __VLCPEER_H__
24 #define __VLCPEER_H__
25
26 #include "vlcintf.h"
27 #include "support/classinfo.h"
28
29 class VlcPlugin;
30
31 class VlcPeer : public VlcIntf, public ClassInfo
32 {
33 public:
34     NS_DECL_ISUPPORTS
35     NS_DECL_VLCINTF
36
37     // These flags are used by the DOM and security systems to signal that
38     // JavaScript callers are allowed to call this object's scriptable methods.
39     NS_IMETHOD GetFlags(PRUint32 *aFlags)
40     {
41         *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT;
42         return NS_OK;
43     }
44
45     NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage)
46     {
47         *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
48         return NS_OK;
49     }
50
51              VlcPeer();
52              VlcPeer( VlcPlugin * );
53     virtual ~VlcPeer();
54
55     void     Disable();
56
57 private:
58     VlcPlugin * p_plugin;
59 };
60
61 #endif