imstutils/imconversationview/imcvuiapp/src/cimcvappsmileyinformation.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:33:36 +0100
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Storage to save smiley information
*
*/


// INCLUDES
#include "cimcvappsmileyinformation.h"
#include "imcvlogger.h"

// ======== MEMBER FUNCTIONS ========

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::CIMCVAppSmileyInformation()
// ---------------------------------------------------------------------------
//
CIMCVAppSmileyInformation::CIMCVAppSmileyInformation()
    {
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::NewL()
// ---------------------------------------------------------------------------
//
CIMCVAppSmileyInformation* CIMCVAppSmileyInformation::NewL()
    {
    IM_CV_LOGS(TXT("CIMCVAppSmileyInformation::NewL() start") );
    CIMCVAppSmileyInformation* self = new (ELeave) CIMCVAppSmileyInformation;
	IM_CV_LOGS(TXT("CIMCVAppSmileyInformation::NewL() end") );
    return self;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::~CIMCVAppSmileyInformation()
// ---------------------------------------------------------------------------
//
CIMCVAppSmileyInformation::~CIMCVAppSmileyInformation()
    {
    if(iSmileyString)
	    {
	    delete iSmileyString;
	    iSmileyString = NULL;
	    }
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::Position()
// ---------------------------------------------------------------------------
//
TInt CIMCVAppSmileyInformation::Position() const
    {
    return iPosition;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::SetPosition()
// ---------------------------------------------------------------------------
//
void CIMCVAppSmileyInformation::SetPosition( TInt aPosition )
    {
    iPosition = aPosition;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::Index()
// ---------------------------------------------------------------------------
//
TInt CIMCVAppSmileyInformation::Index() const
    {
    return iIndex;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::SetIndex()
// ---------------------------------------------------------------------------
//
void CIMCVAppSmileyInformation::SetIndex( TInt aIndex )
    {
    iIndex = aIndex;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::SmileyString()
// ---------------------------------------------------------------------------
//
const TDesC& CIMCVAppSmileyInformation::SmileyString() const
    {
    return *iSmileyString;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::SetSmileyStringL()
// ---------------------------------------------------------------------------
//
void CIMCVAppSmileyInformation::SetSmileyStringL( const TDesC& aSmiley )
    {
    IM_CV_LOGS(TXT("CIMCVAppSmileyInformation::SetSmileyStringL() start") );
    HBufC* smile = aSmiley.AllocL();
    delete iSmileyString;
    iSmileyString = smile;
    IM_CV_LOGS(TXT("CIMCVAppSmileyInformation::SetSmileyStringL() end") );
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::IsIcon()
// ---------------------------------------------------------------------------
//
TBool CIMCVAppSmileyInformation::IsIcon() const
    {
    return iIsIcon;
    }

// ---------------------------------------------------------------------------
// CIMCVAppSmileyInformation::SetIcon()
// ---------------------------------------------------------------------------
//
void CIMCVAppSmileyInformation::SetIcon( TBool aIsIcon )
    {
    iIsIcon = aIsIcon;
    }