realtimenetprots/sipfw/SIP/SigCompController/DefaultPlugin/inc/sipsigcompcompartmentuser.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-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          : sipsigcompcompartmentuser.h
       
    16 * Part of       : SIPSigComp
       
    17 * Version       : SIP/4.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef __SIPSIGCOMPCOMPARTMENTUSER_H__
       
    29 #define __SIPSIGCOMPCOMPARTMENTUSER_H__
       
    30 
       
    31 #include <in_sock.h>
       
    32 #include <e32base.h>
       
    33 
       
    34 #include "MCompartmentCtxUser.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CSigCompCompartment;
       
    38 class CSipSigCompCompartmentCtx;
       
    39 class MCompartmentUserOwner;
       
    40 
       
    41 
       
    42 // CLASS DEFINITION
       
    43 class CSipSigCompCompartmentUser : public CBase, public MCompartmentCtxUser
       
    44 {
       
    45 public: // Constructors and destructor
       
    46 
       
    47 	static CSipSigCompCompartmentUser* NewL( MCompartmentUserOwner& aMyOwner,
       
    48                                              TUint32 aCompartmentId,
       
    49                                              TUint32 aIapId,
       
    50                                              TBool aDynamicCompression=ETrue );	
       
    51 
       
    52 	static CSipSigCompCompartmentUser* NewLC( MCompartmentUserOwner& aMyOwner,
       
    53                                               TUint32 aCompartmentId,
       
    54                                               TUint32 aIapId,
       
    55                                               TBool aDynamicCompression=ETrue );
       
    56 	
       
    57     ~CSipSigCompCompartmentUser();
       
    58 
       
    59 public: // From MCompartmentCtxUser
       
    60 
       
    61     void CompartmentDeleted();
       
    62     
       
    63 public:
       
    64     
       
    65 	CSigCompCompartment* Compartment();
       
    66 
       
    67 	void SetAddressL( const TInetAddr& aAddress );
       
    68 
       
    69 	TBool Match( const TInetAddr& aAddress ) const;
       
    70 	
       
    71 	TBool Match( TUint32 aCompartmentId ) const;
       
    72 	
       
    73 	void SendFailedL();
       
    74 
       
    75     static const TInt iOffset;
       
    76 	
       
    77 protected: // 2nd phase constructor
       
    78 
       
    79 	void ConstructL();
       
    80 
       
    81 private:
       
    82 
       
    83 	CSipSigCompCompartmentUser( MCompartmentUserOwner& aMyOwner,
       
    84                                 TUint32 aCompartmentId,
       
    85                                 TUint32 aIapId,
       
    86                                 TBool aDynamicCompression);
       
    87 
       
    88 
       
    89 private: // data
       
    90 
       
    91     TSglQueLink iLink;
       
    92 
       
    93     MCompartmentUserOwner& iMyOwner;
       
    94 	
       
    95 	TUint32 iCompartmentId;
       
    96 	TUint32 iIapId;
       
    97 	TBool iDynamicCompression;
       
    98 	
       
    99 	CSipSigCompCompartmentCtx* iCompartmentCtx;
       
   100 
       
   101 private: //For testing purposes
       
   102 #ifdef CPPUNIT_TEST	
       
   103 	friend class CSigCompTest;
       
   104 #endif
       
   105 };
       
   106 
       
   107 #endif // end of __SIPSIGCOMPCOMPARTMENTUSER_H__