example/fbpostproviderplugin/fbpostproviderplugin.h
changeset 17 106a4bfcb866
parent 14 a469c0e6e7fb
child 26 83d6a149c755
equal deleted inserted replaced
16:b78fa4cdbf2b 17:106a4bfcb866
    19 
    19 
    20 #ifndef _FBPOSTPROVIDERPLUGIN_H
    20 #ifndef _FBPOSTPROVIDERPLUGIN_H
    21 #define _FBPOSTPROVIDERPLUGIN_H
    21 #define _FBPOSTPROVIDERPLUGIN_H
    22 
    22 
    23 // Include files
    23 // Include files
       
    24 #include <QDateTime>
    24 #include <smfpostproviderplugin.h>
    25 #include <smfpostproviderplugin.h>
    25 #include <smfpluginutil.h>
       
    26 
    26 
    27 // Forward declarations
    27 // Forward declarations
    28 class FBProviderBase;
    28 class FBProviderBase;
    29 class QVariant;
    29 class QVariant;
    30 class QNetworkReply;
       
    31 
    30 
    32 
    31 
    33 /**
    32 /**
    34  * The Plugin that manages post operations on the logged in user's 
    33  * The Plugin that manages post operations on the logged in user's 
    35  * facebook account
    34  * facebook account
   177 	
   176 	
   178 public: // From SmfPluginBase interface
   177 public: // From SmfPluginBase interface
   179 	/**
   178 	/**
   180 	 * The first method to be called in the plugin that implements this interface.
   179 	 * The first method to be called in the plugin that implements this interface.
   181 	 * If this method is not called, plugin may not behave as expected.
   180 	 * If this method is not called, plugin may not behave as expected.
   182 	 * Plugins are expected to save the aUtil handle and use and when required.
   181 	 */
   183 	 * @param aUtil The instance of SmfPluginUtil
   182 	void initialize( );
   184 	 */
       
   185 	void initialize( SmfPluginUtil *aUtil );
       
   186 	
   183 	
   187 	/**
   184 	/**
   188 	 * Method to get the provider information
   185 	 * Method to get the provider information
   189 	 * @return Instance of SmfProviderBase
   186 	 * @return Instance of SmfProviderBase
   190 	 */
   187 	 */
   231 	SmfPluginError getFacebookUserId( SmfPluginRequestData &aRequest );
   228 	SmfPluginError getFacebookUserId( SmfPluginRequestData &aRequest );
   232 
   229 
   233 	/**
   230 	/**
   234 	 * Method to get the user's posts
   231 	 * Method to get the user's posts
   235 	 * @param aRequest [out] The request data to be sent to network
   232 	 * @param aRequest [out] The request data to be sent to network
       
   233 	 * @param aUser The user's contact in this SP, omit for self contact
   236 	 * @param aPageNum The page to be extracted
   234 	 * @param aPageNum The page to be extracted
   237 	 * @param aItemsPerPage Number of items per page
   235 	 * @param aItemsPerPage Number of items per page
   238 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   236 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   239 	 */
   237 	 */
   240 	SmfPluginError getPosts( SmfPluginRequestData &aRequest,
   238 	SmfPluginError getPosts( SmfPluginRequestData &aRequest,
       
   239 			const SmfContact *aUser,
   241 			const int aPageNum , 
   240 			const int aPageNum , 
   242 			const int aItemsPerPage );
   241 			const int aItemsPerPage );
   243 	
   242 	
       
   243 	/**
       
   244 	 * Method to interpret the key sets obtained from credential manager 
       
   245 	 * @param aApiKey [out] The api key
       
   246 	 * @param aApiSecret [out] The api secret
       
   247 	 * @param aSessionKey [out] The session key
       
   248 	 * @param aSessionSecret [out] The session secret
       
   249 	 */
       
   250 	void fetchKeys(	QString &aApiKey, 
       
   251 			QString &aApiSecret, 
       
   252 			QString &aSessionKey, 
       
   253 			QString &aSessionSecret );
       
   254 	
   244 private:
   255 private:
   245 	FBProviderBase *m_provider;
   256 	FBProviderBase *m_provider;
   246 	SmfPluginUtil *m_util;
       
   247 };
   257 };
   248 
   258 
   249 
   259 
   250 /**
   260 /**
   251  * The Plugin class that implements SmfProviderBase for this facebook plugin
   261  * The Plugin class that implements SmfProviderBase for this facebook plugin
   353 	QString m_pluginId;
   363 	QString m_pluginId;
   354 	QString m_authAppId;
   364 	QString m_authAppId;
   355 	QString m_smfRegToken;
   365 	QString m_smfRegToken;
   356 	QList<QString> m_supportedInterfaces;
   366 	QList<QString> m_supportedInterfaces;
   357 	QStringList m_supportedLangs;
   367 	QStringList m_supportedLangs;
       
   368 	QDateTime m_validity;
   358 	};
   369 	};
   359 
   370 
   360 #endif /*_FBPOSTPROVIDERPLUGIN_H*/
   371 #endif /*_FBPOSTPROVIDERPLUGIN_H*/