appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/activerunner.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     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:  Test installer that uses Usif::RSoftwareInstall API.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "activerunner.h"
       
    19 #include "activerunner_symbian.h"
       
    20 
       
    21 
       
    22 ActiveRunner::ActiveRunner(bool useSif)
       
    23 {
       
    24     d_ptr = new ActiveRunnerPrivate(this);
       
    25     if (d_ptr) {
       
    26         d_ptr->Initialize(useSif);
       
    27     }
       
    28 }
       
    29 
       
    30 ActiveRunner::~ActiveRunner()
       
    31 {
       
    32     delete d_ptr;
       
    33 }
       
    34 
       
    35 void ActiveRunner::install(const QString &fileName, bool silent, bool openfile, bool ocsp)
       
    36 {
       
    37     if (d_ptr) {
       
    38         d_ptr->Install(fileName, silent, openfile, ocsp);
       
    39     }
       
    40 }
       
    41 
       
    42 void ActiveRunner::remove(const Usif::TComponentId& aComponentId, bool silent)
       
    43 {
       
    44     if (d_ptr) {
       
    45         d_ptr->Remove(aComponentId, silent);
       
    46     }
       
    47 }
       
    48 
       
    49 void ActiveRunner::remove(const TUid& aUid, const TDesC8& aMime, bool silent)
       
    50 {
       
    51     if (d_ptr) {
       
    52         d_ptr->Remove(aUid, aMime, silent);
       
    53     }
       
    54 }
       
    55 
       
    56 void ActiveRunner::handleCompletion()
       
    57 {
       
    58     emit opCompleted();
       
    59 }
       
    60 
       
    61 void ActiveRunner::handleError(int error)
       
    62 {
       
    63     emit opFailed(error);
       
    64 }
       
    65