|
1 /* |
|
2 * Copyright (c) 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: Factory class for SIMPLE Engine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef simplefactory_H |
|
22 #define simplefactory_H |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATION |
|
29 class MSimpleConnection; |
|
30 class MSimplePublisher; |
|
31 class MSimpleWatcher; |
|
32 class MSimpleWinfoWatcher; |
|
33 class MSimpleDocument; |
|
34 class MSimpleElement; |
|
35 class MSimpleNamespace; |
|
36 class MSimpleFilterDocument; |
|
37 |
|
38 class MSimpleConnectionObserver; |
|
39 class MSimplePublishObserver; |
|
40 class MSimpleWatcherObserver; |
|
41 class MSimpleWinfoObserver; |
|
42 class MSimpleContent; |
|
43 class MSimpleInstantMsgObserver; |
|
44 class MSimpleInstantMessage; |
|
45 |
|
46 /** |
|
47 * Factory class for SIMPLE Engine |
|
48 * |
|
49 * @lib simpleengine |
|
50 * @since S60 3.2 |
|
51 */ |
|
52 class TSimpleFactory |
|
53 { |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * Create new simple Element entity. |
|
59 * @since S60 3.2 |
|
60 * @param aNsUri the namespace URI for this element. |
|
61 * @param aLocalName the local name for this element. |
|
62 * @return MSimpleElement, ownership is transferred. |
|
63 */ |
|
64 IMPORT_C static MSimpleElement* NewElementL( |
|
65 const TDesC8& aNsUri, |
|
66 const TDesC8& aLocalName ); |
|
67 |
|
68 /** |
|
69 * Create new simple NameSpace entity. |
|
70 * @since S60 3.2 |
|
71 * @param aPrefix prefix to be used |
|
72 * @param aUri URI |
|
73 * @return MSimpleNameSpace, ownership is transferred. |
|
74 */ |
|
75 IMPORT_C static MSimpleNamespace* NewNamespaceL( |
|
76 const TDesC8& aPrefix, |
|
77 const TDesC8& aUri ); |
|
78 |
|
79 /** |
|
80 * Create new simple engine Connection entity. |
|
81 * @since S60 3.2 |
|
82 * @param aObserver client callback observer |
|
83 * @return MSimpleConnection, ownership is transferred. |
|
84 */ |
|
85 IMPORT_C static MSimpleConnection* NewConnectionL( |
|
86 MSimpleConnectionObserver& aObserver ); |
|
87 |
|
88 /** |
|
89 * Create new Publisher entity. |
|
90 * @since S60 3.2 |
|
91 * @paraam aConn simple engine connection |
|
92 * @param aObserver client callback observer |
|
93 * @return MSimplePublisher, ownership is transferred. |
|
94 */ |
|
95 IMPORT_C static MSimplePublisher* NewPublisherL( |
|
96 MSimpleConnection& aConn, |
|
97 MSimplePublishObserver& aObserver ); |
|
98 |
|
99 /** |
|
100 * Create new InstantMessage entity. |
|
101 * @since S60 5.0 |
|
102 * @param aConn simple engine connection |
|
103 * @param aObserver client callback observer |
|
104 * @return MSimpleInstantMessage, ownership is transferred. |
|
105 */ |
|
106 IMPORT_C static MSimpleInstantMessage* NewInstantMessageL( |
|
107 MSimpleConnection& aConn, |
|
108 MSimpleInstantMsgObserver& aObserver ); |
|
109 |
|
110 /** |
|
111 * Create new Watcher entity. |
|
112 * @since S60 3.2 |
|
113 * @paraam aConn simple engine connection |
|
114 * @param aObserver client callback observer |
|
115 * @return MSimpleWatcher, ownership is transferred. |
|
116 */ |
|
117 IMPORT_C static MSimpleWatcher* NewWatcherL( |
|
118 MSimpleConnection& aConn, |
|
119 MSimpleWatcherObserver& aObserver ); |
|
120 |
|
121 /** |
|
122 * Create new WinfoWatcher entity. |
|
123 * @since S60 3.2 |
|
124 * @paraam aConn simple engine connection |
|
125 * @param aObserver client callback observer |
|
126 * @return MSimpleWinfoWatcher, ownership is transferred. |
|
127 */ |
|
128 IMPORT_C static MSimpleWinfoWatcher* NewWinfoWatcherL( |
|
129 MSimpleConnection& aConn, |
|
130 MSimpleWinfoObserver& aObserver ); |
|
131 |
|
132 /** |
|
133 * Create new simple Document entity from scratch. |
|
134 * @since S60 3.2 |
|
135 * @return MSimpleDocument, ownership is transferred. |
|
136 */ |
|
137 IMPORT_C static MSimpleDocument* NewDocumentL( ); |
|
138 |
|
139 /** |
|
140 * Create new simple Document entity from xml-document. |
|
141 * @since S60 3.2 |
|
142 * @param aXml a valid XML document containing in PIDF format. |
|
143 * @return MSimpleDocument, ownership is transferred. |
|
144 */ |
|
145 IMPORT_C static MSimpleDocument* NewDocumentL( const TDesC8& aXml ); |
|
146 |
|
147 /** |
|
148 * Create new simple FilterDocument entity. |
|
149 * @since S60 3.2 |
|
150 * @return MSimpleFilterDocument, ownership is transferred. |
|
151 */ |
|
152 IMPORT_C static MSimpleFilterDocument* NewFilterDocumentL(); |
|
153 |
|
154 /** |
|
155 * Create new simple FilterDocument entity. |
|
156 * @since S60 3.2 |
|
157 * @param aXml a valid XML document containing in PIDF format. |
|
158 * @return MSimpleFilterDocument, ownership is transferred. |
|
159 */ |
|
160 IMPORT_C static MSimpleFilterDocument* NewFilterDocumentL( const TDesC8& aXml ); |
|
161 |
|
162 IMPORT_C static MSimpleContent* NewContentL( |
|
163 const TDesC8& aContentID, const TDesC8& aContentType ); |
|
164 |
|
165 /** |
|
166 * Create new simple engine Connection entity. |
|
167 * @since S60 3.2 |
|
168 * @param aObserver client callback observer |
|
169 * @param aServiceId serviceId of current service |
|
170 * @return MSimpleConnection, ownership is transferred. |
|
171 */ |
|
172 IMPORT_C static MSimpleConnection* NewConnectionL( |
|
173 MSimpleConnectionObserver& aObserver, TInt32 aServiceId ); |
|
174 }; |
|
175 |
|
176 #endif |
|
177 |
|
178 // End of File |