~woodrow-shen/totem/mybranch

« back to all changes in this revision

Viewing changes to browser-plugin/totemComplexPlugin.h

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 Complex Plugin scriptable
 
1
/* Totem Complex plugin
2
2
 *
3
 
 * Copyright (C) 2004 Bastien Nocera <hadess@hadess.net>
4
 
 * Copyright (C) 2002 David A. Schleef <ds@schleef.org>
 
3
 * Copyright © 2004 Bastien Nocera <hadess@hadess.net>
 
4
 * Copyright © 2002 David A. Schleef <ds@schleef.org>
 
5
 * Copyright © 2006, 2007, 2008 Christian Persch
5
6
 *
6
7
 * This library is free software; you can redistribute it and/or
7
8
 * modify it under the terms of the GNU Library General Public
15
16
 *
16
17
 * You should have received a copy of the GNU Library General Public
17
18
 * License along with this library; if not, write to the
18
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 
 * Boston, MA 02111-1307, USA.
20
 
 *
21
 
 * $Id: totemComplexPlugin.h 5132 2008-02-15 23:52:58Z hadess $
 
19
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
20
 * Boston, MA 02110-1301  USA.
22
21
 */
23
22
 
24
 
#ifndef __COMPLEX_PLUGIN_H__
25
 
#define __COMPLEX_PLUGIN_H__
26
 
 
27
 
#include <nsIClassInfo.h>
28
 
 
29
 
#include "totemIComplexPlayer.h"
30
 
#include "totemPlugin.h"
31
 
 
32
 
class totemScriptablePlugin : public totemIComplexPlayer,
33
 
                              public nsIClassInfo
 
23
#ifndef __TOTEM_COMPLEX_PLAYER_H__
 
24
#define __TOTEM_COMPLEX_PLAYER_H__
 
25
 
 
26
#include "totemNPClass.h"
 
27
#include "totemNPObject.h"
 
28
 
 
29
class totemComplexPlugin : public totemNPObject
34
30
{
35
31
  public:
36
 
    NS_DECL_ISUPPORTS
37
 
    NS_DECL_TOTEMICOMPLEXPLAYER
38
 
    NS_DECL_NSICLASSINFO
39
 
 
40
 
    void* operator new (size_t aSize) CPP_THROW_NEW;
41
 
 
42
 
    totemScriptablePlugin (totemPlugin *aPlugin);
43
 
 
44
 
    PRBool IsValid () { return mPlugin != nsnull; }
45
 
    void SetPlugin (totemPlugin *aPlugin) { mPlugin = aPlugin; }
46
 
 
47
 
    static char *PluginDescription ();
48
 
    static char *PluginLongDescription();
49
 
    static void PluginMimeTypes (const totemPluginMimeEntry **, PRUint32 *);
 
32
    totemComplexPlugin (NPP);
 
33
    virtual ~totemComplexPlugin ();
 
34
 
50
35
  private:
51
 
    ~totemScriptablePlugin ();
52
 
 
53
 
    totemPlugin *mPlugin;
54
 
 
55
 
    PRInt32 mNumLoops;
56
 
 
57
 
    nsCString mAuthor;
58
 
    nsCString mBackgroundColour;
59
 
    nsCString mCopywrong;
60
 
    nsCString mSource;
61
 
    nsCString mTitle;
62
 
 
63
 
    enum PlayState {
64
 
      eState_Stopped,
65
 
      eState_Contacting,
66
 
      eState_Buffering,
67
 
      eState_Playing,
68
 
      eState_Paused,
69
 
      eState_Seeking
70
 
    };
71
 
 
72
 
    enum ErrorSeverity {
73
 
      eErrorSeverity_Panic,
74
 
      eErrorSeverity_Severe,
75
 
      eErrorSeverity_Critical,
76
 
      eErrorSeverity_General,
77
 
      eErrorSeverity_Warning,
78
 
      eErrorSeverity_Notice,
79
 
      eErrorSeverity_Informational,
80
 
      eErrorSeverity_Debug
81
 
    };
82
 
 
83
 
    PRUint32 mPlayState : 3; /* PlayState enum values have to fit */
84
 
 
85
 
    PRUint32 mAutoGoToURL : 1;
86
 
    PRUint32 mAutoStart : 1;
87
 
    PRUint32 mCentred : 1;
88
 
    PRUint32 mConsoleEvents : 1;
89
 
    PRUint32 mContextMenu : 1;
90
 
    PRUint32 mDoubleSize : 1;
91
 
    PRUint32 mFullscreen : 1;
92
 
    PRUint32 mMessageBox : 1;
93
 
    PRUint32 mOriginalSize : 1;
94
 
    PRUint32 mImageStatus : 1;
95
 
    PRUint32 mLoop : 1;
96
 
    PRUint32 mMaintainAspect : 1;
97
 
    PRUint32 mMute : 1;
98
 
    PRUint32 mNoLabels : 1;
99
 
    PRUint32 mNoLogo : 1;
100
 
    PRUint32 mPrefetch : 1;
101
 
    PRUint32 mShowAbout : 1;
102
 
    PRUint32 mShowPrefs : 1;
103
 
    PRUint32 mShowStats : 1;
104
 
    PRUint32 mShuffle : 1;
105
 
    PRUint32 mWantErrors : 1;
106
 
    PRUint32 mWantKeyEvents : 1;
107
 
    PRUint32 mWantMouseEvents : 1;
108
 
    PRUint32 mZoomed : 1;
 
36
    enum Methods {
 
37
      eCanPause,
 
38
      eCanPlay,
 
39
      eCanStop,
 
40
      eDoGotoURL,
 
41
      eDoNextEntry,
 
42
      eDoPause,
 
43
      eDoPlay,
 
44
      eDoPrevEntry,
 
45
      eDoStop,
 
46
      eGetAuthor,
 
47
      eGetAutoGoToURL,
 
48
      eGetAutoStart,
 
49
      eGetBackgroundColor,
 
50
      eGetBandwidthAverage,
 
51
      eGetBandwidthCurrent,
 
52
      eGetBufferingTimeElapsed,
 
53
      eGetBufferingTimeRemaining,
 
54
      eGetCanSeek,
 
55
      eGetCenter,
 
56
      eGetClipHeight,
 
57
      eGetClipWidth,
 
58
      eGetConnectionBandwidth,
 
59
      eGetConsole,
 
60
      eGetConsoleEvents,
 
61
      eGetControls,
 
62
      eGetCopyright,
 
63
      eGetCurrentEntry,
 
64
      eGetDoubleSize,
 
65
      eGetDRMInfo,
 
66
      eGetEnableContextMenu,
 
67
      eGetEnableDoubleSize,
 
68
      eGetEnableFullScreen,
 
69
      eGetEnableOriginalSize,
 
70
      eGetEntryAbstract,
 
71
      eGetEntryAuthor,
 
72
      eGetEntryCopyright,
 
73
      eGetEntryTitle,
 
74
      eGetFullScreen,
 
75
      eGetImageStatus,
 
76
      eGetIsPlus,
 
77
      eGetLastErrorMoreInfoURL,
 
78
      eGetLastErrorRMACode,
 
79
      eGetLastErrorSeverity,
 
80
      eGetLastErrorUserCode,
 
81
      eGetLastErrorUserString,
 
82
      eGetLastMessage,
 
83
      eGetLastStatus,
 
84
      eGetLength,
 
85
      eGetLiveState,
 
86
      eGetLoop,
 
87
      eGetMaintainAspect,
 
88
      eGetMute,
 
89
      eGetNoLogo,
 
90
      eGetNumEntries,
 
91
      eGetNumLoop,
 
92
      eGetNumSources,
 
93
      eGetOriginalSize,
 
94
      eGetPacketsEarly,
 
95
      eGetPacketsLate,
 
96
      eGetPacketsMissing,
 
97
      eGetPacketsOutOfOrder,
 
98
      eGetPacketsReceived,
 
99
      eGetPacketsTotal,
 
100
      eGetPlayState,
 
101
      eGetPosition,
 
102
      eGetPreferedLanguageID,
 
103
      eGetPreferedLanguageString,
 
104
      eGetPreferredLanguageID,
 
105
      eGetPreferredLanguageString,
 
106
      eGetPreFetch,
 
107
      eGetShowAbout,
 
108
      eGetShowPreferences,
 
109
      eGetShowStatistics,
 
110
      eGetShuffle,
 
111
      eGetSource,
 
112
      eGetSourceTransport,
 
113
      eGetStereoState,
 
114
      eGetTitle,
 
115
      eGetUserCountryID,
 
116
      eGetVersionInfo,
 
117
      eGetVolume,
 
118
      eGetWantErrors,
 
119
      eGetWantKeyboardEvents,
 
120
      eGetWantMouseEvents,
 
121
      eHasNextEntry,
 
122
      eHasPrevEntry,
 
123
      eSetAuthor,
 
124
      eSetAutoGoToURL,
 
125
      eSetAutoStart,
 
126
      eSetBackgroundColor,
 
127
      eSetCanSeek,
 
128
      eSetCenter,
 
129
      eSetConsole,
 
130
      eSetConsoleEvents,
 
131
      eSetControls,
 
132
      eSetCopyright,
 
133
      eSetDoubleSize,
 
134
      eSetEnableContextMenu,
 
135
      eSetEnableDoubleSize,
 
136
      eSetEnableFullScreen,
 
137
      eSetEnableOriginalSize,
 
138
      eSetFullScreen,
 
139
      eSetImageStatus,
 
140
      eSetLoop,
 
141
      eSetMaintainAspect,
 
142
      eSetMute,
 
143
      eSetNoLogo,
 
144
      eSetNumLoop,
 
145
      eSetOriginalSize,
 
146
      eSetPosition,
 
147
      eSetPreFetch,
 
148
      eSetShowAbout,
 
149
      eSetShowPreferences,
 
150
      eSetShowStatistics,
 
151
      eSetShuffle,
 
152
      eSetSource,
 
153
      eSetTitle,
 
154
      eSetVolume,
 
155
      eSetWantErrors,
 
156
      eSetWantKeyboardEvents,
 
157
      eSetWantMouseEvents
 
158
    };
 
159
 
 
160
    virtual bool InvokeByIndex (int aIndex, const NPVariant *argv, uint32_t argc, NPVariant *_result);
109
161
};
110
162
 
111
 
#endif /* __COMPLEX_PLUGIN_H__ */
 
163
TOTEM_DEFINE_NPCLASS (totemComplexPlugin);
 
164
 
 
165
#endif /* __TOTEM_COMPLEX_PLAYER_H__ */