upnpharvester/common/cmlibrary/inc/cmsqlresolutionpropertyitem.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2006-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:      Capsulating resolution property items
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef __CMSQLRESOLUTIONPROPERTYITEM_H
       
    24 #define __CMSQLRESOLUTIONPROPERTYITEM_H
       
    25 
       
    26 // INCLUDES
       
    27 #include "cmsqlpropertyitem.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 /**
       
    32  *  CCmSqlResolutionPropertyItem class
       
    33  *  Capsulating resolution property items
       
    34  *  @lib cmcommon.lib
       
    35  *  @since S60 v3.1
       
    36  */
       
    37 class CCmSqlResolutionPropertyItem : public CCmSqlPropertyItem
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42     /* Constructors and destructor. */
       
    43 
       
    44     /**
       
    45      * Creates new CCmSqlResolutionPropertyItem class.
       
    46      * @param None
       
    47      * @return  pointer to CCmSqlResolutionPropertyItem class
       
    48      */
       
    49     IMPORT_C static CCmSqlResolutionPropertyItem* NewL();
       
    50     
       
    51     /**
       
    52      * Creates new CCmSqlResolutionPropertyItem class and 
       
    53      * leaves the instance in the cleanup stack.
       
    54      * @return  pointer to CCmSqlResolutionPropertyItem class
       
    55      */
       
    56     IMPORT_C static CCmSqlResolutionPropertyItem* NewLC();
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     IMPORT_C virtual ~CCmSqlResolutionPropertyItem();
       
    62 
       
    63 public: 
       
    64 
       
    65     /**
       
    66     * Sets width of the image
       
    67     * @since Series 60 3.1
       
    68     * @param aWidth, width of the image
       
    69     * @return None
       
    70     */
       
    71     IMPORT_C void SetWidth( const TInt aWidth );
       
    72     
       
    73     /**
       
    74     * Sets height of the image
       
    75     * @since Series 60 3.1
       
    76     * @param aHeight, height of the image
       
    77     * @return None
       
    78     */    
       
    79     IMPORT_C void SetHeight( const TInt aHeight );
       
    80    
       
    81     /**
       
    82     * Sets pixel count of the item 
       
    83     * @since Series 60 3.1
       
    84     * @param aSize, size of video or image item ( in bytes )
       
    85     * @return None
       
    86     */   
       
    87     IMPORT_C void SetPixelCount( const TInt aPixelCount );
       
    88 
       
    89     /**
       
    90     * Gets width of the image
       
    91     * @since Series 60 3.1
       
    92     * @param None
       
    93     * @return Duration
       
    94     */    
       
    95     IMPORT_C TInt Width() const;
       
    96     
       
    97     /**
       
    98     * Gets height of the image
       
    99     * @since Series 60 3.1
       
   100     * @param None
       
   101     * @return Bitrate
       
   102     */    
       
   103     IMPORT_C TInt Height() const;
       
   104     
       
   105     /**
       
   106     * Gets pixel count of the image
       
   107     * @since Series 60 3.1
       
   108     * @param None
       
   109     * @return Bitrate
       
   110     */    
       
   111     IMPORT_C TInt PixelCount() const;    
       
   112     
       
   113     /**
       
   114     * Compares items
       
   115     * @since Series 60 3.1
       
   116     * @param aFirst, first item
       
   117     * @param aSecond, second item
       
   118     * @return Comparison result
       
   119     */     
       
   120     IMPORT_C static TInt CompareItemsByName( 
       
   121         const CCmSqlResolutionPropertyItem& aFirst,
       
   122         const CCmSqlResolutionPropertyItem& aSecond );
       
   123                                                   
       
   124 public:
       
   125         
       
   126     /**
       
   127     * Externalizes container information to stream.
       
   128     * Leaves in case of errors.
       
   129     * @since Series 60 3.1
       
   130     * @param reference to RWriteStream
       
   131     * @return none
       
   132     */
       
   133     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
   134     
       
   135     /**
       
   136     * Internalizes container information from stream.
       
   137     * Leaves in case of errors.
       
   138     * @since Series 60 3.1
       
   139     * @param reference to RReadStream
       
   140     * @return none
       
   141     */
       
   142     IMPORT_C void InternalizeL( RReadStream& aStream );    
       
   143 
       
   144 protected:
       
   145 
       
   146     /**
       
   147      * Constructor.
       
   148      */
       
   149     CCmSqlResolutionPropertyItem();
       
   150 
       
   151     /**
       
   152      * Second-phase constructor.
       
   153      */
       
   154     void ConstructL();
       
   155     
       
   156 
       
   157 private: // data
       
   158   
       
   159     // Width of image
       
   160     TInt iWidth;
       
   161     
       
   162     // Height of image
       
   163     TInt iHeight;
       
   164    
       
   165     // Pixel count of image 
       
   166     TInt iPixelCount; 
       
   167      
       
   168     };
       
   169 
       
   170                                                           
       
   171 #endif //  __CMSQLRESOLUTIONPROPERTYITEM_H