smf/smfservermodule/smfserver/server/smfserver.h
author cgandhi
Thu, 05 Aug 2010 16:48:48 +0530
changeset 18 013a02bf2bb0
parent 14 a469c0e6e7fb
child 25 a180113055cb
permissions -rw-r--r--
pushing changes for common libs and trace messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/**
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     3
 * All rights reserved.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     4
 * This component and the accompanying materials are made available
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     6
 * which accompanies  this distribution, and is available
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     8
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
     9
 * Initial Contributors:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    11
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    12
 * Contributors:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    14
 * 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    15
 * Description:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    16
 * SMF Server component which handles the client requests and delegates 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    17
 * them propoerly to the appropriate component
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    18
 * 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    19
 */
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
#ifndef SMFSERVER_H
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
#define SMFSERVER_H
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    23
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    24
#include <QObject>
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    25
#include <QMap>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    26
#include <smfglobal.h>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    27
#include <smfcredmgrclientglobal.h>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    28
#ifdef CLIENT_SERVER_TEST
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    29
	#include <QTimer>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    30
	#include <QTextStream>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    31
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    32
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    33
#include "smfserverglobal.h"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    34
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    35
// Forward declarations(Other components of the SMF)
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
class SmfTransportManager;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
class SmfPluginManager;
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
    38
class SmfCredMgrClient;
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    39
class SmfProvider;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    40
//Private implementation for different platforms
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    41
#ifdef Q_OS_SYMBIAN
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    42
	class SmfServerSymbian;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    43
	class SmfServerSymbianSession;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    44
#else
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    45
	class SmfServerQt;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    46
	class SmfServerQtSession;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    47
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    48
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    49
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
//For the time being, need to change later
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
typedef QString SmfInterfaceID;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
//For the time being, need to change later
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
typedef QString SmfPluginID;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
//TODO:- define proper enums after consulting with CM owner
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
typedef int NotificationType;
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    56
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    57
	
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    58
/**
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    59
 * SmfServer manages the client requests and delegates them to the appropriate SMF component,
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    60
 * service the clients synchronously or asynchronously
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
 */
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
class SmfServer : public QObject
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    63
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    64
	Q_OBJECT
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    65
	
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    66
public:
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    67
	SmfServer(QObject* parent = 0);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    68
	~SmfServer();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    69
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    70
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    71
	 * Does the following,-
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    72
	 * First it'll check whether server is already running, if already 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    73
	 * running it'll simply return
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    74
	 * else it'll start the server exe and initialize all other SMF 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    75
	 * components returns whether server is started successfully or not
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    76
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    77
	bool startServer();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    78
	
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    79
public:
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    80
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    81
	 * Requests Plugin Manager to get a list of plugin IDs who implement
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    82
	 * the interface interfaceID.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    83
	 * This is used for SmfClient::GetServices () where we need a list of plugins
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    84
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    85
	void getPlugins ( const SmfInterfaceID& interfaceID, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    86
			QMap<SmfPluginID,SmfProvider>& pluginIDMap);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    87
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    88
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    89
	 * Same as above, except this is used for rest of the requests where we need
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    90
	 * a particular plugin
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    91
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    92
	SmfPluginID getPlugin ( const SmfInterfaceID& interfaceID, SmfProvider provider);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    93
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    94
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    95
	 * Requests the Credential Manager to filter out non-authorized plugin IDs
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    96
	 * from the list and get authorized plugins into authList.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    97
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    98
	void getAuthorizedPlugins ( QList<SmfPluginID>& list, QList<SmfPluginID>& authList );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
    99
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   100
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   101
	 * Request CM API to get the list of authenticated plugins
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   102
	 * @see SmfCredMgrClient::authenticatedPluginList()
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   103
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   104
	QStringList getAuthenticatedPluginList ( QString RegistrationToken );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   105
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   106
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   107
	 * Request the Plugin manager to get the data.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   108
	 * @param requestID Corresponds to a client's session
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   109
	 * @param pluginID Plugin for which the request is intended
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   110
	 * @param interfaceID Interface name
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   111
	 * @param dataForPlugin Data to be sent for this request
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   112
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   113
	void sendToPluginManager ( int requestID, SmfPluginID pluginID, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   114
			SmfInterfaceID interfaceID, SmfRequestTypeID requestTypeID,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   115
			QByteArray dataForPlugin = QByteArray() );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   116
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   117
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   118
	 * Request the Plugin manager to get the data.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   119
	 * @param requestID Corresponds to a client's session
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   120
	 * @param pluginID Plugin for which the request is intended
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   121
	 * @param interfaceID Interface name
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   122
	 * @param dataForPlugin Data to be sent for this request
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   123
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   124
	SmfError sendToPluginManager ( SmfPluginID pluginID, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   125
			SmfInterfaceID interfaceID, SmfRequestTypeID requestTypeID,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   126
			QByteArray dataForPlugin, QByteArray &outputData);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   127
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   128
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   129
	 * Delegates the request to DSM and receives data synshronously.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   130
	 * @param qtdataForDSM Data to be passed to DSM
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   131
	 * @param opcode Opcode
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   132
	 * @param qtdataFromDSM Data received from DSM
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   133
	 * @return Error value returned from DSM
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   134
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   135
	SmfError sendToDSM ( QByteArray qtdataForDSM, SmfRequestTypeID opcode,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   136
			QByteArray& qtdataFromDSM );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   137
	
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   138
public slots:
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   139
	/**
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   140
	 * This slot is called when Credential Manager is done with the autherizing
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   141
	 * the client for the first time. See isClientAuthorized() and authorizeClient().
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   142
	 * success specifies the success of the authorization, authID is the authentication
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   143
	 * ID in case its not same as SID of the client.
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   144
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   145
	void clientAuthorizationFinished ( bool success, SmfClientAuthID authID );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   146
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   147
	/**
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   148
	 * This slot is called as a result of trigger from Plugin manager when the 
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   149
	 * parsed data is available.
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   150
	 * @param requestID The request ID for which result is available
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   151
	 * @param parsedData Serialized data
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   152
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   153
	void resultsAvailable ( int requestID, QByteArray* parsedData, SmfError error );
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   154
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   155
#ifdef CLIENT_SERVER_TEST
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   156
	/**
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   157
	 * Services the client request by sending the requested data.
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   158
	 * Note:- This will be handled by private implementation.
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   159
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   160
/*	void serviceClient ( QByteArray* parsedData );*/
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   161
		
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   162
	/**
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   163
	 * This slot is called for every cleanup timer expiry, in this slot, we need
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   164
	 * to call SmfDataStoreManager's API to refresh data store
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   165
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   166
	void timerExpired ( ) {}
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   167
	
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   168
	/**
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   169
	 * This method is called every time timerExpired slot is trigerred
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   170
	 * Fetches the last saved requests through Transport Manager and Plugin Manager
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   171
	 * Who will save the last request (Tranport Manager or Data Store Manager) TBD later
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   172
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   173
	void runSavedRequest ( ) {}
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   174
#endif
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   175
	/**
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   176
	 * This slot is called when the data store updates are available as a result of
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   177
	 * "runSavedRequest()".
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   178
	 * Note:- The "10.4.1.11	updateDatastore" can be merged with this 
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   179
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   180
	void dataStoreUpdateAvailable ( QByteArray* respData ){ Q_UNUSED(respData) }
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   181
	
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   182
	/**
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   183
	 * Server calls this method when it receives message from the CM
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   184
	 * that authentication keys for the pluginID has expired
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   185
	 */
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   186
	void authenticationKeysExpired ( NotificationType type, SmfPluginID id );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   187
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   188
private:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   189
	SmfTransportInitializeResult prepareTransport();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   190
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   191
private:
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   192
	//private impl
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   193
#ifdef Q_OS_SYMBIAN
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   194
	SmfServerSymbian* m_SmfServerPrivate;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   195
#else
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   196
	SmfServerQt* m_SmfServerPrivate;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   197
#endif
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   198
	//Handles of other SMF components
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   199
	SmfTransportManager* m_transportManager;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   200
	SmfPluginManager* m_pluginManager;
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   201
	SmfCredMgrClient* m_credentialMngr;
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   202
	};
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents: 14
diff changeset
   203
14
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   204
#ifdef CLIENT_SERVER_TEST
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   205
class dummyPM : public QObject
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   206
	{
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   207
		Q_OBJECT
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   208
public:
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   209
		dummyPM(SmfServer* server,QObject* parent=0);
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   210
		~dummyPM();
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   211
		SmfError createRequest ( const quint32& aSessionID, 
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   212
				const QString& aPluginID, 
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   213
				const SmfRequestTypeID& aOperation, 
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   214
				QByteArray& aInputData );
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   215
public slots:
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   216
	void responseAvailable();
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   217
private:
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   218
		QTimer* m_timer;
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   219
		SmfServer* m_server;
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   220
	};
a469c0e6e7fb changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.
cgandhi <chandradeep.gandhi@sasken.com>
parents: 13
diff changeset
   221
#endif
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   222
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   223
#endif // SMFSERVER_H