smf/smfservermodule/smfclient/common/smfprovider.h
changeset 14 a469c0e6e7fb
parent 10 77a56c951f86
--- a/smf/smfservermodule/smfclient/common/smfprovider.h	Mon Jun 07 11:43:45 2010 +0100
+++ b/smf/smfservermodule/smfclient/common/smfprovider.h	Wed Jun 23 19:51:49 2010 +0530
@@ -13,7 +13,7 @@
  * Manasij Roy, Nalina Hariharan
  * 
  * Description:
- * The SmfEvent class represents an event
+ * Interface for a base service provider
  *
  */
 
@@ -27,7 +27,6 @@
 #include <QMetaType>
 
 #include "smfclientglobal.h"
-
 /**
  * @ingroup smf_client_group 
  * Interface for a base service provider. Other service provider classes contains 
@@ -36,96 +35,109 @@
  * All of the functionality described here should be implemented by a service
  * specific plug-in object.
  */
-//TODO:- put SMFCLIENT_EXPORT
-//TODO:- QList<SmfProvider> gives error if its derived from QObject
-class SMFCLIENT_EXPORT SmfProvider //: public QObject
+class SMFCLIENT_EXPORT SmfProvider
 {
-  //Q_OBJECT
 
 public:
-  /**
-   *  Seeing as this is a plug-in implementation, these will realistically be generated by SMF factory of some kind
-   */
-   
-  SmfProvider(QObject* parent = 0);
-  ~SmfProvider();
+	
+	/**
+	 * Constructor
+	 */
+	SmfProvider();
+	/**
+	 * Destructor
+	 */
+	~SmfProvider();
 
 public:
   /**
    * Localizable name of the service 
-   * @return service name
+   * @return service name
    */
   QString serviceName() const; 
   
   /**
    * Logo of the service
-   * @return logo image of the service
+   * @return logo image of the service
    */
   QImage serviceIcon() const; 
   
   /**
    * Readable service description
-   * @return service description
+   * @return service description
    */
   QString description() const; 
   
   /*
-   * Website of the service
+   * Website of the service
    */
   QUrl serviceUrl() const;
   
   /**
-   * URL of the application providing this service
+   * URL of the application providing this service
    */
   QUrl applicationUrl() const; //
   
   /**
-   * service types - list of interfaces that this provider support
+   * List of interfaces that this provider support
    */
-  QList<QString> serviceTypes() const;
+  QList<QString> supportedInterfaces() const;
   
-  /////////////////////////////////////////set APIs
   /**
-   * Localizable name of the service 
+   * List of languages supported by this service provider
+   * @return a QStringList of languages supported by this service 
+   * provider in 2 letter ISO 639-1 format.
+   */
+  QStringList supportedLanguages() const;
+  
+  /**
+   * Sets Localizable name of the service 
    * 
    */
-  void serviceName(QString& name); 
+  void setServiceName(QString& name); 
   
   /**
-   * Logo of the service
+   * Sets Logo of the service
    * 
    */
-  void serviceIcon(QImage& image) ; 
+  void setServiceIcon(QImage& image) ; 
   
   /**
-   * Readable service description
+   * Sets Readable service description
    * 
    */
-  void description(QString& desc) ; 
+  void setDescription(QString& desc) ; 
   
   /*
-   * Website of the service
+   * Sets Website of the service
    */
-  void serviceUrl(QUrl& url) ;
+  void setServiceUrl(QUrl& url) ;
   
   /**
-   * URL of the application providing this service
+   * Sets URL of the application providing this service
    */
-  void applicationUrl(QUrl& url) ; 
+  void setApplicationUrl(QUrl& url) ; 
   
   /**
-   * service types - list of interfaces that this provider support
+   * Sets list of interfaces that this provider supports
    */
- void serviceTypes( QStringList& types);
- //TODO:- making data mems public just for testing, later provide set apis
-//private:
-public:
+ void setSupportedInterfaces( QStringList& types);
+ 
+ /**
+  * Sets the list of languages supported by this service provider
+  * @param lang A QStringList of languages supported by this service 
+  * provider in 2 letter ISO 639-1 format.
+  */
+ void setSupportedLanguages( QStringList& lang );
+ 
+private:
   QString m_serviceName;
   QImage m_serviceIcon;
   QString m_description;
   QUrl m_serviceUrl;
   QUrl m_appUrl;
   QStringList m_serviceTypes;
+  QStringList m_supportedLanguages;
   friend QDataStream &operator<<(QDataStream &, const SmfProvider&);
   friend QDataStream &operator>>(QDataStream &, SmfProvider&);
 };