summaryrefslogtreecommitdiff
path: root/browser-plugin/totemGMPSettings.h
diff options
context:
space:
mode:
Diffstat (limited to 'browser-plugin/totemGMPSettings.h')
-rw-r--r--browser-plugin/totemGMPSettings.h60
1 files changed, 38 insertions, 22 deletions
diff --git a/browser-plugin/totemGMPSettings.h b/browser-plugin/totemGMPSettings.h
index f327a67e..1ec388b5 100644
--- a/browser-plugin/totemGMPSettings.h
+++ b/browser-plugin/totemGMPSettings.h
@@ -1,6 +1,8 @@
/* Totem GMP plugin
*
- * Copyright © 2006, 2007 Christian Persch
+ * Copyright © 2004 Bastien Nocera <hadess@hadess.net>
+ * Copyright © 2002 David A. Schleef <ds@schleef.org>
+ * Copyright © 2006, 2007, 2008 Christian Persch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -16,37 +18,51 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
- *
- * $Id: totemGMPPlugin.h 3717 2006-11-15 17:21:16Z chpe $
*/
-#ifndef __GMP_SETTINGS_H__
-#define __GMP_SETTINGS_H__
-
-#include <nsIClassInfo.h>
-
-#include "totemIGMPSettings.h"
+#ifndef __TOTEM_GMP_SETTINGS_H__
+#define __TOTEM_GMP_SETTINGS_H__
-class totemScriptablePlugin;
+#include "totemNPClass.h"
+#include "totemNPObject.h"
-class totemGMPSettings : public totemIGMPSettings,
- public nsIClassInfo
+class totemGMPSettings : public totemNPObject
{
public:
- NS_DECL_ISUPPORTS
- NS_DECL_TOTEMIGMPSETTINGS
- NS_DECL_NSICLASSINFO
+ totemGMPSettings (NPP);
+ virtual ~totemGMPSettings ();
- totemGMPSettings (totemScriptablePlugin *aPlugin);
+ private:
- PRBool IsValid () { return mPlugin != nsnull && mPlugin->mPlugin != nsnull ; }
+ enum Methods {
+ eGetMode,
+ eIsAvailable,
+ eRequestMediaAccessRights,
+ eSetMode
+ };
- private:
- ~totemGMPSettings ();
+ enum Properties {
+ eAutostart,
+ eBalance,
+ eBaseURL,
+ eDefaultAudioLanguage,
+ eDefaultFrame,
+ eEnableErrorDialogs,
+ eInvokeURLs,
+ eMediaAccessRights,
+ eMute,
+ ePlayCount,
+ eRate,
+ eVolume
+ };
- PRUint32 mMute : 1;
+ virtual bool InvokeByIndex (int aIndex, const NPVariant *argv, uint32_t argc, NPVariant *_result);
+ virtual bool GetPropertyByIndex (int aIndex, NPVariant *_result);
+ virtual bool SetPropertyByIndex (int aIndex, const NPVariant *aValue);
- totemScriptablePlugin *mPlugin;
+ bool mMute;
};
-#endif /* __GMP_SETTINGS_H__ */
+TOTEM_DEFINE_NPCLASS (totemGMPSettings);
+
+#endif /* __TOTEM_GMP_SETTINGS_H__ */