|
1 /* |
|
2 * Copyright (c) 2005-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 : sipclientdiscoveryimplementation.h |
|
16 * Part of : SIP Client Resolver |
|
17 * SIP Client Discovery API |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 #ifndef CSIPCLIENTDISCOVERYIMPL_H |
|
30 #define CSIPCLIENTDISCOVERYIMPL_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 #include <stringpool.h> |
|
35 #include "RSIPClientDiscovery.h" |
|
36 #include "_sipcodecdefs.h" |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class MSIPClientDiscoveryObserver; |
|
40 class CSIPHeaderBase; |
|
41 class CSIPContentTypeHeader; |
|
42 class CSIPClientDiscoveryReceiver; |
|
43 class CSIPClientDiscoverySerializer; |
|
44 class CSIPRequest; |
|
45 |
|
46 |
|
47 // CLASS DECLARATION |
|
48 // |
|
49 class CSIPClientDiscoveryImpl : public CBase |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 static CSIPClientDiscoveryImpl* NewL ( |
|
54 MSIPClientDiscoveryObserver& aObserver, |
|
55 TUid aSelf); |
|
56 |
|
57 static CSIPClientDiscoveryImpl* NewLC ( |
|
58 MSIPClientDiscoveryObserver& aObserver, |
|
59 TUid aSelf); |
|
60 |
|
61 ~CSIPClientDiscoveryImpl(); |
|
62 |
|
63 public: // New functions |
|
64 |
|
65 void RegisterL(TUid aChannel); |
|
66 |
|
67 TInt Deregister(TUid aChannel); |
|
68 |
|
69 TUint32 ChannelL(RStringF aRequestMethod, |
|
70 const TDesC8& aRequestUri, |
|
71 const RPointerArray<CSIPHeaderBase>& aHeaders, |
|
72 const TDesC8& aContent, |
|
73 const CSIPContentTypeHeader* aContentType=0); |
|
74 |
|
75 TUint32 ChannelL(TUid aResolver, |
|
76 RStringF aRequestMethod, |
|
77 const TDesC8& aRequestUri, |
|
78 const RPointerArray<CSIPHeaderBase>& aHeaders, |
|
79 const TDesC8& aContent, |
|
80 const CSIPContentTypeHeader* aContentType=0); |
|
81 |
|
82 void Cancel(TUint32 aRequestId); |
|
83 |
|
84 void CancelAll(); |
|
85 |
|
86 private: // New methods |
|
87 |
|
88 void ConstructL (MSIPClientDiscoveryObserver& aObserver, TUid aSelf); |
|
89 |
|
90 CSIPRequest* CreateRequestLC(RStringF aRequestMethod, |
|
91 const TDesC8& aRequestUri, |
|
92 const RPointerArray<CSIPHeaderBase>& aHeaders, |
|
93 const CSIPContentTypeHeader* aContentType=0); |
|
94 |
|
95 private: // Data |
|
96 |
|
97 RSIPClientDiscovery iSipClientDiscovery; |
|
98 CSIPClientDiscoverySerializer* iSerializer; |
|
99 CSIPClientDiscoveryReceiver* iReceiver; |
|
100 |
|
101 private: // For testing purposes |
|
102 |
|
103 UNIT_TEST(CSIPClientDiscoveryTest) |
|
104 }; |
|
105 |
|
106 #endif // CSIPCLIENTDISCOVERYIMPL_H |