imservices/ossprotocoladaptation/inc/im/creceivemessagehandler.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2007-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:  Implementation of reicive message handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CRECEIVEMESSAGEHANDLER_H__
       
    20 #define __CRECEIVEMESSAGEHANDLER_H__
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <ximpbase.h>
       
    26 
       
    27 
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 class MOSSProtocolConnectionManager;
       
    32 
       
    33 /**
       
    34  * CReceiveMessageHandler
       
    35  *
       
    36  *  Handles the messages recieved.
       
    37  *  updates imfeature plugin data model and
       
    38  *  triggers event
       
    39  *
       
    40  */
       
    41 
       
    42 class CReceiveMessageHandler: public CActive
       
    43 
       
    44 
       
    45 	{
       
    46 
       
    47 	public:
       
    48 
       
    49 		static CReceiveMessageHandler* NewL (
       
    50 		    MOSSProtocolConnectionManager& aConnMan
       
    51 		);
       
    52 
       
    53 
       
    54 		virtual ~CReceiveMessageHandler();
       
    55 
       
    56 	private:
       
    57 
       
    58 		CReceiveMessageHandler ( MOSSProtocolConnectionManager& aConnMan );
       
    59 		void ConstructL();
       
    60 	
       
    61 	private: // from CActive
       
    62 
       
    63 		void DoCancel();
       
    64 		void RunL();
       
    65 		TInt RunError ( TInt aError );
       
    66 
       
    67 	public:
       
    68         
       
    69     	/**
       
    70 		 * start listening recieved massages
       
    71 		 */    
       
    72 		void StartListeningL();
       
    73     	/**
       
    74 		 * parse the data and update the data cache of ximp.send event back to ximp
       
    75 		 */
       
    76 		void ProcessIncomingDataL();
       
    77 
       
    78 	private: // data
       
    79 
       
    80 		/**
       
    81 		 * Send data request to pure data handler generates the id
       
    82 		 */
       
    83 		TInt iSendId;
       
    84 		
       
    85 		/**
       
    86 		 * Oss Protocol Plugin Connection Manager
       
    87 		 * Not own.  *** Write "Not own" if some other class owns this object.
       
    88 		 */
       
    89 		MOSSProtocolConnectionManager& iConnMan;
       
    90 
       
    91 	};
       
    92 
       
    93 
       
    94 #endif // __CRECEIVEMESSAGEHANDLER_H__
       
    95