1 /* |
|
2 * Copyright (c) 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CSIMPLEIMFEATURES_H |
|
20 #define C_CSIMPLEIMFEATURES_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <cprotocolimfeatures.h> |
|
24 |
|
25 class CSimpleImConversation; |
|
26 class MPresencePluginConnectionObs; |
|
27 class MSimpleConnection; |
|
28 |
|
29 /** |
|
30 * Main class of XIMP FW plugin providing SIP IM feature. |
|
31 * |
|
32 * @lib simpleimplugin.dll |
|
33 * @since S60 v5.1 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CSimpleImFeatures ) : public CProtocolImFeatures |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * This class encapsulates SIP IM plugin initialization parameters. |
|
41 * |
|
42 * @lib simpleimplugin.dll |
|
43 * @since S60 v5.1 |
|
44 */ |
|
45 class TSimpleImPluginInitParams |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Constructor. |
|
51 * @param aObs Presence plugin connection observer. |
|
52 * @param aConn Simple engine connection. |
|
53 */ |
|
54 TSimpleImPluginInitParams( MPresencePluginConnectionObs& aObs, |
|
55 MSimpleConnection& aConn, TUint aServiceId ) : iObserver( aObs ), |
|
56 iConnection( aConn ), iServiceId( aServiceId ) {}; |
|
57 |
|
58 public: |
|
59 |
|
60 /** |
|
61 * Presence plugin connnection observer. |
|
62 * Not own. |
|
63 */ |
|
64 MPresencePluginConnectionObs& iObserver; |
|
65 |
|
66 /** |
|
67 * Simple engine connection. |
|
68 * Not own. |
|
69 */ |
|
70 MSimpleConnection& iConnection; |
|
71 |
|
72 /** |
|
73 * Service identifier. |
|
74 */ |
|
75 TUint iServiceId; |
|
76 }; |
|
77 |
|
78 /** |
|
79 * Constructor. |
|
80 * @param aInitParams Plugin initialization parameters. |
|
81 */ |
|
82 static CSimpleImFeatures* NewL( TAny* aInitParams ); |
|
83 |
|
84 /** |
|
85 * Standard C++ destructor. |
|
86 */ |
|
87 virtual ~CSimpleImFeatures(); |
|
88 |
|
89 private: |
|
90 |
|
91 CSimpleImFeatures(); |
|
92 |
|
93 void ConstructL( TAny* aInitParams ); |
|
94 |
|
95 public: // From MXIMPBase |
|
96 |
|
97 /** |
|
98 * From MXIMPBase. |
|
99 * @see MXIMPBase. |
|
100 */ |
|
101 TAny* GetInterface( |
|
102 TInt32 aInterfaceId, |
|
103 TIfGetOps aOptions ); |
|
104 |
|
105 /** |
|
106 * From MXIMPBase. |
|
107 * @see MXIMPBase. |
|
108 */ |
|
109 const TAny* GetInterface( |
|
110 TInt32 aInterfaceId, |
|
111 TIfGetOps aOptions ) const; |
|
112 |
|
113 /** |
|
114 * From MXIMPBase. |
|
115 * @see MXIMPBase. |
|
116 */ |
|
117 TInt32 GetInterfaceId() const; |
|
118 |
|
119 public : // From CProtocolImFeatures |
|
120 |
|
121 /** |
|
122 * From CProtocolImFeatures. |
|
123 * @see CProtocolImFeatures. |
|
124 */ |
|
125 MProtocolImGroup& ImGroup(); |
|
126 |
|
127 /** |
|
128 * From CProtocolImFeatures. |
|
129 * @see CProtocolImFeatures. |
|
130 */ |
|
131 MProtocolImConversation& ImConversation(); |
|
132 |
|
133 /** |
|
134 * From CProtocolImFeatures. |
|
135 * @see CProtocolImFeatures. |
|
136 */ |
|
137 MProtocolImInvitation& ImInvitation(); |
|
138 |
|
139 /** |
|
140 * From CProtocolImFeatures. |
|
141 * @see CProtocolImFeatures. |
|
142 */ |
|
143 MProtocolImSearch& ImSearch(); |
|
144 |
|
145 /** |
|
146 * From CProtocolImFeatures. |
|
147 * @see CProtocolImFeatures. |
|
148 */ |
|
149 void SetHost( MProtocolImDataHost& aHost ); |
|
150 |
|
151 /** |
|
152 * From CProtocolImFeatures. |
|
153 * @see CProtocolImFeatures. |
|
154 */ |
|
155 TInt SupportedSubInterfaces() const; |
|
156 |
|
157 private : // data members |
|
158 |
|
159 /** |
|
160 * IM conversation. |
|
161 * Own. |
|
162 */ |
|
163 CSimpleImConversation* iImConversation; |
|
164 |
|
165 /** |
|
166 * Protocol IM data host. |
|
167 * Not own. |
|
168 */ |
|
169 MProtocolImDataHost* iHost; |
|
170 |
|
171 }; |
|
172 |
|
173 #endif // C_CSIMPLEIMFEATURES_H |
|