imstutils/imconversationview/imcvuiapp/inc/cimcvappsmilestring.h
branchRCL_3
changeset 23 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
22:3104fc151679 23:9a48e301e94b
       
     1 /*
       
     2 * Copyright (c) 2007-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:  Class for storing one smiley with index to icon array.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIMCVAPPSMILESTRING_H
       
    20 #define CIMCVAPPSMILESTRING_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 * CIMCVAppSmileString
       
    29 *
       
    30 * Class for storing smile string and it's index of icon array.
       
    31 */
       
    32 class CIMCVAppSmileString : public CBase
       
    33     {
       
    34     public:  // Constructors and destructor
       
    35         
       
    36         /**
       
    37         * Two-phased constructor.
       
    38         */
       
    39         static CIMCVAppSmileString* NewL();
       
    40 
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         virtual ~CIMCVAppSmileString();
       
    45 
       
    46 	public:
       
    47 
       
    48         /**
       
    49         * Smile icon index.
       
    50 		* @return (TInt) Smile icon index
       
    51         */
       
    52         TInt SmileIconIndex() const;
       
    53         
       
    54         /**
       
    55         * Smile string corresponding a icon.
       
    56 		* @return (TDesC&) Reference to smile string
       
    57         */
       
    58 		const TDesC& SmileString() const;
       
    59 
       
    60 		/**
       
    61         * Set smiley string and it's index to icon.
       
    62         * Takes ownership of the smiley string.
       
    63 		* @param aSmileyString String of smiley
       
    64 		* @param aIndex index of icon.
       
    65         */
       
    66 		void Set( const HBufC* aSmileyString, TInt aIndex );
       
    67 
       
    68         /**
       
    69          * Sets shortest smiley string for this smileys.
       
    70          * @since S60 3.0
       
    71          * @param aSmileyString String for smiley
       
    72          */
       
    73         void SetShortestSmileStringL( const TDesC& aSmileyString );
       
    74         
       
    75         /**
       
    76          * Check if this smiley has shortest string set or not.
       
    77          * @since S60 3.0
       
    78          * @return ETrue if shortest string set, EFalse otherwise
       
    79          */
       
    80         TBool HasShortestString() const;
       
    81         
       
    82         /**
       
    83          * Returns shortest smiley string of this smiley.
       
    84          * @since S60 3.0
       
    85          * @return Reference to shortest smiley string
       
    86          */
       
    87         const TDesC& ShortestSmileString() const;
       
    88         
       
    89     private:  // Constructors and destructor
       
    90 
       
    91         /**
       
    92         * C++ constructor.
       
    93         */
       
    94         CIMCVAppSmileString();
       
    95 
       
    96     private: // Data
       
    97 
       
    98 		// Owns; Smiley string
       
    99 		const HBufC* iSmiley;
       
   100 		
       
   101 		// Icon index of smiley
       
   102 		TInt iIndex;
       
   103 		
       
   104 		// Owns; Shortest string of this smiley
       
   105 		HBufC* iShortestSmileyString;
       
   106     };
       
   107 
       
   108 #endif  // CIMCVAPPSMILESTRING_H