mpserviceplugins/mpxsqlitedbplugin/src/mpxdbutil.cpp
changeset 22 ecf06a08d4d9
parent 20 82baf59ce8dd
child 23 d45f4c087764
child 25 3ec52facab4d
child 34 2c5162224003
--- a/mpserviceplugins/mpxsqlitedbplugin/src/mpxdbutil.cpp	Fri Apr 16 14:56:30 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2006 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:  Contains utility functions for the DB plugin
-*
-*/
-
-
-// INCLUDE FILES
-#include <mpxlog.h>
-
-#include "mpxcollectiondbdef.h"
-#include "mpxdbutil.h"
-
-// ============================ MEMBER FUNCTIONS ==============================
-
-// ----------------------------------------------------------------------------
-// Filter out duplicated Ids
-// ----------------------------------------------------------------------------
-//
-void MPXDbUtil::FilterDuplicatedIdsL(
-    const TArray<TUint32>& aIds,
-    RArray<TUint32>& aFilteredIds)
-    {
-    MPX_FUNC("MPXDbUtil::FilterDuplicatedIdsL");
-
-    TInt count(aIds.Count());
-    for (TInt i = 0; i < count; ++i)
-        {
-        MPX_TRAPD(error, aFilteredIds.InsertInUnsignedKeyOrderL(aIds[i]));
-        if ((error != KErrNone) && (error != KErrAlreadyExists))
-            {
-            User::Leave(error);
-            }
-        }
-    }
-
-// ----------------------------------------------------------------------------
-// MPXDbUtil::TableNameForCategoryL
-// ----------------------------------------------------------------------------
-//
-TPtrC MPXDbUtil::TableNameForCategoryL(
-    TMPXGeneralCategory aCategory)
-    {
-    MPX_FUNC("MPXDbUtil::TableNameForCategoryL");
-
-    TPtrC ptr;
-    switch (aCategory)
-        {
-        case EMPXPlaylist:
-            ptr.Set(KMCPlaylistTable);
-            break;
-        case EMPXArtist:
-            ptr.Set(KMCArtistTable);
-            break;
-        case EMPXAlbum:
-            ptr.Set(KMCAlbumTable);
-            break;
-        case EMPXGenre:
-            ptr.Set(KMCGenreTable);
-            break;
-        case EMPXComposer:
-            ptr.Set(KMCComposerTable);
-            break;
-        default:
-            User::Leave(KErrNotSupported);
-        }
-
-    return ptr;
-    }
-
-// ----------------------------------------------------------------------------
-// MPXDbUtil::MusicFieldNameForCategoryL
-// ----------------------------------------------------------------------------
-//
-TPtrC MPXDbUtil::MusicFieldNameForCategoryL(
-    TMPXGeneralCategory aCategory)
-    {
-    MPX_FUNC("MPXDbUtil::MusicFieldNameForCategoryL");
-
-    TPtrC ptr;
-    switch (aCategory)
-        {
-        case EMPXArtist:
-            ptr.Set(KMCMusicArtist);
-            break;
-        case EMPXAlbum:
-            ptr.Set(KMCMusicAlbum);
-            break;
-        case EMPXGenre:
-            ptr.Set(KMCMusicGenre);
-            break;
-        case EMPXComposer:
-            ptr.Set(KMCMusicComposer);
-            break;
-        default:
-            User::Leave(KErrNotSupported);
-        }
-
-    return ptr;
-    }
-
-// End of File