|
1 // Copyright (c) 2007-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 // The base class for window server plugins |
|
15 // Interface ID : 0x2001B709 |
|
16 // DLL ID : 0x2001B70B |
|
17 // |
|
18 // |
|
19 |
|
20 #include "Graphics/WSPLUGIN.H" |
|
21 #include <s32mem.h> |
|
22 |
|
23 _LIT(KPluginName, "unnamed"); |
|
24 |
|
25 // CWsPlugin::CPimpl \\\\\\\\\\\\\\\\\\\\\\\\ |
|
26 |
|
27 /** @internalComponent |
|
28 @released |
|
29 */ |
|
30 NONSHARABLE_CLASS(CWsPlugin::CPimpl): public CBase |
|
31 { |
|
32 public: |
|
33 CPimpl(CWsPlugin& aGraphic,MWsGraphicDrawerEnvironment& aEnv); |
|
34 CWsPlugin& iPlugin; |
|
35 MWsGraphicDrawerEnvironment& iEnv; |
|
36 }; |
|
37 |
|
38 CWsPlugin::CPimpl::CPimpl(CWsPlugin& aPlugin,MWsGraphicDrawerEnvironment& aEnv): |
|
39 iPlugin(aPlugin), iEnv(aEnv) |
|
40 { |
|
41 } |
|
42 |
|
43 // CWsPlugin \\\\\\\\\\\\\\\\\\\\\\\\ |
|
44 |
|
45 /** Constructor |
|
46 */ |
|
47 EXPORT_C CWsPlugin::CWsPlugin() |
|
48 { |
|
49 } |
|
50 |
|
51 /** Destructor |
|
52 */ |
|
53 EXPORT_C CWsPlugin::~CWsPlugin() |
|
54 { |
|
55 delete iPimpl; |
|
56 |
|
57 if(KNullUid != iDtor_ID_Key) |
|
58 { |
|
59 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
60 } |
|
61 } |
|
62 |
|
63 EXPORT_C void CWsPlugin::BaseConstructL(MWsGraphicDrawerEnvironment& aEnv) |
|
64 { |
|
65 iPimpl = new(ELeave) CPimpl(*this,aEnv); |
|
66 } |
|
67 |
|
68 EXPORT_C MWsGraphicDrawerEnvironment& CWsPlugin::Env() |
|
69 { |
|
70 return iPimpl->iEnv; |
|
71 } |
|
72 |
|
73 EXPORT_C const MWsGraphicDrawerEnvironment& CWsPlugin::Env() const |
|
74 { |
|
75 return iPimpl->iEnv; |
|
76 } |
|
77 |
|
78 EXPORT_C const TDesC & CWsPlugin::PluginName() const |
|
79 { |
|
80 return (KPluginName); |
|
81 } |