servicewidget/servicewidgetdatapublisher/inc/mservicewidgetobservers.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     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:  all observer classes
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MSERVICEWIDGETOBSERVERS_H
       
    20 #define MSERVICEWIDGETOBSERVERS_H
       
    21 
       
    22 #include <cchtypes.h>
       
    23 #include "servicewidgetenums.hrh"
       
    24 /**
       
    25  *  
       
    26  *  Observer interface for messages handler	
       
    27  *  @dll servicewidgetplugin
       
    28  *  @since S60 5.0
       
    29  */
       
    30  
       
    31 class  MServiceWidgetNewMessageObserver 
       
    32 	{
       
    33 	public:
       
    34 			/**
       
    35 	    	* Gets called when data update is available as new messgae recieved.
       
    36 	    	* Client can then decide wether to use the old one
       
    37 	    	* or the updated one.
       
    38 	    	* @param aSenderId, sender id
       
    39 	    	* @param aMessageText, new message details
       
    40 	       	*/
       
    41 	        virtual void HandleNewMessageL(const TDesC& aSenderId ,const TDesC& aMessageText )  = 0 ;
       
    42 	        
       
    43 	        /**
       
    44 	    	* unread message change notification
       
    45 	    	* Client can then decide wether to use the old one
       
    46 	       	*/      
       
    47 	        virtual void HandleCountChangedL() = 0 ;
       
    48 	      	
       
    49 		                
       
    50 	protected :
       
    51 			/**
       
    52 			* virtual destructor
       
    53 			*/
       
    54 			virtual ~MServiceWidgetNewMessageObserver()
       
    55 				{
       
    56 					
       
    57 				}
       
    58 	    
       
    59 			               
       
    60 	};
       
    61 
       
    62 /**
       
    63  *  
       
    64  *  Observer interface for presence handler	
       
    65  *  @dll servicewidgetplugin
       
    66  *  @since S60 5.0
       
    67  */
       
    68 class  MServiceWidgetPresenceObserver 
       
    69 	{
       
    70 	public:
       
    71 		             
       
    72 	    /**
       
    73          * Handler for own status change notification
       
    74          */    
       
    75         virtual void HandleOwnStatusChangeL(TWSPresenceStatus aStatus ) = 0;
       
    76 	
       
    77 		/**
       
    78 		* Handler for AllBuddiesPresenceInService method of MPresenceCacheReader.
       
    79 		*
       
    80 		* @param aErrorCode 
       
    81 		* @param aPresenceBuddyInfoList presence infos for all buddies requested. 
       
    82 		* Ownership to callee. Can be null if not found.
       
    83 		*/    
       
    84 		virtual void HandleChangeL( ) = 0 ;
       
    85 	    
       
    86         /**
       
    87         * from MServiceWidgetPresenceObserver
       
    88         * Handler for AllBuddiesPresenceInService method of MPresenceCacheReader.
       
    89         * @param aErrorCode 
       
    90         * @param aPresenceBuddyInfoList presence infos for all buddies requested. 
       
    91         * Ownership to callee. Can be null if not found.
       
    92         */    
       
    93 		virtual void HandleBuddyPresenceChangeL(const TDesC& aBuddyId, 
       
    94                                         TWSPresenceStatus aStatus,
       
    95                                         const TDesC& aStatusText ) = 0 ;
       
    96 	    /**
       
    97 		* Gets called when data update is available as new messgae recieved.
       
    98 		* Client can then decide wether to use the old one
       
    99 		* or the updated one.
       
   100 		* @param aSenderId, sender name
       
   101 		* @param aMessageText, new message details
       
   102 		*/
       
   103 		virtual void HandleAddRequestL(const TDesC& aRequesterId )  = 0  ;
       
   104 	
       
   105 			              
       
   106 	protected :
       
   107 			/**
       
   108 			* virtual destructor
       
   109 			*/
       
   110 			virtual ~MServiceWidgetPresenceObserver()
       
   111 				{
       
   112 					
       
   113 				}
       
   114 	    
       
   115 			               
       
   116 };
       
   117  
       
   118  /**
       
   119  *  
       
   120  *  Observer interface for session state handler	
       
   121  *  @dll servicewidgetplugin
       
   122  *  @since S60 5.0
       
   123  */
       
   124 class  MServiceWidgetServiceStateObserver 
       
   125 	{
       
   126 	public:
       
   127 			
       
   128 	       /**
       
   129 	         * Handler for service state changes
       
   130 	         * param aState, service state
       
   131 	         */    
       
   132 	        virtual void HandleServiceStatusChangedL( TSWSTRegistrationState aState) = 0;
       
   133 	                 
       
   134 	protected :
       
   135 			/**
       
   136 			* virtual destructor
       
   137 			*/
       
   138 			virtual ~MServiceWidgetServiceStateObserver()
       
   139 				{
       
   140 					
       
   141 				}
       
   142 		               
       
   143 	};
       
   144 
       
   145 /**
       
   146  *  
       
   147  *  Observer interface for timer 	
       
   148  *  @dll servicewidgetplugin
       
   149  *  @since S60 5.0
       
   150  */
       
   151 class  MServiceWidgetTimerObserver 
       
   152 	{
       
   153 	public:
       
   154 			/**
       
   155 	         * Handler for timer expiration
       
   156 	         */  
       
   157 	        virtual void HandleTimerExpiredL() = 0 ;
       
   158 	        
       
   159 	                
       
   160 	protected :
       
   161 			/**
       
   162 			* virtual destructor
       
   163 			*/
       
   164 			virtual ~MServiceWidgetTimerObserver()
       
   165 				{
       
   166 					
       
   167 				}
       
   168 	    
       
   169 			               
       
   170 	};
       
   171 
       
   172 /**
       
   173  *  
       
   174  *  Observer interface for handling ai foreground event	
       
   175  *  @dll servicewidgetplugin
       
   176  *  @since S60 5.0
       
   177  */
       
   178 
       
   179 class MServiceWidgetEventObserver
       
   180 	{
       
   181 	public:
       
   182 		  
       
   183 	        /**
       
   184 	         * Handler for timer ai foreground event 
       
   185 	         */  
       
   186 	        virtual void HandleServiceEventL(const TDesC& aPublisherId, const TDesC8& aEvent,TDesC& aInstId ) = 0 ;
       
   187 	                    
       
   188 	                
       
   189 	protected :
       
   190 			/**
       
   191 			* virtual destructor
       
   192 			*/
       
   193 			virtual ~MServiceWidgetEventObserver()
       
   194 				{
       
   195 					
       
   196 				}	
       
   197 		
       
   198 	};
       
   199 #endif  // MSERVICEWIDGETOBSERVERS_H
       
   200 
       
   201 
       
   202 // End of File