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