|
1 /* |
|
2 * Copyright (c) 2009 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 the License "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: |
|
15 * |
|
16 */ |
|
17 #ifndef __EPOC32DIALOGPROVIDER_H |
|
18 #define __EPOC32DIALOGPROVIDER_H |
|
19 |
|
20 struct TSelectOptionData |
|
21 { |
|
22 TText* iText; |
|
23 TBool iIsSelected; |
|
24 TBool iIsOptGroup; |
|
25 TBool iHasOnPick; |
|
26 }; |
|
27 |
|
28 typedef enum |
|
29 { |
|
30 ENullButton, |
|
31 EBackButton, |
|
32 ESelectButton, |
|
33 EOkButton, |
|
34 ECancelButton, |
|
35 ESignButton, |
|
36 EEnterButton, |
|
37 EOptionsButton |
|
38 } TGenDlgButtonType; |
|
39 |
|
40 class MEpoc32DialogProvider |
|
41 { |
|
42 public: |
|
43 /* |
|
44 Callback - we should display an error message |
|
45 */ |
|
46 virtual void NotifyErrorL(const TInt aErrCode)=0; |
|
47 |
|
48 /* |
|
49 Callback - we should display an HTTP error message for specified URI |
|
50 */ |
|
51 virtual void NotifyHttpErrorL(const TInt aErrCode, const TDesC& aUri)=0; |
|
52 |
|
53 /* |
|
54 Callback - display a alert dialog to the user |
|
55 */ |
|
56 virtual void WmlScriptDlgAlertL(const TDesC& aMessage)=0; |
|
57 |
|
58 /* |
|
59 Callback - display a confirm dialog to the user |
|
60 */ |
|
61 virtual TBool WmlScriptDlgConfirmL(const TDesC& aMessage, const TDesC& aYesMessage, const TDesC& aNoMessage)=0; |
|
62 |
|
63 /* |
|
64 Callback - display a prompt dialog to the user |
|
65 */ |
|
66 virtual void WmlScriptDlgPromptL( const TDesC& aMessage, const TDesC& aDefaultInput, HBufC*& aReturnedInput)=0; |
|
67 |
|
68 virtual TBool DialogSelectOptionL( const TDesC& aTitle, |
|
69 const TBool aMultiple, |
|
70 CArrayFix<TSelectOptionData>& aOptions )=0; |
|
71 |
|
72 virtual TInt GetUserAuthenticationDataL( const TDesC& aUrl, |
|
73 const TDesC& aRealm, |
|
74 const TDesC& aDefaultUserName, |
|
75 HBufC*& aReturnedUserName, |
|
76 HBufC*& aReturnedPasswd, |
|
77 TBool& aCancelled, |
|
78 TBool aBasicAuthentication = EFalse) = 0; |
|
79 |
|
80 virtual TBool GetUserRedirectionDataL(const TDesC& aOriginalUrl, const TDesC& aRedirectedUrl) = 0; |
|
81 |
|
82 // KM Generic dialog API |
|
83 virtual TGenDlgButtonType GenDialogPromptL(const TDesC& aTitle, const TDesC& aPrompt, const TGenDlgButtonType aSoftKey1Button, const TGenDlgButtonType aSoftKey2Button)=0; |
|
84 |
|
85 virtual TGenDlgButtonType GenDialogInputPromptL(const TDesC& aTitle, const TDesC& aPrompt, const TBool aHideText, const TBool aNumbersOnly, |
|
86 const TGenDlgButtonType aSoftKey1Button, const TGenDlgButtonType aSoftKey2Button, const TInt aMaxInputLength, |
|
87 TDes* aDefaultInputText) = 0; |
|
88 |
|
89 virtual TGenDlgButtonType GenDialogListSelectL(const TDesC& aTitle, const TDesC& aPrompt, const TGenDlgButtonType aSoftKey1Button, const TGenDlgButtonType aSoftKey2Button, CArrayFix<TPtrC>& aItemsArray, TInt& aSelectedItem)=0; |
|
90 |
|
91 virtual TBool ShowObjectDialogL() = 0; |
|
92 }; |
|
93 |
|
94 #endif |