homesync/contentmanager/mediaservant/src/msfillrulecontroller.cpp
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2008 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:  CMSFillRuleController class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <StringLoader.h>
       
    20 #include <mediaservant.rsg>
       
    21 #include <utf.h>
       
    22 
       
    23 #include "cmfillrulecontainer.h"
       
    24 #include "cmfillrule.h"
       
    25 #include "msfillrulecontroller.h"
       
    26 #include "msconstants.h"
       
    27 #include "mediaservant.hrh"
       
    28 #include "msengine.h"
       
    29 #include "msdebug.h"
       
    30 
       
    31 
       
    32 // --------------------------------------------------------------------------
       
    33 // CMSFillRuleController::NewL
       
    34 // --------------------------------------------------------------------------
       
    35 //
       
    36 CMSFillRuleController* CMSFillRuleController::NewL( CMSEngine& aMSEngine )
       
    37     {
       
    38     LOG(_L("[MediaServant]\t CMSFillRuleController::NewL"));
       
    39 
       
    40     CMSFillRuleController* self = CMSFillRuleController::NewLC( aMSEngine );    
       
    41     CleanupStack::Pop(self);
       
    42     
       
    43     return self;
       
    44     }
       
    45 
       
    46 // --------------------------------------------------------------------------
       
    47 // CMSFillRuleController::NewLC
       
    48 // --------------------------------------------------------------------------
       
    49 //
       
    50 CMSFillRuleController* CMSFillRuleController::NewLC( CMSEngine& aMSEngine )
       
    51     {
       
    52     LOG(_L("[MediaServant]\t CMSFillRuleController::NewLC"));
       
    53 
       
    54     CMSFillRuleController* self = new (ELeave) CMSFillRuleController(
       
    55                                                     aMSEngine );
       
    56 
       
    57     CleanupStack::PushL(self);
       
    58     self->ConstructL();
       
    59         
       
    60     return self;
       
    61     }
       
    62     
       
    63 // --------------------------------------------------------------------------
       
    64 // CMSFillRuleController::ConstructL
       
    65 // --------------------------------------------------------------------------
       
    66 //
       
    67 void CMSFillRuleController::ConstructL()
       
    68     {
       
    69     LOG(_L("[MediaServant]\t CMSFillRuleController::ConstructL"));
       
    70 
       
    71     if (iMSEngine)
       
    72         {
       
    73         InitializeRuleContainersL();
       
    74         }
       
    75     }
       
    76 // --------------------------------------------------------------------------
       
    77 // CMSFillRuleController::CMSFillRuleController()
       
    78 // --------------------------------------------------------------------------
       
    79 //
       
    80 CMSFillRuleController::CMSFillRuleController( CMSEngine& aMSEngine )
       
    81     {
       
    82     LOG(_L("[MediaServant]\t CMSFillRuleController::CMSFillRuleController"));
       
    83 
       
    84     iMSEngine = &aMSEngine;
       
    85     }
       
    86 
       
    87 // --------------------------------------------------------------------------
       
    88 // CMSFillRuleController::~CMSFillRuleController()
       
    89 // --------------------------------------------------------------------------
       
    90 //
       
    91 CMSFillRuleController::~CMSFillRuleController()
       
    92     {
       
    93     LOG(_L("[MediaServant]\t CMSFillRuleController::~CMSFillRuleController"));
       
    94 
       
    95     iFillListArray.ResetAndDestroy();
       
    96     iFillListArray.Close();
       
    97 
       
    98     delete iRuleContainer;
       
    99     }
       
   100 
       
   101 // --------------------------------------------------------------------------
       
   102 // CMSFillRuleController::FillListArray()
       
   103 // Returns pointer to fill list array
       
   104 // --------------------------------------------------------------------------
       
   105 //
       
   106 RPointerArray<CMSFillList>* CMSFillRuleController::FillListArray()
       
   107     {
       
   108     LOG(_L("[MediaServant]\t CMSFillRuleController::FillListArray"));
       
   109 
       
   110     return &iFillListArray;
       
   111     }
       
   112 
       
   113 // ---------------------------------------------------------------------------
       
   114 // CMSFillRuleController::InitializeRuleContainersL
       
   115 // initializes rule containers
       
   116 // ---------------------------------------------------------------------------
       
   117 //
       
   118 void CMSFillRuleController::InitializeRuleContainersL()
       
   119     {
       
   120     LOG(_L("[MediaServant]\t CMSFillRuleController::\
       
   121     InitializeRuleContainersL"));
       
   122 
       
   123     TInt error( KErrNone );
       
   124     // Check if wizard has been executed
       
   125     TBool runWizard = iMSEngine->GetAppWizardState( error );
       
   126 
       
   127     if ( !runWizard  )
       
   128         {
       
   129         CreateFillRulesL();
       
   130         delete iRuleContainer;
       
   131         iRuleContainer = NULL;
       
   132         iRuleContainer = iMSEngine->FillRulesL();
       
   133         }
       
   134     else
       
   135         {
       
   136         // FILL RULES
       
   137         iRuleContainer = iMSEngine->FillRulesL();
       
   138         }
       
   139 
       
   140     // Creates pointer array to rules so we can change rule order at UI
       
   141     // Operations done trough pointer array affects original rules
       
   142     // in RuleContainer
       
   143     if ( iRuleContainer )
       
   144         {
       
   145         // Arrange rules by priority to pointer table
       
   146         TInt rulecount = iRuleContainer->FillRuleCount();
       
   147 
       
   148         for (TUint8 order = 0; order < rulecount; order++)
       
   149             {
       
   150             // search rule with desired priority
       
   151             for (TInt index = 0; index < rulecount; index++)
       
   152                 {
       
   153 
       
   154                 CCmFillRule* rule = iRuleContainer->FillRule(index);
       
   155                 TUint8 priority = rule->Priority();
       
   156 
       
   157                 if ( order == priority )
       
   158                     {
       
   159                     CMSFillList* list =
       
   160                         CMSFillList::NewL( *iMSEngine, *rule );
       
   161                     // add list to array
       
   162                     iFillListArray.AppendL( list );
       
   163 
       
   164                     // stop for loop
       
   165                     index = rulecount;
       
   166                     }
       
   167                 }
       
   168             }
       
   169         }
       
   170     }
       
   171 
       
   172 // --------------------------------------------------------------------------
       
   173 // CMSFillRuleController::CreateFillRulesL()
       
   174 // FOR TEST
       
   175 // --------------------------------------------------------------------------
       
   176 //
       
   177 void CMSFillRuleController::CreateFillRulesL()
       
   178     {
       
   179     CCmFillRuleContainer* fillRuleContainer = CCmFillRuleContainer::NewLC();
       
   180 
       
   181     // default list 1
       
   182     CCmFillRule* defaultList1 = CCmFillRule::NewLC();
       
   183 
       
   184     HBufC* temp = StringLoader::LoadLC( R_MS_DEFAULT_FILL_LIST_1 );
       
   185     HBufC8* listName = CnvUtfConverter::ConvertFromUnicodeToUtf8L( *temp );
       
   186     CleanupStack::PushL( listName );
       
   187     defaultList1->SetNameL( *listName );
       
   188     CleanupStack::PopAndDestroy( 2, temp );
       
   189 
       
   190     defaultList1->SetMediaType( ECmImage );
       
   191     defaultList1->SetMethod( ECmLatest );
       
   192     defaultList1->SetSelected( ECmUnSelected );
       
   193     defaultList1->SetPriority( 0 );
       
   194     defaultList1->SetTemplateId( EMSDefaultImageList );
       
   195     defaultList1->SetStatus( ECmToBeFilled );
       
   196     defaultList1->SetLimitType( EMbits );
       
   197     defaultList1->SetAmount( KDefaultListSize50 );
       
   198 
       
   199     fillRuleContainer->AddFillRuleL( defaultList1 );
       
   200 
       
   201     // default list 2
       
   202     CCmFillRule* defaultList2 = CCmFillRule::NewLC();
       
   203 
       
   204     temp = StringLoader::LoadLC( R_MS_DEFAULT_FILL_LIST_2 );
       
   205     listName = CnvUtfConverter::ConvertFromUnicodeToUtf8L( *temp );
       
   206     CleanupStack::PushL( listName );
       
   207     defaultList2->SetNameL( *listName );
       
   208     CleanupStack::PopAndDestroy( 2, temp );
       
   209 
       
   210     defaultList2->SetMediaType( ECmVideo );
       
   211     defaultList2->SetMethod( ECmLatest );
       
   212     defaultList2->SetSelected( ECmUnSelected );
       
   213     defaultList2->SetPriority( 1 );
       
   214     defaultList2->SetTemplateId( EMSDefaultVideoList );
       
   215     defaultList2->SetStatus( ECmToBeFilled );
       
   216     defaultList2->SetLimitType( EMbits );
       
   217     defaultList2->SetAmount( KDefaultListSize50 );
       
   218 
       
   219     fillRuleContainer->AddFillRuleL( defaultList2 );
       
   220 
       
   221     // default list 3
       
   222     CCmFillRule* defaultList3 = CCmFillRule::NewLC();
       
   223 
       
   224     temp = StringLoader::LoadLC( R_MS_DEFAULT_FILL_LIST_3 );
       
   225     listName = CnvUtfConverter::ConvertFromUnicodeToUtf8L( *temp );
       
   226     CleanupStack::PushL( listName );
       
   227     defaultList3->SetNameL( *listName );
       
   228     CleanupStack::PopAndDestroy( 2, temp );
       
   229 
       
   230     defaultList3->SetMediaType( ECmAudio );
       
   231     defaultList3->SetMethod( ECmLatest );
       
   232     defaultList3->SetSelected( ECmUnSelected );
       
   233     defaultList3->SetPriority( 2 );
       
   234     defaultList3->SetTemplateId( EMSDefaultMusicList );
       
   235     defaultList3->SetStatus( ECmToBeFilled );
       
   236     defaultList3->SetLimitType( EMbits );
       
   237     defaultList3->SetAmount( KDefaultListSize200 );
       
   238 
       
   239     fillRuleContainer->AddFillRuleL( defaultList3 );
       
   240 
       
   241     iMSEngine->SetFillRulesL( fillRuleContainer );
       
   242 
       
   243     CleanupStack::Pop( defaultList3 );
       
   244     CleanupStack::Pop( defaultList2 );
       
   245     CleanupStack::Pop( defaultList1 );
       
   246     CleanupStack::PopAndDestroy( fillRuleContainer );
       
   247     }
       
   248 
       
   249 // --------------------------------------------------------------------------
       
   250 // CMSFillRuleController::DeleteRuleL()
       
   251 // Deletes current rule
       
   252 // --------------------------------------------------------------------------
       
   253 //
       
   254 void CMSFillRuleController::DeleteRuleL( TInt aCurrentIndex )
       
   255     {
       
   256     LOG(_L("[MediaServant]\t CMSFillContainer::DeleteRuleL"));
       
   257 
       
   258     // get priority of selected rule
       
   259     TInt currentPriority =
       
   260             iFillListArray[ aCurrentIndex ]->List()->Priority();
       
   261 
       
   262     // Rulecontainer must be scanned to find the index index of
       
   263     // rule container.
       
   264     // Priority can be used to compare because there can't be two rules
       
   265     // with same priority.
       
   266     for (TInt index = 0; index < iRuleContainer->FillRuleCount(); index++)
       
   267         {
       
   268         if (currentPriority == iRuleContainer->FillRule( index )->Priority())
       
   269             {
       
   270             iFillListArray[ aCurrentIndex ]->
       
   271                     List()->SetSelected( ECmDeleted );
       
   272             }
       
   273         }
       
   274 
       
   275     // recalculate priorities
       
   276     SetPriorities();
       
   277 
       
   278     // store rules to server
       
   279     iMSEngine->SetFillRulesL( iRuleContainer );
       
   280 
       
   281     // update pointer array
       
   282     UpdateArrayL();
       
   283 
       
   284     }
       
   285 
       
   286 // --------------------------------------------------------------------------
       
   287 // CMSFillRuleController::AddRuleL()
       
   288 // Adds new rule
       
   289 // --------------------------------------------------------------------------
       
   290 //
       
   291 void CMSFillRuleController::AddRuleL( CCmFillRule* aRule )
       
   292     {
       
   293     LOG(_L("[MediaServant]\t CMSFillContainer::DeleteRuleL"));
       
   294 
       
   295     if ( aRule )
       
   296         {
       
   297         TInt priority = iFillListArray.Count();
       
   298         aRule->SetPriority( priority );
       
   299         iRuleContainer->AddFillRuleL( aRule );
       
   300 
       
   301         // store rules to server
       
   302         iMSEngine->SetFillRulesL( iRuleContainer );
       
   303 
       
   304         // update pointer array
       
   305         UpdateArrayL();
       
   306         }
       
   307     }
       
   308 
       
   309 // --------------------------------------------------------------------------
       
   310 // CMSFillRuleController::SetPriorities()
       
   311 // Sets priorities of rule array
       
   312 // --------------------------------------------------------------------------
       
   313 //
       
   314 void CMSFillRuleController::SetPriorities()
       
   315     {
       
   316     TInt priority = 0;
       
   317 
       
   318     for ( TInt index = 0; index < iFillListArray.Count(); index++ )
       
   319         {
       
   320         if ( iFillListArray[index]->List()->Selected() != ECmDeleted )
       
   321             {
       
   322             iFillListArray[index]->List()->SetPriority( priority );
       
   323             priority++; // next list priority
       
   324             }
       
   325         }
       
   326     }
       
   327 
       
   328 // --------------------------------------------------------------------------
       
   329 // CMSFillRuleController::compare()
       
   330 // For sort. Sort is based on rule priority
       
   331 // --------------------------------------------------------------------------
       
   332 //
       
   333 TInt CMSFillRuleController::compare ( const CMSFillList& rule1,
       
   334                                       const CMSFillList& rule2)
       
   335 
       
   336     {
       
   337     LOG(_L("[MediaServant]\t CMSFillRuleController::compare"));
       
   338 
       
   339     TInt result = 0;
       
   340 
       
   341     if ( rule1.Priority() < rule2.Priority() )
       
   342         {
       
   343         result = -1;
       
   344         }
       
   345     else if ( rule1.Priority() > rule2.Priority() )
       
   346         {
       
   347         result = 1;
       
   348         }
       
   349 
       
   350     return result;
       
   351     }
       
   352 
       
   353 // --------------------------------------------------------------------------
       
   354 // CMSFillRuleController::ChangePriority()
       
   355 // Change priorities of rules
       
   356 // --------------------------------------------------------------------------
       
   357 //
       
   358 void CMSFillRuleController::ChangePriority( TUint aTotalItem,
       
   359                                             TUint aCurrentItem,
       
   360                                             TInt aDirection )
       
   361     {
       
   362     LOG(_L("[MediaServant]\t CMSFillRuleController::ChangePriority"));
       
   363 
       
   364     TLinearOrder<CMSFillList> key(CMSFillRuleController::compare);
       
   365 
       
   366     // up
       
   367     if (aDirection == -1 && aCurrentItem)
       
   368         {
       
   369         // swap priotities of rules
       
   370         iFillListArray[aCurrentItem]->List()->SetPriority(aCurrentItem-1);
       
   371         iFillListArray[aCurrentItem-1]->List()->SetPriority(aCurrentItem);
       
   372 
       
   373         iFillListArray.Sort(key);
       
   374         }
       
   375     // down
       
   376     else if ( aDirection == 1 && aCurrentItem < aTotalItem - 1 )
       
   377         {
       
   378         // swap priotities of rules
       
   379         iFillListArray[aCurrentItem]->List()->SetPriority(aCurrentItem+1);
       
   380         iFillListArray[aCurrentItem+1]->List()->SetPriority(aCurrentItem);
       
   381 
       
   382         iFillListArray.Sort(key);
       
   383         }
       
   384     else
       
   385         {
       
   386         // Do nothing
       
   387         }
       
   388     }
       
   389 
       
   390 // --------------------------------------------------------------------------
       
   391 // CMSFillRuleController::UpdateArrayL()
       
   392 // Resets old fill rule array and reads new rules from server
       
   393 // --------------------------------------------------------------------------
       
   394 //
       
   395 void  CMSFillRuleController::UpdateArrayL()
       
   396     {
       
   397     LOG(_L("[MediaServant]\t CMSFillRuleController::UpdateArrayL"));
       
   398 
       
   399     // FILL RULES
       
   400     delete iRuleContainer;
       
   401     iRuleContainer = NULL;
       
   402     iRuleContainer = iMSEngine->FillRulesL();
       
   403 
       
   404     // Creates pointer array to rules so we can change rule order at UI
       
   405     // Operations done trough pointer array affects original rules
       
   406     // in RuleContainer
       
   407     if ( iRuleContainer )
       
   408         {
       
   409         iFillListArray.ResetAndDestroy();
       
   410         // Arrange rules by priority to pointer table
       
   411         TInt rulecount = iRuleContainer->FillRuleCount();
       
   412 
       
   413         for (TUint8 order = 0; order < rulecount; order++)
       
   414             {
       
   415             // search rule with desired priority
       
   416             for (TInt index = 0; index < rulecount; index++)
       
   417                 {
       
   418 
       
   419                 CCmFillRule* rule = iRuleContainer->FillRule(index);
       
   420                 TUint8 priority = rule->Priority();
       
   421 
       
   422                 if ( order == priority )
       
   423                     {
       
   424                     // stop for loop
       
   425                     index = rulecount;
       
   426                     CMSFillList* list =
       
   427                             CMSFillList::NewLC( *iMSEngine, *rule );
       
   428                     // add rule to array
       
   429                     iFillListArray.AppendL( list );
       
   430                     CleanupStack::Pop( list );
       
   431                     }
       
   432                 }
       
   433             }
       
   434         }
       
   435     }
       
   436 
       
   437 // --------------------------------------------------------------------------
       
   438 // CMSFillRuleController::SaveRulesL()
       
   439 // Sends fill rules to server
       
   440 // --------------------------------------------------------------------------
       
   441 //
       
   442 void  CMSFillRuleController::SaveRulesL()
       
   443     {
       
   444     LOG(_L("[MediaServant]\t CMSFillRuleController::SaveRulesL"));
       
   445 
       
   446     iMSEngine->SetFillRulesL( iRuleContainer );
       
   447     }
       
   448 
       
   449 
       
   450 // --------------------------------------------------------------------------
       
   451 // CMSFillRuleController::HasPriorityChangedL()
       
   452 // Checks if list priorities has been changed
       
   453 // --------------------------------------------------------------------------
       
   454 //
       
   455 TBool CMSFillRuleController::HasPriorityChangedL()
       
   456     {
       
   457     LOG(_L("[MediaServant]\t CMSFillRuleController::\
       
   458     HasPriorityChangedL"));
       
   459 
       
   460     TBool status( EFalse );
       
   461 
       
   462     CCmFillRuleContainer* fillLists = iMSEngine->FillRulesL();
       
   463     CleanupStack::PushL( fillLists );
       
   464     TInt listCount = fillLists->FillRuleCount();
       
   465     TInt arrayCount = iFillListArray.Count();
       
   466 
       
   467     if ( listCount == arrayCount )
       
   468         {
       
   469         for ( TInt index = 0; index < listCount; index++ )
       
   470             {
       
   471             CCmFillRule* origList = fillLists->FillRule(index);
       
   472             TInt origPriority = origList->Priority();
       
   473 
       
   474             // lists are in priority order in iFillListArray
       
   475             CCmFillRule* modList = iFillListArray[ origPriority ]->List();
       
   476 
       
   477             // if list names are same we have the same lists
       
   478             if ( origList->Name().Compare( modList->Name() ) )
       
   479                 {
       
   480                 status = ETrue;
       
   481                 index = listCount; // break loop
       
   482                 }
       
   483             }
       
   484         }
       
   485     else
       
   486         {
       
   487         status = ETrue;
       
   488         }
       
   489 
       
   490     CleanupStack::PopAndDestroy( fillLists );
       
   491     return status;
       
   492     }
       
   493 
       
   494 // --------------------------------------------------------------------------
       
   495 // CMSFillRuleController::HasSelectionsChanged()
       
   496 // Checks if list activity has been changed
       
   497 // --------------------------------------------------------------------------
       
   498 //
       
   499 TBool CMSFillRuleController::HasSelectionsChanged( TCmFillRuleStatus aStatus )
       
   500     {
       
   501     LOG(_L("[MediaServant]\t CMSFillRuleController::\
       
   502     HasSelectionsChanged"));
       
   503 
       
   504     TBool status( EFalse );
       
   505 
       
   506     TInt listCount = iFillListArray.Count();
       
   507 
       
   508     for ( TInt index = 0; index < listCount; index++ )
       
   509         {
       
   510         if ( iFillListArray[ index ]->OriginalSelectionStatus() !=
       
   511              iFillListArray[ index ]->List()->Selected() &&
       
   512              iFillListArray[ index ]->OriginalSelectionStatus() != aStatus )
       
   513             {
       
   514             // activity changed
       
   515             status = ETrue;
       
   516             index = listCount;
       
   517             }
       
   518 
       
   519         }
       
   520     return status;
       
   521     }
       
   522 
       
   523 // --------------------------------------------------------------------------
       
   524 // CMSFillRuleController::RestoreOriginalSelections()
       
   525 // --------------------------------------------------------------------------
       
   526 //
       
   527 void CMSFillRuleController::RestoreOriginalSelections()
       
   528     {
       
   529     LOG(_L("[MediaServant]\t CMSFillRuleController::\
       
   530     RestoreOriginalSelections"));
       
   531     TInt listCount = iFillListArray.Count();
       
   532 
       
   533     for ( TInt index = 0; index < listCount; index++ )
       
   534         {
       
   535         iFillListArray[index]->List()->SetSelected(
       
   536                 iFillListArray[index]->OriginalSelectionStatus() );
       
   537         }
       
   538     }
       
   539 
       
   540 
       
   541 
       
   542 
       
   543 
       
   544 /***************** CMSFillList class implementation **********************/
       
   545 
       
   546 
       
   547 // --------------------------------------------------------------------------
       
   548 // CMSFillList::NewL
       
   549 // --------------------------------------------------------------------------
       
   550 //
       
   551 CMSFillList* CMSFillList::NewL( CMSEngine& aMSEngine, CCmFillRule& aFillList )
       
   552     {
       
   553     LOG(_L("[MediaServant]\t CMSFillList::NewL"));
       
   554 
       
   555     CMSFillList* self = CMSFillList::NewLC( aMSEngine, aFillList );
       
   556     CleanupStack::Pop(self);
       
   557     
       
   558     return self;
       
   559     }
       
   560 
       
   561 // --------------------------------------------------------------------------
       
   562 // CMSFillList::NewLC
       
   563 // --------------------------------------------------------------------------
       
   564 //
       
   565 CMSFillList* CMSFillList::NewLC( CMSEngine& aMSEngine,
       
   566                                  CCmFillRule& aFillList )
       
   567     {
       
   568     LOG(_L("[MediaServant]\t CMSFillList::NewLC"));
       
   569 
       
   570     CMSFillList* self = new (ELeave) CMSFillList( aMSEngine, aFillList );
       
   571 
       
   572     CleanupStack::PushL(self);
       
   573     self->ConstructL();
       
   574     
       
   575     return self;
       
   576     }
       
   577     
       
   578 // --------------------------------------------------------------------------
       
   579 // CMSFillList::ConstructL
       
   580 // --------------------------------------------------------------------------
       
   581 //
       
   582 void CMSFillList::ConstructL()
       
   583     {
       
   584     LOG(_L("[MediaServant]\t CMSFillList::ConstructL"));
       
   585 
       
   586     iListSize = iFillList->ListRealSizeInBytes();
       
   587     iItemCount = iFillList->ListRealCount();
       
   588     }
       
   589 // --------------------------------------------------------------------------
       
   590 // CMSFillList::CMSFillList()
       
   591 // --------------------------------------------------------------------------
       
   592 //
       
   593 CMSFillList::CMSFillList( CMSEngine& aMSEngine, CCmFillRule& aFillList )
       
   594     {
       
   595     LOG(_L("[MediaServant]\t CMSFillRuleController::CMSFillRuleController"));
       
   596     iFillList = &aFillList;
       
   597     iMSEngine = &aMSEngine;
       
   598 
       
   599     iSelected = iFillList->Selected();
       
   600     }
       
   601 
       
   602 // --------------------------------------------------------------------------
       
   603 // CMSFillList::~CMSFillList()
       
   604 // --------------------------------------------------------------------------
       
   605 //
       
   606 CMSFillList::~CMSFillList()
       
   607     {
       
   608     LOG(_L("[MediaServant]\t CMSFillList::~CMSFillList"));
       
   609     }
       
   610 
       
   611 // --------------------------------------------------------------------------
       
   612 // CMSFillList::List()
       
   613 // --------------------------------------------------------------------------
       
   614 //
       
   615 CCmFillRule* CMSFillList::List()
       
   616     {
       
   617     LOG(_L("[MediaServant]\t CMSFillList::List"));
       
   618 
       
   619     return iFillList;
       
   620     }
       
   621 
       
   622 // --------------------------------------------------------------------------
       
   623 // CMSFillList::List()
       
   624 // --------------------------------------------------------------------------
       
   625 //
       
   626 TUint32 CMSFillList::ListSize()
       
   627     {
       
   628     LOG(_L("[MediaServant]\t CMSFillList::ListSize"));
       
   629 
       
   630     return iListSize;
       
   631     }
       
   632 
       
   633 // --------------------------------------------------------------------------
       
   634 // CMSFillList::List()
       
   635 // --------------------------------------------------------------------------
       
   636 //
       
   637 TUint32 CMSFillList::ItemCount()
       
   638     {
       
   639     LOG(_L("[MediaServant]\t CMSFillList::ItemCount"));
       
   640 
       
   641     return iItemCount;
       
   642     }
       
   643 
       
   644 // --------------------------------------------------------------------------
       
   645 // CMSFillContainer::Priority
       
   646 // Return list priority
       
   647 // --------------------------------------------------------------------------
       
   648 //
       
   649 TInt CMSFillList::Priority() const
       
   650     {
       
   651     return iFillList->Priority();
       
   652     }
       
   653 
       
   654 // --------------------------------------------------------------------------
       
   655 // CMSFillContainer::Priority
       
   656 // Return list priority
       
   657 // --------------------------------------------------------------------------
       
   658 //
       
   659 TCmFillRuleStatus CMSFillList::OriginalSelectionStatus()
       
   660     {
       
   661     return iSelected;
       
   662     }
       
   663 
       
   664 // End of File