|
1 /* |
|
2 * Copyright (c) 2005 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: Class implements IMPS factory interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCAIMPSFACTORY_H |
|
20 #define CCAIMPSFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "MCAImpsFactory.h" |
|
24 #include <e32base.h> |
|
25 #include <impsclient.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCAImpsGroupClient; |
|
29 class CCAImpsFundClient; |
|
30 class CCAImpsImClient; |
|
31 class CCAImpsAccessClient; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Concrete factory. Creates concrete interface implementations when requested. |
|
37 * |
|
38 * |
|
39 * @lib CAAdapter.lib |
|
40 * @since 1.2 |
|
41 */ |
|
42 class CCAImpsFactory : public CBase, public MCAImpsFactory |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CCAImpsFactory* NewL(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CCAImpsFactory(); |
|
55 |
|
56 public: // New functions |
|
57 |
|
58 /** |
|
59 * Creates access client when requested. |
|
60 * @return MCAImpsAccessClient abstract access client class. Ownership NOT transferred. |
|
61 */ |
|
62 MCAImpsAccessClient* CreateAccessClientL(); |
|
63 |
|
64 /** |
|
65 * Creates concrete instant messaging client. |
|
66 * @return Abstract base class for instant messaging client. |
|
67 */ |
|
68 MCAImpsImClient* CreateImClientL(); |
|
69 |
|
70 /** |
|
71 * Creates concrete group client. |
|
72 * @return Abstract base class for group client. |
|
73 */ |
|
74 MCAImpsGroupClient* CreateGroupClientL(); |
|
75 |
|
76 /** |
|
77 * Creates concrete fundamental client. |
|
78 * @return Abstract base class for fundamental client. |
|
79 */ |
|
80 MCAImpsFundClient* CreateFundClientL(); |
|
81 |
|
82 /** |
|
83 * Signals all interfaces to register themselves to WV Engine. |
|
84 */ |
|
85 virtual void RegisterL(); |
|
86 |
|
87 /** |
|
88 * Signals all interfaces to unregister themselves from WV Engine. |
|
89 */ |
|
90 virtual void Unregister(); |
|
91 |
|
92 /** |
|
93 * Connects to IMPS engine (server) |
|
94 * @since 2.1 |
|
95 */ |
|
96 virtual void ConnectL(); |
|
97 |
|
98 private: |
|
99 |
|
100 /** |
|
101 * C++ default constructor. |
|
102 */ |
|
103 CCAImpsFactory(); |
|
104 |
|
105 /** |
|
106 * By default Symbian 2nd phase constructor is private. |
|
107 */ |
|
108 void ConstructL(); |
|
109 |
|
110 private: // Data |
|
111 |
|
112 //Concrete access client, owns |
|
113 CCAImpsAccessClient *iAccessClient; |
|
114 |
|
115 //Concrete group client, owns |
|
116 CCAImpsGroupClient *iGroupClient; |
|
117 |
|
118 //Concrete fundamental client, owns |
|
119 CCAImpsFundClient *iFundClient; |
|
120 |
|
121 //Concrete instant messaging client, owns |
|
122 CCAImpsImClient *iImClient; |
|
123 |
|
124 //Concrete presence client, owns |
|
125 //CCAImpsPresenceClient* iPresenceClient |
|
126 |
|
127 // Imps engine server session |
|
128 RImpsEng iImpsEng; |
|
129 |
|
130 // Indicates if RImpsEng is connected or not. |
|
131 TBool iConnected; |
|
132 }; |
|
133 |
|
134 #endif // CCAIMPSFACTORY_H |
|
135 |
|
136 // End of File |