javauis/runtimeui_qt/src.s60/runtimeuiqt.h
changeset 78 71ad690e91f5
parent 21 2a9601315dfc
--- a/javauis/runtimeui_qt/src.s60/runtimeuiqt.h	Fri Sep 17 16:44:34 2010 +0300
+++ b/javauis/runtimeui_qt/src.s60/runtimeuiqt.h	Mon Oct 04 11:29:25 2010 +0300
@@ -26,6 +26,23 @@
 {
 namespace runtimeui
 {
+
+class ConfirmData
+{
+public:
+    inline ConfirmData(const TDesC& aQuestion, std::vector<HBufC*> aAnswerOptions, int aAnswerSuggestion)
+            : iQuestion(aQuestion), iAnswerOptions(aAnswerOptions), iAnswerSuggestion(aAnswerSuggestion), iAnswer(NO_ANSWER) {}
+
+    // constant identifying that the answer is not available
+    static const int NO_ANSWER = -1;
+
+    // public members
+    const TDesC& iQuestion;
+    std::vector<HBufC*> iAnswerOptions;
+    int iAnswerSuggestion;
+    int iAnswer;
+};
+
 class RuntimeUiQt
 {
 public:
@@ -36,8 +53,14 @@
      * @param aAppName Application name error occurred.
      * @param aShortMesg Short error description.
      * @param aDetailedMsg Detailed error description.
+     * @param aDetailsButton Localized name for details button.
+     * @param aOkButton Localized name for OK button.
      */
-    OS_IMPORT static void errorL(const TDesC& aAppName, const TDesC& aShortMsg, const TDesC& aDetailedMsg);
+    OS_IMPORT static void errorL(const TDesC& aAppName,
+                                 const TDesC& aShortMsg,
+                                 const TDesC& aDetailedMsg,
+                                 const TDesC& aDetailsButton,
+                                 const TDesC& aOkButton);
 
     /**
      * Request permission to user. This is blocking call and execution does not proceed until
@@ -45,9 +68,14 @@
      *
      * @param aAppName Application name requesting confirmation.
      * @param aQuestion Security question.
-     * @return 1 if user accepts the request, 0 otherwise.
+     * @param aConfirmData Localized texts for dialog buttons.
+     * @param aIdentified if caller is identified i.e. trusted lock icon is shown on the dialog.
+     * @return user selection.
      */
-    OS_IMPORT static int confirmL(const TDesC& aAppName, const TDesC& aQuestion);
+    OS_IMPORT static int confirmL(const TDesC& aAppName,
+                                  const TDesC& aQuestion,
+                                  const ConfirmData& aConfirmData,
+                                  bool aIdentified);
 };
 
 } //end namespace runtimeui