1 /* |
|
2 * Copyright (c) 2002-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: Base class for file manager popups |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CFILEMANAGERPOPUPBASE_H |
|
21 #define CFILEMANAGERPOPUPBASE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <coecntrl.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MDesCArray; |
|
28 #ifdef RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
29 class CAknMessageQueryDialog; |
|
30 #else // RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
31 class CAknDoublePopupMenuStyleListBox; |
|
32 class CAknPopupList; |
|
33 #endif // RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * Base class for all popup dialogs in File Manager |
|
38 * |
|
39 * @lib FileManagerView.lib |
|
40 * @since S60 2.0 |
|
41 */ |
|
42 NONSHARABLE_CLASS(CFileManagerPopupBase) : public CCoeControl |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 /** |
|
46 * Executes the dialog. |
|
47 * @return ETrue if dialog was dismissed using OK, |
|
48 * EFalse otherwise. |
|
49 */ |
|
50 TBool ExecuteLD(); |
|
51 protected: |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CFileManagerPopupBase(); |
|
56 |
|
57 protected: // New functions |
|
58 /** |
|
59 * Constructs the information that this popup shows. |
|
60 * @return Array of items that will be shown in popup. |
|
61 */ |
|
62 virtual MDesCArray* ConstructDataArrayL() = 0; |
|
63 |
|
64 /** |
|
65 * C++ default constructor. |
|
66 */ |
|
67 CFileManagerPopupBase(); |
|
68 |
|
69 /** |
|
70 * By default Symbian 2nd phase constructor is private. |
|
71 */ |
|
72 virtual void ConstructL(); |
|
73 |
|
74 /** |
|
75 * Sets the title of popup dialog. |
|
76 * @param aTitle New title of popup dialog. |
|
77 */ |
|
78 void SetTitleL(const TDesC &aTitle); |
|
79 |
|
80 #ifdef RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
81 /** |
|
82 * Activates CAknMessageQueryDialog link action. |
|
83 */ |
|
84 virtual void ActivateLinkL(); |
|
85 #endif // RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
86 |
|
87 private: |
|
88 #ifdef RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
89 /** |
|
90 * Callback to implement CAknMessageQueryDialog link action. |
|
91 */ |
|
92 static TInt LinkCallback(TAny* aPtr); |
|
93 #endif // RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
94 |
|
95 private: // Data |
|
96 #ifdef RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
97 // Own: Dialog title. |
|
98 HBufC* iTitle; |
|
99 // Own: Dialog data. |
|
100 HBufC* iData; |
|
101 #else // RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
102 // Own: Popup list that is the actual dialog that is shown. |
|
103 CAknPopupList* iPopupList; |
|
104 /// Own: Listbox that is given to CAknPopupList constructor. |
|
105 CAknDoublePopupMenuStyleListBox* iListBox; |
|
106 /// Ref: Keeps track if destructor is already called. |
|
107 TBool* iIsDestroyed; |
|
108 #endif // RD_DRM_COMMON_INTERFACE_FOR_OMA_AND_WMDRM |
|
109 }; |
|
110 |
|
111 #endif // CFILEMANAGERPOPUPBASE_H |
|
112 |
|
113 // End of File |
|