example/clientapi/smf/inc/smfclient/smfprovider.h
changeset 1 4b1e636e8a71
child 2 86af6c333601
equal deleted inserted replaced
0:5d2360e70d9f 1:4b1e636e8a71
       
     1 /**
       
     2 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "{License}"
       
     6 * which accompanies  this distribution, and is available
       
     7 * at the URL "{LicenseUrl}".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Interface spefication for sfm service provider
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef SMFPROVIDER_H
       
    20 #define SMFPROVIDER_H
       
    21 
       
    22 #include <QObject>
       
    23 #include <QImage>
       
    24 #include <QUrl>
       
    25 
       
    26 #include "../common/SmfClientGlobal.h"
       
    27 /**
       
    28  * Interface for a base service provider. Other service provider classes contains 
       
    29  * implementation of this base class so that each has access to service provider 
       
    30  * information.
       
    31  * All of the functionality described here should be implemented by a service
       
    32  * specific plug-in object.
       
    33  */
       
    34 class SMFCLIENT_EXPORT SmfProvider : public QObject
       
    35 {
       
    36   Q_OBJECT
       
    37 
       
    38 public:
       
    39   /**
       
    40    *  Seeing as this is a plug-in implementation, these will realistically be generated by SMF factory of some kind
       
    41    */
       
    42    
       
    43   SmfProvider(QObject* parent = 0);
       
    44   ~SmfProvider();
       
    45 
       
    46 public:
       
    47   /**
       
    48    * Localizable name of the service 
       
    49    * @return service name
       
    50    */
       
    51   virtual QString serviceName() = 0; 
       
    52   
       
    53   /**
       
    54    * Logo of the service
       
    55    * @return logo image of the service
       
    56    */
       
    57   virtual QImage serviceIcon() = 0; // 
       
    58   
       
    59   /**
       
    60    * Readable service description
       
    61    * @return service description
       
    62    */
       
    63   virtual QString description() = 0; // readable service description
       
    64   
       
    65   /*
       
    66    * Website of the service
       
    67    */
       
    68   virtual QUrl serviceUrl() = 0; //
       
    69   
       
    70   /**
       
    71    * URL of the application providing this service
       
    72    */
       
    73   virtual QUrl applicationUrl() = 0; //
       
    74   
       
    75 };
       
    76 /**
       
    77 * Externalization
       
    78 */
       
    79 QDataStream &operator<<(QDataStream &, const SmfProvider&);
       
    80 /**
       
    81  * Internalization
       
    82  */
       
    83 QDataStream &operator>>(QDataStream &, SmfProvider&);
       
    84 SMF_GETSERVICES(SmfProvider, "org.symbian.smf.client.provider\0.2")
       
    85 #endif // SMFPROVIDER_H