aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia/llmediaimplcommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmedia/llmediaimplcommon.h')
-rw-r--r--linden/indra/llmedia/llmediaimplcommon.h164
1 files changed, 0 insertions, 164 deletions
diff --git a/linden/indra/llmedia/llmediaimplcommon.h b/linden/indra/llmedia/llmediaimplcommon.h
deleted file mode 100644
index 845429c..0000000
--- a/linden/indra/llmedia/llmediaimplcommon.h
+++ /dev/null
@@ -1,164 +0,0 @@
1/**
2 * @file llmediaimplcommon.h
3 * @brief Common impl functionality
4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33#ifndef LLMEDIAIMPLCOMMON_H
34#define LLMEDIAIMPLCOMMON_H
35
36#include "llmediabase.h"
37#include "llmediaemitter.h"
38#include "llmediaobserver.h"
39
40#include <string>
41
42class LLMediaImplMakerBase;
43
44class LLMediaImplCommon :
45 public LLMediaBase
46{
47 public:
48 LLMediaImplCommon();
49 virtual ~LLMediaImplCommon();
50
51 ////////////////////////////////////////////////////////////////////////////////
52 // begin: default implementation of the abstract interface
53 // see llmediabase.h for documentation
54
55 // housekeeping
56 virtual bool init();
57 virtual bool reset();
58 virtual bool setDebugLevel( LLMediaBase::EDebugLevel level );
59 virtual bool setMimeType( const std::string url );
60 virtual std::string getMimeType() const;
61 virtual std::string getMediaURL() const;
62 virtual std::string getVersion();
63 virtual bool set404RedirectUrl( std::string redirect_url );
64 virtual bool clr404RedirectUrl();
65 virtual bool setBackgroundColor( unsigned int red, unsigned int green, unsigned int blue ) const;
66 virtual bool setCaretColor( unsigned int red, unsigned int green, unsigned int blue ) const;
67
68 // media management
69 virtual bool updateMedia();
70 virtual bool setRequestedMediaSize( int width, int height );
71 virtual int getMediaWidth() const;
72 virtual int getMediaHeight() const;
73 virtual int getMediaDepth() const;
74 virtual int getMediaBufferSize() const;
75 virtual unsigned char* getMediaData();
76 virtual int getMediaDataWidth() const;
77 virtual int getMediaDataHeight() const;
78
79 // texture management
80 virtual int getTextureFormatInternal() const;
81 virtual int getTextureFormatPrimary() const;
82 virtual int getTextureFormatType() const;
83
84 // audio
85 virtual bool setVolume( float volume );
86 virtual float getVolume() const;
87
88 // transport control
89 virtual bool addCommand( ECommand cmd );
90 virtual bool clearCommand();
91 virtual bool updateCommand();
92 LLMediaBase::ECommand nextCommand();
93 virtual LLMediaBase::EStatus getStatus();
94 bool setStatus( LLMediaBase::EStatus status );
95
96 virtual bool seek( double time );
97 virtual bool setLooping(bool enable) { mLooping = enable; return true; }
98 virtual bool isLooping() { return mLooping; }
99 virtual bool navigateTo( const std::string url );
100
101 // scaling
102 virtual bool setAutoScaled( bool auto_scaled );
103 virtual bool isAutoScaled() const;
104
105 // mouse and keyboard interaction
106 virtual bool mouseDown( int x_pos, int y_pos );
107 virtual bool mouseUp( int x_pos, int y_pos );
108 virtual bool mouseMove( int x_pos, int y_pos );
109 virtual bool keyPress( int key_code );
110 virtual bool scrollByLines( int lines );
111 virtual bool focus( bool focus );
112 virtual bool unicodeInput( unsigned long uni_char );
113 virtual bool mouseLeftDoubleClick( int x_pos, int y_pos );
114
115 // navigation
116 virtual bool navigateForward();
117 virtual bool navigateBack();
118 virtual bool canNavigateForward();
119 virtual bool canNavigateBack();
120
121 // caching/cookies
122 virtual bool enableCookies( bool enable );
123 virtual bool clearCache();
124 virtual bool clearCookies();
125
126 virtual bool enableProxy(bool enable, std::string proxy_host_name, int proxy_port);
127
128 // observer interface
129 bool addObserver( LLMediaObserver* subject );
130 bool remObserver( LLMediaObserver* subject );
131
132 // type registry interface
133 void setImplMaker(LLMediaImplMakerBase* impl_maker);
134 bool supportsMediaType(std::string scheme, std::string type);
135
136 protected:
137 virtual bool setMediaSize( int width, int height );
138 virtual bool setMediaDepth( int media_depth );
139
140 LLMediaEmitter< LLMediaObserver > mEventEmitter;
141
142 // Back pointer to the construction object, which is used to discover types handled
143 // by the Impl, and meta data associated with the Impl.
144 LLMediaImplMakerBase* mImplMaker;
145 std::string mMimeType;
146 std::string mInitialURL;
147 bool mAutoScaled;
148 int mMediaWidth;
149 int mMediaPrevWidth;
150 int mMediaHeight;
151 int mMediaPrevHeight;
152 int mMediaDepth;
153 int mMediaPrevDepth;
154 int mMediaRowSpan;
155 int mMediaRequestedWidth;
156 int mMediaRequestedHeight;
157 float mVolume;
158 LLMediaBase::ECommand mCommand;
159 LLMediaBase::EStatus mStatus;
160 bool mLooping;
161 LLMediaBase::EDebugLevel mDebugLevel;
162};
163
164#endif // LLMEDIAIMPLCOMMON_H