|
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 : CSIPITCSender.h |
|
16 * Part of : SIPClient |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 |
|
29 #ifndef CSIPITCSENDER_H |
|
30 #define CSIPITCSENDER_H |
|
31 |
|
32 #include <e32base.h> |
|
33 #include <s32mem.h> |
|
34 #include <stringpool.h> |
|
35 #include <uri8.h> |
|
36 #include "sipclientserver.h" |
|
37 |
|
38 class MSIPITC; |
|
39 class CSIPMessageElements; |
|
40 class CSIPRequestElements; |
|
41 class CSIPResponseElements; |
|
42 class CSIPHeaderBase; |
|
43 class CSIPToHeader; |
|
44 class CSIPFromHeader; |
|
45 class CSIPRouteHeader; |
|
46 class CSIPCallIDHeader; |
|
47 |
|
48 |
|
49 class CSIPITCSender : public CBase |
|
50 { |
|
51 public: |
|
52 |
|
53 static CSIPITCSender* NewL (MSIPITC& aITC); |
|
54 static CSIPITCSender* NewLC (MSIPITC& aITC); |
|
55 ~CSIPITCSender (); |
|
56 |
|
57 TInt Send (TSIPIds& aIds, TSipItcFunctions aITCFunction); |
|
58 |
|
59 void SendL (TSIPIds& aIds, TSipItcFunctions aITCFunction); |
|
60 |
|
61 void SendL (TSIPIds& aIds, |
|
62 TSipItcFunctions aITCFunction, |
|
63 const CSIPRequestElements& aElements); |
|
64 |
|
65 void SendL (TSIPIds& aIds, |
|
66 TSipItcFunctions aITCFunction, |
|
67 RStringF aMethod, |
|
68 const CUri8* aRemoteUri, |
|
69 const CSIPFromHeader* aFrom, |
|
70 const CSIPToHeader* aTo, |
|
71 const CSIPMessageElements* aElements=0, |
|
72 const CSIPRouteHeader* aOutboundProxy=0); |
|
73 |
|
74 void SendL (TSIPIds& aIds, |
|
75 TSipItcFunctions aITCFunction, |
|
76 const CSIPMessageElements* aElements); |
|
77 |
|
78 void SendL (TSIPIds& aIds, |
|
79 TSipItcFunctions aITCFunction, |
|
80 RStringF aMethod, |
|
81 const CSIPMessageElements* aElements); |
|
82 |
|
83 void SendL (TSIPIds& aIds, |
|
84 TSipItcFunctions aITCFunction, |
|
85 const CSIPResponseElements& aElements); |
|
86 |
|
87 void SetOutboundProxyL (TSIPIds& aIds, |
|
88 const CSIPRouteHeader& aOutboundProxy); |
|
89 |
|
90 CSIPHeaderBase* ReadSIPHeaderL(TSIPIds& aIds, |
|
91 TSipItcFunctions aITCFunction, |
|
92 RStringF aHeaderName); |
|
93 |
|
94 CSIPCallIDHeader* ReadCallIDHeaderL(TSIPIds& aIds); |
|
95 |
|
96 RStringF ReadLocalTagL(TSIPIds& aIds); |
|
97 |
|
98 void SetRefreshIntervalL(TSIPIds& aIds, TInt aInterval); |
|
99 |
|
100 void GetRefreshIntervalL(TSIPIds& aIds, TInt& aInterval); |
|
101 |
|
102 private: |
|
103 |
|
104 CSIPITCSender (MSIPITC& aITC); |
|
105 void ConstructL (); |
|
106 |
|
107 void SetContentToSend (const CSIPMessageElements* aElements); |
|
108 void SetContentToSend (const CSIPMessageElements& aElements); |
|
109 template<class T> CBufFlat* ExternalizeLC (const T& aElements); |
|
110 template<class T> void ExternalizeL (const T* aElement, |
|
111 RWriteStream& aWriteStream, |
|
112 TBool aAddExpectedFlag=ETrue); |
|
113 void ExternalizeL (RStringF aStr, RWriteStream& aWriteStream); |
|
114 CSIPHeaderBase* InternalizeL (RStringF aName, TDes8& aDes); |
|
115 |
|
116 // data |
|
117 TIpcArgs iITCMsgArgs; |
|
118 TBuf8<1> iEmptyContent; |
|
119 MSIPITC& iITC; |
|
120 TBool iLookupOpened; |
|
121 }; |
|
122 |
|
123 #endif // CSIPITCSENDER_H |
|
124 |
|
125 // End of File |