|
1 // Copyright (c) 2002-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 #ifndef __DIALOGPROVIDER_H__ |
|
17 #define __DIALOGPROVIDER_H__ |
|
18 |
|
19 // System includes |
|
20 // |
|
21 #include <e32std.h> |
|
22 #include <wapcli.h> // for Certificate Information structure |
|
23 |
|
24 // Forward declarations |
|
25 class MWtaiCancelOperationObserver; |
|
26 class MHTTPDataSupplier; |
|
27 |
|
28 /** |
|
29 @class MDialogProvider |
|
30 Dependencies : none |
|
31 Comments : This class provides an API to be called by low level components, |
|
32 like data collectors, and implemented by the UI. |
|
33 |
|
34 It is mainly used for dialog creation and information passing. |
|
35 @publishedAll |
|
36 @deprecated |
|
37 @since 6.0 |
|
38 @todo Should this be renamed? |
|
39 */ |
|
40 class MDialogProvider |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 Intended Usage : This creates an input dialog for the user to enter a text |
|
46 string into a single text field. |
|
47 @warning This function must be a blocking function. |
|
48 @since 6.0 |
|
49 @param aMessage A descriptor with the label/title of the text field. |
|
50 @param aDefaultInput A descriptor with (if any) default input text. |
|
51 @return A pointer to a buffer with the input text. |
|
52 @todo Is warning correct? |
|
53 */ |
|
54 virtual HBufC* PromptL( const TDesC& aMessage, const TDesC& aDefaultInput) =0; |
|
55 |
|
56 /** |
|
57 Intended Usage : Creates a password dialog for user to enter some hidden text. |
|
58 @warning This function must be a blocking function. |
|
59 @since 6.0 |
|
60 @param aPasswd An output argument which is set the entered password. |
|
61 @return void. |
|
62 @todo Is warning correct? |
|
63 */ |
|
64 virtual void PasswordL(TPassword& aPasswd) =0; |
|
65 |
|
66 /** |
|
67 Intended Usage : Creates a simple confirmation dialog with Ok and Cancel (or |
|
68 similar) buttons. Allows the user to confirm an action or message. Some text |
|
69 is displayed indicating the nature of the action. |
|
70 @warning This function must be a blocking function. |
|
71 @since 6.0 |
|
72 @param aMessage A descriptor with a display message. |
|
73 @param aOkButtonLabel A descriptor with the label for the Ok button. |
|
74 @param aCancelButtonLabel A descriptor with the label for the Cancel button. |
|
75 @return A boolean value of ETrue if the Ok button was pressed, or a value |
|
76 of EFalse if the cancel button was pressed. |
|
77 @todo Is warning correct? |
|
78 */ |
|
79 virtual TBool ConfirmationL(const TDesC& aMessage, const TDesC& aOkButtonLabel, const TDesC& aCancelButtonLabel ) =0; |
|
80 |
|
81 /** |
|
82 Intended Usage : Created a certificate confirmation dialog. Requests that the |
|
83 user accept or reject the displayed certificate. |
|
84 @warning This function must be a blocking function. |
|
85 @since 6.0 |
|
86 @param aCertificateInfo The certificate details. |
|
87 @return A boolean value of ETrue if the certifiacte was accepted, or a |
|
88 value of EFalse if it was not. |
|
89 @todo Is warning correct? |
|
90 */ |
|
91 virtual TBool CertificateConfirmationL(const RCertificate::TInfo& aCertificateInfo) =0; |
|
92 |
|
93 /** |
|
94 Intended Usage : Creates an alert dialog to inform the user. A message is |
|
95 displayed and there is an Ok (or similar) button to close the dialog. |
|
96 @warning This function must be a blocking function. |
|
97 @since 6.0 |
|
98 @param aMessage A descriptor with the alert message. |
|
99 @return void. |
|
100 @todo Is warning correct? |
|
101 */ |
|
102 virtual void AlertL(const TDesC& aMessage) =0; |
|
103 |
|
104 /** |
|
105 Intended Usage : This creates a dialog which indicates that a connection |
|
106 is being done. |
|
107 @warning This function must be a non blocking function. |
|
108 @since 6.0 |
|
109 @return virtual void |
|
110 @todo Is warning ok? Also, need to change this to take a message. |
|
111 @pre A connecting dialog is not already been created. |
|
112 @post Unspecified |
|
113 */ |
|
114 virtual void DisplayConnectingDialogL() =0; |
|
115 |
|
116 /** |
|
117 Intended Usage : Cancels the current connecting dialog. |
|
118 @since 6.0 |
|
119 @return void. |
|
120 */ |
|
121 virtual void CancelConnectingDialog() =0; |
|
122 |
|
123 /** |
|
124 Intended Usage : Displays a non-blocking cancel dialog that allows the user to cancel an |
|
125 an operation. When the user cancels the operation, the dialog must close |
|
126 and call the CancelOperation() method provided by the MWtaiPublicCancelOperation |
|
127 object passed in by the object that requires the use of the cancel dialog. |
|
128 @since 6.0 |
|
129 @param aMessage Descriptor containing the message to display on the dialog |
|
130 @param aCancelOperation A pointer to the object that implements the MWtaiPublicCancelOperation class |
|
131 @pre None |
|
132 @post A non-blocking cancel dialog appears with the paramater text passed into it |
|
133 */ |
|
134 virtual void DisplayCancelDialogL(const TDesC& aMessage, MWtaiCancelOperationObserver* aCancelOperation) = 0; |
|
135 |
|
136 /** |
|
137 Intended Usage : This method closes the cancel dialog created from the DisplayCancelDialogL above. |
|
138 @since 6.0 |
|
139 @pre The DisplayCancelDialogL() method must have been called and the dialog is on display |
|
140 @post The cancel dialog closes |
|
141 */ |
|
142 virtual void CloseCancelDialog() = 0; |
|
143 |
|
144 /** |
|
145 Intended Usage : This method is called when unknown data is first recieved and should be handled. |
|
146 Data is recieved in chunks and this method is called when the first chunk has |
|
147 arrived. |
|
148 @since 6.0 |
|
149 @param aMimeType A descriptor containing the mime type of the data |
|
150 @param aDataSupplier A pointer to the data supplier object that contains the data |
|
151 @return A boolean value that returns ETrue if the data will be handled and to continue |
|
152 downloading the data or EFalse to say not to handle the data and cancel the download. |
|
153 @pre Unknown data content will have begun downloading |
|
154 @post The data will continue downloading if ETrue is returned |
|
155 */ |
|
156 virtual TBool GotUnknownData(const TDesC& aMimeType, MHTTPDataSupplier* aDataSupplier) = 0; |
|
157 |
|
158 /** |
|
159 Intended Usage : This method will be called when more unknown data from an existing fetch has |
|
160 arrived. As the data arrives in chunks, this methos will be called when data |
|
161 arrives after the GotUnknownData() method has been called. |
|
162 @since 6.0 |
|
163 @param aDataSupplier A pointer to the data supplier object that contains the data |
|
164 @pre The first chunk of data has already arrived and GotUnknownData() method has been called |
|
165 */ |
|
166 virtual void GotMoreUnknownData(MHTTPDataSupplier* aDataSupplier) = 0; |
|
167 |
|
168 /** |
|
169 Intended Usage : The method is called when an existing unknown data fetch has completed and |
|
170 no more unknown data is to be expected. |
|
171 @since 6.0 |
|
172 @param aDataSupplier A pointer to the data supplier that contains the unknown data |
|
173 @param aErrorCode An error value, KErrNone if no error, KErrCancel if the download is cancelled |
|
174 @pre An unknown data fetch has been completed and all data handled |
|
175 */ |
|
176 virtual void NoMoreUnknownData(MHTTPDataSupplier* aDataSupplier, TInt aErrorCode) = 0; |
|
177 |
|
178 /** |
|
179 Intended Usage : Function placeholder for BC proofing. |
|
180 @since 6.0 |
|
181 */ |
|
182 virtual void MDialogProvider_Reserved1() = 0; |
|
183 }; |
|
184 |
|
185 #endif // __DIALOG_PROVIDER_H__ |