satui/satapp/tsrc/ut_satapp/src/dummyeventprovider.cpp
changeset 15 d7fc66ccd6fb
equal deleted inserted replaced
13:e32024264ebb 15:d7fc66ccd6fb
       
     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 #include <QStringList>
       
    19 #include <msatuiadapter.h>
       
    20 #include "dummyeventprovider.h"
       
    21 #include "tflogger.h"
       
    22 #include "csatuiobserver.h"
       
    23 #include "dummyplaytoneprovider.h"
       
    24 
       
    25 // ----------------------------------------------------------------------------
       
    26 // DummyEventProvider::DummyEventProvider
       
    27 // (other items were commented in a header).
       
    28 // ----------------------------------------------------------------------------
       
    29 //
       
    30 DummyEventProvider::DummyEventProvider(QObject *parent) :
       
    31     QObject(parent), mObs(NULL)
       
    32 {
       
    33     qDebug("SATAPP: DummyEventProvider::DummyEventProvider call");
       
    34     TRAPD(err, mObs = CSatUiObserver::NewL());
       
    35     
       
    36     if (KErrNone != err) {
       
    37         CloseSatUI();
       
    38     } else {
       
    39         mObs->SetImplementer(this);
       
    40         TFLOGSTRING("SATAPP: DummyEventProvider::DummyEventProvider \
       
    41             SetImplementer")
       
    42         mPlayTone = new DummyPlayToneProvider(this);
       
    43     }  
       
    44     qDebug("SATAPP: DummyEventProvider::DummyEventProvider exit");
       
    45 }
       
    46 
       
    47 // ----------------------------------------------------------------------------
       
    48 // DummyEventProvider::~DummyEventProvider
       
    49 // Sets a pointer to CSatUiViewAppUi object.
       
    50 // (other items were commented in a header).
       
    51 // ----------------------------------------------------------------------------
       
    52 //
       
    53 DummyEventProvider::~DummyEventProvider()
       
    54 {
       
    55     qDebug("SATAPP: DummyEventProvider::~DummyEventProvider call");
       
    56     delete mObs;
       
    57     mObs = NULL;
       
    58     if (mPlayTone) {
       
    59         delete mPlayTone;
       
    60         mPlayTone = 0;
       
    61         TFLOGSTRING("SATAPP: DummyEventProvider::~DummyEventProvider delete\
       
    62             mPlayTone")
       
    63     }
       
    64     qDebug("SATAPP: DummyEventProvider::~DummyEventProvider exit");
       
    65 }
       
    66 
       
    67 // ----------------------------------------------------------------------------
       
    68 // DummyEventProvider::SetUpMenuL
       
    69 // (other items were commented in a header).
       
    70 // ----------------------------------------------------------------------------
       
    71 //
       
    72 TSatUiResponse DummyEventProvider::SetUpMenuL(
       
    73     const TDesC &aText,
       
    74     const MDesCArray &aMenuItems,
       
    75     const CArrayFixFlat<TSatAction> */*aMenuItemNextActions*/,
       
    76     const CFbsBitmap */*aIconBitmap*/,
       
    77     //const CAknIconArray */*aItemIconsArray*/,
       
    78     const TBool aSelfExplanatoryItems,
       
    79     const TBool aHelpIsAvailable)
       
    80     {
       
    81     qDebug("SATAPP: DummyEventProvider::SetUpMenuL call");
       
    82 
       
    83     TSatUiResponse response(ESatSuccess);
       
    84     QString title;
       
    85     if (aText.Length() > 0) {
       
    86         title = QString::fromUtf16 (aText.Ptr(), aText.Length());
       
    87         }
       
    88 
       
    89     QStringList *menuList = new QStringList();
       
    90     qDebug("SATAPP: DummyEventProvider::SetUpMenuL List");
       
    91 
       
    92     //Add Item
       
    93     if(menuList) {
       
    94         for (int i=0 ; i<aMenuItems.MdcaCount() ; i++) {
       
    95             QString item=QString::fromUtf16(aMenuItems.MdcaPoint(i).Ptr(),
       
    96                 aMenuItems.MdcaPoint(i).Length());
       
    97             menuList->append(item);
       
    98             }
       
    99 
       
   100         qDebug("SATAPP: DummyEventProvider::SetUpMenuL add item");
       
   101 
       
   102         emit setUpMenuEvent(
       
   103             response,
       
   104             title,
       
   105             *menuList,
       
   106             //const CArrayFixFlat<TSatAction> *aMenuItemNextActions,
       
   107             //const HbIcon &aIcon,
       
   108             //const CArrayFixFlat<TInt> *aMenuIcons,
       
   109             aSelfExplanatoryItems,
       
   110             aHelpIsAvailable);
       
   111 
       
   112         delete menuList;
       
   113     }
       
   114     qDebug("SATAPP: DummyEventProvider::SetUpMenuL exit");
       
   115 
       
   116     return response;
       
   117     }
       
   118 
       
   119 // ----------------------------------------------------------------------------
       
   120 // DummyEventProvider::SetUpMenuL
       
   121 // (other items were commented in a header).
       
   122 // ----------------------------------------------------------------------------
       
   123 //
       
   124 TSatUiResponse DummyEventProvider::SelectItemL(
       
   125     const TDesC &aText,
       
   126     const MDesCArray &aMenuItems,
       
   127     const CArrayFixFlat<TSatAction> */*aMenuItemNextActions*/,
       
   128     const TInt aDefaultItem,
       
   129     TUint8 &aSelection,
       
   130     const CFbsBitmap */*aIconBitmap*/,
       
   131     //const CAknIconArray */*aItemsIconArray*/,
       
   132     const TBool aSelfExplanatoryItems,
       
   133     const TBool aHelpIsAvailable)
       
   134 {
       
   135     qDebug("SATAPP: DummyEventProvider::SelectItemL call");
       
   136 
       
   137     TSatUiResponse response(ESatSuccess);
       
   138     aSelection = 0;
       
   139     QString title;
       
   140     if (aText.Length() > 0) {
       
   141         title=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   142         }
       
   143 
       
   144     QStringList *menuList = new QStringList();
       
   145     //Add Item
       
   146     if(menuList) {
       
   147         for (int i=0 ; i<aMenuItems.MdcaCount() ; i++) {
       
   148             QString item=QString::fromUtf16(aMenuItems.MdcaPoint(i).Ptr(),
       
   149                         aMenuItems.MdcaPoint(i).Length());
       
   150             menuList->append(item);
       
   151             }
       
   152         qDebug("SATAPP: DummyEventProvider::SelectItemL add item");
       
   153 
       
   154         emit selectItemEvent(
       
   155             response,
       
   156             title,
       
   157             *menuList,
       
   158             aDefaultItem,
       
   159             aSelection,
       
   160             //const CArrayFixFlat<TSatAction> *aMenuItemNextActions,
       
   161             //const HbIcon &aIcon,
       
   162             //const CArrayFixFlat<TInt> *aMenuIcons,
       
   163             aSelfExplanatoryItems,
       
   164             aHelpIsAvailable);
       
   165 
       
   166         delete menuList;
       
   167     }
       
   168     qDebug("SATAPP: DummyEventProvider::SelectItemL exit");
       
   169 
       
   170     return response;
       
   171 }
       
   172 
       
   173 // ----------------------------------------------------------------------------
       
   174 // DummyEventProvider::ProfileState
       
   175 // (other items were commented in a header).
       
   176 // ----------------------------------------------------------------------------
       
   177 //
       
   178 int DummyEventProvider::profileState()
       
   179 {
       
   180     qDebug("SATAPP: DummyEventProvider::ProfileState call");
       
   181     int res (0);
       
   182     if (mObs) {
       
   183        res = mObs->ProfileState();
       
   184     }
       
   185     qDebug("SATAPP: DummyEventProvider::ProfileState exit");
       
   186     return res;
       
   187 }
       
   188 
       
   189 // ----------------------------------------------------------------------------
       
   190 // DummyEventProvider::MenuSelection
       
   191 // (other items were commented in a header).
       
   192 // ----------------------------------------------------------------------------
       
   193 //
       
   194 void DummyEventProvider::menuSelection(int aMenuItem, bool aHelpRequested)
       
   195     {
       
   196     if(mObs && mObs->Adapter()) {
       
   197         mObs->Adapter()->MenuSelection(aMenuItem, aHelpRequested);
       
   198         }
       
   199 
       
   200     qDebug("SATAPP: DummyEventProvider::MenuSelection exit");
       
   201     }
       
   202 
       
   203 // ----------------------------------------------------------------------------
       
   204 // DummyEventProvider::DisplayTextL
       
   205 // (other items were commented in a header).
       
   206 // ----------------------------------------------------------------------------
       
   207 //
       
   208 TSatUiResponse DummyEventProvider::DisplayTextL(
       
   209     const TDesC &aText,
       
   210     const TDesC &aSimApplicationName,
       
   211     CFbsBitmap */*aIconBitmapDisplayText*/,
       
   212     const TBool aSelfExplanatoryIcon,
       
   213     const TBool aSustainedText,
       
   214     const TTimeIntervalSeconds aDuration,
       
   215     const TBool aWaitUserToClear)
       
   216     {
       
   217     qDebug("SATAPP: DummyEventProvider::DisplayTextL call");
       
   218 
       
   219     TSatUiResponse response(ESatFailure);
       
   220     QString title;
       
   221     if (aText.Length() > 0) {
       
   222         title=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   223     } else {
       
   224          qDebug("SATAPP: DummyEventProvider::DisplayTextL null text");
       
   225          response = ESatFailure;
       
   226     }
       
   227 
       
   228     QString appName;
       
   229     if (aSimApplicationName.Length() > 0) {
       
   230          appName=QString::fromUtf16(aSimApplicationName.Ptr(),
       
   231                 aSimApplicationName.Length());
       
   232     } else {
       
   233         // test leave
       
   234         qDebug("SATAPP: DummyEventProvider::DisplayTextL leave exit");
       
   235         User::Leave(KErrNotFound);
       
   236     }
       
   237 
       
   238     int timeInterval = aDuration.Int();
       
   239 
       
   240     bool isSelfExplanatoryIcon = (aSelfExplanatoryIcon) ? true : false;
       
   241 
       
   242     emit displayTextEvent(
       
   243        response,
       
   244        title,
       
   245        appName,
       
   246        //const HbIcon &aIcon,
       
   247        isSelfExplanatoryIcon,
       
   248        aSustainedText,
       
   249        timeInterval,
       
   250        aWaitUserToClear);
       
   251 
       
   252     qDebug("SATAPP: DummyEventProvider::DisplayTextL exit");
       
   253     return response;
       
   254     }
       
   255 
       
   256 // ----------------------------------------------------------------------------
       
   257 // DummyEventProvider::GetInputLL
       
   258 // (other items were commented in a header).
       
   259 // ----------------------------------------------------------------------------
       
   260 //
       
   261 TSatUiResponse DummyEventProvider::GetInputL(
       
   262     const TDesC &aText,
       
   263     const TSatCharacterSet aCharacterSet,
       
   264     TDes &aInput,
       
   265     const TInt aMinLength,
       
   266     const TInt aMaxLength,
       
   267     const TBool aHideInput,
       
   268     const TBool aGetInkey,
       
   269     const CFbsBitmap */*aIconBitmapGetInput*/,
       
   270     const TBool aSelfExplanatory,
       
   271     TUint &aDuration)
       
   272 {
       
   273     qDebug("SATAPP: DummyEventProvider::GetInputL call");
       
   274 
       
   275     TSatUiResponse response(ESatSuccess);
       
   276 
       
   277     QString title;
       
   278     if (aText.Length() > 0) {
       
   279         title=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   280         TFLOGSTRING2("SATAPP: DummyEventProvider::GetInputL \
       
   281             Title=%S", &aText)
       
   282         }
       
   283 
       
   284     QString inputText;
       
   285     if (aInput.Length() > 0) {
       
   286         inputText = QString::fromUtf16(aInput.Ptr(), aInput.Length());
       
   287     } else {
       
   288         // test leave
       
   289         TFLOGSTRING("SATAPP: DummyEventProvider::GetInkey test leave")
       
   290         User::Leave(KErrNotFound);
       
   291     }
       
   292     bool isSelfExplanatory = aSelfExplanatory;
       
   293     unsigned int duration = aDuration;
       
   294      if (aGetInkey) {
       
   295         //Get Inkey
       
   296          emit getInkeyEvent(
       
   297              response,
       
   298              title,
       
   299              aCharacterSet,
       
   300              inputText,
       
   301              //iconBitmapGetInput,
       
   302              isSelfExplanatory,
       
   303              duration);
       
   304          qDebug("SATAPP: DummyEventProvider::GetInputL: GetInkey");
       
   305          aInput.Copy(reinterpret_cast<const TUint16*>(inputText.utf16()), inputText.length());
       
   306      } else {
       
   307         // Get Input
       
   308         bool hideInput = aHideInput;
       
   309         int minLength = aMinLength;
       
   310         int maxLength = aMaxLength;
       
   311         emit getInputEvent(
       
   312             response,
       
   313             title,
       
   314             aCharacterSet,
       
   315             inputText,
       
   316             minLength,
       
   317             maxLength,
       
   318             hideInput,
       
   319             //iconBitmapGetInput,
       
   320             isSelfExplanatory,
       
   321             duration);
       
   322         int length = inputText.length();
       
   323         if (length > maxLength) {
       
   324             length = maxLength;
       
   325         }
       
   326         qDebug("SATAPP: DummyEventProvider::GetInputL: GetInput");
       
   327         aInput.Copy(reinterpret_cast<const TUint16*>(inputText.utf16()), length);
       
   328     }
       
   329     qDebug("SATAPP: DummyEventProvider::GetInputL exit");
       
   330     return response;
       
   331     }
       
   332 
       
   333     // ----------------------------------------------------------------------------
       
   334 // DummyEventProvider::GetYesNoL
       
   335 // (other items were commented in a header).
       
   336 // ----------------------------------------------------------------------------
       
   337 //
       
   338 TSatUiResponse DummyEventProvider::GetYesNoL(
       
   339     const TDesC &aText,
       
   340     const TSatCharacterSet aCharacterSet,
       
   341     TChar &aInkey,
       
   342     const CFbsBitmap */*aIconBitmap*/,
       
   343     const TBool aSelfExplanatory,
       
   344     TUint &aDuration,
       
   345     const TBool aImmediateDigitResponse)
       
   346 {
       
   347     qDebug("SATAPP: DummyEventProvider::GetYesNoL call");
       
   348     TSatUiResponse response(ESatSuccess);
       
   349     QString text;
       
   350     if (aText.Length() > 0) {
       
   351         text=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   352     }
       
   353 
       
   354     unsigned int inKey = static_cast < TUint >(aInkey);
       
   355 
       
   356     bool selfExplanatory = aSelfExplanatory;
       
   357     bool immediateDigitResponse = aImmediateDigitResponse;
       
   358     unsigned int duration = aDuration;
       
   359 
       
   360     emit getYesNoEvent(
       
   361         response,
       
   362         text,
       
   363         aCharacterSet,
       
   364         inKey,
       
   365         //const TSatIconId &aIconId,
       
   366         selfExplanatory,
       
   367         duration,
       
   368         immediateDigitResponse);
       
   369 
       
   370     aInkey = inKey;
       
   371     qDebug("SATAPP: DummyEventProvider::GetYesNoL exit");
       
   372     return response;
       
   373 }
       
   374 
       
   375 // ----------------------------------------------------------------------------
       
   376 // DummyEventProvider::ConfirmSendL
       
   377 // (other items were commented in a header).
       
   378 // ----------------------------------------------------------------------------
       
   379 //
       
   380 TSatUiResponse DummyEventProvider::ConfirmSendL(
       
   381     const TDesC &aText,
       
   382     TBool &aActionAccepted,
       
   383     TInt aType)
       
   384 {
       
   385     qDebug("SATAPP: DummyEventProvider::ConfirmSendL call");
       
   386     TSatUiResponse response(ESatSuccess);
       
   387     QString text;
       
   388     if (aText.Length() > 0) {
       
   389         text=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   390     }
       
   391     bool actionAccepted = aActionAccepted;
       
   392     int type = aType;
       
   393     emit confirmSendEvent(
       
   394         response,
       
   395         text,
       
   396         actionAccepted,
       
   397         type);
       
   398     qDebug("SATAPP: DummyEventProvider::ConfirmSendL exit");
       
   399     return response;
       
   400 }
       
   401 
       
   402 // ----------------------------------------------------------------------------
       
   403 // DummyEventProvider::ShowSmsWaitNoteL
       
   404 // (other items were commented in a header).
       
   405 // ----------------------------------------------------------------------------
       
   406 //
       
   407 void DummyEventProvider::ShowSmsWaitNoteL(
       
   408     const TDesC &aText,
       
   409     const CFbsBitmap */*aIconBitmapSendSM*/,
       
   410     const TBool aSelfExplanatoryIcon)
       
   411 {
       
   412     qDebug("SATAPP: DummyEventProvider::ShowSmsWaitNoteL call");
       
   413     QString title;
       
   414     if (aText.Length() > 0) {
       
   415         title = QString::fromUtf16 (aText.Ptr(), aText.Length());
       
   416     }
       
   417     bool selfExplanatoryIcon = aSelfExplanatoryIcon;
       
   418 
       
   419     emit showSmsWaitNoteEvent(
       
   420         title,
       
   421         selfExplanatoryIcon);
       
   422     qDebug("SATAPP: DummyEventProvider::ShowSmsWaitNoteL exit");
       
   423 }
       
   424 
       
   425 // ----------------------------------------------------------------------------
       
   426 // DummyEventProvider::ConfirmSetUpCallL
       
   427 // (other items were commented in a header).
       
   428 // ----------------------------------------------------------------------------
       
   429 //
       
   430 void DummyEventProvider::ConfirmSetUpCallL(
       
   431     const TDesC &aText,
       
   432     const TDesC &aSimAppName,
       
   433     TBool &aActionAccepted,
       
   434     const CFbsBitmap */*aIconBitmap*/,
       
   435     const TBool /*aSelfExplanatory*/)
       
   436     {
       
   437     qDebug("SATAPP: DummyEventProvider::ConfirmSetUpCallL call");
       
   438     QString text;
       
   439     if (aText.Length() > 0) {
       
   440         text = QString::fromUtf16 (aText.Ptr(), aText.Length());
       
   441         TFLOGSTRING2("SATAPP: DummyEventProvider::ConfirmSetUpCallL \
       
   442             text=%S", text.utf16())
       
   443     }
       
   444     
       
   445     QString title;
       
   446     if (aText.Length() > 0) {
       
   447         title = QString::fromUtf16 (aSimAppName.Ptr(), aSimAppName.Length());
       
   448         TFLOGSTRING2("SATAPP: DummyEventProvider::ConfirmSetUpCallL \
       
   449             Title=%S", title.utf16())
       
   450     }
       
   451     bool actionAccepted = aActionAccepted;
       
   452 
       
   453     emit showSetUpCallConfirmEvent(
       
   454         text,
       
   455         title,
       
   456         actionAccepted);
       
   457     qDebug("SATAPP: DummyEventProvider::ConfirmSetUpCallL exit");
       
   458     }
       
   459 
       
   460 // ----------------------------------------------------------------------------
       
   461 // DummyEventProvider::ShowDtmfWaitNoteL
       
   462 // (other items were commented in a header).
       
   463 // ----------------------------------------------------------------------------
       
   464 //
       
   465 TSatUiResponse DummyEventProvider::ShowDtmfWaitNoteL(
       
   466     const TDesC &aText,
       
   467     const CFbsBitmap */*aIconBitmapSendSM*/,
       
   468     const TBool /*aSelfExplanatoryIcon*/)
       
   469 {
       
   470     TSatUiResponse response(ESatSuccess);
       
   471     qDebug("SATAPP: DummyEventProvider::ShowDtmfWaitNoteL call");
       
   472     QString title;
       
   473     if (aText.Length() > 0) {
       
   474         title = QString::fromUtf16 (aText.Ptr(), aText.Length());
       
   475         TFLOGSTRING2("SATAPP: DummyEventProvider::ShowDtmfWaitNoteL \
       
   476             Title=%S", title.utf16())
       
   477     }
       
   478     emit showDtmfWaitNoteEvent(
       
   479         response,
       
   480         title);
       
   481     qDebug("SATAPP: DummyEventProvider::ShowDtmfWaitNoteL exit");
       
   482     return response;
       
   483 }
       
   484 
       
   485 // ----------------------------------------------------------------------------
       
   486 // DummyEventProvider::clearScreen
       
   487 // (other items were commented in a header).
       
   488 // ----------------------------------------------------------------------------
       
   489 //
       
   490 void DummyEventProvider::ClearScreen()
       
   491 {
       
   492     qDebug("SATAPP: DummyEventProvider::ClearScreen call");
       
   493     if (mPlayTone) {
       
   494         mPlayTone->clearScreen();
       
   495     }
       
   496     emit clearScreenEvent();
       
   497     qDebug("SATAPP: DummyEventProvider::ClearScreen exit");
       
   498 }
       
   499 
       
   500 // ----------------------------------------------------------------------------
       
   501 // DummyEventProvider::CloseSatUI
       
   502 // (other items were commented in a header).
       
   503 // ----------------------------------------------------------------------------
       
   504 //
       
   505 void DummyEventProvider::CloseSatUI()
       
   506 {
       
   507     qDebug("SATAPP: DummyEventProvider::CloseSatUI call");
       
   508     if (mPlayTone) {
       
   509         mPlayTone->closeSatUI();
       
   510     }
       
   511     emit closeUiEvent();
       
   512     qDebug("SATAPP: DummyEventProvider::CloseSatUI exit");
       
   513 }
       
   514 
       
   515 //-----------------------------------------------------------------------------
       
   516 // DummyEventProvider::StopShowWaitNote
       
   517 // (other items were commented in a header).
       
   518 // ----------------------------------------------------------------------------
       
   519 //    
       
   520 void DummyEventProvider::StopShowWaitNote()
       
   521 {
       
   522     qDebug("SATAPP: DummyEventProvider::StopShowWaitNote call");
       
   523     emit stopShowWaitNoteEvent();
       
   524     qDebug("SATAPP: DummyEventProvider::StopShowWaitNote exit");
       
   525 }
       
   526 
       
   527 //-----------------------------------------------------------------------------
       
   528 // DummyEventProvider::userCancelDtmfResponse
       
   529 // (other items were commented in a header).
       
   530 // ----------------------------------------------------------------------------
       
   531 //
       
   532 void DummyEventProvider::userCancelResponse()
       
   533 {
       
   534     qDebug("SATAPP: DummyEventProvider::userCancelDtmfResponse call");
       
   535     mObs->Adapter()->SessionTerminated( ESessionCancel );
       
   536     qDebug("SATAPP: DummyEventProvider::userCancelDtmfResponse exit");
       
   537 }
       
   538 
       
   539 //-----------------------------------------------------------------------------
       
   540 // DummyEventProvider::ShowSsWaitNoteL
       
   541 // (other items were commented in a header).
       
   542 // ----------------------------------------------------------------------------
       
   543 //
       
   544 void DummyEventProvider::ShowSsWaitNoteL(
       
   545             const TDesC &aText,
       
   546             const CFbsBitmap* /*aIconBitmap*/,
       
   547             const TBool aSelfExplanatoryIcon )
       
   548 {
       
   549     TFLOGSTRING("SATAPP: DummyEventProvider::ShowSsWaitNoteL call")
       
   550     QString title;
       
   551     if (aText.Length() > 0) {
       
   552         title = QString::fromUtf16 (aText.Ptr(), aText.Length());
       
   553         TFLOGSTRING2("SATAPP: DummyEventProvider::ShowSsWaitNoteL \
       
   554             Title=%s", title.utf16())
       
   555     }
       
   556     bool selfExplanatoryIcon = aSelfExplanatoryIcon;
       
   557 
       
   558     emit showSsWaitNoteEvent(
       
   559         title,
       
   560         selfExplanatoryIcon);
       
   561     TFLOGSTRING("SATAPP: DummyEventProvider::ShowSsWaitNoteL exit")
       
   562 }
       
   563 
       
   564 //-----------------------------------------------------------------------------
       
   565 // DummyEventProvider::ShowWaitNoteWithoutDelayL
       
   566 // (other items were commented in a header).
       
   567 // ----------------------------------------------------------------------------
       
   568 //
       
   569 void DummyEventProvider::ShowWaitNoteWithoutDelayL()
       
   570 {
       
   571     TFLOGSTRING("SATAPP: DummyEventProvider::ShowWaitNoteWithoutDelayL call")
       
   572     emit showWaitNoteWithoutDelayEvent();
       
   573     TFLOGSTRING("SATAPP: DummyEventProvider::ShowWaitNoteWithoutDelayL exit")
       
   574 }
       
   575 
       
   576 //-----------------------------------------------------------------------------
       
   577 // DummyEventProvider::showSsErrorNoteEvent
       
   578 // (other items were commented in a header).
       
   579 // ----------------------------------------------------------------------------
       
   580 //
       
   581 void DummyEventProvider::ShowSsErrorNoteL()
       
   582 {
       
   583     TFLOGSTRING("SATAPP: DummyEventProvider::showSsErrorNoteEvent call")
       
   584     emit showSsErrorNoteEvent();
       
   585     TFLOGSTRING("SATAPP: DummyEventProvider::showSsErrorNoteEvent exit")
       
   586 }
       
   587 
       
   588 //-----------------------------------------------------------------------------
       
   589 // DummyEventProvider::ShowBIPNoteL
       
   590 // (other items were commented in a header).
       
   591 // ----------------------------------------------------------------------------
       
   592 //
       
   593 void DummyEventProvider::ShowBIPNoteL( TInt aCommand, const TDesC &aText,
       
   594         const CFbsBitmap* /*aIconBitmap*/, const TBool /*aSelfExplanatory*/)
       
   595 {
       
   596     TFLOGSTRING("SATAPP: DummyEventProvider::ShowBIPNoteL call")
       
   597     int cmdType = aCommand;
       
   598     QString title;
       
   599     if (aText.Length() > 0) {
       
   600         title=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   601         TFLOGSTRING2("SATAPP: DummyEventProvider::ShowBIPNoteL \
       
   602             Title=%S", title.utf16())
       
   603         }
       
   604     emit showBIPNoteEvent(cmdType, title);
       
   605     TFLOGSTRING("SATAPP: DummyEventProvider::ShowBIPNoteL exit")
       
   606 }
       
   607 
       
   608 //-----------------------------------------------------------------------------
       
   609 // DummyEventProvider::ConfirmOpenChannelL
       
   610 // (other items were commented in a header).
       
   611 // ----------------------------------------------------------------------------
       
   612 //
       
   613 TSatUiResponse DummyEventProvider::ConfirmOpenChannelL(
       
   614     const TDesC &aText,
       
   615     TBool &aActionAccepted,
       
   616     const CFbsBitmap* /*aIconBitmapOpenChannel*/,
       
   617     const TBool /*aSelfExplanatory*/ )
       
   618 {
       
   619     TFLOGSTRING("SATAPP: DummyEventProvider::ConfirmOpenChannelL call")
       
   620         
       
   621     TSatUiResponse response( ESatSuccess );
       
   622 
       
   623     QString title;
       
   624     if (aText.Length() > 0) {
       
   625         title=QString::fromUtf16(aText.Ptr(), aText.Length());
       
   626         TFLOGSTRING2("SATAPP: DummyEventProvider::ConfirmOpenChannelL \
       
   627             Title=%s", title.utf16())
       
   628         }
       
   629      
       
   630     bool actionAccepted = aActionAccepted;
       
   631     
       
   632     emit showOpenChannelConfirmEvent(title, actionAccepted);
       
   633     
       
   634     TFLOGSTRING2( "SATAPP: DummyEventProvider::ConfirmOpenChannelL exit\
       
   635         response: %d", response)
       
   636     return response;
       
   637 }
       
   638 
       
   639 //-----------------------------------------------------------------------------
       
   640 // DummyEventProvider::PlayStandardToneL
       
   641 // (other items were commented in a header).
       
   642 // ----------------------------------------------------------------------------
       
   643 //
       
   644 TSatUiResponse DummyEventProvider::PlayStandardToneL( const TDesC& aText,
       
   645     const TDesC8& aSequence,
       
   646     TTimeIntervalMicroSeconds aDuration,
       
   647     const CFbsBitmap* aIconBitmap,
       
   648     const TBool aSelfExplanatory )
       
   649 {
       
   650     TFLOGSTRING("SATAPP: DummyEventProvider::PlayStandardToneL call")
       
   651     TSatUiResponse response = mPlayTone->PlayStandardToneL(
       
   652         aText, aSequence, aDuration, aIconBitmap, aSelfExplanatory);
       
   653     TFLOGSTRING2("SATAPP: DummyEventProvider::PlayStandardToneL \
       
   654         response= %d exit", response)
       
   655     return response;
       
   656 }
       
   657 
       
   658 //-----------------------------------------------------------------------------
       
   659 // DummyEventProvider::PlayUserSelectedToneL
       
   660 // (other items were commented in a header).
       
   661 // ----------------------------------------------------------------------------
       
   662 //
       
   663 TSatUiResponse DummyEventProvider::PlayUserSelectedToneL(
       
   664         const TDesC &aText,
       
   665         TTimeIntervalMicroSeconds aDuration,
       
   666         TSatTone aTone,
       
   667         const CFbsBitmap* aIconBitmap,
       
   668         const TBool aSelfExplanatory )
       
   669 {
       
   670     TFLOGSTRING("DummyEventProvider::PlayUserSelectedToneL calling")
       
   671     if (100 == aTone) {
       
   672         TFLOGSTRING("DummyEventProvider::PlayUserSelectedToneL test failure")
       
   673         return ESatFailure;
       
   674     }
       
   675     TSatUiResponse response = mPlayTone->PlayUserSelectedToneL(
       
   676         aText, aDuration, aTone, aIconBitmap, aSelfExplanatory);
       
   677     TFLOGSTRING2( "DummyEventProvider::PlayUserSelectedToneL response= %d \
       
   678         exit", response)
       
   679     return response;
       
   680 }
       
   681  //End of file