Commit d6c94378 authored by Christian Persch's avatar Christian Persch Committed by Christian Persch

R src/totem-mozilla-plugin.cpp: R totem-mozilla-scriptable.cpp: R

2006-08-11  Christian Persch  <chpe@cvs.gnome.org>

	* autogen.sh:
	* configure.in:
	* Makefile.am:
	* src/Makefile.am:
	R src/totem-mozilla-plugin.cpp:
	R totem-mozilla-scriptable.cpp:
	R totem-mozilla-scriptable.h:
	A browser-plugin/.cvsignore:
	A browser-plugin/Makefile.am:
	A browser-plugin/TODO:
	A browser-plugin/idl/.cvsignore:
	A browser-plugin/idl/Makefile.am:
	A browser-plugin/idl/totemIBasicPlayer.idl:
	A browser-plugin/idl/totemIComplexPlayer.idl:
	A browser-plugin/idl/totemIGMPControls.idl:
	A browser-plugin/idl/totemIGMPPlayer.idl:
	A browser-plugin/idl/totemINarrowSpacePlayer.idl:
	A browser-plugin/plugin.symbols:
	A browser-plugin/totemBasicPlugin.cpp:
	A browser-plugin/totemBasicPlugin.h:
	A browser-plugin/totemComplexPlugin.cpp:
	A browser-plugin/totemComplexPlugin.h:
	A browser-plugin/totemGMPPlugin.cpp:
	A browser-plugin/totemGMPPlugin.h:
	A browser-plugin/totemNarrowSpacePlugin.cpp:
	A browser-plugin/totemNarrowSpacePlugin.h:
	A browser-plugin/totemPlugin.cpp:
	A browser-plugin/totemPlugin.h:
	A browser-plugin/totemScriptableBase.cpp:
	A browser-plugin/totemScriptableBase.h:

	Move plugin to browser-plugin/ and build 4 variants of it
	with different JS interface and plugin name. Bug #343007.
parent b4f60d0d
2006-08-11 Christian Persch <chpe@cvs.gnome.org>
* autogen.sh:
* configure.in:
* Makefile.am:
* src/Makefile.am:
R src/totem-mozilla-plugin.cpp:
R totem-mozilla-scriptable.cpp:
R totem-mozilla-scriptable.h:
A browser-plugin/.cvsignore:
A browser-plugin/Makefile.am:
A browser-plugin/TODO:
A browser-plugin/idl/.cvsignore:
A browser-plugin/idl/Makefile.am:
A browser-plugin/idl/totemIBasicPlayer.idl:
A browser-plugin/idl/totemIComplexPlayer.idl:
A browser-plugin/idl/totemIGMPControls.idl:
A browser-plugin/idl/totemIGMPPlayer.idl:
A browser-plugin/idl/totemINarrowSpacePlayer.idl:
A browser-plugin/plugin.symbols:
A browser-plugin/totemBasicPlugin.cpp:
A browser-plugin/totemBasicPlugin.h:
A browser-plugin/totemComplexPlugin.cpp:
A browser-plugin/totemComplexPlugin.h:
A browser-plugin/totemGMPPlugin.cpp:
A browser-plugin/totemGMPPlugin.h:
A browser-plugin/totemNarrowSpacePlugin.cpp:
A browser-plugin/totemNarrowSpacePlugin.h:
A browser-plugin/totemPlugin.cpp:
A browser-plugin/totemPlugin.h:
A browser-plugin/totemScriptableBase.cpp:
A browser-plugin/totemScriptableBase.h:
Move plugin to browser-plugin/ and build 4 variants of it
with different JS interface and plugin name. Bug #343007.
2006-08-11 Bastien Nocera <hadess@hadess.net>
* src/ev-sidebar.c: (ev_sidebar_init): Use a
......
SUBDIRS = po data src help
SUBDIRS = po data src browser-plugin help
install-data-local:
@$(NORMAL_INSTALL)
......
......@@ -17,4 +17,4 @@ which gnome-autogen.sh || {
exit 1
}
REQUIRED_AUTOMAKE_VERSION=1.8 USE_GNOME2_MACROS=1 . gnome-autogen.sh
REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh
Makefile.in
Makefile
*.lo
*.loT
*.la
*.o
SUBDIRS = idl
plugindir = $(libdir)/mozilla/plugins
plugin_LTLIBRARIES =
EXTRA_DIST = \
plugin.symbols \
TODO
gecko_include_subdirs = \
. \
docshell \
dom \
necko
# Totem Basic Plugin
if ENABLE_BASIC_PLUGIN
plugin_LTLIBRARIES += libtotem-basic-plugin.la
libtotem_basic_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemBasicPlugin.cpp \
totemBasicPlugin.h
libtotem_basic_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/backend \
-I$(top_srcdir)/src/plparse \
-I$(top_builddir)/src \
-I$(top_builddir)/src/backend \
-I$(top_builddir)/src/plparse \
-Iidl \
$(addprefix -I$(MOZILLA_INCLUDE_ROOT)/,$(gecko_include_subdirs)) \
-DTOTEM_BASIC_PLUGIN \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
$(AM_CPPFLAGS)
libtotem_basic_plugin_la_CFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_basic_plugin_la_CXXFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_basic_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
libtotem_basic_plugin_la_LDFLAGS = \
-avoid-version \
-export-symbols $(srcdir)/plugin.symbols \
-module \
$(AM_LDFLAGS)
endif
# Totem GMP Plugin
if ENABLE_GMP_PLUGIN
plugin_LTLIBRARIES += libtotem-gmp-plugin.la
libtotem_gmp_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemGMPPlugin.cpp \
totemGMPPlugin.h
libtotem_gmp_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/backend \
-I$(top_srcdir)/src/plparse \
-I$(top_builddir)/src \
-I$(top_builddir)/src/backend \
-I$(top_builddir)/src/plparse \
-Iidl \
$(addprefix -I$(MOZILLA_INCLUDE_ROOT)/,$(gecko_include_subdirs)) \
-DTOTEM_GMP_PLUGIN \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
$(AM_CPPFLAGS)
libtotem_gmp_plugin_la_CFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_gmp_plugin_la_CXXFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_gmp_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
libtotem_gmp_plugin_la_LDFLAGS = \
-avoid-version \
-export-symbols $(srcdir)/plugin.symbols \
-module \
$(AM_LDFLAGS)
endif
# Totem Complex Plugin
if ENABLE_COMPLEX_PLUGIN
plugin_LTLIBRARIES += libtotem-complex-plugin.la
libtotem_complex_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemComplexPlugin.cpp \
totemComplexPlugin.h
libtotem_complex_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/backend \
-I$(top_srcdir)/src/plparse \
-I$(top_builddir)/src \
-I$(top_builddir)/src/backend \
-I$(top_builddir)/src/plparse \
-Iidl \
$(addprefix -I$(MOZILLA_INCLUDE_ROOT)/,$(gecko_include_subdirs)) \
-DTOTEM_COMPLEX_PLUGIN \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
$(AM_CPPFLAGS)
libtotem_complex_plugin_la_CFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_complex_plugin_la_CXXFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_complex_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
libtotem_complex_plugin_la_LDFLAGS = \
-avoid-version \
-export-symbols $(srcdir)/plugin.symbols \
-module \
$(AM_LDFLAGS)
endif
# Totem NarrowSpace Plugin
if ENABLE_NARROWSPACE_PLUGIN
plugin_LTLIBRARIES += libtotem-narrowspace-plugin.la
libtotem_narrowspace_plugin_la_SOURCES = \
totemPlugin.cpp \
totemPlugin.h \
totemNarrowSpacePlugin.cpp \
totemNarrowSpacePlugin.h
libtotem_narrowspace_plugin_la_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/backend \
-I$(top_srcdir)/src/plparse \
-I$(top_builddir)/src \
-I$(top_builddir)/src/backend \
-I$(top_builddir)/src/plparse \
-Iidl \
$(addprefix -I$(MOZILLA_INCLUDE_ROOT)/,$(gecko_include_subdirs)) \
-DTOTEM_NARROWSPACE_PLUGIN \
-DTOTEM_PL_PARSER_MINI \
-D_REENTRANT \
-DDBUS_API_SUBJECT_TO_CHANGE \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DGCONF_PREFIX=\""/apps/totem"\" \
-DDATADIR=\""$(pkgdatadir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DBINDIR=\""$(bindir)"\" \
$(AM_CPPFLAGS)
libtotem_narrowspace_plugin_la_CFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_narrowspace_plugin_la_CXXFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
$(MOZILLA_XPCOM_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CFLAGS)
libtotem_narrowspace_plugin_la_LIBADD = \
$(top_builddir)/src/plparse/libtotem-plparser-mini.la \
$(DBUS_LIBS) \
$(MOZILLA_LIBS)
libtotem_narrowspace_plugin_la_LDFLAGS = \
-avoid-version \
-export-symbols $(srcdir)/plugin.symbols \
-module \
$(AM_LDFLAGS)
endif
Plugin:
- get info about play state, URL etc back from viewer to the plugin
- support all <embed> and <object> attributes that the legacy plugins support
GMP plugin:
- write IDL files (where [_not_ MSDN !] to find documentation?)
Complex plugin:
- write IDL file (nsIHXPlayer.idl available, but incompatible with totem's
licence exception; is the exception needed for the *plugin* itself?)
NarrowSpace plugin:
- write IDL file (where to find documentation?)
Makefile.in
Makefile
*.h
*.html
*.java
*.xpt
uNULL =
BASIC_IDLS = \
totemIBasicPlayer.idl
COMPLEX_IDLS = \
totemIComplexPlayer.idl
GMP_IDLS = \
totemIGMPControls.idl \
totemIGMPPlayer.idl \
$(NULL)
NARROWSPACE_IDLS = \
totemINarrowSpacePlayer.idl
xptdir = $(libdir)/mozilla/plugins
xpt_DATA =
ALL_IDLS =
if ENABLE_BASIC_PLUGIN
ALL_IDLS += $(BASIC_IDLS)
xpt_DATA += libtotem-basic-plugin.xpt
endif
if ENABLE_GMP_PLUGIN
ALL_IDLS += $(GMP_IDLS)
xpt_DATA += libtotem-gmp-plugin.xpt
endif
if ENABLE_COMPLEX_PLUGIN
ALL_IDLS += $(COMPLEX_IDLS)
xpt_DATA += libtotem-complex-plugin.xpt
endif
if ENABLE_NARROWSPACE_PLUGIN
ALL_IDLS += $(NARROWSPACE_IDLS)
xpt_DATA += libtotem-narrowspace-plugin.xpt
endif
noinst_DATA = \
$(ALL_IDLS:.idl=.xpt) \
$(ALL_IDLS:.idl=.h)
docdir = $(pkgdatadir)/doc
doc_DATA = $(ALL_IDLS:.idl=.html)
CLEANFILES = \
$(noinst_HEADERS) \
$(noinst_DATA) \
$(xpt_DATA) \
$(doc_DATA)
EXTRA_DIST = \
$(BASIC_IDLS) \
$(GMP_IDLS) \
$(COMPLEX_IDLS) \
$(NARROWSPACE_IDLS)
%.h: %.idl
$(MOZILLA_XPIDL) -w -m header -I $(MOZILLA_IDLDIR) -I $(srcdir) $<
%.html: %.idl
$(MOZILLA_XPIDL) -w -m doc -I $(MOZILLA_IDLDIR) -I $(srcdir) $<
%.java: %.idl
$(MOZILLA_XPIDL) -w -m java -I $(MOZILLA_IDLDIR) -I $(srcdir) $<
%.xpt: %.idl
$(MOZILLA_XPIDL) -w -m typelib -I $(MOZILLA_IDLDIR) -I $(srcdir) $<
libtotem-basic-plugin.xpt: $(BASIC_IDLS:.idl=.xpt)
$(MOZILLA_XPT_LINK) $@ $^
libtotem-complex-plugin.xpt: $(COMPLEX_IDLS:.idl=.xpt)
$(MOZILLA_XPT_LINK) $@ $^
libtotem-gmp-plugin.xpt: $(GMP_IDLS:.idl=.xpt)
$(MOZILLA_XPT_LINK) $@ $^
libtotem-narrowspace-plugin.xpt: $(NARROWSPACE_IDLS:.idl=.xpt)
$(MOZILLA_XPT_LINK) $@ $^
......@@ -19,74 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
#include "mozilla-config.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <glib.h>
#include "totem-mozilla-scriptable.h"
totemMozillaObject::totemMozillaObject (TotemPlugin * _tm)
{
tm = _tm;
g_print ("Init scriptable instance\n");
}
totemMozillaObject::~totemMozillaObject ()
{
g_print ("Die scriptable instance\n");
}
NS_IMPL_ISUPPORTS2(totemMozillaObject, totemMozillaScript, nsIClassInfo)
void
totemMozillaObject::invalidatePlugin ()
{
this->tm = NULL;
}
/*
* From here on start the javascript-callable implementations.
*/
NS_IMETHODIMP
totemMozillaObject::Play ()
{
if (!this->tm)
return NS_ERROR_FAILURE;
g_message ("play");
dbus_g_proxy_call (this->tm->proxy, "Play", NULL,
G_TYPE_INVALID, G_TYPE_INVALID);
return NS_OK;
}
NS_IMETHODIMP
totemMozillaObject::Rewind ()
{
if (!this->tm)
return NS_ERROR_FAILURE;
g_message ("stop");
dbus_g_proxy_call (this->tm->proxy, "Stop", NULL,
G_TYPE_INVALID, G_TYPE_INVALID);
return NS_OK;
}
NS_IMETHODIMP
totemMozillaObject::Stop ()
{
if (!this->tm)
return NS_ERROR_FAILURE;
g_message ("pause");
dbus_g_proxy_call (this->tm->proxy, "Pause", NULL,
G_TYPE_INVALID, G_TYPE_INVALID);
return NS_OK;
}
#include "nsISupports.idl"
[scriptable, uuid(8e4f5790-23bc-4597-a083-2ec1cc2d72ab)]
interface totemIBasicPlayer : nsISupports {
void Play ();
void Rewind ();
void Stop ();
};
#include "nsISupports.idl"
/**
* totemIComplexPlayer:
*
* RealPlayer/HelixPlayer compatible scriptable interface
*
* @status: EXTERNAL
* XXX incomplete
*/
[scriptable, uuid(782b38b2-b647-4cfa-a9fb-1ccf45bf8019)]
interface totemIComplexPlayer: nsISupports
{
boolean DoPause ();
boolean DoPlay ();
boolean DoStop ();
};
/*
* Copyright (C) 2006
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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$
*/
#include "nsISupports.idl"
/**
* totemIGMPControls interface
*
* @status: EXTERNAL
* XXX incomplete
*/
[scriptable, uuid(07f100ba-1149-40b4-8086-849f346cd6fb)]
interface totemIGMPControls : nsISupports
{
/**
* Pause playing.
*/
void pause ();
/**
* Start playing.
*/
void play ();
/**
* Stop playing.
*/
void stop ();
};
/*
* Copyright (C) 2006
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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$
*/
#include "nsISupports.idl"
interface totemIGMPControls;
/**
* totemIGMPPlayer interface
*
* The interface containing the core plugin interfaces from WMP.
*
* @status: EXTERNAL
* XXX incomplete
*/
[scriptable, uuid(e1b5b905-6833-4386-9acb-1e1537e7f7a2)]
interface totemIGMPPlayer : nsISupports
{
/* Properties */
/**
* Gets the Controls object
*/
readonly attribute totemIGMPControls controls;
/* Methods */
};
/* Totem Mozilla plugin
*
* Copyright (C) <2004> Bastien Nocera <hadess@hadess.net>
* Copyright (C) <2002> David A. Schleef <ds@schleef.org>
*