realtimenetprots/sipfw/SIP/Server/inc/CSipCSSubSessionReceiver.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2006-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          : CSipCSSubSessionReceiver.h
       
    16 * Part of       : SIPServerCore
       
    17 * Version       : SIP/5.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef CSIPCSSUBSESSIONRECEIVER_H
       
    29 #define CSIPCSSUBSESSIONRECEIVER_H
       
    30 
       
    31 #include "CSipCSReceiverBase.h"
       
    32 #include "MRefreshOwner.h"
       
    33 #include "MRegistrationOwner.h"
       
    34 #include "MDialogOwner.h"
       
    35 #include "sipconnection.h"
       
    36 #include "TSIPTransportParams.h"
       
    37 
       
    38 class CSipCSServerITC;
       
    39 class MSIPCSReceiverOwner;
       
    40 
       
    41 
       
    42 class CSipCSSubSessionReceiver : public CSipCSReceiverBase,
       
    43                                  public MRefreshOwner,
       
    44                                  public MRegistrationOwner,
       
    45                                  public MDialogOwner
       
    46     {
       
    47 public:
       
    48     
       
    49     static CSipCSSubSessionReceiver* NewL(
       
    50         CSipCSServerITC& aITC,
       
    51         MSIPSecUser& aSIPSecUser,
       
    52         MSIPCSReceiverOwner& aOwner);
       
    53 
       
    54     static CSipCSSubSessionReceiver* NewLC(
       
    55         CSipCSServerITC& aITC,
       
    56         MSIPSecUser& aSIPSecUser,
       
    57         MSIPCSReceiverOwner& aOwner);
       
    58   
       
    59     ~CSipCSSubSessionReceiver();
       
    60 
       
    61 public: // From MTransactionOwner
       
    62 
       
    63     void ReceiveL(TUint32 aIapId,
       
    64                   TTransactionId aTransactionId,
       
    65                   CSIPRequest* aRequest);
       
    66 
       
    67     void ReceiveL(TTransactionId aTransactionId,
       
    68                   CSIPResponse* aResponse);                 
       
    69                    
       
    70 public: // From MRefreshOwner and MDialogOwner
       
    71 
       
    72     TSIPTransportParams TransportParams(const TRegistrationId& aRegistrationId);
       
    73 
       
    74     const MSIPSecUser* SIPSecUser(const TRegistrationId& aRegistrationId);
       
    75 
       
    76 public:    // From MRefreshOwner
       
    77     
       
    78     void RefreshReceivedL(TTransactionId aTransactionId,
       
    79                           TRefreshId aRefreshId,
       
    80                           CSIPResponse* aResponse);
       
    81 
       
    82     TInt RefreshError(TRefreshId aRefreshId,
       
    83                       TTransactionId aTransactionId,
       
    84                       TInt aReason);
       
    85 
       
    86     TInt NextRefreshCSeq(TUint& aCSeq);
       
    87     
       
    88     TUint RefreshDurationL();
       
    89 
       
    90 public: // MRegistrationOwner
       
    91     
       
    92     void RegistrationReceivedL(TTransactionId aTransactionId,
       
    93                                TRefreshId aRefreshId,
       
    94                                TRegistrationId aRegistrationId,
       
    95                                CSIPResponse* aSIPResponse);
       
    96  
       
    97     TInt RegistrationError(TTransactionId aTransactionId,
       
    98                            TRegistrationId aRegistrationId,
       
    99                            TInt aReason);
       
   100                             
       
   101     const TSIPTransportParams& TransportParams() const;
       
   102 
       
   103 public: // From MDialogOwner
       
   104 
       
   105     void DialogsReceivedL(TTransactionId aTransactionId,
       
   106                           TDialogId aDialogId,
       
   107                           CSIPRequest* aRequest);
       
   108 
       
   109     void DialogsReceivedL(TTransactionId aTransactionId,
       
   110                           CSIPResponse* aResponse);
       
   111 
       
   112 
       
   113     void DialogsReceivedL(TTransactionId aTransactionId,
       
   114                           TRefreshId aRefreshId,
       
   115                           TDialogId aDialogId,
       
   116                           CSIPResponse* aResponse);
       
   117 
       
   118     TInt DialogsError(TTransactionId aTransactionId,
       
   119                       TInt aReason);
       
   120 
       
   121     TInt DialogsError(TTransactionId aTransactionId,
       
   122                       TRefreshId aRefreshId,
       
   123                       TDialogId aDialogId,
       
   124                       TInt aReason);
       
   125     
       
   126     TInt InviteTransactionCompleted(TTransactionId aId); 
       
   127 
       
   128 public: // New functions
       
   129 
       
   130     void ConnectionStateChangedL(CSIPConnection::TState aState);
       
   131 
       
   132 private: // Second phase constructors
       
   133 
       
   134     CSipCSSubSessionReceiver(
       
   135         CSipCSServerITC& aITC,
       
   136         MSIPSecUser& aSIPSecUser,
       
   137         MSIPCSReceiverOwner& aOwner);
       
   138 
       
   139 private: // Data
       
   140 
       
   141     MSIPCSReceiverOwner& iOwner;
       
   142 
       
   143 private: // The unit test class is declared as a friend:
       
   144 #ifdef CPPUNIT_TEST
       
   145     friend class CSipCSSubSessionReceiverTest;
       
   146     friend class CSipCSSubSessionTest;
       
   147 #endif
       
   148     };
       
   149 
       
   150 #endif // CSIPCSSUBSESSIONRECEIVER_H
       
   151 
       
   152 // End of File