diff options
Diffstat (limited to '')
-rwxr-xr-x | linden/indra/llplugin/llpluginclassmediaowner.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/linden/indra/llplugin/llpluginclassmediaowner.h b/linden/indra/llplugin/llpluginclassmediaowner.h new file mode 100755 index 0000000..9d1f352 --- /dev/null +++ b/linden/indra/llplugin/llpluginclassmediaowner.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /** | ||
2 | * @file llpluginclassmediaowner.h | ||
3 | * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class. | ||
4 | * | ||
5 | * @cond | ||
6 | * $LicenseInfo:firstyear=2008&license=viewergpl$ | ||
7 | * | ||
8 | * Copyright (c) 2008-2010, Linden Research, Inc. | ||
9 | * | ||
10 | * Second Life Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
12 | * to you under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
14 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
16 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
17 | * | ||
18 | * There are special exceptions to the terms and conditions of the GPL as | ||
19 | * it is applied to this Source Code. View the full text of the exception | ||
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
21 | * online at | ||
22 | * http://secondlife.com/developers/opensource/flossexception | ||
23 | * | ||
24 | * By copying, modifying or distributing this software, you acknowledge | ||
25 | * that you have read and understood your obligations described above, | ||
26 | * and agree to abide by those obligations. | ||
27 | * | ||
28 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
29 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
30 | * COMPLETENESS OR PERFORMANCE. | ||
31 | * $/LicenseInfo$ | ||
32 | * | ||
33 | * @endcond | ||
34 | */ | ||
35 | |||
36 | #ifndef LL_LLPLUGINCLASSMEDIAOWNER_H | ||
37 | #define LL_LLPLUGINCLASSMEDIAOWNER_H | ||
38 | |||
39 | #include "llpluginprocessparent.h" | ||
40 | #include "llrect.h" | ||
41 | #include <queue> | ||
42 | |||
43 | class LLPluginClassMedia; | ||
44 | class LLPluginCookieStore; | ||
45 | |||
46 | class LLPluginClassMediaOwner | ||
47 | { | ||
48 | public: | ||
49 | typedef enum | ||
50 | { | ||
51 | MEDIA_EVENT_CONTENT_UPDATED, // contents/dirty rect have updated | ||
52 | MEDIA_EVENT_TIME_DURATION_UPDATED, // current time and/or duration have updated | ||
53 | MEDIA_EVENT_SIZE_CHANGED, // media size has changed | ||
54 | MEDIA_EVENT_CURSOR_CHANGED, // plugin has requested a cursor change | ||
55 | |||
56 | MEDIA_EVENT_NAVIGATE_BEGIN, // browser has begun navigation | ||
57 | MEDIA_EVENT_NAVIGATE_COMPLETE, // browser has finished navigation | ||
58 | MEDIA_EVENT_PROGRESS_UPDATED, // browser has updated loading progress | ||
59 | MEDIA_EVENT_STATUS_TEXT_CHANGED, // browser has updated the status text | ||
60 | MEDIA_EVENT_NAME_CHANGED, // browser has updated the name of the media (typically <title> tag) | ||
61 | MEDIA_EVENT_LOCATION_CHANGED, // browser location (URL) has changed (maybe due to internal navagation/frames/etc) | ||
62 | MEDIA_EVENT_CLICK_LINK_HREF, // I'm not entirely sure what the semantics of these two are | ||
63 | MEDIA_EVENT_CLICK_LINK_NOFOLLOW, | ||
64 | |||
65 | MEDIA_EVENT_PLUGIN_FAILED_LAUNCH, // The plugin failed to launch | ||
66 | MEDIA_EVENT_PLUGIN_FAILED // The plugin died unexpectedly | ||
67 | |||
68 | } EMediaEvent; | ||
69 | |||
70 | typedef enum | ||
71 | { | ||
72 | MEDIA_NONE, // Uninitialized -- no useful state | ||
73 | MEDIA_LOADING, // loading or navigating | ||
74 | MEDIA_LOADED, // navigation/preroll complete | ||
75 | MEDIA_ERROR, // navigation/preroll failed | ||
76 | MEDIA_PLAYING, // playing (only for time-based media) | ||
77 | MEDIA_PAUSED, // paused (only for time-based media) | ||
78 | MEDIA_DONE // finished playing (only for time-based media) | ||
79 | |||
80 | } EMediaStatus; | ||
81 | |||
82 | virtual ~LLPluginClassMediaOwner() {}; | ||
83 | virtual void handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent /*event*/) {}; | ||
84 | virtual void handleCookieSet(LLPluginClassMedia* /*self*/, const std::string &/*cookie*/) {}; | ||
85 | }; | ||
86 | |||
87 | #endif // LL_LLPLUGINCLASSMEDIAOWNER_H | ||