example/clientapi/smf/inc/smfclient/smfpostprovider.h
author cgandhi <chandradeep.gandhi@sasken.com>
Thu, 25 Mar 2010 14:44:08 +0530
changeset 1 4b1e636e8a71
child 2 86af6c333601
permissions -rw-r--r--
Updating the interfaces for SMFClient and SMFPlugins
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/*
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Sasken Communication Technologies Ltd.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     3
* All rights reserved.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     5
* under the terms of the "{License}"
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     6
* which accompanies  this distribution, and is available
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     7
* at the URL "{LicenseUrl}".
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     8
*
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     9
* Initial Contributors:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    10
* Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    11
*
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    12
* Contributors:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    13
*
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    14
* Description:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    15
* Interface spefication for posting updates to a social site
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    16
*
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    17
*/
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    18
#ifndef SMFPOSTPROVIDER_H
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    19
#define SMFPOSTPROVIDER_H
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
#include <QObject>
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
#include <qmobilityglobal.h>
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    23
#include <qgeopositioninfo.h>
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    24
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    25
#include "smfprovider.h"
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    26
#include "smfcontact.h"
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
class SmfProvider; //base-class for service provider
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
class SmfContact; //class for Contact in a social network
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    31
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
/**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    34
 * Location info
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    35
 */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
typedef QtMobility::QGeoPositionInfo SmfLocationInfo ;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
class SmfPost; //class for information (text, image and url) contained in post in social network
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    38
class SmfContactModel;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    39
class SmfStatusData;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    40
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    41
//Post lists
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    42
typedef QList<SmfPost> SmfPostList;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    43
/**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    44
 * Interface to post scrap/tweet like info.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    45
 * Note that branding information for the particular service implementation
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
 * is available from getProvider() API. See also:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    47
 * SmfProvider::serviceName(), SmfProvider::serviceIcon(), SmfProvider::description()
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    48
 *
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    49
 * All of the functionality described here should be implemented by a service
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
 * specific plug-in object.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
 * Interface name for SmfPostProvider is org.symbian.smf.client.contact.posts
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
 */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
class SMFCLIENT_EXPORT SmfPostProvider : public QObject
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
{
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
  Q_OBJECT
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    56
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    57
public:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    58
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    59
   * Constructs SmfPostProvider.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    60
   * @param baseProvider The base provider info
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
   * Seeing as this is a plug-in implementation, these will realistically
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
   * be generated by SMF factory of some kind
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    63
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    64
  SmfPostProvider(SmfProvider* baseProvider = 0);
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    65
  ~SmfPostProvider();
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    66
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    67
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    68
   *  Presence info of the user
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    69
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    70
enum SmfPresenceInfo
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    71
	{
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    72
	  ENotSupported,
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    73
	  EOnline,
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    74
	  EOffline,
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    75
	  EBusy,
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    76
	  EDoNotDisturb,
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    77
	  EAppearOffline,
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    78
	  EOther
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    79
	};
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    80
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    81
public:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    82
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    83
   * Gets the posts asynchronously. The signal postsAvailable()with SmfPostList is emitted
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    84
   * once the post lists are available
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    85
   * @see postsAvailable()
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    86
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    87
  virtual void getPosts(SmfStatusData statusData) = 0; 
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    88
  
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    89
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    90
   * Gets the model
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    91
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    92
  virtual SmfContactModel   model() = 0; 
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    93
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    94
public slots:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    95
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    96
	/**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    97
	 * Updates a post, the success of the post can be checked with signal
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    98
	 * updatePostFinished() signal
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    99
	 * @param postData data to be posted
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   100
	 * @param location location data
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   101
	 */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   102
  virtual void updatePost(SmfPost& postData,SmfLocationInfo& location) = 0; // list of contact objects
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   103
	/**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   104
	 * Updates a post, the success of the post can be checked with signal
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   105
	 * updatePostFinished() signal
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   106
	 * @param postData data to be posted
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   107
	 * @param location location data
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   108
	 */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   109
  virtual void updatePost(SmfPost& postData) = 0; // list of contact objects
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   110
  
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   111
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   112
   * Updates a post to a particular Smf contact. the success of the post can be checked with signal
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   113
   * updatePostFinished() signal.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   114
   * @param postData data to be posted
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   115
   * @param contact contact to which the post is to be directed
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   116
   * @param location location data
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   117
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   118
  virtual void updatePostDirected(SmfPost& postData,SmfContact& contact,SmfLocationInfo location) = 0; // list of contact objects
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   119
  
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   120
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   121
   * Posts appearance info of the user.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   122
   * @param appearence user appearance
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   123
   * @see SmfPresenceInfo
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   124
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   125
  virtual QList<SmfContact> postAppearence(SmfPresenceInfo appearence) = 0; // appear offline, busy, do-not-disturb
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   126
  
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   127
  //APIs to get/set base provider info (SmfProvider)
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   128
  
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   129
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   130
   * Gets the base provider info
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   131
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   132
  virtual SmfProvider* getProvider() = 0;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   133
  
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   134
  /**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   135
   * Sets the base provider info
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   136
   */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   137
  virtual void setProvider(SmfProvider* provider) = 0;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   138
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   139
  Q_SIGNALS:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   140
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   141
	/**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   142
	 * Emitted when a request to  getPosts() is finished
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   143
	 * Note if number of posts is large, then it can download the list page by page
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   144
	 * In that case this signal is emitted multiple times.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   145
	 * @param list list of posts
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   146
	 * @param error error string
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   147
	 * @param pageNumber Page number
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   148
	 */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   149
	void postsAvailable(SmfPostList* list, QString error, int pageNumber=0);
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   150
	
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   151
	/**
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   152
	 * Emitted when update post is finished.
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   153
	 * @param success the success of the update
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   154
	 */
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   155
	void updatePostFinished(bool success);
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   156
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   157
private:
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   158
  SmfProvider* m_baseProvider;
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   159
};
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   160
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   161
SMF_GETSERVICES(SmfPostProvider, "org.symbian.smf.client.contact.posts\0.2")
4b1e636e8a71 Updating the interfaces for SMFClient and SMFPlugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   162
#endif // SMFPOSTPROVIDER_H