|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Server-side base-classes for graphic drawer plugins |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __WSPLUGIN_H__ |
|
19 #define __WSPLUGIN_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32std.h> |
|
23 |
|
24 #include <graphics/wsgraphicdrawerinterface.h> |
|
25 |
|
26 /** |
|
27 Window Server interface to the Window Server plugin API. |
|
28 |
|
29 @publishedPartner |
|
30 @prototype |
|
31 */ |
|
32 class CWsPlugin : public CBase, public MWsObjectProvider |
|
33 { |
|
34 private: |
|
35 class CPimpl; |
|
36 friend class CPimpl; |
|
37 |
|
38 public: |
|
39 /** |
|
40 This function should be overriden by all derived classes. The first |
|
41 call the implementation of this function should make is to BaseConstructL(). |
|
42 @param aEnv the environment this drawer exists in |
|
43 @param aData arbitrary data for constructing this instance, sent from |
|
44 the client. |
|
45 */ |
|
46 virtual void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TDesC8& aData) = 0; |
|
47 IMPORT_C ~CWsPlugin(); |
|
48 IMPORT_C virtual const TDesC & PluginName() const; |
|
49 |
|
50 static TInt DtorIDKeyOffset() { return _FOFF(CWsPlugin,iDtor_ID_Key); } |
|
51 |
|
52 protected: |
|
53 IMPORT_C CWsPlugin(); |
|
54 IMPORT_C void BaseConstructL(MWsGraphicDrawerEnvironment& aEnv); |
|
55 IMPORT_C MWsGraphicDrawerEnvironment& Env(); |
|
56 IMPORT_C const MWsGraphicDrawerEnvironment& Env() const; |
|
57 |
|
58 private: |
|
59 CWsPlugin(const CWsPlugin &); // no implementation |
|
60 CWsPlugin & operator=(const CWsPlugin &); // no implementation |
|
61 |
|
62 private: |
|
63 TUid iDtor_ID_Key; |
|
64 CPimpl* iPimpl; |
|
65 }; |
|
66 |
|
67 |
|
68 #endif //#ifndef __WSPLUGIN_H__ |