camerauis/cameraapp/generic/src/CamBurstCaptureArray.cpp
changeset 19 d9aefe59d544
parent 3 8b2d6d0384b0
child 21 fa6d9f75d6a6
child 28 3075d9b614e6
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
     1 /*
       
     2 * Copyright (c) 2007-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:  A class that represents a single item in a burst capture
       
    15 *
       
    16 * Copyright © 2007-2008 Nokia.  All rights reserved.
       
    17 *  This material, including documentation and any related computer
       
    18 *  programs, is protected by copyright controlled by Nokia.  All
       
    19 *  rights are reserved.  Copying, including reproducing, storing,
       
    20 *  adapting or translating, any or all of this material requires the
       
    21 *  prior written consent of Nokia.  This material also contains
       
    22 *  confidential information which may not be disclosed to others
       
    23 *  without the prior written consent of Nokia.
       
    24 
       
    25 *
       
    26 *
       
    27 */
       
    28 
       
    29 
       
    30 // INCLUDE FILES
       
    31 #include <fbs.h>
       
    32 #include <eikenv.h>
       
    33 #include <barsread.h>
       
    34 #include <AknUtils.h>
       
    35 
       
    36 #include <cameraapp.rsg>
       
    37 #include <vgacamsettings.rsg>
       
    38 
       
    39 #include "CamBurstCaptureArray.h"
       
    40 #include "CamImageSaveActive.h"
       
    41 #include "CamPanic.h"
       
    42 #include "camlogging.h"
       
    43 
       
    44 
       
    45 // CONSTANTS
       
    46 
       
    47 // ================= MEMBER FUNCTIONS =======================
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // CCamBurstCaptureItem::NewLC
       
    51 // Two-phased constructor.
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 CCamBurstCaptureArray::CCamBurstCaptureItem* CCamBurstCaptureArray::CCamBurstCaptureItem::NewLC()
       
    55     {
       
    56     CCamBurstCaptureItem* self = new( ELeave ) CCamBurstCaptureItem();
       
    57     CleanupStack::PushL( self );
       
    58     self->ConstructL();
       
    59     return self;
       
    60     }
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63 // CCamBurstCaptureItem destructor
       
    64 // 
       
    65 // ---------------------------------------------------------------------------
       
    66 //
       
    67 CCamBurstCaptureArray::CCamBurstCaptureItem::~CCamBurstCaptureItem()
       
    68   {
       
    69   PRINT( _L("Camera => ~CCamBurstCaptureItem") );
       
    70   delete iFileName;
       
    71   delete iImageName;
       
    72   delete iSnapshot;
       
    73   PRINT( _L("Camera <= ~CCamBurstCaptureItem") );
       
    74   }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CCamBurstCaptureItem::SetNameL
       
    78 // Sets the item's full file path and image name
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 void CCamBurstCaptureArray::CCamBurstCaptureItem::SetNameL( const TDesC& aFullFileName, 
       
    82                                     const TDesC& aImageName )
       
    83     {
       
    84     delete iFileName;
       
    85     iFileName = NULL;
       
    86     delete iImageName;
       
    87     iImageName = NULL;
       
    88     iFileName = aFullFileName.AllocL();
       
    89     iImageName = aImageName.AllocL();
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 // CCamBurstCaptureItem::SetSnapshotL
       
    94 // Stores the snapshot bitmap in the item
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 void CCamBurstCaptureArray::CCamBurstCaptureItem::SetSnapshotL( const CFbsBitmap& aSnapshot ) 
       
    98     {
       
    99     delete iSnapshot;
       
   100     iSnapshot = NULL;
       
   101 
       
   102     // Create bitmap
       
   103     iSnapshot = new( ELeave ) CFbsBitmap();
       
   104     TInt createError = iSnapshot->Duplicate( aSnapshot.Handle() );
       
   105 
       
   106     if ( createError )
       
   107         {
       
   108         delete iSnapshot;
       
   109         iSnapshot = NULL;
       
   110         }
       
   111 
       
   112     User::LeaveIfError( createError );
       
   113     }
       
   114 
       
   115 // ---------------------------------------------------------------------------
       
   116 // CCamBurstCaptureItem::SetDeleted
       
   117 // Sets the item's deletion state
       
   118 // ---------------------------------------------------------------------------
       
   119 //
       
   120 void CCamBurstCaptureArray::CCamBurstCaptureItem::SetDeleted( TBool aDeleted ) 
       
   121     {
       
   122     iIsDeleted = aDeleted;
       
   123     }
       
   124 
       
   125 // ---------------------------------------------------------------------------
       
   126 // CCamBurstCaptureItem::FileName
       
   127 // Return a pointer to the full file path and name
       
   128 // ---------------------------------------------------------------------------
       
   129 //
       
   130 const TDesC& CCamBurstCaptureArray::CCamBurstCaptureItem::FileName() const
       
   131     {
       
   132     if( !iFileName )
       
   133       {
       
   134       return KNullDesC;
       
   135       }
       
   136     else
       
   137       {  
       
   138       return *iFileName;
       
   139       }
       
   140     }
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // CCamBurstCaptureItem::ImageName
       
   144 // Return a pointer to the image name
       
   145 // ---------------------------------------------------------------------------
       
   146 //
       
   147 const TDesC& CCamBurstCaptureArray::CCamBurstCaptureItem::ImageName() const
       
   148     {
       
   149     return *iImageName;
       
   150     }
       
   151 
       
   152 // ---------------------------------------------------------------------------
       
   153 // CCamCaptureSetupListItem::Bitmap
       
   154 // Return a pointer to the bitmap
       
   155 // ---------------------------------------------------------------------------
       
   156 //
       
   157 const CFbsBitmap* CCamBurstCaptureArray::CCamBurstCaptureItem::Snapshot() const
       
   158     {
       
   159     return iSnapshot;
       
   160     }
       
   161 
       
   162 // ---------------------------------------------------------------------------
       
   163 // CCamBurstCaptureItem::IsDeleted
       
   164 // Whether or not the item has been marked for deletion
       
   165 // ---------------------------------------------------------------------------
       
   166 //
       
   167 TBool CCamBurstCaptureArray::CCamBurstCaptureItem::IsDeleted() const
       
   168     {
       
   169     return iIsDeleted;
       
   170     }
       
   171       
       
   172 // ---------------------------------------------------------------------------
       
   173 // CCamBurstCaptureArray::CCamBurstCaptureItem::ReplaceSnapshot
       
   174 // Replaces the bitmap.
       
   175 // ---------------------------------------------------------------------------
       
   176 // 
       
   177 TBool CCamBurstCaptureArray::CCamBurstCaptureItem::ReplaceSnapshot( 
       
   178     const CFbsBitmap* aBitmap )
       
   179     {
       
   180     if( !iSnapshot )
       
   181         {
       
   182         TRAPD( err, iSnapshot = new( ELeave ) CFbsBitmap() );
       
   183         if( err )
       
   184             {
       
   185             return EFalse;
       
   186             }
       
   187         }
       
   188     if ( iSnapshot->Duplicate( aBitmap->Handle() ) )
       
   189         {
       
   190         return EFalse;
       
   191         }
       
   192     return ETrue;
       
   193     } 
       
   194 
       
   195 // ---------------------------------------------------------------------------
       
   196 // CCamBurstCaptureItem::CCamBurstCaptureItem
       
   197 // C++ constructor
       
   198 // ---------------------------------------------------------------------------
       
   199 //
       
   200 CCamBurstCaptureArray::CCamBurstCaptureItem::CCamBurstCaptureItem()
       
   201     {
       
   202     }
       
   203 
       
   204 // ---------------------------------------------------------------------------
       
   205 // CCamBurstCaptureItem::ConstructL
       
   206 // Second phase construction
       
   207 // ---------------------------------------------------------------------------
       
   208 //
       
   209 void CCamBurstCaptureArray::CCamBurstCaptureItem::ConstructL()
       
   210     {
       
   211     }
       
   212 
       
   213 // -----------------------------------------------------------------------------
       
   214 // CCamBurstCaptureArray::NewLC
       
   215 // Two-phased constructor.
       
   216 // -----------------------------------------------------------------------------
       
   217 //
       
   218 CCamBurstCaptureArray* CCamBurstCaptureArray::NewL( CCamImageSaveActive& aImageSaveActive )
       
   219     {
       
   220     CCamBurstCaptureArray* self = new( ELeave ) CCamBurstCaptureArray( aImageSaveActive );
       
   221     CleanupStack::PushL( self );
       
   222     self->ConstructL();
       
   223     CleanupStack::Pop( self );
       
   224     return self;
       
   225     }
       
   226 
       
   227 // ---------------------------------------------------------------------------
       
   228 // CCamBurstCaptureArray destructor
       
   229 // 
       
   230 // ---------------------------------------------------------------------------
       
   231 //
       
   232 CCamBurstCaptureArray::~CCamBurstCaptureArray()
       
   233     {
       
   234     iBurstItems.ResetAndDestroy();
       
   235     iBurstItems.Close();
       
   236     }
       
   237 
       
   238 // ---------------------------------------------------------------------------
       
   239 // CCamBurstCaptureArray::SetNameL
       
   240 // Sets an item's full file path and image name
       
   241 // ---------------------------------------------------------------------------
       
   242 //
       
   243 void CCamBurstCaptureArray::SetNameL( const TDesC& aFullFileName, 
       
   244     const TDesC& aImageName, TInt aIndex )
       
   245     {
       
   246     PRINT1( _L("Camera => CCamBurstCaptureArray::SetNameL, name:[%S]"), &aFullFileName );  
       
   247     iBurstItems[aIndex]->SetNameL( aFullFileName, aImageName );
       
   248     PRINT( _L("Camera <= CCamBurstCaptureArray::SetNameL") );
       
   249     }
       
   250 
       
   251 // ---------------------------------------------------------------------------
       
   252 // CCamBurstCaptureArray::AlreadySavedFile
       
   253 // Returns whether a particular file has already been saved.
       
   254 // ---------------------------------------------------------------------------
       
   255 //
       
   256 TBool CCamBurstCaptureArray::AlreadySavedFile( const TDesC& aFilename )
       
   257     {
       
   258     return iImageSaveActive.AlreadySavedFile( aFilename );
       
   259     }
       
   260 
       
   261 // ---------------------------------------------------------------------------
       
   262 // CCamBurstCaptureArray::CurrentlySavingFile
       
   263 // Returns whether a particular file is in the process of being saved.
       
   264 // ---------------------------------------------------------------------------
       
   265 //
       
   266 TBool CCamBurstCaptureArray::CurrentlySavingFile( const TDesC& aFilename )
       
   267     {
       
   268     return iImageSaveActive.CurrentlySavingFile( aFilename );
       
   269     }
       
   270 
       
   271 // ---------------------------------------------------------------------------
       
   272 // CCamBurstCaptureArray::Count
       
   273 // Return the number of items in the array
       
   274 // ---------------------------------------------------------------------------
       
   275 //
       
   276 TInt CCamBurstCaptureArray::Count() const
       
   277     {
       
   278     return iBurstItems.Count();
       
   279     }
       
   280 
       
   281 // ---------------------------------------------------------------------------
       
   282 // CCamBurstCaptureArray::Reset
       
   283 // Delete unwanted items from the array
       
   284 // ---------------------------------------------------------------------------
       
   285 //
       
   286 void CCamBurstCaptureArray::Reset( TInt aRequiredCount )
       
   287     {
       
   288     PRINT1( _L("Camera => CCamBurstCaptureArray::Reset(%d)"), aRequiredCount );
       
   289     TInt count = iBurstItems.Count();
       
   290     // if the current count is less than the required count
       
   291     if ( aRequiredCount >= count )
       
   292         {
       
   293         return;
       
   294         }
       
   295     // if the required count is 0 or less, empty the array
       
   296     if ( aRequiredCount <= 0 )
       
   297         {
       
   298         iBurstItems.ResetAndDestroy();
       
   299         iNextSetName = 0;
       
   300         iNextGetName = 0;
       
   301         iNextSnapshot = 0;
       
   302         iImagesRemaining = 0;
       
   303         }
       
   304     // otherwise delete the unwanted items
       
   305     else
       
   306         {
       
   307         TInt index;
       
   308         // repeat for every extra item
       
   309         for ( index = count - 1; index >= aRequiredCount; index-- )
       
   310             {
       
   311             CCamBurstCaptureItem* item = iBurstItems[index];
       
   312             if ( !item->IsDeleted() )
       
   313                 {
       
   314                 iImagesRemaining--;
       
   315                 }
       
   316             iBurstItems.Remove( index );
       
   317             delete item;
       
   318             }
       
   319         // reset the accessing indexes if necessary
       
   320         count = iBurstItems.Count();
       
   321         iNextSetName = Min( iNextSetName, count );
       
   322         iNextSnapshot = Min( iNextSnapshot, count );
       
   323         }
       
   324     User::Heap().Compress();    
       
   325     PRINT( _L("Camera <= CCamBurstCaptureArray::Reset") );
       
   326     }
       
   327 
       
   328 // ---------------------------------------------------------------------------
       
   329 // CCamBurstCaptureArray::SetNextNameL
       
   330 // Set the item's full file path and image name
       
   331 // ---------------------------------------------------------------------------
       
   332 // 
       
   333 void CCamBurstCaptureArray::SetNextNameL( const TDesC& aFullFileName, const TDesC& aImageName )
       
   334     {
       
   335     PRINT1( _L("Camera => CCamBurstCaptureArray::SetNextNameL, name:[%S]"), &aFullFileName );
       
   336     CheckArraySizeL( iNextSetName );
       
   337     iBurstItems[iNextSetName]->SetNameL( aFullFileName, aImageName );
       
   338     iNextSetName++;
       
   339     PRINT( _L("Camera <= CCamBurstCaptureArray::SetNextNameL") );
       
   340     }
       
   341 
       
   342 // ---------------------------------------------------------------------------
       
   343 // CCamBurstCaptureArray::SetNextSnapshotL
       
   344 // Stores the snapshot bitmap in the item
       
   345 // ---------------------------------------------------------------------------
       
   346 //  
       
   347 void CCamBurstCaptureArray::SetNextSnapshotL( const CFbsBitmap& aSnapshot )
       
   348     {
       
   349     PRINT( _L("Camera => CCamBurstCaptureArray::SetNextSnapshotL") );
       
   350     CheckArraySizeL( iNextSnapshot );
       
   351     TInt nextIndex = iNextSnapshot;
       
   352     iNextSnapshot++;
       
   353     iBurstItems[nextIndex]->SetSnapshotL( aSnapshot );
       
   354     PRINT( _L("Camera <= CCamBurstCaptureArray::SetNextSnapshotL") );
       
   355     }
       
   356 
       
   357 // ---------------------------------------------------------------------------
       
   358 // CCamBurstCaptureArray::SetDeleted
       
   359 // Sets the items deletion state
       
   360 // ---------------------------------------------------------------------------
       
   361 //   
       
   362 TInt CCamBurstCaptureArray::SetDeleted( TInt aItemIndex, TBool aDeleted )
       
   363     {
       
   364     PRINT2( _L("Camera => CCamBurstCaptureArray::SetDeleted( index:%d, deleted:%d )"), aItemIndex, aDeleted );
       
   365     TInt ret = KErrNone;
       
   366 
       
   367     __ASSERT_DEBUG( aItemIndex < Count() && aItemIndex >= 0,
       
   368         CamPanic( ECamPanicBadIndex ) );
       
   369 
       
   370     if ( aDeleted == iBurstItems[aItemIndex]->IsDeleted() )
       
   371         {
       
   372         PRINT( _L("Camera <= CCamBurstCaptureArray::SetDeleted A") );
       
   373         return ret;
       
   374         }
       
   375    
       
   376     if ( aDeleted )
       
   377         {
       
   378         //iImagesRemaining--;
       
   379         TInt saveRequested = EFalse;
       
   380         // if the image save has already been requested
       
   381         if ( aItemIndex < iNextGetName )
       
   382             {
       
   383             saveRequested = ETrue;
       
   384             }
       
   385         iImageSaveActive.CancelThumbnail( aItemIndex );
       
   386         ret = iImageSaveActive.DeleteFile( iBurstItems[aItemIndex]->FileName(), saveRequested );
       
   387 
       
   388         PRINT1( _L("Camera <> CCamBurstCaptureArray::SetDeleted iImageSaveActive.DeleteFile() returned %d" ), ret );
       
   389         // file might have already been deleted and that's ok so ignore -NotFound errors
       
   390         if( ret == KErrNone || ret == KErrNotFound || ret == KErrPathNotFound )
       
   391             {
       
   392             iImagesRemaining--;
       
   393             }
       
   394         }
       
   395     else
       
   396         {
       
   397         iImagesRemaining++;
       
   398         }
       
   399     if( ret == KErrNone || ret == KErrNotFound || ret == KErrPathNotFound )
       
   400         {
       
   401         iBurstItems[aItemIndex]->SetDeleted( aDeleted );
       
   402         }
       
   403 
       
   404     PRINT( _L("Camera <= CCamBurstCaptureArray::SetDeleted B") );
       
   405     return ret;
       
   406     }
       
   407 
       
   408 // ---------------------------------------------------------------------------
       
   409 // CCamBurstCaptureArray::IsNextImageDeleted
       
   410 // Increments iNextGetName and returns ETrue if the next image is marked for 
       
   411 // deletion, otherwise returns EFalse 
       
   412 // ---------------------------------------------------------------------------
       
   413 // 
       
   414 TBool CCamBurstCaptureArray::IsNextImageDeleted()
       
   415   {
       
   416   PRINT( _L("Camera => CCamBurstCaptureArray::IsNextImageDeleted") );  
       
   417   TBool deleted( EFalse );
       
   418 
       
   419   if ( iNextGetName >= Count() )
       
   420     {
       
   421     PRINT2( _L("Camera <> index(%d) out of range(%d), return deleted"), iNextGetName, Count() );
       
   422     deleted = ETrue;
       
   423     }
       
   424   else if ( iBurstItems[iNextGetName]->IsDeleted() )
       
   425     {
       
   426     PRINT( _L("Camera <> next item marked deleted") );
       
   427     iNextGetName++;
       
   428     deleted = ETrue;
       
   429     }
       
   430   else
       
   431     {
       
   432     deleted = EFalse;
       
   433     }
       
   434 
       
   435   PRINT1( _L("Camera <= CCamBurstCaptureArray::IsNextImageDeleted, return: %d"), deleted );  
       
   436   return deleted;
       
   437     }
       
   438 
       
   439 // ---------------------------------------------------------------------------
       
   440 // CCamBurstCaptureArray::NextFileName
       
   441 // Returns a pointer to the full file path and name for the next image
       
   442 // ---------------------------------------------------------------------------
       
   443 //    
       
   444 const TDesC& CCamBurstCaptureArray::NextFileName()
       
   445     {
       
   446     PRINT( _L("Camera => CCamBurstCaptureArray::NextFileName") );  
       
   447     if ( iNextGetName >= Count() )
       
   448         {
       
   449         PRINT( _L("Camera <> Returning KNullDesC") );  
       
   450         return KNullDesC;
       
   451         }
       
   452 
       
   453     TInt itemIndex = iNextGetName;
       
   454     iNextGetName++;
       
   455 
       
   456     PRINT( _L("Camera <= CCamBurstCaptureArray::NextFileName") );  
       
   457     return iBurstItems[itemIndex]->FileName();
       
   458     }
       
   459 
       
   460 // ---------------------------------------------------------------------------
       
   461 // CCamBurstCaptureArray::NextFileIndex
       
   462 // Returns the index of the next image
       
   463 // ---------------------------------------------------------------------------
       
   464 // 
       
   465 TInt CCamBurstCaptureArray::NextFileIndex() const
       
   466     {
       
   467     return iNextGetName;
       
   468     }
       
   469 
       
   470 
       
   471 // ---------------------------------------------------------------------------
       
   472 // CCamBurstCaptureArray::FileName
       
   473 // Returns a pointer to the full file path and name
       
   474 // ---------------------------------------------------------------------------
       
   475 //   
       
   476 const TDesC& CCamBurstCaptureArray::FileName( TInt aItemIndex ) const
       
   477     {
       
   478     if ( aItemIndex >= Count() || aItemIndex < 0 )
       
   479         {
       
   480         return KNullDesC;
       
   481         }
       
   482     return iBurstItems[aItemIndex]->FileName();
       
   483     }
       
   484 
       
   485 // ---------------------------------------------------------------------------
       
   486 // CCamBurstCaptureArray::ImageName
       
   487 // Returns a pointer to the image name 
       
   488 // ---------------------------------------------------------------------------
       
   489 //  
       
   490 const TDesC& CCamBurstCaptureArray::ImageName( TInt aItemIndex ) const
       
   491     {
       
   492     if ( aItemIndex >= Count() || aItemIndex < 0 )
       
   493         {
       
   494         return KNullDesC;
       
   495         }
       
   496     return iBurstItems[aItemIndex]->ImageName();
       
   497     }
       
   498 
       
   499 // ---------------------------------------------------------------------------
       
   500 // CCamBurstCaptureArray::Snapshot
       
   501 // Returns a pointer to the snapshot image
       
   502 // ---------------------------------------------------------------------------
       
   503 // 
       
   504 const CFbsBitmap* CCamBurstCaptureArray::Snapshot( TInt aItemIndex ) const
       
   505     {
       
   506     if ( aItemIndex >= Count() || aItemIndex < 0 )
       
   507         {
       
   508         return NULL;
       
   509         }
       
   510     return iBurstItems[aItemIndex]->Snapshot();
       
   511     }
       
   512 
       
   513 // ---------------------------------------------------------------------------
       
   514 // CCamBurstCaptureArray::IsDeleted
       
   515 // Returns the item's deletion state
       
   516 // ---------------------------------------------------------------------------
       
   517 // 
       
   518 TBool CCamBurstCaptureArray::IsDeleted( TInt aItemIndex ) const
       
   519     {
       
   520     if ( aItemIndex >= Count() )
       
   521         {
       
   522         return ETrue;
       
   523         }
       
   524     return iBurstItems[aItemIndex]->IsDeleted();
       
   525     }
       
   526   
       
   527 // ---------------------------------------------------------------------------
       
   528 // CCamBurstCaptureArray::ReplaceSnapshot
       
   529 // Replaces the bitmap in the given index.
       
   530 // ---------------------------------------------------------------------------
       
   531 // 
       
   532 TBool CCamBurstCaptureArray::ReplaceSnapshot( 
       
   533     const CFbsBitmap* aBitmap, 
       
   534     TInt aItemIndex )
       
   535     {
       
   536     if ( ( iBurstItems.Count() > aItemIndex ) &&
       
   537         ( aItemIndex >= 0 ) )
       
   538         {
       
   539         return iBurstItems[aItemIndex]->ReplaceSnapshot( aBitmap );
       
   540         }
       
   541     return EFalse;
       
   542     } 
       
   543 
       
   544 // ---------------------------------------------------------------------------
       
   545 // CCamBurstCaptureArray::CCamBurstCaptureArray
       
   546 // C++ constructor
       
   547 // ---------------------------------------------------------------------------
       
   548 //   
       
   549 CCamBurstCaptureArray::CCamBurstCaptureArray( CCamImageSaveActive& aImageSaveActive )
       
   550 : iImageSaveActive( aImageSaveActive )
       
   551     {
       
   552     }
       
   553 
       
   554 // ---------------------------------------------------------------------------
       
   555 // CCamBurstCaptureArray::ConstructL
       
   556 // Second phase construction
       
   557 // ---------------------------------------------------------------------------
       
   558 //
       
   559 void CCamBurstCaptureArray::ConstructL()
       
   560     {
       
   561     }
       
   562 
       
   563 // ---------------------------------------------------------------------------
       
   564 // CCamBurstCaptureArray::CheckArraySizeL
       
   565 // Add extra items to the array if required
       
   566 // ---------------------------------------------------------------------------
       
   567 //
       
   568 void CCamBurstCaptureArray::CheckArraySizeL( TInt aRequiredIndex )
       
   569     {
       
   570     TInt count = Count();
       
   571     TInt i;
       
   572     for ( i = count; i <= aRequiredIndex; i++ )
       
   573         {
       
   574         CCamBurstCaptureItem* newItem = CCamBurstCaptureItem::NewLC();
       
   575         iBurstItems.AppendL( newItem );
       
   576         CleanupStack::Pop( newItem );
       
   577         iImagesRemaining++;
       
   578         }
       
   579     }
       
   580 
       
   581 //  End of File