|
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 : CSipCSSession.h |
|
16 * Part of : SIPServerCore |
|
17 * Version : SIP/6.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 #ifndef CSIPCSSESSION_H |
|
28 #define CSIPCSSESSION_H |
|
29 |
|
30 #include "MConnectionStateObserver.h" |
|
31 #include "MSipCSSession.h" |
|
32 #include "SipStackServerDefs.h" |
|
33 #include "_sipcodecdefs.h" |
|
34 |
|
35 class CSipServerCore; |
|
36 class CSipCSSessionReceiver; |
|
37 class CSipCSServerITC; |
|
38 class MTransactionOwner; |
|
39 |
|
40 |
|
41 class CSipCSSession : public CSession2, |
|
42 public MConnectionStateObserver, |
|
43 public MSipCSSession |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 static CSipCSSession* NewL(CSipServerCore& aServerCore); |
|
48 static CSipCSSession* NewLC(CSipServerCore& aServerCore); |
|
49 |
|
50 ~CSipCSSession(); |
|
51 |
|
52 public: // New functions |
|
53 |
|
54 CSipCSServerITC& ITC(); |
|
55 CSipServerCore& ServerCore(); |
|
56 TUid Uid(); |
|
57 |
|
58 public: // From MSipCSSession |
|
59 |
|
60 MTransactionOwner& FindOwner(TUint32 aIapId); |
|
61 const MSIPSecUser* SIPSecUser(const TRegistrationId& aRegistrationId); |
|
62 TBool ByPassSIPSec() const; |
|
63 |
|
64 public: // From CSession2 |
|
65 |
|
66 void ServiceL (const RMessage2& aMessage); |
|
67 |
|
68 public: // From MConnectionStateObserver |
|
69 |
|
70 void ConnectionStateChangedL (TUint32 aIapId, |
|
71 CSIPConnection::TState aState); |
|
72 |
|
73 private: |
|
74 |
|
75 CSipCSSession (CSipServerCore& aServerCore); |
|
76 |
|
77 void ConstructL (); |
|
78 |
|
79 void DoServiceL (TInt aFunction, const RMessage2& aMessage); |
|
80 |
|
81 // Supported services: |
|
82 void SetClientUidL (const RMessage2& aMessage); |
|
83 void SupportedSecurityMechanismsL (const RMessage2& aMessage); |
|
84 void NegotiatedSecurityMechanismL (const RMessage2& aMessage); |
|
85 void SetHttpDigestObserverL (const RMessage2& aMessage); |
|
86 void SetCredentialsL (const RMessage2& aMessage); |
|
87 void RemoveCredentialsL (const RMessage2& aMessage); |
|
88 void IgnoreChallengeL(const RMessage2& aMessage); |
|
89 void SetSecurityHandlingL(const RMessage2& aMessage); |
|
90 void SigCompSupportedL (); |
|
91 void GetTransactionStateL (const RMessage2& aMessage); |
|
92 void GetDialogStateL (const RMessage2& aMessage); |
|
93 void GetCompartmentCountL (const RMessage2& aMessage); |
|
94 void OpenSubSessionL (TUint32 aIapId, const RMessage2& aMessage); |
|
95 void CloseSubSession (TInt aSubSessionHandle); |
|
96 void ReceiveSipMessageL (const RMessage2& aMessage); |
|
97 void ClientReadyToReceiveL (const RMessage2& aMessage); |
|
98 void CancelClientReceiveL (); |
|
99 void CallSubSessionL (TInt aSubSessionHandle, const RMessage2& aMessage); |
|
100 |
|
101 // helper functions: |
|
102 TBool Exists (TUint32 aIapId); |
|
103 |
|
104 const MSIPSecUser* FindSIPSecUser( |
|
105 TRefreshId aRefreshId, |
|
106 TTransactionId aTransactionId); |
|
107 |
|
108 // Credentials enumeration |
|
109 enum TCredentialIndexes |
|
110 { |
|
111 EUserIndex=0, |
|
112 EPasswdIndex, |
|
113 EOutboundProxyIndex |
|
114 }; |
|
115 |
|
116 private: // Data |
|
117 |
|
118 CSipServerCore& iServerCore; |
|
119 TUid iClientUid; |
|
120 CSipCSSessionReceiver* iReceiver; |
|
121 CObjectCon* iSubSessions; |
|
122 CObjectIx* iSubSessionIndex; |
|
123 TBool iByPassSIPSec; |
|
124 |
|
125 private: // For testing purposes |
|
126 |
|
127 UNIT_TEST(CSipCSSessionTest) |
|
128 UNIT_TEST(CSipCSSubSessionTest) |
|
129 }; |
|
130 |
|
131 #endif // CSIPCSSESSION_H |
|
132 |
|
133 // End of File |