phonebookui/Phonebook2/ccapplication/ccacontactorservice/src/ccacontactorservice.cpp
author andy simpson <andrews@symbian.org>
Thu, 02 Sep 2010 15:35:50 +0100
branchRCL_3
changeset 64 c1e8ba0c2b16
parent 21 b3431bff8c19
parent 63 f4a778e096c2
permissions -rw-r--r--
Merge after bad RCL_3 drop reverted

/*
* Copyright (c) 2007 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:  This is a class for starting services
 *                provided by CCA contactor service
 *
*/

#include <e32std.h>

#include "ccacontactorserviceheaders.h"

// ================= MEMBER FUNCTIONS =======================

// --------------------------------------------------------------------------
// CCAContactorService::ExecuteServiceL
// --------------------------------------------------------------------------
//
EXPORT_C CCAContactorService* CCAContactorService::NewL()
    {
    CCAContactorService* self = new (ELeave) CCAContactorService();
    CleanupStack::PushL(self);
    self->ConstructL();
    CleanupStack::Pop(self);
    return self;
    }

// --------------------------------------------------------------------------
// Destructor
// --------------------------------------------------------------------------
//
CCAContactorService::~CCAContactorService()
    {
    delete iOperator;
    }

// --------------------------------------------------------------------------
// Constructor
// --------------------------------------------------------------------------
//
CCAContactorService::CCAContactorService()
    {
    }

// --------------------------------------------------------------------------
// CCAContactorService::ConstructL
// --------------------------------------------------------------------------
//
void CCAContactorService::ConstructL()
    {
    iOperator = CCCAContactorServiceOperator::NewL();
    }

// --------------------------------------------------------------------------
// CCAContactorService::ExecuteServiceL
// --------------------------------------------------------------------------
//
EXPORT_C void CCAContactorService::ExecuteServiceL(
    const TCSParameter& aParameter)
    {
    CCA_DP (KCCAContactorServiceLoggerFile, CCA_L ("CCAContactorService::ExecuteServiceL()"));

    iCommandIsBeingHandled = ETrue;

    // All leaves are trapped in op class.
    iOperator->Execute(aParameter);

    iCommandIsBeingHandled = EFalse;

    CCA_DP (KCCAContactorServiceLoggerFile, CCA_L ("CCAContactorService::ExecuteServiceL(): Done."));
    }

// --------------------------------------------------------------------------
// CCAContactorService::IsBusy
// --------------------------------------------------------------------------
//
EXPORT_C TBool CCAContactorService::IsBusy() const
    {
    return iCommandIsBeingHandled;
    }

// --------------------------------------------------------------------------
// CCAContactorService::IsSelected
// --------------------------------------------------------------------------
//
EXPORT_C TBool CCAContactorService::IsSelected() const
    {
    return iOperator->IsSelected();
    }
// End of file