diff -r 000000000000 -r ff3acec5bc43 mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbplugin/src/mpxdbcomposer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbplugin/src/mpxdbcomposer.cpp Thu Dec 17 08:45:05 2009 +0200 @@ -0,0 +1,94 @@ +/* +* 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: Responsible for interation with the category tables: +* Artist, Album, Genre and Composer +* +*/ + + +// INCLUDE FILES +#include +#include "mpxdbcomposer.h" + +// CONSTANTS + +// maximum number of table name entries per query +const TInt KMaxTableNameCount = 2; + +// ============================ MEMBER FUNCTIONS ============================== + +// ---------------------------------------------------------------------------- +// Two-phased constructor. +// ---------------------------------------------------------------------------- +// +CMPXDbComposer* CMPXDbComposer::NewL( + CMPXDbManager& aDbManager, + TMPXGeneralCategory aCategory) + { + MPX_FUNC("CMPXDbComposer::NewL"); + + CMPXDbComposer* self = CMPXDbComposer::NewLC(aDbManager, aCategory); + CleanupStack::Pop(self); + return self; + } + +// ---------------------------------------------------------------------------- +// Two-phased constructor. +// ---------------------------------------------------------------------------- +// +CMPXDbComposer* CMPXDbComposer::NewLC( + CMPXDbManager& aDbManager, + TMPXGeneralCategory aCategory) + { + MPX_FUNC("CMPXDbComposer::NewLC"); + + CMPXDbComposer* self = new (ELeave) CMPXDbComposer(aDbManager, aCategory); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +// ---------------------------------------------------------------------------- +// Destructor +// ---------------------------------------------------------------------------- +// +CMPXDbComposer::~CMPXDbComposer() + { + MPX_FUNC("CMPXDbComposer::~CMPXDbComposer"); + } + +// ---------------------------------------------------------------------------- +// Constructor +// ---------------------------------------------------------------------------- +// +CMPXDbComposer::CMPXDbComposer( + CMPXDbManager& aDbManager, + TMPXGeneralCategory aCategory) : + CMPXDbCategory(aDbManager, aCategory) + { + MPX_FUNC("CMPXDbComposer::CMPXDbComposer"); + } + +// ---------------------------------------------------------------------------- +// Second phase constructor. +// ---------------------------------------------------------------------------- +// +void CMPXDbComposer::ConstructL() + { + MPX_FUNC("CMPXDbComposer::ConstructL"); + + BaseConstructL(); + } + +// End of File