securitysettings/eapqtdialogs/src/eapusernamepwddialog.cpp
author hgs
Thu, 16 Sep 2010 13:07:04 +0300
changeset 49 43351a4f2da3
parent 44 22d80358905b
permissions -rw-r--r--
201037
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
36
hgs
parents: 34
diff changeset
    14
* Description:   
hgs
parents: 34
diff changeset
    15
*   User authentication Dialog implementation
26
hgs
parents:
diff changeset
    16
*
hgs
parents:
diff changeset
    17
*/
hgs
parents:
diff changeset
    18
34
hgs
parents: 26
diff changeset
    19
/*
49
hgs
parents: 44
diff changeset
    20
 * %version: 7 %
34
hgs
parents: 26
diff changeset
    21
 */
hgs
parents: 26
diff changeset
    22
36
hgs
parents: 34
diff changeset
    23
// System includes
26
hgs
parents:
diff changeset
    24
#include <eapqtvalidator.h>
hgs
parents:
diff changeset
    25
#include <eapqtexpandedeaptype.h>
hgs
parents:
diff changeset
    26
#include <eapqtconfiginterface.h>
hgs
parents:
diff changeset
    27
#include <eapqtconfig.h>
34
hgs
parents: 26
diff changeset
    28
#include <HbParameterLengthLimiter>
hgs
parents: 26
diff changeset
    29
#include <HbTranslator>
hgs
parents: 26
diff changeset
    30
#include <HbLineEdit>
hgs
parents: 26
diff changeset
    31
#include <HbAction>
36
hgs
parents: 34
diff changeset
    32
hgs
parents: 34
diff changeset
    33
// User includes
26
hgs
parents:
diff changeset
    34
#include "eapusernamepwddialog.h"
hgs
parents:
diff changeset
    35
#include "OstTraceDefinitions.h"
hgs
parents:
diff changeset
    36
#ifdef OST_TRACE_COMPILER_IN_USE
44
hgs
parents: 36
diff changeset
    37
#include "eapusernamepwddialogTraces.h"
26
hgs
parents:
diff changeset
    38
#endif
hgs
parents:
diff changeset
    39
36
hgs
parents: 34
diff changeset
    40
/*!
hgs
parents: 34
diff changeset
    41
 * \class EapUsernamePwdDialog
hgs
parents: 34
diff changeset
    42
 * \brief Implements Username Password Input Dialog. 
hgs
parents: 34
diff changeset
    43
 */
hgs
parents: 34
diff changeset
    44
hgs
parents: 34
diff changeset
    45
// External function prototypes
hgs
parents: 34
diff changeset
    46
hgs
parents: 34
diff changeset
    47
// Local constants
hgs
parents: 34
diff changeset
    48
 
hgs
parents: 34
diff changeset
    49
// ======== LOCAL FUNCTIONS ========
hgs
parents: 34
diff changeset
    50
hgs
parents: 34
diff changeset
    51
// ======== MEMBER FUNCTIONS ========
hgs
parents: 34
diff changeset
    52
hgs
parents: 34
diff changeset
    53
/*!
hgs
parents: 34
diff changeset
    54
 * Constructor.
hgs
parents: 34
diff changeset
    55
 * 
hgs
parents: 34
diff changeset
    56
 * @param [in]  parameters Parameters for the Constructor.
26
hgs
parents:
diff changeset
    57
 */
hgs
parents:
diff changeset
    58
EapUsernamePwdDialog::EapUsernamePwdDialog(const QVariantMap &parameters) 
hgs
parents:
diff changeset
    59
 :mEdit1(NULL), 
hgs
parents:
diff changeset
    60
 mEdit2(NULL), 
hgs
parents:
diff changeset
    61
 mUnameValidator(NULL),
hgs
parents:
diff changeset
    62
 mPwdValidator(NULL),
34
hgs
parents: 26
diff changeset
    63
 mTranslator(new HbTranslator("eapprompts")),
hgs
parents: 26
diff changeset
    64
 mClose(false),
hgs
parents: 26
diff changeset
    65
 mOkActionPressed(false)
26
hgs
parents:
diff changeset
    66
{
hgs
parents:
diff changeset
    67
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_EAPUSERNAMEPWDDIALOG_ENTRY );
hgs
parents:
diff changeset
    68
    qDebug("EapUsernamePwdDialog::EapUsernamePwdDialog ENTER");
hgs
parents:
diff changeset
    69
        
hgs
parents:
diff changeset
    70
    createDialog(parameters);
34
hgs
parents: 26
diff changeset
    71
        
26
hgs
parents:
diff changeset
    72
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_EAPUSERNAMEPWDDIALOG_EXIT );
hgs
parents:
diff changeset
    73
    qDebug("EapUsernamePwdDialog::EapUsernamePwdDialog EXIT");
hgs
parents:
diff changeset
    74
}
hgs
parents:
diff changeset
    75
    
36
hgs
parents: 34
diff changeset
    76
/*!
26
hgs
parents:
diff changeset
    77
 * The construction of the dialog
36
hgs
parents: 34
diff changeset
    78
 *
hgs
parents: 34
diff changeset
    79
 * @param [in] parameters Parameters for the Construction of the dialog.
26
hgs
parents:
diff changeset
    80
 */ 
hgs
parents:
diff changeset
    81
void EapUsernamePwdDialog::createDialog(const QVariantMap &parameters )
hgs
parents:
diff changeset
    82
{
hgs
parents:
diff changeset
    83
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CREATEDIALOG_ENTRY );
hgs
parents:
diff changeset
    84
    qDebug("EapUsernamePwdDialog::createDialog ENTER");
hgs
parents:
diff changeset
    85
     
34
hgs
parents: 26
diff changeset
    86
    QString keyauthmethod("authmethod");    
hgs
parents: 26
diff changeset
    87
    QString keyuname("username");
hgs
parents: 26
diff changeset
    88
    QString keyeaptype("eaptype");
26
hgs
parents:
diff changeset
    89
        
34
hgs
parents: 26
diff changeset
    90
    QString unamestr;
hgs
parents: 26
diff changeset
    91
    QString authMethodstr;
hgs
parents: 26
diff changeset
    92
    
hgs
parents: 26
diff changeset
    93
    //Get default username (if exists) and 
hgs
parents: 26
diff changeset
    94
    //auth method strings from parameters   
26
hgs
parents:
diff changeset
    95
    if ( parameters.empty() == false ) {
hgs
parents:
diff changeset
    96
        if ( parameters.contains(keyuname) ) {
hgs
parents:
diff changeset
    97
            QVariant variant = parameters.value(keyuname);
hgs
parents:
diff changeset
    98
            unamestr = variant.toString();
hgs
parents:
diff changeset
    99
            }
hgs
parents:
diff changeset
   100
        if ( parameters.contains(keyauthmethod) ) {
hgs
parents:
diff changeset
   101
            QVariant variant = parameters.value(keyauthmethod);
hgs
parents:
diff changeset
   102
            authMethodstr = variant.toString();
hgs
parents:
diff changeset
   103
            }    
hgs
parents:
diff changeset
   104
        } 
hgs
parents:
diff changeset
   105
    
34
hgs
parents: 26
diff changeset
   106
    QString labelText1(HbParameterLengthLimiter(hbTrId("txt_occ_dialog_1_user_name")).arg(authMethodstr));
hgs
parents: 26
diff changeset
   107
    QString labelText2(HbParameterLengthLimiter(hbTrId("txt_occ_dialog_password")));
26
hgs
parents:
diff changeset
   108
    
hgs
parents:
diff changeset
   109
    //Set the dialog to be on the screen until user reacts
hgs
parents:
diff changeset
   110
    //by pressing any of the Action buttons
hgs
parents:
diff changeset
   111
    this->setModal(true);
hgs
parents:
diff changeset
   112
    this->setTimeout(HbPopup::NoTimeout);
49
hgs
parents: 44
diff changeset
   113
    this->setDismissPolicy(HbPopup::NoDismiss);  
hgs
parents: 44
diff changeset
   114
    this->setDismissOnAction(false);       
26
hgs
parents:
diff changeset
   115
    this->setAdditionalRowVisible(true);
hgs
parents:
diff changeset
   116
    
36
hgs
parents: 34
diff changeset
   117
    //Set the first Line Edit (user name) to be on the screen
26
hgs
parents:
diff changeset
   118
    this->setPromptText(labelText1, 0);   
hgs
parents:
diff changeset
   119
    mEdit1 = this->lineEdit(0);
36
hgs
parents: 34
diff changeset
   120
    //Set default user name string
26
hgs
parents:
diff changeset
   121
    mEdit1->setText(unamestr);
hgs
parents:
diff changeset
   122
    
36
hgs
parents: 34
diff changeset
   123
    //Set the second Line Edit (password) to be on the screen also
26
hgs
parents:
diff changeset
   124
    this->setPromptText(labelText2, 1);   
hgs
parents:
diff changeset
   125
    mEdit2 = this->lineEdit(1);        
34
hgs
parents: 26
diff changeset
   126
    
hgs
parents: 26
diff changeset
   127
    //Get the EAP type for the Line Edits (Validator)
26
hgs
parents:
diff changeset
   128
    QByteArray ba;
hgs
parents:
diff changeset
   129
    if ( parameters.contains(keyeaptype) ) {
hgs
parents:
diff changeset
   130
        QVariant variant = parameters.value(keyeaptype);
hgs
parents:
diff changeset
   131
        ba = variant.toByteArray();
hgs
parents:
diff changeset
   132
        } 
34
hgs
parents: 26
diff changeset
   133
    Q_ASSERT( ba.isEmpty() == false );    
26
hgs
parents:
diff changeset
   134
    EapQtExpandedEapType e_type(ba);
hgs
parents:
diff changeset
   135
    EapQtConfigInterface eap_config_if;
hgs
parents:
diff changeset
   136
    
34
hgs
parents: 26
diff changeset
   137
    mUnameValidator.reset(eap_config_if.validatorEap(e_type,
hgs
parents: 26
diff changeset
   138
                EapQtConfig::Username));
hgs
parents: 26
diff changeset
   139
    Q_ASSERT( mUnameValidator.isNull() == false );
hgs
parents: 26
diff changeset
   140
   
26
hgs
parents:
diff changeset
   141
    mUnameValidator->updateEditor(mEdit1);
hgs
parents:
diff changeset
   142
        
34
hgs
parents: 26
diff changeset
   143
    mPwdValidator.reset(eap_config_if.validatorEap(e_type,
hgs
parents: 26
diff changeset
   144
                EapQtConfig::Password));
hgs
parents: 26
diff changeset
   145
    Q_ASSERT( mPwdValidator.isNull() == false );
hgs
parents: 26
diff changeset
   146
        
26
hgs
parents:
diff changeset
   147
    mPwdValidator->updateEditor(mEdit2);
34
hgs
parents: 26
diff changeset
   148
    
hgs
parents: 26
diff changeset
   149
    //Remove all default actions from the dialog 
hgs
parents: 26
diff changeset
   150
    QList<QAction*> action_list = this->actions();    
26
hgs
parents:
diff changeset
   151
    for ( int i = 0; i < action_list.count(); i++ ) {
hgs
parents:
diff changeset
   152
        this->removeAction(action_list.at(i));
hgs
parents:
diff changeset
   153
        } 
hgs
parents:
diff changeset
   154
    
34
hgs
parents: 26
diff changeset
   155
    //Add a new Ok button action 
26
hgs
parents:
diff changeset
   156
    HbAction* actionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
hgs
parents:
diff changeset
   157
    this->addAction(actionOk);
34
hgs
parents: 26
diff changeset
   158
    //Add a new Cancel button action
26
hgs
parents:
diff changeset
   159
    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
hgs
parents:
diff changeset
   160
    this->addAction( actionCancel );    
34
hgs
parents: 26
diff changeset
   161
    
49
hgs
parents: 44
diff changeset
   162
    //Connect to a SLOT owned by this class 
26
hgs
parents:
diff changeset
   163
    bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
hgs
parents:
diff changeset
   164
    Q_ASSERT(connected == true);
hgs
parents:
diff changeset
   165
    
49
hgs
parents: 44
diff changeset
   166
    //Connect to a SLOT owned by this class 
26
hgs
parents:
diff changeset
   167
    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
hgs
parents:
diff changeset
   168
    Q_ASSERT(connected == true);
hgs
parents:
diff changeset
   169
    
hgs
parents:
diff changeset
   170
    // Connect the about to close and hide signals, so that we are able to inform 
hgs
parents:
diff changeset
   171
    // the caller that the dialog was closed   
hgs
parents:
diff changeset
   172
    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
hgs
parents:
diff changeset
   173
    Q_ASSERT(connected == true);
hgs
parents:
diff changeset
   174
    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
hgs
parents:
diff changeset
   175
    Q_ASSERT(connected == true);
hgs
parents:
diff changeset
   176
   
hgs
parents:
diff changeset
   177
    OstTraceFunctionExit0( DUP1_EAPUSERNAMEPWDDIALOG_CREATEDIALOG_EXIT );
hgs
parents:
diff changeset
   178
    qDebug("EapUsernamePwdDialog::createDialog EXIT");
hgs
parents:
diff changeset
   179
}
hgs
parents:
diff changeset
   180
36
hgs
parents: 34
diff changeset
   181
/*!
26
hgs
parents:
diff changeset
   182
 * Destructor
hgs
parents:
diff changeset
   183
 */
hgs
parents:
diff changeset
   184
EapUsernamePwdDialog::~EapUsernamePwdDialog()
hgs
parents:
diff changeset
   185
{
hgs
parents:
diff changeset
   186
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_DEAPUSERNAMEPWDDIALOG_ENTRY );
hgs
parents:
diff changeset
   187
    qDebug("EapUsernamePwdDialog::~EapUsernamePwdDialog");
hgs
parents:
diff changeset
   188
    
hgs
parents:
diff changeset
   189
    //The dialog widgets are deleted as the dialog is deleted
34
hgs
parents: 26
diff changeset
   190
    // mPwdValidator:   scoped pointer deleted automatically
hgs
parents: 26
diff changeset
   191
    // mUnameValidator: scoped pointer deleted automatically
26
hgs
parents:
diff changeset
   192
    
hgs
parents:
diff changeset
   193
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_DEAPUSERNAMEPWDDIALOG_EXIT );
hgs
parents:
diff changeset
   194
}
hgs
parents:
diff changeset
   195
36
hgs
parents: 34
diff changeset
   196
/*!
hgs
parents: 34
diff changeset
   197
 * Line edit validator
hgs
parents: 34
diff changeset
   198
 *
hgs
parents: 34
diff changeset
   199
 * @return true if content is valid.
26
hgs
parents:
diff changeset
   200
 */
hgs
parents:
diff changeset
   201
bool EapUsernamePwdDialog::validate() const
hgs
parents:
diff changeset
   202
{
hgs
parents:
diff changeset
   203
    qDebug("EapUsernamePwdDialog::validate ENTER");
hgs
parents:
diff changeset
   204
    
hgs
parents:
diff changeset
   205
    bool valid = false;
hgs
parents:
diff changeset
   206
hgs
parents:
diff changeset
   207
    if ( mUnameValidator->validate(mEdit1->text())== EapQtValidator::StatusOk   && 
hgs
parents:
diff changeset
   208
         mPwdValidator->validate(mEdit2->text()) == EapQtValidator::StatusOk ) {
hgs
parents:
diff changeset
   209
    
hgs
parents:
diff changeset
   210
        qDebug("EapUsernamePwdDialog::validate(): returns TRUE");
hgs
parents:
diff changeset
   211
        valid = true;
hgs
parents:
diff changeset
   212
    }
hgs
parents:
diff changeset
   213
hgs
parents:
diff changeset
   214
    qDebug("EapUsernamePwdDialog::validate EXIT");
hgs
parents:
diff changeset
   215
    return valid;
hgs
parents:
diff changeset
   216
}
hgs
parents:
diff changeset
   217
36
hgs
parents: 34
diff changeset
   218
/*!
26
hgs
parents:
diff changeset
   219
 * Function is called when the Ok Action button is pressed
hgs
parents:
diff changeset
   220
 */
hgs
parents:
diff changeset
   221
void EapUsernamePwdDialog::okPressed()
hgs
parents:
diff changeset
   222
{
hgs
parents:
diff changeset
   223
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_OKPRESSED_ENTRY );
hgs
parents:
diff changeset
   224
    qDebug("EapUsernamePwdDialog::okPressed ENTER");
hgs
parents:
diff changeset
   225
    
hgs
parents:
diff changeset
   226
    if ( validate() == true && mOkActionPressed == false ) {
hgs
parents:
diff changeset
   227
        
hgs
parents:
diff changeset
   228
            mOkActionPressed = true;
hgs
parents:
diff changeset
   229
            
hgs
parents:
diff changeset
   230
            QVariantMap data;
34
hgs
parents: 26
diff changeset
   231
     
hgs
parents: 26
diff changeset
   232
            data["username"] = mEdit1->text();
hgs
parents: 26
diff changeset
   233
            data["password"] = mEdit2->text();
26
hgs
parents:
diff changeset
   234
      
hgs
parents:
diff changeset
   235
            qDebug("EapUsernamePwdDialog::okPressed: emit deviceDialogData");
hgs
parents:
diff changeset
   236
    
hgs
parents:
diff changeset
   237
            emit deviceDialogData(data); 
hgs
parents:
diff changeset
   238
            closeDeviceDialog(true);
hgs
parents:
diff changeset
   239
    }
hgs
parents:
diff changeset
   240
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_OKPRESSED_EXIT );
hgs
parents:
diff changeset
   241
    qDebug("EapUsernamePwdDialog::okPressed EXIT");
hgs
parents:
diff changeset
   242
}
hgs
parents:
diff changeset
   243
36
hgs
parents: 34
diff changeset
   244
/*!
26
hgs
parents:
diff changeset
   245
 * Function is called when the Cancel Action button is pressed
hgs
parents:
diff changeset
   246
 */
hgs
parents:
diff changeset
   247
void EapUsernamePwdDialog::cancelPressed()
hgs
parents:
diff changeset
   248
{
hgs
parents:
diff changeset
   249
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CANCELPRESSED_ENTRY );
hgs
parents:
diff changeset
   250
    qDebug("EapUsernamePwdDialog::cancelPressed ENTER");
hgs
parents:
diff changeset
   251
    
hgs
parents:
diff changeset
   252
    if (!mClose) {
hgs
parents:
diff changeset
   253
        mClose = true;
hgs
parents:
diff changeset
   254
        closeDeviceDialog(true);
hgs
parents:
diff changeset
   255
    }   
hgs
parents:
diff changeset
   256
    qDebug("EapUsernamePwdDialog::cancelPressed EXIT");
hgs
parents:
diff changeset
   257
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_CANCELPRESSED_EXIT );
hgs
parents:
diff changeset
   258
}
hgs
parents:
diff changeset
   259
36
hgs
parents: 34
diff changeset
   260
/*!
26
hgs
parents:
diff changeset
   261
 * Function is called when the dialog is about to close
hgs
parents:
diff changeset
   262
 */
hgs
parents:
diff changeset
   263
void EapUsernamePwdDialog::closingDialog()
hgs
parents:
diff changeset
   264
{
hgs
parents:
diff changeset
   265
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CLOSINGDIALOG_ENTRY );
hgs
parents:
diff changeset
   266
    qDebug("EapUsernamePwdDialog::closingDialog ENTER");
34
hgs
parents: 26
diff changeset
   267
     
26
hgs
parents:
diff changeset
   268
    qDebug("EapUsernamePwdDialog::closingDialog EXIT");
hgs
parents:
diff changeset
   269
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_CLOSINGDIALOG_EXIT );
hgs
parents:
diff changeset
   270
}
hgs
parents:
diff changeset
   271
36
hgs
parents: 34
diff changeset
   272
/*!
hgs
parents: 34
diff changeset
   273
 * Device dialog parameters to be set while dialog is displayed.
hgs
parents: 34
diff changeset
   274
 * Not supported. 
hgs
parents: 34
diff changeset
   275
 *
hgs
parents: 34
diff changeset
   276
 * @param [in] parameters NOT USED
hgs
parents: 34
diff changeset
   277
 * @return true always.
hgs
parents: 34
diff changeset
   278
 */  
26
hgs
parents:
diff changeset
   279
bool EapUsernamePwdDialog::setDeviceDialogParameters
hgs
parents:
diff changeset
   280
                (const QVariantMap &parameters)
hgs
parents:
diff changeset
   281
{
hgs
parents:
diff changeset
   282
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
hgs
parents:
diff changeset
   283
    
hgs
parents:
diff changeset
   284
    Q_UNUSED(parameters)
hgs
parents:
diff changeset
   285
    // changing the dialog after presenting it is not supported.
hgs
parents:
diff changeset
   286
    
hgs
parents:
diff changeset
   287
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
hgs
parents:
diff changeset
   288
    return true;
hgs
parents:
diff changeset
   289
}
hgs
parents:
diff changeset
   290
36
hgs
parents: 34
diff changeset
   291
/*!
hgs
parents: 34
diff changeset
   292
 * Not supported
hgs
parents: 34
diff changeset
   293
 *
hgs
parents: 34
diff changeset
   294
 * @return 0 always returned.
26
hgs
parents:
diff changeset
   295
 */
hgs
parents:
diff changeset
   296
int EapUsernamePwdDialog::deviceDialogError() const
hgs
parents:
diff changeset
   297
{
hgs
parents:
diff changeset
   298
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGERROR_ENTRY );
hgs
parents:
diff changeset
   299
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGERROR_EXIT);
hgs
parents:
diff changeset
   300
    return 0;
hgs
parents:
diff changeset
   301
}
hgs
parents:
diff changeset
   302
36
hgs
parents: 34
diff changeset
   303
/*!
26
hgs
parents:
diff changeset
   304
 * Dialog is closed and the signal about closing is emitted
36
hgs
parents: 34
diff changeset
   305
 *
hgs
parents: 34
diff changeset
   306
 * @param [in] byClient indicates when the user closes the dialog
26
hgs
parents:
diff changeset
   307
 */
hgs
parents:
diff changeset
   308
void EapUsernamePwdDialog::closeDeviceDialog(bool byClient)
hgs
parents:
diff changeset
   309
{   
hgs
parents:
diff changeset
   310
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CLOSEDEVICEDIALOG_ENTRY );
hgs
parents:
diff changeset
   311
    qDebug("EapUsernamePwdDialog::closeDeviceDialog ENTER");
hgs
parents:
diff changeset
   312
        
hgs
parents:
diff changeset
   313
    //If the user closes the dialog, then the deviceDialogClosed is emitted
hgs
parents:
diff changeset
   314
    if ( byClient == true )
hgs
parents:
diff changeset
   315
        {
hgs
parents:
diff changeset
   316
        qDebug("EapUsernamePwdDialog::closeDeviceDialog: emit deviceDialogClosed");
hgs
parents:
diff changeset
   317
        emit deviceDialogClosed();
hgs
parents:
diff changeset
   318
        }
hgs
parents:
diff changeset
   319
    
hgs
parents:
diff changeset
   320
    qDebug("EapUsernamePwdDialog::closeDeviceDialog EXIT");
hgs
parents:
diff changeset
   321
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_CLOSEDEVICEDIALOG_EXIT );
hgs
parents:
diff changeset
   322
}
hgs
parents:
diff changeset
   323
36
hgs
parents: 34
diff changeset
   324
/*!
26
hgs
parents:
diff changeset
   325
 * This dialog widget is returned to the caller
36
hgs
parents: 34
diff changeset
   326
 *
hgs
parents: 34
diff changeset
   327
 * @return this dialog widget
26
hgs
parents:
diff changeset
   328
 */
hgs
parents:
diff changeset
   329
HbPopup *EapUsernamePwdDialog::deviceDialogWidget() const
hgs
parents:
diff changeset
   330
{
hgs
parents:
diff changeset
   331
    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGWIDGET_ENTRY );
hgs
parents:
diff changeset
   332
    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGWIDGET_EXIT );
hgs
parents:
diff changeset
   333
    
hgs
parents:
diff changeset
   334
    return const_cast<EapUsernamePwdDialog*>(this);
hgs
parents:
diff changeset
   335
}
hgs
parents:
diff changeset
   336