2008-05-09 15:13:13 -04:00
|
|
|
#ifndef RSQBLOG_H_
|
|
|
|
#define RSQBLOG_H_
|
|
|
|
|
|
|
|
/*
|
|
|
|
* libretroshare/src/rsiface: rsQblog.h
|
|
|
|
*
|
|
|
|
* RetroShare C++ Interface.
|
|
|
|
*
|
2008-06-05 20:04:45 -04:00
|
|
|
* Copyright 2007-2008 by Chris Evi-Parker, Robert Fernie.
|
2008-05-09 15:13:13 -04:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
#include <list>
|
|
|
|
#include <map>
|
2008-06-09 09:23:53 -04:00
|
|
|
|
|
|
|
#include "rsiface/rstypes.h"
|
2008-05-09 15:13:13 -04:00
|
|
|
|
|
|
|
|
2008-06-05 20:04:45 -04:00
|
|
|
/* delcare interafce for everyone o use */
|
2008-05-09 15:13:13 -04:00
|
|
|
class RsQblog;
|
|
|
|
extern RsQblog *rsQblog;
|
|
|
|
|
|
|
|
/*! allows gui to interface with the rsQblogs service */
|
|
|
|
class RsQblog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
2008-06-05 20:04:45 -04:00
|
|
|
RsQblog() { return; }
|
|
|
|
virtual ~RsQblog() { return; }
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* choose whether to filter or not
|
|
|
|
* @param filterSwitch
|
|
|
|
*/
|
|
|
|
virtual bool setFilterSwitch(bool &filterSwitch) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* retrieve usrs filterSwitch status
|
|
|
|
*/
|
|
|
|
virtual bool getFilterSwitch(void) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* add user id to filter list
|
|
|
|
* @param usr id to add to filter list
|
|
|
|
*/
|
|
|
|
virtual bool addToFilter(std::string &usrId) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* remove friend from filter list
|
|
|
|
* @param id The user's frined's id
|
|
|
|
*/
|
|
|
|
virtual bool removeFiltFriend(std::string &usrId) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* send blog info, will send to a data structure for transmission
|
|
|
|
* @param msg The msg the usr wants to send
|
|
|
|
*/
|
2008-06-24 00:36:45 -04:00
|
|
|
virtual bool sendBlog(const std::wstring &msg) = 0;
|
2008-06-05 20:04:45 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* retrieve blog of a usr
|
|
|
|
* @param blogs contains the blog msgs of usr along with time posted for sorting
|
|
|
|
*/
|
2008-06-24 00:36:45 -04:00
|
|
|
virtual bool getBlogs(std::map< std::string, std::multimap<long int, std::wstring> > &blogs) = 0;
|
2008-06-09 09:23:53 -04:00
|
|
|
|
2008-06-24 00:36:45 -04:00
|
|
|
/**
|
|
|
|
* set usr profile, send an empty second pair to delete entry
|
|
|
|
* @param entry profile entry
|
|
|
|
*/
|
|
|
|
virtual bool setProfile(std::pair<std::wstring, std::wstring> entry) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* add fav file, send file info with only name to delete that entry
|
|
|
|
* @param entry file info entry
|
|
|
|
*/
|
|
|
|
virtual bool setFavorites(FileInfo favFile) = 0;
|
2008-06-09 09:23:53 -04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stuff DrBob Added for Profile View!
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* get users Latest Blog Post.
|
|
|
|
* @param id the usr whose idetails you want to get.
|
|
|
|
* @param ts Timestamp of the Blog Post.
|
|
|
|
* @param post the actual Blog Post.
|
|
|
|
*/
|
|
|
|
|
|
|
|
virtual bool getPeerLatestBlog(std::string id, uint32_t &ts, std::wstring &post) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* get users Profile.
|
|
|
|
* @param id the user id
|
|
|
|
* @param entries set of profile information.
|
|
|
|
*/
|
|
|
|
virtual bool getPeerProfile(std::string id, std::list< std::pair<std::wstring, std::wstring> > &entries) = 0;
|
|
|
|
/**
|
|
|
|
* get users fav files
|
|
|
|
* @param id the user whose info you want.
|
|
|
|
* @param favs list of Files
|
|
|
|
*/
|
|
|
|
virtual bool getPeerFavourites(std::string id, std::list<FileInfo> &favs) = 0;
|
2008-06-24 00:36:45 -04:00
|
|
|
|
2008-05-09 15:13:13 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*RSQBLOG_H_*/
|