Third attempt at link rank system.

* Added Anonymous links, stored in configuration file.
 * Friends recommendations are also shared anonymously with peers.
 * Own recommendations are shared with friends.
 * TODO include ranking (+2 <-> -2) in score.
 * some bugfixes too.

Added RandomId to p3service file.
Improved forum interface.
Added dummy forum system (not transmitted) for testing.
Switched on new features as well.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@505 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-04-15 16:35:46 +00:00
parent 2def35c6f2
commit 129c07a553
14 changed files with 513 additions and 46 deletions

View file

@ -37,6 +37,9 @@
#define RS_FORUM_PRIVATE 0x0002 /* anyone with key can publish */
#define RS_FORUM_ENCRYPTED 0x0004 /* need admin key */
#define RS_FORUM_MSG_AUTH 0x0010 /* you must sign messages */
#define RS_FORUM_MSG_ANON 0x0020 /* you can send anonymous messages */
#define RS_FORUM_ADMIN 0x0100 /* anyone can publish */
#define RS_FORUM_SUBSCRIBED 0x0200 /* anyone can publish */
@ -61,8 +64,11 @@ class ForumMsgInfo
ForumMsgInfo() {}
std::string forumId;
std::string threadId;
std::string parentId;
std::string msgId;
std::string srcId; /* if Authenticated -> signed here */
unsigned int msgflags;
std::wstring title;
@ -75,13 +81,15 @@ class ThreadInfoSummary
{
public:
ThreadInfoSummary() {}
std::string forumId;
std::string threadId;
std::string parentId;
std::string msgId;
std::string srcId;
uint32_t msgflags;
std::wstring title;
std::wstring msg;
int count; /* file count */
time_t ts;
@ -105,9 +113,12 @@ virtual ~RsForums() { return; }
virtual bool forumsChanged(std::list<std::string> &forumIds) = 0;
virtual std::string createForum(std::wstring forumName, std::wstring forumDesc, uint32_t forumFlags) = 0;
virtual bool getForumList(std::list<ForumInfo> &forumList) = 0;
virtual bool getForumThreadList(std::string fId, std::list<ThreadInfoSummary> &msgs) = 0;
virtual bool getForumThreadMsgList(std::string fId, std::string tId, std::list<ThreadInfoSummary> &msgs) = 0;
virtual bool getForumThreadMsgList(std::string fId, std::string pId, std::list<ThreadInfoSummary> &msgs) = 0;
virtual bool getForumMessage(std::string fId, std::string mId, ForumMsgInfo &msg) = 0;
virtual bool ForumMessageSend(ForumMsgInfo &info) = 0;

View file

@ -40,6 +40,7 @@ class RsRankComment
std::string id;
std::wstring comment;
int32_t score;
time_t timestamp;
};
@ -85,8 +86,10 @@ virtual bool getRankings(uint32_t first, uint32_t count, std::list<std::string>
virtual bool getRankDetails(std::string rid, RsRankDetails &details) = 0;
/* Add New Comment / Msg */
virtual std::string newRankMsg(std::wstring link, std::wstring title, std::wstring comment) = 0;
virtual bool updateComment(std::string rid, std::wstring comment) = 0;
virtual std::string newRankMsg(std::wstring link, std::wstring title, std::wstring comment, int32_t score) = 0;
virtual bool updateComment(std::string rid, std::wstring comment, int32_t score) = 0;
virtual std::string anonRankMsg(std::wstring link, std::wstring title) = 0;
};