|
1 /* |
|
2 * Copyright (c) 2002-2004 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: VoIPPlugin interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CVOIPPLUGIN_H |
|
22 #define CVOIPPLUGIN_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <apgcli.h> |
|
26 #include <e32base.h> |
|
27 #include <ECom/ImplementationProxy.h> |
|
28 #include "SIPResolvedClient.h" |
|
29 #include "SIPContentTypeHeader.h" |
|
30 |
|
31 /** |
|
32 * Implementation API for SIP Client Resolver. |
|
33 * Routes incoming VoIP calls to MMCE |
|
34 * |
|
35 * @lib |
|
36 * @since Series |
|
37 */ |
|
38 class CVoIPPlugin : CSIPResolvedClient |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CVoIPPlugin* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CVoIPPlugin(); |
|
51 |
|
52 public: // Functions from base classes |
|
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 virtual 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 * Requests the client to connect to SIP with resolved |
|
73 * UID in case there's no connection with resolved channel UID. |
|
74 * @param aUid previously resolved channel UID |
|
75 * @leave KErrNoMemory if out of memory |
|
76 * @leave KErrNotFound in case non-existing channel UID was provided |
|
77 */ |
|
78 virtual void ConnectL(TUid aUid); |
|
79 |
|
80 /** |
|
81 * Requests the implementation to provide capabilities in XML format |
|
82 * in case they were not defined in the ECOM resource file. The cabablities |
|
83 * to be returned must be defined according to the same DTD. |
|
84 * This function will be invoked only if the capabilities are not |
|
85 * defined in the ECOM resource file. |
|
86 */ |
|
87 virtual const TDesC8& Capabilities(); |
|
88 |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * C++ default constructor. |
|
94 */ |
|
95 CVoIPPlugin(); |
|
96 |
|
97 /** |
|
98 * By default Symbian 2nd phase constructor is private. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 // Needed for cleanup of a RImplInfoPtrArray: |
|
103 static void ResetAndDestroy( TAny* anArray ); |
|
104 |
|
105 private: // Data |
|
106 |
|
107 // iApaSession |
|
108 RApaLsSession iApaSession; |
|
109 |
|
110 // iAppInfo |
|
111 TApaAppInfo iAppInfo; |
|
112 |
|
113 // VoIPPlugin's application UID |
|
114 TUid iApplicationUID; |
|
115 |
|
116 }; |
|
117 |
|
118 #endif // CVOIPPlugin_H |
|
119 |
|
120 // End of File |
|
121 |