smf/inc/smfclient/smfpostprovider.h
author cgandhi <chandradeep.gandhi@sasken.com>
Thu, 15 Apr 2010 15:35:36 +0530
changeset 3 0446eb7b28aa
permissions -rw-r--r--
Updating the sample plugin and other related changes for clients and plugins
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     3
 * All rights reserved.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0" 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     8
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     9
 * Initial Contributors:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    11
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    12
 * Contributors:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    14
 * 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    15
 * Description:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    16
 * The SmfEvent class represents an event
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    17
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    18
 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    19
#ifndef SMFPOSTPROVIDER_H
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
#define SMFPOSTPROVIDER_H
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
#include <QObject>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    23
#include <qmobilityglobal.h>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    24
#include <qgeopositioninfo.h>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    25
#include <QTextDocument>
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    26
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
#include "smfglobal.h"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
#include "smfprovider.h"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
#include "smfcontact.h"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
#include "smfplace.h"
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    31
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
class SmfProvider; //base-class for service provider
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
class SmfContact; //class for Contact in a social network
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    34
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    35
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    38
 * class for information (text, image and url) contained in post in social network
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    39
 * This could be changed to contain html data
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    40
 * 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    41
 * For those service provider which supports only string format, @see supportedFormats()
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    42
 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    43
class  SmfPost : public QTextDocument
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    44
	{
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    45
	Q_OBJECT
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    47
public:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    48
	SmfPost ( QObject * parent = 0 );
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    49
	SmfPost ( const QString & text, QObject * parent = 0 );
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
private:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
	QString*	id;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
	SmfProvider* provider;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
	};
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    56
/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    57
 *  Presence info of the user
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    58
 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    59
enum SmfAppearenceInfo
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    60
	{
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
	ENotSupported,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
	EOnline,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    63
	EOffline,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    64
	EBusy,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    65
	EDoNotDisturb,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    66
	EAppearOffline,
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    67
	EOther
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    68
	};
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    69
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    70
//Post lists
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    71
typedef QList<SmfPost> SmfPostList;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    72
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    73
/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    74
 * @ingroup smf_client_group 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    75
 * Interface to post scrap/tweet like info.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    76
 * Note that branding information for the particular service implementation
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    77
 * is available from getProvider() API. See also:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    78
 * SmfProvider::serviceName(), SmfProvider::serviceIcon(), SmfProvider::description()
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    79
 *
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    80
 * Interface name for SmfPostProvider is org.symbian.smf.client.contact.posts
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    81
 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    82
class SMFCLIENT_EXPORT SmfPostProvider : public QObject
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    83
	{
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    84
	Q_OBJECT
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    85
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    86
public:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    87
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    88
	 * Constructs SmfPostProvider.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    89
	 * @param baseProvider The base provider info
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    90
	 * Seeing as this is a plug-in implementation, these will realistically
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    91
	 * be generated by SMF factory of some kind
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    92
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    93
	SmfPostProvider(SmfProvider* baseProvider);
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    94
	~SmfPostProvider();
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    95
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    96
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    97
public:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    98
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    99
	 * returns maximum no of chars (unicode) that service provider can post without truncation
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   100
	 * negative value means no limit
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   101
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   102
	qint32 maxCharsInPost() const;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   103
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   104
	 * returns maximum no of items that can be returned in a single query to getPosts
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   105
	 * negative value means feature not supported.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   106
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   107
	qint32 maxItems() const;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   108
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   109
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   110
	 * returns all the formatting of posts that this service provider supports.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   111
	 * May return 0 items to mean only QString is supported.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   112
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   113
	QVector<QTextFormat> supportedFormats () const;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   114
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   115
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   116
	 * returns whether this SP supports Appearence @see SmfAppearenceInfo
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   117
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   118
	bool supportsAppearence () const;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   119
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   120
public slots:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   121
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   122
	 * Gets the posts asynchronously. The signal postsAvailable()with SmfPostList is emitted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   123
	 * once the post lists are available
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   124
	 * @param user user's contact in this SP, omit for self contact
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   125
	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   126
     * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   127
	 * @see postsAvailable()
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   128
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   129
	void posts(SmfContact* user = 0,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   130
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   131
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   132
	 * Updates a post to own area, the success of the post can be checked with signal
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   133
	 * updatePostFinished() signal
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   134
	 * @param postData data to be posted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   135
	 * @param location location data
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   136
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   137
	void post(SmfPost& postData,SmfPlace& location) ; 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   138
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   139
	 * Updates the last post to own area with new data, the success of the post can be checked with signal
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   140
	 * updatePostFinished() signal
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   141
	 * @param postData edited/new data to be posted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   142
	 * @param location location data
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   143
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   144
	void updatePost(SmfPost& postData); 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   145
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   146
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   147
	 * Updates a post to a particular Smf contact. the success of the post can be checked with signal
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   148
	 * updatePostFinished() signal.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   149
	 * @param postData data to be posted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   150
	 * @param contact contact to which the post is to be directed
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   151
	 * @param location location data
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   152
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   153
	void postDirected(SmfPost& postData,SmfContact& contact,SmfPlace* location=0);
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   154
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   155
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   156
	 * Posts appearance info of the user.e.g. appear offline, busy, do-not-disturb
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   157
	 * @param appearence user appearance
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   158
	 * @see SmfPresenceInfo
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   159
	 * @return False on Failure/Not supported 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   160
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   161
	bool postAppearence(SmfAppearenceInfo appearence); 
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   162
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   163
	 * Share /a contact's post to user's friends and followers (e.g. retweet in twitter, share on facebook)
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   164
	 * emits updatePostFinished() signal when done.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   165
	 * @param postData data to be posted
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   166
	 * @param contact contact to which the post belonged
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   167
	 * @param bool whether user changed items within the post
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   168
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   169
	void sharePost(SmfPost& postData,SmfContact& contact,bool edited);
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   170
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   171
	//APIs to get/set base provider info (SmfProvider)
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   172
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   173
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   174
	 * Gets the base provider info
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   175
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   176
	SmfProvider* getProvider() const;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   177
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   178
signals:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   179
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   180
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   181
	 * Emitted when a request to  getPosts() is finished
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   182
	 * Note if number of posts is large, then it can download the list page by page
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   183
	 * In that case this signal is emitted multiple times.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   184
	 * @param list list of posts
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   185
	 * @param error error string
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   186
	 * @param resultPage Page number info
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   187
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   188
	void postsAvailable(SmfPostList* list, QString error, SmfResultPage resultPage);
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   189
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   190
	/**
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   191
	 * Emitted when update post is finished.
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   192
	 * @param success the success of the update
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   193
	 */
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   194
	void postFinished(bool success);
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   195
	
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   196
	private:
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   197
	SmfProvider* m_baseProvider;
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   198
	};
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   199
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   200
SMF_SERVICE_NAME(SmfPostProvider, "org.symbian.smf.client.contact.posts\0.2")
0446eb7b28aa Updating the sample plugin and other related changes for clients and plugins
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   201
#endif // SMFPOSTPROVIDER_H