helix_ren/helix_stub/ThumbnailAPI/inc/hxtnutil.h
changeset 0 d7e778ce6e8e
equal deleted inserted replaced
-1:000000000000 0:d7e778ce6e8e
       
     1 /*
       
     2 * Copyright (c) 2009 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef _SYMBIAN_TE_UTIL_H_
       
    21 #define _SYMBIAN_TE_UTIL_H_
       
    22 
       
    23 // Symbian includes
       
    24 #include <f32file.h> // RFile 
       
    25 
       
    26 #include "hxmetadatakeys.h"
       
    27 #include "hxtnutil_obs.h"
       
    28 
       
    29 
       
    30 
       
    31 
       
    32 // CHXThumbnailUtility is the entry point for TE engine.
       
    33 // It enables access to Helix Thumbnail engine for reading
       
    34 // the decoded YUV frames for a given file.
       
    35 
       
    36 class CHXThumbnailUtility : public CBase         
       
    37 {
       
    38 public:
       
    39     ~CHXThumbnailUtility();
       
    40     
       
    41      /**
       
    42      * Constructs a new CHXThumbnailUtility object. This method
       
    43      * may leave if no resources are available to construct 
       
    44      * a new object.    
       
    45      * 
       
    46      * Possible leave codes:
       
    47      *  - <code>KErrNoMemory</code> if memory allocation fails
       
    48      *     
       
    49      * @param aObserver  observer to notify when info is ready for reading
       
    50      *
       
    51      * @return  pointer to a new CHXThumbnailUtility instance
       
    52      */
       
    53 
       
    54     static CHXThumbnailUtility* NewL(MHXThumbnailUtilityImplObserver& aObserver);
       
    55                                                                   
       
    56     /**
       
    57      * OpenFileL reads data from aFileHandle to get information
       
    58      * about the specified video clip file.
       
    59      * Possible leave codes:
       
    60      *  - <code>KErrNoMemory</code> if memory allocation fails
       
    61      *  - <code>KErrNotSupported</code> if can't support this clip for thumbnail.   
       
    62      *  - <code>KErrNotFound</code> if can't find a good thumbnail.   
       
    63      *
       
    64      * @param aFileHandle  File handle of file to get the thumbnail.
       
    65      * @param uStartPositingMS  Starting position in clip time from which to 
       
    66                                 read the thumbnail.     
       
    67      */
       
    68 
       
    69     void    OpenFileL(const RFile& aFileHandle, TUint uStartPositingMS = 0);
       
    70 
       
    71     
       
    72     /**
       
    73      * Cancels frame generation. If no frame is currently being 
       
    74      * generated, the function does nothing. Can be called multiple times
       
    75      * without any side effects.
       
    76      */
       
    77     
       
    78     void CancelThumb();
       
    79     
       
    80 
       
    81     /** returns the count of metadata entries.
       
    82       * @param aCount  Number of metadata entries returned.
       
    83       * @return  System wide error code if there is any error.
       
    84      */
       
    85     
       
    86     TInt GetMetaDataCount(TUint &aCount);
       
    87 
       
    88     /** returns the metadata entry at the given index
       
    89       * @param aIndex  aIndex of the metadata entry.
       
    90       * @param id returned id or key of the metadata entry.
       
    91       * @param pDes returned value of the metadata entry. It is not 
       
    92                     owned by the caller.
       
    93       * @return  System wide error code if there is any error.             
       
    94      */
       
    95         
       
    96     TInt GetMetaDataAt(TUint aIndex, 
       
    97             HXMetaDataKeys::EHXMetaDataId &id, HBufC*& pDes);
       
    98 
       
    99 protected:
       
   100     CHXThumbnailUtility();
       
   101 
       
   102 private:
       
   103     void    ConstructL(MHXThumbnailUtilityImplObserver& aObserver);    
       
   104     
       
   105          
       
   106 };
       
   107 
       
   108 
       
   109 #endif _SYMBIAN_TE_UTIL_H_
       
   110