24 |
24 |
25 namespace java |
25 namespace java |
26 { |
26 { |
27 namespace runtimeui |
27 namespace runtimeui |
28 { |
28 { |
|
29 |
|
30 class ConfirmData |
|
31 { |
|
32 public: |
|
33 inline ConfirmData(const TDesC& aQuestion, std::vector<HBufC*> aAnswerOptions, int aAnswerSuggestion) |
|
34 : iQuestion(aQuestion), iAnswerOptions(aAnswerOptions), iAnswerSuggestion(aAnswerSuggestion), iAnswer(NO_ANSWER) {} |
|
35 |
|
36 // constant identifying that the answer is not available |
|
37 static const int NO_ANSWER = -1; |
|
38 |
|
39 // public members |
|
40 const TDesC& iQuestion; |
|
41 std::vector<HBufC*> iAnswerOptions; |
|
42 int iAnswerSuggestion; |
|
43 int iAnswer; |
|
44 }; |
|
45 |
29 class RuntimeUiQt |
46 class RuntimeUiQt |
30 { |
47 { |
31 public: |
48 public: |
32 /** |
49 /** |
33 * Show error dialog to user. This is blocking call and execution does not proceed until |
50 * Show error dialog to user. This is blocking call and execution does not proceed until |
34 * has pressed OK button. |
51 * has pressed OK button. |
35 * |
52 * |
36 * @param aAppName Application name error occurred. |
53 * @param aAppName Application name error occurred. |
37 * @param aShortMesg Short error description. |
54 * @param aShortMesg Short error description. |
38 * @param aDetailedMsg Detailed error description. |
55 * @param aDetailedMsg Detailed error description. |
|
56 * @param aDetailsButton Localized name for details button. |
|
57 * @param aOkButton Localized name for OK button. |
39 */ |
58 */ |
40 OS_IMPORT static void errorL(const TDesC& aAppName, const TDesC& aShortMsg, const TDesC& aDetailedMsg); |
59 OS_IMPORT static void errorL(const TDesC& aAppName, |
|
60 const TDesC& aShortMsg, |
|
61 const TDesC& aDetailedMsg, |
|
62 const TDesC& aDetailsButton, |
|
63 const TDesC& aOkButton); |
41 |
64 |
42 /** |
65 /** |
43 * Request permission to user. This is blocking call and execution does not proceed until |
66 * Request permission to user. This is blocking call and execution does not proceed until |
44 * has accepted or denied the permission. |
67 * has accepted or denied the permission. |
45 * |
68 * |
46 * @param aAppName Application name requesting confirmation. |
69 * @param aAppName Application name requesting confirmation. |
47 * @param aQuestion Security question. |
70 * @param aQuestion Security question. |
48 * @return 1 if user accepts the request, 0 otherwise. |
71 * @param aConfirmData Localized texts for dialog buttons. |
|
72 * @param aIdentified if caller is identified i.e. trusted lock icon is shown on the dialog. |
|
73 * @return user selection. |
49 */ |
74 */ |
50 OS_IMPORT static int confirmL(const TDesC& aAppName, const TDesC& aQuestion); |
75 OS_IMPORT static int confirmL(const TDesC& aAppName, |
|
76 const TDesC& aQuestion, |
|
77 const ConfirmData& aConfirmData, |
|
78 bool aIdentified); |
51 }; |
79 }; |
52 |
80 |
53 } //end namespace runtimeui |
81 } //end namespace runtimeui |
54 } //end namespace java |
82 } //end namespace java |
55 |
83 |