[xiph-commits] r2909 - liboggplay/trunk/plugin/support
shans at svn.annodex.net
shans at svn.annodex.net
Tue Jun 12 21:57:24 PDT 2007
Author: shans
Date: 2007-06-12 21:57:23 -0700 (Tue, 12 Jun 2007)
New Revision: 2909
Modified:
liboggplay/trunk/plugin/support/nsScriptablePeer.cpp
Log:
Moved CMML-specific callback functions to callback object registration functions
Modified: liboggplay/trunk/plugin/support/nsScriptablePeer.cpp
===================================================================
--- liboggplay/trunk/plugin/support/nsScriptablePeer.cpp 2007-06-13 04:56:58 UTC (rev 2908)
+++ liboggplay/trunk/plugin/support/nsScriptablePeer.cpp 2007-06-13 04:57:23 UTC (rev 2909)
@@ -163,57 +163,58 @@
return NS_OK;
}
-NS_IMETHODIMP nsScriptablePeer::RegisterCMMLCallback(const char *cmmlCallback) {
- if (mPlugin)
- mPlugin->setCMMLCallback(cmmlCallback);
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::RetrieveAnnotations(char **xmlData) {
- *xmlData = NULL;
- if (mPlugin)
- *xmlData = mPlugin->retrieveAllAnnotations();
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::SetVolume(float volume) {
- if (mPlugin)
- mPlugin->setVolume(volume);
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::GetVolume(float* volume) {
- *volume = (float)0.0;
- if (mPlugin)
- *volume = mPlugin->getVolume();
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::RegisterPlaylistCallback(const char *playlistCallback) {
- if (mPlugin)
- mPlugin->setPlaylistCallback(playlistCallback);
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::GetMovieAt(PRInt16 position, char **_retval) {
- *_retval = NULL;
- if (mPlugin)
- *_retval = mPlugin->getMovieAt(position);
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::SetMovieAt(PRInt16 position, const char *url) {
- if (mPlugin)
- mPlugin->setMovieAt(position, url);
- return NS_OK;
-}
-
-NS_IMETHODIMP nsScriptablePeer::AppendMovie(const char *url) {
- if (mPlugin)
- mPlugin->appendMovie(url);
+NS_IMETHODIMP nsScriptablePeer::RegisterCallbackObject(nsILibOggCallback *cbObj)
+{
+ if (mPlugin)
+ mPlugin->setCallbackObject(cbObj);
return NS_OK;
}
+NS_IMETHODIMP nsScriptablePeer::RetrieveAnnotations(char **xmlData) {
+ *xmlData = NULL;
+ if (mPlugin)
+ *xmlData = mPlugin->retrieveAllAnnotations();
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsScriptablePeer::SetVolume(float volume) {
+ if (mPlugin)
+ mPlugin->setVolume(volume);
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsScriptablePeer::GetVolume(float* volume) {
+ *volume = (float)0.0;
+ if (mPlugin)
+ *volume = mPlugin->getVolume();
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsScriptablePeer::RegisterPlaylistCallback(const char *playlistCallback) {
+ if (mPlugin)
+ mPlugin->setPlaylistCallback(playlistCallback);
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsScriptablePeer::GetMovieAt(PRInt16 position, char **_retval) {
+ *_retval = NULL;
+ if (mPlugin)
+ *_retval = mPlugin->getMovieAt(position);
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsScriptablePeer::SetMovieAt(PRInt16 position, const char *url) {
+ if (mPlugin)
+ mPlugin->setMovieAt(position, url);
+ return NS_OK;
+}
+
+NS_IMETHODIMP nsScriptablePeer::AppendMovie(const char *url) {
+ if (mPlugin)
+ mPlugin->appendMovie(url);
+ return NS_OK;
+}
+
//
// the following method will be callable from JavaScript
//
More information about the commits
mailing list