camerauis/cameraapp/generic/src/CamBurstCaptureArray.cpp
branchRCL_3
changeset 54 bac7acad7cb3
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
       
     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     return *iFileName;
       
   137     }
       
   138 
       
   139 // ---------------------------------------------------------------------------
       
   140 // CCamBurstCaptureItem::ImageName
       
   141 // Return a pointer to the image name
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144 const TDesC& CCamBurstCaptureArray::CCamBurstCaptureItem::ImageName() const
       
   145     {
       
   146     if( !iImageName )
       
   147         {
       
   148         return KNullDesC;
       
   149         }
       
   150     return *iImageName;
       
   151     }
       
   152 
       
   153 // ---------------------------------------------------------------------------
       
   154 // CCamCaptureSetupListItem::Bitmap
       
   155 // Return a pointer to the bitmap
       
   156 // ---------------------------------------------------------------------------
       
   157 //
       
   158 const CFbsBitmap* CCamBurstCaptureArray::CCamBurstCaptureItem::Snapshot() const
       
   159     {
       
   160     return iSnapshot;
       
   161     }
       
   162 
       
   163 // ---------------------------------------------------------------------------
       
   164 // CCamBurstCaptureItem::IsDeleted
       
   165 // Whether or not the item has been marked for deletion
       
   166 // ---------------------------------------------------------------------------
       
   167 //
       
   168 TBool CCamBurstCaptureArray::CCamBurstCaptureItem::IsDeleted() const
       
   169     {
       
   170     return iIsDeleted;
       
   171     }
       
   172       
       
   173 // ---------------------------------------------------------------------------
       
   174 // CCamBurstCaptureArray::CCamBurstCaptureItem::ReplaceSnapshot
       
   175 // Replaces the bitmap.
       
   176 // ---------------------------------------------------------------------------
       
   177 // 
       
   178 TBool CCamBurstCaptureArray::CCamBurstCaptureItem::ReplaceSnapshot( 
       
   179     const CFbsBitmap* aBitmap )
       
   180     {
       
   181     if( !iSnapshot )
       
   182         {
       
   183         TRAPD( err, iSnapshot = new( ELeave ) CFbsBitmap() );
       
   184         if( err )
       
   185             {
       
   186             return EFalse;
       
   187             }
       
   188         }
       
   189     if ( iSnapshot->Duplicate( aBitmap->Handle() ) )
       
   190         {
       
   191         return EFalse;
       
   192         }
       
   193     return ETrue;
       
   194     } 
       
   195 
       
   196 // ---------------------------------------------------------------------------
       
   197 // CCamBurstCaptureItem::CCamBurstCaptureItem
       
   198 // C++ constructor
       
   199 // ---------------------------------------------------------------------------
       
   200 //
       
   201 CCamBurstCaptureArray::CCamBurstCaptureItem::CCamBurstCaptureItem()
       
   202     {
       
   203     }
       
   204 
       
   205 // ---------------------------------------------------------------------------
       
   206 // CCamBurstCaptureItem::ConstructL
       
   207 // Second phase construction
       
   208 // ---------------------------------------------------------------------------
       
   209 //
       
   210 void CCamBurstCaptureArray::CCamBurstCaptureItem::ConstructL()
       
   211     {
       
   212     }
       
   213 
       
   214 // -----------------------------------------------------------------------------
       
   215 // CCamBurstCaptureArray::NewLC
       
   216 // Two-phased constructor.
       
   217 // -----------------------------------------------------------------------------
       
   218 //
       
   219 CCamBurstCaptureArray* CCamBurstCaptureArray::NewL( CCamImageSaveActive& aImageSaveActive )
       
   220     {
       
   221     CCamBurstCaptureArray* self = new( ELeave ) CCamBurstCaptureArray( aImageSaveActive );
       
   222     CleanupStack::PushL( self );
       
   223     self->ConstructL();
       
   224     CleanupStack::Pop( self );
       
   225     return self;
       
   226     }
       
   227 
       
   228 // ---------------------------------------------------------------------------
       
   229 // CCamBurstCaptureArray destructor
       
   230 // 
       
   231 // ---------------------------------------------------------------------------
       
   232 //
       
   233 CCamBurstCaptureArray::~CCamBurstCaptureArray()
       
   234     {
       
   235     iBurstItems.ResetAndDestroy();
       
   236     iBurstItems.Close();
       
   237     }
       
   238 
       
   239 // ---------------------------------------------------------------------------
       
   240 // CCamBurstCaptureArray::SetNameL
       
   241 // Sets an item's full file path and image name
       
   242 // ---------------------------------------------------------------------------
       
   243 //
       
   244 void CCamBurstCaptureArray::SetNameL( const TDesC& aFullFileName, 
       
   245     const TDesC& aImageName, TInt aIndex )
       
   246     {
       
   247     PRINT1( _L("Camera => CCamBurstCaptureArray::SetNameL, name:[%S]"), &aFullFileName );  
       
   248     iBurstItems[aIndex]->SetNameL( aFullFileName, aImageName );
       
   249     PRINT( _L("Camera <= CCamBurstCaptureArray::SetNameL") );
       
   250     }
       
   251 
       
   252 // ---------------------------------------------------------------------------
       
   253 // CCamBurstCaptureArray::AlreadySavedFile
       
   254 // Returns whether a particular file has already been saved.
       
   255 // ---------------------------------------------------------------------------
       
   256 //
       
   257 TBool CCamBurstCaptureArray::AlreadySavedFile( const TDesC& aFilename )
       
   258     {
       
   259     return iImageSaveActive.AlreadySavedFile( aFilename );
       
   260     }
       
   261 
       
   262 // ---------------------------------------------------------------------------
       
   263 // CCamBurstCaptureArray::CurrentlySavingFile
       
   264 // Returns whether a particular file is in the process of being saved.
       
   265 // ---------------------------------------------------------------------------
       
   266 //
       
   267 TBool CCamBurstCaptureArray::CurrentlySavingFile( const TDesC& aFilename )
       
   268     {
       
   269     return iImageSaveActive.CurrentlySavingFile( aFilename );
       
   270     }
       
   271 
       
   272 // ---------------------------------------------------------------------------
       
   273 // CCamBurstCaptureArray::Count
       
   274 // Return the number of items in the array
       
   275 // ---------------------------------------------------------------------------
       
   276 //
       
   277 TInt CCamBurstCaptureArray::Count() const
       
   278     {
       
   279     return iBurstItems.Count();
       
   280     }
       
   281 
       
   282 // ---------------------------------------------------------------------------
       
   283 // CCamBurstCaptureArray::Reset
       
   284 // Delete unwanted items from the array
       
   285 // ---------------------------------------------------------------------------
       
   286 //
       
   287 void CCamBurstCaptureArray::Reset( TInt aRequiredCount )
       
   288     {
       
   289     PRINT1( _L("Camera => CCamBurstCaptureArray::Reset(%d)"), aRequiredCount );
       
   290     TInt count = iBurstItems.Count();
       
   291     // if the current count is less than the required count
       
   292     if ( aRequiredCount >= count )
       
   293         {
       
   294         return;
       
   295         }
       
   296     // if the required count is 0 or less, empty the array
       
   297     if ( aRequiredCount <= 0 )
       
   298         {
       
   299         iBurstItems.ResetAndDestroy();
       
   300         iNextSetName = 0;
       
   301         iNextGetName = 0;
       
   302         iNextSnapshot = 0;
       
   303         iImagesRemaining = 0;
       
   304         }
       
   305     // otherwise delete the unwanted items
       
   306     else
       
   307         {
       
   308         TInt index;
       
   309         // repeat for every extra item
       
   310         for ( index = count - 1; index >= aRequiredCount; index-- )
       
   311             {
       
   312             CCamBurstCaptureItem* item = iBurstItems[index];
       
   313             if ( !item->IsDeleted() )
       
   314                 {
       
   315                 iImagesRemaining--;
       
   316                 }
       
   317             iBurstItems.Remove( index );
       
   318             delete item;
       
   319             }
       
   320         // reset the accessing indexes if necessary
       
   321         count = iBurstItems.Count();
       
   322         iNextSetName = Min( iNextSetName, count );
       
   323         iNextSnapshot = Min( iNextSnapshot, count );
       
   324         }
       
   325     User::Heap().Compress();    
       
   326     PRINT( _L("Camera <= CCamBurstCaptureArray::Reset") );
       
   327     }
       
   328 
       
   329 // ---------------------------------------------------------------------------
       
   330 // CCamBurstCaptureArray::SetNextNameL
       
   331 // Set the item's full file path and image name
       
   332 // ---------------------------------------------------------------------------
       
   333 // 
       
   334 void CCamBurstCaptureArray::SetNextNameL( const TDesC& aFullFileName, const TDesC& aImageName )
       
   335     {
       
   336     PRINT1( _L("Camera => CCamBurstCaptureArray::SetNextNameL, name:[%S]"), &aFullFileName );
       
   337     CheckArraySizeL( iNextSetName );
       
   338     iBurstItems[iNextSetName]->SetNameL( aFullFileName, aImageName );
       
   339     iNextSetName++;
       
   340     PRINT( _L("Camera <= CCamBurstCaptureArray::SetNextNameL") );
       
   341     }
       
   342 
       
   343 // ---------------------------------------------------------------------------
       
   344 // CCamBurstCaptureArray::SetNextSnapshotL
       
   345 // Stores the snapshot bitmap in the item
       
   346 // ---------------------------------------------------------------------------
       
   347 //  
       
   348 void CCamBurstCaptureArray::SetNextSnapshotL( const CFbsBitmap& aSnapshot )
       
   349     {
       
   350     PRINT( _L("Camera => CCamBurstCaptureArray::SetNextSnapshotL") );
       
   351     CheckArraySizeL( iNextSnapshot );
       
   352     TInt nextIndex = iNextSnapshot;
       
   353     iNextSnapshot++;
       
   354     iBurstItems[nextIndex]->SetSnapshotL( aSnapshot );
       
   355     PRINT( _L("Camera <= CCamBurstCaptureArray::SetNextSnapshotL") );
       
   356     }
       
   357 
       
   358 // ---------------------------------------------------------------------------
       
   359 // CCamBurstCaptureArray::SetDeleted
       
   360 // Sets the items deletion state
       
   361 // ---------------------------------------------------------------------------
       
   362 //   
       
   363 TInt CCamBurstCaptureArray::SetDeleted( TInt aItemIndex, TBool aDeleted )
       
   364     {
       
   365     PRINT2( _L("Camera => CCamBurstCaptureArray::SetDeleted( index:%d, deleted:%d )"), aItemIndex, aDeleted );
       
   366     TInt ret = KErrNone;
       
   367 
       
   368     __ASSERT_DEBUG( aItemIndex < Count() && aItemIndex >= 0,
       
   369         CamPanic( ECamPanicBadIndex ) );
       
   370 
       
   371     if ( aDeleted == iBurstItems[aItemIndex]->IsDeleted() )
       
   372         {
       
   373         PRINT( _L("Camera <= CCamBurstCaptureArray::SetDeleted A") );
       
   374         return ret;
       
   375         }
       
   376    
       
   377     if ( aDeleted )
       
   378         {
       
   379         //iImagesRemaining--;
       
   380         TInt saveRequested = EFalse;
       
   381         // if the image save has already been requested
       
   382         if ( aItemIndex < iNextGetName )
       
   383             {
       
   384             saveRequested = ETrue;
       
   385             }
       
   386         iImageSaveActive.CancelThumbnail( aItemIndex );
       
   387         ret = iImageSaveActive.DeleteFile( iBurstItems[aItemIndex]->FileName(), saveRequested );
       
   388 
       
   389         PRINT1( _L("Camera <> CCamBurstCaptureArray::SetDeleted iImageSaveActive.DeleteFile() returned %d" ), ret );
       
   390         if ( ret == KErrInUse ) 
       
   391           {
       
   392           User::After( 700000 );
       
   393           ret = iImageSaveActive.DeleteFile( iBurstItems[aItemIndex]->FileName(), saveRequested );
       
   394           PRINT1( _L("Camera <> CCamBurstCaptureArray::SetDeleted iImageSaveActive.DeleteFile() Retry Delete returned %d" ), ret );
       
   395           }
       
   396         // file might have already been deleted and that's ok so ignore -NotFound errors
       
   397         if( ret == KErrNone || ret == KErrNotFound || ret == KErrPathNotFound )
       
   398             {
       
   399             iImagesRemaining--;
       
   400             }
       
   401         }
       
   402     else
       
   403         {
       
   404         iImagesRemaining++;
       
   405         }
       
   406     if( ret == KErrNone || ret == KErrNotFound || ret == KErrPathNotFound )
       
   407         {
       
   408         iBurstItems[aItemIndex]->SetDeleted( aDeleted );
       
   409         }
       
   410 
       
   411     PRINT( _L("Camera <= CCamBurstCaptureArray::SetDeleted B") );
       
   412     return ret;
       
   413     }
       
   414 
       
   415 // ---------------------------------------------------------------------------
       
   416 // CCamBurstCaptureArray::IsNextImageDeleted
       
   417 // Increments iNextGetName and returns ETrue if the next image is marked for 
       
   418 // deletion, otherwise returns EFalse 
       
   419 // ---------------------------------------------------------------------------
       
   420 // 
       
   421 TBool CCamBurstCaptureArray::IsNextImageDeleted()
       
   422   {
       
   423   PRINT( _L("Camera => CCamBurstCaptureArray::IsNextImageDeleted") );  
       
   424   TBool deleted( EFalse );
       
   425 
       
   426   if ( iNextGetName >= Count() )
       
   427     {
       
   428     PRINT2( _L("Camera <> index(%d) out of range(%d), return deleted"), iNextGetName, Count() );
       
   429     deleted = ETrue;
       
   430     }
       
   431   else if ( iBurstItems[iNextGetName]->IsDeleted() )
       
   432     {
       
   433     PRINT( _L("Camera <> next item marked deleted") );
       
   434     iNextGetName++;
       
   435     deleted = ETrue;
       
   436     }
       
   437   else
       
   438     {
       
   439     deleted = EFalse;
       
   440     }
       
   441 
       
   442   PRINT1( _L("Camera <= CCamBurstCaptureArray::IsNextImageDeleted, return: %d"), deleted );  
       
   443   return deleted;
       
   444     }
       
   445 
       
   446 // ---------------------------------------------------------------------------
       
   447 // CCamBurstCaptureArray::NextFileName
       
   448 // Returns a pointer to the full file path and name for the next image
       
   449 // ---------------------------------------------------------------------------
       
   450 //    
       
   451 const TDesC& CCamBurstCaptureArray::NextFileName()
       
   452     {
       
   453     PRINT( _L("Camera => CCamBurstCaptureArray::NextFileName") );  
       
   454     if ( iNextGetName >= Count() )
       
   455         {
       
   456         PRINT( _L("Camera <> Returning KNullDesC") );  
       
   457         return KNullDesC;
       
   458         }
       
   459 
       
   460     TInt itemIndex = iNextGetName;
       
   461     iNextGetName++;
       
   462 
       
   463     PRINT( _L("Camera <= CCamBurstCaptureArray::NextFileName") );  
       
   464     return iBurstItems[itemIndex]->FileName();
       
   465     }
       
   466 
       
   467 // ---------------------------------------------------------------------------
       
   468 // CCamBurstCaptureArray::NextFileIndex
       
   469 // Returns the index of the next image
       
   470 // ---------------------------------------------------------------------------
       
   471 // 
       
   472 TInt CCamBurstCaptureArray::NextFileIndex() const
       
   473     {
       
   474     return iNextGetName;
       
   475     }
       
   476 
       
   477 
       
   478 // ---------------------------------------------------------------------------
       
   479 // CCamBurstCaptureArray::FileName
       
   480 // Returns a pointer to the full file path and name
       
   481 // ---------------------------------------------------------------------------
       
   482 //   
       
   483 const TDesC& CCamBurstCaptureArray::FileName( TInt aItemIndex ) const
       
   484     {
       
   485     if ( aItemIndex >= Count() || aItemIndex < 0 )
       
   486         {
       
   487         return KNullDesC;
       
   488         }
       
   489     return iBurstItems[aItemIndex]->FileName();
       
   490     }
       
   491 
       
   492 // ---------------------------------------------------------------------------
       
   493 // CCamBurstCaptureArray::ImageName
       
   494 // Returns a pointer to the image name 
       
   495 // ---------------------------------------------------------------------------
       
   496 //  
       
   497 const TDesC& CCamBurstCaptureArray::ImageName( TInt aItemIndex ) const
       
   498     {
       
   499     if ( aItemIndex >= Count() || aItemIndex < 0 )
       
   500         {
       
   501         return KNullDesC;
       
   502         }
       
   503     return iBurstItems[aItemIndex]->ImageName();
       
   504     }
       
   505 
       
   506 // ---------------------------------------------------------------------------
       
   507 // CCamBurstCaptureArray::Snapshot
       
   508 // Returns a pointer to the snapshot image
       
   509 // ---------------------------------------------------------------------------
       
   510 // 
       
   511 const CFbsBitmap* CCamBurstCaptureArray::Snapshot( TInt aItemIndex ) const
       
   512     {
       
   513     if ( aItemIndex >= Count() || aItemIndex < 0 )
       
   514         {
       
   515         return NULL;
       
   516         }
       
   517     return iBurstItems[aItemIndex]->Snapshot();
       
   518     }
       
   519 
       
   520 // ---------------------------------------------------------------------------
       
   521 // CCamBurstCaptureArray::IsDeleted
       
   522 // Returns the item's deletion state
       
   523 // ---------------------------------------------------------------------------
       
   524 // 
       
   525 TBool CCamBurstCaptureArray::IsDeleted( TInt aItemIndex ) const
       
   526     {
       
   527     if ( aItemIndex >= Count() )
       
   528         {
       
   529         return ETrue;
       
   530         }
       
   531     return iBurstItems[aItemIndex]->IsDeleted();
       
   532     }
       
   533   
       
   534 // ---------------------------------------------------------------------------
       
   535 // CCamBurstCaptureArray::ReplaceSnapshot
       
   536 // Replaces the bitmap in the given index.
       
   537 // ---------------------------------------------------------------------------
       
   538 // 
       
   539 TBool CCamBurstCaptureArray::ReplaceSnapshot( 
       
   540     const CFbsBitmap* aBitmap, 
       
   541     TInt aItemIndex )
       
   542     {
       
   543     if ( ( iBurstItems.Count() > aItemIndex ) &&
       
   544         ( aItemIndex >= 0 ) )
       
   545         {
       
   546         return iBurstItems[aItemIndex]->ReplaceSnapshot( aBitmap );
       
   547         }
       
   548     return EFalse;
       
   549     } 
       
   550 
       
   551 // ---------------------------------------------------------------------------
       
   552 // CCamBurstCaptureArray::CCamBurstCaptureArray
       
   553 // C++ constructor
       
   554 // ---------------------------------------------------------------------------
       
   555 //   
       
   556 CCamBurstCaptureArray::CCamBurstCaptureArray( CCamImageSaveActive& aImageSaveActive )
       
   557 : iImageSaveActive( aImageSaveActive )
       
   558     {
       
   559     }
       
   560 
       
   561 // ---------------------------------------------------------------------------
       
   562 // CCamBurstCaptureArray::ConstructL
       
   563 // Second phase construction
       
   564 // ---------------------------------------------------------------------------
       
   565 //
       
   566 void CCamBurstCaptureArray::ConstructL()
       
   567     {
       
   568     }
       
   569 
       
   570 // ---------------------------------------------------------------------------
       
   571 // CCamBurstCaptureArray::CheckArraySizeL
       
   572 // Add extra items to the array if required
       
   573 // ---------------------------------------------------------------------------
       
   574 //
       
   575 void CCamBurstCaptureArray::CheckArraySizeL( TInt aRequiredIndex )
       
   576     {
       
   577     TInt count = Count();
       
   578     TInt i;
       
   579     for ( i = count; i <= aRequiredIndex; i++ )
       
   580         {
       
   581         CCamBurstCaptureItem* newItem = CCamBurstCaptureItem::NewLC();
       
   582         iBurstItems.AppendL( newItem );
       
   583         CleanupStack::Pop( newItem );
       
   584         iImagesRemaining++;
       
   585         }
       
   586     }
       
   587 
       
   588 //  End of File