/*
*
* Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Original Contributors:
* Comarch S.A. - original contribution.
*
* Contributors:
*
* Description:
*
*/
#include "hfpprofileplugin.h"
#include "hfpdatahandler.h"
#include "hfpsettings.h"
#include "debug.h"
CHsHFPProfile* CHsHFPProfile::NewL()
{
CHsHFPProfile *self = CHsHFPProfile::NewLC();
CleanupStack::Pop(self);
return self;
}
CHsHFPProfile* CHsHFPProfile::NewLC()
{
CHsHFPProfile *self = new (ELeave) CHsHFPProfile();
CleanupStack::PushL(self);
self->ContructL();
return self;
}
CHsHFPProfile::CHsHFPProfile()
{
}
void CHsHFPProfile::ContructL()
{
TRACE_FUNC_ENTRY
iDataHandler = CHsHFPDataHandler::NewL();
iSettings = CHsHFPSettings::InstanceL();
TRACE_FUNC_EXIT
}
CHsHFPProfile::~CHsHFPProfile()
{
TRACE_FUNC_ENTRY
if (iDataHandler)
{
delete iDataHandler;
}
if (iSettings)
{
iSettings->Release();
}
TRACE_FUNC_EXIT
}
void CHsHFPProfile::HandleCommandL(const TDesC8& aCommandsIn,
TDes8& aCommandsOut, const TBool aFromAG)
{
TRACE_FUNC_ENTRY
iDataHandler->ProcessDataL(aCommandsIn, aFromAG, aCommandsOut);
TRACE_FUNC_EXIT
}
void CHsHFPProfile::HandleClientDisconnected(TInt aErr)
{
TRACE_FUNC_ENTRY
iDataHandler->HandleClientDisconnected(aErr);
TRACE_FUNC_EXIT
}
void CHsHFPProfile::HandleClientConnected(TDes8& aCommandOut)
{
TRACE_FUNC_ENTRY
iDataHandler->HandleClientConnected(aCommandOut);
TRACE_FUNC_EXIT
}
void CHsHFPProfile::HandleAcceptCallL(TDes8& aCommandOut)
{
TRACE_FUNC_ENTRY
iDataHandler->HandleAcceptCallL(aCommandOut);
TRACE_FUNC_EXIT
}
void CHsHFPProfile::HandleReleaseCallL(TDes8& aCommandOut)
{
TRACE_FUNC_ENTRY
iDataHandler->HandleReleaseCallL(aCommandOut);
TRACE_FUNC_EXIT
}