javaextensions/satsa/pki/src.s60/cstsseprompt.cpp
branchRCL_3
changeset 83 26b2b12093af
parent 60 6c158198356e
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 
       
    22 
       
    23 
       
    24 #include "cstsseprompt.h"
    21 #include "cstsseprompt.h"
    25 
       
    26 #ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
       
    27 
       
    28 #include <hbdevicedialog.h>
       
    29 #include <QtCore\qvariant.h>
       
    30 const QString KMessageTextKey = "text";
       
    31 
       
    32 #else 
       
    33 
       
    34 #include <AknGlobalNote.h>
    22 #include <AknGlobalNote.h>
    35 #include <avkon.rsg>
    23 #include <avkon.rsg>
    36 #include <caosynchronizer.h>
    24 #include <caosynchronizer.h>
    37 
    25 
    38 #endif 
       
    39 
    26 
    40 
    27 
    41 // ============================ MEMBER FUNCTIONS ===============================
    28 // ============================ MEMBER FUNCTIONS ===============================
    42 
    29 
    43 // -----------------------------------------------------------------------------
    30 // -----------------------------------------------------------------------------
    54 }
    41 }
    55 
    42 
    56 // Destructor
    43 // Destructor
    57 CSTSSEPrompt::~CSTSSEPrompt()
    44 CSTSSEPrompt::~CSTSSEPrompt()
    58 {
    45 {
    59 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
       
    60     delete iGlobalNote;
    46     delete iGlobalNote;
    61     delete iSynchronizer;
    47     delete iSynchronizer;
    62 #endif
       
    63 }
    48 }
    64 
    49 
    65 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    66 // CSTSSEPrompt::DisplayPromptL
    51 // CSTSSEPrompt::DisplayPromptL
    67 // Displays the prompt
    52 // Displays the prompt
    68 // -----------------------------------------------------------------------------
    53 // -----------------------------------------------------------------------------
    69 //
    54 //
    70 void CSTSSEPrompt::DisplayPromptL(const TDesC& aPrompt)
    55 void CSTSSEPrompt::DisplayPromptL(const TDesC& aPrompt)
    71 {
    56 {
    72     #ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
       
    73             HbDeviceDialog* dialog;
       
    74             dialog = new(ELeave) HbDeviceDialog();
       
    75             
       
    76             QVariantMap parameters;
       
    77             QString qString((QChar*)aPrompt.Ptr(),aPrompt.Length());
       
    78             parameters[QString(KMessageTextKey)] = qString;
       
    79             
       
    80             dialog->show("com.nokia.hb.devicemessagebox/1.0", parameters);
       
    81             
       
    82             delete dialog;
       
    83     #else
       
    84             
       
    85     iGlobalNote->ShowNoteL(
    57     iGlobalNote->ShowNoteL(
    86         iSynchronizer->iStatus,
    58         iSynchronizer->iStatus,
    87         EAknGlobalConfirmationNote, 
    59         EAknGlobalConfirmationNote,
    88         aPrompt);
    60         aPrompt);
    89     iSynchronizer->ExecuteL((TTimeIntervalMicroSeconds32) 0);
    61     iSynchronizer->ExecuteL((TTimeIntervalMicroSeconds32) 0);
    90             
       
    91     #endif
       
    92 }
    62 }
    93 
    63 
    94 // -----------------------------------------------------------------------------
    64 // -----------------------------------------------------------------------------
    95 // CSTSSEPrompt::CSTSSEPrompt
    65 // CSTSSEPrompt::CSTSSEPrompt
    96 // c++ constructor, may not leave
    66 // c++ constructor, may not leave
   105 // CSTSSEPrompt::ConstructL
    75 // CSTSSEPrompt::ConstructL
   106 // Second phase constructor, may leave
    76 // Second phase constructor, may leave
   107 // -----------------------------------------------------------------------------
    77 // -----------------------------------------------------------------------------
   108 void CSTSSEPrompt::ConstructL()
    78 void CSTSSEPrompt::ConstructL()
   109 {
    79 {
   110     #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
       
   111     iGlobalNote = CAknGlobalNote::NewL();
    80     iGlobalNote = CAknGlobalNote::NewL();
   112     iGlobalNote->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY);
    81     iGlobalNote->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY);
   113     iSynchronizer = CAOSynchronizer::NewL();
    82     iSynchronizer = CAOSynchronizer::NewL();
   114     #endif
       
   115 }
    83 }
   116 
    84 
   117 
    85