diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmedia/llmediaimplregister.h (renamed from linden/indra/llmedia/llmediaemitterevents.h) | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/linden/indra/llmedia/llmediaemitterevents.h b/linden/indra/llmedia/llmediaimplregister.h index 8a4111b..a4b802f 100644 --- a/linden/indra/llmedia/llmediaemitterevents.h +++ b/linden/indra/llmedia/llmediaimplregister.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /** | 1 | /** |
2 | * @file llmediaemitterevents.h | 2 | * @file llmediaimplregister.h |
3 | * @brief LLMedia support - events emitted by emitter to observer. | 3 | * @brief Allow impls to register themselves with the impl factory |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2005&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2005-2008, Linden Research, Inc. | 7 | * Copyright (c) 2007-2008, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -29,33 +29,31 @@ | |||
29 | * $/LicenseInfo$ | 29 | * $/LicenseInfo$ |
30 | */ | 30 | */ |
31 | 31 | ||
32 | // header guard | 32 | #ifndef LLIMEDIAIMPLREGISTER_H |
33 | #ifndef llmediaemitterevents_h | 33 | #define LLIMEDIAIMPLREGISTER_H |
34 | #define llmediaemitterevents_h | ||
35 | 34 | ||
36 | #include "stdtypes.h" | 35 | #include <string> |
37 | 36 | ||
37 | #include "llmediaimplfactory.h" | ||
38 | 38 | ||
39 | class LLMediaEvent | 39 | /////////////////////////////////////////////////////////////////////////////// |
40 | // | ||
41 | class LLMediaImplRegister | ||
40 | { | 42 | { |
41 | public: | 43 | public: |
42 | LLMediaEvent ( S32 actionIn, const LLString& urlIn, void* data = NULL ): | 44 | LLMediaImplRegister( std::string impl_name, LLMediaImplMaker* impl_maker ) : |
43 | action ( actionIn ), | 45 | mImplName( impl_name ) |
44 | url ( urlIn ), | 46 | { |
45 | mData(data) | 47 | LLMediaImplFactory::getInstance()->registerImpl( impl_name, impl_maker ); |
46 | { } | 48 | }; |
47 | 49 | ||
48 | virtual ~LLMediaEvent () { } | 50 | std::string getImplName() |
49 | 51 | { | |
50 | S32 getAction () const { return action; } | 52 | return mImplName; |
51 | LLString getUrl () const { return url; } | 53 | }; |
52 | void* getData() const { return mData; } | ||
53 | 54 | ||
54 | private: | 55 | private: |
55 | S32 action; | 56 | std::string mImplName; |
56 | std::string url; | ||
57 | void* mData; | ||
58 | }; | 57 | }; |
59 | 58 | ||
60 | 59 | #endif // LLIMEDIAIMPLREGISTER_H | |
61 | #endif // llmediaemitterevents_h | ||