|
1 /* |
|
2 * Copyright (c) 2007 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: Header file for the CUpnpNoteHandler class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef UPNP_FILE_TRANSFER_NOTE_HANDLER_H |
|
20 #define UPNP_FILE_TRANSFER_NOTE_HANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknProgressDialog.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CAknProgressDialog; |
|
27 class CEikProgressInfo; |
|
28 class MUPnPProgressDialogobserver; |
|
29 class CEikonEnv; |
|
30 |
|
31 // ENUMS |
|
32 enum TUpnpProgressNoteType |
|
33 { |
|
34 EUpnpCopyProgressNote = 0, |
|
35 EUpnpMoveProgressNote |
|
36 }; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * CUpnpNoteHandler |
|
42 * The class provides means for the UpnpFileTransferEngine component to show |
|
43 * the state of the file transfer process. |
|
44 * |
|
45 * @since S60 3.2 |
|
46 */ |
|
47 NONSHARABLE_CLASS( CUpnpNoteHandler ) : public CBase, |
|
48 public MProgressDialogCallback |
|
49 { |
|
50 |
|
51 public: // Constructors and destructor |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 */ |
|
56 static CUpnpNoteHandler* NewL( |
|
57 MUPnPProgressDialogobserver* aObserver ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CUpnpNoteHandler(); |
|
63 |
|
64 public: // Call back methods of MAknProgressDialogCallback |
|
65 |
|
66 /** |
|
67 * ProgressDialog call back method. |
|
68 * Get's called when a dialog is dismissed. |
|
69 * |
|
70 * @since S60 3.1 |
|
71 * @param aButtonId (TInt) ID of the button pressed |
|
72 */ |
|
73 void DialogDismissedL( TInt aButtonId ); |
|
74 |
|
75 public: // private business methods |
|
76 |
|
77 /** |
|
78 * Initialises and runs the progress note. |
|
79 * |
|
80 * @since S60 3.2 |
|
81 * @param aNoteType (TUpnpProgressNoteType) type of the note |
|
82 */ |
|
83 void RunProgressNoteL( TUpnpProgressNoteType aNoteType ); |
|
84 |
|
85 /** |
|
86 * Sets the value of the progress note. |
|
87 * |
|
88 * @since S60 3.2 |
|
89 * @param aProgressValue (TInt) percentage value for the note |
|
90 */ |
|
91 void SetValue( TInt aProgressValue ); |
|
92 |
|
93 /** |
|
94 * Finishes the progress note. |
|
95 * |
|
96 * @since S60 3.2 |
|
97 */ |
|
98 void FinishProgressNote(); |
|
99 |
|
100 void SetMaxValue( TInt aMaxValue ); |
|
101 |
|
102 /** |
|
103 * Skipping DRM protected files - note |
|
104 * |
|
105 * @since S60 3.2.3 |
|
106 */ |
|
107 void ShowSkippingDRMFilesNoteL(); |
|
108 |
|
109 |
|
110 private: // Construction methods (private) |
|
111 |
|
112 // Constructor |
|
113 CUpnpNoteHandler( MUPnPProgressDialogobserver* aObserver ); |
|
114 |
|
115 /** |
|
116 * ConstructL. |
|
117 */ |
|
118 void ConstructL(); |
|
119 |
|
120 private: // Data members |
|
121 |
|
122 // CoeEnv and the resource offset (needed when loading and |
|
123 // unloading resources) |
|
124 TInt iResFileOffset; |
|
125 |
|
126 // Progess note dialog and progress info |
|
127 CAknProgressDialog* iProgressNoteDialog; // owned |
|
128 CEikProgressInfo* iProgressInfo; // not owned |
|
129 TInt iCurrentProgressValue; |
|
130 MUPnPProgressDialogobserver* iProgressDialogObserver; |
|
131 |
|
132 TInt iMaxProgressValue; |
|
133 CEikonEnv* iCoeEnv; // not owned |
|
134 |
|
135 /** |
|
136 * Flag progress if is finished. |
|
137 */ |
|
138 TBool iProgressNoteFinish; |
|
139 |
|
140 }; |
|
141 |
|
142 #endif // UPNP_FILE_TRANSFER_NOTE_HANDLER_H |
|
143 |
|
144 // End of file |