Index: totemIComplexPlayer.idl
===================================================================
--- totemIComplexPlayer.idl	(revision 3926)
+++ totemIComplexPlayer.idl	(working copy)
@@ -1,19 +1,193 @@
+/*
+ * Copyright © 2007 Bastien Nocera <hadess@hadess.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
 #include "nsISupports.idl"
 
-/**
- * totemIComplexPlayer:
- * 
- * RealPlayer/HelixPlayer compatible scriptable interface
- * 
- * @status: EXTERNAL
- * XXX incomplete
- */
-[scriptable, uuid(782b38b2-b647-4cfa-a9fb-1ccf45bf8019)]
+/* Documentation from
+ * http://service.real.com/help/library/guides/realonescripting/browse/htmfiles/embedmet.htm */
+
+[scriptable, uuid(2f71a310-75d5-44f8-b6d2-60bd2976550b)]
 interface totemIComplexPlayer: nsISupports
 {
+	boolean CanPause ();
+	boolean CanPlay ();
+	boolean CanStop ();
+	void DoGotoURL (in AUTF8String url, in AUTF8String target);
+	boolean DoNextEntry ();
 	boolean DoPause ();
-
 	boolean DoPlay ();
+	boolean DoPrevEntry ();
+	boolean DoStop ();
+	AUTF8String GetAuthor ();
+	boolean GetAutoGoToURL ();
+	boolean GetAutoStart ();
+	ACString GetBackgroundColor ();
+	long GetBandwidthAverage ();
+	long GetBandwidthCurrent ();
+	long GetBufferingTimeElapsed ();
+	long GetBufferingTimeRemaining ();
+	boolean GetCanSeek ();
+	boolean GetCenter ();
+	long GetClipHeight ();
+	long GetClipWidth ();
+	long GetConnectionBandwidth ();
+	AUTF8String GetConsole ();
+	boolean GetConsoleEvents ();
+	AUTF8String GetControls ();
+	AUTF8String GetCopyright ();
+	long GetCurrentEntry ();
+	AUTF8String GetDRMInfo (in ACString identifier);
+	boolean GetDoubleSize ();
+	AUTF8String GetEntryAbstract (in long entry_index);
+	AUTF8String GetEntryAuthor (in long entry_index);
+	AUTF8String GetEntryCopyright (in long entry_index);
+	AUTF8String GetEntryTitle (in long entry_index);
+	boolean GetFullScreen ();
+	boolean GetImageStatus ();
+	AUTF8String GetLastErrorMoreInfoURL ();
+	long GetLastErrorRMACode ();
+	long GetLastErrorSeverity ();
+	long GetLastErrorUserCode ();
+	AUTF8String GetLastErrorUserString ();
+	AUTF8String GetLastMessage ();
+	AUTF8String GetLastStatus ();
+	long GetLength ();
+	boolean GetLiveState ();
+	boolean GetLoop ();
+	boolean GetMaintainAspect ();
+	boolean GetMute ();
+	long GetNumEntries ();
+	long GetNumLoop ();
+	long GetNumSources ();
+	boolean GetOriginalSize ();
+	long GetPacketsEarly ();
+	long GetPacketsLate ();
+	long GetPacketsMissing ();
+	long GetPacketsOutOfOrder ();
+	long GetPacketsReceived ();
+	long GetPacketsTotal ();
+	long GetPlayState ();
+	long GetPosition ();
+	boolean GetPreFetch ();
+	boolean GetShowAbout ();
+	boolean GetShowPreferences ();
+	boolean GetShowStatistics ();
+	boolean GetShuffle ();
+	AUTF8String GetSource ();
+	ACString GetSourceTransport (in long source_number);
+	boolean GetStereoState ();
+	AUTF8String GetTitle ();
+	ACString GetVersionInfo ();
+	long GetVolume ();
+	boolean GetWantErrors ();
+	boolean GetWantKeyboardEvents ();
+	boolean GetWantMouseEvents ();
+	boolean HasNextEntry ();
+	boolean HasPrevEntry ();
+	boolean SetAuthor (in AUTF8String new_author);
+	boolean SetAutoGoToURL (in boolean enable_start);
+	boolean SetAutoStart (in boolean auto_start);
+	boolean SetBackgroundColor (in ACString color);
+	boolean SetCanSeek (in boolean can_seek);
+	boolean SetCenter (in boolean value);
+	boolean SetConsole (in AUTF8String console);
+	boolean SetConsoleEvents (in boolean value);
+	boolean SetControls (in AUTF8String controls);
+	boolean SetCopyright (in AUTF8String copyright);
+	boolean SetDoubleSize ();
+	boolean SetFullScreen ();
+	boolean SetImageStatus (in boolean enabled);
+	boolean SetLoop (in boolean set);
+	boolean SetMaintainAspect (in boolean set);
+	boolean SetMute (in boolean mute);
+	boolean SetNumLoop (in long number_of_loops);
+	boolean SetOriginalSize ();
+	boolean SetPosition (in long position);
+	boolean SetPreFetch (in boolean set);
+	boolean SetShowAbout (in boolean set);
+	boolean SetShowPreferences (in boolean set);
+	boolean SetShowStatistics (in boolean set);
+	boolean SetShuffle (in boolean set);
+	boolean SetSource (in AUTF8String source);
+	boolean SetTitle (in AUTF8String title);
+	void SetVolume (in long volume);
+	boolean SetWantErrors (in boolean set);
+	boolean SetWantKeyboardEvents (in boolean set);
+	boolean SetWantMouseEvents (in boolean set);
 
-	boolean DoStop ();
+	/* Additional Helix/non-embedded player functions.
+	 * Non-obsolete: http://service.real.com/help/library/guides/extend/htmfiles/appe_com.htm
+	 * Documented at:
+	 * http://service.real.com/help/library/guides/extend/htmfiles/appa_met.htm */
+	boolean GetEnableContextMenu ();
+	boolean GetEnableDoubleSize ();
+	boolean GetEnableFullScreen ();
+	boolean GetEnableOriginalSize ();
+	boolean GetIsPlus ();
+	boolean GetNoLogo ();
+	long GetPreferedLanguageID ();
+	long GetPreferredLanguageID ();
+	AUTF8String GetPreferedLanguageString ();
+	AUTF8String GetPreferredLanguageString ();
+	long GetUserCountryID ();
+	boolean SetEnableContextMenu (in boolean menu_on);
+	boolean SetEnableDoubleSize (in boolean enabled);
+	boolean SetEnableFullScreen (in boolean enabled);
+	boolean SetEnableOriginalSize (in boolean enabled);
+	boolean SetNoLogo (in boolean set);
+
+	/* Signals, documented at:
+	 * http://service.real.com/help/library/guides/realonescripting/browse/htmfiles/embedcal.htm
+	 *
+	 * void OnAuthorChange (in AUTF8String author);
+	 * void OnBuffering (in long flags, in long percent_complete);
+	 * void OnClipClosed (void);
+	 * void onClipClosed (void);
+	 * void OnClipOpened (in AUTF8String short_clip_name, in AUTF8String url);
+	 * void onClipOpened (in AUTF8String short_clip_name, in AUTF8String url);
+	 * void OnContacting (in AUTF8String host_name);
+	 * void OnCopyrightChange (in AUTF8String copyright);
+	 * void OnErrorMessage (in short severity, in long rma_code, in long user_code, in AUTF8String user_string, in AUTF8String more_info_url, in AUTF8String error);
+	 * void OnGotoURL (in AUTF8String url, in AUTF8String target);
+	 * void onGotoURL (in AUTF8String url, in AUTF8String target);
+	 * void OnKeyDown (in long key);
+	 * void OnKeyPress (in long key);
+	 * void OnKeyUp (in long key);
+	 * void OnLButtonDown (in long button_flags, in long x_pos, in long y_pos);
+	 * void OnLButtonUp (in long button_flags, in long x_pos, in long y_pos);
+	 * void OnMouseMove (in long button_flags, in long x_pos, in long y_pos);
+	 * void OnMuteChange (in boolean mute);
+	 * void OnPlayStateChange (in long old_state, in long new_state);
+	 * void OnPosLength (in long pos, in long len);
+	 * void OnPositionChange (in long pos, in long len);
+	 * void OnPostSeek (in long old_time, in long new_time);
+	 * void OnPreFetchComplete ();
+	 * void OnPreSeek (in long old_time, in long new_time);
+	 * void OnPresentationClosed ();
+	 * void OnPresentationOpened ();
+	 * void OnRButtonDown (in long button_flags, in long x_pos, in long y_pos);
+	 * void OnRButtonUp (in long button_flags, in long x_pos, in long y_pos);
+	 * void OnShowStatus (in AUTF8String status_text);
+	 * void onShowStatus (in AUTF8String status_text);
+	 * void OnStateChange (in long old_state, in long new_state);
+	 * void OnTitleChange (in AUTF8String title);
+	 * void OnVolumeChange (in long new_volume);
+	 */
 };
+
