|
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 : CSIPQuerySrv.h |
|
16 * Part of : ServerResolver |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 #ifndef CSIPQUERYSRV_H |
|
28 #define CSIPQUERYSRV_H |
|
29 |
|
30 //INCLUDES |
|
31 #include <dns_qry.h> |
|
32 #include <e32std.h> |
|
33 #include "CSIPQueryBase.h" |
|
34 #include "_sipcodecdefs.h" |
|
35 |
|
36 // CLASS DEFINITION |
|
37 /** |
|
38 * CSIPQuerySrv implements a |
|
39 */ |
|
40 class CSIPQuerySrv : public CSIPQueryBase |
|
41 { |
|
42 public:// Constructors and destructor |
|
43 |
|
44 static CSIPQuerySrv* NewL( const TDesC8& aTarget, TBool aSipsUri ); |
|
45 |
|
46 ~CSIPQuerySrv(); |
|
47 |
|
48 public: |
|
49 |
|
50 static HBufC8* SetTargetProtocolL( const TDesC8& aTarget, |
|
51 RStringF aProtocol, |
|
52 TBool aIsSipsUri ); |
|
53 |
|
54 static HBufC8* SetTargetTLSL( const TDesC8& aTarget ); |
|
55 const TDesC8& QueryBuf(); |
|
56 |
|
57 TDes8& QueryResultBuf(); |
|
58 |
|
59 TDnsRespSRV QueryResult(); |
|
60 |
|
61 void AddL( TDnsRespSRV aSrv ); |
|
62 |
|
63 static TInt Compare( const TDnsRespSRV& aFirst, |
|
64 const TDnsRespSRV& aSecond ); |
|
65 |
|
66 TDnsRespSRV& SRVRecordL( TInt aIndex ); |
|
67 |
|
68 RArray<TDnsRespSRV>& RecordArray(); |
|
69 |
|
70 void SetTargetL( const TDesC8& aTarget ); |
|
71 |
|
72 void Query( MSIPHostResolver& aResolver ); |
|
73 |
|
74 void HandleQueryResultL( MSIPHostResolver& aResolver ); |
|
75 |
|
76 const TDesC8& ResultTargetL(); |
|
77 |
|
78 TUint ResultPortL(); |
|
79 |
|
80 void RemoveElementL( TInt aIndex ); |
|
81 |
|
82 TInt ArrayCount(); |
|
83 |
|
84 private:// Constructors and destructor |
|
85 |
|
86 void ConstructL( const TDesC8& aTarget ); |
|
87 |
|
88 CSIPQuerySrv(TBool aSipsUri); |
|
89 |
|
90 private:// Data |
|
91 |
|
92 HBufC8* iTarget; |
|
93 |
|
94 TDnsRespSRVBuf iResult; |
|
95 |
|
96 TDnsQueryBuf iQueryBuf; |
|
97 |
|
98 RArray<TDnsRespSRV> iRecordArray; |
|
99 |
|
100 TBool iSipsUri; |
|
101 |
|
102 private: // For testing purposes |
|
103 |
|
104 UNIT_TEST(CSIPQuerySrvTest) |
|
105 UNIT_TEST(CSIPQuerySrvStub) |
|
106 }; |
|
107 #endif // end of CSIPQUERYSRV_H |
|
108 |
|
109 // End of File |