equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #include "cmtpdevdpextnmap.h" |
|
22 |
|
23 CDevDpExtnPluginMap* CDevDpExtnPluginMap::NewL(MExtnDevPluginCallback& aDevdp, TUid aUid) |
|
24 { |
|
25 CDevDpExtnPluginMap* self = new (ELeave) CDevDpExtnPluginMap(); |
|
26 CleanupStack::PushL(self); |
|
27 self->ConstructL(aDevdp, aUid); |
|
28 CleanupStack::Pop(self); |
|
29 return self; |
|
30 } |
|
31 |
|
32 void CDevDpExtnPluginMap::ConstructL(MExtnDevPluginCallback& aDevdp, TUid aUid) |
|
33 { |
|
34 CMtpExtnDevicePropPlugin* extnPlugin = CMtpExtnDevicePropPlugin::NewL(aUid); |
|
35 extnPlugin->SetCallback(aDevdp); |
|
36 SetExtPlugin(extnPlugin); |
|
37 } |
|
38 |
|
39 void CDevDpExtnPluginMap::SetExtPlugin(CMtpExtnDevicePropPlugin* aPlugin) |
|
40 { |
|
41 iPlugin = aPlugin; |
|
42 } |
|
43 |
|
44 |
|
45 CMtpExtnDevicePropPlugin* CDevDpExtnPluginMap::ExtPlugin() |
|
46 { |
|
47 return iPlugin; |
|
48 } |
|
49 |
|
50 CDevDpExtnPluginMap::~CDevDpExtnPluginMap() |
|
51 { |
|
52 iSupportedOpCodes.Close(); |
|
53 |
|
54 if(NULL != iPlugin) |
|
55 { |
|
56 delete iPlugin; |
|
57 iPlugin = NULL; |
|
58 } |
|
59 } |
|
60 |
|
61 RArray<TUint>* CDevDpExtnPluginMap::SupportedOpCodes() |
|
62 { |
|
63 return &iSupportedOpCodes; |
|
64 } |
|
65 |