servicewidget/servicewidgetdatapublisher/inc/cservicewidgetbuddypresence.h
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     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 #ifndef CSERVICEWIDGETBUDDYPRESENCE_H
       
    20 #define CSERVICEWIDGETBUDDYPRESENCE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "servicewidgetenums.hrh"
       
    24 
       
    25 class CServiceWidgetBuddyPresence : public CBase
       
    26 	{
       
    27 	public :
       
    28 		
       
    29 		/**
       
    30 		* Two-phased constructor.
       
    31 		* @param aBuddyId, friend buddy id
       
    32 		* @param aStatus, buddy presence status
       
    33 		* @return new instance of this class
       
    34 		*/
       
    35 		static CServiceWidgetBuddyPresence* NewL(const TDesC& aBuddyId, TWSPresenceStatus aStatus );
       
    36 		/**
       
    37 		* Standard C++ destructor
       
    38 		*/    
       
    39 		~CServiceWidgetBuddyPresence();
       
    40 		
       
    41 		/**
       
    42 		* @return buddy Id
       
    43 		*/    
       
    44 		const TDesC& BuddyId();
       
    45 		
       
    46 		/**
       
    47 		* @return buddy status
       
    48 		*/ 
       
    49 		TWSPresenceStatus PresenceStatus();
       
    50 		
       
    51 		/**
       
    52 		* @param aStatus, status to sdet
       
    53 		*/ 
       
    54 		void SetPresenceStatus( TWSPresenceStatus aStatus );
       
    55 	private :    
       
    56 		/**
       
    57 		* constructor
       
    58 		*/    
       
    59 		CServiceWidgetBuddyPresence(TWSPresenceStatus aStatus);
       
    60 		/**
       
    61 		* Performs the 2nd phase of construction.
       
    62 		* @param aServiceName, service name
       
    63 		*/        
       
    64 		void ConstructL(const TDesC& aBuddyId );
       
    65 	private :   // data
       
    66 		// Owns : buddy id
       
    67 		HBufC* iBuddyId;
       
    68 		// owns : buddy presence status
       
    69 		TWSPresenceStatus iStatus;     
       
    70 
       
    71 	};
       
    72 #endif // CSERVICEWIDGETBUDDYPRESENCE_H