author | cgandhi <chandradeep.gandhi@sasken.com> |
Thu, 22 Apr 2010 15:18:37 +0530 | |
changeset 5 | edb9dc8273d9 |
parent 3 | 0446eb7b28aa |
permissions | -rw-r--r-- |
3
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
1 |
/** |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Sasken Communication Technologies Ltd. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
5 |
* under the terms of the "Eclipse Public License v1.0" |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html" |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
8 |
* |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
10 |
* Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
11 |
* |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
12 |
* Contributors: |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
13 |
* Manasij Roy, Nalina Hariharan |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
14 |
* |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
15 |
* Description: |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
16 |
* The SmfPluginBase class is the base class for all plugins. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
17 |
* |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
18 |
*/ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
19 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
20 |
#ifndef SMFPLUGINBASE_H_ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
21 |
#define SMFPLUGINBASE_H_ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
22 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
23 |
#include <smfproviderbase.h> |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
24 |
#include <QNetworkReply> |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
25 |
#include <smfglobal.h> |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
26 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
27 |
/** |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
28 |
* @ingroup smf_plugin_group |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
29 |
* The SmfPluginBase class is the base class for all plugins |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
30 |
*/ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
31 |
class SmfPluginBase : public QObject |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
32 |
{ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
33 |
Q_OBJECT |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
34 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
35 |
public: |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
36 |
/** |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
37 |
* Constructor with default argument |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
38 |
* @param aParent The parent object |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
39 |
*/ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
40 |
SmfPluginBase( QObject* aParent = 0 ); |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
41 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
42 |
/** |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
43 |
* Destructor |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
44 |
*/ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
45 |
~SmfPluginBase( ); |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
46 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
47 |
/** |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
48 |
* Method to get the provider information |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
49 |
* @return Instance of SmfProviderBase |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
50 |
*/ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
51 |
virtual SmfProviderBase* getProviderInfo( ) = 0; |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
52 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
53 |
/** |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
54 |
* Method to get the result for a network request. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
55 |
* @param aTransportResult The result of transport operation |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
56 |
* @param aReply The QNetworkReply instance for the request |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
57 |
* @param aResult [out] An output parameter to the plugin manager.If the |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
58 |
* return value is SmfSendRequestAgain, QVariant will be of type |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
59 |
* SmfPluginRequestData. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
60 |
* |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
61 |
* For SmfContactFetcherPlugin: If last operation was friends() or followers() |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
62 |
* or search() or searchInGroup() or searchNear(), aResult will be of type |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
63 |
* QList<SmfContact>. If last operation was groups(), aResult will be of |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
64 |
* type QList<SmfGroup> |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
65 |
* For SmfPostProviderPlugin: If last operation was retrieve(), aResult will be |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
66 |
* of type QList<SmfPost>. If last operation was post() or updatePost() or |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
67 |
* postDirected() or commentOnAPost() or postAppearence() or sharePost(), |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
68 |
* aResult will be of type bool |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
69 |
* For SmfLyricsServicePlugin: If last operation was lyrics(), aResult will |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
70 |
* be of type QList<SmfLyrics>. If last operation was subtitles(), aResult will |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
71 |
* be of type QList<SmfSubtitle>. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
72 |
* For SmfMusicEventsPlugin: If last operation was events(), aResult will |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
73 |
* be of type QList<SmfEvent>. If last operation was venues(), aResult |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
74 |
* will be of type QList<SmfPlace>. If last operation was postEvents(), |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
75 |
* aResult will be of type bool |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
76 |
* For SmfMusicSearchPlugin: If last operation was recommendations() or |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
77 |
* tracks() or trackInfo(), aResult will be of type QList<SmfTrackInfo>. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
78 |
* If last operation was stores(), aResult will be of type |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
79 |
* QList<SmfProvider>. If last operation was postCurrentPlaying(), |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
80 |
* aResult will be of type bool. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
81 |
* For SmfMusicServicePlugin: If last operation was userInfo(), aResult |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
82 |
* will be of type SmfMusicProfile. If last operation was searchUser(), |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
83 |
* aResult will be of type QList<SmfMusicProfile>. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
84 |
* For SmfPlaylistServicePlugin: If last operation was playlists() or |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
85 |
* playlistsOf(), aResult will be of type QList<SmfPlaylist>. If last |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
86 |
* operation was addToPlaylist() or postCurrentPlayingPlaylist(), |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
87 |
* aResult will be of type bool. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
88 |
* For SmfGalleryPlugin: If last operation was pictures(), aResult will |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
89 |
* be of type QList<SmfPicture>. If last operation was description(), |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
90 |
* aResult will be of type QString. If last operation was upload() or |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
91 |
* postComment(), aResult will be of type bool. |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
92 |
* |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
93 |
* @param aRetType [out] SmfPluginRetType |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
94 |
* @param aPageResult [out] The SmfResultPage structure variable |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
95 |
*/ |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
96 |
virtual SmfPluginError responseAvailable( |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
97 |
const SmfTransportResult &aTransportResult, |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
98 |
QNetworkReply *aReply, |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
99 |
QVariant* aResult, |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
100 |
SmfPluginRetType &aRetType, |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
101 |
SmfResultPage &aPageResult ) = 0; |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
102 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
103 |
}; |
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
104 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
105 |
|
0446eb7b28aa
Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
106 |
#endif /* SMFPLUGINBASE_H_ */ |