|
1 // Copyright (c) 2001-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 #include "SoundDeviceBody.h" |
|
17 #include <mmf/plugin/devsoundplugin.h> |
|
18 #include <mmf/plugin/mmfdevsound.hrh> |
|
19 #include <ecom/ecom.h> |
|
20 #include <mm/mmpluginutils.h> |
|
21 |
|
22 |
|
23 /* |
|
24 * Default Constructor. |
|
25 */ |
|
26 CMMFDevSound::CBody::CBody() |
|
27 { |
|
28 } |
|
29 |
|
30 /* |
|
31 * -doxygen comments moved to header- |
|
32 * |
|
33 * Destructor. |
|
34 * |
|
35 * Deletes all objects and releases all resource owned by this |
|
36 * instance. |
|
37 * |
|
38 */ |
|
39 CMMFDevSound::CBody::~CBody() |
|
40 { |
|
41 delete iPlugin; |
|
42 REComSession::DestroyedImplementation(iDestructorKey); |
|
43 REComSession::FinalClose(); |
|
44 } |
|
45 |
|
46 /* |
|
47 * -doxygen comments moved to header- |
|
48 * |
|
49 * Constructs, and returns a pointer to, a new CMMFDevSound::CBody object. |
|
50 * |
|
51 * Leaves on failure. |
|
52 * |
|
53 */ |
|
54 CMMFDevSound::CBody* CMMFDevSound::CBody::NewL() |
|
55 { |
|
56 CBody* self = new (ELeave) CBody; |
|
57 CleanupStack::PushL(self); |
|
58 self->ConstructL(); |
|
59 CleanupStack::Pop(); |
|
60 return self; |
|
61 } |
|
62 |
|
63 /* |
|
64 * -doxygen comments moved to header- |
|
65 * |
|
66 * Second phase constructor. |
|
67 * |
|
68 */ |
|
69 void CMMFDevSound::CBody::ConstructL() |
|
70 { |
|
71 TUid interfaceUid = {KMmfUidDevSoundPlugin}; |
|
72 iPlugin = |
|
73 static_cast<MMMFDevSoundPlugin*> |
|
74 (MmPluginUtils::CreateImplementationL(interfaceUid, iDestructorKey, KDevSoundPluginMatchString, KRomOnlyResolverUid)); |
|
75 } |
|
76 |
|
77 |
|
78 |