realtimenetprots/sipfw/SIP/SIPSec/IpSecPlugin/inc/CSipSecSaDbMsgSender.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004-2009 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:
       
    15 * Name          : CSipSecSaDbMsgSender.h
       
    16 * Part of       : SIPSec
       
    17 * Version       : SIP/4.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 
       
    29 #ifndef CSIPSECSADBMSGSENDER_H
       
    30 #define CSIPSECSADBMSGSENDER_H
       
    31 
       
    32 #include "CSipSecSaDbMsgTransport.h"
       
    33 
       
    34 class TPfkeySendMsgBase;
       
    35 
       
    36 /**
       
    37  * @brief SADB message sending mechanism
       
    38  * 
       
    39  * 
       
    40  */
       
    41 
       
    42 class CSipSecSaDbMsgSender : public CSipSecSaDbMsgTransport
       
    43 	{
       
    44 
       
    45 public:
       
    46 
       
    47 	static CSipSecSaDbMsgSender* NewL( 
       
    48 	                      MSipSecSaDbSendReceiveObserver& aObserver, 
       
    49 					      RSADB& aSadb );
       
    50 						 
       
    51 	static CSipSecSaDbMsgSender* NewLC( 
       
    52 	                      MSipSecSaDbSendReceiveObserver& aObserver, 
       
    53 					      RSADB& aSadb );
       
    54 							  
       
    55 	~CSipSecSaDbMsgSender();
       
    56 		
       
    57 	void SendL( TPfkeySendMsgBase* aMessage, TInt aMsgType );
       
    58 
       
    59 protected:
       
    60 		
       
    61 	void RunL();
       
    62 	
       
    63 	TInt RunError( TInt aError );
       
    64     	
       
    65 	void DoCancel();
       
    66 
       
    67 private:
       
    68 
       
    69     CSipSecSaDbMsgSender( MSipSecSaDbSendReceiveObserver& aObserver, 
       
    70 						  RSADB& aSadb );
       
    71 	
       
    72 	void StoreMessageL( TPfkeySendMsgBase* aMessage, TInt aMsgType );
       
    73 					  
       
    74 	void RemoveMessage();
       
    75 	
       
    76 private:
       
    77 
       
    78     TPfkeySendMsgBase* iMsg;
       
    79 						  
       
    80 #ifdef CPPUNIT_TEST
       
    81     friend class CActiveObjController1;
       
    82 #endif
       
    83 
       
    84 	};
       
    85 
       
    86 
       
    87 
       
    88 #endif // CSIPSECSADBMSGSENDER_H
       
    89 
       
    90 
       
    91 // End of File