mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added new functions to support profile and favourite files in Blog.
Added Dummy information too. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@587 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6b4d072bb0
commit
4a58c71f9e
@ -31,6 +31,8 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
#include "rsiface/rstypes.h"
|
||||
|
||||
|
||||
/* delcare interafce for everyone o use */
|
||||
class RsQblog;
|
||||
@ -105,6 +107,35 @@ extern RsQblog *rsQblog;
|
||||
*/
|
||||
virtual bool getBlogs(std::map< std::string, std::multimap<long int, std:: string> > &blogs) = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /*RSQBLOG_H_*/
|
||||
|
@ -89,3 +89,55 @@ bool p3Blog::removeFiltFriend(std::string &usrId)
|
||||
return mQblog->removeFiltFriend(usrId);
|
||||
}
|
||||
|
||||
bool p3Blog::getPeerLatestBlog(std::string id, uint32_t &ts, std::wstring &post)
|
||||
{
|
||||
//return mQblog->getPeerLatestBlog(id, ts, post);
|
||||
|
||||
// dummy info.
|
||||
|
||||
ts = time(NULL);
|
||||
post = L"Hmmm, not much, just eating prawn crackers at the moment... but I'll post this every second if you want ;)";
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
bool p3Blog::getPeerProfile(std::string id, std::list< std::pair<std::wstring, std::wstring> > &entries)
|
||||
{
|
||||
//return mQblog->getPeerProfile(id, entries);
|
||||
|
||||
std::wstring a = L"phone number";
|
||||
std::wstring b = L"0845 XXX 43639434363878735453";
|
||||
|
||||
entries.push_back(make_pair(a,b));
|
||||
|
||||
a = L"Favourite Film";
|
||||
b = L"Prawn Crackers revenge";
|
||||
|
||||
entries.push_back(make_pair(a,b));
|
||||
|
||||
a = L"Favourite Music";
|
||||
b = L"Eric Clapton, Neil Diamond, Folk, Country and Western";
|
||||
|
||||
entries.push_back(make_pair(a,b));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3Blog::getPeerFavourites(std::string id, std::list<FileInfo> &favs)
|
||||
{
|
||||
//return mQblog->getPeerFavourites(id, favs);
|
||||
|
||||
FileInfo a;
|
||||
|
||||
a.fname = "Prawn Crackers - Full Script.txt";
|
||||
a.size = 1000553;
|
||||
a.hash = "XXXXXXXXXXXXXXXXXXXXXX";
|
||||
|
||||
favs.push_back(a);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,7 +54,9 @@ class p3Blog : public RsQblog
|
||||
virtual bool sendBlog(const std::string &msg);
|
||||
virtual bool getBlogs(std::map< std::string, std::multimap<long int, std:: string> > &blogs);
|
||||
|
||||
|
||||
virtual bool getPeerLatestBlog(std::string id, uint32_t &ts, std::wstring &post);
|
||||
virtual bool getPeerProfile(std::string id, std::list< std::pair<std::wstring, std::wstring> > &entries);
|
||||
virtual bool getPeerFavourites(std::string id, std::list<FileInfo> &favs);
|
||||
|
||||
private:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user