Index: browser-plugin/totemGMPError.h
===================================================================
--- browser-plugin/totemGMPError.h	(révision 0)
+++ browser-plugin/totemGMPError.h	(révision 0)
@@ -0,0 +1,52 @@
+/* Totem GMP plugin
+ *
+ * Copyright © 2006, 2007 Christian Persch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * $Id: totemGMPPlugin.h 3717 2006-11-15 17:21:16Z chpe $
+ */
+
+#ifndef __GMP_SETTINGS_H__
+#define __GMP_SETTINGS_H__
+
+#include <nsIClassInfo.h>
+
+#include "totemIGMPError.h"
+#include "totemIGMPErrorItem.h"
+
+class totemScriptablePlugin;
+
+class totemGMPError : public totemIGMPError,
+		      public totemIGMPErrorItem,
+		      public nsIClassInfo
+{
+  public:
+    NS_DECL_ISUPPORTS
+    NS_DECL_TOTEMIGMPERROR
+    NS_DECL_TOTEMIGMPERRORITEM
+    NS_DECL_NSICLASSINFO
+
+    totemGMPError (totemScriptablePlugin *aPlugin);
+
+  private:
+    ~totemGMPError ();
+
+    totemScriptablePlugin *mPlugin;
+    PRInt32 mCount;
+};
+
+#endif /* __GMP_SETTINGS_H__ */
Index: browser-plugin/totemGMPPlaylist.h
===================================================================
--- browser-plugin/totemGMPPlaylist.h	(révision 0)
+++ browser-plugin/totemGMPPlaylist.h	(révision 0)
@@ -0,0 +1,50 @@
+/* Totem Basic Plugin
+ *
+ * Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
+ * Copyright (C) 2002 David A. Schleef <ds@schleef.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * $Id: totemScriptablePlugin.h 3717 2006-11-15 17:21:16Z chpe $
+ */
+
+#ifndef __GMP_PLAYLIST_H__
+#define __GMP_PLAYLIST_H__
+
+#include <nsIClassInfo.h>
+
+#include "totemIGMPPlaylist.h"
+
+#include "totemGMPPlugin.h"
+
+class totemGMPPlaylist : public totemIGMPPlaylist,
+			 public nsIClassInfo
+{
+  public:
+    NS_DECL_ISUPPORTS
+    NS_DECL_TOTEMIGMPPLAYLIST
+    NS_DECL_NSICLASSINFO
+
+    totemGMPPlaylist (totemScriptablePlugin *aScriptable);
+  
+  private:
+    ~totemGMPPlaylist ();
+
+    totemScriptablePlugin *mScriptable;
+    nsCString mName;
+};
+
+#endif /* __GMP_PLAYLIST_H__ */
Index: browser-plugin/totemGMPPlugin.h
===================================================================
--- browser-plugin/totemGMPPlugin.h	(révision 3946)
+++ browser-plugin/totemGMPPlugin.h	(copie de travail)
@@ -1,7 +1,8 @@
-/* Totem Basic Plugin
+/* Totem GMP plugin
  *
- * Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
- * Copyright (C) 2002 David A. Schleef <ds@schleef.org>
+ * Copyright © 2004 Bastien Nocera <hadess@hadess.net>
+ * Copyright © 2002 David A. Schleef <ds@schleef.org>
+ * Copyright © 2006, 2007 Christian Persch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -28,9 +29,12 @@
 
 #include "totemIGMPPlayer.h"
 #include "totemIGMPControls.h"
+#include "totemIGMPSettings.h"
 
 #include "totemPlugin.h"
 
+class totemGMPSettings;
+
 class totemScriptablePlugin : public totemIGMPPlayer,
 			      public totemIGMPControls,
 			      public nsIClassInfo
@@ -49,9 +53,12 @@ class totemScriptablePlugin : public tot
     static char *PluginDescription ();
     static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
   private:
+    friend class totemGMPSettings;
+
     ~totemScriptablePlugin ();
 
     totemPlugin *mPlugin;
+    totemGMPSettings *mSettingsTearOff;
 };
 
 #endif /* __GMP_PLAYER_H__ */
Index: browser-plugin/totemGMPSettings.h
===================================================================
--- browser-plugin/totemGMPSettings.h	(révision 0)
+++ browser-plugin/totemGMPSettings.h	(révision 0)
@@ -0,0 +1,48 @@
+/* Totem GMP plugin
+ *
+ * Copyright © 2006, 2007 Christian Persch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, 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"
+
+class totemScriptablePlugin;
+
+class totemGMPSettings : public totemIGMPSettings,
+			 public nsIClassInfo
+{
+  public:
+    NS_DECL_ISUPPORTS
+    NS_DECL_TOTEMIGMPSETTINGS
+    NS_DECL_NSICLASSINFO
+
+    totemGMPSettings (totemScriptablePlugin *aPlugin);
+
+  private:
+    ~totemGMPSettings ();
+
+    totemScriptablePlugin *mPlugin;
+};
+
+#endif /* __GMP_SETTINGS_H__ */
Index: browser-plugin/totemGMPError.cpp
===================================================================
--- browser-plugin/totemGMPError.cpp	(révision 0)
+++ browser-plugin/totemGMPError.cpp	(révision 0)
@@ -0,0 +1,199 @@
+/* Totem GMP plugin
+ *
+ * Copyright © 2006, 2007 Christian Persch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * $Id: totemGMPPlugin.cpp 3928 2007-01-22 14:59:07Z chpe $
+ */
+
+#include <mozilla-config.h>
+#include "config.h"
+
+#include <glib.h>
+
+#include <nsDOMError.h>
+#include <nsIProgrammingLanguage.h>
+#include <nsISupportsImpl.h>
+#include <nsMemory.h>
+#include <nsXPCOM.h>
+
+#define GNOME_ENABLE_DEBUG 1
+/* define GNOME_ENABLE_DEBUG for more debug spew */
+#include "debug.h"
+
+#include "totemClassInfo.h"
+
+#include "totemGMPPlugin.h"
+#include "totemPlugin.h"
+
+#include "totemGMPError.h"
+
+#define WARN_ACCESS()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of forbidden function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+#define WARN_NOT_IMPLEMENTED()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of unimplemented function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+/* 2908e683-6162-45ed-8167-f555579d2411 */
+static const nsCID kClassID =
+  { 0x2908e683, 0x6162, 0x45ed, \
+    { 0x81, 0x67, 0xf5, 0x55, 0x57, 0x9d, 0x24, 0x11 } };
+
+static const char kClassDescription[] = "totemGMPError";
+
+/* NOTE: For now we'll implement totemIGMPError and totemIGMPErrorItem on the same
+ * object and only ever present at most _one_ error. If that ever changes,
+ * we'll need to split this.
+ */
+
+totemGMPError::totemGMPError (totemScriptablePlugin *aPlugin)
+  : mPlugin(aPlugin),
+    mCount(0)
+{
+  D ("%s ctor [%p]", kClassDescription, (void*) this);
+}
+
+totemGMPError::~totemGMPError ()
+{
+  D ("%s dtor [%p]", kClassDescription, (void*) this);
+}
+
+/* Interface implementations */
+
+NS_IMPL_ISUPPORTS3 (totemGMPError,
+		    totemIGMPError,
+		    totemIGMPErrorItem,
+		    nsIClassInfo)
+
+/* nsIClassInfo */
+
+TOTEM_CLASSINFO_BEGIN (totemGMPError,
+		       2,
+		       kClassID,
+		       kClassDescription)
+  TOTEM_CLASSINFO_ENTRY (0, totemIGMPError)
+  TOTEM_CLASSINFO_ENTRY (0, totemIGMPErrorItem)
+TOTEM_CLASSINFO_END
+
+/* totemIGMPError */
+
+#undef CURRENT_INTERFACE
+#define CURRENT_INTERFACE "totemIGMPError"
+
+/* void clearErrorQueue (); */
+NS_IMETHODIMP 
+totemGMPError::ClearErrorQueue()
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  mCount = 0;
+  return NS_OK;
+}
+
+/* readonly attribute long errorCount; */
+NS_IMETHODIMP 
+totemGMPError::GetErrorCount(PRInt32 *aErrorCount)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *aErrorCount = mCount;
+  return NS_OK;
+}
+
+/* totemIGMPErrorItem item (in long index); */
+NS_IMETHODIMP 
+totemGMPError::Item(PRInt32 index, totemIGMPErrorItem **_retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  if (index < 0 || index >= mCount)
+    return NS_ERROR_ILLEGAL_VALUE;
+
+  return CallQueryInterface (this, _retval);
+}
+
+/* void webHelp (); */
+NS_IMETHODIMP 
+totemGMPError::WebHelp()
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* totemIGMPErrorItem */
+
+#undef CURRENT_INTERFACE
+#define CURRENT_INTERFACE "totemIGMPErrorItem"
+
+/* readonly attribute long condition; */
+NS_IMETHODIMP 
+totemGMPError::GetCondition(PRInt32 *aCondition)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *aCondition = 0;
+  return NS_OK;
+}
+
+/* readonly attribute AUTF8String customURL; */
+NS_IMETHODIMP 
+totemGMPError::GetCustomURL(nsACString & aCustomURL)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  aCustomURL.Assign ("http://www.gnome.org/projects/totem");
+  return NS_OK;
+}
+
+/* readonly attribute long errorCode; */
+NS_IMETHODIMP 
+totemGMPError::GetErrorCode(PRInt32 *aErrorCode)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *aErrorCode = 0;
+  return NS_OK;
+}
+
+/* readonly attribute AUTF8String errorContext; */
+NS_IMETHODIMP 
+totemGMPError::GetErrorContext(nsACString & aErrorContext)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  aErrorContext.Assign ("");
+  return NS_OK;
+}
+
+/* readonly attribute AUTF8String errorDescription; */
+NS_IMETHODIMP
+totemGMPError::GetErrorDescription(nsACString & aErrorDescription)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  aErrorDescription.Assign ("");
+  return NS_OK;
+}
Index: browser-plugin/totemGMPPlaylist.cpp
===================================================================
--- browser-plugin/totemGMPPlaylist.cpp	(révision 0)
+++ browser-plugin/totemGMPPlaylist.cpp	(révision 0)
@@ -0,0 +1,318 @@
+/* Totem Basic Plugin
+ *
+ * Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
+ * Copyright (C) 2002 David A. Schleef <ds@schleef.org>
+ * Copyright (C) 2006 Christian Persch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * $Id: totemGMPPlugin.cpp 3790 2006-12-15 23:08:57Z chpe $
+ */
+
+#include <mozilla-config.h>
+#include "config.h"
+
+#include <nsDOMError.h>
+#include <nsIProgrammingLanguage.h>
+#include <nsISupportsImpl.h>
+#include <nsMemory.h>
+#include <nsXPCOM.h>
+
+#define GNOME_ENABLE_DEBUG 1
+/* define GNOME_ENABLE_DEBUG for more debug spew */
+#include "debug.h"
+
+#include "totemGMPPlugin.h"
+
+#include "totemGMPPlaylist.h"
+
+#define WARN_ACCESS()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of forbidden function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+#define WARN_NOT_IMPLEMENTED()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of unimplemented function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+#define SHOW_CALLS
+
+#ifdef SHOW_CALLS
+#define SHOW_CALL()\
+static PRBool called = PR_FALSE;\
+if (!called) {\
+	D ("NOTE! Use of function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	called = PR_TRUE;\
+}
+#else
+#define SHOW_CALL()
+#endif
+
+/* cf079ca3-c94f-4676-a9ae-6d9bffd765bd */
+static const nsCID kClassID = 
+  { 0xcf079ca3, 0xc94f, 0x4676, \
+    { 0xa9, 0xae, 0x6d, 0x9b, 0xff, 0xd7, 0x65, 0xbd } };
+
+static const char kClassDescription[] = "totemGMPPlaylist";
+
+totemGMPPlaylist::totemGMPPlaylist (totemScriptablePlugin *aScriptable)
+  : mName("Playlist") /* FIXME */
+{
+  D ("%s ctor [%p]", kClassDescription, (void*) this);
+
+  /* We keep a reference to the main scriptable, so the code won't be unloaded unless it's ok to do so */
+  mScriptable = aScriptable;
+  NS_ADDREF (mScriptable);
+}
+
+totemGMPPlaylist::~totemGMPPlaylist ()
+{
+  D ("%s dtor [%p]", kClassDescription, (void*) this);
+
+  NS_RELEASE (mScriptable);
+  mScriptable = nsnull;
+}
+
+/* Interface implementations */
+
+NS_IMPL_ISUPPORTS2 (totemGMPPlaylist,
+		    totemIGMPPlaylist,
+		    nsIClassInfo)
+
+/* nsIClassInfo */
+
+NS_IMETHODIMP
+totemGMPPlaylist::GetFlags (PRUint32 *aFlags)
+{
+  /* FIXME: is PLUGIN_OBJECT correct here ? */
+  *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemGMPPlaylist::GetImplementationLanguage (PRUint32 *aImplementationLanguage)
+{
+  *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemGMPPlaylist::GetInterfaces (PRUint32 *count,
+				 nsIID * **array)
+{
+  *array = NS_STATIC_CAST (nsIID**, nsMemory::Alloc (sizeof (nsIID)));
+  if (!*array)
+    return NS_ERROR_OUT_OF_MEMORY;
+
+  *count = 1;
+
+  (*array)[0] = NS_STATIC_CAST (nsIID*,
+  				nsMemory::Clone (&NS_GET_IID (totemIGMPPlaylist),
+						 sizeof(nsIID)));
+  if (!(*array)[0]) {
+    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY (0, *array);
+    return NS_ERROR_OUT_OF_MEMORY;
+  }
+
+  return NS_OK;
+}
+     
+NS_IMETHODIMP
+totemGMPPlaylist::GetHelperForLanguage (PRUint32 language,
+					nsISupports **_retval)
+{
+  *_retval = nsnull;
+  return NS_OK;
+}
+     
+NS_IMETHODIMP
+totemGMPPlaylist::GetContractID (char * *aContractID)
+{
+  *aContractID = nsnull;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemGMPPlaylist::GetClassDescription (char * *aClassDescription)
+{
+  *aClassDescription = NS_STATIC_CAST (char*,
+				       nsMemory::Clone (kClassDescription,
+						        sizeof (kClassDescription)));
+  if (!*aClassDescription)
+    return NS_ERROR_OUT_OF_MEMORY;
+
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+totemGMPPlaylist::GetClassID (nsCID * *aClassID)
+{
+  *aClassID = NS_STATIC_CAST (nsCID*,
+			      nsMemory::Clone (&kClassID,
+					       sizeof (nsCID*)));
+  if (!*aClassID)
+    return NS_ERROR_OUT_OF_MEMORY;
+
+  return NS_OK;
+}
+     
+NS_IMETHODIMP
+totemGMPPlaylist::GetClassIDNoAlloc (nsCID *aClassIDNoAlloc)
+{
+  *aClassIDNoAlloc = kClassID;
+  return NS_OK;
+}
+
+/* totemIGMPPlayer */
+
+#undef CURRENT_INTERFACE
+#define CURRENT_INTERFACE "totemIGMPPlaylist"
+
+/* void appendItem (in totemIGMPMedia item); */
+NS_IMETHODIMP 
+totemGMPPlaylist::AppendItem(totemIGMPMedia *item)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* readonly attribute long attributeCount; */
+NS_IMETHODIMP 
+totemGMPPlaylist::GetAttributeCount(PRInt32 *aAttributeCount)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *aAttributeCount = 0;
+  return NS_OK;
+}
+
+/* AUTF8String attributeName (in long index); */
+NS_IMETHODIMP 
+totemGMPPlaylist::AttributeName(PRInt32 index, nsACString & _retval)
+{
+  return GetAttributeName (index, _retval);
+}
+
+/* AUTF8String getattributeName (in long index); */
+NS_IMETHODIMP 
+totemGMPPlaylist::GetAttributeName(PRInt32 index, nsACString & _retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  _retval.Assign ("");
+  return NS_OK;
+}
+
+/* readonly attribute long count; */
+NS_IMETHODIMP 
+totemGMPPlaylist::GetCount(PRInt32 *aCount)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *aCount = 0;
+  return NS_OK;
+}
+
+/* AUTF8String getItemInfo (in AUTF8String name); */
+NS_IMETHODIMP 
+totemGMPPlaylist::GetItemInfo(const nsACString & name, nsACString & _retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  _retval.Assign ("");
+  return NS_OK;
+}
+
+/* void insertItem (in long index, in totemIGMPMedia item); */
+NS_IMETHODIMP 
+totemGMPPlaylist::InsertItem(PRInt32 index, totemIGMPMedia *item)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* boolean isIdentical (in totemIGMPPlaylist playlist); */
+NS_IMETHODIMP 
+totemGMPPlaylist::IsIdentical(totemIGMPPlaylist *playlist, PRBool *_retval)
+{
+  nsISupports *thisPlaylist = NS_STATIC_CAST (nsISupports*,
+					      NS_STATIC_CAST (totemIGMPPlaylist*, this));
+
+  *_retval = thisPlaylist == playlist;
+  return NS_OK;
+}
+
+/* totemIGMPMedia item (in long index); */
+NS_IMETHODIMP 
+totemGMPPlaylist::Item(PRInt32 index, totemIGMPMedia **_retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void moveItem (in long oldIndex, in long newIndex); */
+NS_IMETHODIMP 
+totemGMPPlaylist::MoveItem(PRInt32 oldIndex, PRInt32 newIndex)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* attribute AUTF8String name; */
+NS_IMETHODIMP 
+totemGMPPlaylist::GetName(nsACString & aName)
+{
+  SHOW_CALL ();
+
+  aName = mName;
+  return NS_OK;
+}
+
+NS_IMETHODIMP 
+totemGMPPlaylist::SetName(const nsACString & aName)
+{
+  SHOW_CALL ();
+
+  mName = aName;
+  return NS_OK;
+}
+
+/* void removeItem (in totemIGMPMedia item); */
+NS_IMETHODIMP 
+totemGMPPlaylist::RemoveItem(totemIGMPMedia *item)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* void setItemInfo (in AUTF8String name, in AUTF8String value); */
+NS_IMETHODIMP 
+totemGMPPlaylist::SetItemInfo(const nsACString & name, const nsACString & value)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
Index: browser-plugin/totemGMPPlugin.cpp
===================================================================
--- browser-plugin/totemGMPPlugin.cpp	(révision 3946)
+++ browser-plugin/totemGMPPlugin.cpp	(copie de travail)
@@ -1,4 +1,4 @@
-/* Totem Basic Plugin
+/* Totem GMP plugin
  *
  * Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
  * Copyright (C) 2002 David A. Schleef <ds@schleef.org>
@@ -27,6 +27,7 @@
 
 #include <glib.h>
 
+#include <nsDOMError.h>
 #include <nsIProgrammingLanguage.h>
 #include <nsISupportsImpl.h>
 #include <nsMemory.h>
@@ -41,8 +42,25 @@
 
 #include "totemClassInfo.h"
 
+#include "totemGMPPlaylist.h"
+#include "totemGMPSettings.h"
+
 #include "totemGMPPlugin.h"
 
+#define WARN_ACCESS()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of forbidden function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+#define WARN_NOT_IMPLEMENTED()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of unimplemented function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
 /* 89cf81a7-1156-456f-b060-c2187df9a27c */
 static const nsCID kClassID = 
   { 0x89cf81a7, 0x1156, 0x456f,
@@ -78,6 +96,8 @@ totemScriptablePlugin::totemScriptablePl
 totemScriptablePlugin::~totemScriptablePlugin ()
 {
   D ("%s dtor [%p]", kClassDescription, (void*) this);
+
+  NS_IF_RELEASE (mSettingsTearOff);
 }
 
 /* static */ char *
@@ -113,15 +133,363 @@ TOTEM_CLASSINFO_END
 
 /* totemIGMPPlayer */
 
+#undef CURRENT_INTERFACE
+#define CURRENT_INTERFACE "totemIGMPPlayer"
+
+/* readonly attribute totemIGMPCdromCollection cdromCollection; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetCdromCollection(totemIGMPCdromCollection * *aCdromCollection)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* readonly attribute totemIGMPClosedCaption closedCaption; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetClosedCaption(totemIGMPClosedCaption * *aClosedCaption)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
 /* readonly attribute totemIGMPControls controls; */
-NS_IMETHODIMP
+NS_IMETHODIMP 
 totemScriptablePlugin::GetControls(totemIGMPControls * *aControls)
 {
   return CallQueryInterface (this, aControls);
 }
 
+/* attribute totemIGMPMedia currentMedia; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetCurrentMedia(totemIGMPMedia * *aCurrentMedia)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetCurrentMedia(totemIGMPMedia * aCurrentMedia)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute totemIGMPPlaylist currentPlaylist; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetCurrentPlaylist(totemIGMPPlaylist * *aCurrentPlaylist)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetCurrentPlaylist(totemIGMPPlaylist * aCurrentPlaylist)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute totemIGMPDVD dvd; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetDvd(totemIGMPDVD * *aDvd)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* attribute boolean enableContextMenu; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetEnableContextMenu(PRBool *aEnableContextMenu)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetEnableContextMenu(PRBool aEnableContextMenu)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean enabled; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetEnabled(PRBool *aEnabled)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetEnabled(PRBool aEnabled)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute totemIGMPError error; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetError(totemIGMPError * *aError)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean fullScreen; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetFullScreen(PRBool *aFullScreen)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetFullScreen(PRBool aFullScreen)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute boolean isOnline; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetIsOnline(PRBool *aIsOnline)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute boolean isRemote; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetIsRemote(PRBool *aIsRemote)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* readonly attribute totemIGMPMediaCollection mediaCollection; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetMediaCollection(totemIGMPMediaCollection * *aMediaCollection)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* readonly attribute totemIGMPNetwork network; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetNetwork(totemIGMPNetwork * *aNetwork)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute long openState; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetOpenState(PRInt32 *aOpenState)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute totemIGMPPlayerApplication playerApplication; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetPlayerApplication(totemIGMPPlayerApplication * *aPlayerApplication)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* readonly attribute totemIGMPPlaylistCollection playlistCollection; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetPlaylistCollection(totemIGMPPlaylistCollection * *aPlaylistCollection)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* readonly attribute long playState; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetPlayState(PRInt32 *aPlayState)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute totemIGMPSettings settings; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetSettings(totemIGMPSettings * *aSettings)
+{
+  NS_ENSURE_STATE (IsValid ());
+
+  if (!mSettingsTearOff) {
+    mSettingsTearOff = new totemGMPSettings (this);
+    if (!mSettingsTearOff)
+      return NS_ERROR_OUT_OF_MEMORY;
+    NS_ADDREF (mSettingsTearOff);
+  }
+
+  return CallQueryInterface (mSettingsTearOff, aSettings);
+}
+
+/* readonly attribute AUTF8String status; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetStatus(nsACString & aStatus)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean stretchToFit; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetStretchToFit(PRBool *aStretchToFit)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetStretchToFit(PRBool aStretchToFit)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute AUTF8String uiMode; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetUiMode(nsACString & aUiMode)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetUiMode(const nsACString & aUiMode)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute AUTF8String URL; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetURL(nsACString & aURL)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetURL(const nsACString & aURL)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute AUTF8String versionInfo; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetVersionInfo(nsACString & aVersionInfo)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean windowlessVideo; */
+NS_IMETHODIMP 
+totemScriptablePlugin::GetWindowlessVideo(PRBool *aWindowlessVideo)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemScriptablePlugin::SetWindowlessVideo(PRBool aWindowlessVideo)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void close (); */
+NS_IMETHODIMP 
+totemScriptablePlugin::Close()
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* totemIGMPMedia newMedia (in AUTF8String aURL); */
+NS_IMETHODIMP 
+totemScriptablePlugin::NewMedia(const nsACString & aURL, totemIGMPMedia **_retval)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* void openPlayer (in AUTF8String aURL); */
+NS_IMETHODIMP 
+totemScriptablePlugin::OpenPlayer (const nsACString & aURL)
+{
+  WARN_ACCESS ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
+/* totemIGMPPlaylist newPlaylist (in AUTF8String aName, in AUTF8String aURL); */
+NS_IMETHODIMP 
+totemScriptablePlugin::NewPlaylist (const nsACString & aName,
+				    const nsACString & aURL,
+				    totemIGMPPlaylist **_retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void launchURL (in AUTF8String aURL); */
+NS_IMETHODIMP 
+totemScriptablePlugin::LaunchURL(const nsACString & aURL)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_DOM_SECURITY_ERR;
+}
+
 /* totemIGMPControls */
 
+#undef CURRENT_INTERFACE
+#define CURRENT_INTERFACE "totemIGMPControls"
+
 NS_IMETHODIMP
 totemScriptablePlugin::Pause ()
 {
Index: browser-plugin/totemGMPSettings.cpp
===================================================================
--- browser-plugin/totemGMPSettings.cpp	(révision 0)
+++ browser-plugin/totemGMPSettings.cpp	(révision 0)
@@ -0,0 +1,316 @@
+/* Totem GMP plugin
+ *
+ * Copyright © 2006, 2007 Christian Persch
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * $Id: totemGMPPlugin.cpp 3928 2007-01-22 14:59:07Z chpe $
+ */
+
+#include <mozilla-config.h>
+#include "config.h"
+
+#include <glib.h>
+
+#include <nsDOMError.h>
+#include <nsIProgrammingLanguage.h>
+#include <nsISupportsImpl.h>
+#include <nsMemory.h>
+#include <nsXPCOM.h>
+
+#define GNOME_ENABLE_DEBUG 1
+/* define GNOME_ENABLE_DEBUG for more debug spew */
+#include "debug.h"
+
+#include "totemIGMPControls.h"
+
+#include "totemClassInfo.h"
+
+#include "totemGMPPlugin.h"
+#include "totemPlugin.h"
+
+#include "totemGMPSettings.h"
+
+#define WARN_ACCESS()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of forbidden function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+#define WARN_NOT_IMPLEMENTED()\
+static PRBool warned = PR_FALSE;\
+if (!warned) {\
+	D ("GMP scriptable: use of unimplemented function '" CURRENT_INTERFACE "::%s'", __FUNCTION__);\
+	warned = PR_TRUE;\
+}
+
+/* 693329d8-866e-469a-805c-718c4291be70 */
+static const nsCID kClassID =
+  { 0x693329d8, 0x866e, 0x469a, \
+    { 0x80, 0x5c, 0x71, 0x8c, 0x42, 0x91, 0xbe, 0x70 } };
+
+static const char kClassDescription[] = "totemGMPSettings";
+
+totemGMPSettings::totemGMPSettings (totemScriptablePlugin *aPlugin)
+  : mPlugin(aPlugin)
+{
+  D ("%s ctor [%p]", kClassDescription, (void*) this);
+}
+
+totemGMPSettings::~totemGMPSettings ()
+{
+  D ("%s dtor [%p]", kClassDescription, (void*) this);
+}
+
+/* Interface implementations */
+
+NS_IMPL_ISUPPORTS2 (totemGMPSettings,
+		    totemIGMPSettings,
+		    nsIClassInfo)
+
+/* nsIClassInfo */
+
+TOTEM_CLASSINFO_BEGIN (totemGMPSettings,
+		       1,
+		       kClassID,
+		       kClassDescription)
+  TOTEM_CLASSINFO_ENTRY (0, totemIGMPSettings)
+TOTEM_CLASSINFO_END
+
+/* totemIGMPSettings */
+
+#undef CURRENT_INTERFACE
+#define CURRENT_INTERFACE "totemIGMPSettings"
+
+/* attribute boolean autoStart; */
+NS_IMETHODIMP 
+totemGMPSettings::GetAutoStart(PRBool *aAutoStart)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetAutoStart(PRBool aAutoStart)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute AUTF8String baseURL; */
+NS_IMETHODIMP 
+totemGMPSettings::GetBaseURL(nsACString & aBaseURL)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemGMPSettings::SetBaseURL(const nsACString & aBaseURL)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute long defaultAudioLanguage; */
+NS_IMETHODIMP 
+totemGMPSettings::GetDefaultAudioLanguage(PRInt32 *aDefaultAudioLanguage)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute AUTF8String defaultFrame; */
+NS_IMETHODIMP 
+totemGMPSettings::GetDefaultFrame(nsACString & aDefaultFrame)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetDefaultFrame(const nsACString & aDefaultFrame)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean enableErrorDialogs; */
+NS_IMETHODIMP 
+totemGMPSettings::GetEnableErrorDialogs(PRBool *aEnableErrorDialogs)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetEnableErrorDialogs(PRBool aEnableErrorDialogs)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean invokeURLs; */
+NS_IMETHODIMP 
+totemGMPSettings::GetInvokeURLs(PRBool *aInvokeURLs)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetInvokeURLs(PRBool aInvokeURLs)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute ACString mediaAccessRights; */
+NS_IMETHODIMP 
+totemGMPSettings::GetMediaAccessRights(nsACString & aMediaAccessRights)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute boolean mute; */
+NS_IMETHODIMP 
+totemGMPSettings::GetMute(PRBool *aMute)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP 
+totemGMPSettings::SetMute(PRBool aMute)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long playCount; */
+NS_IMETHODIMP 
+totemGMPSettings::GetPlayCount(PRInt32 *aPlayCount)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetPlayCount(PRInt32 aPlayCount)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute double rate; */
+NS_IMETHODIMP 
+totemGMPSettings::GetRate(double *aRate)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetRate(double aRate)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long balance; */
+NS_IMETHODIMP 
+totemGMPSettings::GetBalance(PRInt32 *aBalance)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetBalance(PRInt32 aBalance)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long volume; */
+NS_IMETHODIMP 
+totemGMPSettings::GetVolume(PRInt32 *aVolume)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+NS_IMETHODIMP 
+totemGMPSettings::SetVolume(PRInt32 aVolume)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* boolean isAvailable (in ACString setting); */
+NS_IMETHODIMP 
+totemGMPSettings::IsAvailable(const nsACString & setting, PRBool *_retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *_retval = PR_FALSE;
+  return NS_OK;
+}
+
+/* boolean getMode (in ACString mode); */
+NS_IMETHODIMP 
+totemGMPSettings::GetMode(const nsACString & mode, PRBool *_retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *_retval = PR_FALSE;
+  return NS_OK;
+}
+
+/* void setMode (in ACString mode, in boolean enabled); */
+NS_IMETHODIMP 
+totemGMPSettings::SetMode(const nsACString & mode, PRBool enabled)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  return NS_OK;
+}
+
+/* boolean requestMediaAccessRights (in ACString mode); */
+NS_IMETHODIMP 
+totemGMPSettings::RequestMediaAccessRights (const nsACString & mode, PRBool *_retval)
+{
+  WARN_NOT_IMPLEMENTED ();
+
+  *_retval = PR_FALSE;
+  return NS_OK;
+}
Index: browser-plugin/Makefile.am
===================================================================
--- browser-plugin/Makefile.am	(révision 3946)
+++ browser-plugin/Makefile.am	(copie de travail)
@@ -7,8 +7,7 @@ BUILT_SOURCES =
 
 EXTRA_DIST = \
 	plugin.symbols	\
-	TODO		\
-	totemStringGlue.h
+	TODO
 
 CLEANFILES = $(BUILT_SOURCES)
 
@@ -116,6 +115,7 @@ libtotem_basic_plugin_la_SOURCES =	\
 	totemPluginGlue.h		\
 	totemPlugin.cpp			\
 	totemPlugin.h			\
+	totemStringGlue.h		\
 	totemBasicPlugin.cpp		\
 	totemBasicPlugin.h		\
 	totemClassInfo.h		\
@@ -172,10 +172,17 @@ if ENABLE_GMP_PLUGIN
 plugin_LTLIBRARIES += libtotem-gmp-plugin.la
 
 libtotem_gmp_plugin_la_SOURCES =	\
+	totemGMPError.cpp		\
+	totemGMPError.h			\
+	totemGMPPlaylist.cpp		\
+	totemGMPPlaylist.h		\
+	totemGMPSettings.cpp		\
+	totemGMPSettings.h		\
 	totemPluginGlue.cpp		\
 	totemPluginGlue.h		\
 	totemPlugin.cpp			\
 	totemPlugin.h			\
+	totemStringGlue.h		\
 	totemGMPPlugin.cpp		\
 	totemGMPPlugin.h		\
 	totemClassInfo.h		\
@@ -236,6 +243,7 @@ libtotem_complex_plugin_la_SOURCES =	\
 	totemPluginGlue.h		\
 	totemPlugin.cpp			\
 	totemPlugin.h			\
+	totemStringGlue.h		\
 	totemComplexPlugin.cpp		\
 	totemComplexPlugin.h		\
 	totemClassInfo.h		\
@@ -296,6 +304,7 @@ libtotem_narrowspace_plugin_la_SOURCES =
 	totemPluginGlue.h		\
 	totemPlugin.cpp			\
 	totemPlugin.h			\
+	totemStringGlue.h		\
 	totemNarrowSpacePlugin.cpp	\
 	totemNarrowSpacePlugin.h	\
 	totemClassInfo.h		\
@@ -356,6 +365,7 @@ libtotem_mully_plugin_la_SOURCES =	\
 	totemPluginGlue.h		\
 	totemPlugin.cpp			\
 	totemPlugin.h			\
+	totemStringGlue.h		\
 	totemMullYPlugin.cpp		\
 	totemMullYPlugin.h		\
 	totemClassInfo.h		\
