1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Manasij Roy, Nalina Hariharan |
|
14 * |
|
15 * Description: |
|
16 * The SmfClient class provides a set of APIs to get list of service provider |
|
17 * who implement the given interface. Calling GetServices of the instance of this |
|
18 * class is mandatory before using any other interface. |
|
19 * |
|
20 */ |
|
21 |
|
22 #ifndef SMFCLIENT_H |
|
23 #define SMFCLIENT_H |
|
24 |
|
25 #include <QObject> |
|
26 #include "smfclientglobal.h" |
|
27 |
|
28 #ifdef WRITE_LOG |
|
29 #include <QFile> |
|
30 #include <QTextStream> |
|
31 #endif |
|
32 //Forward declarations |
|
33 class SmfProvider; |
|
34 class SmfClientPrivate; |
|
35 /** |
|
36 * @ingroup smf_client_group |
|
37 * Interface for a base service provider. Other service provider classes contains |
|
38 * implementation of this base class so that each has access to service provider |
|
39 * information. |
|
40 * All of the functionality described here should be implemented by a service |
|
41 * specific plug-in object. |
|
42 */ |
|
43 class SMFCLIENT_EXPORT SmfClient |
|
44 { |
|
45 |
|
46 public: |
|
47 /** |
|
48 * Constructs SmfClient |
|
49 */ |
|
50 SmfClient(); |
|
51 ~SmfClient(); |
|
52 /** |
|
53 * @param name of the service |
|
54 * @return service provider list |
|
55 * |
|
56 * More overloaded APIs will be provided later |
|
57 */ |
|
58 QList<SmfProvider>* GetServices(const QString& serviceName); |
|
59 //QList<SmfProvider>* GetServices(const QString& serviceName, const QString& providerName); |
|
60 //QList<SmfProvider>* GetServices(const QString& serviceName, const SmfProvider& provider); |
|
61 |
|
62 /** |
|
63 * Debugging purpose only |
|
64 */ |
|
65 void writeLog(QString log)const; |
|
66 private: |
|
67 /** |
|
68 * Private impl wrapper. |
|
69 */ |
|
70 SmfClientPrivate* m_private; |
|
71 /** |
|
72 * List of SmfProvider to be returned to the requested code |
|
73 */ |
|
74 QList<SmfProvider>* m_providerList; |
|
75 |
|
76 |
|
77 }; |
|
78 |
|
79 |
|
80 #endif // SMFCLIENT_H |
|