~woodrow-shen/totem/mybranch

« back to all changes in this revision

Viewing changes to browser-plugin/totemConePlugin.cpp

Tags: 2.24.3-3
* totem-mozilla.docs: ship README.browser-plugin which explains how to 
  disable the plugin for some MIME types.
* rules: remove the hack that only let totem-xine support VCDs and 
  DVDs, now that GStreamer supports them. Closes: #370789.
* 01_fake_keypresses.patch: new patch. Completely disable the broken 
  XTEST code that generates fake keypresses. Closes: #500330.
* 90_autotools.patch: regenerated.
* Build-depend on nautilus 2.22 to be sure to build the extension for 
  the correct version.
* totem-xine depends on libxine1-x.
* Standards version is 3.8.1.
* Upload to unstable.
* 04_tracker_build.patch: new patch, stolen upstream. Fix build with 
  latest tracker version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Totem Cone Plugin
2
 
 *
3
 
 * Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
4
 
 * Copyright (C) 2002 David A. Schleef <ds@schleef.org>
5
 
 * Copyright (C) 2006 Christian Persch
6
 
 *
7
 
 * This library is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU Library General Public
9
 
 * License as published by the Free Software Foundation; either
10
 
 * version 2 of the License, or (at your option) any later version.
11
 
 *
12
 
 * This library is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * Library General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU Library General Public
18
 
 * License along with this library; if not, write to the
19
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
 * Boston, MA 02111-1307, USA.
21
 
 *
22
 
 * $Id: totemBasicPlugin.cpp 4463 2007-07-27 16:07:42Z fcrozat $
23
 
 */
24
 
 
25
 
#include <mozilla-config.h>
26
 
#include "config.h"
27
 
 
28
 
#include <glib.h>
29
 
 
30
 
#include <nsISupportsImpl.h>
31
 
#include <nsMemory.h>
32
 
#include <nsXPCOM.h>
33
 
#include <nsIProgrammingLanguage.h>
34
 
 
35
 
#define GNOME_ENABLE_DEBUG 1
36
 
/* define GNOME_ENABLE_DEBUG for more debug spew */
37
 
#include "debug.h"
38
 
 
39
 
#include "totemICone.h"
40
 
 
41
 
#include "totemDebug.h"
42
 
#include "totemClassInfo.h"
43
 
 
44
 
#include "totemConePlugin.h"
45
 
 
46
 
/* 11ef8fce-9eb4-494e-804e-d56eae788625 */
47
 
static const nsCID kClassID = 
48
 
  { 0x11ef8fce, 0x9eb4, 0x494e,
49
 
    { 0x80, 0x4e, 0xd5, 0x6e, 0xae, 0x78, 0x86, 0x25 } };
50
 
 
51
 
static const char kClassDescription[] = "totemConePlugin";
52
 
#define TOTEM_CONE_VERSION "0.8.6"
53
 
static const char kPluginDescription[] = "VLC Multimedia Plugin (compatible Totem " VERSION ")";
54
 
 
55
 
static const totemPluginMimeEntry kMimeTypes[] = {
56
 
        { "application/x-vlc-plugin", "", "application/octet-stream" },
57
 
        { "application/vlc", "", "application/octet-stream" },
58
 
        { "video/x-google-vlc-plugin", "", "application/octet-stream" },
59
 
};
60
 
 
61
 
totemScriptablePlugin::totemScriptablePlugin (totemPlugin *aPlugin)
62
 
  : mPlugin(aPlugin),
63
 
    mMute(PR_FALSE)
64
 
{
65
 
  D ("%s ctor [%p]", kClassDescription, (void*) this);
66
 
}
67
 
 
68
 
totemScriptablePlugin::~totemScriptablePlugin ()
69
 
{
70
 
  D ("%s dtor [%p]", kClassDescription, (void*) this);
71
 
}
72
 
 
73
 
/* static */ char *
74
 
totemScriptablePlugin::PluginDescription ()
75
 
{
76
 
  return (char*) kPluginDescription;
77
 
}
78
 
 
79
 
/* static */ char *
80
 
totemScriptablePlugin::PluginLongDescription ()
81
 
{
82
 
  return (char*) totem_plugin_get_long_description();
83
 
}
84
 
 
85
 
/* static */ void
86
 
totemScriptablePlugin::PluginMimeTypes (const totemPluginMimeEntry **_entries,
87
 
                                        PRUint32 *_count)
88
 
{
89
 
  *_entries = kMimeTypes;
90
 
  *_count = G_N_ELEMENTS (kMimeTypes);
91
 
}
92
 
 
93
 
/* Interface implementations */
94
 
 
95
 
NS_IMPL_ISUPPORTS7 (totemScriptablePlugin,
96
 
                    totemICone,
97
 
                    totemIConePlaylist,
98
 
                    totemIConePlaylistItems,
99
 
                    totemIConeInput,
100
 
                    totemIConeAudio,
101
 
                    totemIConeVideo,
102
 
                    nsIClassInfo)
103
 
 
104
 
/* nsIClassInfo */
105
 
 
106
 
TOTEM_CLASSINFO_BEGIN (totemScriptablePlugin,
107
 
                       6,
108
 
                       kClassID,
109
 
                       kClassDescription)
110
 
  TOTEM_CLASSINFO_ENTRY (0, totemICone)
111
 
  TOTEM_CLASSINFO_ENTRY (1, totemIConePlaylist)
112
 
  TOTEM_CLASSINFO_ENTRY (2, totemIConePlaylistItems)
113
 
  TOTEM_CLASSINFO_ENTRY (3, totemIConeInput)
114
 
  TOTEM_CLASSINFO_ENTRY (4, totemIConeAudio)
115
 
  TOTEM_CLASSINFO_ENTRY (5, totemIConeVideo)
116
 
TOTEM_CLASSINFO_END
117
 
 
118
 
/* totemICone */
119
 
 
120
 
#define TOTEM_SCRIPTABLE_INTERFACE "totemICone"
121
 
 
122
 
/* readonly attribute AUTF8String VersionInfo; */
123
 
NS_IMETHODIMP
124
 
totemScriptablePlugin::GetVersionInfo(nsACString & aVersionInfo)
125
 
{
126
 
  aVersionInfo.Assign (TOTEM_CONE_VERSION);
127
 
  return NS_OK;
128
 
}
129
 
 
130
 
/* attribute totemIConeAudio audio; */
131
 
NS_IMETHODIMP
132
 
totemScriptablePlugin::GetAudio(totemIConeAudio * *aAudio)
133
 
{
134
 
  return CallQueryInterface (this, aAudio);
135
 
}
136
 
 
137
 
/* attribute totemIConeInput input; */
138
 
NS_IMETHODIMP
139
 
totemScriptablePlugin::GetInput(totemIConeInput * *aInput)
140
 
{
141
 
  return CallQueryInterface (this, aInput);
142
 
}
143
 
 
144
 
/* attribute totemIConePlaylist playlist; */
145
 
NS_IMETHODIMP
146
 
totemScriptablePlugin::GetPlaylist(totemIConePlaylist * *aPlaylist)
147
 
{
148
 
  return CallQueryInterface (this, aPlaylist);
149
 
}
150
 
 
151
 
/* attribute totemIConeVideo video; */
152
 
NS_IMETHODIMP
153
 
totemScriptablePlugin::GetVideo(totemIConeVideo * *aVideo)
154
 
{
155
 
  return CallQueryInterface (this, aVideo);
156
 
}
157
 
 
158
 
/* totemIConePlaylist */
159
 
#undef TOTEM_SCRIPTABLE_INTERFACE
160
 
#define TOTEM_SCRIPTABLE_INTERFACE "totemIConePlaylist"
161
 
 
162
 
/* attribute totemIConePlaylistItems items; */
163
 
NS_IMETHODIMP
164
 
totemScriptablePlugin::GetItems(totemIConePlaylistItems * *aItems)
165
 
{
166
 
  return CallQueryInterface (this, aItems);
167
 
}
168
 
 
169
 
/* readonly attribute boolean isPlaying */
170
 
NS_IMETHODIMP
171
 
totemScriptablePlugin::GetIsPlaying(PRBool *aIsPlaying)
172
 
{
173
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
174
 
 
175
 
  return NS_ERROR_NOT_IMPLEMENTED;
176
 
}
177
 
 
178
 
/* long add (in AUTF8String MRL, in AUTF8String name, in AUTF8String options) */
179
 
NS_IMETHODIMP
180
 
totemScriptablePlugin::Add(const nsACString & aURL, const nsACString & aName, const nsACString & aOptions, PRInt32 *aItemNumber)
181
 
{
182
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
183
 
 
184
 
  NS_ENSURE_STATE (IsValid ());
185
 
 
186
 
  /* FIXME */
187
 
  *aItemNumber = 0;
188
 
 
189
 
  return mPlugin->AddItem (aURL);
190
 
}
191
 
 
192
 
/* void play () */
193
 
NS_IMETHODIMP
194
 
totemScriptablePlugin::Play()
195
 
{
196
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
197
 
 
198
 
  NS_ENSURE_STATE (IsValid ());
199
 
 
200
 
  return mPlugin->DoCommand (TOTEM_COMMAND_PLAY);
201
 
}
202
 
 
203
 
/* void playItem (in long number) */
204
 
NS_IMETHODIMP
205
 
totemScriptablePlugin::PlayItem(PRInt32 aNumber)
206
 
{
207
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
208
 
 
209
 
  return NS_ERROR_NOT_IMPLEMENTED;
210
 
}
211
 
 
212
 
/* void togglePause () */
213
 
NS_IMETHODIMP
214
 
totemScriptablePlugin::TogglePause()
215
 
{
216
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
217
 
 
218
 
  return NS_ERROR_NOT_IMPLEMENTED;
219
 
}
220
 
/* void stop () */
221
 
NS_IMETHODIMP
222
 
totemScriptablePlugin::Stop()
223
 
{
224
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
225
 
 
226
 
  NS_ENSURE_STATE (IsValid ());
227
 
 
228
 
  return mPlugin->DoCommand (TOTEM_COMMAND_STOP);
229
 
}
230
 
 
231
 
/* void next () */
232
 
NS_IMETHODIMP
233
 
totemScriptablePlugin::Next()
234
 
{
235
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
236
 
 
237
 
  return NS_ERROR_NOT_IMPLEMENTED;
238
 
}
239
 
 
240
 
/* void prev () */
241
 
NS_IMETHODIMP
242
 
totemScriptablePlugin::Prev()
243
 
{
244
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
245
 
 
246
 
  return NS_ERROR_NOT_IMPLEMENTED;
247
 
}
248
 
 
249
 
/* void removeItem (in long number) */
250
 
NS_IMETHODIMP
251
 
totemScriptablePlugin::RemoveItem(PRInt32 aNumber)
252
 
{
253
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
254
 
 
255
 
  return NS_ERROR_NOT_IMPLEMENTED;
256
 
}
257
 
 
258
 
/* totemIConePlaylistItems */
259
 
#undef TOTEM_SCRIPTABLE_INTERFACE
260
 
#define TOTEM_SCRIPTABLE_INTERFACE "totemIConePlaylistItems"
261
 
 
262
 
/* readonly attribute long count */
263
 
NS_IMETHODIMP
264
 
totemScriptablePlugin::GetCount (PRInt32 *aCount)
265
 
{
266
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
267
 
 
268
 
  return NS_ERROR_NOT_IMPLEMENTED;
269
 
}
270
 
 
271
 
/* void clear () */
272
 
NS_IMETHODIMP
273
 
totemScriptablePlugin::Clear()
274
 
{
275
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
276
 
 
277
 
  NS_ENSURE_STATE (IsValid ());
278
 
 
279
 
  return mPlugin->ClearPlaylist ();
280
 
}
281
 
 
282
 
/* totemIConeInput */
283
 
#undef TOTEM_SCRIPTABLE_INTERFACE
284
 
#define TOTEM_SCRIPTABLE_INTERFACE "totemIConeInput"
285
 
 
286
 
/* readonly attribute long length */
287
 
NS_IMETHODIMP
288
 
totemScriptablePlugin::GetLength (PRInt32 *aLength)
289
 
{
290
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
291
 
 
292
 
  return NS_ERROR_NOT_IMPLEMENTED;
293
 
}
294
 
 
295
 
/* readonly attribute long fps */
296
 
NS_IMETHODIMP
297
 
totemScriptablePlugin::GetFps (PRInt32 *aFps)
298
 
{
299
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
300
 
 
301
 
  return NS_ERROR_NOT_IMPLEMENTED;
302
 
}
303
 
 
304
 
/* readonly attribute boolean hasVout */
305
 
NS_IMETHODIMP
306
 
totemScriptablePlugin::GetHasVout (PRBool *aItemCount)
307
 
{
308
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
309
 
 
310
 
  return NS_ERROR_NOT_IMPLEMENTED;
311
 
}
312
 
 
313
 
/* attribute double position */
314
 
NS_IMETHODIMP 
315
 
totemScriptablePlugin::GetPosition(double *aPosition)
316
 
{
317
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
318
 
 
319
 
  return NS_ERROR_NOT_IMPLEMENTED;
320
 
}
321
 
 
322
 
NS_IMETHODIMP 
323
 
totemScriptablePlugin::SetPosition(double aPosition)
324
 
{
325
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
326
 
 
327
 
  return NS_ERROR_NOT_IMPLEMENTED;
328
 
}
329
 
 
330
 
/* attribute long time */
331
 
NS_IMETHODIMP 
332
 
totemScriptablePlugin::GetTime(PRInt32 *aPosition)
333
 
{
334
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
335
 
 
336
 
  return NS_ERROR_NOT_IMPLEMENTED;
337
 
}
338
 
 
339
 
NS_IMETHODIMP 
340
 
totemScriptablePlugin::SetTime(PRInt32 aPosition)
341
 
{
342
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
343
 
 
344
 
  return NS_ERROR_NOT_IMPLEMENTED;
345
 
}
346
 
 
347
 
/* attribute long state */
348
 
NS_IMETHODIMP
349
 
totemScriptablePlugin::GetState(PRInt32 *aState)
350
 
{
351
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
352
 
 
353
 
  NS_ENSURE_STATE (IsValid());
354
 
 
355
 
  /* IDLE/CLOSE=0,
356
 
   * OPENING=1,
357
 
   * BUFFERING=2,
358
 
   * PLAYING=3,
359
 
   * PAUSED=4,
360
 
   * STOPPING=5,
361
 
   * ERROR=6
362
 
   */
363
 
  if (mPlugin->mState == TOTEM_STATE_PLAYING) {
364
 
    *aState = 3;
365
 
  } else if (mPlugin->mState == TOTEM_STATE_PAUSED) {
366
 
    *aState = 4;
367
 
  } else {
368
 
    *aState = 0;
369
 
  }
370
 
 
371
 
  return NS_OK;
372
 
}
373
 
 
374
 
NS_IMETHODIMP
375
 
totemScriptablePlugin::SetState(PRInt32 aState)
376
 
{
377
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
378
 
 
379
 
  return NS_ERROR_NOT_IMPLEMENTED;
380
 
}
381
 
 
382
 
/* attribute double rate */
383
 
NS_IMETHODIMP
384
 
totemScriptablePlugin::GetRate(double *aRate)
385
 
{
386
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
387
 
 
388
 
  return NS_ERROR_NOT_IMPLEMENTED;
389
 
}
390
 
 
391
 
NS_IMETHODIMP
392
 
totemScriptablePlugin::SetRate(double aRate)
393
 
{
394
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
395
 
 
396
 
  return NS_OK;
397
 
}
398
 
 
399
 
/* totemIConeAudio */
400
 
#undef TOTEM_SCRIPTABLE_INTERFACE
401
 
#define TOTEM_SCRIPTABLE_INTERFACE "totemIConeAudio"
402
 
 
403
 
/* attribute boolean mute */
404
 
NS_IMETHODIMP
405
 
totemScriptablePlugin::GetMute(PRBool *_retval)
406
 
{
407
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
408
 
 
409
 
  *_retval = mMute;
410
 
  return NS_OK;
411
 
}
412
 
 
413
 
NS_IMETHODIMP
414
 
totemScriptablePlugin::SetMute(PRBool enabled)
415
 
{
416
 
  nsresult rv;
417
 
 
418
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
419
 
 
420
 
  NS_ENSURE_STATE (IsValid ());
421
 
 
422
 
  if (enabled == PR_FALSE) {
423
 
    mMute = PR_FALSE;
424
 
    rv = mPlugin->SetVolume (mSavedVolume);
425
 
  } else {
426
 
    mMute = PR_TRUE;
427
 
    mSavedVolume = mPlugin->mVolume;
428
 
    rv = mPlugin->SetVolume (0);
429
 
  };
430
 
 
431
 
  return rv;
432
 
}
433
 
 
434
 
/* attribute long volume */
435
 
NS_IMETHODIMP
436
 
totemScriptablePlugin::GetVolume(PRInt32 *_retval)
437
 
{
438
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
439
 
 
440
 
  NS_ENSURE_STATE (IsValid ());
441
 
 
442
 
  *_retval = (PRInt32) (mPlugin->mVolume * 200.0);
443
 
  return NS_OK;
444
 
}
445
 
 
446
 
NS_IMETHODIMP
447
 
totemScriptablePlugin::SetVolume(PRInt32 aVolume)
448
 
{
449
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
450
 
 
451
 
  NS_ENSURE_STATE (IsValid ());
452
 
 
453
 
  nsresult rv = mPlugin->SetVolume ((double) aVolume / 200.0);
454
 
 
455
 
  /* Volume passed in is 0 through to 200 */
456
 
  mPlugin->mVolume = (double) aVolume / 200.0;
457
 
 
458
 
  return rv;
459
 
}
460
 
 
461
 
/* attribute long track */
462
 
NS_IMETHODIMP
463
 
totemScriptablePlugin::GetTrack(PRInt32 *_retval)
464
 
{
465
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
466
 
 
467
 
  return NS_ERROR_NOT_IMPLEMENTED;
468
 
}
469
 
 
470
 
NS_IMETHODIMP
471
 
totemScriptablePlugin::SetTrack(PRInt32 aTrack)
472
 
{
473
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
474
 
 
475
 
  return NS_ERROR_NOT_IMPLEMENTED;
476
 
}
477
 
 
478
 
/* attribute long channel */
479
 
NS_IMETHODIMP
480
 
totemScriptablePlugin::GetChannel(PRInt32 *_retval)
481
 
{
482
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
483
 
 
484
 
  return NS_ERROR_NOT_IMPLEMENTED;
485
 
}
486
 
 
487
 
NS_IMETHODIMP
488
 
totemScriptablePlugin::SetChannel(PRInt32 aChannel)
489
 
{
490
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
491
 
 
492
 
  return NS_ERROR_NOT_IMPLEMENTED;
493
 
}
494
 
/* void toggleMute () */
495
 
NS_IMETHODIMP
496
 
totemScriptablePlugin::ToggleMute()
497
 
{
498
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
499
 
 
500
 
  return SetMute (!mMute);
501
 
}
502
 
 
503
 
/* totemIConeAudio */
504
 
#undef TOTEM_SCRIPTABLE_INTERFACE
505
 
#define TOTEM_SCRIPTABLE_INTERFACE "totemIConeVideo"
506
 
 
507
 
/* readonly attribute long width */
508
 
NS_IMETHODIMP
509
 
totemScriptablePlugin::GetWidth (PRInt32 *aWidth)
510
 
{
511
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
512
 
 
513
 
  return NS_ERROR_NOT_IMPLEMENTED;
514
 
}
515
 
 
516
 
/* readonly attribute long height */
517
 
NS_IMETHODIMP
518
 
totemScriptablePlugin::GetHeight (PRInt32 *aHeight)
519
 
{
520
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
521
 
 
522
 
  return NS_ERROR_NOT_IMPLEMENTED;
523
 
}
524
 
 
525
 
/* attribute boolean fullscreen */
526
 
NS_IMETHODIMP
527
 
totemScriptablePlugin::GetFullscreen(PRBool *_retval)
528
 
{
529
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
530
 
 
531
 
  NS_ENSURE_STATE (IsValid ());
532
 
 
533
 
  *_retval = mPlugin->mIsFullscreen;
534
 
 
535
 
  return NS_OK;
536
 
}
537
 
 
538
 
NS_IMETHODIMP
539
 
totemScriptablePlugin::SetFullscreen(PRBool enabled)
540
 
{
541
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
542
 
 
543
 
  NS_ENSURE_STATE (IsValid ());
544
 
 
545
 
  nsresult rv = mPlugin->SetFullscreen (enabled);
546
 
 
547
 
  mPlugin->mIsFullscreen = enabled != PR_FALSE;
548
 
 
549
 
  return NS_OK;
550
 
}
551
 
 
552
 
/* attribute AUTF8String aspectRatio */
553
 
NS_IMETHODIMP
554
 
totemScriptablePlugin::GetAspectRatio(nsACString & aAspectRatio)
555
 
{
556
 
//  aVersionInfo.Assign (TOTEM_CONE_VERSION);
557
 
//  return NS_OK;
558
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
559
 
 
560
 
  return NS_ERROR_NOT_IMPLEMENTED;
561
 
}
562
 
 
563
 
NS_IMETHODIMP
564
 
totemScriptablePlugin::SetAspectRatio(const nsACString & aAspectRatio)
565
 
{
566
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
567
 
 
568
 
  return NS_ERROR_NOT_IMPLEMENTED;
569
 
}
570
 
/* attribute long subtitle */
571
 
NS_IMETHODIMP 
572
 
totemScriptablePlugin::GetSubtitle(PRInt32 *aSubtitle)
573
 
{
574
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
575
 
 
576
 
  return NS_ERROR_NOT_IMPLEMENTED;
577
 
}
578
 
 
579
 
NS_IMETHODIMP 
580
 
totemScriptablePlugin::SetSubtitle(PRInt32 aSubtitle)
581
 
{
582
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
583
 
 
584
 
  return NS_ERROR_NOT_IMPLEMENTED;
585
 
}
586
 
 
587
 
/* attribute long teletext */
588
 
NS_IMETHODIMP 
589
 
totemScriptablePlugin::GetTeletext(PRInt32 *aTeletext)
590
 
{
591
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
592
 
 
593
 
  return NS_ERROR_NOT_IMPLEMENTED;
594
 
}
595
 
 
596
 
NS_IMETHODIMP 
597
 
totemScriptablePlugin::SetTeletext(PRInt32 aTeletext)
598
 
{
599
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED ();
600
 
 
601
 
  return NS_ERROR_NOT_IMPLEMENTED;
602
 
}
603
 
 
604
 
/* void toggleFullscreen () */
605
 
NS_IMETHODIMP
606
 
totemScriptablePlugin::ToggleFullscreen()
607
 
{
608
 
  TOTEM_SCRIPTABLE_LOG_ACCESS ();
609
 
 
610
 
  NS_ENSURE_STATE (IsValid ());
611
 
 
612
 
  nsresult rv = mPlugin->SetFullscreen (!mPlugin->mIsFullscreen);
613
 
 
614
 
  mPlugin->mIsFullscreen = !mPlugin->mIsFullscreen;
615
 
 
616
 
  return NS_OK;
617
 
}
618
 
 
619
 
/* void toggleTeletext () */
620
 
NS_IMETHODIMP
621
 
totemScriptablePlugin::ToggleTeletext()
622
 
{
623
 
  TOTEM_SCRIPTABLE_WARN_UNIMPLEMENTED();
624
 
 
625
 
  return NS_ERROR_NOT_IMPLEMENTED;
626
 
}
627