clfwrapper/mediacollectionmanagersrc/mediacollectionmanagerimpl.cpp
changeset 0 c53acadfccc6
child 1 acef663c1218
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "mediacollectionmanagerimpl.h"
       
    20 #include "CLFConsts.h"
       
    21 #include "CLFPanics.h"
       
    22 
       
    23 const TInt KCLFMCMObserverArrayGranularity( 2 );
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CMediaCollectionManagerImpl::CMediaCollectionManagerImpl
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CMediaCollectionManagerImpl::CMediaCollectionManagerImpl()
       
    32     : iObserverArray( KCLFMCMObserverArrayGranularity )
       
    33     {
       
    34     }
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // CMediaCollectionManagerImpl::ConstructL
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 void CMediaCollectionManagerImpl::ConstructL()
       
    41     {
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CMediaCollectionManagerImpl::NewL
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CMediaCollectionManagerImpl* CMediaCollectionManagerImpl::NewL()
       
    49     {
       
    50     CMediaCollectionManagerImpl* self =
       
    51                         new (ELeave) CMediaCollectionManagerImpl;
       
    52     CleanupStack::PushL( self );
       
    53     self->ConstructL();
       
    54     CleanupStack::Pop( self );
       
    55     return self;
       
    56     }
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // CMediaCollectionManagerImpl::~CMediaCollectionManagerImpl
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 CMediaCollectionManagerImpl::~CMediaCollectionManagerImpl()
       
    63     {
       
    64     iObserverArray.Close();
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CMediaCollectionManagerImpl::GetCollectionInfosL
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 void CMediaCollectionManagerImpl::GetCollectionInfosL(
       
    72 			RPointerArray<MMediaCollectionInfo>& /* aCollectionInfoArray */ ) const
       
    73     {
       
    74     User::Leave( KErrNotSupported );
       
    75 
       
    76     }
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // CMediaCollectionManagerImpl::CollectionInfoByIdLC
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 MMediaCollectionInfo* CMediaCollectionManagerImpl::CollectionInfoByIdLC(
       
    83                 TInt /* aId */ ) const
       
    84     {
       
    85     User::Leave( KErrNotSupported );
       
    86 
       
    87     MMediaCollectionInfo* info = NULL;
       
    88     return info;
       
    89     }
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CMediaCollectionManagerImpl::CreateCollectionL
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 TInt CMediaCollectionManagerImpl::CreateCollectionL(
       
    96                 const TDesC& /* aName */,
       
    97                 const TArray<TInt>& /* aCollectionItemTypes */,
       
    98                 TInt32 /* aCollectionProperties */ )
       
    99     {
       
   100     User::Leave( KErrNotSupported );
       
   101 
       
   102     TInt collectionID( 0 );
       
   103     return collectionID;
       
   104     }
       
   105 
       
   106 // -----------------------------------------------------------------------------
       
   107 // CMediaCollectionManagerImpl::DeleteCollectionL
       
   108 // -----------------------------------------------------------------------------
       
   109 //
       
   110 void CMediaCollectionManagerImpl::DeleteCollectionL(
       
   111                 TInt /* aId */ )
       
   112     {
       
   113     User::Leave( KErrNotSupported );
       
   114 
       
   115     }
       
   116 
       
   117 // -----------------------------------------------------------------------------
       
   118 // CMediaCollectionManagerImpl::RenameCollectionL
       
   119 // -----------------------------------------------------------------------------
       
   120 //
       
   121 void CMediaCollectionManagerImpl::RenameCollectionL(
       
   122                 TInt /* aId */,
       
   123                 const TDesC& /* aNewName */ )
       
   124     {
       
   125     User::Leave( KErrNotSupported );
       
   126 
       
   127     }
       
   128 
       
   129 // -----------------------------------------------------------------------------
       
   130 // CMediaCollectionManagerImpl::AddToCollectionL
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 void CMediaCollectionManagerImpl::AddToCollectionL(
       
   134                 TInt /* aId */,
       
   135                 const MDesCArray& /* aItemArray */,
       
   136                 TBool /* aRemoveFromOtherCollections */ )
       
   137     {
       
   138     User::Leave( KErrNotSupported );
       
   139 
       
   140     }
       
   141 
       
   142 // -----------------------------------------------------------------------------
       
   143 // CMediaCollectionManagerImpl::RemoveFromCollectionL
       
   144 // -----------------------------------------------------------------------------
       
   145 //
       
   146 void CMediaCollectionManagerImpl::RemoveFromCollectionL(
       
   147                 TInt /* aId */,
       
   148                 const MDesCArray& /* aItemArray */ )
       
   149     {
       
   150     User::Leave( KErrNotSupported );
       
   151 
       
   152     }
       
   153 
       
   154 // -----------------------------------------------------------------------------
       
   155 // CMediaCollectionManagerImpl::RemoveFromAllCollectionsL
       
   156 // -----------------------------------------------------------------------------
       
   157 //
       
   158 void CMediaCollectionManagerImpl::RemoveFromAllCollectionsL(
       
   159                     const MDesCArray& /* aItemArray */ )
       
   160     {
       
   161 #if ( 0 )
       
   162     User::Leave( KErrNotSupported );
       
   163 #endif
       
   164     }
       
   165 
       
   166 // -----------------------------------------------------------------------------
       
   167 // CMediaCollectionManagerImpl::GetCollectionItemArrayL
       
   168 // -----------------------------------------------------------------------------
       
   169 //
       
   170 void CMediaCollectionManagerImpl::GetCollectionItemArrayL(
       
   171                 TInt /* aId */,
       
   172                 CDesCArray& /* aItemArray */ ) const
       
   173     {
       
   174     User::Leave( KErrNotSupported );
       
   175 
       
   176     }
       
   177 
       
   178 // -----------------------------------------------------------------------------
       
   179 // CMediaCollectionManagerImpl::GetCollectionIdByItemL
       
   180 // -----------------------------------------------------------------------------
       
   181 //
       
   182 void CMediaCollectionManagerImpl::GetCollectionIdByItemL(
       
   183                 const TDesC& /* aItem */,
       
   184                 RArray<TInt>& /* aIdArray */ ) const
       
   185     {
       
   186 #if (0)
       
   187     User::Leave( KErrNotSupported );
       
   188 #endif
       
   189     }
       
   190 
       
   191 // -----------------------------------------------------------------------------
       
   192 // CMediaCollectionManagerImpl::AddCollectionObserverL
       
   193 // -----------------------------------------------------------------------------
       
   194 //
       
   195 void CMediaCollectionManagerImpl::AddCollectionObserverL(
       
   196                 MMediaCollectionObserver& aObserver )
       
   197     {
       
   198     iObserverArray.AppendL( &aObserver );
       
   199     }
       
   200 
       
   201 // -----------------------------------------------------------------------------
       
   202 // CMediaCollectionManagerImpl::RemoveCollectionObserverL
       
   203 // -----------------------------------------------------------------------------
       
   204 //
       
   205 void CMediaCollectionManagerImpl::RemoveCollectionObserverL(
       
   206                 MMediaCollectionObserver& aObserver )
       
   207     {
       
   208     const TInt index( iObserverArray.Find( &aObserver ) );
       
   209     if( index >= 0 )
       
   210         {
       
   211         iObserverArray.Remove( index );
       
   212         }
       
   213     }
       
   214 
       
   215 // -----------------------------------------------------------------------------
       
   216 // CMediaCollectionManagerImpl::GetDriveById
       
   217 // -----------------------------------------------------------------------------
       
   218 //
       
   219 TInt32 CMediaCollectionManagerImpl::GetDriveByIdL( TInt /* aId */ )
       
   220     {
       
   221     User::Leave( KErrNotSupported );
       
   222     
       
   223     TInt drive( 0 );
       
   224     return drive;
       
   225     }
       
   226 
       
   227 // End of file