mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-22 13:24:26 -04:00
fixed some issues with dummy function
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@559 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
033df8ed16
commit
ab4b0d0251
2 changed files with 41 additions and 23 deletions
|
@ -61,6 +61,12 @@ bool p3Qblog::setFilterSwitch(bool &filterSwitch)
|
||||||
|
|
||||||
bool p3Qblog::getFriendList(std::list<std::string> &friendList)
|
bool p3Qblog::getFriendList(std::list<std::string> &friendList)
|
||||||
{
|
{
|
||||||
|
if(FriendList.empty())
|
||||||
|
{
|
||||||
|
std::cerr << "FriendList empty!" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
friendList = FriendList;
|
friendList = FriendList;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -149,10 +155,10 @@ void p3Qblog::loadDummy(void)
|
||||||
{
|
{
|
||||||
/* load usr list */
|
/* load usr list */
|
||||||
FriendList.push_back("Usr1"); // home usr/server
|
FriendList.push_back("Usr1"); // home usr/server
|
||||||
FriendList.push_back("mike2");
|
FriendList.push_back("Mike2");
|
||||||
FriendList.push_back("mike3");
|
FriendList.push_back("Mike3");
|
||||||
FriendList.push_back("mike4");
|
FriendList.push_back("Mike4");
|
||||||
FriendList.push_back("mike5");
|
FriendList.push_back("Mike5");
|
||||||
|
|
||||||
/* set usr status: need to create usr/status set or just add to profile object */
|
/* set usr status: need to create usr/status set or just add to profile object */
|
||||||
Status = "I'm chilling homey";
|
Status = "I'm chilling homey";
|
||||||
|
@ -167,28 +173,30 @@ void p3Qblog::loadDummy(void)
|
||||||
FriendSongset.insert(std::make_pair("Mike4", "revolvers"));
|
FriendSongset.insert(std::make_pair("Mike4", "revolvers"));
|
||||||
FriendSongset.insert(std::make_pair("Mike5", "pepolvers"));
|
FriendSongset.insert(std::make_pair("Mike5", "pepolvers"));
|
||||||
|
|
||||||
/* load could usr blogs, not all tho */
|
/* load usr blogs */
|
||||||
|
|
||||||
|
/* the usr dummy usr blogs */
|
||||||
std::string usrBlog = "I think we should eat more cheese";
|
std::string usrBlog = "I think we should eat more cheese";
|
||||||
|
|
||||||
std::string Blog2 = "today was so cool, i got attacked by fifty ninja while buying a loaf so i used my paper bag to suffocate each of them to death at hyper speed";
|
std::string Blog2 = "today was so cool, i got attacked by fifty ninja while buying a loaf so i used my paper bag to suffocate each of them to death at hyper speed";
|
||||||
|
std::string Blog3 = "Nuthins up";
|
||||||
|
std::string Blog4 = "stop bothering me";
|
||||||
std::string Blog5 = "I'm really a boring person and having nothin interesting to say";
|
std::string Blog5 = "I'm really a boring person and having nothin interesting to say";
|
||||||
|
|
||||||
|
|
||||||
long int time1, time2, time5;
|
time_t time1, time2, time3, time4, time5; // times of blogs
|
||||||
time1 = 12123121;
|
|
||||||
time2 = 1213212;
|
|
||||||
time5 = 522133131;
|
|
||||||
|
|
||||||
/*** time blog multimaps ****/
|
/*** populate time/blog multimaps and usrBlog map ****/
|
||||||
|
std::multimap<long int, std::string> timeBlog1, timeBlog2, timeBlog3, timeBlog4, timeBlog5;
|
||||||
std::multimap<long int, std::string> timeBlog1, timeBlog2, timeBlog5;
|
|
||||||
timeBlog1.insert(std::make_pair(time1, usrBlog));
|
timeBlog1.insert(std::make_pair(time1, usrBlog));
|
||||||
timeBlog2.insert(std::make_pair(time2, Blog2));
|
timeBlog2.insert(std::make_pair(time2, Blog2));
|
||||||
|
timeBlog3.insert(std::make_pair(time3, Blog3));
|
||||||
|
timeBlog4.insert(std::make_pair(time4, Blog4));
|
||||||
timeBlog5.insert(std::make_pair(time5, Blog5));
|
timeBlog5.insert(std::make_pair(time5, Blog5));
|
||||||
|
|
||||||
UsrBlogSet.insert(std::make_pair("Usr1", timeBlog1));
|
UsrBlogSet.insert(std::make_pair("Usr1", timeBlog1));
|
||||||
UsrBlogSet.insert(std::make_pair("Mike2", timeBlog2));
|
UsrBlogSet.insert(std::make_pair("Mike2", timeBlog2));
|
||||||
|
UsrBlogSet.insert(std::make_pair("Mike3", timeBlog2));
|
||||||
|
UsrBlogSet.insert(std::make_pair("Mike4", timeBlog2));
|
||||||
UsrBlogSet.insert(std::make_pair("Mike5", timeBlog5));
|
UsrBlogSet.insert(std::make_pair("Mike5", timeBlog5));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* contains definitions of the interface and blog information to be manipulated
|
* contains definitions of the interface and blog information to be manipulated
|
||||||
|
* See RsQblog class for virtual methods documentation
|
||||||
*/
|
*/
|
||||||
class p3Qblog : public RsQblog
|
class p3Qblog : public RsQblog
|
||||||
{
|
{
|
||||||
|
@ -65,16 +66,25 @@
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::list<std::string> FilterList; /// contains the list of ids usr only wants to see
|
/// contains the list of ids usr only wants to see
|
||||||
bool FilterSwitch; /// determines whether filter is activated or not
|
std::list<std::string> FilterList;
|
||||||
std::string Status; /// the status of the user
|
/// determines whether filter is activated or not
|
||||||
std::string FavSong; /// favorite song of usr, consider sending pathfile to d/l
|
bool FilterSwitch;
|
||||||
std::list<std::string> FriendList; /// list of friends
|
/// the status of the user
|
||||||
std::map<std::string, std::string> FriendSongset; //
|
std::string Status;
|
||||||
//std::multimap<long int, std::string> blogs; /// blogs recorded
|
/// favorite song of usr, consider sending pathfile to d/l
|
||||||
std::map< std::string, std::multimap<long int, std:: string> > UsrBlogSet; /// contain usr and their blogs
|
std::string FavSong;
|
||||||
|
/// list of friends
|
||||||
|
std::list<std::string> FriendList;
|
||||||
|
/// usr and fav song
|
||||||
|
std::map<std::string, std::string> FriendSongset;
|
||||||
|
/// usr and current status
|
||||||
|
std::map<std::string, std::string> FriendStatusSet;
|
||||||
|
/// contain usr and their blogs
|
||||||
|
std::map< std::string, std::multimap<long int, std:: string> > UsrBlogSet;
|
||||||
|
|
||||||
void loadDummy(void); /// loads dummy data for testing
|
/// loads dummy data for testing
|
||||||
|
void loadDummy(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue