+++ /dev/null
-/*****************************************************************************/\r
-\r
-Documentation summary\r
-\r
- 'doc/introduction.txt' to know the purpose of the project\r
-\r
- 'doc/projectmanangement.txt' to know the organisation of files and directories.\r
-\r
- 'doc/avancement.txt' to know the progress in the development of the project\r
-\r
-/*****************************************************************************/\r
-\r
-1. Run getsources.sh (without sudo) to get the sources of gpac and/or webkit if necessary\r
-\r
-2. Run 'sudo ./install.sh' with the appropriate parameter (full, player, gpac, webkit or dependencies)\r
+++ /dev/null
-
-install.sh script will work on the follwoing conditions of execution :
-
-linux ubuntu 11.04 environnement
-graphic drivers supporting transparency
-installed xulrunner with correct library path (that could be not the default case in old version of xulrunner)
-
-the execution of hbbtvplayer require a enought large screen to display several windows, including a main window able in 720p resolution (1280x720)
-
-
+++ /dev/null
-\r
-mardi 12 avril 2011, 09:09:57 (UTC+0200)\r
-\r
-- video on TVview : bug of displaying, video truncated\r
-\r
-jeudi 2 décembre 2010, 14:14:23 (UTC+0100)\r
-\r
-- adding Remote Control keys as buttons, simulating the RCU\r
-\r
-lundi 22 novembre 2010, 09:50:31 (UTC+0100)\r
-\r
-- construction du GTK global, liaison avec Webkit par le GTKWidget dedie... liaosion avec GPAC , en fenetre\r
-- would be nice to find a way to do all in one window.\r
-\r
-jeudi 14 octobre 2010, 10:15:36 (UTC+0200)\r
-\r
-- création\r
+++ /dev/null
-\r
-HbbTV Player\r
-\r
-the goal is to get a HbbTVTerminal emulation on a PC and be able to play HbbTV applications, that could be include in a Stream.\r
-The player will receveive input of HbbtvApplication entry files, or TS-stream featuring HBBTV.\r
+++ /dev/null
-\r
-the project include 2 sub-project : \r
-\r
-- hbbtvterminal : a terminal able to play Video/Audio, an RCU emulation, and display a webbrowser linking to the hbbtvbrowserplugin (see below)\r
-\r
-- hbbtvbrowserplugin : a NPAPI plugin able to play HbbtvApps in a webbrowser .\r
-\r
-\r
-CODEBLOCKS : \r
-\r
-for the use of codeblocks , you can find a workspace in /projectmanager/codeblocks/hbbtvplayer/\r
-\r
-each project contains a projectmanager directory, including a codeblocks specification projects :\r
-\r
-/hbbtvterminal/projectmanager/codeblocks/hbbtvterminal/hbbtvterminal.cbp\r
-/hbbtvbrowserplugin/projectmanager/codeblocks/hbbtvbrowserplugin/hbbtvbrowserplugin.cbp\r
+++ /dev/null
-#!/bin/sh -e
-
-WEBKIT=0
-GPAC=0
-
-if [ -z $1 ] ; then
- echo "\nDO NOT USE sudo FOR THIS SCRIPT"
- echo "\nUsage: You must choose options :"
- echo "\n\033[31m full - build the whole package (gpac+webkit+hbbtvplayer) Recommended for computer without gpac \033[0m"
- echo "\n\033[33m webkit - download Webkit sources and install it\033[0m"
- echo "\n\033[33m gpac - download gpac sources and install it\033[0m"
- exit 1
-fi
-
-for i in $* ; do
- if [ "$i" = "full" ] ; then
- echo -e "\033[31m Usage: $0 Full Building : Activated \033[0m"
- WEBKIT=1
- GPAC=1
- fi
-
- if [ "$i" = "webkit" ] ; then
- echo -e "\033[33m Usage: $0 Webkit Building : Activated \033[0m"
- WEBKIT=1
- fi
-
- if [ "$i" = "gpac" ] ; then
- echo -e "\033[33m Usage: $0 gpac Building : Activated \033[0m"
- WEBKIT=1
- fi
-done
-
-if [ $GPAC -eq 1 ] ; then
- svn checkout https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac gpac
-fi
-
-if [ $WEBKIT -eq 1 ] ; then
- svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit --depth files -r 97300 # 98458 ?
- svn checkout http://svn.webkit.org/repository/webkit/trunk/Source WebKit/Source -r 97300
- svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools WebKit/Tools -r 97300
- svn checkout http://svn.webkit.org/repository/webkit/trunk/WebKitLibraries WebKit/WebKitLibraries -r 97300
-fi
-
-
+++ /dev/null
-******************************************
-HBBTVBROWSERPLUGIN v0.01
-
-To build :
-
- make
-
-To install :
-
- sudo make install
-
-*******************************************
-
-
+++ /dev/null
-#! /bin/sh
-
-autoreconf --install -v
-
-./configure
+++ /dev/null
-
-
-AC_INIT([hbbtvbrowserplugin], [0.1.0], [stanislas.selle@telecom-paristech.fr])
-
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_MACRO_DIR([m4])
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-AM_INIT_AUTOMAKE([foreign -Wall -Werror])
-AC_PROG_CC
-AC_PROG_LIBTOOL
-
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28.0])
-PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.20.1])
-AC_SUBST([PLUGINDIR], [/usr/lib/mozilla/plugins])
-LT_INIT
-AC_CONFIG_FILES([makefile src/makefile hbbtvbrowserplugin.pc])
-AC_OUTPUT
+++ /dev/null
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-plugindir=/usr/lib/mozilla/plugins/
-
-Name: hbbtvbrowserplugin
-Description: The Hbbtv BrowserPlugin (NPAPI)
-Version:@PACKAGE_VERSION@
-Cflags: -I${includedir}/hbbtvbrowserplugin
-Libs: -L${libdir} -L${plugindir} -lhbbtvbrowserplugin
-
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9,00"\r
- Name="hbbtvbrowserplugin"\r
- ProjectGUID="{CBFCB6F1-4877-4CBA-9F59-9B9ADD1D64E5}"\r
- RootNamespace="hbbtvbrowserplugin"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories=".\src;".\src\webkit-plugin-header";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\gtk-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\gio-win32-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\cairo";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0\gio";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0\glib";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\lib\glib-2.0\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\pango-1.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\lib\gtk-2.0\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\gdk-pixbuf-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\atk-1.0""\r
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_WIN32;_WIN32_;HBBTVBROWSERPLUGIN_EXPORTS"\r
- GeneratePreprocessedFile="0"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="4"\r
- CompileAs="2"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- OutputFile="..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\lib\libhbbtvbrowserplugin.lib"\r
- AdditionalLibraryDirectories=""\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="2"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=".\src;".\src\webkit-plugin-header";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\gtk-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\gio-win32-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\cairo";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0\gio";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\glib-2.0\glib";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\lib\glib-2.0\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\pango-1.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\lib\gtk-2.0\include";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\gdk-pixbuf-2.0";"..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\include\atk-1.0""\r
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_WIN32;_WIN32_;HBBTVBROWSERPLUGIN_EXPORTS"\r
- RuntimeLibrary="2"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- OutputFile="..\hbbtvterminal\Win32Build\WebKitGTK-Bundle\lib\libhbbtvbrowserplugin.lib" \r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="2"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Fichiers sources"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\applicationclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\applicationprivatedataclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\configurationclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\downloadclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\downloadcollectionclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\drmcontrolinfocollectionclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\drmcontrolinformationclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtvbrowserplugin.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtvbrowserpluginapi.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\keysetclass.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfapplicationmanager.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfconfiguration.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfdownloadmanager.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfdownloadtrigger.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\videobroadcast.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Fichiers d'en-tête"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\src\applicationclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\applicationprivatedataclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\configurationclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\downloadclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\downloadcollectionclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\drmcontrolinfocollectionclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\drmcontrolinformationclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtvbrowserplugin.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtvbrowserpluginapi.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtvkeyset.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\keysetclass.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfapplicationmanager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfconfiguration.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfdownloadmanager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\oipfdownloadtrigger.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\videobroadcast.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Fichiers de ressources"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-SUBDIRS = src
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = hbbtvbrowserplugin.pc
-
-
-
+++ /dev/null
-###############################################################################
-####
-#### MAKEFILE
-####
-#### Copyright Telecom Paristech 2011
-####
-#### Author : Stanislas Selle
-####
-###############################################################################
-
-###############################################################################
-## Files and Path
-
-PLUGINDIR = /usr/lib/mozilla/plugins
-INSTALL_INCLUDEDIR = /usr/local/include/hbbtvbrowserplugin
-INSTALL_LIBDIR = /usr/local/lib
-INSTALL_PKGDIR = /usr/lib/pkgconfig
-
-PKGFILE = hbbtvbrowserplugin.pc
-
-MAINTARGET = bin/libhbbtvbrowserplugin.so
-
-SRCDIR = src
-HEADERSDIR = src
-
-OBJ = obj/hbbtvbrowserplugin.o\
- obj/oipfapplicationmanager.o\
- obj/applicationclass.o\
- obj/applicationprivatedataclass.o\
- obj/oipfconfiguration.o\
- obj/configurationclass.o\
- obj/oipfdownloadmanager.o\
- obj/oipfdownloadtrigger.o\
- obj/downloadclass.o\
- obj/downloadcollectionclass.o\
- obj/drmcontrolinfocollectionclass.o\
- obj/drmcontrolinformationclass.o\
- obj/videobroadcast.o\
- obj/keysetclass.o
-
-EXPORTHEADERS = hbbtvbrowserpluginapi.h
-
-#TESTURL = file:///home/selle/ressources/HbbTVapps/TPT/app1/index.html
-TESTURL = http://aquila.enst.fr:8080/subwebsite/hbbtvtest/test0003/index.php
-TESTLOG = /tmp/test-err.txt
-###############################################################################
-## Programs
-
-COMPILER = cc
-DELETER = rm -f
-BROWSERTEST = firefox
-
-
-###############################################################################
-## Options, Flags and LinkS
-
-CFLAGS = -Wall -DXP_UNIX=1 -DMOZ_X11=1 -fPIC -g
-
-INCLUDEFLAGS = -Isrc
-LIBRARYFLAGS =
-
-FROMPKG = libxul
-
-PKGFLAGS = `pkg-config --cflags $(FROMPKG) `
-PKGLIBS = `pkg-config --libs $(FROMPKG) `
-
-INCLUDEFLAGS += $(PKGFLAGS)
-LIBRARYFLAGS += $(PKGLIBS)
-
-###############################################################################
-## Rules
-
-all : $(MAINTARGET)
-
-$(MAINTARGET) : $(OBJ)
- @echo "====> Compiling $(MAINTARGET)"
- $(COMPILER) $(CFLAGS) $(LIBRARYFLAGS) -shared $(OBJ) -o $(MAINTARGET)
-
-obj/%.o: $(SRCDIR)/%.c $(HEADERSDIR)/%.h
- @echo "====> Compiling $< "
- $(COMPILER) $(CFLAGS) -c $< $(INCLUDEFLAGS) -o $@
-
-test : all
- $(BROWSERTEST) $(TESTURL) 2> $(TESTLOG); cat $(TESTLOG)
-
-install : all
- @echo "====> Installing"
- cp $(MAINTARGET) $(PLUGINDIR)
- @if test -d $(INSTALL_INCLUDEDIR);\
- then echo " ===> $(INSTALL_INCLUDEDIR) existing already" ; \
- else mkdir $(INSTALL_INCLUDEDIR); fi;
- cp $(HEADERSDIR)/$(EXPORTHEADERS) $(INSTALL_INCLUDEDIR)
- cp $(PKGFILE) $(INSTALL_PKGDIR)
- @echo "Done."
-
-uninstall :
- @echo "====> Uninstalling"
- $(DELETER) $(INSTALL_PKGDIR)/$(PKGFILE) $(INSTALL_INCLUDEDIR)/$(EXPORTHEADERS) $(INSTALL_INCLUDEDIR)/$(MAINTARGET)
- if test -d $(INSTALL_INCLUDEDIR);\
- then rmdir $(INSTALL_INCLUDEDIR); fi;
-
-clean :
- @echo "====> Cleaning"
- @$(DELETER) $(OBJ)
- @echo "Deleting objects"
- @$(DELETER) $(MAINTARGET)
- @echo "Deleting $(MAINTARGET)"
-
-###############################################################################
-###############################################################################
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
- <FileVersion major="1" minor="6" />
- <Project>
- <Option title="hbbtvbrowserplugin" />
- <Option pch_mode="2" />
- <Option compiler="gcc" />
- <Build>
- <Target title="Debug">
- <Option output="bin/Debug/hbbtvbrowserplugin" prefix_auto="1" extension_auto="1" />
- <Option object_output="obj/Debug/" />
- <Option type="1" />
- <Option compiler="gcc" />
- <Compiler>
- <Add option="-g" />
- </Compiler>
- </Target>
- </Build>
- <Compiler>
- <Add option="-Wall" />
- </Compiler>
- <Unit filename="../../../autogen.sh" />
- <Unit filename="../../../configure.ac" />
- <Unit filename="../../../makefile.am" />
- <Unit filename="../../../makefile.old" />
- <Unit filename="../../../src/applicationclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/applicationclass.h" />
- <Unit filename="../../../src/applicationprivatedataclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/applicationprivatedataclass.h" />
- <Unit filename="../../../src/configurationclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/configurationclass.h" />
- <Unit filename="../../../src/downloadclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/downloadclass.h" />
- <Unit filename="../../../src/downloadcollectionclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/downloadcollectionclass.h" />
- <Unit filename="../../../src/drmcontrolinfocollectionclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/drmcontrolinfocollectionclass.h" />
- <Unit filename="../../../src/drmcontrolinformationclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/drmcontrolinformationclass.h" />
- <Unit filename="../../../src/hbbtvbrowserplugin.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/hbbtvbrowserplugin.h" />
- <Unit filename="../../../src/hbbtvbrowserpluginapi.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/hbbtvbrowserpluginapi.h" />
- <Unit filename="../../../src/keysetclass.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/keysetclass.h" />
- <Unit filename="../../../src/makefile.am" />
- <Unit filename="../../../src/oipfapplicationmanager.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/oipfapplicationmanager.h" />
- <Unit filename="../../../src/oipfconfiguration.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/oipfconfiguration.h" />
- <Unit filename="../../../src/oipfdownloadmanager.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/oipfdownloadmanager.h" />
- <Unit filename="../../../src/oipfdownloadtrigger.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/oipfdownloadtrigger.h" />
- <Unit filename="../../../src/videobroadcast.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="../../../src/videobroadcast.h" />
- <Extensions>
- <code_completion />
- <debugger />
- </Extensions>
- </Project>
-</CodeBlocks_project_file>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
- <ActiveTarget name="Debug" />
- <File name="../../../autogen.sh" open="1" top="0" tabpos="5">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../configure.ac" open="1" top="0" tabpos="4">
- <Cursor position="443" topLine="0" />
- </File>
- <File name="../../../makefile.am" open="1" top="1" tabpos="1">
- <Cursor position="116" topLine="0" />
- </File>
- <File name="../../../makefile.old" open="1" top="0" tabpos="3">
- <Cursor position="2670" topLine="56" />
- </File>
- <File name="../../../src/applicationclass.c" open="0" top="0" tabpos="4">
- <Cursor position="5525" topLine="169" />
- </File>
- <File name="../../../src/applicationclass.h" open="0" top="0" tabpos="4">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../src/applicationprivatedataclass.c" open="0" top="0" tabpos="3">
- <Cursor position="0" topLine="72" />
- </File>
- <File name="../../../src/applicationprivatedataclass.h" open="0" top="0" tabpos="8">
- <Cursor position="1066" topLine="0" />
- </File>
- <File name="../../../src/configurationclass.c" open="0" top="0" tabpos="6">
- <Cursor position="2608" topLine="0" />
- </File>
- <File name="../../../src/configurationclass.h" open="0" top="0" tabpos="7">
- <Cursor position="1064" topLine="0" />
- </File>
- <File name="../../../src/downloadclass.c" open="0" top="0" tabpos="13">
- <Cursor position="904" topLine="12" />
- </File>
- <File name="../../../src/downloadclass.h" open="0" top="0" tabpos="10">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../src/downloadcollectionclass.c" open="0" top="0" tabpos="15">
- <Cursor position="567" topLine="0" />
- </File>
- <File name="../../../src/downloadcollectionclass.h" open="0" top="0" tabpos="9">
- <Cursor position="68" topLine="0" />
- </File>
- <File name="../../../src/drmcontrolinfocollectionclass.c" open="0" top="0" tabpos="1">
- <Cursor position="44" topLine="0" />
- </File>
- <File name="../../../src/drmcontrolinfocollectionclass.h" open="0" top="0" tabpos="38">
- <Cursor position="78" topLine="0" />
- </File>
- <File name="../../../src/drmcontrolinformationclass.c" open="0" top="0" tabpos="2">
- <Cursor position="44" topLine="0" />
- </File>
- <File name="../../../src/drmcontrolinformationclass.h" open="0" top="0" tabpos="39">
- <Cursor position="72" topLine="0" />
- </File>
- <File name="../../../src/hbbtvbrowserplugin.c" open="1" top="0" tabpos="7">
- <Cursor position="3316" topLine="104" />
- </File>
- <File name="../../../src/hbbtvbrowserplugin.h" open="0" top="0" tabpos="1">
- <Cursor position="117" topLine="0" />
- </File>
- <File name="../../../src/hbbtvbrowserpluginapi.c" open="1" top="0" tabpos="6">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../src/keysetclass.c" open="0" top="0" tabpos="16">
- <Cursor position="26" topLine="0" />
- </File>
- <File name="../../../src/keysetclass.h" open="0" top="0" tabpos="5">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../src/makefile.am" open="1" top="0" tabpos="2">
- <Cursor position="1283" topLine="0" />
- </File>
- <File name="../../../src/oipfapplicationmanager.c" open="0" top="0" tabpos="3">
- <Cursor position="3766" topLine="128" />
- </File>
- <File name="../../../src/oipfapplicationmanager.h" open="0" top="0" tabpos="12">
- <Cursor position="374" topLine="0" />
- </File>
- <File name="../../../src/oipfconfiguration.c" open="0" top="0" tabpos="5">
- <Cursor position="3172" topLine="100" />
- </File>
- <File name="../../../src/oipfconfiguration.h" open="0" top="0" tabpos="11">
- <Cursor position="960" topLine="0" />
- </File>
- <File name="../../../src/oipfdownloadmanager.c" open="0" top="0" tabpos="5">
- <Cursor position="5717" topLine="169" />
- </File>
- <File name="../../../src/oipfdownloadmanager.h" open="0" top="0" tabpos="11">
- <Cursor position="840" topLine="0" />
- </File>
- <File name="../../../src/oipfdownloadtrigger.c" open="0" top="0" tabpos="4">
- <Cursor position="158" topLine="0" />
- </File>
- <File name="../../../src/oipfdownloadtrigger.h" open="0" top="0" tabpos="9">
- <Cursor position="103" topLine="0" />
- </File>
- <File name="../../../src/videobroadcast.c" open="0" top="0" tabpos="2">
- <Cursor position="5797" topLine="185" />
- </File>
- <File name="../../../src/videobroadcast.h" open="0" top="0" tabpos="13">
- <Cursor position="274" topLine="0" />
- </File>
-</CodeBlocks_layout_file>
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "applicationprivatedataclass.h"\r
-#include "applicationclass.h"\r
-\r
-#define kAPPLICATION_ID_PROPERTY_VISIBLE 0\r
-#define kAPPLICATION_ID_PROPERTY_PRIVATEDATA 1\r
-#define kAPPLICATION_NUM_PROPERTY_IDENTIFIERS 2\r
-\r
-#define kAPPLICATION_ID_METHOD_CREATEAPPLICATION 0\r
-#define kAPPLICATION_ID_METHOD_DESTROYAPPLICATION 1\r
-#define kAPPLICATION_ID_METHOD_SHOW 2\r
-#define kAPPLICATION_ID_METHOD_HIDE 3\r
-#define kAPPLICATION_NUM_METHOD_IDENTIFIERS 4\r
-\r
-\r
-static bool v_bAPPLICATIONIdentifiersInitialized = false;\r
-\r
-static NPIdentifier v_APPLICATIONPropertyIdentifiers[kAPPLICATION_NUM_PROPERTY_IDENTIFIERS];\r
-static const NPUTF8 * v_APPLICATIONPropertyNames[kAPPLICATION_NUM_PROPERTY_IDENTIFIERS] = {\r
- "visible",\r
- "privateData"\r
-};\r
-\r
-static NPIdentifier v_APPLICATIONMethodIdentifiers[kAPPLICATION_NUM_METHOD_IDENTIFIERS];\r
-static const NPUTF8 * v_APPLICATIONMethodNames[kAPPLICATION_NUM_METHOD_IDENTIFIERS] = {\r
- "createApplication",\r
- "destroyApplication",\r
- "show",\r
- "hide"\r
-};\r
-\r
-\r
-static void APPLICATIONinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_APPLICATIONPropertyNames, kAPPLICATION_NUM_PROPERTY_IDENTIFIERS, v_APPLICATIONPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_APPLICATIONMethodNames, kAPPLICATION_NUM_METHOD_IDENTIFIERS, v_APPLICATIONMethodIdentifiers );\r
-}\r
-\r
-NPClass stAPPLICATIONclass;\r
-NPClass* pAPPLICATIONclass = NULL;\r
-\r
-NPClass* fillAPPLICATIONpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pAPPLICATIONclass == NULL)\r
- {\r
- stAPPLICATIONclass.allocate = APPLICATION_Allocate;\r
- stAPPLICATIONclass.deallocate = APPLICATION_Deallocate;\r
- stAPPLICATIONclass.invalidate = APPLICATION_Invalidate;\r
- stAPPLICATIONclass.hasMethod = APPLICATION_HasMethod;\r
- stAPPLICATIONclass.invoke = APPLICATION_Invoke;\r
- stAPPLICATIONclass.invokeDefault = APPLICATION_InvokeDefault;\r
- stAPPLICATIONclass.hasProperty = APPLICATION_HasProperty;\r
- stAPPLICATIONclass.getProperty = APPLICATION_GetProperty;\r
- stAPPLICATIONclass.setProperty = APPLICATION_SetProperty;\r
- stAPPLICATIONclass.removeProperty = APPLICATION_RemoveProperty;\r
- stAPPLICATIONclass.enumerate = APPLICATION_Enumerate;\r
- pAPPLICATIONclass = &stAPPLICATIONclass;\r
- }\r
-\r
- return pAPPLICATIONclass;\r
-}\r
-\r
-\r
-NPObject * APPLICATION_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
- if (!v_bAPPLICATIONIdentifiersInitialized)\r
- {\r
- v_bAPPLICATIONIdentifiersInitialized = true;\r
- APPLICATIONinitializeIdentifiers();\r
- }\r
- \r
- NPObj_Application* newapplication = (NPObj_Application*)MEMALLOC(sizeof(NPObj_Application));\r
- fprintf(stderr, "\t%s : Allocation at \x1b[%i;3%im%p\n\x1b[0m",__FUNCTION__, 1, 1, newapplication );\r
- newapplication->npp = npp; \r
- newapplication->visible = true;\r
- newapplication->privateData = sBrowserFuncs->createobject(npp, fillAPPPRIVDATApclass());\r
- fprintf(stderr, "\t%s : Create privateData property at \x1b[%i;3%im%p\n\x1b[0m ",__FUNCTION__, 1, 1, newapplication->privateData );\r
- newapplication->visible = true;\r
- return (NPObject*)newapplication;\r
-}\r
-\r
- void APPLICATION_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- NPObj_Application* applicationobj = (NPObj_Application*)obj;\r
- sBrowserFuncs->releaseobject(applicationobj->privateData);\r
- MEMFREE(applicationobj);\r
- return;\r
-}\r
-\r
- void APPLICATION_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
- bool APPLICATION_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
-\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kAPPLICATION_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_APPLICATIONMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool APPLICATION_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- if (name == v_APPLICATIONMethodIdentifiers[kAPPLICATION_ID_METHOD_CREATEAPPLICATION])\r
- {\r
- APPLICATION_Invoke_CreateApplication(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_APPLICATIONMethodIdentifiers[kAPPLICATION_ID_METHOD_DESTROYAPPLICATION])\r
- {\r
- APPLICATION_Invoke_DestroyApplication(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_APPLICATIONMethodIdentifiers[kAPPLICATION_ID_METHOD_HIDE])\r
- {\r
- APPLICATION_Invoke_Hide(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_APPLICATIONMethodIdentifiers[kAPPLICATION_ID_METHOD_SHOW])\r
- {\r
- APPLICATION_Invoke_Show(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else\r
- { \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-}\r
-\r
- bool APPLICATION_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool APPLICATION_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kAPPLICATION_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_APPLICATIONPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool APPLICATION_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- \r
- bool fctresult = false;\r
- NPObj_Application* AppliObj = (NPObj_Application*)obj;\r
- \r
- if (name == v_APPLICATIONPropertyIdentifiers[kAPPLICATION_ID_PROPERTY_PRIVATEDATA])\r
- { \r
- sBrowserFuncs->retainobject(AppliObj->privateData);\r
- OBJECT_TO_NPVARIANT(AppliObj->privateData, *result); \r
- fctresult = true;\r
- }\r
- else if (name == v_APPLICATIONPropertyIdentifiers[kAPPLICATION_ID_PROPERTY_VISIBLE])\r
- { \r
- BOOLEAN_TO_NPVARIANT(AppliObj->visible, *result);\r
- fctresult = true;\r
- }\r
- else\r
- \r
- return fctresult;\r
-}\r
-\r
- bool APPLICATION_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool APPLICATION_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
- bool APPLICATION_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-/** implementation **/\r
-\r
-void APPLICATION_Invoke_CreateApplication(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void APPLICATION_Invoke_DestroyApplication(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void APPLICATION_Invoke_Show(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO; \r
- NPObj_Application* AppliObj = (NPObj_Application*)obj;\r
- OnAPPLICATION_Show();\r
- AppliObj->visible = true;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void APPLICATION_Invoke_Hide(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- \r
- NPObj_Application* AppliObj = (NPObj_Application*)obj;\r
- OnAPPLICATION_Hide();\r
- AppliObj->visible = false;\r
- NOTIMPLEMENTED; \r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __APPLICATIONCLASS_H__\r
-#define __APPLICATIONCLASS_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-typedef struct\r
-{\r
- NPObject header; \r
- NPP npp; \r
- \r
- NPBool visible;\r
- NPObject* privateData;\r
- \r
-} NPObj_Application;\r
-\r
-\r
-NPClass* fillAPPLICATIONpclass(void);\r
-\r
-NPObject * APPLICATION_Allocate(NPP npp, NPClass *aClass);\r
-void APPLICATION_Deallocate(NPObject *obj);\r
-void APPLICATION_Invalidate(NPObject *obj);\r
-bool APPLICATION_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool APPLICATION_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool APPLICATION_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool APPLICATION_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool APPLICATION_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool APPLICATION_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool APPLICATION_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool APPLICATION_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-\r
-void APPLICATION_Invoke_CreateApplication(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void APPLICATION_Invoke_DestroyApplication(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void APPLICATION_Invoke_Show(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void APPLICATION_Invoke_Hide(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "applicationprivatedataclass.h"\r
-\r
-#define kAPPPRIVDATA_ID_PROPERTY_KEYSET 0\r
-#define kAPPPRIVDATA_ID_PROPERTY_CURRENTCHANNEL 1\r
-#define kAPPPRIVDATA_NUM_PROPERTY_IDENTIFIERS 2\r
-\r
-#define kAPPPRIVDATA_ID_METHOD_GETMEMFREE 0\r
-#define kAPPPRIVDATA_NUM_METHOD_IDENTIFIERS 1\r
-\r
-\r
-\r
-bool v_bAPPPRIVDATAIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_APPPRIVDATAPropertyIdentifiers[kAPPPRIVDATA_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_APPPRIVDATAPropertyNames[kAPPPRIVDATA_NUM_PROPERTY_IDENTIFIERS] = {\r
- "keyset",\r
- "currentChannel"\r
- };\r
-\r
-NPIdentifier v_APPPRIVDATAMethodIdentifiers[kAPPPRIVDATA_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_APPPRIVDATAMethodNames[kAPPPRIVDATA_NUM_METHOD_IDENTIFIERS] = {\r
- "getMEMFREE"\r
- };\r
-\r
-static void APPPRIVDATAinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_APPPRIVDATAPropertyNames, kAPPPRIVDATA_NUM_PROPERTY_IDENTIFIERS, v_APPPRIVDATAPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_APPPRIVDATAMethodNames, kAPPPRIVDATA_NUM_METHOD_IDENTIFIERS, v_APPPRIVDATAMethodIdentifiers );\r
-}\r
-\r
-\r
-NPClass stAPPPRIVDATAclass;\r
-NPClass* pAPPPRIVDATAclass = NULL;\r
-\r
-NPClass* fillAPPPRIVDATApclass(void)\r
-{\r
- TRACEINFO;\r
- if (pAPPPRIVDATAclass == NULL)\r
- {\r
- stAPPPRIVDATAclass.allocate = APPPRIVDATA_Allocate;\r
- stAPPPRIVDATAclass.deallocate = APPPRIVDATA_Deallocate;\r
- stAPPPRIVDATAclass.invalidate = APPPRIVDATA_Invalidate;\r
- stAPPPRIVDATAclass.hasMethod = APPPRIVDATA_HasMethod;\r
- stAPPPRIVDATAclass.invoke = APPPRIVDATA_Invoke;\r
- stAPPPRIVDATAclass.invokeDefault = APPPRIVDATA_InvokeDefault;\r
- stAPPPRIVDATAclass.hasProperty = APPPRIVDATA_HasProperty;\r
- stAPPPRIVDATAclass.getProperty = APPPRIVDATA_GetProperty;\r
- stAPPPRIVDATAclass.setProperty = APPPRIVDATA_SetProperty;\r
- stAPPPRIVDATAclass.removeProperty = APPPRIVDATA_RemoveProperty;\r
- stAPPPRIVDATAclass.enumerate = APPPRIVDATA_Enumerate;\r
- pAPPPRIVDATAclass = &stAPPPRIVDATAclass;\r
- }\r
-\r
- return pAPPPRIVDATAclass;\r
-}\r
-\r
-\r
-NPObject * APPPRIVDATA_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- NPObject* result;\r
-\r
- \r
- if (!v_bAPPPRIVDATAIdentifiersInitialized)\r
- {\r
- v_bAPPPRIVDATAIdentifiersInitialized = true;\r
- APPPRIVDATAinitializeIdentifiers();\r
- }\r
- \r
- NPObj_AppPrivData* newappprivdata = (NPObj_AppPrivData*)MEMALLOC(sizeof(NPObj_AppPrivData)); \r
- fprintf(stderr, "\t%s : Allocation at \x1b[%i;3%im%p\n\x1b[0m",__FUNCTION__, 1, 1, newappprivdata); \r
- newappprivdata->npp = npp;\r
- newappprivdata->keyset = sBrowserFuncs->createobject(npp, fillKEYSETpclass()); \r
- fprintf(stderr, "\t%s : Create keyset property at \x1b[%i;3%im%p\n\x1b[0m",__FUNCTION__, 1, 1, newappprivdata->keyset );\r
- result = (NPObject*)newappprivdata;\r
- return result;\r
-}\r
-\r
-\r
-void APPPRIVDATA_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- NPObj_AppPrivData* appprivdataobj = (NPObj_AppPrivData*)obj;\r
- sBrowserFuncs->releaseobject(appprivdataobj->keyset);\r
- MEMFREE(appprivdataobj);\r
- return;\r
-}\r
-\r
-void APPPRIVDATA_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
-bool APPPRIVDATA_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kAPPPRIVDATA_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_APPPRIVDATAMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool APPPRIVDATA_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- if (name == v_APPPRIVDATAMethodIdentifiers[kAPPPRIVDATA_ID_METHOD_GETMEMFREE])\r
- {\r
- APPPRIVDATA_Invoke_GetFreeMen(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else\r
- { \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-}\r
-\r
-bool APPPRIVDATA_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool APPPRIVDATA_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kAPPPRIVDATA_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_APPPRIVDATAPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- \r
- return result;\r
-}\r
-\r
-bool APPPRIVDATA_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- \r
- bool fctresult = false;\r
- NPObj_AppPrivData* AppPrivDataObj = (NPObj_AppPrivData*)obj;\r
- if (!strcmp(sBrowserFuncs->utf8fromidentifier(name), v_APPPRIVDATAPropertyNames[kAPPPRIVDATA_ID_PROPERTY_KEYSET])) \r
- { \r
- sBrowserFuncs->retainobject(AppPrivDataObj->keyset);\r
- OBJECT_TO_NPVARIANT(AppPrivDataObj->keyset, *result);\r
- \r
- fctresult = true;\r
- }\r
- else\r
- \r
- return fctresult;\r
-}\r
-\r
-bool APPPRIVDATA_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- return fctresult;\r
-}\r
-\r
-bool APPPRIVDATA_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-bool APPPRIVDATA_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-/** implementation **/\r
-void APPPRIVDATA_Invoke_GetFreeMen(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __APPLICATIONPRIVATEDATACLASS_H__\r
-#define __APPLICATIONPRIVATEDATACLASS_H__\r
-\r
-#include "keysetclass.h"\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-typedef struct\r
-{\r
- NPObject header; \r
- NPP npp; \r
-\r
- NPObject* keyset; \r
- NPObject* currentChannel; \r
-} NPObj_AppPrivData;\r
-\r
-NPClass* fillAPPPRIVDATApclass(void);\r
-\r
-NPObject * APPPRIVDATA_Allocate(NPP npp, NPClass *aClass);\r
-void APPPRIVDATA_Deallocate(NPObject *obj);\r
-void APPPRIVDATA_Invalidate(NPObject *obj);\r
-bool APPPRIVDATA_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool APPPRIVDATA_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool APPPRIVDATA_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool APPPRIVDATA_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool APPPRIVDATA_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool APPPRIVDATA_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool APPPRIVDATA_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool APPPRIVDATA_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-void APPPRIVDATA_Invoke_GetFreeMen(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "configurationclass.h"\r
-\r
-\r
-#define kCONFIGURATION_ID_PROPERTY_PREFERREDAUDIOLANGUAGE 0\r
-#define kCONFIGURATION_ID_PROPERTY_PREFERREDSUBTITLELANGUAGE 1\r
-#define kCONFIGURATION_ID_PROPERTY_COUNTRYID 2\r
-#define kCONFIGURATION_NUM_PROPERTY_IDENTIFIERS 3\r
-\r
-#define kCONFIGURATION_NUM_METHOD_IDENTIFIERS 0\r
-\r
-\r
-\r
-bool v_bCONFIGURATIONIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_CONFIGURATIONPropertyIdentifiers[kCONFIGURATION_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_CONFIGURATIONPropertyNames[kCONFIGURATION_NUM_PROPERTY_IDENTIFIERS] = {\r
- "preferredAudioLanguage",\r
- "preferredSubtitleLanguage",\r
- "countryId"\r
- };\r
-\r
-NPIdentifier v_CONFIGURATIONMethodIdentifiers[kCONFIGURATION_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_CONFIGURATIONMethodNames[kCONFIGURATION_NUM_METHOD_IDENTIFIERS] = {};\r
-\r
-static void CONFIGURATIONinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_CONFIGURATIONPropertyNames, kCONFIGURATION_NUM_PROPERTY_IDENTIFIERS, v_CONFIGURATIONPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_CONFIGURATIONMethodNames, kCONFIGURATION_NUM_METHOD_IDENTIFIERS, v_CONFIGURATIONMethodIdentifiers );\r
-}\r
-\r
-\r
-NPClass stCONFIGURATIONclass;\r
-NPClass* pCONFIGURATIONclass = NULL;\r
-\r
-NPClass* fillCONFIGURATIONpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pCONFIGURATIONclass == NULL)\r
- {\r
- stCONFIGURATIONclass.allocate = CONFIGURATION_Allocate;\r
- stCONFIGURATIONclass.deallocate = CONFIGURATION_Deallocate;\r
- stCONFIGURATIONclass.invalidate = CONFIGURATION_Invalidate;\r
- stCONFIGURATIONclass.hasMethod = CONFIGURATION_HasMethod;\r
- stCONFIGURATIONclass.invoke = CONFIGURATION_Invoke;\r
- stCONFIGURATIONclass.invokeDefault = CONFIGURATION_InvokeDefault;\r
- stCONFIGURATIONclass.hasProperty = CONFIGURATION_HasProperty;\r
- stCONFIGURATIONclass.getProperty = CONFIGURATION_GetProperty;\r
- stCONFIGURATIONclass.setProperty = CONFIGURATION_SetProperty;\r
- stCONFIGURATIONclass.removeProperty = CONFIGURATION_RemoveProperty;\r
- stCONFIGURATIONclass.enumerate = CONFIGURATION_Enumerate;\r
- pCONFIGURATIONclass = &stCONFIGURATIONclass;\r
- }\r
-\r
- return pCONFIGURATIONclass;\r
-}\r
-\r
-\r
-NPObject * CONFIGURATION_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
- \r
- if (!v_bCONFIGURATIONIdentifiersInitialized)\r
- {\r
- v_bCONFIGURATIONIdentifiersInitialized = true;\r
- CONFIGURATIONinitializeIdentifiers();\r
- }\r
- NPObject* newconfiguration = NULL;\r
- \r
- newconfiguration = (NPObject *)MEMALLOC(sizeof(NPObject));\r
-\r
- return newconfiguration;\r
-}\r
-\r
-\r
-void CONFIGURATION_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
-void CONFIGURATION_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
-bool CONFIGURATION_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kCONFIGURATION_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_CONFIGURATIONMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool CONFIGURATION_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool CONFIGURATION_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool CONFIGURATION_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kCONFIGURATION_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_CONFIGURATIONPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- \r
- return result;\r
-}\r
-\r
-bool CONFIGURATION_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool CONFIGURATION_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool CONFIGURATION_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-bool CONFIGURATION_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __CONFIGURATIONCLASS_H__\r
-#define __CONFIGURATIONCLASS_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-\r
-NPClass* fillCONFIGURATIONpclass(void);\r
-\r
-NPObject * CONFIGURATION_Allocate(NPP npp, NPClass *aClass);\r
-void CONFIGURATION_Deallocate(NPObject *obj);\r
-void CONFIGURATION_Invalidate(NPObject *obj);\r
-bool CONFIGURATION_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool CONFIGURATION_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool CONFIGURATION_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool CONFIGURATION_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool CONFIGURATION_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool CONFIGURATION_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool CONFIGURATION_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool CONFIGURATION_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "downloadclass.h"\r
-\r
-#define kDOWNLOAD_ID_PROPERTY_TOTALIZE 0\r
-#define kDOWNLOAD_ID_PROPERTY_STATE 1\r
-#define kDOWNLOAD_ID_PROPERTY_AMOUNTDOWNLOADED 2\r
-#define kDOWNLOAD_ID_PROPERTY_NAME 3\r
-#define kDOWNLOAD_ID_PROPERTY_ID 4\r
-#define kDOWNLOAD_ID_PROPERTY_CONTENTURL 5\r
-#define kDOWNLOAD_ID_PROPERTY_DESCRIPTION 6\r
-#define kDOWNLOAD_ID_PROPERTY_PARENTALRATINGS 7\r
-#define kDOWNLOAD_ID_PROPERTY_DRMCONTROL 8\r
-#define kDOWNLOAD_ID_PROPERTY_STARTTIME 9\r
-#define kDOWNLOAD_ID_PROPERTY_TIMEELAPSED 10\r
-#define kDOWNLOAD_ID_PROPERTY_TIMEREMAINING 11\r
-#define kDOWNLOAD_ID_PROPERTY_TRANSFERTYPE 12\r
-#define kDOWNLOAD_ID_PROPERTY_ORIGINSITE 13\r
-#define kDOWNLOAD_ID_PROPERTY_ORIGINSITENAME 14\r
-#define kDOWNLOAD_ID_PROPERTY_CONTENTID 15\r
-#define kDOWNLOAD_ID_PROPERTY_ICONURL 16\r
-#define kDOWNLOAD_NUM_PROPERTY_IDENTIFIERS 17\r
-\r
-\r
-#define kDOWNLOAD_NUM_METHOD_IDENTIFIERS 0\r
-\r
-\r
-bool v_bDOWNLOADIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_DOWNLOADPropertyIdentifiers[kDOWNLOAD_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_DOWNLOADPropertyNames[kDOWNLOAD_NUM_PROPERTY_IDENTIFIERS] = {\r
- "totalize",\r
- "state",\r
- "amountDownloaded",\r
- "name",\r
- "id",\r
- "contentURL",\r
- "description",\r
- "parentalRatings",\r
- "drmControl",\r
- "startTime",\r
- "timeElapsed",\r
- "timeRemaining",\r
- "transferType",\r
- "originSite",\r
- "originSiteName",\r
- "contentID",\r
- "iconURL"\r
- };\r
-\r
-NPIdentifier v_DOWNLOADMethodIdentifiers[kDOWNLOAD_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_DOWNLOADMethodNames[kDOWNLOAD_NUM_METHOD_IDENTIFIERS] = {\r
-};\r
-\r
-\r
-static void DOWNLOADinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_DOWNLOADPropertyNames, kDOWNLOAD_NUM_PROPERTY_IDENTIFIERS, v_DOWNLOADPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_DOWNLOADMethodNames, kDOWNLOAD_NUM_METHOD_IDENTIFIERS, v_DOWNLOADMethodIdentifiers );\r
-}\r
-\r
-NPClass stDOWNLOADclass;\r
-NPClass* pDOWNLOADclass = NULL;\r
-\r
-NPClass* fillDOWNLOADpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pDOWNLOADclass == NULL)\r
- {\r
- stDOWNLOADclass.allocate = DOWNLOAD_Allocate;\r
- stDOWNLOADclass.deallocate = DOWNLOAD_Deallocate;\r
- stDOWNLOADclass.invalidate = DOWNLOAD_Invalidate;\r
- stDOWNLOADclass.hasMethod = DOWNLOAD_HasMethod;\r
- stDOWNLOADclass.invoke = DOWNLOAD_Invoke;\r
- stDOWNLOADclass.invokeDefault = DOWNLOAD_InvokeDefault;\r
- stDOWNLOADclass.hasProperty = DOWNLOAD_HasProperty;\r
- stDOWNLOADclass.getProperty = DOWNLOAD_GetProperty;\r
- stDOWNLOADclass.setProperty = DOWNLOAD_SetProperty;\r
- stDOWNLOADclass.removeProperty = DOWNLOAD_RemoveProperty;\r
- stDOWNLOADclass.enumerate = DOWNLOAD_Enumerate;\r
- pDOWNLOADclass = &stDOWNLOADclass;\r
- }\r
-\r
- return pDOWNLOADclass;\r
-}\r
-\r
-\r
-NPObject * DOWNLOAD_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- \r
- if (!v_bDOWNLOADIdentifiersInitialized)\r
- {\r
- v_bDOWNLOADIdentifiersInitialized = true;\r
- DOWNLOADinitializeIdentifiers();\r
- }\r
-\r
- NPObject* newdownload = (NPObject *)MEMALLOC(sizeof(NPObject));\r
-\r
- return newdownload;\r
-}\r
-\r
- void DOWNLOAD_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
- void DOWNLOAD_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
- bool DOWNLOAD_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
-\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kDOWNLOAD_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_DOWNLOADMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- return result;\r
-}\r
-\r
-bool DOWNLOAD_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool DOWNLOAD_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool DOWNLOAD_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kDOWNLOAD_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_DOWNLOADPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- return result;\r
-}\r
-\r
- bool DOWNLOAD_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool DOWNLOAD_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool DOWNLOAD_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
- bool DOWNLOAD_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __DOWNLOADCLASS_H__\r
-#define __DOWNLOADCLASS_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-NPClass* fillDOWNLOADpclass(void);\r
-\r
-NPObject * DOWNLOAD_Allocate(NPP npp, NPClass *aClass);\r
-void DOWNLOAD_Deallocate(NPObject *obj);\r
-void DOWNLOAD_Invalidate(NPObject *obj);\r
-bool DOWNLOAD_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool DOWNLOAD_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool DOWNLOAD_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool DOWNLOAD_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool DOWNLOAD_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool DOWNLOAD_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool DOWNLOAD_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool DOWNLOAD_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "downloadcollectionclass.h"\r
-\r
-\r
-#define kDWLDCOLLECTION_ID_PROPERTY_LENGH 0\r
-#define kDWLDCOLLECTION_NUM_PROPERTY_IDENTIFIERS 1\r
-\r
-#define kDWLDCOLLECTION_ID_METHOD_ITEM 0\r
-#define kDWLDCOLLECTION_NUM_METHOD_IDENTIFIERS 1\r
-\r
-bool v_bDWLDCOLLECTIONIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_DWLDCOLLECTIONPropertyIdentifiers[kDWLDCOLLECTION_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_DWLDCOLLECTIONPropertyNames[kDWLDCOLLECTION_NUM_PROPERTY_IDENTIFIERS] = {\r
- "lengh"\r
- };\r
-\r
-NPIdentifier v_DWLDCOLLECTIONMethodIdentifiers[kDWLDCOLLECTION_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_DWLDCOLLECTIONMethodNames[kDWLDCOLLECTION_NUM_METHOD_IDENTIFIERS] = {\r
- "item"\r
- };\r
-\r
-static void DWLDCOLLECTIONinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_DWLDCOLLECTIONPropertyNames, kDWLDCOLLECTION_NUM_PROPERTY_IDENTIFIERS, v_DWLDCOLLECTIONPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_DWLDCOLLECTIONMethodNames, kDWLDCOLLECTION_NUM_METHOD_IDENTIFIERS, v_DWLDCOLLECTIONMethodIdentifiers );\r
-}\r
-\r
-\r
-NPClass stDWLDCOLLECTIONclass;\r
-NPClass* pDWLDCOLLECTIONclass = NULL;\r
-\r
-NPClass* fillDWLDCOLLECTIONpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pDWLDCOLLECTIONclass == NULL)\r
- {\r
- stDWLDCOLLECTIONclass.allocate = DWLDCOLLECTION_Allocate;\r
- stDWLDCOLLECTIONclass.deallocate = DWLDCOLLECTION_Deallocate;\r
- stDWLDCOLLECTIONclass.invalidate = DWLDCOLLECTION_Invalidate;\r
- stDWLDCOLLECTIONclass.hasMethod = DWLDCOLLECTION_HasMethod;\r
- stDWLDCOLLECTIONclass.invoke = DWLDCOLLECTION_Invoke;\r
- stDWLDCOLLECTIONclass.invokeDefault = DWLDCOLLECTION_InvokeDefault;\r
- stDWLDCOLLECTIONclass.hasProperty = DWLDCOLLECTION_HasProperty;\r
- stDWLDCOLLECTIONclass.getProperty = DWLDCOLLECTION_GetProperty;\r
- stDWLDCOLLECTIONclass.setProperty = DWLDCOLLECTION_SetProperty;\r
- stDWLDCOLLECTIONclass.removeProperty = DWLDCOLLECTION_RemoveProperty;\r
- stDWLDCOLLECTIONclass.enumerate = DWLDCOLLECTION_Enumerate;\r
- pDWLDCOLLECTIONclass = &stDWLDCOLLECTIONclass;\r
- }\r
-\r
- return pDWLDCOLLECTIONclass;\r
-}\r
-\r
-\r
-NPObject * DWLDCOLLECTION_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- if (!v_bDWLDCOLLECTIONIdentifiersInitialized)\r
- {\r
- v_bDWLDCOLLECTIONIdentifiersInitialized = true;\r
- DWLDCOLLECTIONinitializeIdentifiers();\r
- }\r
-\r
- NPObject* newdwldcollection = (NPObject *)MEMALLOC(sizeof(NPObject));\r
-\r
- return newdwldcollection;\r
-}\r
-\r
-\r
-void DWLDCOLLECTION_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
-void DWLDCOLLECTION_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
-bool DWLDCOLLECTION_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kDWLDCOLLECTION_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_DWLDCOLLECTIONMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool DWLDCOLLECTION_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- if (name == v_DWLDCOLLECTIONMethodIdentifiers[kDWLDCOLLECTION_ID_METHOD_ITEM ])\r
- {\r
- DWLDCOLLECTION_Invoke_Item(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else\r
- { \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-\r
-}\r
-\r
-bool DWLDCOLLECTION_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool DWLDCOLLECTION_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kDWLDCOLLECTION_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_DWLDCOLLECTIONPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- \r
- return result;\r
-}\r
-\r
-bool DWLDCOLLECTION_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool DWLDCOLLECTION_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool DWLDCOLLECTION_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-bool DWLDCOLLECTION_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-/** implementation **/\r
-void DWLDCOLLECTION_Invoke_Item(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __DWLDCOLLECTIONCOLLECTIONCLASS_H__\r
-#define __DWLDCOLLECTIONCOLLECTIONCLASS_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-\r
-NPClass* fillDWLDCOLLECTIONpclass(void);\r
-\r
-NPObject * DWLDCOLLECTION_Allocate(NPP npp, NPClass *aClass);\r
-void DWLDCOLLECTION_Deallocate(NPObject *obj);\r
-void DWLDCOLLECTION_Invalidate(NPObject *obj);\r
-bool DWLDCOLLECTION_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool DWLDCOLLECTION_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool DWLDCOLLECTION_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool DWLDCOLLECTION_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool DWLDCOLLECTION_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool DWLDCOLLECTION_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool DWLDCOLLECTION_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool DWLDCOLLECTION_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-void DWLDCOLLECTION_Invoke_Item(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "drmcontrolinfocollectionclass.h"\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __DRMCONTROLINFOCOLLECTIONCLASS_H__\r
-#define __DRMCONTROLINFOCOLLECTIONCLASS_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "drmcontrolinfocollectionclass.h"\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __DRMCONTROLINFORMATIONCLASS_H__\r
-#define __DRMCONTROLINFORMATIONCLASS_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-/*\r
-** HbbTV Plugin PC\r
-*/\r
-\r
-\r
-#include <gdk/gdk.h>\r
-#ifdef XP_UNIX\r
-#include <gdk/gdkx.h>\r
-#include <X11/Xlib.h>\r
-#endif\r
-#include <gtk/gtk.h>\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-#include "oipfapplicationmanager.h"\r
-#include "oipfconfiguration.h"\r
-#include "videobroadcast.h"\r
-\r
-#define MIMETYPEDESCRIPTION "application/hbbtvbrowserplugin::Hbbtv Browser Plugin;" \\r
- "video/broadcast::Video Broadcast;"\\r
- "application/oipfapplicationmanager::Oipf Application Manager;"\\r
- "application/oipfconfiguration::Oipf Configuration;"\r
-\r
-\r
-#define PLUGIN_NAME "hbbtvbrowserplugin"\r
-#define PLUGIN_DESCRIPTION "HbbTV browser plugin "\r
-#define PLUGIN_VERSION "0.20110704"\r
-\r
-\r
-\r
-static void\r
-fillPluginFunctionTable(NPPluginFuncs* pFuncs)\r
-{\r
- TRACEINFO;\r
- pFuncs->version = 11;\r
- pFuncs->size = sizeof(*pFuncs);\r
- pFuncs->newp = OIPF_NPP_New;\r
- pFuncs->destroy = OIPF_NPP_Destroy;\r
- pFuncs->setwindow = OIPF_NPP_SetWindow;\r
- pFuncs->newstream = OIPF_NPP_NewStream;\r
-// pFuncs->destroystream = NPP_DestroyStream;\r
-// pFuncs->asfile = NPP_StreamAsFile;\r
-// pFuncs->writeready = NPP_WriteReady;\r
-// pFuncs->write = NPP_Write;\r
-// pFuncs->print = NPP_Print;\r
- pFuncs->event = OIPF_NPP_HandleEvent;\r
-// pFuncs->urlnotify = NPP_URLNotify;\r
- pFuncs->getvalue = OIPF_NPP_GetValue;\r
- pFuncs->setvalue = OIPF_NPP_SetValue;\r
-}\r
-\r
-char* booltostr(bool data)\r
-{\r
- char *result;\r
- if (data)\r
- result = "true";\r
- else\r
- result = "false";\r
- return result;\r
-}\r
-\r
-/*\r
- void drawWindow (HBBTVPluginData* instanceData, GdkDrawable* gdkWindow)\r
-{\r
- TRACEINFO;\r
- NPWindow window = *(instanceData->window);\r
- int x = window.x;\r
- int y = window.y;\r
- int width = window.width;\r
- int height = window.height;\r
- fprintf(stderr,"%p, x = %i y=%i, width = %i height = %i\n",gdkWindow, x ,y,width,height);\r
-\r
- NPP npp = instanceData->npp;\r
- if (!npp)\r
- return;\r
-\r
- const char* uaString = "DemoPlug"; // sBrowserFuncs->uagent(npp);\r
- if (!uaString)\r
- return;\r
-\r
- GdkGC* gdkContext = gdk_gc_new(gdkWindow);\r
-\r
- // draw a grey background for the plugin frame\r
- GdkColor grey;\r
- grey.red = 24000; grey.blue = 24000; grey.green = 24000;\r
- gdk_gc_set_rgb_fg_color(gdkContext, &grey);\r
- gdk_draw_rectangle(gdkWindow, gdkContext, TRUE, x, y, width, height);\r
-\r
- // draw a 3-pixel-thick black frame around the plugin\r
- GdkColor black;\r
- black.red = black.green = black.blue = 0;\r
- gdk_gc_set_rgb_fg_color(gdkContext, &black);\r
- gdk_gc_set_line_attributes(gdkContext, 3, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER);\r
- gdk_draw_rectangle(gdkWindow, gdkContext, FALSE, x + 1, y + 1,\r
- width - 3, height - 3);\r
-\r
- // paint the UA string\r
- PangoContext* pangoContext = gdk_pango_context_get();\r
- PangoLayout* pangoTextLayout = pango_layout_new(pangoContext);\r
- pango_layout_set_width(pangoTextLayout, (width - 10) * PANGO_SCALE);\r
- pango_layout_set_text(pangoTextLayout, uaString, -1);\r
- gdk_draw_layout(gdkWindow, gdkContext, x + 5, y + 5, pangoTextLayout);\r
- g_object_unref(pangoTextLayout);\r
-\r
- g_object_unref(gdkContext);\r
-}\r
-*/\r
-\r
-\r
-NPError NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs)\r
-{\r
- TRACEINFO;\r
-\r
- sBrowserFuncs = bFuncs;\r
- \r
- fillPluginFunctionTable(pFuncs);\r
-\r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-char* NP_GetPluginVersion()\r
-{\r
- TRACEINFO;\r
- return PLUGIN_VERSION;\r
-}\r
-\r
-NPError NP_Shutdown()\r
-{\r
- TRACEINFO;\r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-char* NP_GetMIMEDescription()\r
-{\r
- TRACEINFO;\r
- return MIMETYPEDESCRIPTION;\r
-}\r
-\r
-\r
-NPError NP_GetValue(void *instance, NPPVariable variable, void *value)\r
-{\r
- TRACEINFO;\r
- switch (variable)\r
- {\r
- case NPPVpluginNameString :\r
- *(char**)value = PLUGIN_NAME;\r
- break;\r
- case NPPVpluginDescriptionString :\r
- *(char**)value = PLUGIN_DESCRIPTION;\r
- break;\r
- default :\r
- break;\r
- }\r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-NPError OIPF_NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)\r
-{\r
- TRACEINFO;\r
- int i = 0;\r
- \r
- NPBool browserSupportsWindowless = false;\r
- sBrowserFuncs->getvalue(instance, NPNVSupportsWindowless, &browserSupportsWindowless);\r
- if (!browserSupportsWindowless)\r
- { \r
- return NPERR_GENERIC_ERROR;\r
- }\r
- sBrowserFuncs->setvalue(instance, NPPVpluginWindowBool, (void*)false);\r
- sBrowserFuncs->setvalue(instance, NPPVpluginTransparentBool, (void*)false);\r
- \r
-\r
- NPObject* obj;\r
- for(i = 0 ; i<argc ; i++ ){\r
- if((strcmp(argn[i],"type")) == 0){\r
- instance->pdata = (HBBTVPluginData*)MEMALLOC(sizeof(HBBTVPluginData));\r
- HBBTVPluginData* pdata = ((HBBTVPluginData*)instance->pdata);\r
- \r
- if (strcmp(argv[i], "application/oipfApplicationManager") == 0)\r
- {\r
- obj = sBrowserFuncs->createobject(instance, fillOAMpclass()); \r
- }\r
- else if (strcmp(argv[i], "application/oipfConfiguration") == 0)\r
- {\r
- obj = sBrowserFuncs->createobject(instance, fillOCFGpclass()); \r
- }\r
- else if (strcmp(argv[i], "video/broadcast") == 0)\r
- {\r
- obj = sBrowserFuncs->createobject(instance, fillVIDBRCpclass()); \r
- }else{\r
- \r
- obj = NULL;\r
- }\r
- pdata->type = (char*)MEMALLOC(strlen(argv[i]));\r
- strcpy(pdata->type, argv[i] );\r
- pdata->obj = obj;\r
- pdata->npp = instance;\r
- \r
- }else{\r
- \r
- obj = NULL;\r
- }\r
- }\r
-\r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-NPError OIPF_NPP_Destroy(NPP instance, NPSavedData **save)\r
-{\r
- TRACEINFO;\r
- HBBTVPluginData* pdata = (HBBTVPluginData*)instance->pdata;\r
- if (pdata)\r
- { \r
- sBrowserFuncs->releaseobject(pdata->obj);\r
- MEMFREE(pdata->type);\r
- MEMFREE(pdata);\r
- }\r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-\r
-NPError OIPF_NPP_SetWindow(NPP instance, NPWindow *window)\r
-{\r
- TRACEINFO;\r
- \r
- \r
- \r
- HBBTVPluginData* pdata = (HBBTVPluginData*)instance->pdata;\r
- if(pdata)\r
- {\r
- pdata->window = window;\r
- if (pdata->type)\r
- {\r
- if (strcmp(pdata->type, "video/broadcast") == 0)\r
- {\r
- fprintf(stderr, "%s found \n", pdata->type);\r
- if (pdata->obj)\r
- {\r
- NPObj_VidBrc* vidbrcobj = (NPObj_VidBrc*)pdata->obj;\r
- if (!(vidbrcobj->fullscreen))\r
- {\r
- OnNoFullscreenSetWindow(pdata->window->x,\r
- pdata->window->y,\r
- pdata->window->width,\r
- pdata->window->height);\r
- }\r
- }\r
- }\r
- }\r
- /*fprintf(stderr, "\tWindow found : %p\n", window);\r
- fprintf(stderr, "\twindow = %p ws_info %p \n\tx = %d, y= %d\n\tclipRect.left = %d clipRect.top= %d\n\twidth=%d, height= %d\n",\r
- pdata->window->window,\r
- pdata->window->ws_info,\r
- pdata->window->x,\r
- pdata->window->y,\r
- pdata->window->clipRect.left,\r
- pdata->window->clipRect.top,\r
- pdata->window->width,\r
- pdata->window->height);*/\r
- }\r
- \r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-NPError OIPF_NPP_HandleEvent(NPP instance, void* event)\r
-{\r
- //TRACEINFO; // frequent event, avoid over log...\r
-\r
- XEvent *nativeEvent = (XEvent*)event;\r
- if (nativeEvent->type == GraphicsExpose)\r
- {\r
- XGraphicsExposeEvent *expose = &nativeEvent->xgraphicsexpose;\r
- GC gc = XCreateGC(expose->display, expose->drawable, 0, 0); \r
- XFillRectangle(expose->display, expose->drawable, gc, expose->x, expose->y,expose->width, expose->height);\r
- XFreeGC(expose->display, gc);\r
- return true;\r
- }\r
-\r
- \r
- return false;\r
-}\r
-\r
-\r
-\r
-NPError OIPF_NPP_GetValue(NPP instance, NPPVariable variable, void *value)\r
-{\r
- TRACEINFO;\r
-\r
- if ( variable == NPPVpluginScriptableNPObject )\r
- { \r
- void ** v = (void **)value; \r
- if(instance->pdata)\r
- {\r
- NPObject* obj = ((HBBTVPluginData*)instance->pdata)->obj;\r
- if(obj == NULL){ \r
- }else{ \r
- sBrowserFuncs->retainobject(obj);\r
- } \r
- *v = obj;\r
- }\r
- }\r
- return NPERR_NO_ERROR;\r
-}\r
-\r
-\r
-NPError OIPF_NPP_SetValue(NPP instance, NPNVariable variable, void *value)\r
-{\r
- TRACEINFO;\r
- return NPERR_GENERIC_ERROR;\r
-}\r
-\r
-\r
-NPError OIPF_NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype)\r
-{\r
- TRACEINFO;\r
- return NPERR_GENERIC_ERROR;\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef hbbtvbrowserplugin_h\r
-#define hbbtvbrowserplugin_h\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-#include <stdio.h>\r
-#include <string.h>\r
-#include <stdlib.h>\r
-#include <npapi.h>\r
-#include <npfunctions.h>\r
-#include <npruntime.h>\r
-\r
-#include "hbbtvbrowserpluginapi.h"\r
-\r
-#ifndef DEBUG\r
- #define DEBUG true\r
- #define PROJECTNAME "HbbTVBrowserPlugin"\r
- #define TRACEINFO if (DEBUG) { fprintf(stderr,"\x1b[%i;3%im%s\x1b[0m : call %s\n", 1, 3, PROJECTNAME, __FUNCTION__); }\r
- #define NOTIMPLEMENTED if (DEBUG) { printf("%s : %s is \x1b[1;31mNOT IMPLEMENTED\x1b[0m : TODO \n", PROJECTNAME, __FUNCTION__); }\r
-#endif\r
-\r
-typedef struct\r
-{ \r
- NPObject* obj;\r
- char* type;\r
- NPWindow* window;\r
- NPP npp;\r
-}HBBTVPluginData;\r
-\r
-NPNetscapeFuncs* sBrowserFuncs;\r
-\r
-#define ALLOCBROWSERMEMORY true\r
-\r
-#ifdef ALLOCBROWSERMEMORY\r
- #define MEMALLOC sBrowserFuncs->memalloc\r
- #define MEMFREE sBrowserFuncs->memfree\r
-#else \r
- #define MEMALLOC malloc\r
- #define MEMFREE free\r
-#endif\r
-\r
-char* booltostr(bool data);\r
-\r
-NPError NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs);\r
-NPError NP_Shutdown();\r
-NPError NP_GetValue(void *instance, NPPVariable variable, void *value);\r
-char* NP_GetPluginVersion();\r
-char* NP_GetMIMEDescription();\r
-\r
-NPError OIPF_NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved);\r
-NPError OIPF_NPP_Destroy(NPP instance, NPSavedData **save);\r
-NPError OIPF_NPP_SetWindow(NPP instance, NPWindow *window);\r
-NPError OIPF_NPP_HandleEvent(NPP instance, void* Event);\r
-NPError OIPF_NPP_GetValue(NPP instance, NPPVariable variable, void *value);\r
-NPError OIPF_NPP_SetValue(NPP instance, NPNVariable variable, void *value);\r
-NPError OIPF_NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
+++ /dev/null
-
-/*
- * Copyright (c) 2010-2011 Telecom-Paristech
- * All Rights Reserved
- * GPAC 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, or (at your option)
- * any later version.
- *
- * GPAC 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; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * Authors: Stanislas Selle
- *
- */#include "hbbtvbrowserpluginapi.h"
-
-
-void OnNoFullscreenSetWindow(int x, int y, int width, int height)
-{
-}
-
-void OnAPPLICATION_Show()
-{
-}
-
-void OnAPPLICATION_Hide()
-{
-}
-
-void OnVIDBRC_SetFullScreen(int fullscreenparam)
-{
-}
-
-void OnKEYSET_SetValue(double param)
-{
-}
-
-void OnKEYSET_Allocate()
-{
-}
+++ /dev/null
-/*
- * Copyright (c) 2010-2011 Telecom-Paristech
- * All Rights Reserved
- * GPAC 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, or (at your option)
- * any later version.
- *
- * GPAC 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; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * Authors: Stanislas Selle
- *
- */
-#ifndef hbbtvbrowserpluginapi_h
-#define hbbtvbrowserpluginapi_h
-
-#include <stdlib.h>
-
-///Callbacks
-void OnNoFullscreenSetWindow(int x, int y, int width, int height);
-void OnAPPLICATION_Show();
-void OnAPPLICATION_Hide();
-void OnVIDBRC_SetFullScreen(int fullscreenparam);
-void OnKEYSET_SetValue(double param);
-void OnKEYSET_Allocate();
-#endif
+++ /dev/null
-\r
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */#include "keysetclass.h"\r
-\r
-#define kKEYSET_ID_PROPERTY_VALUE 0\r
-#define kKEYSET_ID_PROPERTY_MAXIMUMVALUE 1\r
-#define kKEYSET_ID_PROPERTY_RED 2\r
-#define kKEYSET_ID_PROPERTY_GREEN 3\r
-#define kKEYSET_ID_PROPERTY_YELLOW 4\r
-#define kKEYSET_ID_PROPERTY_BLUE 5\r
-#define kKEYSET_ID_PROPERTY_NAVIGATION 6\r
-#define kKEYSET_ID_PROPERTY_VCR 7\r
-#define kKEYSET_ID_PROPERTY_SCROLL 8\r
-#define kKEYSET_ID_PROPERTY_INFO 9\r
-#define kKEYSET_ID_PROPERTY_NUMERIC 10\r
-#define kKEYSET_ID_PROPERTY_ALPHA 11\r
-#define kKEYSET_ID_PROPERTY_OTHER 12\r
-#define kKEYSET_NUM_PROPERTY_IDENTIFIERS 13\r
-\r
-#define kKEYSET_ID_METHOD_SETVALUE 0\r
-#define kKEYSET_NUM_METHOD_IDENTIFIERS 1\r
-\r
-\r
-\r
-bool v_bKEYSETIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_KEYSETPropertyIdentifiers[kKEYSET_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_KEYSETPropertyNames[kKEYSET_NUM_PROPERTY_IDENTIFIERS] = {\r
- "value",\r
- "maximumValue",\r
- "RED",\r
- "GREEN",\r
- "YELLOW",\r
- "BLUE",\r
- "NAVIGATION",\r
- "VCR",\r
- "SCROLL",\r
- "INFO",\r
- "NUMERIC",\r
- "ALPHA",\r
- "OTHER"\r
- };\r
-\r
-NPIdentifier v_KEYSETMethodIdentifiers[kKEYSET_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_KEYSETMethodNames[kKEYSET_NUM_METHOD_IDENTIFIERS] = {\r
- "setValue"\r
- };\r
-\r
-static void KEYSETinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_KEYSETPropertyNames, kKEYSET_NUM_PROPERTY_IDENTIFIERS, v_KEYSETPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_KEYSETMethodNames, kKEYSET_NUM_METHOD_IDENTIFIERS, v_KEYSETMethodIdentifiers );\r
-}\r
-\r
-\r
-NPClass stKEYSETclass;\r
-NPClass* pKEYSETclass = NULL;\r
-\r
-NPClass* fillKEYSETpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pKEYSETclass == NULL)\r
- {\r
- stKEYSETclass.allocate = KEYSET_Allocate;\r
- stKEYSETclass.deallocate = KEYSET_Deallocate;\r
- stKEYSETclass.invalidate = KEYSET_Invalidate;\r
- stKEYSETclass.hasMethod = KEYSET_HasMethod;\r
- stKEYSETclass.invoke = KEYSET_Invoke;\r
- stKEYSETclass.invokeDefault = KEYSET_InvokeDefault;\r
- stKEYSETclass.hasProperty = KEYSET_HasProperty;\r
- stKEYSETclass.getProperty = KEYSET_GetProperty;\r
- stKEYSETclass.setProperty = KEYSET_SetProperty;\r
- stKEYSETclass.removeProperty = KEYSET_RemoveProperty;\r
- stKEYSETclass.enumerate = KEYSET_Enumerate;\r
- pKEYSETclass = &stKEYSETclass;\r
- }\r
-\r
- return pKEYSETclass;\r
-}\r
-\r
-\r
-NPObject * KEYSET_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- NPObject* result;\r
-\r
- \r
- if (!v_bKEYSETIdentifiersInitialized)\r
- {\r
- v_bKEYSETIdentifiersInitialized = true;\r
- KEYSETinitializeIdentifiers();\r
- }\r
- \r
- NPObj_KeySet* newkeyset = (NPObj_KeySet *)MEMALLOC(sizeof(NPObj_KeySet));\r
- newkeyset->npp = npp;\r
- newkeyset->value = (double*)MEMALLOC(sizeof(double));\r
- newkeyset->maximumValue = (double*)MEMALLOC(sizeof(double));\r
- result = (NPObject*)newkeyset;\r
- OnKEYSET_Allocate();\r
- return result;\r
-}\r
-\r
-\r
-void KEYSET_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- NPObj_KeySet* keysetobj = (NPObj_KeySet*)obj;\r
- MEMFREE(keysetobj->value);\r
- MEMFREE(keysetobj->maximumValue);\r
- MEMFREE(keysetobj);\r
- return;\r
-}\r
-\r
-void KEYSET_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
-bool KEYSET_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kKEYSET_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_KEYSETMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool KEYSET_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- if (name == v_KEYSETMethodIdentifiers[kKEYSET_ID_METHOD_SETVALUE])\r
- {\r
- KEYSET_Invoke_SetValue(obj, args, argCount, result);\r
- fctresult = true;\r
- }\r
- else\r
- { \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-}\r
-\r
-bool KEYSET_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool KEYSET_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kKEYSET_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_KEYSETPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- \r
- return result;\r
-}\r
-\r
-bool KEYSET_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- NPObj_KeySet* keysetobj = (NPObj_KeySet*)obj;\r
- \r
- double KEYMASK_RED = 0x1;\r
- double KEYMASK_GREEN = 0x2;\r
- double KEYMASK_YELLOW = 0x4;\r
- double KEYMASK_BLUE = 0x8;\r
- double KEYMASK_NAVIGATION = 0x10;\r
- double KEYMASK_VCR = 0x20;\r
- double KEYMASK_SCROLL = 0x40;\r
- double KEYMASK_INFO = 0x80;\r
- double KEYMASK_NUMERIC = 0x100;\r
- double KEYMASK_ALPHA = 0x200;\r
- double KEYMASK_OTHER = 0x400;\r
- \r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_RED])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_RED, *result);\r
- fctresult = true;\r
- }\r
- else\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_GREEN])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_GREEN, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_YELLOW])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_YELLOW, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_BLUE])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_BLUE, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_NAVIGATION])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_NAVIGATION, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_VCR])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_VCR, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_SCROLL])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_SCROLL, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_INFO])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_INFO, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_NUMERIC])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_NUMERIC, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_ALPHA])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_ALPHA, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_OTHER])\r
- { \r
- DOUBLE_TO_NPVARIANT(KEYMASK_OTHER, *result);\r
- fctresult = true;\r
- }\r
- if (name == v_KEYSETPropertyIdentifiers[kKEYSET_ID_PROPERTY_VALUE])\r
- { \r
- double* value = keysetobj->value;\r
- DOUBLE_TO_NPVARIANT(*value, *result);\r
- fctresult = true;\r
- }\r
- \r
- if (fctresult)\r
- {\r
- \r
- }\r
- \r
- \r
- \r
- return fctresult; \r
-}\r
-\r
-bool KEYSET_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- \r
- return fctresult;\r
-}\r
-\r
-bool KEYSET_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-bool KEYSET_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-/** implementation **/\r
-void KEYSET_Invoke_SetValue(NPObject* obj,const NPVariant* args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- //~ NOTIMPLEMENTED; // in progress\r
- double param;\r
- NPObj_KeySet* keysetobj = (NPObj_KeySet*)obj;\r
- double* value = keysetobj->value;\r
- fprintf(stderr,"nb args : %i, %f", argCount,NPVARIANT_TO_DOUBLE(args[0]) );\r
- if (!NPVARIANT_IS_DOUBLE(args[0])) {\r
- fprintf(stderr,"\t%s : error\n",__FUNCTION__);\r
- return;\r
- }\r
- else {\r
- param = NPVARIANT_TO_DOUBLE( args[0] );\r
- fprintf(stderr, "\t%s : param to transmit %f \n", __FUNCTION__, param);\r
- *value = param;\r
- OnKEYSET_SetValue(param);\r
- }\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __HBBTVKEYSET_H__\r
-#define __HBBTVKEYSET_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-typedef struct\r
-{\r
- NPObject header; \r
- NPP npp; \r
- \r
- double* value;\r
- double* maximumValue; \r
-} NPObj_KeySet;\r
-\r
-NPClass* fillKEYSETpclass(void);\r
-\r
-NPObject * KEYSET_Allocate(NPP npp, NPClass *aClass);\r
-void KEYSET_Deallocate(NPObject *obj);\r
-void KEYSET_Invalidate(NPObject *obj);\r
-bool KEYSET_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool KEYSET_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool KEYSET_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool KEYSET_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool KEYSET_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool KEYSET_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-bool KEYSET_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-bool KEYSET_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-void KEYSET_Invoke_SetValue(NPObject* obj,const NPVariant* args, uint32_t argCount, NPVariant *result);\r
-\r
-#endif\r
+++ /dev/null
-
-lib_LTLIBRARIES = libhbbtvbrowserplugin.la
-
-libhbbtvbrowserplugin_la_SOURCES = hbbtvbrowserplugin.c\
- hbbtvbrowserpluginapi.c\
- oipfapplicationmanager.c\
- applicationclass.c\
- applicationprivatedataclass.c\
- oipfconfiguration.c\
- configurationclass.c\
- oipfdownloadmanager.c\
- oipfdownloadtrigger.c\
- downloadclass.c\
- downloadcollectionclass.c\
- drmcontrolinfocollectionclass.c\
- drmcontrolinformationclass.c\
- videobroadcast.c\
- keysetclass.c\
- hbbtvbrowserplugin.h\
- hbbtvbrowserpluginapi.h\
- oipfapplicationmanager.h\
- applicationclass.h\
- applicationprivatedataclass.h\
- oipfconfiguration.h\
- configurationclass.h\
- oipfdownloadmanager.h\
- oipfdownloadtrigger.h\
- downloadclass.h\
- downloadcollectionclass.h\
- drmcontrolinfocollectionclass.h\
- drmcontrolinformationclass.h\
- videobroadcast.h\
- keysetclass.h
-
-library_includedir=$(includedir)/@PACKAGE_NAME@
-library_include_HEADERS = hbbtvbrowserpluginapi.h
-
-SPECIALCFLAGS = -g -Wall -DXP_UNIX=1 -DMOZ_X11=1 -fPIC
-libhbbtvbrowserplugin_la_CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(NPAPI_CFLAGS) $(SPECIALCFLAGS) -I./webkit-plugin-header/ -I./src/webkit-plugin-header/
-libhbbtvbrowserplugin_la_LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(NPAPI_LIBS) $(SPECIALCFLAGS)
-libhbbtvbrowserplugin_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(NPAPI_LIBS)
-
-install-exec-local :
- ln -fs $(libdir)/lib@PACKAGE_NAME@.so.0.0.0 $(PLUGINDIR)/lib@PACKAGE_NAME@.so
-
-uninstall-local :
- rm -f $(PLUGINDIR)/lib@PACKAGE_NAME@.so
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "oipfapplicationmanager.h"\r
-#include "applicationclass.h"\r
-\r
-#define kOAM_ID_PROPERTY_ON_LOW_MEMORY 0\r
-#define kOAM_NUM_PROPERTY_IDENTIFIERS 1\r
-\r
-#define kOAM_ID_METHOD_GET_OWNER_APPLICATION 0\r
-#define kOAM_NUM_METHOD_IDENTIFIERS 1\r
-\r
-bool v_bOAMIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_OAMPropertyIdentifiers[kOAM_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_OAMPropertyNames[kOAM_NUM_PROPERTY_IDENTIFIERS] = {\r
- "onLowMemory"\r
- };\r
-\r
-NPIdentifier v_OAMMethodIdentifiers[kOAM_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_OAMMethodNames[kOAM_NUM_METHOD_IDENTIFIERS] = {\r
- "getOwnerApplication"\r
-};\r
-\r
-\r
-\r
-\r
-static void OAMinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_OAMPropertyNames, kOAM_NUM_PROPERTY_IDENTIFIERS, v_OAMPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_OAMMethodNames, kOAM_NUM_METHOD_IDENTIFIERS, v_OAMMethodIdentifiers );\r
-}\r
-\r
-NPClass stOAMclass;\r
-NPClass* pOAMclass = NULL;\r
-\r
-NPClass* fillOAMpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pOAMclass == NULL)\r
- {\r
- stOAMclass.allocate = OAM_Allocate;\r
- stOAMclass.deallocate = OAM_Deallocate;\r
- stOAMclass.invalidate = OAM_Invalidate;\r
- stOAMclass.hasMethod = OAM_HasMethod;\r
- stOAMclass.invoke = OAM_Invoke;\r
- stOAMclass.invokeDefault = OAM_InvokeDefault;\r
- stOAMclass.hasProperty = OAM_HasProperty;\r
- stOAMclass.getProperty = OAM_GetProperty;\r
- stOAMclass.setProperty = OAM_SetProperty;\r
- stOAMclass.removeProperty = OAM_RemoveProperty;\r
- stOAMclass.enumerate = OAM_Enumerate;\r
- pOAMclass = &stOAMclass;\r
- }\r
-\r
- return pOAMclass;\r
-}\r
-\r
-\r
-NPObject * OAM_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- \r
- if (!v_bOAMIdentifiersInitialized)\r
- {\r
- v_bOAMIdentifiersInitialized = true;\r
- OAMinitializeIdentifiers();\r
- }\r
- \r
- NPObj_OAM* newapplicationmanager = (NPObj_OAM*)MEMALLOC(sizeof(NPObj_OAM));\r
- fprintf(stderr, "\t%s : Allocation at \x1b[%i;3%im%p\n\x1b[0m ",__FUNCTION__, 1, 1, newapplicationmanager );\r
- newapplicationmanager->npp = npp;\r
- newapplicationmanager->ownerApplication = sBrowserFuncs->createobject(npp, fillAPPLICATIONpclass());\r
- fprintf(stderr, "\t%s : Create ownerApplication member at \x1b[%i;3%im%p\n\x1b[0m ",__FUNCTION__, 1, 1, newapplicationmanager->ownerApplication );\r
- return (NPObject *)newapplicationmanager;\r
-}\r
-\r
- void OAM_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- NPObj_OAM* oamobj = (NPObj_OAM*)obj;\r
- sBrowserFuncs->releaseobject(oamobj->ownerApplication); \r
- MEMFREE(oamobj);\r
- return;\r
-}\r
-\r
- void OAM_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
- bool OAM_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
-\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kOAM_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_OAMMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool OAM_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- //OAM_ObjectMain * pMainObj = reinterpret_cast<tWOTVe_OAM_ObjectMain*>(obj);\r
- bool fctresult = false;\r
- if (name == v_OAMMethodIdentifiers[kOAM_ID_METHOD_GET_OWNER_APPLICATION])\r
- {\r
- OAM_ObjectMain_Invoke_GetOwnerApplication((NPObj_OAM*)obj, args, argCount, result);\r
- fctresult = true;\r
- }\r
- else\r
- {\r
- \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-}\r
-\r
- bool OAM_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool OAM_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kOAM_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_OAMPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool OAM_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool OAM_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool OAM_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
- bool OAM_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-/** implementation **/\r
-void OAM_ObjectMain_Invoke_GetOwnerApplication(NPObj_OAM* obj,const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- sBrowserFuncs->retainobject(obj->ownerApplication);\r
- OBJECT_TO_NPVARIANT((NPObject*)(obj->ownerApplication), *result); \r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __OIPFAPPLICATIONMANAGER_H__\r
-#define __OIPFAPPLICATIONMANAGER_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-typedef struct {\r
- NPObject header;\r
- NPP npp;\r
- \r
- NPObject* ownerApplication; \r
-} NPObj_OAM;\r
-\r
-NPClass* fillOAMpclass(void);\r
-\r
-NPObject * OAM_Allocate(NPP npp, NPClass *aClass);\r
-void OAM_Deallocate(NPObject *obj);\r
-void OAM_Invalidate(NPObject *obj);\r
-bool OAM_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool OAM_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool OAM_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool OAM_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool OAM_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool OAM_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-bool OAM_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-bool OAM_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-void OAM_ObjectMain_Invoke_GetOwnerApplication(NPObj_OAM* obj,const NPVariant* args, uint32_t argCount, NPVariant* result);\r
-\r
-/*\r
-typedef struct{\r
- NPObject headear;\r
- NPP npp;\r
- NPObject* onLowMemory;\r
- NPObject* ownerApplication;\r
- NPObject* newApplication;\r
-} OAM_ObjectMain;\r
-*/\r
-\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "oipfconfiguration.h"\r
-\r
-#define kOCFG_ID_PROPERTY_CONFIGURATION 0\r
-#define kOCFG_NUM_PROPERTY_IDENTIFIERS 1\r
-\r
-#define kOCFG_NUM_METHOD_IDENTIFIERS 0\r
-\r
-bool v_bOCFGIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_OCFGPropertyIdentifiers[kOCFG_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_OCFGPropertyNames[kOCFG_NUM_PROPERTY_IDENTIFIERS] = {\r
- "configuration"\r
- };\r
-\r
-NPIdentifier v_OCFGMethodIdentifiers[kOCFG_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_OCFGMethodNames[kOCFG_NUM_METHOD_IDENTIFIERS] = {};\r
-\r
-static void OCFGinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_OCFGPropertyNames, kOCFG_NUM_PROPERTY_IDENTIFIERS, v_OCFGPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_OCFGMethodNames, kOCFG_NUM_METHOD_IDENTIFIERS, v_OCFGMethodIdentifiers );\r
-}\r
-\r
-\r
-NPClass stOCFGclass;\r
-NPClass* pOCFGclass = NULL;\r
-\r
-NPClass* fillOCFGpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pOCFGclass == NULL)\r
- {\r
- stOCFGclass.allocate = OCFG_Allocate;\r
- stOCFGclass.deallocate = OCFG_Deallocate;\r
- stOCFGclass.invalidate = OCFG_Invalidate;\r
- stOCFGclass.hasMethod = OCFG_HasMethod;\r
- stOCFGclass.invoke = OCFG_Invoke;\r
- stOCFGclass.invokeDefault = OCFG_InvokeDefault;\r
- stOCFGclass.hasProperty = OCFG_HasProperty;\r
- stOCFGclass.getProperty = OCFG_GetProperty;\r
- stOCFGclass.setProperty = OCFG_SetProperty;\r
- stOCFGclass.removeProperty = OCFG_RemoveProperty;\r
- stOCFGclass.enumerate = OCFG_Enumerate;\r
- pOCFGclass = &stOCFGclass;\r
- }\r
-\r
- return pOCFGclass;\r
-}\r
-\r
-\r
-NPObject * OCFG_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- NPObject* result;\r
-\r
- \r
- if (!v_bOCFGIdentifiersInitialized)\r
- {\r
- v_bOCFGIdentifiersInitialized = true;\r
- OCFGinitializeIdentifiers();\r
- }\r
-\r
- NPObject* newocfg = (NPObject*)MEMALLOC(sizeof(NPObject));\r
- result = newocfg;\r
- \r
- return result;\r
-}\r
-\r
-\r
-void OCFG_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
-void OCFG_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
-bool OCFG_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kOCFG_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_OCFGMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool OCFG_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
-\r
- bool fctresult;\r
- \r
- fctresult = false;\r
-\r
- return fctresult;\r
-\r
-}\r
-\r
-bool OCFG_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool OCFG_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kOCFG_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_OCFGPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool OCFG_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool OCFG_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-bool OCFG_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
-bool OCFG_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __OIPFCONFIGURATION_H__\r
-#define __OIPFCONFIGURATION_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-NPClass* fillOCFGpclass(void);\r
-\r
-NPObject * OCFG_Allocate(NPP npp, NPClass *aClass);\r
-void OCFG_Deallocate(NPObject *obj);\r
-void OCFG_Invalidate(NPObject *obj);\r
-bool OCFG_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool OCFG_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool OCFG_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool OCFG_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool OCFG_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool OCFG_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool OCFG_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool OCFG_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "oipfdownloadmanager.h"\r
-\r
-#define kODWLDMAN_ID_PROPERTY_ONDOWNLOADSTATECHANGE 0\r
-#define kODWLDMAN_NUM_PROPERTY_IDENTIFIERS 1\r
-\r
-#define kODWLDMAN_ID_METHOD_PAUSE 0\r
-#define kODWLDMAN_ID_METHOD_RESUME 1\r
-#define kODWLDMAN_ID_METHOD_REMOVE 2\r
-#define kODWLDMAN_ID_METHOD_GETDOWNLOADS 3\r
-#define kODWLDMAN_NUM_METHOD_IDENTIFIERS 4\r
-\r
-bool v_bODWLDMANIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_ODWLDMANPropertyIdentifiers[kODWLDMAN_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_ODWLDMANPropertyNames[kODWLDMAN_NUM_PROPERTY_IDENTIFIERS] = {\r
- "onDownloadStateChange"\r
- };\r
-\r
-NPIdentifier v_ODWLDMANMethodIdentifiers[kODWLDMAN_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_ODWLDMANMethodNames[kODWLDMAN_NUM_METHOD_IDENTIFIERS] = {\r
- "pause",\r
- "resume",\r
- "remove",\r
- "getDownloads"\r
-};\r
-\r
-\r
-static void ODWLDMANinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_ODWLDMANPropertyNames, kODWLDMAN_NUM_PROPERTY_IDENTIFIERS, v_ODWLDMANPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_ODWLDMANMethodNames, kODWLDMAN_NUM_METHOD_IDENTIFIERS, v_ODWLDMANMethodIdentifiers );\r
-}\r
-\r
-NPClass stODWLDMANclass;\r
-NPClass* pODWLDMANclass = NULL;\r
-\r
-NPClass* fillODWLDMANpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pODWLDMANclass == NULL)\r
- {\r
- stODWLDMANclass.allocate = ODWLDMAN_Allocate;\r
- stODWLDMANclass.deallocate = ODWLDMAN_Deallocate;\r
- stODWLDMANclass.invalidate = ODWLDMAN_Invalidate;\r
- stODWLDMANclass.hasMethod = ODWLDMAN_HasMethod;\r
- stODWLDMANclass.invoke = ODWLDMAN_Invoke;\r
- stODWLDMANclass.invokeDefault = ODWLDMAN_InvokeDefault;\r
- stODWLDMANclass.hasProperty = ODWLDMAN_HasProperty;\r
- stODWLDMANclass.getProperty = ODWLDMAN_GetProperty;\r
- stODWLDMANclass.setProperty = ODWLDMAN_SetProperty;\r
- stODWLDMANclass.removeProperty = ODWLDMAN_RemoveProperty;\r
- stODWLDMANclass.enumerate = ODWLDMAN_Enumerate;\r
- pODWLDMANclass = &stODWLDMANclass;\r
- }\r
-\r
- return pODWLDMANclass;\r
-}\r
-\r
-\r
-NPObject * ODWLDMAN_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- NPObject* newdwldman = NULL;\r
- if (!v_bODWLDMANIdentifiersInitialized)\r
- {\r
- v_bODWLDMANIdentifiersInitialized = true;\r
- ODWLDMANinitializeIdentifiers();\r
- }\r
-\r
- newdwldman = (NPObject*)MEMALLOC(sizeof(NPObject));\r
-\r
- return newdwldman;\r
-}\r
-\r
- void ODWLDMAN_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
- void ODWLDMAN_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
- bool ODWLDMAN_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
-\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kODWLDMAN_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_ODWLDMANMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- } \r
-\r
- return result;\r
-}\r
-\r
-bool ODWLDMAN_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- if (name == v_ODWLDMANMethodIdentifiers[kODWLDMAN_ID_METHOD_GETDOWNLOADS])\r
- {\r
- ODWLDMAN_Invoke_GetDownloads(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_ODWLDMANMethodIdentifiers[kODWLDMAN_ID_METHOD_PAUSE])\r
- {\r
- ODWLDMAN_Invoke_Pause(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_ODWLDMANMethodIdentifiers[kODWLDMAN_ID_METHOD_REMOVE])\r
- {\r
- ODWLDMAN_Invoke_Remove(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_ODWLDMANMethodIdentifiers[kODWLDMAN_ID_METHOD_RESUME])\r
- {\r
- ODWLDMAN_Invoke_Resume(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else\r
- { \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-}\r
-\r
- bool ODWLDMAN_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool ODWLDMAN_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kODWLDMAN_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_ODWLDMANPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
- bool ODWLDMAN_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool ODWLDMAN_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool ODWLDMAN_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
- bool ODWLDMAN_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-/** implementation */\r
-\r
-\r
-void ODWLDMAN_Invoke_GetDownloads(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void ODWLDMAN_Invoke_Pause(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void ODWLDMAN_Invoke_Remove(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void ODWLDMAN_Invoke_Resume(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __OIPFDOWNLOADMANAGER_H__\r
-#define __OIPFDOWNLOADMANAGER_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-\r
-NPClass* fillODWLDMANpclass(void);\r
-\r
-NPObject * ODWLDMAN_Allocate(NPP npp, NPClass *aClass);\r
-void ODWLDMAN_Deallocate(NPObject *obj);\r
-void ODWLDMAN_Invalidate(NPObject *obj);\r
-bool ODWLDMAN_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool ODWLDMAN_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool ODWLDMAN_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool ODWLDMAN_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool ODWLDMAN_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool ODWLDMAN_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool ODWLDMAN_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool ODWLDMAN_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-\r
-void ODWLDMAN_Invoke_GetDownloads(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void ODWLDMAN_Invoke_Pause(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void ODWLDMAN_Invoke_Remove(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void ODWLDMAN_Invoke_Resume(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "oipfdownloadtrigger.h"\r
-\r
-\r
-#define kODWLDTRG_NUM_PROPERTY_IDENTIFIERS 0\r
-\r
-#define kODWLDTRG_ID_METHOD_REGISTER_DOWNLOAD 0\r
-#define kODWLDTRG_ID_METHOD_REGISTER_DOWNLOADURL 1\r
-#define kODWLDTRG_NUM_METHOD_IDENTIFIERS 2\r
-\r
-bool v_bODWLDTRGIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_ODWLDTRGPropertyIdentifiers[kODWLDTRG_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_ODWLDTRGPropertyNames[kODWLDTRG_NUM_PROPERTY_IDENTIFIERS] = {\r
-};\r
-\r
-NPIdentifier v_ODWLDTRGMethodIdentifiers[kODWLDTRG_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_ODWLDTRGMethodNames[kODWLDTRG_NUM_METHOD_IDENTIFIERS] = {\r
- "registerDownload",\r
- "registerDownloadURL"\r
-};\r
-\r
-\r
-\r
-static void ODWLDTRGinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_ODWLDTRGPropertyNames, kODWLDTRG_NUM_PROPERTY_IDENTIFIERS, v_ODWLDTRGPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_ODWLDTRGMethodNames, kODWLDTRG_NUM_METHOD_IDENTIFIERS, v_ODWLDTRGMethodIdentifiers );\r
-}\r
-\r
-NPClass stODWLDTRGclass;\r
-NPClass* pODWLDTRGclass = NULL;\r
-\r
-NPClass* fillODWLDTRGpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pODWLDTRGclass == NULL)\r
- {\r
- stODWLDTRGclass.allocate = ODWLDTRG_Allocate;\r
- stODWLDTRGclass.deallocate = ODWLDTRG_Deallocate;\r
- stODWLDTRGclass.invalidate = ODWLDTRG_Invalidate;\r
- stODWLDTRGclass.hasMethod = ODWLDTRG_HasMethod;\r
- stODWLDTRGclass.invoke = ODWLDTRG_Invoke;\r
- stODWLDTRGclass.invokeDefault = ODWLDTRG_InvokeDefault;\r
- stODWLDTRGclass.hasProperty = ODWLDTRG_HasProperty;\r
- stODWLDTRGclass.getProperty = ODWLDTRG_GetProperty;\r
- stODWLDTRGclass.setProperty = ODWLDTRG_SetProperty;\r
- stODWLDTRGclass.removeProperty = ODWLDTRG_RemoveProperty;\r
- stODWLDTRGclass.enumerate = ODWLDTRG_Enumerate;\r
- pODWLDTRGclass = &stODWLDTRGclass;\r
- }\r
-\r
- return pODWLDTRGclass;\r
-}\r
-\r
-\r
-NPObject * ODWLDTRG_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- NPObject* newdwldtrg = NULL;\r
- if (!v_bODWLDTRGIdentifiersInitialized)\r
- {\r
- v_bODWLDTRGIdentifiersInitialized = true;\r
- ODWLDTRGinitializeIdentifiers();\r
- }\r
-\r
- newdwldtrg = (NPObject*)MEMALLOC(sizeof(NPObject));\r
-\r
- return newdwldtrg;\r
-}\r
-\r
- void ODWLDTRG_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
- void ODWLDTRG_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
- bool ODWLDTRG_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
-\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kODWLDTRG_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_ODWLDTRGMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool ODWLDTRG_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- if (name == v_ODWLDTRGMethodIdentifiers[kODWLDTRG_ID_METHOD_REGISTER_DOWNLOAD])\r
- {\r
- ODWLDTRG_Invoke_registerDownload(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else if (name == v_ODWLDTRGMethodIdentifiers[kODWLDTRG_ID_METHOD_REGISTER_DOWNLOADURL])\r
- {\r
- ODWLDTRG_Invoke_registerDownloadURL(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- else\r
- { \r
- fctresult = false;\r
- }\r
- return fctresult;\r
-}\r
-\r
- bool ODWLDTRG_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool ODWLDTRG_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
-\r
- int i = 0;\r
- while ((i < kODWLDTRG_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_ODWLDTRGPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
- bool ODWLDTRG_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool ODWLDTRG_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool ODWLDTRG_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
- bool ODWLDTRG_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-void ODWLDTRG_Invoke_registerDownload(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
-\r
-void ODWLDTRG_Invoke_registerDownloadURL(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __OIPFDOWNLOADTRIGGER_H__\r
-#define __OIPFDOWNLOADTRIGGER_H__\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-\r
-\r
-NPClass* fillODWLDTRGpclass(void);\r
-\r
-NPObject * ODWLDTRG_Allocate(NPP npp, NPClass *aClass);\r
-void ODWLDTRG_Deallocate(NPObject *obj);\r
-void ODWLDTRG_Invalidate(NPObject *obj);\r
-bool ODWLDTRG_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool ODWLDTRG_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool ODWLDTRG_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool ODWLDTRG_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool ODWLDTRG_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool ODWLDTRG_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-\r
-bool ODWLDTRG_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-\r
-bool ODWLDTRG_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-void ODWLDTRG_Invoke_registerDownload(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void ODWLDTRG_Invoke_registerDownloadURL(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-#endif\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#include "videobroadcast.h"\r
-\r
-#define kVIDBRC_ID_PROPERTY_WIDTH 0\r
-#define kVIDBRC_ID_PROPERTY_HEIGHT 1\r
-#define kVIDBRC_ID_PROPERTY_FULLSCREEN 2\r
-#define kVIDBRC_ID_PROPERTY_ONCHANNELCHANGEERROR 3\r
-#define kVIDBRC_ID_PROPERTY_PLAYSTATE 4\r
-#define kVIDBRC_ID_PROPERTY_ONPLAYSTATECHANGE 5\r
-#define kVIDBRC_ID_PROPERTY_ONCHANNELCHANGESUCCEEDED 6\r
-#define kVIDBRC_ID_PROPERTY_ONFULLSCREENCHANGE 7\r
-#define kVIDBRC_ID_PROPERTY_ONFOCUS 8\r
-#define kVIDBRC_ID_PROPERTY_ONBLUR 9\r
-#define kVIDBRC_NUM_PROPERTY_IDENTIFIERS 10\r
-\r
-#define kVIDBRC_ID_METHOD_GETCHANNELCONFIG 0\r
-#define kVIDBRC_ID_METHOD_BINDTOCURRENTCHANNEL 1\r
-#define kVIDBRC_ID_METHOD_CREATECHANNELOBJECT 2\r
-#define kVIDBRC_ID_METHOD_CREATECHANNELOBJECT2 3\r
-#define kVIDBRC_ID_METHOD_SETCHANNEL 4\r
-#define kVIDBRC_ID_METHOD_PREVCHANNEL 5\r
-#define kVIDBRC_ID_METHOD_NEXTCHANNEL 6\r
-#define kVIDBRC_ID_METHOD_SETFULLSCREEN 7\r
-#define kVIDBRC_ID_METHOD_GETVOLUME 8\r
-#define kVIDBRC_ID_METHOD_RELEASE 9\r
-#define kVIDBRC_NUM_METHOD_IDENTIFIERS 10\r
-\r
-\r
-bool v_bVIDBRCIdentifiersInitialized = false;\r
-\r
-NPIdentifier v_VIDBRCPropertyIdentifiers[kVIDBRC_NUM_PROPERTY_IDENTIFIERS];\r
-const NPUTF8 * v_VIDBRCPropertyNames[kVIDBRC_NUM_PROPERTY_IDENTIFIERS] = {\r
- "width",\r
- "height",\r
- "fullScreen",\r
- "onChannelChangeError",\r
- "playState",\r
- "onPlayStateChange",\r
- "onChannelChangeSucceeded",\r
- "onFullScreenChange",\r
- "onFocus",\r
- "onBlur"\r
- };\r
-\r
-NPIdentifier v_VIDBRCMethodIdentifiers[kVIDBRC_NUM_METHOD_IDENTIFIERS];\r
-const NPUTF8 * v_VIDBRCMethodNames[kVIDBRC_NUM_METHOD_IDENTIFIERS] = {\r
- "getChannelConfig",\r
- "bindToCurrentChannel",\r
- "createChannelObject",\r
- "createChannelObject2",\r
- "setChannel",\r
- "prevChannel",\r
- "nextChannel",\r
- "setFullScreen",\r
- "getVolume",\r
- "release"\r
-};\r
-\r
-static void VIDBRCinitializeIdentifiers(void)\r
-{\r
- sBrowserFuncs->getstringidentifiers( v_VIDBRCPropertyNames, kVIDBRC_NUM_PROPERTY_IDENTIFIERS, v_VIDBRCPropertyIdentifiers );\r
- sBrowserFuncs->getstringidentifiers( v_VIDBRCMethodNames, kVIDBRC_NUM_METHOD_IDENTIFIERS, v_VIDBRCMethodIdentifiers );\r
-}\r
-\r
-NPClass stVIDBRCclass;\r
-NPClass* pVIDBRCclass = NULL;\r
-\r
-NPClass* fillVIDBRCpclass(void)\r
-{\r
- TRACEINFO;\r
- if (pVIDBRCclass == NULL)\r
- {\r
- stVIDBRCclass.allocate = VIDBRC_Allocate;\r
- stVIDBRCclass.deallocate = VIDBRC_Deallocate;\r
- stVIDBRCclass.invalidate = VIDBRC_Invalidate;\r
- stVIDBRCclass.hasMethod = VIDBRC_HasMethod;\r
- stVIDBRCclass.invoke = VIDBRC_Invoke;\r
- stVIDBRCclass.invokeDefault = VIDBRC_InvokeDefault;\r
- stVIDBRCclass.hasProperty = VIDBRC_HasProperty;\r
- stVIDBRCclass.getProperty = VIDBRC_GetProperty;\r
- stVIDBRCclass.setProperty = VIDBRC_SetProperty;\r
- stVIDBRCclass.removeProperty = VIDBRC_RemoveProperty;\r
- stVIDBRCclass.enumerate = VIDBRC_Enumerate;\r
- pVIDBRCclass = &stVIDBRCclass;\r
- }\r
-\r
- return pVIDBRCclass;\r
-}\r
-\r
-\r
-NPObject * VIDBRC_Allocate(NPP npp, NPClass *theClass)\r
-{\r
- TRACEINFO;\r
-\r
- \r
- if (!v_bVIDBRCIdentifiersInitialized)\r
- {\r
- v_bVIDBRCIdentifiersInitialized = true;\r
- VIDBRCinitializeIdentifiers();\r
- }\r
- \r
- NPObj_VidBrc* newvidbrc = (NPObj_VidBrc*)MEMALLOC(sizeof(NPObj_VidBrc));\r
- newvidbrc->npp = npp;\r
- \r
- return (NPObject*) newvidbrc;\r
-}\r
-\r
-void VIDBRC_Deallocate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- OnVIDBRC_SetFullScreen(true); \r
- NPObj_VidBrc* vidbrc = (NPObj_VidBrc*)obj;\r
- /*\r
- if (vidbrc->pcArg_onChannelChangeSucceeded)\r
- {\r
- MEMFREE(vidbrc->pcArg_onChannelChangeSucceeded);\r
- // vidbrc->pcArg_onChannelChangeSucceeded = NULL; \r
- } \r
- if ( vidbrc->onChannelChangeSucceeded )\r
- {\r
- // sBrowserFuncs->releaseobject(vidbrc->onChannelChangeSucceeded); \r
- // vidbrc->onChannelChangeSucceeded = NULL;\r
- }\r
- \r
- */\r
- MEMFREE(obj);\r
- return;\r
-}\r
-\r
- void VIDBRC_Invalidate(NPObject* obj)\r
-{\r
- TRACEINFO;\r
- return;\r
-}\r
-\r
- bool VIDBRC_HasMethod(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
-\r
- bool result = false;\r
- int i = 0;\r
- NPUTF8* utf8methodname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- while ((i < kVIDBRC_NUM_METHOD_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_VIDBRCMethodIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
- \r
- return result;\r
-}\r
-\r
-bool VIDBRC_Invoke(NPObject* obj, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
-\r
- if (name == v_VIDBRCMethodIdentifiers[kVIDBRC_ID_METHOD_GETCHANNELCONFIG])\r
- {\r
- VIDBRC_Invoke_getChannelConfig((NPObj_VidBrc*)obj, args, argCount, result);\r
- fctresult = true;\r
- }\r
- \r
- if (name == v_VIDBRCMethodIdentifiers[kVIDBRC_ID_METHOD_SETFULLSCREEN])\r
- {\r
- VIDBRC_Invoke_setFullScreen((NPObj_VidBrc*)obj, args, argCount);\r
- fctresult = true;\r
- }\r
-\r
- if (name == v_VIDBRCMethodIdentifiers[kVIDBRC_ID_METHOD_BINDTOCURRENTCHANNEL])\r
- {\r
- VIDBRC_Invoke_bindToCurrentChannel(obj, args, argCount);\r
- fctresult = true;\r
- }\r
- \r
- \r
- return fctresult;\r
-}\r
-\r
- bool VIDBRC_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
- bool VIDBRC_HasProperty(NPObject* obj, NPIdentifier name)\r
-{\r
- TRACEINFO; bool result = false;\r
- NPUTF8* utf8propertyname = (char*)sBrowserFuncs->utf8fromidentifier(name);\r
- int i = 0;\r
- while ((i < kVIDBRC_NUM_PROPERTY_IDENTIFIERS) && (result == false))\r
- {\r
- if ( name == v_VIDBRCPropertyIdentifiers[i] )\r
- {\r
- result= true;\r
- }\r
- i++;\r
- }\r
-\r
- return result;\r
-}\r
-\r
- bool VIDBRC_GetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- NPObj_VidBrc* vidbrc = (NPObj_VidBrc*)obj;\r
- \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_WIDTH]) { \r
- INT32_TO_NPVARIANT(vidbrc->width,*result);\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_HEIGHT]) {\r
- INT32_TO_NPVARIANT(vidbrc->height,*result);\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_FULLSCREEN]) {\r
- BOOLEAN_TO_NPVARIANT(vidbrc->fullscreen, *result);\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_PLAYSTATE]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONPLAYSTATECHANGE]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONCHANNELCHANGEERROR]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONCHANNELCHANGESUCCEEDED]) { \r
- /* if ( vidbrc->pcArg_onChannelChangeSucceeded != NULL )\r
- {\r
- char* dup_str = strdup(vidbrc->pcArg_onChannelChangeSucceeded); \r
- NPString npstr = { dup_str, (uint32_t)(strlen(dup_str)) }; \r
- result->type = NPVariantType_String;\r
- result->value.stringValue = npstr; \r
- fctresult = true;\r
- }\r
- else\r
- {\r
- OBJECT_TO_NPVARIANT(vidbrc->onPlayStateChange,*result);\r
- }*/ \r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONFULLSCREENCHANGE]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONFOCUS]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONBLUR]) {\r
- fctresult = true;\r
- }\r
- \r
- return fctresult;\r
-}\r
-\r
- bool VIDBRC_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value)\r
-{\r
- TRACEINFO;\r
- bool fctresult = false;\r
- NPObj_VidBrc* vidbrc = (NPObj_VidBrc*)obj;\r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_WIDTH]) { \r
- vidbrc->width = NPVARIANT_TO_INT32(*value);\r
- VIDBRC_setsize(vidbrc, vidbrc->width, vidbrc->height);\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_HEIGHT]) {\r
- vidbrc->height = NPVARIANT_TO_INT32(*value);\r
- VIDBRC_setsize(vidbrc, vidbrc->width, vidbrc->height);\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_FULLSCREEN]) { \r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_PLAYSTATE]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONPLAYSTATECHANGE]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONCHANNELCHANGEERROR]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONCHANNELCHANGESUCCEEDED]) {\r
- /* if ( vidbrc->onChannelChangeSucceeded != NULL )\r
- {\r
- sBrowserFuncs->releaseobject(vidbrc->onChannelChangeSucceeded);\r
- vidbrc->onChannelChangeSucceeded = NULL;\r
- }\r
- if ( vidbrc->pcArg_onChannelChangeSucceeded )\r
- {\r
- MEMFREE( vidbrc->pcArg_onChannelChangeSucceeded );\r
- vidbrc->pcArg_onChannelChangeSucceeded = NULL;\r
- } \r
- vidbrc->onChannelChangeSucceeded = NPVARIANT_TO_OBJECT(*value);\r
- sBrowserFuncs->retainobject( vidbrc->onChannelChangeSucceeded);*/\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONFULLSCREENCHANGE]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONFOCUS]) {\r
- fctresult = true;\r
- } else \r
- if (name == v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_ONBLUR]) {\r
- fctresult = true;\r
- }\r
- return fctresult;\r
-}\r
-\r
- bool VIDBRC_RemoveProperty(NPObject *npobj, NPIdentifier name)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-\r
- bool VIDBRC_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)\r
-{\r
- TRACEINFO;\r
- return true;\r
-}\r
-\r
-/** implementation of methods **/\r
-void VIDBRC_Invoke_getChannelConfig(NPObj_VidBrc* obj,const NPVariant* args, uint32_t argCount, NPVariant* result)\r
-{\r
- NOTIMPLEMENTED;\r
- NULL_TO_NPVARIANT(*result);\r
- return;\r
-}\r
-\r
-void VIDBRC_Invoke_setFullScreen(NPObj_VidBrc* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- //NOTIMPLEMENTED; ///inprogress\r
- \r
- NPP npp = obj->npp;\r
- int param;\r
- if (argCount != 1 || !NPVARIANT_IS_BOOLEAN(args[0])) {\r
- return;\r
- }\r
- else {\r
- param = NPVARIANT_TO_BOOLEAN( args[0] ); \r
- if (param != obj->fullscreen)\r
- {\r
- if (param){\r
- obj->fullscreen = true;\r
- VIDBRC_setsize(obj, FULLSIZE_WIDTH, FULLSIZE_HEIGHT);\r
- }\r
- else{\r
- obj->fullscreen = false;\r
- }\r
- \r
- HBBTVPluginData* pdata = (HBBTVPluginData*)npp->pdata;\r
- if(pdata){\r
- if (pdata->window){ \r
- OnVIDBRC_SetFullScreen(param); \r
- }\r
- } \r
- } \r
-}\r
- \r
-}\r
-\r
-void VIDBRC_Invoke_bindToCurrentChannel(NPObject* obj,const NPVariant* args, uint32_t argCount)\r
-{\r
- TRACEINFO;\r
- NOTIMPLEMENTED;\r
- //OnBindToCurrentChannel();\r
-}\r
-\r
-/** implementation of intermediary function **/\r
-\r
-void VIDBRC_setsize(NPObj_VidBrc* obj,int32_t width, int32_t height)\r
-{\r
- ///set the size\r
- obj->width = width;\r
- obj->height = height;\r
- \r
- /// get the plugin object and his style object\r
- NPIdentifier npIdent;\r
- NPVariant npVar; \r
- NPObject * npObjPlugin = NULL;\r
- NPObject * npObjStyle = NULL;\r
- \r
- if (obj->npp)\r
- {\r
- sBrowserFuncs->getvalue( obj->npp ,\r
- NPNVPluginElementNPObject ,\r
- &npObjPlugin );\r
- }\r
- if (npObjPlugin)\r
- {\r
- npIdent = sBrowserFuncs->getstringidentifier( (const NPUTF8 *)"style" );\r
- sBrowserFuncs->getproperty( obj->npp ,\r
- npObjPlugin,\r
- npIdent ,\r
- &npVar );\r
- npObjStyle = NPVARIANT_TO_OBJECT(npVar);\r
- }\r
- if (npObjStyle)\r
- {\r
- INT32_TO_NPVARIANT(width,npVar);\r
- npIdent = v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_WIDTH];\r
- sBrowserFuncs->setproperty( obj->npp,npObjStyle, npIdent, &npVar);\r
- INT32_TO_NPVARIANT(height,npVar);\r
- npIdent = v_VIDBRCPropertyIdentifiers[kVIDBRC_ID_PROPERTY_HEIGHT];\r
- sBrowserFuncs->setproperty( obj->npp,npObjStyle, npIdent, &npVar);\r
- }\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r
- * Authors: Stanislas Selle \r
- * \r
- */\r
-#ifndef __VIDEOBROADCAST_H__\r
-#define __VIDEOBROADCAST_H__\r
-\r
-#include <stdio.h>\r
-#include <string.h>\r
-#include <stdlib.h>\r
-#include <npapi.h>\r
-#include <nptypes.h>\r
-#include <npfunctions.h>\r
-#include <npruntime.h>\r
-\r
-#include "hbbtvbrowserplugin.h"\r
-\r
-#define FULLSIZE_WIDTH 1280\r
-#define FULLSIZE_HEIGHT 720\r
-\r
-typedef struct\r
-{\r
- NPObject header; \r
- NPP npp; \r
- NPBool fullscreen;\r
- int32_t width; \r
- int32_t height; \r
- \r
- \r
- //~ char* pcArg_onChannelChangeSucceeded;\r
- //~ NPObject* onChannelChangeSucceeded;\r
- //NPObject* channelConfig;\r
- \r
-} NPObj_VidBrc;\r
-\r
-NPClass* fillVIDBRCpclass(void);\r
-\r
-NPObject * VIDBRC_Allocate(NPP npp, NPClass *aClass);\r
-void VIDBRC_Deallocate(NPObject *obj);\r
-void VIDBRC_Invalidate(NPObject *obj);\r
-bool VIDBRC_HasMethod(NPObject *obj, NPIdentifier name);\r
-bool VIDBRC_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool VIDBRC_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);\r
-bool VIDBRC_HasProperty(NPObject *obj, NPIdentifier name);\r
-bool VIDBRC_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);\r
-bool VIDBRC_SetProperty(NPObject *obj, NPIdentifier name, const NPVariant *value);\r
-bool VIDBRC_RemoveProperty(NPObject *npobj, NPIdentifier name);\r
-bool VIDBRC_Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);\r
-\r
-void VIDBRC_Invoke_setFullScreen(NPObj_VidBrc* obj,const NPVariant* args, uint32_t argCount);\r
-void VIDBRC_Invoke_bindToCurrentChannel(NPObject* obj,const NPVariant* args, uint32_t argCount);\r
-void VIDBRC_Invoke_getChannelConfig(NPObj_VidBrc* obj,const NPVariant* args, uint32_t argCount, NPVariant* result);\r
-\r
-void VIDBRC_setsize(NPObj_VidBrc* obj,int32_t witdh, int32_t height);\r
-#endif\r
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef npapi_h_
-#define npapi_h_
-
-#if defined(__OS2__)
-#pragma pack(1)
-#endif
-
-#include "nptypes.h"
-
-#if defined(__OS2__) || defined(OS2)
-#ifndef XP_OS2
-#define XP_OS2 1
-#endif
-#endif
-
-#ifdef INCLUDE_JAVA
-#include "jri.h" /* Java Runtime Interface */
-#else
-#define jref void *
-#define JRIEnv void
-#endif
-
-#if defined(_WIN32) && !defined(__SYMBIAN32__)
-#include <windows.h>
-#ifndef XP_WIN
-#define XP_WIN 1
-#endif
-#endif
-
-#if defined(__SYMBIAN32__)
-#ifndef XP_SYMBIAN
-#define XP_SYMBIAN 1
-#endif
-#endif
-
-#if defined(__APPLE_CC__) && !defined(XP_UNIX)
-#ifndef XP_MACOSX
-#define XP_MACOSX 1
-#endif
-#endif
-
-#if defined(XP_MACOSX) && defined(__LP64__)
-#define NP_NO_QUICKDRAW
-#define NP_NO_CARBON
-#endif
-
-#if defined(XP_MACOSX)
-#include <ApplicationServices/ApplicationServices.h>
-#include <OpenGL/OpenGL.h>
-#ifndef NP_NO_CARBON
-#include <Carbon/Carbon.h>
-#endif
-#endif
-
-#if defined(XP_UNIX)
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <stdio.h>
-#endif
-
-#if defined(XP_SYMBIAN)
-#include <QEvent>
-#include <QRegion>
-#endif
-
-/*----------------------------------------------------------------------*/
-/* Plugin Version Constants */
-/*----------------------------------------------------------------------*/
-
-#define NP_VERSION_MAJOR 0
-#define NP_VERSION_MINOR 24
-
-
-/* The OS/2 version of Netscape uses RC_DATA to define the
- mime types, file extensions, etc that are required.
- Use a vertical bar to separate types, end types with \0.
- FileVersion and ProductVersion are 32bit ints, all other
- entries are strings that MUST be terminated with a \0.
-
-AN EXAMPLE:
-
-RCDATA NP_INFO_ProductVersion { 1,0,0,1,}
-
-RCDATA NP_INFO_MIMEType { "video/x-video|",
- "video/x-flick\0" }
-RCDATA NP_INFO_FileExtents { "avi|",
- "flc\0" }
-RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
- "MMOS2 Flc/Fli player(*.flc)\0" }
-
-RCDATA NP_INFO_FileVersion { 1,0,0,1 }
-RCDATA NP_INFO_CompanyName { "Netscape Communications\0" }
-RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0"
-RCDATA NP_INFO_InternalName { "NPAVI32\0" )
-RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
-RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" }
-RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
-*/
-/* RC_DATA types for version info - required */
-#define NP_INFO_ProductVersion 1
-#define NP_INFO_MIMEType 2
-#define NP_INFO_FileOpenName 3
-#define NP_INFO_FileExtents 4
-/* RC_DATA types for version info - used if found */
-#define NP_INFO_FileDescription 5
-#define NP_INFO_ProductName 6
-/* RC_DATA types for version info - optional */
-#define NP_INFO_CompanyName 7
-#define NP_INFO_FileVersion 8
-#define NP_INFO_InternalName 9
-#define NP_INFO_LegalCopyright 10
-#define NP_INFO_OriginalFilename 11
-
-#ifndef RC_INVOKED
-
-/*----------------------------------------------------------------------*/
-/* Definition of Basic Types */
-/*----------------------------------------------------------------------*/
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (1)
-#endif
-#ifndef NULL
-#define NULL (0L)
-#endif
-
-typedef unsigned char NPBool;
-typedef int16_t NPError;
-typedef int16_t NPReason;
-typedef char* NPMIMEType;
-
-/*----------------------------------------------------------------------*/
-/* Structures and definitions */
-/*----------------------------------------------------------------------*/
-
-#if !defined(__LP64__)
-#if defined(XP_MACOSX)
-#pragma options align=mac68k
-#endif
-#endif /* __LP64__ */
-
-/*
- * NPP is a plug-in's opaque instance handle
- */
-typedef struct _NPP
-{
- void* pdata; /* plug-in private data */
- void* ndata; /* netscape private data */
-} NPP_t;
-
-typedef NPP_t* NPP;
-
-typedef struct _NPStream
-{
- void* pdata; /* plug-in private data */
- void* ndata; /* netscape private data */
- const char* url;
- uint32_t end;
- uint32_t lastmodified;
- void* notifyData;
- const char* headers; /* Response headers from host.
- * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
- * Used for HTTP only; NULL for non-HTTP.
- * Available from NPP_NewStream onwards.
- * Plugin should copy this data before storing it.
- * Includes HTTP status line and all headers,
- * preferably verbatim as received from server,
- * headers formatted as in HTTP ("Header: Value"),
- * and newlines (\n, NOT \r\n) separating lines.
- * Terminated by \n\0 (NOT \n\n\0). */
-} NPStream;
-
-typedef struct _NPByteRange
-{
- int32_t offset; /* negative offset means from the end */
- uint32_t length;
- struct _NPByteRange* next;
-} NPByteRange;
-
-typedef struct _NPSavedData
-{
- int32_t len;
- void* buf;
-} NPSavedData;
-
-typedef struct _NPRect
-{
- uint16_t top;
- uint16_t left;
- uint16_t bottom;
- uint16_t right;
-} NPRect;
-
-typedef struct _NPSize
-{
- int32_t width;
- int32_t height;
-} NPSize;
-
-typedef enum {
- NPFocusNext = 0,
- NPFocusPrevious = 1
-} NPFocusDirection;
-
-/* Return values for NPP_HandleEvent */
-#define kNPEventNotHandled 0
-#define kNPEventHandled 1
-/* Exact meaning must be spec'd in event model. */
-#define kNPEventStartIME 2
-
-#if defined(XP_UNIX)
-/*
- * Unix specific structures and definitions
- */
-
-/*
- * Callback Structures.
- *
- * These are used to pass additional platform specific information.
- */
-enum {
- NP_SETWINDOW = 1,
- NP_PRINT
-};
-
-typedef struct
-{
- int32_t type;
-} NPAnyCallbackStruct;
-
-typedef struct
-{
- int32_t type;
- Display* display;
- Visual* visual;
- Colormap colormap;
- unsigned int depth;
-} NPSetWindowCallbackStruct;
-
-typedef struct
-{
- int32_t type;
- FILE* fp;
-} NPPrintCallbackStruct;
-
-#endif /* XP_UNIX */
-
-#if defined(XP_MACOSX)
-typedef enum {
-#ifndef NP_NO_QUICKDRAW
- NPDrawingModelQuickDraw = 0,
-#endif
- NPDrawingModelCoreGraphics = 1,
- NPDrawingModelOpenGL = 2,
- NPDrawingModelCoreAnimation = 3
-} NPDrawingModel;
-
-typedef enum {
-#ifndef NP_NO_CARBON
- NPEventModelCarbon = 0,
-#endif
- NPEventModelCocoa = 1
-} NPEventModel;
-#endif
-
-/*
- * The following masks are applied on certain platforms to NPNV and
- * NPPV selectors that pass around pointers to COM interfaces. Newer
- * compilers on some platforms may generate vtables that are not
- * compatible with older compilers. To prevent older plugins from
- * not understanding a new browser's ABI, these masks change the
- * values of those selectors on those platforms. To remain backwards
- * compatible with different versions of the browser, plugins can
- * use these masks to dynamically determine and use the correct C++
- * ABI that the browser is expecting. This does not apply to Windows
- * as Microsoft's COM ABI will likely not change.
- */
-
-#define NP_ABI_GCC3_MASK 0x10000000
-/*
- * gcc 3.x generated vtables on UNIX and OSX are incompatible with
- * previous compilers.
- */
-#if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
-#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
-#else
-#define _NP_ABI_MIXIN_FOR_GCC3 0
-#endif
-
-#if defined(XP_MACOSX)
-#define NP_ABI_MACHO_MASK 0x01000000
-#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
-#else
-#define _NP_ABI_MIXIN_FOR_MACHO 0
-#endif
-
-#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
-
-/*
- * List of variable names for which NPP_GetValue shall be implemented
- */
-typedef enum {
- NPPVpluginNameString = 1,
- NPPVpluginDescriptionString,
- NPPVpluginWindowBool,
- NPPVpluginTransparentBool,
- NPPVjavaClass, /* Not implemented in WebKit */
- NPPVpluginWindowSize, /* Not implemented in WebKit */
- NPPVpluginTimerInterval, /* Not implemented in WebKit */
- NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), /* Not implemented in WebKit */
- NPPVpluginScriptableIID = 11, /* Not implemented in WebKit */
- NPPVjavascriptPushCallerBool = 12, /* Not implemented in WebKit */
- NPPVpluginKeepLibraryInMemory = 13, /* Not implemented in WebKit */
- NPPVpluginNeedsXEmbed = 14, /* Not implemented in WebKit */
-
- /* Get the NPObject for scripting the plugin. Introduced in NPAPI minor version 14.
- */
- NPPVpluginScriptableNPObject = 15,
-
- /* Get the plugin value (as \0-terminated UTF-8 string data) for
- * form submission if the plugin is part of a form. Use
- * NPN_MemAlloc() to allocate memory for the string data. Introduced
- * in NPAPI minor version 15.
- */
- NPPVformValue = 16, /* Not implemented in WebKit */
-
- NPPVpluginUrlRequestsDisplayedBool = 17, /* Not implemented in WebKit */
-
- /* Checks if the plugin is interested in receiving the http body of
- * all http requests (including failed ones, http status != 200).
- */
- NPPVpluginWantsAllNetworkStreams = 18,
-
- /* Browsers can retrieve a native ATK accessibility plug ID via this variable. */
- NPPVpluginNativeAccessibleAtkPlugId = 19,
-
- /* Checks to see if the plug-in would like the browser to load the "src" attribute. */
- NPPVpluginCancelSrcStream = 20
-
-#if defined(XP_MACOSX)
- /* Used for negotiating drawing models */
- , NPPVpluginDrawingModel = 1000
- /* Used for negotiating event models */
- , NPPVpluginEventModel = 1001
- /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */
- , NPPVpluginCoreAnimationLayer = 1003
-#endif
-
-#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
- , NPPVpluginWindowlessLocalBool = 2002
-#endif
-} NPPVariable;
-
-/*
- * List of variable names for which NPN_GetValue should be implemented.
- */
-typedef enum {
- NPNVxDisplay = 1,
- NPNVxtAppContext,
- NPNVnetscapeWindow,
- NPNVjavascriptEnabledBool,
- NPNVasdEnabledBool,
- NPNVisOfflineBool,
-
- NPNVserviceManager = (10 | NP_ABI_MASK), /* Not implemented in WebKit */
- NPNVDOMElement = (11 | NP_ABI_MASK), /* Not implemented in WebKit */
- NPNVDOMWindow = (12 | NP_ABI_MASK), /* Not implemented in WebKit */
- NPNVToolkit = (13 | NP_ABI_MASK), /* Not implemented in WebKit */
- NPNVSupportsXEmbedBool = 14, /* Not implemented in WebKit */
-
- /* Get the NPObject wrapper for the browser window. */
- NPNVWindowNPObject = 15,
-
- /* Get the NPObject wrapper for the plugins DOM element. */
- NPNVPluginElementNPObject = 16,
-
- NPNVSupportsWindowless = 17,
-
- NPNVprivateModeBool = 18
-
-#if defined(XP_MACOSX)
- /* Used for negotiating drawing models */
- , NPNVpluginDrawingModel = 1000
-#ifndef NP_NO_QUICKDRAW
- , NPNVsupportsQuickDrawBool = 2000
-#endif
- , NPNVsupportsCoreGraphicsBool = 2001
- , NPNVsupportsOpenGLBool = 2002
- , NPNVsupportsCoreAnimationBool = 2003
-#ifndef NP_NO_CARBON
- , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon event model */
-#endif
- , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
-#endif /* XP_MACOSX */
-#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
- , NPNVSupportsWindowlessLocal = 2002
-#endif
-} NPNVariable;
-
-typedef enum {
- NPNURLVCookie = 501,
- NPNURLVProxy
-} NPNURLVariable;
-
-/*
- * The type of Toolkit the widgets use
- */
-typedef enum {
- NPNVGtk12 = 1,
- NPNVGtk2
-} NPNToolkitType;
-
-/*
- * The type of a NPWindow - it specifies the type of the data structure
- * returned in the window field.
- */
-typedef enum {
- NPWindowTypeWindow = 1,
- NPWindowTypeDrawable
-} NPWindowType;
-
-typedef struct _NPWindow
-{
- void* window; /* Platform specific window handle */
- /* OS/2: x - Position of bottom left corner */
- /* OS/2: y - relative to visible netscape window */
- int32_t x; /* Position of top left corner relative */
- int32_t y; /* to a netscape page. */
- uint32_t width; /* Maximum window size */
- uint32_t height;
- NPRect clipRect; /* Clipping rectangle in port coordinates */
-#if defined(XP_UNIX) || defined(XP_SYMBIAN)
- void * ws_info; /* Platform-dependent additonal data */
-#endif /* XP_UNIX || XP_SYMBIAN */
- NPWindowType type; /* Is this a window or a drawable? */
-} NPWindow;
-
-typedef struct _NPImageExpose
-{
- char* data; /* image pointer */
- int32_t stride; /* Stride of data image pointer */
- int32_t depth; /* Depth of image pointer */
- int32_t x; /* Expose x */
- int32_t y; /* Expose y */
- uint32_t width; /* Expose width */
- uint32_t height; /* Expose height */
- NPSize dataSize; /* Data buffer size */
- float translateX; /* translate X matrix value */
- float translateY; /* translate Y matrix value */
- float scaleX; /* scale X matrix value */
- float scaleY; /* scale Y matrix value */
-} NPImageExpose;
-
-typedef struct _NPFullPrint
-{
- NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */
- NPBool printOne; /* TRUE if plugin should print one copy to default
- printer */
- void* platformPrint; /* Platform-specific printing info */
-} NPFullPrint;
-
-typedef struct _NPEmbedPrint
-{
- NPWindow window;
- void* platformPrint; /* Platform-specific printing info */
-} NPEmbedPrint;
-
-typedef struct _NPPrint
-{
- uint16_t mode; /* NP_FULL or NP_EMBED */
- union
- {
- NPFullPrint fullPrint; /* if mode is NP_FULL */
- NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
- } print;
-} NPPrint;
-
-#if defined(XP_MACOSX)
-#ifndef NP_NO_CARBON
-typedef EventRecord NPEvent;
-#else
-typedef void* NPEvent;
-#endif
-#elif defined(XP_SYMBIAN)
-typedef QEvent NPEvent;
-#elif defined(XP_WIN)
-typedef struct _NPEvent
-{
- uint16_t event;
- uintptr_t wParam;
- uintptr_t lParam;
-} NPEvent;
-#elif defined(XP_OS2)
-typedef struct _NPEvent
-{
- uint32_t event;
- uint32_t wParam;
- uint32_t lParam;
-} NPEvent;
-#elif defined(XP_UNIX)
-typedef XEvent NPEvent;
-#else
-typedef void* NPEvent;
-#endif
-
-#if defined(XP_MACOSX)
-typedef void* NPRegion;
-#ifndef NP_NO_QUICKDRAW
-typedef RgnHandle NPQDRegion;
-#endif
-typedef CGPathRef NPCGRegion;
-#elif defined(XP_WIN)
-typedef HRGN NPRegion;
-#elif defined(XP_UNIX)
-typedef Region NPRegion;
-#elif defined(XP_SYMBIAN)
-typedef QRegion* NPRegion;
-#else
-typedef void *NPRegion;
-#endif
-
-typedef struct _NPNSString NPNSString;
-typedef struct _NPNSWindow NPNSWindow;
-typedef struct _NPNSMenu NPNSMenu;
-
-#if defined(XP_MACOSX)
-typedef NPNSMenu NPMenu;
-#else
-typedef void *NPMenu;
-#endif
-
-typedef enum {
- NPCoordinateSpacePlugin = 1,
- NPCoordinateSpaceWindow,
- NPCoordinateSpaceFlippedWindow,
- NPCoordinateSpaceScreen,
- NPCoordinateSpaceFlippedScreen
-} NPCoordinateSpace;
-
-#if defined(XP_MACOSX)
-
-#ifndef NP_NO_QUICKDRAW
-typedef struct NP_Port
-{
- CGrafPtr port;
- int32_t portx; /* position inside the topmost window */
- int32_t porty;
-} NP_Port;
-#endif /* NP_NO_QUICKDRAW */
-
-/*
- * NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics
- * as its drawing model.
- */
-
-typedef struct NP_CGContext
-{
- CGContextRef context;
-#ifdef NP_NO_CARBON
- NPNSWindow *window;
-#else
- void *window; /* A WindowRef or NULL for the Cocoa event model. */
-#endif
-} NP_CGContext;
-
-/*
- * NP_GLContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelOpenGL as its
- * drawing model.
- */
-
-typedef struct NP_GLContext
-{
- CGLContextObj context;
-#ifdef NP_NO_CARBON
- NPNSWindow *window;
-#else
- void *window; /* Can be either an NSWindow or a WindowRef depending on the event model */
-#endif
-} NP_GLContext;
-
-typedef enum {
- NPCocoaEventDrawRect = 1,
- NPCocoaEventMouseDown,
- NPCocoaEventMouseUp,
- NPCocoaEventMouseMoved,
- NPCocoaEventMouseEntered,
- NPCocoaEventMouseExited,
- NPCocoaEventMouseDragged,
- NPCocoaEventKeyDown,
- NPCocoaEventKeyUp,
- NPCocoaEventFlagsChanged,
- NPCocoaEventFocusChanged,
- NPCocoaEventWindowFocusChanged,
- NPCocoaEventScrollWheel,
- NPCocoaEventTextInput
-} NPCocoaEventType;
-
-typedef struct _NPCocoaEvent {
- NPCocoaEventType type;
- uint32_t version;
- union {
- struct {
- uint32_t modifierFlags;
- double pluginX;
- double pluginY;
- int32_t buttonNumber;
- int32_t clickCount;
- double deltaX;
- double deltaY;
- double deltaZ;
- } mouse;
- struct {
- uint32_t modifierFlags;
- NPNSString *characters;
- NPNSString *charactersIgnoringModifiers;
- NPBool isARepeat;
- uint16_t keyCode;
- } key;
- struct {
- CGContextRef context;
- double x;
- double y;
- double width;
- double height;
- } draw;
- struct {
- NPBool hasFocus;
- } focus;
- struct {
- NPNSString *text;
- } text;
- } data;
-} NPCocoaEvent;
-
-#ifndef NP_NO_CARBON
-/* Non-standard event types that can be passed to HandleEvent */
-enum NPEventType {
- NPEventType_GetFocusEvent = (osEvt + 16),
- NPEventType_LoseFocusEvent,
- NPEventType_AdjustCursorEvent,
- NPEventType_MenuCommandEvent,
- NPEventType_ClippingChangedEvent,
- NPEventType_ScrollingBeginsEvent = 1000,
- NPEventType_ScrollingEndsEvent
-};
-#endif /* NP_NO_CARBON */
-
-#endif /* XP_MACOSX */
-
-/*
- * Values for mode passed to NPP_New:
- */
-#define NP_EMBED 1
-#define NP_FULL 2
-
-/*
- * Values for stream type passed to NPP_NewStream:
- */
-#define NP_NORMAL 1
-#define NP_SEEK 2
-#define NP_ASFILE 3
-#define NP_ASFILEONLY 4
-
-#define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
-
-/*
- * Flags for NPP_ClearSiteData.
- */
-#define NP_CLEAR_ALL 0
-#define NP_CLEAR_CACHE (1 << 0)
-
-#if !defined(__LP64__)
-#if defined(XP_MACOSX)
-#pragma options align=reset
-#endif
-#endif /* __LP64__ */
-
-/*----------------------------------------------------------------------*/
-/* Error and Reason Code definitions */
-/*----------------------------------------------------------------------*/
-
-/*
- * Values of type NPError:
- */
-#define NPERR_BASE 0
-#define NPERR_NO_ERROR (NPERR_BASE + 0)
-#define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
-#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
-#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
-#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
-#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
-#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
-#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
-#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
-#define NPERR_INVALID_PARAM (NPERR_BASE + 9)
-#define NPERR_INVALID_URL (NPERR_BASE + 10)
-#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
-#define NPERR_NO_DATA (NPERR_BASE + 12)
-#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
-
-/*
- * Values of type NPReason:
- */
-#define NPRES_BASE 0
-#define NPRES_DONE (NPRES_BASE + 0)
-#define NPRES_NETWORK_ERR (NPRES_BASE + 1)
-#define NPRES_USER_BREAK (NPRES_BASE + 2)
-
-/*
- * Don't use these obsolete error codes any more.
- */
-#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
-#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
-#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
-
-/*
- * Version feature information
- */
-#define NPVERS_HAS_STREAMOUTPUT 8
-#define NPVERS_HAS_NOTIFICATION 9
-#define NPVERS_HAS_LIVECONNECT 9
-#define NPVERS_WIN16_HAS_LIVECONNECT 9
-#define NPVERS_68K_HAS_LIVECONNECT 11
-#define NPVERS_HAS_WINDOWLESS 11
-#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 /* Not implemented in WebKit */
-#define NPVERS_HAS_NPRUNTIME_SCRIPTING 14
-#define NPVERS_HAS_FORM_VALUES 15 /* Not implemented in WebKit; see bug 13061 */
-#define NPVERS_HAS_POPUPS_ENABLED_STATE 16 /* Not implemented in WebKit */
-#define NPVERS_HAS_RESPONSE_HEADERS 17
-#define NPVERS_HAS_NPOBJECT_ENUM 18
-#define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19
-#define NPVERS_HAS_ALL_NETWORK_STREAMS 20
-#define NPVERS_HAS_URL_AND_AUTH_INFO 21
-#define NPVERS_HAS_PRIVATE_MODE 22
-#define NPVERS_MACOSX_HAS_EVENT_MODELS 23
-#define NPVERS_HAS_CANCEL_SRC_STREAM 24
-#define NPVERS_HAS_ADVANCED_KEY_HANDLING 25
-#define NPVERS_HAS_URL_REDIRECT_HANDLING 26
-#define NPVERS_HAS_CLEAR_SITE_DATA 27
-
-/*----------------------------------------------------------------------*/
-/* Function Prototypes */
-/*----------------------------------------------------------------------*/
-
-#if defined(__OS2__)
-#define NP_LOADDS _System
-#else
-#define NP_LOADDS
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* NPP_* functions are provided by the plugin and called by the navigator. */
-
-#if defined(XP_UNIX)
-char* NPP_GetMIMEDescription(void);
-#endif
-
-NPError NP_LOADDS NPP_Initialize(void);
-void NP_LOADDS NPP_Shutdown(void);
-NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
- uint16_t mode, int16_t argc, char* argn[],
- char* argv[], NPSavedData* saved);
-NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
-NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
-NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
- NPStream* stream, NPBool seekable,
- uint16_t* stype);
-NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
- NPReason reason);
-int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
-int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset,
- int32_t len, void* buffer);
-void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
- const char* fname);
-void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
-int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
-void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
- NPReason reason, void* notifyData);
-jref NP_LOADDS NPP_GetJavaClass(void);
-NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
-NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
-NPBool NP_LOADDS NPP_GotFocus(NPP instance, NPFocusDirection direction);
-void NP_LOADDS NPP_LostFocus(NPP instance);
-void NP_LOADDS NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, void* notifyData);
-NPError NP_LOADDS NPP_ClearSiteData(const char* site, uint64_t flags, uint64_t maxAge);
-char** NP_LOADDS NPP_GetSitesWithData(void);
-
-/* NPN_* functions are provided by the navigator and called by the plugin. */
-void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
- int* netscape_major, int* netscape_minor);
-NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
- const char* target, void* notifyData);
-NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url,
- const char* target);
-NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url,
- const char* target, uint32_t len,
- const char* buf, NPBool file,
- void* notifyData);
-NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,
- const char* target, uint32_t len,
- const char* buf, NPBool file);
-NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
-NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
- const char* target, NPStream** stream);
-int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len,
- void* buffer);
-NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream,
- NPReason reason);
-void NP_LOADDS NPN_Status(NPP instance, const char* message);
-const char* NP_LOADDS NPN_UserAgent(NPP instance);
-void* NP_LOADDS NPN_MemAlloc(uint32_t size);
-void NP_LOADDS NPN_MemFree(void* ptr);
-uint32_t NP_LOADDS NPN_MemFlush(uint32_t size);
-void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
-JRIEnv* NP_LOADDS NPN_GetJavaEnv(void);
-jref NP_LOADDS NPN_GetJavaPeer(NPP instance);
-NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable,
- void *value);
-NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable,
- void *value);
-void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
-void NP_LOADDS NPN_InvalidateRegion(NPP instance,
- NPRegion invalidRegion);
-void NP_LOADDS NPN_ForceRedraw(NPP instance);
-void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
-void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance);
-void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance,
- void (*func) (void *),
- void *userData);
-NPError NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable,
- const char *url, char **value,
- uint32_t *len);
-NPError NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable,
- const char *url, const char *value,
- uint32_t len);
-NPError NP_LOADDS NPN_GetAuthenticationInfo(NPP instance,
- const char *protocol,
- const char *host, int32_t port,
- const char *scheme,
- const char *realm,
- char **username, uint32_t *ulen,
- char **password,
- uint32_t *plen);
-uint32_t NP_LOADDS NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
-void NP_LOADDS NPN_UnscheduleTimer(NPP instance, uint32_t timerID);
-NPError NP_LOADDS NPN_PopUpContextMenu(NPP instance, NPMenu* menu);
-NPBool NP_LOADDS NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif
-
-#endif /* RC_INVOKED */
-#if defined(__OS2__)
-#pragma pack()
-#endif
-
-#endif /* npapi_h_ */
+++ /dev/null
-/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef NPFUNCTIONS_H
-#define NPFUNCTIONS_H
-
-
-#include "npruntime.h"
-#include "npapi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(XP_WIN)
-#define EXPORTED_CALLBACK(_type, _name) _type (__stdcall * _name)
-#else
-#define EXPORTED_CALLBACK(_type, _name) _type (* _name)
-#endif
-
-typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* URL, const char* window, void* notifyData);
-typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* URL, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
-typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* rangeList);
-typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);
-typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer);
-typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
-typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message);
-typedef const char*(*NPN_UserAgentProcPtr)(NPP instance);
-typedef void* (*NPN_MemAllocProcPtr)(uint32_t size);
-typedef void (*NPN_MemFreeProcPtr)(void* ptr);
-typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size);
-typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
-typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value);
-typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value);
-typedef void (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect);
-typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region);
-typedef void (*NPN_ForceRedrawProcPtr)(NPP instance);
-typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* URL, const char* window);
-typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* URL, const char* window, uint32_t len, const char* buf, NPBool file);
-typedef void* (*NPN_GetJavaEnvProcPtr)(void);
-typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance);
-typedef void (*NPN_PushPopupsEnabledStateProcPtr)(NPP instance, NPBool enabled);
-typedef void (*NPN_PopPopupsEnabledStateProcPtr)(NPP instance);
-typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP npp, void (*func)(void *), void *userData);
-typedef NPError (*NPN_GetValueForURLProcPtr)(NPP npp, NPNURLVariable variable, const char* url, char** value, uint32_t* len);
-typedef NPError (*NPN_SetValueForURLProcPtr)(NPP npp, NPNURLVariable variable, const char* url, const char* value, uint32_t len);
-typedef NPError (*NPN_GetAuthenticationInfoProcPtr)(NPP npp, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen);
-
-typedef uint32_t (*NPN_ScheduleTimerProcPtr)(NPP npp, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
-typedef void (*NPN_UnscheduleTimerProcPtr)(NPP npp, uint32_t timerID);
-typedef NPError (*NPN_PopUpContextMenuProcPtr)(NPP instance, NPMenu* menu);
-typedef NPBool (*NPN_ConvertPointProcPtr)(NPP npp, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
-
-typedef void (*NPN_ReleaseVariantValueProcPtr) (NPVariant *variant);
-
-typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr) (const NPUTF8 *name);
-typedef void (*NPN_GetStringIdentifiersProcPtr) (const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers);
-typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr) (int32_t intid);
-typedef int32_t (*NPN_IntFromIdentifierProcPtr) (NPIdentifier identifier);
-typedef bool (*NPN_IdentifierIsStringProcPtr) (NPIdentifier identifier);
-typedef NPUTF8 *(*NPN_UTF8FromIdentifierProcPtr) (NPIdentifier identifier);
-
-typedef NPObject* (*NPN_CreateObjectProcPtr) (NPP, NPClass *aClass);
-typedef NPObject* (*NPN_RetainObjectProcPtr) (NPObject *obj);
-typedef void (*NPN_ReleaseObjectProcPtr) (NPObject *obj);
-typedef bool (*NPN_InvokeProcPtr) (NPP npp, NPObject *obj, NPIdentifier methodName, const NPVariant *args, unsigned argCount, NPVariant *result);
-typedef bool (*NPN_InvokeDefaultProcPtr) (NPP npp, NPObject *obj, const NPVariant *args, unsigned argCount, NPVariant *result);
-typedef bool (*NPN_EvaluateProcPtr) (NPP npp, NPObject *obj, NPString *script, NPVariant *result);
-typedef bool (*NPN_GetPropertyProcPtr) (NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result);
-typedef bool (*NPN_SetPropertyProcPtr) (NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value);
-typedef bool (*NPN_HasPropertyProcPtr) (NPP, NPObject *npobj, NPIdentifier propertyName);
-typedef bool (*NPN_HasMethodProcPtr) (NPP npp, NPObject *npobj, NPIdentifier methodName);
-typedef bool (*NPN_RemovePropertyProcPtr) (NPP npp, NPObject *obj, NPIdentifier propertyName);
-typedef void (*NPN_SetExceptionProcPtr) (NPObject *obj, const NPUTF8 *message);
-typedef bool (*NPN_EnumerateProcPtr) (NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count);
-typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result);
-
-typedef NPError (*NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
-typedef NPError (*NPP_DestroyProcPtr)(NPP instance, NPSavedData** save);
-typedef NPError (*NPP_SetWindowProcPtr)(NPP instance, NPWindow* window);
-typedef NPError (*NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
-typedef NPError (*NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
-typedef void (*NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream, const char* fname);
-typedef int32_t (*NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream);
-typedef int32_t (*NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
-typedef void (*NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint);
-typedef int16_t (*NPP_HandleEventProcPtr)(NPP instance, void* event);
-typedef void (*NPP_URLNotifyProcPtr)(NPP instance, const char* URL, NPReason reason, void* notifyData);
-typedef NPError (*NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value);
-typedef NPError (*NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value);
-typedef NPBool (*NPP_GotFocusPtr)(NPP instance, NPFocusDirection direction);
-typedef void (*NPP_LostFocusPtr)(NPP instance);
-typedef void (*NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData);
-typedef NPError (*NPP_ClearSiteDataPtr)(const char* site, uint64_t flags, uint64_t maxAge);
-typedef char** (*NPP_GetSitesWithDataPtr)(void);
-
-typedef void *(*NPP_GetJavaClassProcPtr)(void);
-typedef void* JRIGlobalRef; //not using this right now
-
-typedef struct _NPNetscapeFuncs {
- uint16_t size;
- uint16_t version;
-
- NPN_GetURLProcPtr geturl;
- NPN_PostURLProcPtr posturl;
- NPN_RequestReadProcPtr requestread;
- NPN_NewStreamProcPtr newstream;
- NPN_WriteProcPtr write;
- NPN_DestroyStreamProcPtr destroystream;
- NPN_StatusProcPtr status;
- NPN_UserAgentProcPtr uagent;
- NPN_MemAllocProcPtr memalloc;
- NPN_MemFreeProcPtr memfree;
- NPN_MemFlushProcPtr memflush;
- NPN_ReloadPluginsProcPtr reloadplugins;
- NPN_GetJavaEnvProcPtr getJavaEnv;
- NPN_GetJavaPeerProcPtr getJavaPeer;
- NPN_GetURLNotifyProcPtr geturlnotify;
- NPN_PostURLNotifyProcPtr posturlnotify;
- NPN_GetValueProcPtr getvalue;
- NPN_SetValueProcPtr setvalue;
- NPN_InvalidateRectProcPtr invalidaterect;
- NPN_InvalidateRegionProcPtr invalidateregion;
- NPN_ForceRedrawProcPtr forceredraw;
-
- NPN_GetStringIdentifierProcPtr getstringidentifier;
- NPN_GetStringIdentifiersProcPtr getstringidentifiers;
- NPN_GetIntIdentifierProcPtr getintidentifier;
- NPN_IdentifierIsStringProcPtr identifierisstring;
- NPN_UTF8FromIdentifierProcPtr utf8fromidentifier;
- NPN_IntFromIdentifierProcPtr intfromidentifier;
- NPN_CreateObjectProcPtr createobject;
- NPN_RetainObjectProcPtr retainobject;
- NPN_ReleaseObjectProcPtr releaseobject;
- NPN_InvokeProcPtr invoke;
- NPN_InvokeDefaultProcPtr invokeDefault;
- NPN_EvaluateProcPtr evaluate;
- NPN_GetPropertyProcPtr getproperty;
- NPN_SetPropertyProcPtr setproperty;
- NPN_RemovePropertyProcPtr removeproperty;
- NPN_HasPropertyProcPtr hasproperty;
- NPN_HasMethodProcPtr hasmethod;
- NPN_ReleaseVariantValueProcPtr releasevariantvalue;
- NPN_SetExceptionProcPtr setexception;
- NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;
- NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate;
- NPN_EnumerateProcPtr enumerate;
- NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall;
- NPN_ConstructProcPtr construct;
- NPN_GetValueForURLProcPtr getvalueforurl;
- NPN_SetValueForURLProcPtr setvalueforurl;
- NPN_GetAuthenticationInfoProcPtr getauthenticationinfo;
- NPN_ScheduleTimerProcPtr scheduletimer;
- NPN_UnscheduleTimerProcPtr unscheduletimer;
- NPN_PopUpContextMenuProcPtr popupcontextmenu;
- NPN_ConvertPointProcPtr convertpoint;
-} NPNetscapeFuncs;
-
-typedef struct _NPPluginFuncs {
- uint16_t size;
- uint16_t version;
- NPP_NewProcPtr newp;
- NPP_DestroyProcPtr destroy;
- NPP_SetWindowProcPtr setwindow;
- NPP_NewStreamProcPtr newstream;
- NPP_DestroyStreamProcPtr destroystream;
- NPP_StreamAsFileProcPtr asfile;
- NPP_WriteReadyProcPtr writeready;
- NPP_WriteProcPtr write;
- NPP_PrintProcPtr print;
- NPP_HandleEventProcPtr event;
- NPP_URLNotifyProcPtr urlnotify;
- JRIGlobalRef javaClass;
- NPP_GetValueProcPtr getvalue;
- NPP_SetValueProcPtr setvalue;
- NPP_GotFocusPtr gotfocus;
- NPP_LostFocusPtr lostfocus;
- NPP_URLRedirectNotifyPtr urlredirectnotify;
- NPP_ClearSiteDataPtr clearsitedata;
- NPP_GetSitesWithDataPtr getsiteswithdata;
-} NPPluginFuncs;
-
-typedef EXPORTED_CALLBACK(NPError, NP_GetEntryPointsFuncPtr)(NPPluginFuncs*);
-typedef EXPORTED_CALLBACK(void, NPP_ShutdownProcPtr)(void);
-
-#if defined(XP_MACOSX)
-typedef void (*BP_CreatePluginMIMETypesPreferencesFuncPtr)(void);
-typedef NPError (*MainFuncPtr)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownProcPtr*);
-#endif
-
-#if defined(XP_UNIX)
-typedef EXPORTED_CALLBACK(NPError, NP_InitializeFuncPtr)(NPNetscapeFuncs*, NPPluginFuncs*);
-typedef EXPORTED_CALLBACK(char*, NP_GetMIMEDescriptionFuncPtr)(void);
-#else
-typedef EXPORTED_CALLBACK(NPError, NP_InitializeFuncPtr)(NPNetscapeFuncs*);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla
- * Foundation ("Mozilla") nor the names of their contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR
- * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-#ifndef _NP_RUNTIME_H_
-#define _NP_RUNTIME_H_
-
-#include "npapi.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- This API is used to facilitate binding code written in C to script
- objects. The API in this header does not assume the presence of a
- user agent. That is, it can be used to bind C code to scripting
- environments outside of the context of a user agent.
-
- However, the normal use of the this API is in the context of a
- scripting environment running in a browser or other user agent.
- In particular it is used to support the extended Netscape
- script-ability API for plugins (NP-SAP). NP-SAP is an extension
- of the Netscape plugin API. As such we have adopted the use of
- the "NP" prefix for this API.
-
- The following NP{N|P}Variables were added to the Netscape plugin
- API (in npapi.h):
-
- NPNVWindowNPObject
- NPNVPluginElementNPObject
- NPPVpluginScriptableNPObject
-
- These variables are exposed through NPN_GetValue() and
- NPP_GetValue() (respectively) and are used to establish the
- initial binding between the user agent and native code. The DOM
- objects in the user agent can be examined and manipulated using
- the NPN_ functions that operate on NPObjects described in this
- header.
-
- To the extent possible the assumptions about the scripting
- language used by the scripting environment have been minimized.
-*/
-
-#define NP_BEGIN_MACRO do {
-#define NP_END_MACRO } while (0)
-
-/*
- Objects (non-primitive data) passed between 'C' and script is
- always wrapped in an NPObject. The 'interface' of an NPObject is
- described by an NPClass.
-*/
-typedef struct NPObject NPObject;
-typedef struct NPClass NPClass;
-
-typedef char NPUTF8;
-typedef struct _NPString {
- const NPUTF8 *UTF8Characters;
- uint32_t UTF8Length;
-} NPString;
-
-typedef enum {
- NPVariantType_Void,
- NPVariantType_Null,
- NPVariantType_Bool,
- NPVariantType_Int32,
- NPVariantType_Double,
- NPVariantType_String,
- NPVariantType_Object
-} NPVariantType;
-
-typedef struct _NPVariant {
- NPVariantType type;
- union {
- bool boolValue;
- int32_t intValue;
- double doubleValue;
- NPString stringValue;
- NPObject *objectValue;
- } value;
-} NPVariant;
-
-/*
- NPN_ReleaseVariantValue is called on all 'out' parameters
- references. Specifically it is to be called on variants that own
- their value, as is the case with all non-const NPVariant*
- arguments after a successful call to any methods (except this one)
- in this API.
-
- After calling NPN_ReleaseVariantValue, the type of the variant
- will be NPVariantType_Void.
-*/
-void NPN_ReleaseVariantValue(NPVariant *variant);
-
-#define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void)
-#define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null)
-#define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool)
-#define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32)
-#define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double)
-#define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String)
-#define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object)
-
-#define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue)
-#define NPVARIANT_TO_INT32(_v) ((_v).value.intValue)
-#define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue)
-#define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue)
-#define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue)
-
-#define VOID_TO_NPVARIANT(_v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_Void; \
- (_v).value.objectValue = NULL; \
-NP_END_MACRO
-
-#define NULL_TO_NPVARIANT(_v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_Null; \
- (_v).value.objectValue = NULL; \
-NP_END_MACRO
-
-#define BOOLEAN_TO_NPVARIANT(_val, _v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_Bool; \
- (_v).value.boolValue = !!(_val); \
-NP_END_MACRO
-
-#define INT32_TO_NPVARIANT(_val, _v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_Int32; \
- (_v).value.intValue = _val; \
-NP_END_MACRO
-
-#define DOUBLE_TO_NPVARIANT(_val, _v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_Double; \
- (_v).value.doubleValue = _val; \
-NP_END_MACRO
-
-#define STRINGZ_TO_NPVARIANT(_val, _v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_String; \
- NPString str = { _val, uint32_t(strlen(_val)) }; \
- (_v).value.stringValue = str; \
-NP_END_MACRO
-
-#define STRINGN_TO_NPVARIANT(_val, _len, _v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_String; \
- NPString str = { _val, uint32_t(_len) }; \
- (_v).value.stringValue = str; \
-NP_END_MACRO
-
-#define OBJECT_TO_NPVARIANT(_val, _v) \
-NP_BEGIN_MACRO \
- (_v).type = NPVariantType_Object; \
- (_v).value.objectValue = _val; \
-NP_END_MACRO
-
-
-/*
- Type mappings (JavaScript types have been used for illustration
- purposes):
-
- JavaScript to C (NPVariant with type:)
- undefined NPVariantType_Void
- null NPVariantType_Null
- Boolean NPVariantType_Bool
- Number NPVariantType_Double or NPVariantType_Int32
- String NPVariantType_String
- Object NPVariantType_Object
-
- C (NPVariant with type:) to JavaScript
- NPVariantType_Void undefined
- NPVariantType_Null null
- NPVariantType_Bool Boolean
- NPVariantType_Int32 Number
- NPVariantType_Double Number
- NPVariantType_String String
- NPVariantType_Object Object
-*/
-
-typedef void *NPIdentifier;
-
-/*
- NPObjects have methods and properties. Methods and properties are
- identified with NPIdentifiers. These identifiers may be reflected
- in script. NPIdentifiers can be either strings or integers, IOW,
- methods and properties can be identified by either strings or
- integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be
- compared using ==. In case of any errors, the requested
- NPIdentifier(s) will be NULL. NPIdentifier lifetime is controlled
- by the browser. Plugins do not need to worry about memory management
- with regards to NPIdentifiers.
-*/
-NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name);
-void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
- NPIdentifier *identifiers);
-NPIdentifier NPN_GetIntIdentifier(int32_t intid);
-bool NPN_IdentifierIsString(NPIdentifier identifier);
-
-/*
- The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed.
-*/
-NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier);
-
-/*
- Get the integer represented by identifier. If identifier is not an
- integer identifier, the behaviour is undefined.
-*/
-int32_t NPN_IntFromIdentifier(NPIdentifier identifier);
-
-/*
- NPObject behavior is implemented using the following set of
- callback functions.
-
- The NPVariant *result argument of these functions (where
- applicable) should be released using NPN_ReleaseVariantValue().
-*/
-typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass);
-typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj);
-typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj);
-typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name);
-typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name,
- const NPVariant *args, uint32_t argCount,
- NPVariant *result);
-typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj,
- const NPVariant *args,
- uint32_t argCount,
- NPVariant *result);
-typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name);
-typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name,
- NPVariant *result);
-typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name,
- const NPVariant *value);
-typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj,
- NPIdentifier name);
-typedef bool (*NPEnumerationFunctionPtr)(NPObject *npobj, NPIdentifier **value,
- uint32_t *count);
-typedef bool (*NPConstructFunctionPtr)(NPObject *npobj,
- const NPVariant *args,
- uint32_t argCount,
- NPVariant *result);
-
-/*
- NPObjects returned by create, retain, invoke, and getProperty pass
- a reference count to the caller. That is, the callee adds a
- reference count which passes to the caller. It is the caller's
- responsibility to release the returned object.
-
- NPInvokeFunctionPtr function may return 0 to indicate a void
- result.
-
- NPInvalidateFunctionPtr is called by the scripting environment
- when the native code is shutdown. Any attempt to message a
- NPObject instance after the invalidate callback has been
- called will result in undefined behavior, even if the native code
- is still retaining those NPObject instances. (The runtime
- will typically return immediately, with 0 or NULL, from an attempt
- to dispatch to a NPObject, but this behavior should not be
- depended upon.)
-
- The NPEnumerationFunctionPtr function may pass an array of
- NPIdentifiers back to the caller. The callee allocs the memory of
- the array using NPN_MemAlloc(), and it's the caller's responsibility
- to release it using NPN_MemFree().
-*/
-struct NPClass
-{
- uint32_t structVersion;
- NPAllocateFunctionPtr allocate;
- NPDeallocateFunctionPtr deallocate;
- NPInvalidateFunctionPtr invalidate;
- NPHasMethodFunctionPtr hasMethod;
- NPInvokeFunctionPtr invoke;
- NPInvokeDefaultFunctionPtr invokeDefault;
- NPHasPropertyFunctionPtr hasProperty;
- NPGetPropertyFunctionPtr getProperty;
- NPSetPropertyFunctionPtr setProperty;
- NPRemovePropertyFunctionPtr removeProperty;
- NPEnumerationFunctionPtr enumerate;
- NPConstructFunctionPtr construct;
-};
-
-#define NP_CLASS_STRUCT_VERSION 3
-
-#define NP_CLASS_STRUCT_VERSION_ENUM 2
-#define NP_CLASS_STRUCT_VERSION_CTOR 3
-
-#define NP_CLASS_STRUCT_VERSION_HAS_ENUM(npclass) \
- ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM)
-
-#define NP_CLASS_STRUCT_VERSION_HAS_CTOR(npclass) \
- ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_CTOR)
-
-struct NPObject {
- NPClass *_class;
- uint32_t referenceCount;
- /*
- * Additional space may be allocated here by types of NPObjects
- */
-};
-
-/*
- If the class has an allocate function, NPN_CreateObject invokes
- that function, otherwise a NPObject is allocated and
- returned. This method will initialize the referenceCount member of
- the NPObject to 1.
-*/
-NPObject *NPN_CreateObject(NPP npp, NPClass *aClass);
-
-/*
- Increment the NPObject's reference count.
-*/
-NPObject *NPN_RetainObject(NPObject *npobj);
-
-/*
- Decremented the NPObject's reference count. If the reference
- count goes to zero, the class's destroy function is invoke if
- specified, otherwise the object is freed directly.
-*/
-void NPN_ReleaseObject(NPObject *npobj);
-
-/*
- Functions to access script objects represented by NPObject.
-
- Calls to script objects are synchronous. If a function returns a
- value, it will be supplied via the result NPVariant
- argument. Successful calls will return true, false will be
- returned in case of an error.
-
- Calls made from plugin code to script must be made from the thread
- on which the plugin was initialized.
-*/
-
-bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName,
- const NPVariant *args, uint32_t argCount, NPVariant *result);
-bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args,
- uint32_t argCount, NPVariant *result);
-bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script,
- NPVariant *result);
-bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
- NPVariant *result);
-bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
- const NPVariant *value);
-bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
-bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
-bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName);
-bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier,
- uint32_t *count);
-bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args,
- uint32_t argCount, NPVariant *result);
-
-/*
- NPN_SetException may be called to trigger a script exception upon
- return from entry points into NPObjects. Typical usage:
-
- NPN_SetException (npobj, message);
-*/
-void NPN_SetException(NPObject *npobj, const NPUTF8 *message);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * mozilla.org.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Johnny Stenback <jst@mozilla.org> (Original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nptypes_h_
-#define nptypes_h_
-
-/*
- * Header file for ensuring that C99 types ([u]int32_t, [u]int64_t and bool) and
- * true/false macros are available.
- */
-
-#if defined(WIN32) || defined(OS2)
- /*
- * Win32 and OS/2 don't know C99, so define [u]int_16/32/64 here. The bool
- * is predefined tho, both in C and C++.
- */
- typedef short int16_t;
- typedef unsigned short uint16_t;
- typedef int int32_t;
- typedef unsigned int uint32_t;
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
-
-#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX)
- /*
- * AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
- * but not bool for C.
- */
- #include <inttypes.h>
-
- #ifndef __cplusplus
- typedef int bool;
- #define true 1
- #define false 0
- #endif
-#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
- /*
- * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
- * u_int32_t.
- */
- #include <sys/types.h>
-
- /*
- * BSD/OS ships no header that defines uint32_t, nor bool (for C)
- */
- #if defined(bsdi)
- typedef u_int32_t uint32_t;
- typedef u_int64_t uint64_t;
-
- #if !defined(__cplusplus)
- typedef int bool;
- #define true 1
- #define false 0
- #endif
- #else
- /*
- * FreeBSD and OpenBSD define uint32_t and bool.
- */
- #include <inttypes.h>
- #include <stdbool.h>
- #endif
-#elif defined(BEOS)
- #include <inttypes.h>
-#else
- /*
- * For those that ship a standard C99 stdint.h header file, include
- * it. Can't do the same for stdbool.h tho, since some systems ship
- * with a stdbool.h file that doesn't compile!
- */
- #include <stdint.h>
-
- #ifndef __cplusplus
- #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
- #include <stdbool.h>
- #else
- /*
- * GCC 2.91 can't deal with a typedef for bool, but a #define
- * works.
- */
- #define bool int
- #define true 1
- #define false 0
- #endif
- #endif
-#endif
-
-#endif /* nptypes_h_ */
+++ /dev/null
-
-#! /bin/sh
-
-autoreconf --install -v
-
-./configure
+++ /dev/null
-###########################################################################################
-##
-## Copyright 2011 Telecom Paristech
-## Author : Stanislas Selle
-##
-###########################################################################################
-
-### Configure.ac for hbbtvterminal
-
-
-AC_INIT([hbbtvterminal], [0.1.0], [stanislas.selle@telecom-paristech.fr])
-
-AC_CONFIG_AUX_DIR([build-aux])
-
-AC_CONFIG_MACRO_DIR([m4])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-AM_INIT_AUTOMAKE([foreign -Wall -Werror])
-
-#check programs
-AC_PROG_CXX
-
-#check modules
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28.0])
-PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.20.1])
-PKG_CHECK_MODULES([WEBKIT], [webkit-1.0 >= 1.5.2])
-PKG_CHECK_MODULES([PIXMAN], [pixman-1 >= 0.16.4])
-PKG_CHECK_MODULES([HBBTVBROWSERPLUGIN], [hbbtvbrowserplugin >= 0.0.3])
-
-# Checks for header files.
-AC_PATH_X
-
-# check header
-AC_HEADER_STDBOOL
-
-# makefiles
-AC_CONFIG_FILES([makefile src/makefile])
-
-
-AC_OUTPUT
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9,00"\r
- Name="hbbtv_terminal"\r
- ProjectGUID="{247BE3AF-EC92-4892-A7AC-0C51E42A5A44}"\r
- RootNamespace="hbbtv_terminal"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="1"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\..\include;"./Win32Build\WebKitGTK-Bundle\include\";"./Win32Build\WebKitGTK-Bundle\include\glib-2.0";"./Win32Build\WebKitGTK-Bundle\include\atk-1.0";"./Win32Build\WebKitGTK-Bundle\include\cairo";"./Win32Build\WebKitGTK-Bundle\include\gail-1.0";"./Win32Build\WebKitGTK-Bundle\include\gdk-pixbuf-2.0";"./Win32Build\WebKitGTK-Bundle\include\gtk-2.0";"./Win32Build\\WebKitGTK-Bundle\include\libpng14";"./Win32Build\\WebKitGTK-Bundle\include\pango-1.0";"./Win32Build\WebKitGTK-Bundle\include\webkit-1.0";"./Win32Build\WebKitGTK-Bundle\include\libsoup-2.4";"./Win32Build\WebKitGTK-Bundle\lib\glib-2.0\include";"./Win32Build\WebKitGTK-Bundle\lib\gdk-pixbuf-2.0\include";"./Win32Build\WebKitGTK-Bundle\lib\gtk-2.0\include";"./Win32Build\WebKitGTK-Bundle\lib\pango\include";"./Win32Build\WebKitGTK-Bundle\lib\gettext\include";"./Win32Build\WebKitGTK-Bundle\lib\gio\include";../hbbtvbrowserplugin\src;$(NOINHERIT)"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;G_HAVE_ISO_VARARGS"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="4"\r
- CompileAs="2"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="libasprintf-0.lib libatk-1.0-0.lib libcairo-2.lib libenchant.lib libexpat-1.lib libexslt-0.lib libfontconfig-1.lib libfreetype-6.lib libgailutil-18.lib libgdk-win32-2.0-0.lib libgdk_pixbuf-2.0-0.lib libgettextlib-0-17.lib libgettextpo-0.lib libgettextsrc-0-17.lib libgio-2.0-0.lib libglib-2.0-0.lib libgmodule-2.0-0.lib libgobject-2.0-0.lib libgthread-2.0-0.lib libgtk-win32-2.0-0.lib libintl-8.lib libjpeg-7.lib libpango-1.0-0.lib libpangocairo-1.0-0.lib libpangoft2-1.0-0.lib libpangowin32-1.0-0.lib libpixman-1-0.lib libpng14-14.lib libsoup-2.4-1.lib libwebkitgtk-1.0-0.lib libxslt-1.lib zlib1.lib"\r
- OutputFile="../../../bin/win32/debug/$(ProjectName).exe"\r
- LinkIncremental="2"\r
- AdditionalLibraryDirectories="../../gpac_public/bin/win32/debug;"./Win32Build\WebKitGTK-Bundle\lib""\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="1"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\..\include;"./Win32Build\WebKitGTK-Bundle\include\";"./Win32Build\WebKitGTK-Bundle\include\glib-2.0";"./Win32Build\WebKitGTK-Bundle\include\atk-1.0";"./Win32Build\WebKitGTK-Bundle\include\cairo";"./Win32Build\WebKitGTK-Bundle\include\gail-1.0";"./Win32Build\WebKitGTK-Bundle\include\gdk-pixbuf-2.0";"./Win32Build\WebKitGTK-Bundle\include\gtk-2.0";"./Win32Build\\WebKitGTK-Bundle\include\libpng14";"./Win32Build\\WebKitGTK-Bundle\include\pango-1.0";"./Win32Build\WebKitGTK-Bundle\include\webkit-1.0";"./Win32Build\WebKitGTK-Bundle\include\libsoup-2.4";"./Win32Build\WebKitGTK-Bundle\lib\glib-2.0\include";"./Win32Build\WebKitGTK-Bundle\lib\gdk-pixbuf-2.0\include";"./Win32Build\WebKitGTK-Bundle\lib\gtk-2.0\include";"./Win32Build\WebKitGTK-Bundle\lib\pango\include";"./Win32Build\WebKitGTK-Bundle\lib\gettext\include";"./Win32Build\WebKitGTK-Bundle\lib\gio\include";../hbbtvbrowserplugin\src;$(NOINHERIT)"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;G_HAVE_ISO_VARARGS"\r
- RuntimeLibrary="2"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="libasprintf-0.lib libatk-1.0-0.lib libcairo-2.lib libenchant.lib libexpat-1.lib libexslt-0.lib libfontconfig-1.lib libfreetype-6.lib libgailutil-18.lib libgdk-win32-2.0-0.lib libgdk_pixbuf-2.0-0.lib libgettextlib-0-17.lib libgettextpo-0.lib libgettextsrc-0-17.lib libgio-2.0-0.lib libglib-2.0-0.lib libgmodule-2.0-0.lib libgobject-2.0-0.lib libgthread-2.0-0.lib libgtk-win32-2.0-0.lib libintl-8.lib libjpeg-7.lib libpango-1.0-0.lib libpangocairo-1.0-0.lib libpangoft2-1.0-0.lib libpangowin32-1.0-0.lib libpixman-1-0.lib libpng14-14.lib libsoup-2.4-1.lib libwebkitgtk-1.0-0.lib libxslt-1.lib zlib1.lib"\r
- OutputFile="../../../bin/win32/release/$(ProjectName).exe"\r
- LinkIncremental="1"\r
- AdditionalLibraryDirectories="../../gpac_public/bin/win32/debug;"./Win32Build\WebKitGTK-Bundle\lib""\r
- GenerateDebugInformation="true"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Fichiers sources"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\hbbtv_channel.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtv_demux.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtv_keycontrol.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtv_tools.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\hbbtvterminal.cpp"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Fichiers d'en-tête"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\src\hbbtvterminal.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-
-SUBDIRS = src
-
-#TESTTS = /home/selle/ressources/mpeg2-ts-hbbtv/TPT/OpenHbb-ch4.ts
-TESTTS = /home/selle/ressources/OpenHbbDemo-3ch2app/OpenHbbDemo-3ch2app.ts
-
-
-TESTURL1 = http://cairhblog.free.fr/menu.html
-TESTURL2 = http://aquila.enst.fr:8080/subwebsite/hbbtvtest/oha0005web/index.php
-TESTLOG = /tmp/test-err.txt
-
-test : all
- ./src/hbbtvterminal -input=$(TESTTS)
-test1 : all
- ./src/hbbtvterminal -input=$(TESTTS) -url=$(TESTURL1)
-test2 : all
- ./src/hbbtvterminal -input=$(TESTTS) -url=$(TESTURL2)
+++ /dev/null
-##
-## Copyright : Telecom Paristech - 2011
-##
-## Author : Stanislas Selle
-##
-
-###############################################################################
-## Programs
-
-COMPILER = g++
-DELETER = rm -f
-
-
-CFLAGS = -g
-
-CFLAGS += -DXP_UNIX
-CFLAGS += -fPIC
-
-###############################################################################
-## Options, Flags and LinkS
-
-INCLUDEFLAGS = -I/usr/include/xulrunner-lastest/ \
- -I../../gpac_public/include/ \
- -I../hbbtvbrowserplugin/src/ \
- -I../../gpac_public/
-
-LIBRARYPATHS = -L/usr/lib/xulrunner-devel-lastest/sdk/lib/ \
- -L../../gpac_public/bin/gcc/ \
- -L../hbbtvbrowserplugin/bin/
-
-LIBRARYNAMES = -lgpac \
- -lmozjs \
- -lxpcom \
- -lxul \
- ../hbbtvbrowserplugin/bin/hbbtvbrowserplugin.so
-
-
-LIBRARYFLAGS = $(LIBRARYPATHS) $(LIBRARYNAMES)
-
-FROMPKG = webkit-1.0 gtk+-2.0 pixman-1
-
-ifneq ($(strip $(FROMPKG)),)
-PKGFLAGS = `pkg-config --cflags $(FROMPKG) `
-PKGLIBS = `pkg-config --libs $(FROMPKG) `
-INCLUDEFLAGS += $(PKGFLAGS)
-LIBRARYFLAGS += $(PKGLIBS)
-endif
-
-
-###############################################################################
-## Files
-
-
-MAINTARGET = bin/hbbtvterminal
-
-OBJ = obj/hbbtvterminal.o \
- obj/hbbtv_demux.o \
- obj/hbbtv_channel.o
-
-#TESTTS = /home/selle/ressources/OpenHbbDemo-3ch2app/OpenHbbDemo-3ch2app.ts
-TESTTS = /home/selle/ressources/mpeg2-ts-hbbtv/TPT/OpenHbb-ch4.ts
-TESTURL = http://aquila.enst.fr:8080/subwebsite/hbbtvtest/oha0005web/index.php
-TESTLOG = /tmp/test-err.txt
-
-###############################################################################
-## Rules
-
-
-all : $(MAINTARGET)
-
-$(MAINTARGET) : $(OBJ)
- $(COMPILER) $(CFLAGS) $(LIBRARYFLAGS) $(OBJ) -o $(MAINTARGET)
-
-obj/%.o : src/%.cpp
- $(COMPILER) $(CFLAGS) $(INCLUDEFLAGS) -c $^ -o $@
-
-test : all
- $(MAINTARGET) -input=$(TESTTS)
-
-clean :
- rm -f $(OBJ) $(MAINTARGET)
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
- <FileVersion major="1" minor="6" />
- <Project>
- <Option title="HbbtvTerminal" />
- <Option pch_mode="2" />
- <Option compiler="gcc" />
- <Build>
- <Target title="Debug">
- <Option output="bin/Debug/HbbtvTerminal" prefix_auto="1" extension_auto="1" />
- <Option object_output="obj/Debug/" />
- <Option type="1" />
- <Option compiler="gcc" />
- <Compiler>
- <Add option="-g" />
- </Compiler>
- </Target>
- </Build>
- <Compiler>
- <Add option="-Wall" />
- </Compiler>
- <Unit filename="../../../autogen.sh" />
- <Unit filename="../../../configure.ac" />
- <Unit filename="../../../makefile.am" />
- <Unit filename="../../../src/hbbtv_channel.cpp" />
- <Unit filename="../../../src/hbbtv_demux.cpp" />
- <Unit filename="../../../src/hbbtvterminal.cpp" />
- <Unit filename="../../../src/hbbtvterminal.h" />
- <Unit filename="../../../src/makefile.am" />
- <Extensions>
- <code_completion />
- <debugger />
- </Extensions>
- </Project>
-</CodeBlocks_project_file>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
- <ActiveTarget name="Debug" />
- <File name="../../../autogen.sh" open="1" top="0" tabpos="3">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../configure.ac" open="1" top="0" tabpos="2">
- <Cursor position="781" topLine="0" />
- </File>
- <File name="../../../makefile.am" open="1" top="0" tabpos="7">
- <Cursor position="40" topLine="0" />
- </File>
- <File name="../../../src/hbbtv_channel.cpp" open="1" top="0" tabpos="5">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../src/hbbtv_demux.cpp" open="0" top="0" tabpos="7">
- <Cursor position="0" topLine="0" />
- </File>
- <File name="../../../src/hbbtvterminal.cpp" open="1" top="0" tabpos="4">
- <Cursor position="44068" topLine="1111" />
- </File>
- <File name="../../../src/hbbtvterminal.h" open="1" top="0" tabpos="1">
- <Cursor position="354" topLine="0" />
- </File>
- <File name="../../../src/makefile.am" open="1" top="0" tabpos="6">
- <Cursor position="388" topLine="0" />
- </File>
-</CodeBlocks_layout_file>
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Jonathan Sillan \r
- * \r
- */\r
-\r
-#include "hbbtvterminal.h"\r
-\r
-static Bool app_priority_test(GF_M2TS_AIT_APPLICATION*,u8 app_priority,u8 app_transport, u8 MaxPriority);\r
-\r
-/* Constructor */\r
-Channel::Channel(u32 TSservice_ID, char* TSchannel_name){ \r
- \r
- u8 i;\r
- service_ID = TSservice_ID;\r
- if(TSchannel_name){\r
- channel_name = gf_strdup(channel_name);\r
- }else{\r
- channel_name = NULL;\r
- }\r
- \r
- video_ID = 0;\r
- for(i=0 ; i<MAX_audio_index ; i++){\r
- audio_ID[i] = 0; \r
- }\r
- ChannelApp = NULL;\r
- AIT_PID = 0;\r
- PMT_PID = 0;\r
- processed = 0;\r
- current_audio_index = 0;\r
- nb_chan_audio_stream =0;\r
-}\r
-\r
-/* Destructor */\r
-void Channel::Destroy_Channel(){ \r
- \r
- service_ID = 0;\r
- if(channel_name){\r
- gf_free(channel_name);\r
- }\r
- gf_free(this);\r
- \r
-}\r
-/* Getter */\r
-u32 Channel::Get_service_id(){ \r
- return service_ID; \r
-}\r
-\r
-char* Channel::Get_channel_name(){\r
- return channel_name;\r
-}\r
-\r
-u32 Channel::Get_video_ID(){\r
- return video_ID; \r
-}\r
-\r
-u32 Channel::Get_audio_ID(u32 indice){\r
- if(audio_ID[indice] == 0 || indice >= nb_chan_audio_stream){\r
- indice = 0;\r
- }\r
- current_audio_index = indice;\r
- return audio_ID[indice];\r
-}\r
-\r
-u32 Channel::Get_ait_pid(){\r
- return AIT_PID;\r
-}\r
-\r
-u32 Channel::Get_pmt_pid(){\r
- return PMT_PID;\r
-}\r
-\r
-Bool Channel::Get_processed(){\r
- return processed;\r
-}\r
-\r
-u32 Channel::Get_audio_index(){\r
- return current_audio_index;\r
-}\r
-\r
-u32 Channel::Get_nb_chan_audio_stream(){\r
- return nb_chan_audio_stream;\r
-}\r
-\r
-GF_M2TS_CHANNEL_APPLICATION_INFO*Channel::Get_App_info(){\r
- return ChannelApp;\r
-}\r
-\r
-GF_M2TS_AIT_APPLICATION* Channel::App_to_play(Bool isConnected,u8 MaxPriority){\r
- u32 i;\r
- Bool App_selected;\r
- u32 app_index;\r
- u8 app_priority;\r
- u8 app_transport;\r
- \r
- App_selected = 0;\r
- app_priority = 0;\r
- app_index = 0;\r
- app_transport = 0;\r
- \r
- for(i = 0 ; i<ChannelApp->nb_application; i++){ \r
- GF_M2TS_AIT_APPLICATION* App_info = (GF_M2TS_AIT_APPLICATION*)gf_list_get(ChannelApp->Application,i);\r
- if((isConnected && App_info->broadband) || App_info->broadcast){\r
- if(App_info->application_control_code == AUTOSTART){\r
- if(app_priority_test(App_info,app_priority,isConnected,MaxPriority)){\r
- app_priority = App_info->priority;\r
- app_index = i;\r
- App_selected = 1;\r
- if(!app_transport && App_info->broadband && isConnected){\r
- app_transport = BROADBAND;\r
- }else{\r
- app_transport = BROADCAST;\r
- }\r
- \r
- } \r
- }\r
- } \r
- }\r
- if(App_selected){\r
- GF_M2TS_AIT_APPLICATION* App_info = (GF_M2TS_AIT_APPLICATION*)gf_list_get(ChannelApp->Application,app_index);\r
- return App_info;\r
- }\r
- return NULL;\r
-}\r
-\r
-GF_M2TS_AIT_APPLICATION* Channel::Get_App(u32 application_id){\r
- u32 i;\r
- \r
- for(i = 0 ; i<ChannelApp->nb_application; i++){ \r
- GF_M2TS_AIT_APPLICATION* App_info = (GF_M2TS_AIT_APPLICATION*)gf_list_get(ChannelApp->Application,i);\r
- if(App_info->application_id == application_id){\r
- return App_info;\r
- } \r
- }\r
- return NULL;\r
-}\r
-\r
-\r
-\r
-/* Class Fonction */\r
-\r
-u32 Channel::Add_service_id(u32 service_id){\r
- if(service_id){\r
- service_ID = service_id;\r
- return GF_OK;\r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-\r
-u32 Channel::Add_channel_name(char* chan_name){\r
- if(chan_name != NULL){\r
- channel_name = gf_strdup(chan_name);\r
- return GF_OK;\r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-u32 Channel::Add_video_ID(u32 video_index){\r
- if(video_index){\r
- video_ID = video_index;\r
- return GF_OK;\r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-\r
-u32 Channel::Add_audio_ID(u32 audio_index){\r
- if(audio_index){\r
- u32 i;\r
- for(i = 0; i<MAX_audio_index;i++){\r
- if(audio_ID[i]==0){\r
- nb_chan_audio_stream++;\r
- GF_LOG(GF_LOG_DEBUG, GF_LOG_MODULE, ("Add audio ID[%d] %d to channel %d -- total of %d audio stream on this channel\n",i,audio_index,service_ID,nb_chan_audio_stream)); \r
- audio_ID[i] = audio_index;\r
- return GF_OK;\r
- }\r
- } \r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-\r
-u32 Channel::Add_ait_pid(u32 ait_pid){\r
- if(ait_pid){ \r
- AIT_PID = ait_pid;\r
- return GF_OK;\r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-\r
-u32 Channel::Add_pmt_pid(u32 pmt_pid){\r
- if(pmt_pid){ \r
- PMT_PID = pmt_pid;\r
- return GF_OK;\r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-\r
-u32 Channel::Add_App_info(GF_M2TS_CHANNEL_APPLICATION_INFO*chan_app){\r
- if(chan_app){ \r
- ChannelApp = chan_app;\r
- return GF_OK;\r
- }\r
- return GF_BAD_PARAM;\r
-}\r
-\r
-\r
-void Channel::Check_Info_Done(){\r
- processed = 1;\r
-}\r
-\r
-void Channel::Set_audio_index(u32 index){\r
- current_audio_index = index;\r
-}\r
-\r
-/* Incr_audio_index\r
- * \r
- * int mode : 1 ou 0\r
- * \r
- * Increment ou decrement the audio stream index\r
- */\r
-void Channel::Incr_audio_index(int mode){\r
- if(mode){\r
- current_audio_index--;\r
- }else{\r
- current_audio_index++;\r
- }\r
-}\r
- \r
-/* Global Functions */\r
-\r
-static Bool app_priority_test(GF_M2TS_AIT_APPLICATION* App_info,u8 app_priority,u8 isConnected,u8 MaxPriority){\r
-\r
- if(!(App_info->priority >= MaxPriority && (MaxPriority >0)) && \r
- ((app_priority < App_info->priority) || (app_priority == App_info->priority))\r
- && ((isConnected && App_info->broadband)||App_info->broadcast)){\r
- return 1;\r
- }\r
- \r
- return 0;\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Jonathan Sillan \r
- * \r
- */\r
-\r
-#include "hbbtvterminal.h"\r
-\r
-static u32 New_ait_received(HbbtvDemuxer* hbbtv_demuxer,GF_M2TS_AIT *ait, char *data, u32 data_size, u32 table_id);\r
-static u32 On_hbbtv_ait_section(sPlayerInterface* player_interf, GF_Event *event);\r
-static u32 On_hbbtv_dsmcc_section(sPlayerInterface* player_interf, GF_Event *event);\r
-static u32 On_hbbtv_get_tsdemuxer(sPlayerInterface* player_interf, GF_Event *event);\r
-\r
-\r
-\r
-/* Constructor */\r
-HbbtvDemuxer::HbbtvDemuxer(char *input_data, char* url, Bool dsmcc, Bool no_url,sPlayerInterface* player_interf)\r
-{\r
-\r
- Demuxts = NULL;\r
-\r
- Channels = gf_list_new();\r
- Input_data = gf_strdup(input_data); \r
- user = player_interf;\r
- player_interf->Demuxer = this;\r
- ait_to_process = 0;\r
- nb_prog_pmt_received = 0;\r
- all_prog_pmt_received =0;\r
- No_URL = 0;\r
- Ignore_TS_URL = 0; \r
- if(dsmcc){\r
- process_dsmcc = 1;\r
- }else{\r
- process_dsmcc = 0;\r
- }\r
-\r
- if(no_url){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] No URL \n"));\r
- No_URL = 1;\r
- }else if(url){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Forced URL %s \n",url));\r
- Force_URL = gf_strdup(url);\r
- Ignore_TS_URL = 1;\r
- }\r
- nb_ait = 0;\r
- ts_demux_mutex = gf_mx_new("HBBTV_TS_Demux_Mutex");\r
-\r
- ts_demux_thread = gf_th_new("HBBTV_TS_Demux_Thread");\r
- \r
-}\r
-\r
-/* Destructor */\r
-\r
-/* Getter */\r
-\r
-GF_M2TS_Demuxer* HbbtvDemuxer::Get_Ts()\r
-{\r
- return Demuxts;\r
-}\r
-\r
-GF_List* HbbtvDemuxer::Get_AIT_To_Process_list()\r
-{\r
- return Ait_To_Process;\r
-}\r
-\r
-char* HbbtvDemuxer::Get_Input_data()\r
-{\r
- return Input_data;\r
-}\r
-\r
-Bool HbbtvDemuxer::Get_if_dsmcc_process()\r
-{\r
- return process_dsmcc;\r
-}\r
-\r
-GF_Thread * HbbtvDemuxer::Get_Demux_Thread()\r
-{\r
- return ts_demux_thread;\r
-}\r
-\r
-GF_Mutex * HbbtvDemuxer::Get_Demux_Mutex()\r
-{\r
- return ts_demux_mutex;\r
-}\r
-\r
-GF_List * HbbtvDemuxer::Get_ChannelList(){\r
- return Channels;\r
-}\r
-\r
-\r
-Channel* HbbtvDemuxer::Get_Channel(u32 service_id){\r
- u32 nb_channel,i;\r
-\r
- nb_channel = gf_list_count(Channels);\r
-\r
- for(i=0;i<nb_channel;i++){\r
- Channel* Chan = (Channel*)gf_list_get(Channels,i);\r
- if(Chan->Get_service_id() == service_id){\r
- return Chan;\r
- }\r
- }\r
- return NULL;\r
-}\r
-\r
-void* HbbtvDemuxer::Get_User(){\r
-\r
- return user; \r
-}\r
-\r
-\r
-char* HbbtvDemuxer::Get_Force_URL(){\r
- return Force_URL;\r
-}\r
-\r
-Bool HbbtvDemuxer::Get_Ignore_TS_URL(){\r
- return Ignore_TS_URL;\r
-}\r
-\r
-Bool HbbtvDemuxer::Get_ait_to_proces(){\r
- return ait_to_process;\r
-}\r
-\r
-\r
-/* Setter */\r
-void HbbtvDemuxer::Set_Ts(GF_M2TS_Demuxer *on_ts){ \r
- Demuxts = on_ts;\r
-}\r
-\r
-void HbbtvDemuxer::Set_ait_to_process(Bool on){\r
- ait_to_process = on;\r
-}\r
-\r
-/* Class Fonction */\r
-GF_Err HbbtvDemuxer::Get_application_info(GF_M2TS_CHANNEL_APPLICATION_INFO*ChannelApp)\r
-{\r
- if(!Ignore_TS_URL && !No_URL){ \r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Get application for service %d \n",ChannelApp->service_id));\r
- return get_app_url((sPlayerInterface*)user,ChannelApp); \r
- }else{\r
- \r
- if(!No_URL){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Forced URL %s \n",Force_URL));\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] URL blocked by the user. No Application to play \n"));;\r
- }\r
- return GF_OK;\r
- \r
- }\r
-}\r
-\r
-Channel* HbbtvDemuxer::Zap_channel(u32 service_id,int zap){\r
- u32 count_list;\r
- u32 i ;\r
- \r
- count_list = gf_list_count(Channels);\r
-// GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] list: %d\n",count_list));\r
- for(i=0;i<count_list;i++){\r
- Channel* chan = ( Channel*)gf_list_get(Channels,i);\r
- if(chan->Get_service_id() == service_id){\r
- if(zap != 0){\r
- /* zap is use for changing channel. It could be +1 or -1 in order to take the next/previous service */\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] i: %d zap %d\n",i,zap));\r
- \r
- i= (i+zap+count_list)%count_list; /* loop on the channels */\r
- \r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] i: %d list %d\n",i,count_list));\r
- }\r
- Channel* chan = ( Channel*)gf_list_get(Channels,i); \r
- return chan;\r
- }\r
- }\r
- \r
- /* If the prog goes here that means Channels list is empty or \r
- no object from this current service_id has already been processed */\r
-// GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] add service_id: %d \n",service_id));\r
- Channel* chan = new Channel(service_id,NULL);\r
- gf_list_add(Channels,chan);\r
- return chan;\r
-}\r
-\r
-void HbbtvDemuxer::Channel_check(){\r
- u32 count_list;\r
- u32 i ;\r
- \r
- count_list = gf_list_count(Channels);\r
- for(i=0;i<count_list;i++){\r
- Channel* chan = ( Channel*)gf_list_get(Channels,i);\r
- chan->Check_Info_Done();\r
- }\r
- }\r
- \r
-\r
-int HbbtvDemuxer::Check_all_channel_info_received(int Timer){\r
- \r
- if(!Demuxts){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTV]No PAT received \n"));\r
- return 0;\r
- } \r
- /* Check if all the PMT have been processed or wait until 5 secondes to starts the program */\r
- if(all_prog_pmt_received || Timer == 5){ \r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] nb_prog_pmt_received %d\n",nb_prog_pmt_received)); \r
- return 1;\r
- }\r
- return 0;\r
-}\r
-\r
-void HbbtvDemuxer::Create_Channel(GF_M2TS_Program *prog){ \r
-\r
- Channel* chan = new Channel(prog->number,NULL);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal]Service number:%d\n",prog->number));\r
- chan->Add_pmt_pid(prog->pmt_pid);\r
- gf_list_add(Channels,chan);\r
- \r
-}\r
-\r
-void HbbtvDemuxer::Check_PMT_Processing(){ \r
- nb_prog_pmt_received++; \r
- GF_LOG(GF_LOG_DEBUG, GF_LOG_MODULE, ("Demuxts->programs %d\n",gf_list_count(Demuxts->programs))); \r
- if(nb_prog_pmt_received == gf_list_count(Demuxts->programs)){\r
- all_prog_pmt_received = 1;\r
- } \r
-}\r
-\r
-\r
-/* Global Functions */\r
-\r
-u32 DemuxThreadStart(HbbtvDemuxer *hbbtv_demuxer){\r
-\r
- return gf_th_run(hbbtv_demuxer->Get_Demux_Thread(),DemuxStart,(void*)hbbtv_demuxer);\r
-}\r
-\r
-u32 On_hbbtv_received_section(void *ptr, GF_Event *event){\r
- u32 e;\r
- \r
- e = GF_OK;\r
- HbbtvDemuxer* hbbtv_demuxer = (HbbtvDemuxer*)ptr;\r
- sPlayerInterface* player_interf = (sPlayerInterface*)hbbtv_demuxer->Get_User(); \r
- \r
-\r
- if (event->type == GF_EVENT_FORWARDED)\r
- {\r
- if(event->forwarded_event.service_event_type == GF_M2TS_EVT_PAT_FOUND && hbbtv_demuxer->Get_Ts() == NULL){\r
- e = On_hbbtv_get_tsdemuxer(player_interf,event); \r
- if(e != 0){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Error in receiving the TS Demuxer \n"));\r
-\r
- }\r
- }\r
- if(event->forwarded_event.service_event_type == GF_M2TS_EVT_AIT_FOUND){\r
- e = On_hbbtv_ait_section(player_interf,event);\r
- }\r
- if(event->forwarded_event.service_event_type == GF_M2TS_EVT_DSMCC_FOUND){\r
- e = On_hbbtv_dsmcc_section(player_interf,event);\r
- }\r
- if(event->forwarded_event.service_event_type == GF_M2TS_EVT_PMT_FOUND){ \r
- gf_mx_p(hbbtv_demuxer->Get_Demux_Mutex());\r
- GF_M2TS_Program * prog = (GF_M2TS_Program*)event->forwarded_event.param; \r
- GF_LOG(GF_LOG_DEBUG, GF_LOG_MODULE, ("PMT PID %d \n",prog->pmt_pid));\r
- hbbtv_demuxer->Create_Channel(prog); \r
- hbbtv_demuxer->Check_PMT_Processing();\r
- gf_mx_v(hbbtv_demuxer->Get_Demux_Mutex());\r
- } \r
- } \r
- return e;\r
-\r
- \r
-}\r
- \r
-static u32 On_hbbtv_ait_section(sPlayerInterface* player_interf, GF_Event *event) \r
-{\r
- HbbtvDemuxer* hbbtv_demuxer = (HbbtvDemuxer*)player_interf->Demuxer;\r
- GF_M2TS_AIT_CARRY* ait_carry;\r
- \r
- \r
- ait_carry = (GF_M2TS_AIT_CARRY*)event->forwarded_event.param; \r
- \r
- /* Make sure we are not modifying the AIT List at the same time */\r
- gf_mx_p(hbbtv_demuxer->Get_Demux_Mutex());\r
- if(player_interf->init){ \r
- Get_application_for_channel(hbbtv_demuxer,ait_carry->service_id); \r
- }\r
- \r
- /* Unlock the mutex */\r
- gf_mx_v(hbbtv_demuxer->Get_Demux_Mutex());\r
-\r
- return 0;\r
-}\r
-\r
-u32 Get_application_for_channel(HbbtvDemuxer* hbbtv_demuxer,u32 service_id){\r
- u32 nb_channel;\r
- Channel* Chan;\r
- GF_M2TS_CHANNEL_APPLICATION_INFO* ChanAppInfo;\r
- GF_Err e;\r
-\r
- Chan = hbbtv_demuxer->Get_Channel(service_id);\r
- if(!Chan){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] service ID %d is not available\n",service_id));\r
- return GF_BAD_PARAM;\r
- } \r
-\r
- ChanAppInfo = gf_m2ts_get_channel_application_info(hbbtv_demuxer->Get_Ts()->ChannelAppList,service_id); \r
- \r
- if(!ChanAppInfo){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] service ID %d no application available\n",service_id));\r
- return GF_BAD_PARAM;\r
- } \r
- \r
- Chan->Add_App_info(ChanAppInfo); \r
- e = hbbtv_demuxer->Get_application_info(ChanAppInfo);\r
- if(e == GF_OK){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Application found for the service ID %d is ON\n",ChanAppInfo->service_id));\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] This application for this service ID %d does not belong to the current one.\n\n",ChanAppInfo->service_id));\r
- }\r
- \r
- return GF_OK;\r
- \r
-} \r
-\r
-static u32 On_hbbtv_dsmcc_section(sPlayerInterface* player_interf, GF_Event *event) \r
-{\r
- HbbtvDemuxer* hbbtv_demuxer = (HbbtvDemuxer*)player_interf->Demuxer;\r
- GF_M2TS_Demuxer* ts = hbbtv_demuxer->Get_Ts(); \r
- GF_M2TS_DSMCC_OVERLORD* dsmcc_overlord;\r
-\r
- GF_M2TS_SL_PCK* pck = (GF_M2TS_SL_PCK*)event->forwarded_event.param;\r
- \r
- dsmcc_overlord = gf_m2ts_get_dmscc_overlord(ts->dsmcc_controler,pck->stream->service_id);\r
-\r
- if (dsmcc_overlord && dsmcc_overlord->get_index){\r
- GF_M2TS_AIT_APPLICATION* Application;\r
- Channel* Chan;\r
- Chan = (Channel*)hbbtv_demuxer->Get_Channel(dsmcc_overlord->service_id);\r
- //if(!Chan)\r
- Application = Chan->Get_App(dsmcc_overlord->application_id); \r
- Application->url_received = 1; \r
- put_app_url(player_interf);\r
- }\r
-\r
- return 0;\r
-}\r
-\r
-static u32 On_hbbtv_get_tsdemuxer(sPlayerInterface* player_interf, GF_Event *event) \r
-{\r
- HbbtvDemuxer* hbbtv_demuxer = (HbbtvDemuxer*)player_interf->Demuxer;\r
- GF_M2TS_Demuxer *ts = (GF_M2TS_Demuxer*)event->forwarded_event.param;\r
- hbbtv_demuxer->Set_Ts(ts); \r
- if(hbbtv_demuxer->Get_Ts() != NULL){\r
- if(hbbtv_demuxer->Get_if_dsmcc_process() && !ts->process_dmscc){ \r
- gf_m2ts_demux_dmscc_init(ts);\r
- }\r
- return GF_OK;\r
- }\r
- \r
- return GF_BAD_PARAM;\r
-}\r
-\r
-u32 DemuxStart(void *par){\r
-\r
- GF_Err e;\r
- HbbtvDemuxer* hbbtv_demuxer = (HbbtvDemuxer*) par;\r
- e = TSDemux_Demux_Setup(hbbtv_demuxer->Get_Ts(), hbbtv_demuxer->Get_Input_data(), 0);\r
- if(e)\r
- {\r
- GF_LOG(GF_LOG_DEBUG, GF_LOG_MODULE, ("[HBBTV] Error during TS demux \n"));\r
- }\r
- return e;\r
-\r
-}\r
-\r
-Channel* ZapChannel(HbbtvDemuxer *hbbtv_demuxer,u32 service_id,int zap){ \r
- return hbbtv_demuxer->Zap_channel(service_id,zap);\r
-}\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle - Jonathan Sillan \r
- * \r
- */\r
-#include "hbbtvterminal.h"\r
-\r
-\r
-\r
-void gtksendkey(sPlayerInterface* player_interf,int keycode);\r
-\r
-void gtksendkey(sPlayerInterface* player_interf,int keycode)\r
-{\r
- TRACEINFO;\r
- GdkEvent *KeyEvent;\r
- \r
- fprintf(stderr, "\x1b[%i;3%imKeyCode\x1b[0m: %d\n",1, 4,keycode);\r
- \r
- KeyEvent = gdk_event_new (GDK_KEY_PRESS);\r
- /* Key Value */\r
- KeyEvent->key.keyval = gdk_unicode_to_keyval(keycode); \r
- /* GDK_BUTTON1_MASK refers to left mouse button */\r
- KeyEvent->key.state = GDK_BUTTON1_MASK;\r
- /* Send the key event to Web Window */\r
- \r
- KeyEvent->key.window = player_interf->ui->pWebWindow->window;\r
- gtk_main_do_event (KeyEvent);\r
- //gdk_event_free(KeyEvent);\r
-}\r
-\r
-/* HBBTV Button */\r
-\r
-void on_redbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- fprintf(stderr, "\x1b[%i;3%imBOUTON PRESSED\n\x1b[0m", 1, 5);\r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- if (player_interf->keyregistered[RK_RED]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("RED is registered by the application : send HBBTV_VK_RED to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_RED);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("RED is not registered by the application\n"));\r
- }\r
- \r
-}\r
-\r
-void on_greenbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data;\r
- if (player_interf->keyregistered[RK_GREEN]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("GREEN is registered by the application : send HBBTV_VK_GREEN to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_GREEN); \r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("GREEN is not registered by the application\n"));\r
- }\r
-}\r
-\r
-void on_yellowbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data;\r
- if (player_interf->keyregistered[RK_YELLOW]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("YELLOW is registered by the application : send HBBTV_VK_YELLOW to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_YELLOW);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("YELLOW is not registered by the application\n"));\r
- } \r
-}\r
-\r
-void on_bluebuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data;\r
- if (player_interf->keyregistered[RK_BLUE]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("BLUE is registered by the application : send HBBTV_VK_BLUE to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_BLUE);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("BLUE is not registered by the application\n"));\r
- } \r
-}\r
-\r
-/* Navigation */\r
-\r
-void on_returnbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- if (player_interf->keyregistered[RK_NAVIGATION]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is registered by the application : send HBBTV_VK_ENTER to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_ENTER);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is not registered by the application\n"));\r
- } \r
-}\r
-\r
-void on_exitbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- int posx,posy;\r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- //~ gtk_window_set_transient_for(GTK_WINDOW(player_interf->ui->pWebWindow),GTK_WINDOW(player_interf->ui->pTVWindow));\r
- get_window_position(player_interf->ui->pWebWindow, &posx, &posy); \r
- resizevideoplayer(player_interf, HBBTV_VIDEO_WIDTH, HBBTV_VIDEO_HEIGHT); \r
- set_window_position(player_interf->ui->pTVWindow, posx, posy);\r
- gtk_window_set_position(GTK_WINDOW(player_interf->ui->pTVWindow),GTK_WIN_POS_CENTER_ALWAYS);\r
- webkit_web_view_load_uri(player_interf->ui->pWebView, player_interf->url);\r
-}\r
-\r
-void on_upbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- if (player_interf->keyregistered[RK_NAVIGATION]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is registered by the application : send HBBTV_VK_UP to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_UP);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is not registered by the application\n"));\r
- }\r
-}\r
-\r
-void on_downbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- if (player_interf->keyregistered[RK_NAVIGATION]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is registered by the application : send HBBTV_VK_DOWN to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_DOWN);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is not registered by the application\n"));\r
- } \r
-}\r
-\r
-void on_leftbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- if (player_interf->keyregistered[RK_NAVIGATION]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is registered by the application : send HBBTV_VK_LEFT to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_LEFT);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE,("NAVIGATION is not registered by the application\n"));\r
- }\r
-}\r
-\r
-void on_rightbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO; \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- if (player_interf->keyregistered[RK_NAVIGATION]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is registered by the application : send HBBTV_VK_RIGHT to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_RIGHT);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NAVIGATION is not registered by the application\n"));\r
- } \r
-}\r
-\r
-\r
-\r
-/* Control */\r
-\r
-void on_playpausebuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf = (sPlayerInterface*)data; \r
- set_window_position(player_interf->ui->pTVWindow, 0, 0);\r
-}\r
-\r
-void on_playbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf = (sPlayerInterface*)data;\r
- if (player_interf->keyregistered[RK_VCR]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("VCR is registered by the application : send HBBTV_VK_PLAY to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_PLAY);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("VCR is not registered by the application\n"));\r
- } \r
- \r
-}\r
-\r
-void on_pausebuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf = (sPlayerInterface*)data;\r
- if (player_interf->keyregistered[RK_VCR]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("VCR is registered by the application : send HBBTV_VK_PAUSE to the Application\n"));\r
- gtksendkey(player_interf,HBBTV_VK_PAUSE); \r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("VCR is not registered by the application\n"));\r
- } \r
-}\r
-\r
-void on_onoffbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf;\r
- player_interf = (sPlayerInterface*)data;\r
-\r
- if (player_interf->TVwake == FALSE) {\r
- init_gpac(player_interf);\r
- player_interf->TVwake = TRUE;\r
- }\r
- else {\r
- stop_gpac(player_interf);\r
- player_interf->TVwake = FALSE;\r
- }\r
- TRACEINFO;\r
-}\r
-\r
-void on_langbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf;\r
- u32 current_service_id;\r
- HbbtvDemuxer *hbbtvdemuxer;\r
- GF_MediaInfo odi;\r
- u32 index_audio,audio_ID; \r
- \r
- player_interf = (sPlayerInterface*)data;\r
- hbbtvdemuxer = ( HbbtvDemuxer *)player_interf->Demuxer;\r
- current_service_id = index_audio = audio_ID = 0; \r
- \r
- /* Get the current channel struct */\r
- current_service_id = gf_term_get_current_service_id(player_interf->m_term);\r
- Channel* chan = (Channel*)ZapChannel(hbbtvdemuxer,current_service_id,0); \r
- if(chan->Get_nb_chan_audio_stream() > 1){\r
- GF_ObjectManager *root_odm = gf_term_get_root_object(player_interf->m_term);\r
- if (root_odm){\r
- if (gf_term_get_object_info(player_interf->m_term, root_odm, &odi) == GF_OK){ \r
- if (odi.od) {\r
- /* Increment the audio index to get the next audio stream */\r
- chan->Incr_audio_index(0); \r
- gf_term_select_object(player_interf->m_term, gf_term_get_object(player_interf->m_term, root_odm, chan->Get_audio_ID(chan->Get_audio_index())));\r
- }\r
- }\r
- }\r
- }\r
-}\r
-\r
-void on_teletextbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf;\r
- player_interf = (sPlayerInterface*)data;\r
- gtksendkey(player_interf,HBBTV_VK_TELETEXT);\r
-\r
-}\r
-\r
-void on_channelbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf;\r
- GtkButton* button;\r
- int key_code;\r
- char* label;\r
- player_interf = (sPlayerInterface*)data;\r
- button = (GtkButton*) widget;\r
- label = (char*)gtk_button_get_label(button);\r
- \r
- switch(atoi(label)){\r
- case 0:\r
- key_code = HBBTV_VK_0;\r
- break;\r
- case 1:\r
- key_code = HBBTV_VK_1;\r
- break;\r
- case 2:\r
- key_code = HBBTV_VK_2;\r
- break;\r
- case 3:\r
- key_code = HBBTV_VK_3;\r
- break;\r
- case 4:\r
- key_code = HBBTV_VK_4;\r
- break;\r
- case 5:\r
- key_code = HBBTV_VK_5;\r
- break;\r
- case 6:\r
- key_code = HBBTV_VK_6;\r
- break;\r
- case 7:\r
- key_code = HBBTV_VK_7;\r
- break;\r
- case 8:\r
- key_code = HBBTV_VK_8;\r
- break;\r
- case 9:\r
- key_code = HBBTV_VK_9;\r
- break;\r
- default:\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("Wrong Key Code %d Defaut channel 1 \n",atoi(label)));\r
- key_code = HBBTV_VK_1;\r
- break;\r
- }\r
- if (player_interf->keyregistered[RK_NUMERIC]){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NUMERIC is registered by the application : send HBBTV_VK_%i to the Application\n",atoi(label)));\r
- gtksendkey(player_interf,key_code);\r
- }else{\r
- hbbtvterm_get_channel_on_air(player_interf,atoi(label),0);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("NUMERIC is not registered by the application, change channel function\n"));\r
- } \r
- \r
- \r
-}\r
-\r
-\r
-void on_chanupbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf;\r
- player_interf = (sPlayerInterface*)data;\r
-\r
- hbbtvterm_channel_zap(player_interf,1);\r
-\r
- TRACEINFO;\r
-}\r
-\r
-\r
-void on_chandownbuttonclicked(GtkWidget *widget, gpointer data)\r
-{\r
- TRACEINFO;\r
- sPlayerInterface* player_interf;\r
- player_interf = (sPlayerInterface*)data;\r
-\r
- hbbtvterm_channel_zap(player_interf,-1);\r
-\r
- TRACEINFO;\r
-}\r
-\r
-int playpause(sPlayerInterface* player_interf)\r
-{\r
- int is_pause = gf_term_get_option( player_interf->m_term, GF_OPT_PLAY_STATE);\r
- fprintf(stdout, "[Status: %s]\n", is_pause ? "Playing" : "Paused");\r
- gf_term_set_option( player_interf->m_term, GF_OPT_PLAY_STATE, is_pause ? GF_STATE_PLAYING : GF_STATE_PAUSED);\r
- return 1;\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Jonathan Sillan \r
- * \r
- */\r
-#include "hbbtvterminal.h"\r
-\r
-\r
-GF_Config* check_config_file(){\r
- Bool firstlaunch;\r
- \r
- firstlaunch = 0;\r
- /*init config and modules*/\r
- return gf_cfg_init(NULL,&firstlaunch);\r
-}\r
-\r
-Bool is_connected(){ \r
- GF_Err e;\r
- \r
- GF_Socket* sock; \r
- \r
- sock = gf_sk_new(GF_SOCK_TYPE_UDP);\r
- if (sock == NULL) { \r
- return 0;\r
- } \r
- e = gf_sk_connect(sock, "www.google.fr", 4096, NULL);\r
- gf_sk_del(sock); \r
- \r
- if(e){\r
- return 0;\r
- }else{\r
- return 1;\r
- }\r
-}\r
-\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle - Jonathan Sillan \r
- * \r
- */\r
-\r
-#include "hbbtvterminal.h"\r
-#ifdef XP_UNIX\r
-#include <gdk/gdkx.h>\r
-#include <X11/Xlib.h>\r
-#else\r
-#include <gdk/gdk.h>\r
-#include <gdk/gdkwin32.h> \r
-#endif\r
-\r
-#include <JavaScriptCore/JSStringRef.h>\r
-#include <JavaScriptCore/JSContextRef.h>\r
-\r
-//static XID handler;\r
-static void activate_uri_entry_cb (GtkWidget* entry, gpointer data);\r
-\r
-sPlayerInterface* player_interf;\r
-\r
-static gboolean on_deleteevent( GtkWidget *widget, GdkEvent *event, gpointer data)\r
-{\r
- g_print ("delete event occurred\n");\r
- TRACEINFO;\r
- return TRUE;\r
-}\r
-\r
-static gboolean on_windowconfigure(GtkWidget * widget, GdkEvent *event, gpointer data)\r
-{\r
- TRACEINFO;\r
-\r
- static int oldx = 0;\r
- static int oldy = 0;\r
- int x, y, olddatax, olddatay;\r
- \r
- sPlayerInterface* player_interf = (sPlayerInterface*)data;\r
-\r
- gtk_window_get_position(GTK_WINDOW(player_interf->ui->pWebWindow), &olddatax, &olddatay);\r
-\r
- x = event->configure.x;\r
- y = event->configure.y;\r
-\r
- int deltax = x - oldx;\r
- int deltay = y - oldy;\r
-\r
- gtk_window_move(GTK_WINDOW(player_interf->ui->pTVWindow),olddatax + deltax, olddatay + deltay);\r
- gtk_window_move(GTK_WINDOW(player_interf->ui->pBackgroundWindow),olddatax + deltax, olddatay + deltay);\r
-\r
- oldx = x;\r
- oldy = y;\r
- return TRUE;\r
-}\r
-\r
-\r
-static void on_destroyevent(GtkWidget *widget, gpointer data)\r
-{\r
- gtk_main_quit();\r
- TRACEINFO;\r
-}\r
-\r
-\r
-int ui_init(sPlayerInterface* player_interf)\r
-{\r
- GtkWidget *pWindow;\r
- GtkWidget *pTVWindow;\r
- GtkWidget *pWebWindow;\r
- GtkWidget *pMainPositionTable;\r
- GtkWidget *pBrowserPositionTable;\r
- GtkWidget *pRCUPositionTable;\r
- GtkWidget *pColorButtonTable;\r
- GtkWidget *pRedButton;\r
- GtkWidget *pGreenButton;\r
- GtkWidget *pYellowButton;\r
- GtkWidget *pBlueButton;\r
- GtkWidget *pArrowButtonTable;\r
- GtkWidget *pUpButton;\r
- GtkWidget *pDownButton;\r
- GtkWidget *pLeftButton;\r
- GtkWidget *pRightButton;\r
- GtkWidget *pUpArrow;\r
- GtkWidget *pDownArrow;\r
- GtkWidget *pLeftArrow;\r
- GtkWidget *pRightArrow;\r
- GtkWidget *pEnterButton;\r
- GtkWidget *pBackButton;\r
- GtkWidget *pEntry;\r
- GtkWidget *pNumPadTable;\r
- GtkWidget *pNumber[10];\r
- GtkWidget *pPlayButton;\r
- GtkWidget *pStopButton;\r
- GtkWidget *pPauseButton;\r
- GtkWidget *pPlayPauseButton;\r
- GtkWidget *pFastMoveTable;\r
- GtkWidget *pFastForwardButton;\r
- GtkWidget *pFastRewindButton;\r
- GtkWidget *pLangButton;\r
- GtkWidget *pExitButton;\r
- GtkWidget *pOnOffButton;\r
- GtkWidget *pTeletextButton;\r
- GtkWidget *pProgramSelectionTable;\r
- GtkWidget *pPreviousProgramButton;\r
- GtkWidget *pNextProgramButton;\r
- GtkWidget *pQuitButton;\r
- GtkWidget *pTestButton;\r
- GtkWidget *pTest2Button;\r
- GtkWidget *pGoButton;\r
- GtkWidget *pWebScrollWindow;\r
- GtkWidget *pBackgroundWindow;\r
-\r
- GdkColor color;\r
- int Error,posx,posy;\r
-\r
- TRACEINFO;\r
-\r
- sGraphicInterface* ui = player_interf->ui;\r
-\r
- /** Main window **/\r
- pBackgroundWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);\r
- pTVWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);\r
- pWebWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);\r
- pWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);\r
-\r
- ui->pMainWindow = pWindow;\r
- ui->pTVWindow = pTVWindow;\r
- ui->pWebWindow = pWebWindow;\r
- ui->pBackgroundWindow = pBackgroundWindow;\r
- \r
- gtk_window_set_title(GTK_WINDOW(pWindow), "RCU");\r
- gtk_window_set_title(GTK_WINDOW(pTVWindow), "TV");\r
- gtk_window_set_title(GTK_WINDOW(pWebWindow), "WEB");\r
- gtk_window_set_title(GTK_WINDOW(pBackgroundWindow), "BACK");\r
-\r
- gtk_window_set_decorated(GTK_WINDOW(pWebWindow), false);\r
- gtk_window_set_decorated(GTK_WINDOW(pTVWindow), false);\r
- gtk_window_set_decorated(GTK_WINDOW(pBackgroundWindow), false);\r
- gtk_window_set_transient_for(GTK_WINDOW(pTVWindow),GTK_WINDOW(pBackgroundWindow));\r
- gtk_window_set_transient_for(GTK_WINDOW(pWebWindow),GTK_WINDOW(pTVWindow));\r
- \r
- gtk_window_set_resizable(GTK_WINDOW(pTVWindow), false);\r
- gtk_window_set_resizable(GTK_WINDOW(pWebWindow), false);\r
- gtk_window_set_resizable(GTK_WINDOW(pBackgroundWindow), false);\r
- \r
- /** Quit button **/\r
- pQuitButton = gtk_button_new_with_label("Quit");\r
-\r
- /** Tests button **/\r
- pTestButton = gtk_button_new_with_label("Test");\r
- pTest2Button = gtk_button_new_with_label("Test2");\r
-\r
- /** Entry bar for URL **/\r
- pEntry = gtk_entry_new();\r
- ui->pEntry = pEntry;\r
-\r
- /** GO Button **/\r
- pGoButton = gtk_button_new_with_label("Go");\r
-\r
- /** Browser Zone **/\r
- pWebScrollWindow = gtk_scrolled_window_new(NULL, NULL);\r
- //gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(pWebScrollWindow), GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);\r
-\r
- ui->pWebView = WEBKIT_WEB_VIEW(webkit_web_view_new());\r
- \r
- webkit_web_view_set_transparent(ui->pWebView, TRUE);\r
-\r
- if (ui->pWebView)\r
- gtk_container_add(GTK_CONTAINER(pWebScrollWindow), GTK_WIDGET(ui->pWebView));\r
-\r
- /** Background Zone **/\r
- ui->pBackgroundView = gtk_drawing_area_new();\r
- gdk_color_parse("#000044", &color);\r
- gtk_widget_modify_bg ( GTK_WIDGET(ui->pBackgroundView), GTK_STATE_NORMAL, &color);\r
-\r
- /** TV zone **/\r
- ui->pTVView = gtk_drawing_area_new();\r
-\r
- /** RCU zone **/\r
-\r
- /* create Red color */\r
- gdk_color_parse("#FF0000", &color);\r
- pRedButton = gtk_button_new();\r
- gtk_widget_modify_bg ( GTK_WIDGET(pRedButton), GTK_STATE_NORMAL, &color);\r
- gtk_button_set_label(GTK_BUTTON(pRedButton)," ");\r
- /* create Green color */\r
- gdk_color_parse("#00FF00", &color);\r
- pGreenButton = gtk_button_new();\r
- gtk_widget_modify_bg ( GTK_WIDGET(pGreenButton), GTK_STATE_NORMAL, &color);\r
- gtk_button_set_label(GTK_BUTTON(pGreenButton)," ");\r
- /* create Yellow color */\r
- gdk_color_parse("#FFFF00", &color);\r
- pYellowButton = gtk_button_new();\r
- gtk_widget_modify_bg ( GTK_WIDGET(pYellowButton), GTK_STATE_NORMAL, &color);\r
- gtk_button_set_label(GTK_BUTTON(pYellowButton)," ");\r
- /* create Blue color */\r
- gdk_color_parse("#0000FF", &color);\r
- pBlueButton = gtk_button_new();\r
- gtk_widget_modify_bg ( GTK_WIDGET(pBlueButton), GTK_STATE_NORMAL, &color);\r
- gtk_button_set_label(GTK_BUTTON(pBlueButton)," ");\r
-\r
- pUpButton = gtk_button_new();\r
- pDownButton = gtk_button_new();\r
- pLeftButton = gtk_button_new();\r
- pRightButton = gtk_button_new();\r
-\r
- pUpArrow = gtk_arrow_new(GTK_ARROW_UP,GTK_SHADOW_OUT);\r
- pDownArrow = gtk_arrow_new(GTK_ARROW_DOWN,GTK_SHADOW_OUT);\r
- pLeftArrow = gtk_arrow_new(GTK_ARROW_LEFT,GTK_SHADOW_OUT);\r
- pRightArrow = gtk_arrow_new(GTK_ARROW_RIGHT,GTK_SHADOW_OUT);\r
-\r
- gtk_container_add(GTK_CONTAINER(pUpButton), pUpArrow);\r
- gtk_container_add(GTK_CONTAINER(pDownButton), pDownArrow);\r
- gtk_container_add(GTK_CONTAINER(pLeftButton), pLeftArrow);\r
- gtk_container_add(GTK_CONTAINER(pRightButton), pRightArrow);\r
-\r
- pEnterButton = gtk_button_new_with_label("Enter");\r
- pBackButton = gtk_button_new_with_label("Back");\r
-\r
- pNumber[0] = gtk_button_new_with_label("0");\r
- pNumber[1] = gtk_button_new_with_label("1");\r
- pNumber[2] = gtk_button_new_with_label("2");\r
- pNumber[3] = gtk_button_new_with_label("3");\r
- pNumber[4] = gtk_button_new_with_label("4");\r
- pNumber[5] = gtk_button_new_with_label("5");\r
- pNumber[6] = gtk_button_new_with_label("6");\r
- pNumber[7] = gtk_button_new_with_label("7");\r
- pNumber[8] = gtk_button_new_with_label("8");\r
- pNumber[9] = gtk_button_new_with_label("9");\r
-\r
- pPreviousProgramButton = gtk_button_new_with_label("P-");\r
- pNextProgramButton = gtk_button_new_with_label("P+");\r
-\r
- pPlayButton = gtk_button_new_with_label("Play");\r
- pStopButton = gtk_button_new_with_label("Stop");\r
- pPauseButton = gtk_button_new_with_label("Pause");\r
- pPlayPauseButton = gtk_button_new_with_label("PlayPause");\r
-\r
- pFastForwardButton = gtk_button_new_with_label(">>");\r
- pFastRewindButton = gtk_button_new_with_label("<<");\r
- pTeletextButton = gtk_button_new_with_label("Teletext");\r
- pLangButton = gtk_button_new_with_label("Language");\r
- pExitButton = gtk_button_new_with_label("Exit");\r
- pOnOffButton = gtk_button_new_with_label("OnOff");\r
-\r
- pColorButtonTable = gtk_table_new(4,1,false);\r
- gtk_table_attach(GTK_TABLE(pColorButtonTable),pRedButton, 0,1,0,1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
- gtk_table_attach(GTK_TABLE(pColorButtonTable),pGreenButton, 0,1,1,2, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
- gtk_table_attach(GTK_TABLE(pColorButtonTable),pYellowButton, 0,1,2,3, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
- gtk_table_attach(GTK_TABLE(pColorButtonTable),pBlueButton, 0,1,3,4, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
-\r
- pArrowButtonTable = gtk_table_new(3,3, false);\r
- gtk_table_attach(GTK_TABLE(pArrowButtonTable), pUpButton, 1,2,0,1,GtkAttachOptions(GTK_FILL|GTK_EXPAND), GtkAttachOptions(GTK_FILL|GTK_EXPAND), 0,0 );\r
- gtk_table_attach(GTK_TABLE(pArrowButtonTable), pDownButton, 1,2,2,3,GtkAttachOptions(GTK_FILL|GTK_EXPAND), GtkAttachOptions(GTK_FILL|GTK_EXPAND), 0,0 );\r
- gtk_table_attach(GTK_TABLE(pArrowButtonTable), pLeftButton, 0,1,1,2,GtkAttachOptions(GTK_FILL|GTK_EXPAND), GtkAttachOptions(GTK_FILL|GTK_EXPAND), 0,0 );\r
- gtk_table_attach(GTK_TABLE(pArrowButtonTable), pRightButton, 2,3,1,2,GtkAttachOptions(GTK_FILL|GTK_EXPAND), GtkAttachOptions(GTK_FILL|GTK_EXPAND), 0,0 );\r
-\r
- pNumPadTable = gtk_table_new(4,3,false);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[0], 1, 2, 3, 4, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[1], 0, 1, 0, 1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[2], 1, 2, 0, 1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[3], 2, 3, 0, 1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[4], 0, 1, 1, 2, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[5], 1, 2, 1, 2, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[6], 2, 3, 1, 2, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[7], 0, 1, 2, 3, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[8], 1, 2, 2, 3, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pNumPadTable), pNumber[9], 2, 3, 2, 3, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
-\r
- pFastMoveTable = gtk_table_new(1,2,false);\r
- gtk_table_attach(GTK_TABLE(pFastMoveTable), pFastRewindButton, 0,1,0,1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
- gtk_table_attach(GTK_TABLE(pFastMoveTable), pFastForwardButton, 1,2,0,1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
-\r
- pProgramSelectionTable = gtk_table_new(1,2, false);\r
- gtk_table_attach(GTK_TABLE(pProgramSelectionTable), pPreviousProgramButton, 0,1,0,1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
- gtk_table_attach(GTK_TABLE(pProgramSelectionTable), pNextProgramButton, 1,2,0,1, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL),0,0);\r
-\r
- /** create the toplevel tables **/\r
- pRCUPositionTable = gtk_table_new(24,1,false);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pColorButtonTable, 0, 1, 0, 4, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pArrowButtonTable, 0, 1, 4, 7, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pEnterButton, 0, 1, 7, 8, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pBackButton, 0, 1, 8, 9, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pNumPadTable, 0, 1, 9, 13, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pPlayButton, 0, 1, 13, 14, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pStopButton, 0, 1, 14, 15, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pPauseButton, 0, 1, 15, 16, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pPlayPauseButton, 0, 1, 16, 17, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pFastMoveTable, 0, 1, 17, 18, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pProgramSelectionTable, 0, 1, 18, 19, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pTeletextButton, 0, 1, 19, 20, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pLangButton, 0, 1, 20, 21, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pExitButton, 0, 1, 21, 22, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pOnOffButton, 0, 1, 22, 23, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
- gtk_table_attach(GTK_TABLE(pRCUPositionTable), pQuitButton, 0, 1, 23, 24, GtkAttachOptions(GTK_FILL|GTK_EXPAND),GtkAttachOptions(GTK_FILL|GTK_EXPAND),0,0);\r
-\r
- pBrowserPositionTable = gtk_table_new(3,3,false);\r
- //gtk_table_attach(GTK_TABLE(pBrowserPositionTable), pEntry, 0, 2, 0, 1, GtkAttachOptions(GTK_EXPAND | GTK_FILL), GTK_FILL, 0,0);\r
- //gtk_table_attach(GTK_TABLE(pBrowserPositionTable), pGoButton, 2, 3, 0, 1, GtkAttachOptions(GTK_EXPAND | GTK_FILL), GTK_FILL, 0,0);\r
- gtk_table_attach(GTK_TABLE(pBrowserPositionTable), pWebScrollWindow, 0, 3, 1, 3, GtkAttachOptions(GTK_EXPAND | GTK_FILL), GtkAttachOptions(GTK_EXPAND | GTK_FILL), 0,0);\r
-\r
- /** Group toplevel tables in the main table **/\r
- pMainPositionTable = gtk_table_new(4,7,false);\r
- gtk_table_attach(GTK_TABLE(pMainPositionTable), pRCUPositionTable, 6, 7, 0, 3, GtkAttachOptions(NULL), GtkAttachOptions(NULL), 0,0);\r
- //gtk_table_attach(GTK_TABLE(pMainPositionTable), pBottomBarTable, 0, 7, 3, 4, GtkAttachOptions(GTK_EXPAND | GTK_FILL), GtkAttachOptions(GTK_EXPAND | GTK_FILL), 0,0);\r
-\r
- gtk_container_add(GTK_CONTAINER(pWindow), pMainPositionTable);\r
- gtk_container_add(GTK_CONTAINER(pTVWindow), ui->pTVView);\r
- gtk_container_add(GTK_CONTAINER(pBackgroundWindow), ui->pBackgroundView);\r
- //~ gtk_container_add(GTK_CONTAINER(pWebWindow), ui->pWebView);\r
- gtk_container_add(GTK_CONTAINER(pWebWindow), pBrowserPositionTable);\r
-\r
- /** SET SIZE **/\r
- gtk_widget_set_size_request(GTK_WIDGET(ui->pTVView), HBBTV_VIDEO_WIDTH,HBBTV_VIDEO_HEIGHT);\r
- gtk_widget_set_size_request(GTK_WIDGET(ui->pBackgroundView), HBBTV_VIDEO_WIDTH,HBBTV_VIDEO_HEIGHT);\r
- gtk_widget_set_size_request(GTK_WIDGET(pBrowserPositionTable), HBBTV_VIDEO_WIDTH,HBBTV_VIDEO_HEIGHT);\r
- \r
- gtk_window_set_position(GTK_WINDOW(pWebWindow), GTK_WIN_POS_CENTER_ALWAYS); \r
- gtk_window_set_position(GTK_WINDOW(pBackgroundWindow), GTK_WIN_POS_CENTER_ALWAYS);\r
- gtk_window_set_position(GTK_WINDOW(pTVWindow), GTK_WIN_POS_CENTER_ALWAYS);\r
-\r
- /** Connect Callback **/\r
- //** expose drawable\r
-\r
- // connect to deleteevent function\r
- g_signal_connect(G_OBJECT(pWindow), "destroy", G_CALLBACK(on_deleteevent), NULL);\r
-\r
- // connect to destroy function\r
- g_signal_connect(G_OBJECT(pWindow), "destroy", G_CALLBACK(on_destroyevent), NULL);\r
- g_signal_connect(G_OBJECT(pWebWindow), "destroy", G_CALLBACK(on_destroyevent), NULL);\r
- g_signal_connect(G_OBJECT(pQuitButton), "clicked", G_CALLBACK(on_destroyevent), NULL);\r
-\r
- //connect button and entry\r
- /* Control */\r
- g_signal_connect (G_OBJECT(pEntry), "activate", G_CALLBACK (activate_uri_entry_cb), ui);\r
- g_signal_connect (G_OBJECT(pGoButton), "clicked", G_CALLBACK (activate_uri_entry_cb), ui);\r
- g_signal_connect (G_OBJECT(pOnOffButton), "clicked", G_CALLBACK (on_onoffbuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pPlayPauseButton), "clicked", G_CALLBACK (on_playpausebuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pPlayButton), "clicked", G_CALLBACK (on_playbuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pPauseButton), "clicked", G_CALLBACK (on_pausebuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pLangButton), "clicked", G_CALLBACK (on_langbuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pNextProgramButton), "clicked", G_CALLBACK (on_chanupbuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pPreviousProgramButton), "clicked", G_CALLBACK (on_chandownbuttonclicked), player_interf );\r
- g_signal_connect (G_OBJECT(pNumber[1]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[2]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[3]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[4]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[5]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[6]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[7]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[8]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[9]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pNumber[0]), "clicked", G_CALLBACK (on_channelbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pTeletextButton), "clicked", G_CALLBACK (on_teletextbuttonclicked), player_interf);\r
- \r
- \r
- /* HBBTV Button */\r
- g_signal_connect (G_OBJECT(pRedButton), "clicked", G_CALLBACK (on_redbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pGreenButton), "clicked", G_CALLBACK (on_greenbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pYellowButton), "clicked", G_CALLBACK (on_yellowbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pBlueButton), "clicked", G_CALLBACK (on_bluebuttonclicked), player_interf);\r
- \r
- /* Navigation */\r
- g_signal_connect (G_OBJECT(pUpButton), "clicked", G_CALLBACK (on_upbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pDownButton), "clicked", G_CALLBACK (on_downbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pLeftButton), "clicked", G_CALLBACK (on_leftbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pRightButton), "clicked", G_CALLBACK (on_rightbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pEnterButton), "clicked", G_CALLBACK (on_returnbuttonclicked), player_interf);\r
- g_signal_connect (G_OBJECT(pExitButton), "clicked", G_CALLBACK (on_exitbuttonclicked), player_interf);\r
- \r
-\r
- // gtk_widget_add_events(GTK_WIDGET(pWebWindow), GDK_CONFIGURE);\r
- // g_signal_connect(G_OBJECT(pTVWindow), "configure-event", G_CALLBACK(on_windowconfigure), pBackgroundWindow);\r
- // g_signal_connect(G_OBJECT(pWebWindow), "configure-event", G_CALLBACK(on_windowconfigure), player_interf);\r
-\r
- /** realisation, map and show **/\r
- gtk_widget_realize(ui->pBackgroundView);\r
- gtk_widget_realize(ui->pTVView);\r
-\r
- Error = init_gpac(player_interf);\r
- if(Error){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Error during gpac intialization \n"));\r
- return GF_IO_ERR;\r
- }\r
-\r
- GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(ui->pWebView));\r
- GdkColormap *rgba = gdk_screen_get_rgba_colormap (screen);\r
-\r
- gtk_widget_set_colormap(GTK_WIDGET(ui->pWebView), rgba);\r
- gtk_widget_set_colormap(GTK_WIDGET(pBrowserPositionTable), rgba);\r
-\r
- /** center the windows **/\r
- \r
- gtk_widget_set_default_colormap(rgba);\r
- gtk_widget_show_all(pWindow);\r
- gtk_widget_show_all(pBackgroundWindow);\r
- gtk_widget_show_all(pTVWindow);\r
- gtk_widget_show_all(pWebWindow);\r
- gtk_window_present (GTK_WINDOW(pWebWindow));\r
-\r
- return GF_OK;\r
-}\r
-\r
-\r
-int init_playerinterface(sPlayerInterface* player_interf, char* input_data, char* url, Bool no_url)\r
-{\r
-\r
- HbbtvDemuxer *hbbtv_demuxer;\r
- int Error;\r
- int ChannelScanTimer;\r
- u32 i,nb_chan;\r
-\r
- hbbtv_demuxer = ( HbbtvDemuxer *)player_interf->Demuxer;\r
- ChannelScanTimer = 0;\r
-\r
- player_interf->ui = (sGraphicInterface*) gf_calloc(1,sizeof(sGraphicInterface));\r
-\r
- \r
- player_interf->input_data = (char*)gf_calloc(strlen(input_data)+1,sizeof(char));\r
- sprintf(player_interf->input_data,"%s",input_data);\r
- player_interf->input_data[strlen(input_data)] = 0;\r
-\r
- player_interf->url = url;\r
- player_interf->no_url = no_url;\r
- player_interf->TVwake = FALSE;\r
- player_interf->is_connected = is_connected();\r
- GF_LOG(GF_LOG_DEBUG, GF_LOG_MODULE, ("player_interf->is_connected %d\n",player_interf->is_connected));\r
-\r
-\r
- Error = ui_init(player_interf);\r
- if(Error){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Initialization error \n"));\r
- return GF_IO_ERR;\r
- }\r
-\r
- if(player_interf->url) {\r
- init_browser(player_interf);\r
- }\r
-\r
- while(!hbbtv_demuxer->Check_all_channel_info_received(ChannelScanTimer)) {\r
- ChannelScanTimer++;\r
- gf_sleep(1000);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Wainting for the PMTs \n")); \r
- }\r
- \r
- hbbtvterm_scan_channel(player_interf);\r
-\r
- /* The check for init is made inside this function. AIT received have to be processed before getting new ones */\r
- \r
- nb_chan = gf_list_count(hbbtv_demuxer->Get_ChannelList());\r
-\r
- for(i=0;i<nb_chan;i++){ \r
- Channel* chan = ( Channel*)gf_list_get(hbbtv_demuxer->Get_ChannelList(),i); \r
- Get_application_for_channel(hbbtv_demuxer,chan->Get_service_id()); \r
- }\r
- player_interf->init = 1; \r
- \r
- put_app_url(player_interf); \r
- \r
- \r
-\r
- return GF_OK;\r
-\r
-}\r
-\r
-\r
-int init_gpac(sPlayerInterface* player_interf)\r
-{\r
- TRACEINFO; \r
- char config_path[GF_MAX_PATH];\r
- const char *str;\r
- const char *gpac_cfg;\r
- sGraphicInterface *ui = player_interf->ui;\r
- \r
-\r
-#ifdef XP_UNIX\r
- gpac_cfg = (char *) ".gpacrc";\r
- strcpy((char *) config_path, getenv("HOME"));\r
-#else\r
- gpac_cfg = "GPAC.cfg";\r
- strcpy((char*)config_path,"D:\\code\\trunk\\gpac_public\\bin\\win32\\debug");\r
-#endif\r
-\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Configuration path : %s/%s \n",config_path,gpac_cfg));\r
-\r
- player_interf->m_user = (GF_User*)gf_malloc(sizeof(GF_User));\r
- memset(player_interf->m_user, 0, sizeof(GF_User));\r
- //~ player_interf->m_user->config = gf_cfg_new((const char *) config_path, gpac_cfg);\r
- \r
- /*init config and modules*/\r
- player_interf->m_user->config = check_config_file();\r
- if(!player_interf->m_user->config){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Configuration failed. COnfiguration file not found \n"));\r
- return GF_BAD_PARAM;\r
- }\r
-\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Configuration initialized \n"));\r
-\r
- str = gf_cfg_get_key( player_interf->m_user->config, "General", "ModulesDirectory");\r
- player_interf->m_user->modules = gf_modules_new(str, player_interf->m_user->config);\r
-\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] %d modules loaded \n",gf_modules_get_count( player_interf->m_user->modules)));\r
-\r
- player_interf->m_user->opaque = player_interf->Demuxer;\r
- player_interf->m_user->EventProc = On_hbbtv_received_section;\r
-\r
-#ifdef XP_UNIX\r
- player_interf->m_user->os_window_handler = (void*)GDK_WINDOW_XID(gtk_widget_get_window(ui->pTVView));\r
- player_interf->m_user->os_display = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(ui->pTVView));\r
- XSynchronize((Display *) player_interf->m_user->os_display, True);\r
-#else\r
- player_interf->m_user->os_window_handler = (void*)GDK_WINDOW_HWND(gtk_widget_get_window(ui->pTVView));\r
- player_interf->m_user->os_display = gdk_drawable_get_display (gtk_widget_get_window(ui->pTVView));\r
- gdk_display_sync((GdkDisplay *)player_interf->m_user->os_display);\r
-#endif\r
-\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] User initialized \n"));\r
-\r
- if (( player_interf->m_term = gf_term_new(player_interf->m_user))) {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Terminal created.\n"));\r
- }\r
- else {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Error when creating terminal\n"));\r
- return GF_IO_ERR;\r
- }\r
-\r
- gf_term_set_size( player_interf->m_term, HBBTV_VIDEO_WIDTH,HBBTV_VIDEO_HEIGHT);\r
-\r
-\r
- if (strnicmp(player_interf->input_data, "udp://", 6)\r
- && strnicmp(player_interf->input_data, "mpegts-udp://", 13)\r
- && strnicmp(player_interf->input_data, "mpegts-tcp://", 13)\r
- && strnicmp(player_interf->input_data, "dvb://", 6)\r
- && strnicmp(player_interf->input_data, "http://", 6)) {\r
-\r
- FILE *test = fopen(player_interf->input_data, "rb");\r
- if (!test) {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] %s file cannot be oppened \n",player_interf->input_data));\r
- return GF_BAD_PARAM;\r
- }\r
- else {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] %s file oppened successfully \n", player_interf->input_data));\r
- fclose(test);\r
- }\r
-\r
- }\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Input URL : %s\n", player_interf->input_data));\r
- gf_term_connect( player_interf->m_term, (const char*)player_interf->input_data );\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Terminal connected\n"));\r
- \r
- return GF_OK;\r
-}\r
-\r
-\r
-int stop_gpac(sPlayerInterface* player_interf)\r
-{\r
- TRACEINFO;\r
- gf_term_disconnect( player_interf->m_term);\r
- gf_term_del( player_interf->m_term);\r
- gf_modules_del( player_interf->m_user->modules);\r
- gf_cfg_del( player_interf->m_user->config);\r
-\r
- return TRUE;\r
-}\r
-\r
-\r
-static void activate_uri_entry_cb (GtkWidget* entry, gpointer data)\r
-{\r
- TRACEINFO;\r
- sGraphicInterface *pUI;\r
-\r
- pUI = (sGraphicInterface*)data;\r
- const gchar* uri = gtk_entry_get_text (GTK_ENTRY(pUI->pEntry));\r
- g_assert (uri);\r
- webkit_web_view_load_uri (pUI->pWebView, uri);\r
-}\r
-\r
-int term_play(sPlayerInterface* player_interf)\r
-{\r
- gf_term_set_option(player_interf->m_term, GF_OPT_PLAY_STATE, GF_STATE_PLAYING);\r
- return 1;\r
-}\r
-\r
-\r
-int term_pause(sPlayerInterface* player_interf)\r
-{\r
- gf_term_set_option(player_interf->m_term, GF_OPT_PLAY_STATE, GF_STATE_PAUSED);\r
- return 1;\r
-}\r
-\r
-\r
-int init_browser(sPlayerInterface* player_interf)\r
-{\r
- if(!player_interf->no_url) {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Initialized the browser with HBBTV Application URL : %s \n",player_interf->url));\r
- webkit_web_view_load_uri(player_interf->ui->pWebView, player_interf->url);\r
- return GF_OK;\r
- }\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] URL blocked by the user. No Application to play \n"));\r
- return GF_OK;\r
-}\r
-\r
-\r
-int init_player(sPlayerInterface* player_interf)\r
-{\r
- /* Init the player with the fisrt channel of the stream */\r
-\r
- HbbtvDemuxer* hbbtvdemuxer = (HbbtvDemuxer*)player_interf->Demuxer;\r
- Channel* chan = (Channel*)gf_list_get(hbbtvdemuxer->Get_ChannelList(),0);\r
- hbbtvterm_get_channel_on_air(player_interf,chan->Get_service_id(),0);\r
-\r
- return GF_OK;\r
-}\r
-\r
-GF_Err get_app_url(sPlayerInterface* player_interf, GF_M2TS_CHANNEL_APPLICATION_INFO*ChannelApp)\r
-{\r
- u32 current_service_id; \r
-\r
- current_service_id = player_interf->m_term->root_scene->selected_service_id;\r
- \r
- if(!ChannelApp){\r
- return GF_IO_ERR;\r
- }\r
- \r
- if((ChannelApp->service_id == current_service_id)) {\r
- GF_M2TS_AIT_APPLICATION* app_info;\r
- Channel* Chan; \r
- \r
- HbbtvDemuxer* hbbtvdemuxer = (HbbtvDemuxer*)player_interf->Demuxer;\r
- Chan = (Channel*)ZapChannel(hbbtvdemuxer,current_service_id,0);\r
- \r
- app_info = Chan->App_to_play(player_interf->is_connected,0); \r
-\r
- if(!app_info){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] This service id %d does not have an autostart application. \n",ChannelApp->service_id,current_service_id));\r
- return GF_IO_ERR;\r
- } \r
- \r
- if(player_interf->init){\r
- if(app_info->broadband){\r
- player_interf->url = app_info->http_url;\r
- }else if(app_info->broadcast){\r
- player_interf->url = app_info->carousel_url;\r
- } \r
- webkit_web_view_load_uri(player_interf->ui->pWebView, player_interf->url); \r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] HBBTV Application URL : %s \n",player_interf->url)); \r
- return GF_OK;\r
- }\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Cannot start the application until player initialization is finished \n"));\r
- return GF_IO_ERR;\r
- } \r
- GF_LOG(GF_LOG_DEBUG, GF_LOG_MODULE, ("ChannelApp->service_id %d is wrong current_service_id %d !!\n",ChannelApp->service_id,current_service_id));\r
- return GF_IO_ERR;\r
-\r
-\r
-}\r
-\r
-int put_app_url(sPlayerInterface* player_interf)\r
-{\r
- u32 current_service_id;\r
- Bool ignore_TS_url;\r
- GF_Err e;\r
- HbbtvDemuxer* hbbtvdemux = (HbbtvDemuxer*)player_interf->Demuxer;\r
-\r
- ignore_TS_url = hbbtvdemux->Get_Ignore_TS_URL();\r
- e = GF_OK;\r
- \r
- if(!ignore_TS_url && !player_interf->no_url){\r
- \r
- current_service_id = player_interf->m_term->root_scene->selected_service_id;\r
- Channel* chan = (Channel*)ZapChannel(hbbtvdemux,current_service_id,0); \r
- e = get_app_url(player_interf,chan->Get_App_info());\r
- if(e == GF_OK) {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Application started\n"));\r
- return GF_OK;\r
- } \r
- player_interf->url = "";\r
- webkit_web_view_load_uri(player_interf->ui->pWebView, player_interf->url);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal]No Application found for this service ID %d \n",current_service_id));\r
- return GF_IO_ERR;\r
-\r
- }else{\r
-\r
- if(!player_interf->no_url){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Forced URL %s Reaload Application \n",player_interf->url)); \r
- webkit_web_view_load_uri(player_interf->ui->pWebView, player_interf->url);\r
- }else{\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] URL blocked by the user. \n")); \r
- }\r
- return GF_OK;\r
- }\r
-}\r
-\r
-\r
-int hbbtvterm_scan_channel(sPlayerInterface* player_interf)\r
-{\r
-\r
- GF_MediaInfo odi;\r
- u32 i, count;\r
- \r
- HbbtvDemuxer* HbbtvDemux = (HbbtvDemuxer*)player_interf->Demuxer;\r
-\r
- GF_ObjectManager *root_odm = gf_term_get_root_object(player_interf->m_term);\r
- if (!root_odm){ \r
- return GF_IO_ERR;\r
- }\r
-\r
- if (gf_term_get_object_info(player_interf->m_term, root_odm, &odi) != GF_OK) return GF_IO_ERR;\r
- if (!odi.od) { \r
- return GF_IO_ERR;\r
- }\r
- count = gf_term_get_object_count(player_interf->m_term, root_odm); \r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Count: %d \n",count));\r
-\r
- for (i=0; i<count; i++) { \r
- GF_ObjectManager *odm;\r
- odm = gf_term_get_object(player_interf->m_term, root_odm, i);\r
- if (!odm) break;\r
- if (gf_term_get_object_info(player_interf->m_term, odm, &odi) == GF_OK) {\r
- u32 service_id = odi.od->ServiceID;\r
- Channel* chan = (Channel*)ZapChannel(HbbtvDemux,service_id,0);\r
- \r
- if (odi.od_type==GF_STREAM_VISUAL && !chan->Get_processed()) { \r
- chan->Add_video_ID(i);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Service: %d chan->video_index : %d \n",service_id,chan->Get_video_ID()));\r
- }else if(odi.od_type==GF_STREAM_AUDIO && !chan->Get_processed()) { \r
- chan->Add_audio_ID(i);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal]Service:%d chan->current_audio_index : %d \n",service_id,chan->Get_audio_ID(0)));;\r
- }\r
- \r
- }\r
- }\r
- HbbtvDemux->Channel_check();\r
-\r
- return GF_OK;\r
-\r
-}\r
-\r
-\r
-int hbbtvterm_channel_zap(sPlayerInterface* player_interf,int up_down)\r
-{\r
-\r
- u32 current_service_id;\r
-\r
- current_service_id = gf_term_get_current_service_id(player_interf->m_term);\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Current_service_id : %d \n",current_service_id));\r
- hbbtvterm_get_channel_on_air(player_interf,current_service_id,up_down);\r
-\r
- return GF_OK;\r
-\r
-}\r
-\r
-\r
-int hbbtvterm_get_channel_on_air(sPlayerInterface* player_interf, u32 service_id, int zap)\r
-{\r
-\r
- GF_MediaInfo odi;\r
-\r
- HbbtvDemuxer* hbbtvdemuxer = (HbbtvDemuxer*)player_interf->Demuxer;\r
- Channel* chan = (Channel*)ZapChannel(hbbtvdemuxer,service_id,zap);\r
- GF_ObjectManager *root_odm = gf_term_get_root_object(player_interf->m_term);\r
- if (!root_odm) return GF_IO_ERR;\r
-\r
- if (gf_term_get_object_info(player_interf->m_term, root_odm, &odi) != GF_OK) return GF_IO_ERR;\r
- if (!odi.od) {\r
- return GF_IO_ERR;\r
- }\r
-\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal]service_id:%d video pid : %d audio pid:%d\n",chan->Get_service_id(),chan->Get_video_ID(),chan->Get_audio_ID(0)));\r
- \r
- gf_term_select_object(player_interf->m_term, gf_term_get_object(player_interf->m_term, root_odm, chan->Get_video_ID()));\r
- gf_term_select_object(player_interf->m_term, gf_term_get_object(player_interf->m_term, root_odm, chan->Get_audio_ID(0))); \r
- \r
- put_app_url(player_interf);\r
-\r
- return GF_OK;\r
-\r
-}\r
-\r
-/** On Windows Functions **/\r
-\r
-void resizevideoplayer(sPlayerInterface* player_interf, int width, int height)\r
-{\r
- TRACEINFO;\r
- gf_term_set_size(player_interf->m_term,width,height);\r
- gtk_widget_set_size_request(GTK_WIDGET(player_interf->ui->pTVWindow),width,height);\r
-\r
-}\r
-\r
-void get_window_position(GtkWidget* Widget, int* x, int* y)\r
-{\r
- //TRACEINFO;\r
- gtk_window_get_position(GTK_WINDOW(Widget), &(*x), &(*y));\r
-}\r
-\r
-void set_window_position(GtkWidget* Widget, int x, int y)\r
-{\r
- //~ //TRACEINFO;\r
- gtk_window_move(GTK_WINDOW(Widget), x, y);\r
-}\r
-\r
-\r
-void OnAPPLICATION_Show()\r
-{\r
- TRACEINFO;\r
- gtk_window_set_opacity(GTK_WINDOW(player_interf->ui->pWebWindow),1);\r
-}\r
-\r
-void OnAPPLICATION_Hide()\r
-{\r
- TRACEINFO;\r
- gtk_window_set_opacity(GTK_WINDOW(player_interf->ui->pWebWindow),0);\r
-}\r
-\r
-\r
-void OnVIBRC_SetChannel(int channel_number){\r
- //~ hbbtvterm_get_channel_on_air(player_interf, service_id, 0);\r
-}\r
-\r
-void OnKEYSET_SetValue(double param)\r
-{\r
- TRACEINFO;\r
- fprintf(stderr, "\t param transmitted : %i\n", (int)param);\r
- \r
- int KEYMASK_RED = 0x1;\r
- int KEYMASK_GREEN = 0x2;\r
- int KEYMASK_YELLOW = 0x4;\r
- int KEYMASK_BLUE = 0x8;\r
- int KEYMASK_NAVIGATION = 0x10;\r
- int KEYMASK_VCR = 0x20;\r
- int KEYMASK_SCROLL = 0x40;\r
- int KEYMASK_INFO = 0x80;\r
- int KEYMASK_NUMERIC = 0x100;\r
- int KEYMASK_ALPHA = 0x200;\r
- int KEYMASK_OTHER = 0x400;\r
- \r
- player_interf->keyregistered[RK_RED] = (((int)param & KEYMASK_RED)) ? true : false;\r
- player_interf->keyregistered[RK_GREEN] = (((int)param & KEYMASK_GREEN)) ? true : false;\r
- player_interf->keyregistered[RK_YELLOW] = (((int)param & KEYMASK_YELLOW)) ? true : false;\r
- player_interf->keyregistered[RK_BLUE] = (((int)param & KEYMASK_BLUE)) ? true : false;\r
- player_interf->keyregistered[RK_NAVIGATION] = (((int)param & KEYMASK_NAVIGATION)) ? true : false;\r
- player_interf->keyregistered[RK_VCR] = (((int)param & KEYMASK_VCR)) ? true : false;\r
- player_interf->keyregistered[RK_SCROLL] = (((int)param & KEYMASK_SCROLL)) ? true : false;\r
- player_interf->keyregistered[RK_INFO] = (((int)param & KEYMASK_INFO)) ? true : false;\r
- player_interf->keyregistered[RK_NUMERIC] = (((int)param & KEYMASK_NUMERIC)) ? true : false;\r
- player_interf->keyregistered[RK_ALPHA] = (((int)param & KEYMASK_ALPHA)) ? true : false;\r
- player_interf->keyregistered[RK_OTHER] = (((int)param & KEYMASK_OTHER)) ? true : false; \r
-}\r
-\r
-void OnNoFullscreenSetWindow(int x, int y, int width, int height)\r
-{\r
- TRACEINFO;\r
- OnVIDBRC_SetFullScreen(false);\r
-}\r
-void OnVIDBRC_SetFullScreen(int fullscreenparam)\r
-{\r
- TRACEINFO;\r
- fprintf(stderr,"SET FULLSCREEN OnVIDBRC_SetFullScreen Param : %d\n",fullscreenparam);\r
- \r
- ///Getting the videobroadcast element.\r
- WebKitDOMDocument *pDOMdoc = webkit_web_view_get_dom_document(player_interf->ui->pWebView);\r
- WebKitDOMNodeList *objectslist = webkit_dom_document_get_elements_by_tag_name(pDOMdoc,"object");\r
- gulong l = webkit_dom_node_list_get_length(objectslist);\r
- gulong i = 0;\r
- bool videofound = false;\r
- WebKitDOMNode* videonode;\r
- char *videonodetype; \r
- while ((i < l) && !videofound)\r
- {\r
- videonode = webkit_dom_node_list_item(objectslist,i);\r
- videonodetype = webkit_dom_element_get_attribute(WEBKIT_DOM_ELEMENT(videonode),"type");\r
- if (!(strcmp(videonodetype, "video/broadcast")))\r
- videofound = true;\r
- else\r
- i++;\r
- }\r
- \r
- if (!videofound)\r
- {\r
- fprintf(stderr,"object video broadcast not found \n");\r
- return;\r
- }\r
- else\r
- { \r
- fprintf(stderr,"object video broadcast found \n");\r
- WebKitDOMElement* videoelt = WEBKIT_DOM_ELEMENT(videonode);\r
- \r
- ///Getting the position of the WebView\r
- gint posx, posy;\r
- get_window_position(player_interf->ui->pWebWindow, &posx, &posy);\r
- fprintf(stderr,"WebWindow Left : %d , WebWindow Top : %d \n", posx, posy);\r
-\r
- ///Getting the videobroadcast geometry\r
- glong left, top;\r
- glong eltwidth, eltheight ;\r
- ///Setting the new size and position of the TVWindow broadcast\r
- int newx;\r
- int newy;\r
-\r
- if (fullscreenparam){\r
- left = 0;\r
- top = 0;\r
- eltwidth = HBBTV_VIDEO_WIDTH;\r
- eltheight = HBBTV_VIDEO_HEIGHT;\r
- get_window_position(player_interf->ui->pWebWindow, &newx, &newy); \r
- }else{\r
- gtk_window_set_position(GTK_WINDOW(player_interf->ui->pTVWindow), GTK_WIN_POS_NONE);\r
- ///Getting the top and left values of the video/broadcast element .\r
- left = webkit_dom_element_get_offset_left(videoelt);\r
- top = webkit_dom_element_get_offset_top(videoelt);\r
- ///Getting the width and height values of the video/broadcast element .\r
- eltwidth = webkit_dom_element_get_offset_width(videoelt);\r
- eltheight = webkit_dom_element_get_offset_height(videoelt);\r
- newx = posx + left;\r
- newy = posy + top; \r
- } \r
-\r
- fprintf(stderr,"Videoelt offset : Left : %d , Top : %d, ", left, top);\r
- fprintf(stderr,"EltWidth : %d , EltHeight : %d \n", eltwidth, eltheight); \r
- set_window_position(player_interf->ui->pTVWindow, newx, newy);\r
- fprintf(stderr,"Supposed TVWindow new position : %d x %d \n", newx, newy); \r
- resizevideoplayer(player_interf, eltwidth, eltheight); \r
- if(fullscreenparam){\r
- gtk_window_set_position(GTK_WINDOW(player_interf->ui->pTVWindow), GTK_WIN_POS_CENTER_ALWAYS);\r
- }\r
- fprintf(stderr,"Checking position : \n "); \r
- gint checkx, checky;\r
- get_window_position(player_interf->ui->pTVWindow, &checkx, &checky);\r
- fprintf(stderr,"CHECK TVWindow Left : %d , CHECK TVWindow Top : %d \n", checkx, checky);\r
- }\r
- \r
-}\r
-\r
-void OnKEYSET_Allocate()\r
-{\r
- webkit_web_view_execute_script(player_interf->ui->pWebView, \r
- " var KeyEvent = new Object(); \\r
- KeyEvent.VK_RED = 403; \\r
- KeyEvent.VK_YELLOW = 405;\\r
- KeyEvent.VK_GREEN = 404;\\r
- KeyEvent.VK_BLUE = 406;\\r
- KeyEvent.VK_UP = 38;\\r
- KeyEvent.VK_DOWN = 40;\\r
- KeyEvent.VK_LEFT = 37;\\r
- KeyEvent.VK_RIGHT = 39;\\r
- KeyEvent.VK_PLAY = 415;\\r
- KeyEvent.VK_STOP = 413;\\r
- KeyEvent.VK_PAUSE = 19;\\r
- KeyEvent.VK_FAST_FWD = 417;\\r
- KeyEvent.VK_REWIND = 412;\\r
- KeyEvent.VK_TELETEXT = 459;\\r
- KeyEvent.VK_ESCAPE = 27;\\r
- KeyEvent.VK_ENTER = 13;\\r
- KeyEvent.VK_0 = 48;\\r
- KeyEvent.VK_1 = 49;\\r
- KeyEvent.VK_2 = 50;\\r
- KeyEvent.VK_3 = 51;\\r
- KeyEvent.VK_4 = 52;\\r
- KeyEvent.VK_5 = 53;\\r
- KeyEvent.VK_6 = 54;\\r
- KeyEvent.VK_7 = 55;\\r
- KeyEvent.VK_8 = 56;\\r
- KeyEvent.VK_9 = 57; ");\r
-}\r
-\r
-\r
-static void usage()\r
-{\r
- printf("\nUsage: hbbtvterminal -input=input_data [-url=url] [-no_url]\n");\r
- printf("-input=input_data : input data to process (dvb://, udp://, or file)\n");\r
- printf("-url=url : force the player to connect to an url. Ignore the url(s) found in the input data\n");\r
- printf("-no_url : the player will not connect to HBBTV services \n");\r
- printf("-dsmcc : enable the DSMCC data carousel processing \n");\r
-}\r
-\r
-\r
-/****************************************************************************/\r
-/** getargs */\r
-/** @author Stanislas Selle */\r
-/** @date 2011/06/15 */\r
-/** gets args from agrv and set the options into the arguments */\r
-/****************************************************************************/\r
-\r
-static void getargs(int argc, char *argv[], char* &input_data, Bool* dsmcc, char* &url, Bool* no_url)\r
-{\r
- u32 i;\r
-\r
- no_url = 0;\r
- i = 0;\r
- input_data = NULL;\r
- url = NULL;\r
-\r
- for (i=1; i<(u32) argc; i++) {\r
- char *arg = argv[i];\r
- if (arg[0]=='-') {\r
- if (!strnicmp(arg, "-input=", 7)) {\r
- input_data = arg+7;\r
- }else if (!strnicmp(arg, "-url=", 5)) {\r
- url = arg+5;\r
- }else if (!strnicmp(arg, "-no_url", 7)) {\r
- *no_url = 1;\r
- }else if (!strnicmp(arg, "-dsmcc", 6)) { \r
- *dsmcc = 1;\r
- }else {\r
- usage();\r
- exit(0);\r
- } \r
- }else {\r
- usage();\r
- exit(0);\r
- }\r
- }\r
-\r
- if( !input_data && (!url || *no_url)) {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Input data is needed if no URL is given.\n"));\r
- usage();\r
- exit(0);\r
- }\r
- if( !*dsmcc) {\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Ignoring DSMCC data !! \n"));\r
- }\r
-\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Starting the processing of the TS file %s \n",input_data));\r
-\r
-}\r
-\r
-int main (int argc, char* argv[])\r
-{\r
- char* input_data;\r
- char* url;\r
- Bool dsmcc;\r
- Bool no_url;\r
- int Error;\r
-\r
- dsmcc = no_url = 0;\r
-\r
- url = input_data = NULL;\r
-\r
- //TRACEINFO;\r
- gf_sys_init(1);\r
- gf_log_set_tool_level(GF_LOG_MODULE,GF_LOG_INFO);\r
- printf("GPAC HBBTV Terminal (c) Telecom ParisTech 2011\n"); \r
-\r
- getargs(argc, argv, input_data , &dsmcc, url, &no_url);\r
-\r
- GF_SAFEALLOC(player_interf, sPlayerInterface);\r
-\r
- HbbtvDemuxer* hbbtv_demuxer = new HbbtvDemuxer(input_data, url,dsmcc, no_url, player_interf);\r
-\r
- gtk_init(&argc, &argv);\r
-\r
- if (!g_thread_supported()) {\r
- g_thread_init(NULL);\r
- }\r
-\r
- Error = init_playerinterface(player_interf,input_data,url,no_url);\r
- if(Error){\r
- GF_LOG(GF_LOG_INFO, GF_LOG_MODULE, ("[HBBTVTerminal] Error - Aborting the processing \n"));\r
- return 0;\r
- }\r
- //~ gf_term_set_option(player_interf->m_term, GF_OPT_PLAY_STATE, GF_STATE_PLAYING);\r
-\r
- gtk_main();\r
- //free(ui);\r
-}\r
-\r
+++ /dev/null
-/*\r
- * Copyright (c) 2010-2011 Telecom-Paristech\r
- * All Rights Reserved\r
- * GPAC is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU Lesser General Public License as published by\r
- * the Free Software Foundation; either version 2, or (at your option)\r
- * any later version.\r
- * \r
- * GPAC is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU Lesser General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; see the file COPYING. If not, write to\r
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- * Authors: Stanislas Selle - Jonathan Sillan \r
- * \r
- */\r
-\r
-#ifndef __HBBTVTERMINAL__\r
-#define __HBBTVTERMINAL__\r
-\r
-#define _WIN32_WINNT 0x0510 \r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-\r
-#include <gpac/configuration.h>\r
-#include <gpac/mpegts.h>\r
-#include <gpac/tools.h>\r
-#include <gpac/events.h>\r
-#include <gpac/options.h>\r
-#include <gpac/terminal.h>\r
-#include <gpac/internal/terminal_dev.h>\r
-#include <gpac/term_info.h>\r
-#include <hbbtvbrowserpluginapi.h>\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#include <iostream>\r
-\r
-#include <webkit/webkit.h>\r
-#include <webkit/WebKitDOMUIEvent.h>\r
-#include <gtk/gtk.h>\r
-#include <gdk/gdkkeysyms.h>\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#define DEBUG true\r
-#define PROJECTNAME "HbbTVTerminal"\r
-#define TRACEINFO if (DEBUG) { fprintf(stderr, " BOB \x1b[%i;3%im%s\x1b[0m : call %s\n", 1, 4, PROJECTNAME, __FUNCTION__); }\r
-#define NOTIMPLEMENTED if (DEBUG) { printf("SEGAR %s : %s is NOT IMPLEMENTED : TODO \n", PROJECTNAME, __FUNCTION__); }\r
-\r
-#define TRANSPARENCE true\r
-\r
-#define HBBTV_VIDEO_WIDTH 1280\r
-#define HBBTV_VIDEO_HEIGHT 720\r
-\r
-typedef struct GraphicInterface\r
-{\r
- WebKitWebView *pWebView;\r
- GtkWidget *pTVView;\r
- GtkWidget *pBackgroundView;\r
- GtkWidget *pMainWindow;\r
- GtkWidget *pTVWindow;\r
- GtkWidget *pWebWindow;\r
- GtkWidget *pBackgroundWindow;\r
- GtkWidget *pEntry;\r
-} sGraphicInterface;\r
-\r
-\r
-enum listHBBTVKeys{\r
- HBBTV_VK_ENTER = 13,\r
- HBBTV_VK_PAUSE = 19,\r
- HBBTV_VK_ESCAPE = 27,\r
- HBBTV_VK_LEFT = 37,\r
- HBBTV_VK_RIGHT = 39,\r
- HBBTV_VK_UP = 38,\r
- HBBTV_VK_DOWN = 40,\r
- HBBTV_VK_0 = 48,\r
- HBBTV_VK_1 = 49,\r
- HBBTV_VK_2 = 50,\r
- HBBTV_VK_3 = 51,\r
- HBBTV_VK_4 = 52,\r
- HBBTV_VK_5 = 53,\r
- HBBTV_VK_6 = 54,\r
- HBBTV_VK_7 = 55,\r
- HBBTV_VK_8 = 56,\r
- HBBTV_VK_9 = 57,\r
- HBBTV_VK_RED = 403,\r
- HBBTV_VK_YELLOW = 405,\r
- HBBTV_VK_GREEN = 404,\r
- HBBTV_VK_BLUE = 406,\r
- HBBTV_VK_REWIND = 412,\r
- HBBTV_VK_STOP = 413,\r
- HBBTV_VK_PLAY = 415,\r
- HBBTV_VK_FAST_FWD = 417, \r
- HBBTV_VK_TELETEXT = 459\r
-};\r
-\r
-\r
-enum listRegisteredKeys {\r
- RK_OTHER = 0,\r
- RK_RED = 1,\r
- RK_GREEN = 2,\r
- RK_YELLOW = 3,\r
- RK_BLUE = 4,\r
- RK_NAVIGATION = 5,\r
- RK_VCR = 6, \r
- RK_SCROLL = 7,\r
- RK_INFO = 8,\r
- RK_NUMERIC = 9,\r
- RK_ALPHA = 10 \r
-};\r
-\r
-typedef struct PlayerInterface\r
-{\r
- sGraphicInterface* ui;\r
- Bool no_url;\r
- char* input_data;\r
- char* url;\r
- GF_Terminal *m_term;\r
- GF_User *m_user;\r
- void* Demuxer;\r
- GF_Mutex *Get_demux_info_mutex;\r
- int TVwake;\r
- Bool keyregistered[11];\r
- Bool init;\r
- Bool is_connected;\r
- Bool app_in_action;\r
-\r
-} sPlayerInterface;\r
-\r
-int ui_init(sGraphicInterface *ui);\r
-\r
-int init_gpac(sPlayerInterface* player_interf);\r
-int init_browser(sPlayerInterface* player_interf);\r
-int stop_gpac(sPlayerInterface *player_interf);\r
-int playpause(sPlayerInterface *player_interf);\r
-int term_play(sPlayerInterface *player_interf);\r
-int term_pause(sPlayerInterface *player_interf);\r
-int init_player(sPlayerInterface* player_interf);\r
-\r
-\r
-typedef struct\r
-{\r
- GF_M2TS_AIT* ait;\r
-\r
- char* data;\r
- u32 table_id;\r
- u32 data_size;\r
-} AIT_TO_PROCESS;\r
-\r
-\r
-typedef struct\r
-{\r
- GF_M2TS_DSMCC_SECTION* dsmcc_sections;\r
- char* buff;\r
-\r
- /*added not in the spec*/\r
- u8 first_section_received;\r
-}GF_M2TS_GATHER_DSMCC_SECTION;\r
-\r
-#define MAX_audio_index 16\r
-\r
-class Channel\r
-{\r
-public:\r
- /* Constructor */\r
- Channel(u32 TSservice_ID, char* TSchannel_name);\r
- /* Destructor */\r
- void Destroy_Channel();\r
- /* Fonctions */\r
- u32 Add_service_id(u32 service_id);\r
- u32 Add_channel_name(char* chan_name);\r
- u32 Add_video_ID(u32 video_index);\r
- u32 Add_audio_ID(u32 current_audio_index);\r
- u32 Add_ait_pid(u32 ait_pid);\r
- u32 Add_pmt_pid(u32 pmt_pid);\r
- u32 Add_App_info(GF_M2TS_CHANNEL_APPLICATION_INFO*add_ait);\r
- void Check_Info_Done();\r
- void Incr_audio_index(int index);\r
- void Set_audio_index(u32 index);\r
- /* Getter */\r
- u32 Get_service_id();\r
- char* Get_channel_name();\r
- u32 Get_video_ID();\r
- u32 Get_audio_ID(u32 indice);\r
- u32 Get_ait_pid();\r
- u32 Get_pmt_pid();\r
- Bool Get_processed();\r
- u32 Get_audio_index();\r
- u32 Get_nb_chan_audio_stream();\r
- GF_M2TS_CHANNEL_APPLICATION_INFO* Get_App_info();\r
- GF_M2TS_AIT_APPLICATION* App_to_play(Bool isConnected,u8 MaxPriority);\r
- GF_M2TS_AIT_APPLICATION* Get_App(u32 application_id);\r
-\r
-private:\r
- u32 service_ID;\r
- u32 number;\r
- char* channel_name;\r
- u32 video_ID;\r
- u32 audio_ID[MAX_audio_index];\r
- u32 AIT_PID;\r
- u32 PMT_PID;\r
- Bool processed;\r
- u32 current_audio_index;\r
- u32 nb_chan_audio_stream;\r
- GF_M2TS_CHANNEL_APPLICATION_INFO* ChannelApp; \r
-\r
-};\r
-\r
-class HbbtvDemuxer\r
-{\r
-public:\r
- /* Constructeur */\r
- HbbtvDemuxer(char *input_data, char* url, Bool dsmcc, Bool no_url,sPlayerInterface* player_interf);\r
-\r
- /* Destructeur */\r
-\r
- /* Fonction */\r
- u32 HbbtvDemuxer_DemuxStart();\r
- Bool ait_already_received(char *data,u32 pid);\r
- void GetAppInfoFromAit(GF_M2TS_AIT* ait);\r
- Channel* Zap_channel(u32 service_id,int zap);\r
- void Create_Channel(GF_M2TS_Program* pmt);\r
- void Check_PMT_Processing();\r
- void Channel_check();\r
- u32 Check_application_priority(Channel* chan, GF_M2TS_AIT* ait);\r
- /* Getter */\r
- GF_M2TS_Demuxer* Get_Ts(); \r
- GF_List* Get_ChannelList();\r
- GF_List* Get_AIT_To_Process_list();\r
- char* Get_Input_data();\r
- Bool Get_if_dsmcc_process();\r
- GF_Thread * Get_Demux_Thread();\r
- GF_Mutex * Get_Demux_Mutex();\r
- void* Get_User();\r
- int Check_all_channel_info_received(int Timer);\r
- char* Get_Force_URL();\r
- Bool Get_Ignore_TS_URL();\r
- Bool Get_ait_to_proces();\r
- Channel* Get_Channel(u32 service_id);\r
- GF_Err Get_application_info(GF_M2TS_CHANNEL_APPLICATION_INFO*app_info);\r
- /* Setter */\r
- void Set_Ts(GF_M2TS_Demuxer* ts);\r
- void Set_ait_to_process(Bool on); \r
-\r
-private:\r
- /* Fonction */\r
-\r
- u32 GetDemuxStartFunction(); \r
-\r
- /* Attribut */\r
- GF_M2TS_Demuxer *Demuxts;\r
- GF_List* Channels;\r
- GF_List* Ait_To_Process;\r
-\r
- /* Thread for Demux */\r
- GF_Thread *ts_demux_thread;\r
- /* Mutex for Demux */\r
- GF_Mutex *ts_demux_mutex;\r
-\r
- /*local file playing*/\r
- char *Input_data;\r
- char *Service_URL;\r
- char *Force_URL;\r
- Bool process_dsmcc;\r
- Bool Ignore_TS_URL;\r
- Bool No_URL;\r
- u32 nb_ait;\r
- u32 file_size;\r
- Bool ait_to_process;\r
- u32 nb_prog_pmt_received;\r
- Bool all_prog_pmt_received;\r
-\r
- /*callback to push AIT information when a AIT is received*/\r
- void (*on_ait_event)(void *player_interf, GF_M2TS_CHANNEL_APPLICATION_INFO*app_info);\r
- /*private user data - To the PlayerInterface*/\r
- void *user;\r
-\r
-};\r
-\r
-\r
-/* Global Functions */\r
-\r
-u32 On_hbbtv_received_section(void *ptr, GF_Event *event);\r
-u32 DemuxThreadStart(HbbtvDemuxer *hbbtv_demuxer);\r
-u32 DemuxStart(void *par);\r
-GF_Err get_app_url(sPlayerInterface* player_interf, GF_M2TS_CHANNEL_APPLICATION_INFO*app_info);\r
-int put_app_url(sPlayerInterface* player_interf);\r
-u32 Get_application_for_channel(HbbtvDemuxer* hbbtv_demuxer,u32 service_id);\r
-\r
-int change_geometry( int width, int height);\r
-int hbbtvterm_scan_channel(sPlayerInterface* player_interf);\r
-Channel* ZapChannel(HbbtvDemuxer *hbbtv_demuxer,u32 service_id,int zap);\r
-int hbbtvterm_channel_zap(sPlayerInterface* player_interf,int up_down);\r
-int hbbtvterm_get_channel_on_air(sPlayerInterface* player_interf, u32 service_id, int zap);\r
-void resizevideoplayer(sPlayerInterface* player_interf, int width, int height);\r
-\r
-void get_window_position(GtkWidget* Widget, int* x, int* y);\r
-void set_window_position(GtkWidget* Widget, int x, int y);\r
-\r
-GF_Config* check_config_file();\r
-Bool is_connected();\r
-\r
-/* HBBTV Functions */\r
-\r
-\r
-/* HBBTV Button */\r
-void on_redbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_greenbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_yellowbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_bluebuttonclicked(GtkWidget *widget, gpointer data);\r
-\r
-/*Navigation */\r
-void on_upbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_downbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_leftbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_rightbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_returnbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_exitbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_2buttonclicked(GtkWidget *widget, gpointer data);\r
-\r
-/* Control */\r
-void on_onoffbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_playpausebuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_playbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_pausebuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_langbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_chanupbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_chandownbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_channelbuttonclicked(GtkWidget *widget, gpointer data);\r
-void on_teletextbuttonclicked(GtkWidget *widget, gpointer data);\r
-\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif // __HBBTVTERMINAL__\r
+++ /dev/null
-###########################################################################################
-##
-## Copyright 2011 Telecom Paristech
-## Author : Stanislas Selle
-##
-###########################################################################################
-
-bin_PROGRAMS = hbbtvterminal
-hbbtvterminal_SOURCES = hbbtvterminal.cpp hbbtv_demux.cpp hbbtv_channel.cpp hbbtv_keycontrol.cpp hbbtv_tools.cpp hbbtvterminal.h
-
-SPECIALCFLAGS = -g -DXP_UNIX=1 -DMOZ_X11=1 -fPIC
-
-hbbtvterminal_CPPFLAGS = $(SPECIALCFLAGS) $(HBBTVBROWSERPLUGIN_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS) $(WEBKIT_CFLAGS) $(PIXMAN_CFLAGS) $(NPAPI_CFLAGS)\
- -g -DXP_UNIX -fPIC \
- -I /usr/include\
- -I /usr/include/gpac/\
- -I /usr/local/include\
- -I /usr/local/include/gpac/
-
-
-hbbtvterminal_LDFLAGS = $(SPECIALCFLAGS)
-
-hbbtvterminal_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(WEBKIT_LIBS) $(PIXMAN_LIBS) $(NPAPI_LIBS) $(MOZILLAJS_LIBS) $(HBBTVBROWSERPLUGIN_LIBS) \
- -L/usr/local/lib -lgpac
-
+++ /dev/null
-#!/bin/sh -e
-
-PLAYER=0
-DEPENDENCIES=0
-WEBKIT=0
-GPAC=0
-
-if [ -z $1 ] ; then
- echo "\nUsage: You must choose options :"
- echo "\n\033[31m full - build the whole package (gpac+webkit+hbbtvplayer) Recommanded for computer without gpac \033[0m"
- echo "\n\033[32m player - build the HBBTV player \033[0m"
- echo "\n\033[33m webkit - download Webkit sources and install it\033[0m"
- echo "\n\033[33m gpac - download gpac sources and install it\033[0m"
- echo "\n\033[34m dependencies - get the dependencies needed to build the HBBTVPlayer \033[0m"
- exit 1
-fi
-
-for i in $* ; do
- if [ "$i" = "full" ] ; then
- echo -e "\033[31m Usage: $0 Full Building : Activated \033[0m"
- PLAYER=1
- DEPENDENCIES=1
- WEBKIT=1
- GPAC=1
- fi
-
- if [ "$i" = "player" ] ; then
- echo -e "\033[32m Usage: $0 Player Building : Activated \033[0m"
- PLAYER=1
- fi
-
- if [ "$i" = "dependencies" ] ; then
- echo -e "\033[34m Usage: $0 Dependecies Building : Activated \033[0m"
- DEPENDENCIES=1
- fi
-
- if [ "$i" = "webkit" ] ; then
- echo -e "\033[33m Usage: $0 Webkit Building : Activated \033[0m"
- WEBKIT=1
- fi
-
- if [ "$i" = "gpac" ] ; then
- echo -e "\033[33m Usage: $0 gpac Building : Activated \033[0m"
- WEBKIT=1
- fi
-done
-
-if [ $DEPENDENCIES -eq 1 ] ; then
- sudo apt-get install `cat listdependencies`
-fi
-
-if [ $GPAC -eq 1 ] ; then
- cd gpac
- ./configure --use-js=no
- make -j2
- sudo make install
- sudo make install-lib
- cd ..
-fi
-
-if [ $WEBKIT -eq 1 ] ; then
- ./WebKit/Tools/Scripts/build-webkit --gtk --with-gtk=2.0 --no-webkit2 --makeargs="-j2 install"
-fi
-
-
-if [ $PLAYER -eq 1 ] ; then
- cd hbbtvbrowserplugin
- ./autogen.sh
- sudo make install
- cd ..
-
- cd hbbtvterminal
- ./autogen.sh
- sudo make install
- cd ..
-fi
-
-
+++ /dev/null
-autoconf
-automake
-autotools-dev
-bison
-build-essential
-dvb-apps
-flex
-gail-3.0
-glib-networking
-gperf
-gtk-doc-tools
-liba52-0.7.4-dev
-libasound2-dev
-libatk1.0-0
-libavcodec52
-libavcodec-dev
-libavformat52
-libavformat-dev
-libavutil-dev
-libc6
-libcairo2
-libenchant1c2a
-libenchant-dev
-libfaad2
-libfaad-dev
-libfontconfig1
-libfreetype6
-libfreetype6-dev
-libgail18
-libgail-3-dev
-libgail-dev
-libgcc1
-libgdk-pixbuf2.0-0
-libgl1-mesa-dev
-libglib2.0-0
-libglib2.0-dev
-libgpac0.4.5
-libgstreamer0.10-0
-libgstreamer-plugins-base0.10-0
-libgtk2.0-dev
-libicu44
-libjpeg62-dev
-libmad0-dev
-libogg-dev
-libopenjpeg-dev
-libpango1.0-0
-libpng12-dev
-libpulse-dev
-libsdl1.2debian
-libsdl1.2-dev
-libsoup2.4-dev
-libsqlite3-dev
-libssl-dev
-libstdc++6
-libswscale-dev
-libtheora-dev
-libtool
-libvorbis-dev
-libwxbase2.8-dev
-libwxgtk2.8-dev
-libx11-6
-libxml2
-libxslt-dev
-libxt6
-libxv-dev
-libxvidcore-dev
-linux-sound-base
-subversion
-wx2.8-headers
-x11proto-gl-dev
-x11proto-video-dev
-xulrunner-2.0-dev
-zlib1g-dev
-libgeoclue-dev
-icu-doc
-libicu-dev
-libgstreamer0.10-dev
-libgstreamer-plugins-base0.10-dev
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_workspace_file>
- <Workspace title="Workspace">
- <Project filename="../../hbbtvterminal/projectmanager/codeblocks/hbbtvterminal/HbbtvTerminal.cbp" active="1" />
- <Project filename="../../hbbtvbrowserplugin/projectmanager/codeblocks/hbbtvbrowserplugin/hbbtvbrowserplugin.cbp" />
- </Workspace>
-</CodeBlocks_workspace_file>