camerauis/cameraapp/generic/inc/cameracontroller/camsnapshotprovider.inl
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Inline implementations of CCamSnapshotProvider class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "camsnapshot.h"
       
    20 
       
    21 // ===========================================================================
       
    22 // Methods
       
    23 
       
    24 // ===========================================================================
       
    25 // From MCameraSnapshot
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 TUint32
       
    32 CCamSnapshotProvider::SupportedFormats()
       
    33   {
       
    34   return ( iSs1
       
    35          ? iSs1->SupportedFormats()
       
    36          : iSs2->SupportedFormats() );
       
    37   }
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 //
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 void
       
    44 CCamSnapshotProvider::PrepareSnapshotL(       CCamera::TFormat aFormat, 
       
    45                                         const TPoint&          aPosition, 
       
    46                                         const TSize&           aSize, 
       
    47                                         const TRgb&            aBgColor, 
       
    48                                               TBool            aMaintainAspectRatio )
       
    49   {
       
    50   ( iSs1 ? iSs1->PrepareSnapshotL( aFormat, aPosition, aSize, aBgColor, aMaintainAspectRatio )
       
    51          : iSs2->PrepareSnapshotL( aFormat, aPosition, aSize, aBgColor, aMaintainAspectRatio ) );
       
    52   }
       
    53                                         
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 //
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 void
       
    60 CCamSnapshotProvider::PrepareSnapshotL(       CCamera::TFormat aFormat, 
       
    61                                         const TSize&           aSize, 
       
    62                                               TBool            aMaintainAspectRatio )
       
    63   {
       
    64   ( iSs1 ? iSs1->PrepareSnapshotL( aFormat, aSize, aMaintainAspectRatio )
       
    65          : iSs2->PrepareSnapshotL( aFormat, aSize, aMaintainAspectRatio ) );
       
    66   }
       
    67 
       
    68 
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 // ---------------------------------------------------------------------------
       
    72 //
       
    73 void
       
    74 CCamSnapshotProvider::SetBgColorL( const TRgb& aBgColor )
       
    75   {
       
    76   ( iSs1 ? iSs1->SetBgColorL( aBgColor )
       
    77          : iSs2->SetBgColorL( aBgColor ) );
       
    78   }
       
    79 
       
    80 // ---------------------------------------------------------------------------
       
    81 //
       
    82 // ---------------------------------------------------------------------------
       
    83 //
       
    84 void
       
    85 CCamSnapshotProvider::SetPositionL( const TPoint& aPosition )
       
    86   {
       
    87   ( iSs1 ? iSs1->SetPositionL( aPosition )
       
    88          : iSs2->SetPositionL( aPosition ) );
       
    89   }
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 //
       
    93 // ---------------------------------------------------------------------------
       
    94 //
       
    95 TBool
       
    96 CCamSnapshotProvider::IsSnapshotActive() const
       
    97   {
       
    98   return ( iSs1
       
    99          ? iSs1->IsSnapshotActive()
       
   100          : iSs2->IsSnapshotActive() );  
       
   101   }
       
   102 
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 // ---------------------------------------------------------------------------
       
   106 //
       
   107 void
       
   108 CCamSnapshotProvider::StartSnapshot()
       
   109   {
       
   110   ( iSs1 ? iSs1->StartSnapshot()
       
   111          : iSs2->StartSnapshot() );
       
   112   }
       
   113 
       
   114 
       
   115 // ---------------------------------------------------------------------------
       
   116 //
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 void
       
   120 CCamSnapshotProvider::StopSnapshot()
       
   121   {
       
   122   ( iSs1 ? iSs1->StopSnapshot()
       
   123          : iSs2->StopSnapshot() );
       
   124   }
       
   125 
       
   126 
       
   127 // ---------------------------------------------------------------------------
       
   128 //
       
   129 // ---------------------------------------------------------------------------
       
   130 //
       
   131 MCameraBuffer& 
       
   132 CCamSnapshotProvider::SnapshotDataL( RArray<TInt>& aFrameIndexOrder )
       
   133   {
       
   134   return ( iSs1
       
   135          ? iSs1->SnapshotDataL( aFrameIndexOrder )
       
   136          : iSs2->SnapshotDataL( aFrameIndexOrder ) );  
       
   137   }
       
   138 
       
   139 
       
   140 // ---------------------------------------------------------------------------
       
   141 //
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144 void
       
   145 CCamSnapshotProvider::Release()
       
   146   {
       
   147   // empty
       
   148   }
       
   149 
       
   150 // ===========================================================================
       
   151 // end of file .inl