services/terminalmodeservice_plat/inc/upnptmclienticonpref.h
author hgs
Fri, 03 Sep 2010 09:13:04 +0300
changeset 31 b51a6f4f15ba
parent 24 e9457ebcc4df
permissions -rw-r--r--
201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
hgs
parents:
diff changeset
     1
/**
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description: CUpnpTmClientIconPref class declaration.
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
#ifndef __UPNPTMCLIENTICONPREF_H__
hgs
parents:
diff changeset
    19
#define __UPNPTMCLIENTICONPREF_H__
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
#include <e32base.h>   
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
const TUint KDefaultDepthValue = 24;
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
// CLASS DECLARATION
hgs
parents:
diff changeset
    26
/**
hgs
parents:
diff changeset
    27
 * The class specifies the icon preferences corresponding to each Client
hgs
parents:
diff changeset
    28
 * Profile.It describes the mime type and the dimensions that client adhering to
hgs
parents:
diff changeset
    29
 * a particular profile supports. AutomotiveServer sets the icon preferences and
hgs
parents:
diff changeset
    30
 * sends the same to TM Service when requested.
hgs
parents:
diff changeset
    31
 */
hgs
parents:
diff changeset
    32
class CUpnpTmClientIconPref: public CBase
hgs
parents:
diff changeset
    33
    {
hgs
parents:
diff changeset
    34
public: 
hgs
parents:
diff changeset
    35
    /**
hgs
parents:
diff changeset
    36
    * Two-phased constructor. returns a pointer to the new element.
hgs
parents:
diff changeset
    37
    * @param aProfileId Client profile ID
hgs
parents:
diff changeset
    38
    * @param aWidth     icon width
hgs
parents:
diff changeset
    39
    * @param aHeight    icon height
hgs
parents:
diff changeset
    40
    * @param aDepth     icon depth
hgs
parents:
diff changeset
    41
    * @param aMimeType  icon mime type
hgs
parents:
diff changeset
    42
    */    
hgs
parents:
diff changeset
    43
    IMPORT_C static CUpnpTmClientIconPref* NewL( TUint aProfileId );
hgs
parents:
diff changeset
    44
    /**
hgs
parents:
diff changeset
    45
    * Destructor. 
hgs
parents:
diff changeset
    46
    */
hgs
parents:
diff changeset
    47
    ~CUpnpTmClientIconPref();
hgs
parents:
diff changeset
    48
    
hgs
parents:
diff changeset
    49
public: 
hgs
parents:
diff changeset
    50
    // inlined "setter" and "getter" methods
hgs
parents:
diff changeset
    51
    /**
hgs
parents:
diff changeset
    52
    * Returns the profileID.
hgs
parents:
diff changeset
    53
    * @return Returns the profileID of the client profile.
hgs
parents:
diff changeset
    54
    */
hgs
parents:
diff changeset
    55
    inline TUint ClientProfileId()const;
hgs
parents:
diff changeset
    56
    /**
hgs
parents:
diff changeset
    57
    * Returns the mime type.
hgs
parents:
diff changeset
    58
    * @return Returns icon mime type
hgs
parents:
diff changeset
    59
    */
hgs
parents:
diff changeset
    60
    inline const TDesC8& MimeType()const;
hgs
parents:
diff changeset
    61
    /**
hgs
parents:
diff changeset
    62
    * Returns the width of the icon.
hgs
parents:
diff changeset
    63
    * @return Returns width in pixels or KErrNotFound
hgs
parents:
diff changeset
    64
    */
hgs
parents:
diff changeset
    65
    inline TInt Width()const; 
hgs
parents:
diff changeset
    66
    /**
hgs
parents:
diff changeset
    67
    * Returns the height of the icon.
hgs
parents:
diff changeset
    68
    * @return Returns height in pixels or KErrNotFound
hgs
parents:
diff changeset
    69
    */
hgs
parents:
diff changeset
    70
    inline TInt Height()const;
hgs
parents:
diff changeset
    71
    /**
hgs
parents:
diff changeset
    72
    * Returns the color depth of the icon.
hgs
parents:
diff changeset
    73
    * @return Returns icon depth or KErrNotFound
hgs
parents:
diff changeset
    74
    */
hgs
parents:
diff changeset
    75
    inline TInt Depth()const;
hgs
parents:
diff changeset
    76
    /**
hgs
parents:
diff changeset
    77
    * Method is used to provide the preferred mime type of the client.
hgs
parents:
diff changeset
    78
    * @param aMimeType icon mime type
hgs
parents:
diff changeset
    79
    */
hgs
parents:
diff changeset
    80
    IMPORT_C void SetMimeTypeL( const TDesC8& aMimeType ); 
hgs
parents:
diff changeset
    81
    /**
hgs
parents:
diff changeset
    82
    * Sets icon width
hgs
parents:
diff changeset
    83
    * @param aWidth icon width
hgs
parents:
diff changeset
    84
    */
hgs
parents:
diff changeset
    85
    inline void SetWidth( const TInt aWidth );
hgs
parents:
diff changeset
    86
    /**
hgs
parents:
diff changeset
    87
    * Sets icon height
hgs
parents:
diff changeset
    88
    * @param aHeight icon height
hgs
parents:
diff changeset
    89
    */
hgs
parents:
diff changeset
    90
    inline void SetHeight( const TInt aHeight );
hgs
parents:
diff changeset
    91
    /**
hgs
parents:
diff changeset
    92
    * Sets icon depth
hgs
parents:
diff changeset
    93
    * @param aDepth icon depth
hgs
parents:
diff changeset
    94
    */
hgs
parents:
diff changeset
    95
    inline void SetDepth( const TInt aDepth );
hgs
parents:
diff changeset
    96
  
hgs
parents:
diff changeset
    97
private:  
hgs
parents:
diff changeset
    98
    /**
hgs
parents:
diff changeset
    99
    * C++ default constructor.
hgs
parents:
diff changeset
   100
    */
hgs
parents:
diff changeset
   101
    CUpnpTmClientIconPref( TUint aProfileId );
hgs
parents:
diff changeset
   102
    /**
hgs
parents:
diff changeset
   103
     * 2nd phase constructor
hgs
parents:
diff changeset
   104
     */ 
hgs
parents:
diff changeset
   105
    void ConstructL( );
hgs
parents:
diff changeset
   106
hgs
parents:
diff changeset
   107
private: // Data   	
hgs
parents:
diff changeset
   108
    TUint                  iClientProfileId;
hgs
parents:
diff changeset
   109
    HBufC8*                iIconMimeType;
hgs
parents:
diff changeset
   110
    TInt                   iIconWidth;
hgs
parents:
diff changeset
   111
    TInt                   iIconHeight;
hgs
parents:
diff changeset
   112
    TInt                   iIconDepth;
hgs
parents:
diff changeset
   113
    };
hgs
parents:
diff changeset
   114
hgs
parents:
diff changeset
   115
#include <upnptmclienticonpref.inl>
hgs
parents:
diff changeset
   116
hgs
parents:
diff changeset
   117
#endif  //__UPNPTMCLIENTICONPREF_H__
hgs
parents:
diff changeset
   118
hgs
parents:
diff changeset
   119
// End of File