controlpanelui/src/seccodeui/src/seccodemodel_symbian.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:29:29 +0200
changeset 10 0a74be98a8bc
permissions -rw-r--r--
Revision: 201005 Kit: 201011

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0""
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  
*
*/

#include "seccodemodel_p.h"
#include "seccodeuiglobal.h"
#include <e32err.h>
#include <exterror.h>

static int symbianErrtoQtErr(int err)
{
    switch (err) {
    case KErrNone:
        return SecCode::ErrNone;
    case KErrGsm0707IncorrectPassword:
        return SecCode::ErrGsm0707IncorrectPassword;
    case KErrAccessDenied:
        return SecCode::ErrAccessDenied;
    case KErrGsmSSPasswordAttemptsViolation:
        return SecCode::ErrGsmSSPasswordAttemptsViolation;
    case KErrLocked:
        return SecCode::ErrLocked;
    case KErrGsm0707OperationNotAllowed:
        return SecCode::ErrGsm0707OperationNotAllowed;
    case KErrGsm0707SIMPuk2Required:
        return SecCode::ErrGsm0707SIMPuk2Required;
    case KErrAbort:
        return SecCode::ErrAbort;
    default:
        break;
    }
    
    return err;
}