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

View File

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