smf/smfservermodule/smfclient/client/smfactivityfetcher.h
changeset 10 1d94eb8df9c2
parent 9 b85b0c039c14
equal deleted inserted replaced
9:b85b0c039c14 10:1d94eb8df9c2
     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 "Eclipse Public License v1.0"
       
     6  * which accompanies  this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Description:
       
    13  * Represents activity in terms similar to standard activity stream http://activitystrea.ms/
       
    14  */
       
    15 
       
    16 #ifndef SMFACTIVITYFETCHER_H_
       
    17 #define SMFACTIVITYFETCHER_H_
       
    18 
       
    19 #include <QObject>
       
    20 #include <QList>
       
    21 #include <qmobilityglobal.h>
       
    22 
       
    23 #include "smfglobal.h"
       
    24 #include "smfprovider.h"
       
    25 #include "smfcontact.h"
       
    26 #include "smfevent.h"
       
    27 #include "smfactions.h"
       
    28 
       
    29 typedef QList<SmfActivityEntry> SmfActivityEntryList;
       
    30 
       
    31 /**
       
    32  * @ingroup smf_client_group
       
    33  * Basic activity service ("org.symbian.smf.client.activity.fetcher")
       
    34  */
       
    35 class SMFCLIENT_EXPORT SmfActivityFetcher : public QObject
       
    36 	{
       
    37 	Q_OBJECT
       
    38 
       
    39 public:
       
    40 
       
    41 	/**
       
    42 	 * Constructs SmfActivity.
       
    43 	 * @param baseProvider The base provider info
       
    44 	 */
       
    45 	SmfActivityFetcher(SmfProvider* baseprovider = 0);
       
    46 
       
    47 	~SmfActivityFetcher();
       
    48 
       
    49 public slots:
       
    50 	/**
       
    51 	 * Emits signal resultsAvailable() when list of activities for the user is available 
       
    52 	 */
       
    53 	void selfActivities(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
       
    54 
       
    55 	/**
       
    56 	 * Emits signal resultsAvailable() when list of activities for other contact  is available 
       
    57 	 */
       
    58 	void friendsActivities(const SmfContact& aFriend,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
       
    59 	
       
    60 	/**
       
    61 	 * returns only those activities (self) which are from @arg filters
       
    62 	 */
       
    63 	void filtered(QList<SmfActivityObjectType> filters,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
       
    64 
       
    65 	  /**
       
    66 	   * Gets the base provider info
       
    67 	   */
       
    68 	  SmfProvider* getProvider()  ;
       
    69 	
       
    70 signals:
       
    71 
       
    72 	/**
       
    73 	 * Signals availability of the result of the previous query
       
    74 	 */
       
    75 	void resultsAvailable(SmfActivityEntryList* entries, QString error, SmfResultPage resultPage);
       
    76 
       
    77 	};
       
    78 
       
    79 SMF_SERVICE_NAME(SmfGallery, "org.symbian.smf.client.activity.fetcher\0.2")
       
    80 
       
    81 #endif /* SMFACTIVITYFETCHER_H_ */