PageRenderTime 63ms CodeModel.GetById 34ms app.highlight 6ms RepoModel.GetById 12ms app.codeStats 0ms

/indra/newview/llviewerparcelmedia.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 97 lines | 40 code | 20 blank | 37 comment | 0 complexity | 38c8b30630643b2e628c5841f2ae7621 MD5 | raw file
 1/**
 2 * @file llviewerparcelmedia.h
 3 * @brief Handlers for multimedia on a per-parcel basis
 4 *
 5 * $LicenseInfo:firstyear=2007&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LLVIEWERPARCELMEDIA_H
28#define LLVIEWERPARCELMEDIA_H
29
30#include "llviewermedia.h"
31
32class LLMessageSystem;
33class LLParcel;
34class LLViewerParcelMediaNavigationObserver;
35
36
37// This class understands land parcels, network traffic, LSL media
38// transport commands, and talks to the LLViewerMedia class to actually
39// do playback.  It allows us to remove code from LLViewerParcelMgr.
40class LLViewerParcelMedia : public LLViewerMediaObserver
41{
42	LOG_CLASS(LLViewerParcelMedia);
43	public:
44		static void initClass();
45		static void cleanupClass();
46
47		static void update(LLParcel* parcel);
48			// called when the agent's parcel has a new URL, or the agent has
49			// walked on to a new parcel with media
50
51		static void play(LLParcel* parcel);
52			// user clicked play button in media transport controls
53
54		static void stop();
55			// user clicked stop button in media transport controls
56
57		static void pause();
58		static void start();
59			// restart after pause - no need for all the setup
60
61		static void focus(bool focus);
62
63		static void seek(F32 time);
64		    // jump to timecode time
65
66		static LLPluginClassMediaOwner::EMediaStatus getStatus();
67		static std::string getMimeType();
68		static std::string getURL();
69		static std::string getName();
70		static viewer_media_t getParcelMedia();
71
72		static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** );
73		static void processParcelMediaUpdate( LLMessageSystem *msg, void ** );
74		static void sendMediaNavigateMessage(const std::string& url);
75		
76		// inherited from LLViewerMediaObserver
77		virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
78
79	public:
80		static S32 sMediaParcelLocalID;
81		static LLUUID sMediaRegionID;
82		// HACK: this will change with Media on a Prim
83		static viewer_media_t sMediaImpl;
84};
85
86
87class LLViewerParcelMediaNavigationObserver
88{
89public:
90	std::string mCurrentURL;
91	bool mFromMessage;
92
93	// void onNavigateComplete( const EventType& event_in );
94
95};
96
97#endif