author | cgandhi <chandradeep.gandhi@sasken.com> |
Thu, 20 May 2010 16:20:37 +0530 | |
changeset 8 | 4102c67b6e56 |
parent 6 | c39a6cfd1fb9 |
permissions | -rw-r--r-- |
6
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
1 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
2 |
// Include files |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
3 |
#include "sampleplugin.h" |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
4 |
#include <QNetworkRequest> |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
5 |
#include <QNetworkAccessManager> |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
6 |
#include <qfile.h> |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
7 |
#include <stdio.h> |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
8 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
9 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
10 |
* Constructor with default argument |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
11 |
* @param aUtil The SmfPluginUtil instance. The plugins can |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
12 |
* call the method getAuthKeys() of this class, with its pluginID to |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
13 |
* get the OAuth keys, keys are returned only if this plugin is |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
14 |
* authorised by Smf franework |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
15 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
16 |
SamplePlugin::SamplePlugin( SmfPluginUtil *aUtil ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
17 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
18 |
m_provider = new SampleProviderBase(); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
19 |
m_util = aUtil; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
20 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
21 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
22 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
23 |
* Destructor |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
24 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
25 |
SamplePlugin::~SamplePlugin( ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
26 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
27 |
if(m_provider) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
28 |
delete m_provider; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
29 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
30 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
31 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
32 |
* Method to get a list of pictures |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
33 |
* @param aRequest [out] The request data to be sent to network |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
34 |
* @param aPageNum The page to be extracted |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
35 |
* @param aItemsPerPage Number of items per page |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
36 |
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
37 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
38 |
SmfPluginError SamplePlugin::pictures( SmfPluginRequestData &aRequest, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
39 |
const int aPageNum, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
40 |
const int aItemsPerPage ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
41 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
42 |
SmfPluginError error = SmfPluginErrInvalidRequest; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
43 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
44 |
// invalid arguments |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
45 |
if( aPageNum < 0 || aItemsPerPage < 0 ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
46 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
47 |
else |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
48 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
49 |
// Create a map of the arguments keys and their repective values |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
50 |
QMultiMap<QByteArray, QByteArray> params; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
51 |
QString pageNum, itemPerPage; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
52 |
pageNum.number(aPageNum); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
53 |
itemPerPage.number(aItemsPerPage); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
54 |
params.insert("method", "getpictures"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
55 |
params.insert("pagenumber", pageNum.toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
56 |
params.insert("itemsperpage", itemPerPage.toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
57 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
58 |
QNetworkAccessManager::Operation type = QNetworkAccessManager::GetOperation; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
59 |
SmfSignatureMethod signMethod = HMAC_SHA1; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
60 |
SmfParsingMode mode = ParseForInlineQuery; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
61 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
62 |
error = createRequest(aRequest, type, signMethod, params, mode, NULL); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
63 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
64 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
65 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
66 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
67 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
68 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
69 |
* Method called by plugins to generate a request data |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
70 |
* @param aRequest [out] The request data to be sent to network |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
71 |
* @param aOperation The type of http operation |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
72 |
* @param aSignatureMethod The signature method to be used |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
73 |
* @param aParams A map of parameters to its values |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
74 |
* @param aMode The mode of creation of the request |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
75 |
* @param aPostData The data to be posted (for HTTP POST |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
76 |
* only, else it will be NULL) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
77 |
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
78 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
79 |
SmfPluginError SamplePlugin::createRequest( SmfPluginRequestData &aRequest, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
80 |
const QNetworkAccessManager::Operation aOperation, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
81 |
const SmfSignatureMethod aSignatureMethod, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
82 |
QMultiMap<QByteArray, QByteArray> &aParams, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
83 |
const SmfParsingMode aMode, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
84 |
QBuffer *aPostData ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
85 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
86 |
SmfPluginError error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
87 |
QString url = m_provider->serviceUrl().toString(); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
88 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
89 |
// Get the oAuth keys from The Smf Server |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
90 |
QMap<QString, QString> keys; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
91 |
QString registrationToken = retrievePrivateRegToken(); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
92 |
m_util->getAuthKeys(keys, registrationToken, m_provider->pluginId()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
93 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
94 |
// Unable to get the tokens |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
95 |
if(keys.isEmpty()) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
96 |
error = SmfPluginErrInvalidApplication; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
97 |
else |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
98 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
99 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
100 |
// Get the token and token secret from keys |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
101 |
QByteArray token; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
102 |
QByteArray tokenSecret; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
103 |
token.append(keys.value("oauth_token")); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
104 |
tokenSecret.append(keys.value("oauth_token_secret")); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
105 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
106 |
// convert the parameters to string and sign it |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
107 |
QByteArray content = m_util->createParameterString(url, aOperation, token, tokenSecret, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
108 |
aSignatureMethod, aParams, aMode ); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
109 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
110 |
// Unable to create the signed string |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
111 |
if(content.isEmpty()) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
112 |
error = SmfPluginErrInvalidRequest; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
113 |
else |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
114 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
115 |
// add the parameter string to the URL |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
116 |
url.append(content); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
117 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
118 |
// set the url of the request |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
119 |
aRequest.iNetworkRequest.setUrl(QUrl(url)); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
120 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
121 |
// set the type of http operation to be performed |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
122 |
aRequest.iHttpOperationType = aOperation; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
123 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
124 |
// As it is a GET operation, set iPostData to NULL |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
125 |
aRequest.iPostData = aPostData; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
126 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
127 |
// For successful creation of request |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
128 |
error = SmfPluginErrNone; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
129 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
130 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
131 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
132 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
133 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
134 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
135 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
136 |
* Method to get a description |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
137 |
* @param aRequest [out] The request data to be sent to network |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
138 |
* @param aImage The image abot which the description is required |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
139 |
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
140 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
141 |
SmfPluginError SamplePlugin::description( SmfPluginRequestData &aRequest, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
142 |
const SmfPicture &aImage ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
143 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
144 |
SmfPluginError error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
145 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
146 |
// Create a map of the arguments keys and their repective values |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
147 |
QMultiMap<QByteArray, QByteArray> params; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
148 |
params.insert("method", "getpictureDescription"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
149 |
params.insert("photoId", aImage.id().toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
150 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
151 |
QNetworkAccessManager::Operation type = QNetworkAccessManager::GetOperation; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
152 |
SmfSignatureMethod signMethod = HMAC_SHA1; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
153 |
SmfParsingMode mode = ParseForInlineQuery; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
154 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
155 |
error = createRequest(aRequest, type, signMethod, params, mode, NULL); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
156 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
157 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
158 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
159 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
160 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
161 |
* Method to upload a picture |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
162 |
* @param aRequest [out] The request data to be sent to network |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
163 |
* @param aImage The image to be uploaded |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
164 |
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
165 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
166 |
SmfPluginError SamplePlugin::upload( SmfPluginRequestData &aRequest, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
167 |
const SmfPicture &aImage ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
168 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
169 |
SmfPluginError error = SmfPluginErrInvalidRequest; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
170 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
171 |
// Create a map of the arguments keys and their repective values |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
172 |
QMultiMap<QByteArray, QByteArray> params; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
173 |
params.insert("method", "upload"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
174 |
params.insert("title", aImage.title().toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
175 |
params.insert("owner", aImage.owner().toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
176 |
params.insert("description", aImage.description().toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
177 |
params.insert("tags", aImage.tags().join(" ").toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
178 |
switch(aImage.visibility()) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
179 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
180 |
case SMFVisibilityFriend: |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
181 |
params.insert("isFriend", "true"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
182 |
break; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
183 |
case SMFVisibilityPublic: |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
184 |
params.insert("isPublic", "true"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
185 |
break; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
186 |
case SMFVisibilityFamily: |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
187 |
params.insert("isFamily", "true"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
188 |
break; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
189 |
case SMFVisibilityGroup: |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
190 |
params.insert("isGroup", "true"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
191 |
break; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
192 |
default:// SMFVisibilityPersonal |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
193 |
params.insert("isPrivate", "true"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
194 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
195 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
196 |
QNetworkAccessManager::Operation type = QNetworkAccessManager::PostOperation; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
197 |
SmfSignatureMethod signMethod = HMAC_SHA1; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
198 |
SmfParsingMode mode = ParseForRequestContent; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
199 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
200 |
// Write the image as png format to the buffer |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
201 |
QByteArray ba; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
202 |
QBuffer buffer(&ba); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
203 |
buffer.open(QIODevice::WriteOnly); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
204 |
aImage.picture().save(&buffer, "PNG"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
205 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
206 |
error = createRequest(aRequest, type, signMethod, params, mode, &buffer); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
207 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
208 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
209 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
210 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
211 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
212 |
* Method to upload a list of pictures |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
213 |
* @param aRequest [out] The request data to be sent to network |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
214 |
* @param aImages The list of images to be uploaded |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
215 |
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
216 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
217 |
SmfPluginError SamplePlugin::upload( SmfPluginRequestData &aRequest, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
218 |
const QList<SmfPicture> &aImages ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
219 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
220 |
SmfPluginError error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
221 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
222 |
for(int index = 0; index < aImages.count(); index++) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
223 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
224 |
error = upload(aRequest, aImages.value(index)); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
225 |
if(SmfPluginErrNone != error) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
226 |
break; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
227 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
228 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
229 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
230 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
231 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
232 |
* Method to post comment on a picture is available |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
233 |
* @param aRequest [out] The request data to be sent to network |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
234 |
* @param aImage The image on which comment is to be posted |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
235 |
* @param aComment The comment to be posted |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
236 |
* @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
237 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
238 |
SmfPluginError SamplePlugin::postComment( SmfPluginRequestData &aRequest, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
239 |
const SmfPicture &aImage, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
240 |
const SmfComment &aComment ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
241 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
242 |
SmfPluginError error = SmfPluginErrInvalidRequest; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
243 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
244 |
// Create a map of the arguments keys and their repective values |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
245 |
QMultiMap<QByteArray, QByteArray> params; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
246 |
params.insert("method", "postComment"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
247 |
params.insert("photoId", aImage.id().toAscii()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
248 |
params.insert("comment", "excellent Himalaya"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
249 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
250 |
QNetworkAccessManager::Operation type = QNetworkAccessManager::GetOperation; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
251 |
SmfSignatureMethod signMethod = HMAC_SHA1; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
252 |
SmfParsingMode mode = ParseForInlineQuery; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
253 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
254 |
error = createRequest(aRequest, type, signMethod, params, mode, NULL); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
255 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
256 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
257 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
258 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
259 |
* This function retrieves the registration token that was provided to Authentication App |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
260 |
* while authenticatiing user with the service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
261 |
* |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
262 |
* Plugin source codes are not open source - so free to use anything they like |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
263 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
264 |
QString SamplePlugin::retrievePrivateRegToken() |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
265 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
266 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
267 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
268 |
* This is a private implementation - |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
269 |
* implementer might choose to use registry to store/retrieve this token |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
270 |
* or to write encrypted (symmetric) token to a file kept at known dir |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
271 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
272 |
QFile qf("/resource/data/sampleplugindata.dat"); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
273 |
qf.open(QIODevice::ReadOnly); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
274 |
QByteArray qba = qf.read(20); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
275 |
qba.chop(5); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
276 |
QString rs(qba.toBase64()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
277 |
return rs; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
278 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
279 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
280 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
281 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
282 |
* Method to get the provider information |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
283 |
* @return Instance of SmfProviderBase |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
284 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
285 |
SmfProviderBase* SamplePlugin::getProviderInfo( ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
286 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
287 |
return m_provider; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
288 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
289 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
290 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
291 |
* Method to get the result for a network request. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
292 |
* @param aTransportResult The result of transport operation |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
293 |
* @param aReply The QNetworkReply instance for the request |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
294 |
* @param aResult [out] An output parameter to the plugin manager.If the |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
295 |
* return value is SmfSendRequestAgain, QVariant will be of type |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
296 |
* SmfPluginRequestData. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
297 |
* For SmfGalleryPlugin: If last operation was pictures(), aResult will |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
298 |
* be of type QList<SmfPicture>. If last operation was description(), |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
299 |
* aResult will be of type QString. If last operation was upload() or |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
300 |
* postComment(), aResult will be of type bool. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
301 |
* @param aRetType [out] SmfPluginRetType |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
302 |
* @param aPageResult [out] The SmfResultPage structure variable |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
303 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
304 |
SmfPluginError SamplePlugin::responseAvailable( |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
305 |
const SmfTransportResult &aTransportResult, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
306 |
QNetworkReply *aReply, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
307 |
QVariant* aResult, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
308 |
SmfPluginRetType &aRetType, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
309 |
SmfResultPage &aPageResult ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
310 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
311 |
SmfPluginError error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
312 |
if(SmfTransportOpNoError == aTransportResult) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
313 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
314 |
// Assuming a JSON response, parse the response |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
315 |
QByteArray response = aReply->readAll(); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
316 |
m_provider->updateDataUsage(0, aReply->readBufferSize()); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
317 |
bool parseResult = false; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
318 |
QVariant *result = new QVariant(); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
319 |
/** see http://qjson.sourceforge.net/usage.html for more details */ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
320 |
parseResult = m_util->getJsonHandle()->parse(response, &parseResult); |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
321 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
322 |
// For parsing error |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
323 |
if(!parseResult) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
324 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
325 |
aRetType = SmfRequestError; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
326 |
error = SmfPluginErrInvalidRequest; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
327 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
328 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
329 |
else |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
330 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
331 |
// The plugins should convert the result to suitable format, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
332 |
// like if last operation was pictures(), result should be converted to the |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
333 |
// type QList<SmfPicture>. If last operation was description(), result should |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
334 |
// be converted to the type QString. If last operation was upload() or |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
335 |
// postComment(), result should be converted to the type bool. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
336 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
337 |
// After conversion, assign the value os result to aResult |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
338 |
aResult = result; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
339 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
340 |
// if the request is complete |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
341 |
aRetType = SmfRequestComplete; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
342 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
343 |
// if request need to be sent again |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
344 |
aRetType = SmfSendRequestAgain; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
345 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
346 |
error = SmfPluginErrNone; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
347 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
348 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
349 |
else |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
350 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
351 |
error = SmfPluginErrInvalidRequest; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
352 |
aRetType = SmfRequestError; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
353 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
354 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
355 |
return error; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
356 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
357 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
358 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
359 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
360 |
* Constructor with default argument |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
361 |
* @param aParent The parent object |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
362 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
363 |
SampleProviderBase::SampleProviderBase( QObject* aParent ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
364 |
: SmfProviderBase(aParent) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
365 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
366 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
367 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
368 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
369 |
* Copy Constructor |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
370 |
* @param aOther The reference object |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
371 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
372 |
SampleProviderBase::SampleProviderBase( const SampleProviderBase &aOther ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
373 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
374 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
375 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
376 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
377 |
* Destructor |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
378 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
379 |
SampleProviderBase::~SampleProviderBase( ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
380 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
381 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
382 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
383 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
384 |
* Method to get the Localisable name of the service. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
385 |
* @return The Localisable name of the service. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
386 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
387 |
QString SampleProviderBase::serviceName( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
388 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
389 |
return m_serviceName; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
390 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
391 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
392 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
393 |
* Method to get the Logo of the service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
394 |
* @return The Logo of the service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
395 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
396 |
QImage SampleProviderBase::serviceIcon( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
397 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
398 |
return m_serviceIcon; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
399 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
400 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
401 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
402 |
* Method to get the Readable service description |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
403 |
* @return The Readable service description |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
404 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
405 |
QString SampleProviderBase::description( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
406 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
407 |
return m_description; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
408 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
409 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
410 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
411 |
* Method to get the Website of the service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
412 |
* @return The Website of the service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
413 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
414 |
QUrl SampleProviderBase::serviceUrl( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
415 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
416 |
return m_serviceUrl; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
417 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
418 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
419 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
420 |
* Method to get the URL of the Application providing this service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
421 |
* @return The URL of the Application providing this service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
422 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
423 |
QUrl SampleProviderBase::applicationUrl( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
424 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
425 |
return m_applicationUrl; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
426 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
427 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
428 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
429 |
* Method to get the Icon of the application |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
430 |
* @return The Icon of the application |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
431 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
432 |
QImage SampleProviderBase::applicationIcon( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
433 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
434 |
return m_applicationIcon; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
435 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
436 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
437 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
438 |
* Method to get the Plugin specific ID |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
439 |
* @return The Plugin specific ID |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
440 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
441 |
QString SampleProviderBase::pluginId( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
442 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
443 |
return m_pluginId; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
444 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
445 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
446 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
447 |
* Method to get the ID of the authentication application |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
448 |
* for this service |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
449 |
* @param aProgram The authentication application name |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
450 |
* @param aArguments List of arguments required for authentication app |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
451 |
* @param aMode Strting mode for authentication application |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
452 |
* @return The ID of the authentication application |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
453 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
454 |
QString SampleProviderBase::authenticationApp( QString &aProgram, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
455 |
QStringList & aArguments, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
456 |
QIODevice::OpenModeFlag aMode ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
457 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
458 |
return m_authAppId; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
459 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
460 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
461 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
462 |
* Method to get the unique registration ID provided by the |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
463 |
* Smf for authorised plugins |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
464 |
* @return The unique registration ID/token provided by the Smf for |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
465 |
* authorised plugins |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
466 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
467 |
QString SampleProviderBase::smfRegistrationId( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
468 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
469 |
return m_smfRegToken; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
470 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
471 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
472 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
473 |
* Method to get the data usage of each plugin |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
474 |
* @return The data usage structure |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
475 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
476 |
SmfPluginDataUsage SampleProviderBase::getDataUsage( ) const |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
477 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
478 |
return m_dataUsage; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
479 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
480 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
481 |
/** |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
482 |
* Method to update the data usage of this plugin. This method is called |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
483 |
* after the plugin sends request to Plugin manager and after it receives |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
484 |
* data from plugin manager. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
485 |
* @param aBytesSent The number of bytes sent, when this argument has |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
486 |
* some value other than 1, aBytesReceived should be zero. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
487 |
* @param aBytesReceived The number of bytes received, when this argument |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
488 |
* has some value other than 1, aBytesSent should be zero. |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
489 |
* @return Returns true if success else returns false |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
490 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
491 |
bool SampleProviderBase::updateDataUsage( const uint &aBytesSent, |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
492 |
const uint &aBytesReceived ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
493 |
{ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
494 |
bool ret = true; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
495 |
if( aBytesSent && !aBytesReceived ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
496 |
m_dataUsage.iBytesSent += aBytesSent; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
497 |
else if( !aBytesSent && aBytesReceived ) |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
498 |
m_dataUsage.iBytesReceived += aBytesReceived; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
499 |
else |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
500 |
// don't update m_dataUsage, error in arguments |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
501 |
ret = false; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
502 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
503 |
return ret; |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
504 |
} |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
505 |
|
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
506 |
/* |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
507 |
* Export Macro |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
508 |
* plugin name : sampleplugin |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
509 |
* plugin class : SamplePlugin |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
510 |
*/ |
c39a6cfd1fb9
Updating the source code for plugin manager, transport manager, smfserver and smfclient. sample plugins and tests are included
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
511 |
//Q_EXPORT_PLUGIN2( sampleplugin, SamplePlugin ) |