imservices/ossprotocoladaptation/inc/cossprotocolservererrorhandler.h
changeset 46 860cd8a5168c
parent 35 085f765766a0
equal deleted inserted replaced
35:085f765766a0 46:860cd8a5168c
     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 server error notification handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __COssprotocolServerErrorHandler_H__
       
    20 #define __COssprotocolServerErrorHandler_H__
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <ximpbase.h>
       
    26 
       
    27 #include <presencecachewriter.h>
       
    28 #include <presencebuddyinfo.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 class MOSSProtocolConnectionManager;
       
    33 
       
    34 /**
       
    35  * COssprotocolServerErrorHandler
       
    36  *
       
    37  * Handles network server intiated errors
       
    38  *
       
    39  */
       
    40 
       
    41 class COssprotocolServerErrorHandler: public CActive
       
    42 
       
    43 
       
    44 	{
       
    45 
       
    46 	public:
       
    47 
       
    48 		static COssprotocolServerErrorHandler* NewL (
       
    49 		    MOSSProtocolConnectionManager& aConnMan
       
    50 		);
       
    51 
       
    52 		static COssprotocolServerErrorHandler* NewLC (
       
    53 		    MOSSProtocolConnectionManager& aConnMan
       
    54 		);
       
    55 
       
    56 		virtual ~COssprotocolServerErrorHandler();
       
    57 
       
    58 	private:
       
    59 
       
    60 		COssprotocolServerErrorHandler ( MOSSProtocolConnectionManager& aConnMan );
       
    61 		void ConstructL();
       
    62 
       
    63 	private: // from CActive
       
    64 
       
    65 		void DoCancel();
       
    66 		void RunL();
       
    67 		TInt RunError ( TInt aError );
       
    68 
       
    69 	public:
       
    70         /**
       
    71 		 * start listening for server intiated error signals
       
    72 		 */
       
    73 		void StartListeningL();
       
    74         /**
       
    75 		 * Handles the recieved error signal
       
    76 		 */
       
    77 		void ProcessIncomingDataL();
       
    78 
       
    79 	private: // data
       
    80 
       
    81 		/**
       
    82 		 * Send data request to pure data handler generates the id
       
    83 		 */
       
    84 		TInt iSendId;
       
    85 
       
    86 		/**
       
    87 		 * Oss Protocol Plugin Connection Manager
       
    88 		 * Not own.  *** Write "Not own" if some other class owns this object.
       
    89 		 */
       
    90 		MOSSProtocolConnectionManager& iConnMan;
       
    91 
       
    92 	};
       
    93 
       
    94 
       
    95 #endif // __COssprotocolServerErrorHandler_H__
       
    96