]> git.sesse.net Git - vlc/blob - mozilla/vlcpeer.h
backport of r13238
[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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #include "vlcintf.h"
25 #include "support/classinfo.h"
26
27 class VlcPlugin;
28
29 class VlcPeer : public VlcIntf, public ClassInfo
30 {
31 public:
32     NS_DECL_ISUPPORTS
33     NS_DECL_VLCINTF
34
35     // These flags are used by the DOM and security systems to signal that
36     // JavaScript callers are allowed to call this object's scriptable methods.
37     NS_IMETHOD GetFlags(PRUint32 *aFlags)
38     {
39         *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT;
40         return NS_OK;
41     }
42
43     NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage)
44     {
45         *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
46         return NS_OK;
47     }
48
49              VlcPeer();
50              VlcPeer( VlcPlugin * );
51     virtual ~VlcPeer();
52
53     void     Disable();
54
55 private:
56     VlcPlugin * p_plugin;
57 };
58