wvuing/wvuiave/AppSrc/ccasmileyinformation.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Storage to save smiley information
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDES
       
    20 #include "ccasmileyinformation.h"
       
    21 
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // CCASmileyInformation::CCASmileyInformation()
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 CCASmileyInformation::CCASmileyInformation()
       
    30     {
       
    31     }
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 // CCASmileyInformation::NewL()
       
    35 // ---------------------------------------------------------------------------
       
    36 //
       
    37 CCASmileyInformation* CCASmileyInformation::NewL()
       
    38     {
       
    39     CCASmileyInformation* self = new ( ELeave ) CCASmileyInformation;
       
    40     return self;
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // CCASmileyInformation::~CCASmileyInformation()
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 CCASmileyInformation::~CCASmileyInformation()
       
    48     {
       
    49     delete iSmileyString;
       
    50     }
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // CCASmileyInformation::Position()
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 TInt CCASmileyInformation::Position() const
       
    57     {
       
    58     return iPosition;
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CCASmileyInformation::SetPosition()
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 void CCASmileyInformation::SetPosition( TInt aPosition )
       
    66     {
       
    67     iPosition = aPosition;
       
    68     }
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // CCASmileyInformation::Index()
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 TInt CCASmileyInformation::Index() const
       
    75     {
       
    76     return iIndex;
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // CCASmileyInformation::SetIndex()
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 void CCASmileyInformation::SetIndex( TInt aIndex )
       
    84     {
       
    85     iIndex = aIndex;
       
    86     }
       
    87 
       
    88 // ---------------------------------------------------------------------------
       
    89 // CCASmileyInformation::SmileyString()
       
    90 // ---------------------------------------------------------------------------
       
    91 //
       
    92 const TDesC& CCASmileyInformation::SmileyString() const
       
    93     {
       
    94     return *iSmileyString;
       
    95     }
       
    96 
       
    97 // ---------------------------------------------------------------------------
       
    98 // CCASmileyInformation::SetSmileyStringL()
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 void CCASmileyInformation::SetSmileyStringL( const TDesC& aSmiley )
       
   102     {
       
   103     HBufC* smile = aSmiley.AllocL();
       
   104     delete iSmileyString;
       
   105     iSmileyString = smile;
       
   106     }
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 // CCASmileyInformation::IsIcon()
       
   110 // ---------------------------------------------------------------------------
       
   111 //
       
   112 TBool CCASmileyInformation::IsIcon() const
       
   113     {
       
   114     return iIsIcon;
       
   115     }
       
   116 
       
   117 // ---------------------------------------------------------------------------
       
   118 // CCASmileyInformation::SetIcon()
       
   119 // ---------------------------------------------------------------------------
       
   120 //
       
   121 void CCASmileyInformation::SetIcon( TBool aIsIcon )
       
   122     {
       
   123     iIsIcon = aIsIcon;
       
   124     }