realtimenetprots/sipfw/SIP/Server/inc/CSipCSSessionReceiver.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2007-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          : CSipCSSessionReceiver.h
       
    16 * Part of       : SIPServerCore
       
    17 * Version       : SIP/6.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 #ifndef CSIPCSSESSIONRECEIVER_H
       
    28 #define CSIPCSSESSIONRECEIVER_H
       
    29 
       
    30 #include "CSipCSReceiverBase.h"
       
    31 #include "MSIPSecUser.h"
       
    32 
       
    33 class MSipCSSession;
       
    34 
       
    35 
       
    36 class CSipCSSessionReceiver : public CSipCSReceiverBase,
       
    37                               public MSIPSecUser
       
    38 	{
       
    39 public: // Constructors and destructor 
       
    40     
       
    41     static CSipCSSessionReceiver* NewL(CSipCSServerITC& aITC,
       
    42                                        MSipCSSession& aSession);
       
    43                                        
       
    44     static CSipCSSessionReceiver* NewLC(CSipCSServerITC& aITC,
       
    45                                         MSipCSSession& aSession);
       
    46   
       
    47     ~CSipCSSessionReceiver();
       
    48     
       
    49 public: // New functions
       
    50     
       
    51     void SetHttpDigestObserver(TSipHttpDigestObserverType aType);
       
    52     
       
    53     void MovePendingErrorsL(TUint32 aIapId,
       
    54                             CSipCSReceiverBase& aReceiver);
       
    55 
       
    56 public: // From MTransactionOwner
       
    57 
       
    58     void ReceiveL(TUint32 aIapId,
       
    59                   TTransactionId aTransactionId,
       
    60                   CSIPRequest* aRequest);
       
    61 
       
    62 	void ReceiveL(TTransactionId aTransactionId,
       
    63 	              CSIPResponse* aResponse);
       
    64 	              
       
    65 	TInt TransactionEnded(TUint32 aIapId, 
       
    66 	                      TTransactionId aTransactionId,
       
    67 	                      TInt aReason);	              
       
    68 
       
    69 public: // From MSIPSecUser
       
    70 
       
    71 	TBool PassOnlyRealmsToUser() const;
       
    72 	
       
    73     void RequestCredentialsL(const TDesC8& aRealm);
       
    74 	
       
    75     void RequestCredentialsL(CSIPResponse& aResponse,
       
    76 	                         TTransactionId aTransactionId,
       
    77 	                         TRefreshId aRefreshId);
       
    78 	                         
       
    79 	const MSIPSecUser* TrustedUser(TRegistrationId aRegistrationId);                       
       
    80     
       
    81     TBool ByPassSIPSec() const;
       
    82     
       
    83 private: // Constructors
       
    84 
       
    85     CSipCSSessionReceiver(CSipCSServerITC& aITC,
       
    86                           MSipCSSession& aSession);
       
    87     
       
    88 private: // Data
       
    89     
       
    90     TSipHttpDigestObserverType iHttpDigestObserverType;
       
    91     MSipCSSession& iSession;
       
    92     RArray<TSipCSReceiveItem> iPendingErrorItems;
       
    93 
       
    94 private: // For testing purposes
       
    95 
       
    96 	UNIT_TEST(CSipCSSessionReceiverTest)
       
    97 	UNIT_TEST(CSipCSSessionTest)
       
    98 	};
       
    99 
       
   100 #endif // CSIPCSSESSIONRECEIVER_H
       
   101 
       
   102 // End of File