|
1 /* |
|
2 * Copyright (c) 2005-2006 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSSIPCRPLUGIN_H |
|
20 #define MUSSIPCRPLUGIN_H |
|
21 |
|
22 #include "musunittesting.h" |
|
23 |
|
24 #include <apgcli.h> |
|
25 #include <sipresolvedclient.h> |
|
26 #include <ecom/implementationproxy.h> |
|
27 |
|
28 class CMusManager; |
|
29 class CSdpMediaField; |
|
30 |
|
31 IMPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ); |
|
32 |
|
33 /** |
|
34 * CMusSipCrPlugin |
|
35 */ |
|
36 class CMusSipCrPlugin : public CSIPResolvedClient |
|
37 { |
|
38 MUS_UNITTEST( CMusSipCrPluginTest ) |
|
39 |
|
40 public: // constructors and destructor |
|
41 |
|
42 static CMusSipCrPlugin* NewL(); |
|
43 |
|
44 virtual ~CMusSipCrPlugin(); |
|
45 |
|
46 private: // constructors |
|
47 |
|
48 CMusSipCrPlugin(); |
|
49 |
|
50 void ConstructL(); |
|
51 |
|
52 public: // from CSIPResolvedClient |
|
53 |
|
54 /** |
|
55 * Returns the SIP client's channel UID that indicates client's |
|
56 * channel UID for connection with SIP e.g. CSIP::NewL() |
|
57 * @param aMethod the method of the SIP request |
|
58 * @param aRequestUri the request-URI of the SIP request |
|
59 * @param aHeaders all the headers in the SIP request |
|
60 * @param aContent SIP request body; zero-length descriptor if not present |
|
61 * @param aContentType the content-type of the SIP request. |
|
62 * Zero-pointer if body is not present. |
|
63 * @return SIP client's communication channel's UID |
|
64 */ |
|
65 TUid ChannelL( RStringF aMethod, |
|
66 const TDesC8& aRequestUri, |
|
67 const RPointerArray<CSIPHeaderBase>& aHeaders, |
|
68 const TDesC8& aContent, |
|
69 const CSIPContentTypeHeader* aContentType=0 ); |
|
70 |
|
71 |
|
72 /** |
|
73 * Requests the client to connect to SIP with resolved |
|
74 * UID in case there's no connection with resolved channel UID. |
|
75 * @param aUid previously resolved channel UID |
|
76 * @leave KErrNoMemory if out of memory |
|
77 * @leave KErrNotFound in case non-existing channel UID was provided |
|
78 */ |
|
79 void ConnectL( TUid aUid ); |
|
80 |
|
81 /** |
|
82 * Requests the implementation to provide capabilities in XML format |
|
83 * in case they were not defined in the ECOM resource file. The cabablities |
|
84 * to be returned must be defined according to the same DTD. |
|
85 * This function will be invoked only if the capabilities are not |
|
86 * defined in the ECOM resource file. |
|
87 */ |
|
88 const TDesC8& Capabilities(); |
|
89 |
|
90 private: // New functions |
|
91 |
|
92 /** |
|
93 * Check whether video field has sendrecv attribute |
|
94 * @return ETrue if video has sendrecv attribute, EFalse otherwise |
|
95 */ |
|
96 TBool CheckForSendRecvAttributeL( |
|
97 RPointerArray<CSdpMediaField>& aFields ) const; |
|
98 |
|
99 private: // data |
|
100 |
|
101 CMusManager* iManager; |
|
102 TBool iCloseStringPool; |
|
103 |
|
104 }; |
|
105 |
|
106 |
|
107 #endif // MUSSIPCRPLUGIN_H |