~afafaf4/totem/totemubuntu

« back to all changes in this revision

Viewing changes to browser-plugin/totemConePlaylistItems.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 © 2004 Bastien Nocera <hadess@hadess.net>
 
4
 * Copyright © 2002 David A. Schleef <ds@schleef.org>
 
5
 * Copyright © 2006, 2008 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., 51 Franklin Street, Fifth Floor,
 
20
 * Boston, MA 02110-1301  USA.
 
21
 */
 
22
 
 
23
#include <config.h>
 
24
 
 
25
#include <string.h>
 
26
 
 
27
#include <glib.h>
 
28
 
 
29
#include "totemPlugin.h"
 
30
#include "totemConePlaylistItems.h"
 
31
 
 
32
static const char *propertyNames[] = {
 
33
  "count"
 
34
};
 
35
 
 
36
static const char *methodNames[] = {
 
37
  "clear"
 
38
};
 
39
 
 
40
TOTEM_IMPLEMENT_NPCLASS (totemConePlaylistItems,
 
41
                         propertyNames, G_N_ELEMENTS (propertyNames),
 
42
                         methodNames, G_N_ELEMENTS (methodNames),
 
43
                         NULL);
 
44
 
 
45
totemConePlaylistItems::totemConePlaylistItems (NPP aNPP)
 
46
  : totemNPObject (aNPP)
 
47
{
 
48
  TOTEM_LOG_CTOR ();
 
49
}
 
50
 
 
51
totemConePlaylistItems::~totemConePlaylistItems ()
 
52
{
 
53
  TOTEM_LOG_DTOR ();
 
54
}
 
55
 
 
56
bool
 
57
totemConePlaylistItems::InvokeByIndex (int aIndex,
 
58
                                       const NPVariant *argv,
 
59
                                       uint32_t argc,
 
60
                                       NPVariant *_result)
 
61
{
 
62
  TOTEM_LOG_INVOKE (aIndex, totemConePlaylistItems);
 
63
 
 
64
  switch (Methods (aIndex)) {
 
65
    case eClear:
 
66
      Plugin()->ClearPlaylist ();
 
67
      return VoidVariant (_result);
 
68
  }
 
69
 
 
70
  return false;
 
71
}
 
72
 
 
73
bool
 
74
totemConePlaylistItems::GetPropertyByIndex (int aIndex,
 
75
                                            NPVariant *_result)
 
76
{
 
77
  TOTEM_LOG_GETTER (aIndex, totemConePlaylistItems);
 
78
 
 
79
  switch (Properties (aIndex)) {
 
80
    case eCount:
 
81
      TOTEM_WARN_GETTER_UNIMPLEMENTED (aIndex, totemConePlaylistItems);
 
82
      return Int32Variant (_result, 1);
 
83
  }
 
84
 
 
85
  return false;
 
86
}
 
87
 
 
88
bool
 
89
totemConePlaylistItems::SetPropertyByIndex (int aIndex,
 
90
                                            const NPVariant *aValue)
 
91
{
 
92
  TOTEM_LOG_SETTER (aIndex, totemConePlaylistItems);
 
93
 
 
94
  return ThrowPropertyNotWritable ();
 
95
}