services/terminalmodeservice_plat/inc/upnptmclienticonpref.h
branchRCL_3
changeset 29 5c72fd91570d
equal deleted inserted replaced
7:8116cc943311 29:5c72fd91570d
       
     1 /**
       
     2 * Copyright (c) 2010 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: CUpnpTmClientIconPref class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __UPNPTMCLIENTICONPREF_H__
       
    19 #define __UPNPTMCLIENTICONPREF_H__
       
    20 
       
    21 #include <e32base.h>   
       
    22 
       
    23 const TUint KDefaultDepthValue = 24;
       
    24 
       
    25 // CLASS DECLARATION
       
    26 /**
       
    27  * The class specifies the icon preferences corresponding to each Client
       
    28  * Profile.It describes the mime type and the dimensions that client adhering to
       
    29  * a particular profile supports. AutomotiveServer sets the icon preferences and
       
    30  * sends the same to TM Service when requested.
       
    31  */
       
    32 class CUpnpTmClientIconPref: public CBase
       
    33     {
       
    34 public: 
       
    35     /**
       
    36     * Two-phased constructor. returns a pointer to the new element.
       
    37     * @param aProfileId Client profile ID
       
    38     * @param aWidth     icon width
       
    39     * @param aHeight    icon height
       
    40     * @param aDepth     icon depth
       
    41     * @param aMimeType  icon mime type
       
    42     */    
       
    43     IMPORT_C static CUpnpTmClientIconPref* NewL( TUint aProfileId );
       
    44     /**
       
    45     * Destructor. 
       
    46     */
       
    47     ~CUpnpTmClientIconPref();
       
    48     
       
    49 public: 
       
    50     // inlined "setter" and "getter" methods
       
    51     /**
       
    52     * Returns the profileID.
       
    53     * @return Returns the profileID of the client profile.
       
    54     */
       
    55     inline TUint ClientProfileId()const;
       
    56     /**
       
    57     * Returns the mime type.
       
    58     * @return Returns icon mime type
       
    59     */
       
    60     inline const TDesC8& MimeType()const;
       
    61     /**
       
    62     * Returns the width of the icon.
       
    63     * @return Returns width in pixels or KErrNotFound
       
    64     */
       
    65     inline TInt Width()const; 
       
    66     /**
       
    67     * Returns the height of the icon.
       
    68     * @return Returns height in pixels or KErrNotFound
       
    69     */
       
    70     inline TInt Height()const;
       
    71     /**
       
    72     * Returns the color depth of the icon.
       
    73     * @return Returns icon depth or KErrNotFound
       
    74     */
       
    75     inline TInt Depth()const;
       
    76     /**
       
    77     * Method is used to provide the preferred mime type of the client.
       
    78     * @param aMimeType icon mime type
       
    79     */
       
    80     IMPORT_C void SetMimeTypeL( const TDesC8& aMimeType ); 
       
    81     /**
       
    82     * Sets icon width
       
    83     * @param aWidth icon width
       
    84     */
       
    85     inline void SetWidth( const TInt aWidth );
       
    86     /**
       
    87     * Sets icon height
       
    88     * @param aHeight icon height
       
    89     */
       
    90     inline void SetHeight( const TInt aHeight );
       
    91     /**
       
    92     * Sets icon depth
       
    93     * @param aDepth icon depth
       
    94     */
       
    95     inline void SetDepth( const TInt aDepth );
       
    96   
       
    97 private:  
       
    98     /**
       
    99     * C++ default constructor.
       
   100     */
       
   101     CUpnpTmClientIconPref( TUint aProfileId );
       
   102     /**
       
   103      * 2nd phase constructor
       
   104      */ 
       
   105     void ConstructL( );
       
   106 
       
   107 private: // Data   	
       
   108     TUint                  iClientProfileId;
       
   109     HBufC8*                iIconMimeType;
       
   110     TInt                   iIconWidth;
       
   111     TInt                   iIconHeight;
       
   112     TInt                   iIconDepth;
       
   113     };
       
   114 
       
   115 #include <upnptmclienticonpref.inl>
       
   116 
       
   117 #endif  //__UPNPTMCLIENTICONPREF_H__
       
   118 
       
   119 // End of File