|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of Metadata editor dialog plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <mpxmetadataeditordialog.rsg> |
|
22 #include <mpxcustomcommandobserver.h> |
|
23 #include <mpxviewutilitycommanddef.h> |
|
24 |
|
25 #include "mpxmetadataeditordialog.h" |
|
26 #include "mpxmetadataeditordialogplugin.h" |
|
27 |
|
28 |
|
29 // ======== MEMBER FUNCTIONS ======== |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // C++ default constructor can NOT contain any code, that |
|
33 // might leave. |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 CMPXMetadataEditorDialogPlugin::CMPXMetadataEditorDialogPlugin() |
|
37 { |
|
38 // Do nothing |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // Symbian 2nd phase constructor can leave. |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 void CMPXMetadataEditorDialogPlugin::ConstructL() |
|
46 { |
|
47 // Do nothing |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // Two-phased constructor. |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 CMPXMetadataEditorDialogPlugin* CMPXMetadataEditorDialogPlugin::NewL() |
|
55 { |
|
56 CMPXMetadataEditorDialogPlugin* self = |
|
57 new ( ELeave ) CMPXMetadataEditorDialogPlugin(); |
|
58 CleanupStack::PushL( self ); |
|
59 self->ConstructL(); |
|
60 CleanupStack::Pop( self ); |
|
61 return self; |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // Destructor |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 CMPXMetadataEditorDialogPlugin::~CMPXMetadataEditorDialogPlugin() |
|
69 { |
|
70 // Do nothing |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // From CMPXViewPlugin |
|
75 // Interface method to activate view. |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 void CMPXMetadataEditorDialogPlugin::ActivateViewL( const TDesC* aParam ) |
|
79 { |
|
80 if ( !iDialog ) |
|
81 { |
|
82 CreateViewL(); |
|
83 } |
|
84 |
|
85 if ( aParam ) |
|
86 { |
|
87 CMPXMetadataEditorDialog* pDialog = |
|
88 static_cast<CMPXMetadataEditorDialog*>( iDialog ); |
|
89 pDialog->SetParamL( aParam ); |
|
90 } |
|
91 |
|
92 iDialog->ExecuteLD( ResourceId() ); |
|
93 if ( iCommandObserver ) |
|
94 { |
|
95 TPckgC<TInt> selfPtr( reinterpret_cast<TInt>( this ) ); |
|
96 iCommandObserver->HandleCustomCommand( |
|
97 TUid::Uid( KMPXViewUtilityCustomCommand ), |
|
98 EMPXViewUtilCmdViewDeActivated, |
|
99 selfPtr ); |
|
100 } |
|
101 iDialog = NULL; |
|
102 } |
|
103 |
|
104 // --------------------------------------------------------------------------- |
|
105 // From CMPXAknDialogPlugin |
|
106 // Construct Avkon dialog. |
|
107 // --------------------------------------------------------------------------- |
|
108 // |
|
109 CAknDialog* CMPXMetadataEditorDialogPlugin::ConstructDialogL() |
|
110 { |
|
111 return CMPXMetadataEditorDialog::NewL(); |
|
112 } |
|
113 |
|
114 // --------------------------------------------------------------------------- |
|
115 // From CMPXAknDialogPlugin |
|
116 // Resource ID. |
|
117 // --------------------------------------------------------------------------- |
|
118 // |
|
119 TInt CMPXMetadataEditorDialogPlugin::ResourceId() |
|
120 { |
|
121 return R_MPX_CUI_SONG_DETAILS_DIALOG; |
|
122 } |
|
123 |
|
124 // End of File |