satui/satapp/inc/satappcommandhandler.h
changeset 12 ae8abd0db65c
child 15 d7fc66ccd6fb
equal deleted inserted replaced
0:ff3b6d0fd310 12:ae8abd0db65c
       
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SATAPPCOMMANDHANDLER_H
       
    19 #define SATAPPCOMMANDHANDLER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <msatuiobserver.h>
       
    23 
       
    24 class SatAppUiProvider;
       
    25 
       
    26 class SatAppCommandHandler : public QObject
       
    27     {
       
    28     Q_OBJECT    
       
    29 public:
       
    30     SatAppCommandHandler(SatAppUiProvider &ui, QObject *parent = 0);
       
    31     virtual ~SatAppCommandHandler();
       
    32     
       
    33 private slots:
       
    34  
       
    35     /**
       
    36     * Handles the SetUpMenu command.
       
    37     * @param aRes the out parameter. the result of the command.
       
    38     * @param aText The title text.
       
    39     * @param aMenuItems The array of menu item captions.
       
    40     * @param aMenuItemNextActions The array of menu item next action
       
    41     * indicator captions.
       
    42     * @param aIconBitmap The Context pane icon.
       
    43     * @param aItemsIconArray Array of item icons
       
    44     * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
       
    45     * @param aHelpIsAvailable A flag indicating if SAT help is available.
       
    46     */
       
    47     void setUpMenu(
       
    48        TSatUiResponse &aRes,
       
    49        const QString &aText,
       
    50        const QStringList &aMenuItems,
       
    51        //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
       
    52        //const HbIcon &aIcon,
       
    53        //const CAknIconArray* aItemIconsArray,
       
    54        const bool aSelfExplanatoryItems,
       
    55        const bool aHelpIsAvailable);
       
    56     
       
    57     /**
       
    58     * Handles the SelectItem view.
       
    59     * @param aRes the out parameter. the result of the command.
       
    60     * @param aText The title text.
       
    61     * @param aMenuItems The array of menu items.
       
    62     * @param aMenuItemNextActions The array of next action indicators.
       
    63     * @param aDefaultItem The item in focus.
       
    64     * @param aSelection The item index selected by the user.
       
    65     * @param aIconBitmap The Context Pane icon.
       
    66     * @param aItemsIconArray Array of item icons
       
    67     * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
       
    68     * @param aHelpIsAvailable A flag indicating if SAT help is available.
       
    69     * @return Information of the operation result.
       
    70     */
       
    71     void selectItem(
       
    72         TSatUiResponse &aRes,
       
    73         const QString &aText,
       
    74         const QStringList &aMenuItems,
       
    75         //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
       
    76         const int aDefaultItem,
       
    77         unsigned char &aSelection,
       
    78         //const HbIcon &aIcon,
       
    79         //const CAknIconArray* aItemsIconArray,
       
    80         const bool aSelfExplanatoryItems,
       
    81         const bool aHelpIsAvailable);
       
    82 
       
    83     /**
       
    84     * Notification of the SAT Display Text command.
       
    85     * @param aRes, the User's response.
       
    86     * @param aText The text string to be displayed.
       
    87     * @param aSimApplicationName  Sim Application name
       
    88     * @param aIcon the icon to show.
       
    89     * @param aRequestedIconDisplayed Informs if icon is not used.
       
    90     * @param aSustainedText Indicates is this text sustained ie. no timers
       
    91     *        used if ETrue.
       
    92     * @param aDuration Duration for showing the text
       
    93     * @param aWaitUserToClear Indication if user is needed to clear
       
    94     *        message
       
    95     * @return The response of the UI to this command.
       
    96     */
       
    97     void displayText(
       
    98         TSatUiResponse &aRes,
       
    99         const QString &aText,
       
   100         const QString &aSimApplicationName,
       
   101 //      const HbIcon &aIcon,
       
   102         bool &aRequestedIconDisplayed,
       
   103         const bool aSustainedText,
       
   104         const int aDuration,
       
   105         const bool aWaitUserToClear);
       
   106     
       
   107     /**
       
   108     * Notification of the SAT Get Input command.
       
   109     * @param aRes, the User's response.
       
   110     * @param aText The text string to be displayed.
       
   111     * @param aSimApplicationName  Sim Application name
       
   112     * @param aIcon the icon to show.
       
   113     * @param aRequestedIconDisplayed Informs if icon is not used.
       
   114     * @param aSustainedText Indicates is this text sustained ie. no timers
       
   115     *        used if ETrue.
       
   116     * @param aDuration Duration for showing the text
       
   117     * @param aWaitUserToClear Indication if user is needed to clear
       
   118     *        message
       
   119     * @return The response of the UI to this command.
       
   120     */
       
   121     void getInkey(
       
   122         TSatUiResponse &aRes,
       
   123         const QString &aTitleText,
       
   124         const TSatCharacterSet aCharacterSet,
       
   125         QString &aInputText,
       
   126         //const QPixmap* /*aIconBitmapGetInput*/,
       
   127         const bool aSelfExplanatory,
       
   128         unsigned int &aDuration);
       
   129 
       
   130     /**
       
   131      * Notification of the SAT Get YesNo command.
       
   132      * @param aText The query text.
       
   133      * @param aCharacterSet The character range allowed.
       
   134      * @param aInput The input character.
       
   135      * @param aHelpIsAvailable indicates if help can be requested.
       
   136      * @param aIconId The id of icon.
       
   137      * @param aRequestedIconDisplayed Informs if icon is not used.
       
   138      * @param aDuration Duration for showing the dialog.
       
   139      * @param aImmediateDigitResponse Indication if Immediate digit response
       
   140      *        is needed.
       
   141      * @return The response of the UI to this command.
       
   142      */
       
   143     void getYesNo(
       
   144         TSatUiResponse &aRes,
       
   145         const QString &aText,
       
   146         const TSatCharacterSet aCharacterSet,
       
   147         unsigned int &aInkey,
       
   148         //const TSatIconId &aIconId,
       
   149         const bool &aSelfExplanatory,
       
   150         unsigned int &aDuration,
       
   151         const bool aImmediateDigitResponse);
       
   152     
       
   153     /**
       
   154     * Notification of the SAT Get Input command.
       
   155     * @param aRes, the User's response.
       
   156     * @param aText The text string to be displayed.
       
   157     * @param aSimApplicationName  Sim Application name
       
   158     * @param aIcon the icon to show.
       
   159     * @param aRequestedIconDisplayed Informs if icon is not used.
       
   160     * @param aSustainedText Indicates is this text sustained ie. no timers
       
   161     *        used if ETrue.
       
   162     * @param aDuration Duration for showing the text
       
   163     * @param aWaitUserToClear Indication if user is needed to clear
       
   164     *        message
       
   165     * @return The response of the UI to this command.
       
   166     */
       
   167     void getInput(
       
   168         TSatUiResponse &aRes,
       
   169         const QString &aTitleText,
       
   170         const TSatCharacterSet aCharacterSet,
       
   171         QString &aInputText,
       
   172         const int aMinLength,
       
   173         const int aMaxLength,
       
   174         const bool aHideInput,
       
   175         //const QPixmap* /*aIconBitmapGetInput*/,
       
   176         const bool aSelfExplanatory,
       
   177         unsigned int &aDuration);
       
   178     
       
   179     /**
       
   180     * Shows the confirmation note about the SAT Send SMS, Send SS or
       
   181     * Send USSD command.
       
   182     * @param aText The text to be displayed.
       
   183     * @param aActionAccepted Indicates whether the command was accepted.
       
   184     * @param aType Type of the request (SMS, SS, USSD).
       
   185     * @return Information of the operation result.
       
   186     */
       
   187     void confirmSend(
       
   188         TSatUiResponse &aRes,
       
   189         const QString &aText,
       
   190         bool &aActionAccepted,
       
   191         int aType);
       
   192 
       
   193     /**
       
   194     * Shows the wait note about the Send SMS command.
       
   195     * @param aText The text to be displayed.
       
   196     * @param aIconBitmapSendSM Sending dialog icon.
       
   197     * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
       
   198     */
       
   199     void showSmsWaitNote(
       
   200         const QString &aText,
       
   201         //const CFbsBitmap* aIconBitmapSendSM,
       
   202         const bool aSelfExplanatoryIcon
       
   203         );
       
   204 
       
   205     /**
       
   206     * Shows the wait note about the Send DTMF command.
       
   207     * @param aText The text to be displayed.
       
   208     * @param aIconBitmapSendDtmf Sending dialog icon.
       
   209     * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
       
   210     */
       
   211     void showDtmfWaitNote(
       
   212         TSatUiResponse &aRes,
       
   213         const QString &aText
       
   214         );
       
   215 
       
   216     /*!
       
   217     Stop wait note
       
   218      */
       
   219     void stopShowWaitNote();
       
   220     
       
   221     /**
       
   222     * Shows the confirmation not about SetUpCall.
       
   223     * @param aText The text to be displayed.
       
   224     * @param aSimAppName The header to be displayed.
       
   225     * @param aActionAccepted Indicates whether the command was accepted.
       
   226     */
       
   227     void confirmSetUpCall(
       
   228         const QString &aText,
       
   229         const QString &aSimAppName,
       
   230         bool &aActionAccepted//,
       
   231         //const CFbsBitmap* aIconBitmap,
       
   232         //const TBool aSelfExplanatory
       
   233        );    
       
   234     
       
   235 private:
       
   236     SatAppUiProvider &mUi;    
       
   237 };
       
   238 
       
   239 #endif /* SATAPPCOMMANDHANDLER_H */