appinstall_plat/sifui_api/src/sifuierrorinfo.cpp
changeset 58 67f2119dc623
equal deleted inserted replaced
57:0dae4436159f 58:67f2119dc623
       
     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:  CSifUiErrorInfo for installation error details
       
    15 *
       
    16 */
       
    17 
       
    18 #include "sifuierrorinfo.h"         // CSifUiErrorInfo
       
    19 
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // CSifUiErrorInfo::NewLC()
       
    23 // ---------------------------------------------------------------------------
       
    24 //
       
    25 EXPORT_C CSifUiErrorInfo* CSifUiErrorInfo::NewLC( Usif::TErrorCategory aErrorCategory,
       
    26         TInt aErrorCode, TInt aExtendedErrorCode, const TDesC& aErrorMessage,
       
    27         const TDesC& aErrorMessageDetails )
       
    28     {
       
    29     CSifUiErrorInfo* self = new (ELeave) CSifUiErrorInfo;
       
    30     CleanupStack::PushL( self );
       
    31     self->ConstructL( aErrorCategory, aErrorCode, aExtendedErrorCode,
       
    32             aErrorMessage, aErrorMessageDetails );
       
    33     return self;
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CSifUiErrorInfo::NewL()
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 EXPORT_C CSifUiErrorInfo* CSifUiErrorInfo::NewL( Usif::TErrorCategory aErrorCategory,
       
    41         TInt aErrorCode, TInt aExtendedErrorCode, const TDesC& aErrorMessage,
       
    42         const TDesC& aErrorMessageDetails )
       
    43     {
       
    44     CSifUiErrorInfo* self = CSifUiErrorInfo::NewLC( aErrorCategory, aErrorCode,
       
    45             aExtendedErrorCode, aErrorMessage, aErrorMessageDetails );
       
    46     CleanupStack::Pop( self );
       
    47     return self;
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CSifUiErrorInfo::~CSifUiErrorInfo()
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 CSifUiErrorInfo::~CSifUiErrorInfo()
       
    55     {
       
    56     delete iErrorMessage;
       
    57     delete iErrorMessageDetails;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // CSifUiErrorInfo::CSifUiErrorInfo()
       
    62 // ---------------------------------------------------------------------------
       
    63 //
       
    64 CSifUiErrorInfo::CSifUiErrorInfo()
       
    65     {
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CSifUiErrorInfo::ConstructL()
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 void CSifUiErrorInfo::ConstructL( Usif::TErrorCategory aErrorCategory,
       
    73         TInt aErrorCode, TInt aExtendedErrorCode, const TDesC& aErrorMessage,
       
    74         const TDesC& aErrorMessageDetails )
       
    75     {
       
    76     iErrorCategory = aErrorCategory;
       
    77     iErrorCode = aErrorCode;
       
    78     iExtendedErrorCode = aExtendedErrorCode;
       
    79     iErrorMessage = aErrorMessage.AllocL();
       
    80     iErrorMessageDetails = aErrorMessageDetails.AllocL();
       
    81     }
       
    82