satui/satapp/inc/satappserverdispatcher.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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: Receives UI commands from SAT server and converts to QT
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SATAPPSERVERDISPATCHER_H
       
    19 #define SATAPPSERVERDISPATCHER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <msatuiobserver.h>
       
    23 #include <rsatuisession.h>
       
    24 #include <rsatsession.h>
       
    25 
       
    26 // forward declarations
       
    27 class SatAppAction;
       
    28 
       
    29 class SatAppServerDispatcher: public QObject, public MSatUiObserver
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34 
       
    35     SatAppServerDispatcher(QObject *parent = 0);
       
    36 
       
    37     virtual ~SatAppServerDispatcher();
       
    38 
       
    39 signals:
       
    40 
       
    41     /** signal request to display a menu */
       
    42     void setUpMenu(SatAppAction &action);
       
    43 
       
    44     /** requests a list selection menu to be displayed */
       
    45     void selectItem(SatAppAction &action);
       
    46 
       
    47     /** Requtes a text to be displayed to the user*/
       
    48     void displayText(SatAppAction &action);
       
    49 
       
    50     /** requests a key input to be displayed */
       
    51     void getInkey(SatAppAction &action);
       
    52 
       
    53     /** requests a string input to be displayed */
       
    54     void getInput(SatAppAction &action);
       
    55 
       
    56     /** Requests tone to be played */
       
    57     void playTone(SatAppAction &action);
       
    58 
       
    59     /** requests a confirm string to be displayed */
       
    60     void confirmCommand(SatAppAction &action);
       
    61 
       
    62     /** Requests an info notification or wait/status note */
       
    63     void notification(SatAppAction &action);
       
    64   
       
    65     /** requests any ongoing wait note to be dismissed */
       
    66     void stopShowWaitNote();
       
    67 
       
    68     /** requests all ongoing activities to be cleared on SAT UI */
       
    69     void clearScreen();
       
    70 
       
    71     /** requests to show ss error note*/
       
    72     void showSsErrorNote();
       
    73 
       
    74 public slots:
       
    75 
       
    76      /**
       
    77      * Response to the Set Up Menu command.
       
    78      * @param aMenuItem The selected menu item.
       
    79      * @param aHelpRequested Indicates whether help was requested.
       
    80      */
       
    81     void menuSelection(SatAppAction* action);
       
    82 
       
    83     /**
       
    84     * User cancel response, Send DTMF, Send Data, Receive Data
       
    85     */
       
    86     void userCancelSession(SatAppAction* action);
       
    87     
       
    88     
       
    89     // ****************************************************************************
       
    90     // * ************************************************************************ *
       
    91     // * *                          SYMBIAN PART                                * *
       
    92     // * ************************************************************************ *
       
    93     // ****************************************************************************
       
    94 
       
    95 private:
       
    96     
       
    97     void ConnectSatSessionL();
       
    98     void DisconnectSatSession();
       
    99     
       
   100 public: // from MSatUiObserver
       
   101 
       
   102     /**
       
   103      * see msatuiobserver.h
       
   104      */
       
   105     TSatUiResponse DisplayTextL( const TDesC& aText,
       
   106         const TDesC& aSimApplicationName,
       
   107         const TSatIconId& aIconId,
       
   108         TBool& aRequestedIconDisplayed,
       
   109         const TBool aSustainedText,
       
   110         const TTimeIntervalSeconds aDuration,
       
   111         const TBool aWaitUserToClear );
       
   112 
       
   113     /**
       
   114      * see msatuiobserver.h
       
   115      */
       
   116     TSatUiResponse GetInkeyL( const TDesC& aText,
       
   117         const TSatCharacterSet aCharacterSet, TChar& aInput,
       
   118         const TBool aHelpIsAvailable,
       
   119         const TSatIconId& aIconId,
       
   120         TBool& aRequestedIconDisplayed,
       
   121         TUint& aDuration,
       
   122         const TBool aImmediateDigitResponse );
       
   123 
       
   124     /**
       
   125      * see msatuiobserver.h
       
   126      */
       
   127     TSatUiResponse GetInputL( const TDesC& aText,
       
   128         const TSatCharacterSet aCharacterSet, TDes& aInput,
       
   129         const TInt aMinLength, const TInt aMaxLength,
       
   130         const TBool aHideInput,
       
   131         const TBool aHelpIsAvailable,
       
   132         const TSatIconId& aIconId,
       
   133         TBool& aRequestedIconDisplayed );
       
   134 
       
   135     /**
       
   136      * see msatuiobserver.h
       
   137      */
       
   138     TSatUiResponse SetUpMenuL( const TDesC& aText,
       
   139         const MDesCArray& aMenuItems,
       
   140         const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
       
   141         const TBool aHelpIsAvailable,
       
   142         const TSatIconId& aIconId,
       
   143         const CArrayFixFlat<TInt>* aMenuIcons,
       
   144         const enum TSatIconQualifier aIconListQualifier,
       
   145         const enum TSatSelectionPreference aSelectionPreference );
       
   146 
       
   147     /**
       
   148      * see msatuiobserver.h
       
   149      */
       
   150     TSatUiResponse SelectItemL( const TDesC& aText,
       
   151         const MDesCArray& aMenuItems,
       
   152         const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
       
   153         const TInt aDefaultItem, TUint8& aSelection,
       
   154         const TBool aHelpIsAvailable,
       
   155         const TSatIconId& aIconId,
       
   156         const CArrayFixFlat<TInt>* aMenuIcons,
       
   157         const enum TSatIconQualifier aIconListQualifier,
       
   158         TBool& aRequestedIconDisplayed,
       
   159         const enum TSatSelectionPreference aSelectionPreference );
       
   160 
       
   161     /**
       
   162      * see msatuiobserver.h
       
   163      */
       
   164     TSatUiResponse PlayTone( const TDesC& aText,
       
   165         const TSatTone aTone,
       
   166         const TTimeIntervalMicroSeconds aDuration,
       
   167         const TSatIconId& aIconId,
       
   168         TBool& aRequestedIconDisplayed );
       
   169 
       
   170     /**
       
   171      * see msatuiobserver.h
       
   172      */
       
   173     void ConfirmCommand(
       
   174         const TSatSQueryCommand aCommandId,
       
   175         const TSatAlphaIdStatus aAlphaIdStatus,
       
   176         const TDesC& aText,
       
   177         const TDesC& aAdditionalText,
       
   178         TBool& aActionAccepted,
       
   179         const TSatIconId& aIconId,
       
   180         TBool& aRequestedIconDisplayed,
       
   181         TBool& aTerminatedByUser );
       
   182 
       
   183    /**
       
   184     * see msatuiobserver.h
       
   185     */
       
   186     TSatUiResponse Notification(
       
   187         const TSatSNotifyCommand aCommandId,
       
   188         const TSatAlphaIdStatus aAlphaIdStatus,
       
   189         const TDesC& aText,
       
   190         const TSatIconId& aIconId,
       
   191         TBool& aRequestedIconDisplayed,
       
   192         const TSatControlResult aControlResult );
       
   193 
       
   194     /**
       
   195      * see msatuiobserver.h
       
   196      */
       
   197     void EventNotification(
       
   198         const TSatSEvent aEventId,
       
   199         const TSatSEventStatus aEventStatus,
       
   200         const TInt aError );
       
   201 
       
   202 private:
       
   203     
       
   204     RSatUiSession iSat;
       
   205     RSatSession iSatSession;
       
   206 
       
   207 };
       
   208 
       
   209 #endif //SATAPPSERVERDISPATCHER_H