javaextensions/satsa/pki/src.s60/cstsseprompt.cpp
branchRCL_3
changeset 24 6c158198356e
parent 14 04becd199f91
equal deleted inserted replaced
23:e5618cc85d74 24:6c158198356e
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
       
    21 
       
    22 
       
    23 
    21 #include "cstsseprompt.h"
    24 #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 
    22 #include <AknGlobalNote.h>
    34 #include <AknGlobalNote.h>
    23 #include <avkon.rsg>
    35 #include <avkon.rsg>
    24 #include <caosynchronizer.h>
    36 #include <caosynchronizer.h>
    25 
    37 
       
    38 #endif 
    26 
    39 
    27 
    40 
    28 // ============================ MEMBER FUNCTIONS ===============================
    41 // ============================ MEMBER FUNCTIONS ===============================
    29 
    42 
    30 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    41 }
    54 }
    42 
    55 
    43 // Destructor
    56 // Destructor
    44 CSTSSEPrompt::~CSTSSEPrompt()
    57 CSTSSEPrompt::~CSTSSEPrompt()
    45 {
    58 {
       
    59 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
    46     delete iGlobalNote;
    60     delete iGlobalNote;
    47     delete iSynchronizer;
    61     delete iSynchronizer;
       
    62 #endif
    48 }
    63 }
    49 
    64 
    50 // -----------------------------------------------------------------------------
    65 // -----------------------------------------------------------------------------
    51 // CSTSSEPrompt::DisplayPromptL
    66 // CSTSSEPrompt::DisplayPromptL
    52 // Displays the prompt
    67 // Displays the prompt
    53 // -----------------------------------------------------------------------------
    68 // -----------------------------------------------------------------------------
    54 //
    69 //
    55 void CSTSSEPrompt::DisplayPromptL(const TDesC& aPrompt)
    70 void CSTSSEPrompt::DisplayPromptL(const TDesC& aPrompt)
    56 {
    71 {
       
    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             
    57     iGlobalNote->ShowNoteL(
    85     iGlobalNote->ShowNoteL(
    58         iSynchronizer->iStatus,
    86         iSynchronizer->iStatus,
    59         EAknGlobalConfirmationNote,
    87         EAknGlobalConfirmationNote, 
    60         aPrompt);
    88         aPrompt);
    61     iSynchronizer->ExecuteL((TTimeIntervalMicroSeconds32) 0);
    89     iSynchronizer->ExecuteL((TTimeIntervalMicroSeconds32) 0);
       
    90             
       
    91     #endif
    62 }
    92 }
    63 
    93 
    64 // -----------------------------------------------------------------------------
    94 // -----------------------------------------------------------------------------
    65 // CSTSSEPrompt::CSTSSEPrompt
    95 // CSTSSEPrompt::CSTSSEPrompt
    66 // c++ constructor, may not leave
    96 // c++ constructor, may not leave
    75 // CSTSSEPrompt::ConstructL
   105 // CSTSSEPrompt::ConstructL
    76 // Second phase constructor, may leave
   106 // Second phase constructor, may leave
    77 // -----------------------------------------------------------------------------
   107 // -----------------------------------------------------------------------------
    78 void CSTSSEPrompt::ConstructL()
   108 void CSTSSEPrompt::ConstructL()
    79 {
   109 {
       
   110     #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
    80     iGlobalNote = CAknGlobalNote::NewL();
   111     iGlobalNote = CAknGlobalNote::NewL();
    81     iGlobalNote->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY);
   112     iGlobalNote->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY);
    82     iSynchronizer = CAOSynchronizer::NewL();
   113     iSynchronizer = CAOSynchronizer::NewL();
       
   114     #endif
    83 }
   115 }
    84 
   116 
    85 
   117