realtimenetprots/sipfw/SIP/ConnectionMgr/src/MMsgAssemblerContext.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        : MMsgAssemblerContext.h
       
    16 * Part of     : ConnectionMgr
       
    17 * Version     : SIP/3.0
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 #ifndef __MMSGASSEMBLERCONTEXT_H__
       
    28 #define __MMSGASSEMBLERCONTEXT_H__
       
    29 
       
    30 // INCLUDES
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class MSIPMsgAssemblerOwner;
       
    34 class MSigCompController;
       
    35 class CSIPMessage;
       
    36 class TTCPMsgState;
       
    37 
       
    38 // CLASS DEFINITION
       
    39 /**
       
    40  * defines a interface of CSIPMessageAssembler used for state classes.
       
    41  */
       
    42 class MMsgAssemblerContext
       
    43 	{
       
    44 	public: // Enumerations
       
    45 
       
    46 		// the states of handling received TCP messages.
       
    47 		enum TTCPMsgStateValue
       
    48 			{
       
    49 			EMsgInit,
       
    50 			EMsgHeaderStart,
       
    51 			EMsgHeaderEnd,
       
    52 			EMsgContentStart,
       
    53 			EMsgContentEnd,
       
    54 			ECompMsgStart,
       
    55 			ECompMsgEnd,
       
    56 			EMsgComplete,
       
    57 			EMsgMaxStates
       
    58 			};
       
    59 
       
    60 	public:	// Constructors and destructor
       
    61 
       
    62 		/// Virtual destructor
       
    63 		virtual ~MMsgAssemblerContext() {};
       
    64 
       
    65 	public: // Abstract methods
       
    66 
       
    67 		virtual MSIPMsgAssemblerOwner& MsgOwner() = 0;
       
    68 		
       
    69 		virtual MSigCompController& SigComp() = 0;
       
    70 		
       
    71 		virtual CBufFlat& MsgBuffer() = 0;
       
    72 		
       
    73         virtual CSIPMessage* Message() = 0;
       
    74         
       
    75         virtual void SetMessage( CSIPMessage* aMessage ) = 0;
       
    76         
       
    77         virtual void DetachMsg() = 0;
       
    78         
       
    79         virtual void ChangeState( MMsgAssemblerContext::TTCPMsgStateValue aState ) = 0;
       
    80         
       
    81         virtual TTCPMsgState& CurrentState() = 0;
       
    82         
       
    83         virtual void SetIsSigComp( TBool aIsSigComp ) = 0;
       
    84     
       
    85         virtual TBool IsSigComp() const = 0;
       
    86         
       
    87         virtual void SetUnConsumedBytes( TInt aUnConsumedBytes ) = 0;
       
    88     
       
    89         virtual TInt UnConsumedBytes() const = 0;
       
    90 	};
       
    91 
       
    92 #endif // end of __MMSGASSEMBLERCONTEXT_H__
       
    93 
       
    94 // end of file
       
    95