git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@560 b45a01b8-16f6-495d-af2f-9b41ad6348cc

This commit is contained in:
chrisparker126 2008-05-24 15:09:51 +00:00
parent ab4b0d0251
commit 7d571f6e2c
2 changed files with 17 additions and 17 deletions

View File

@ -42,9 +42,9 @@ p3Qblog::~p3Qblog()
} }
bool p3Qblog::setStatus(std::string &status) bool p3Qblog::setStatus(const std::string &status)
{ {
Status = status; FriendStatusSet[usr] = status;
return true; return true;
} }
@ -71,9 +71,9 @@ bool p3Qblog::getFriendList(std::list<std::string> &friendList)
return true; return true;
} }
bool p3Qblog::getStatus(std::string &status) bool p3Qblog::getStatus(std::map<std::string, std::string> &usrStatus)
{ {
status = Status; usrStatus = FriendStatusSet;
return true; return true;
} }
@ -125,14 +125,14 @@ bool p3Qblog::getBlogs(std::map< std::string, std::multimap<long int, std:: stri
return true; return true;
} }
bool p3Qblog::sendBlog(std::string &msg) bool p3Qblog::sendBlog(const std::string &msg)
{ {
time_t msgCreatedTime; time_t msgCreatedTime;
UsrBlogSet["Usr1"].insert(std::make_pair(msgCreatedTime, msg)); UsrBlogSet["Usr1"].insert(std::make_pair(msgCreatedTime, msg));
return true; return true;
} }
bool p3Qblog::getProfile(std::string &usrId, std::string &favSong) bool p3Qblog::getProfile(std::map<std::string, std::string> &profile)
{ {
/* return error is set empty */ /* return error is set empty */
if(FriendSongset.empty()) if(FriendSongset.empty())
@ -141,13 +141,13 @@ bool p3Qblog::getProfile(std::string &usrId, std::string &favSong)
return false; return false;
} }
favSong = FriendSongset[usrId]; profile = FriendSongset;
return true; return true;
} }
bool p3Qblog::setProfile(std::string &favSong) bool p3Qblog::setProfile(const std::string &favSong)
{ {
FavSong = favSong; FriendSongset[usr] = favSong;
return true; return true;
} }
@ -161,7 +161,7 @@ void p3Qblog::loadDummy(void)
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"; //TODO
/* set favsong: will be made part of profile */ /* set favsong: will be made part of profile */
FavSong = "DeathOfAthousandSuns"; FavSong = "DeathOfAthousandSuns";

View File

@ -52,16 +52,16 @@
p3Qblog(); p3Qblog();
virtual ~p3Qblog (); virtual ~p3Qblog ();
virtual bool setStatus(std::string &status); virtual bool setStatus(const std::string &status);
virtual bool getStatus(std::string &status); virtual bool getStatus(std::map<std::string, std::string> &usrStatus);
virtual bool setFilterSwitch(bool &filterSwitch); virtual bool setFilterSwitch(bool &filterSwitch);
virtual bool getFriendList(std::list<std::string> &friendList); virtual bool getFriendList(std::list<std::string> &friendList);
virtual bool getFilterSwitch(void); virtual bool getFilterSwitch(void);
virtual bool addToFilter(std::string &usrId); virtual bool addToFilter(std::string &usrId);
virtual bool removeFiltFriend(std::string &usrId); virtual bool removeFiltFriend(std::string &usrId);
virtual bool getProfile(std::string &usrId, std::string &favSong); virtual bool getProfile(std::map<std::string, std::string> &profile);
virtual bool setProfile(std::string &favSong); virtual bool setProfile(const std::string &favSong);
virtual bool sendBlog(std::string &msg); virtual bool sendBlog(const std::string &msg);
virtual bool getBlogs(std::map< std::string, std::multimap<long int, std:: string> > &blogs); virtual bool getBlogs(std::map< std::string, std::multimap<long int, std:: string> > &blogs);
private: private:
@ -70,8 +70,8 @@
std::list<std::string> FilterList; std::list<std::string> FilterList;
/// determines whether filter is activated or not /// determines whether filter is activated or not
bool FilterSwitch; bool FilterSwitch;
/// the status of the user /// the current usr
std::string Status; std::string usr;
/// favorite song of usr, consider sending pathfile to d/l /// favorite song of usr, consider sending pathfile to d/l
std::string FavSong; std::string FavSong;
/// list of friends /// list of friends