servicewidget/servicewidgetdatapublisher/src/cservicewidgetbuddypresence.cpp
branchRCL_3
changeset 23 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
22:3104fc151679 23:9a48e301e94b
       
     1 /*
       
     2 * Copyright (c) 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:  buddy ,presene status of a user 
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "cservicewidgetbuddypresence.h"
       
    21 
       
    22 // ================= MEMBER FUNCTIONS =======================
       
    23 // --------------------------------------------------------------------------
       
    24 // CServiceWidgetTimer::NewL
       
    25 // --------------------------------------------------------------------------
       
    26 //
       
    27 CServiceWidgetBuddyPresence* CServiceWidgetBuddyPresence::NewL(const TDesC& aBuddyId, TWSPresenceStatus aStatus )
       
    28 	{
       
    29 	CServiceWidgetBuddyPresence* self =
       
    30 	new (ELeave) CServiceWidgetBuddyPresence(aStatus);
       
    31 	CleanupStack::PushL(self);
       
    32 	self->ConstructL( aBuddyId);
       
    33 	CleanupStack::Pop(self);
       
    34 	return self;	
       
    35 	}
       
    36 // --------------------------------------------------------------------------
       
    37 // CServiceWidgetTimer::CServiceWidgetBuddyPresence
       
    38 // --------------------------------------------------------------------------
       
    39 //
       
    40 CServiceWidgetBuddyPresence::CServiceWidgetBuddyPresence(TWSPresenceStatus aStatus):
       
    41 	iStatus( aStatus )
       
    42 	{
       
    43 	}
       
    44 // --------------------------------------------------------------------------
       
    45 // CServiceWidgetTimer::ConstructL
       
    46 // --------------------------------------------------------------------------
       
    47 //
       
    48 void CServiceWidgetBuddyPresence::ConstructL(const TDesC& aBuddyId )
       
    49 	{
       
    50 	iBuddyId = aBuddyId.AllocL();	
       
    51 	}
       
    52 
       
    53 // --------------------------------------------------------------------------
       
    54 // CServiceWidgetTimer::~CServiceWidgetBuddyPresence
       
    55 // --------------------------------------------------------------------------
       
    56 //
       
    57 CServiceWidgetBuddyPresence::~CServiceWidgetBuddyPresence()
       
    58 	{
       
    59 	delete iBuddyId;	
       
    60 	}
       
    61 // --------------------------------------------------------------------------
       
    62 // CServiceWidgetTimer::BuddyId
       
    63 // --------------------------------------------------------------------------
       
    64 //
       
    65 const TDesC& CServiceWidgetBuddyPresence::BuddyId()
       
    66 	{
       
    67 	if( iBuddyId )	
       
    68 		{
       
    69 		return *iBuddyId;	
       
    70 		}
       
    71 	return KNullDesC;	
       
    72 	}
       
    73 // --------------------------------------------------------------------------
       
    74 // CServiceWidgetTimer::PresenceStatus
       
    75 // --------------------------------------------------------------------------
       
    76 //
       
    77 TWSPresenceStatus CServiceWidgetBuddyPresence::PresenceStatus()
       
    78 	{
       
    79 	return iStatus;	
       
    80 	}
       
    81 // --------------------------------------------------------------------------
       
    82 // CServiceWidgetTimer::SetPresenceStatus
       
    83 // --------------------------------------------------------------------------
       
    84 //
       
    85 void CServiceWidgetBuddyPresence::SetPresenceStatus( TWSPresenceStatus aStatus )
       
    86 	{
       
    87 	iStatus = aStatus;	
       
    88 	}
       
    89 //  End of File  
       
    90 
       
    91