phoneclientserver/phoneclient/Inc/ImageHandler/RPhCltImageHandler.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2004-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:  PhoneServer interface for image handling.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RPHCLTIMAGEHANDLER_H
       
    19 #define RPHCLTIMAGEHANDLER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include    <e32base.h>
       
    23 #include    <PhCltTypes.h>
       
    24 #include    "CPhCltOperatorLogoContainer.h"
       
    25 #include    "CPhCltBaseImageParams.h"
       
    26 
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class RPhCltServer;
       
    30 
       
    31 
       
    32 /**
       
    33 *  PhoneServer interface for image handling.
       
    34 *
       
    35 *  @lib PhoneClient.lib
       
    36 *  @since S60 v3.2
       
    37 */
       
    38 class RPhCltImageHandler 
       
    39 :   public RSubSessionBase
       
    40     {
       
    41     public: // Constructors and destructors.
       
    42 
       
    43         /**
       
    44          * Constructor.
       
    45          */
       
    46         RPhCltImageHandler();
       
    47 
       
    48     public: // New functions.
       
    49 
       
    50         /**
       
    51         * Open subsession to server.
       
    52         * 
       
    53         * @param aServer Pre-opened server session.
       
    54         * @return Symbian OS error code of the success of the opening.
       
    55         */
       
    56         TInt Open( RPhCltServer& aServer );
       
    57 
       
    58         /**
       
    59         * Close subsession.
       
    60         */
       
    61         void Close();
       
    62     
       
    63         /**
       
    64         * Save image(s).
       
    65         *
       
    66         * @param aParam An array of bitmap handles passed.
       
    67         * @return KErrNone if successful, Symbian error code otherwise.
       
    68         */
       
    69         TInt SaveImages( CPhCltImageParams& aParams );
       
    70             
       
    71         /**
       
    72         * Load image(s).
       
    73         *
       
    74         * @param aParam An array of bitmap handles passed.
       
    75         * @return KErrNone if successful, Symbian error code otherwise.
       
    76         */
       
    77         TInt LoadImages( CPhCltImageParams*& aParams );
       
    78 
       
    79         /**
       
    80         * Saves VT still image.
       
    81         */
       
    82         void SaveVtImage( TRequestStatus& aStatus, const TDesC& aFilePath );
       
    83         
       
    84         /**
       
    85          * Cancels image saving
       
    86          */
       
    87         void CancelSaveVtImage();
       
    88 
       
    89         /**
       
    90         * Opens VT still image file. Returns file handle that can be
       
    91         * used with AdoptFromServer.
       
    92         * @param aFileHandle file handle
       
    93         * @param aOpenDefault if true, opens predefined, if false opens
       
    94         * user defined image file.
       
    95         */
       
    96         TInt OpenVtImage( TInt& aFileHandle, const TBool aOpenDefault = EFalse );
       
    97         
       
    98     private:
       
    99 
       
   100         // Prohibit copy constructor if not deriving from CBase.
       
   101         RPhCltImageHandler( const RPhCltImageHandler& );
       
   102 
       
   103         // Prohibit assigment operator if not deriving from CBase.
       
   104         RPhCltImageHandler& operator=( 
       
   105             const RPhCltImageHandler& );
       
   106             
       
   107     private: // New functions.
       
   108         
       
   109         /**
       
   110         * Finalizes image load.
       
   111         * @param aImages handle array
       
   112         * @return Symbian error code.
       
   113         */
       
   114         TInt FinalizeLoad( TPckgBuf< TPhCltImageArray >& aImages );
       
   115 
       
   116         /**
       
   117         * Creates a copy of image.
       
   118         * @param aImages handle array
       
   119         * @return copied bitmap.
       
   120         */
       
   121         CFbsBitmap* CreateBitMapL( const TInt aHandle );
       
   122         
       
   123         /**
       
   124         * Ducplicates vt still images.
       
   125         * @param aImages handle array
       
   126         */
       
   127         void CopyStillsL( TPhCltImageArray& aImages );  
       
   128         
       
   129         /**
       
   130         * Duplicates operator logos.
       
   131         * @param aImages handle array
       
   132         */
       
   133         void CopyLogosL( TPhCltImageArray& aImages );
       
   134         
       
   135             
       
   136     private: // Data
       
   137     
       
   138         // Duplicated VT images.
       
   139         RPointerArray<CFbsBitmap> iVTBitMaps;
       
   140         
       
   141         // Duplicated operator logos.
       
   142         RPointerArray<CPhCltOperatorLogoContainer> iOperatorLogos;
       
   143 
       
   144     };
       
   145 
       
   146 #endif    // RPHCLTIMAGEHANDLER_H
       
   147 
       
   148 // End of File