mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
e560e00029
removed xml parser utility removed extraneous info from retrodb git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5073 b45a01b8-16f6-495d-af2f-9b41ad6348cc
342 lines
9.0 KiB
Plaintext
342 lines
9.0 KiB
Plaintext
|
|
These are some example usages of the GxsService...
|
|
All of these must be provided by the basic system.
|
|
|
|
chris:
|
|
Please not all request* functions have a receive pair if not noted below
|
|
|
|
|
|
1) Forums
|
|
------------------------------------
|
|
1.1) Display of subscribed forums. Service must provide:
|
|
1.1.1) list of subscribed Groups.
|
|
----------------
|
|
int requestSubscribedGrps();
|
|
|
|
Component:
|
|
RsGnp::requestGroups()
|
|
|
|
|
|
----------------
|
|
1.1.2) list of messages for each Group.
|
|
----------------
|
|
int requestGrpMsgs(std::list<RsGxsGrpId>&);
|
|
----------------
|
|
|
|
1.1.3) details of group by group Id.
|
|
----------------
|
|
int requestGrp(std::list<RsGxsGrpId>& grpIds);
|
|
----------------
|
|
|
|
1.1.4) details of messages by message Id.
|
|
----------------
|
|
int requestMsgs(std::list<RsGxsMsgId>& msgs);
|
|
----------------
|
|
|
|
1.1.5) newest version of each message
|
|
|
|
----------------
|
|
1.1.4 : not intitialising RsGxsMsgId::version default to returning
|
|
newest version of message
|
|
----------------
|
|
|
|
1.1.6) status of message (read / unread).
|
|
|
|
----------------
|
|
returned with msg data
|
|
int flagMsgRead(const RsGxsMsgId& msgId, bool read)
|
|
|
|
----------------
|
|
|
|
1.1.7) access to Identity associated with Group and Messages
|
|
|
|
----------------
|
|
returned with message
|
|
----------------
|
|
|
|
1.1.8) updates when new groups arrive.
|
|
|
|
----------------
|
|
virtual void notifyGroupChanged(std::list<RsGxsGrpId> grpId) = 0
|
|
----------------
|
|
|
|
1.1.9) updates when new messages arrive.
|
|
----------------
|
|
virtual void notifyMsgChanged(std::list<RsGxsMsgId> msgId) = 0
|
|
----------------
|
|
|
|
1.1.10) updates when groups / messages change.
|
|
|
|
----------------
|
|
1.1.8 and 1.1.9
|
|
----------------
|
|
|
|
1.1.11) Search forums for Keywords.
|
|
|
|
----------------
|
|
int requestLocalSearch(RsGxsSearch* term);
|
|
----------------
|
|
|
|
1.1.12) Access new (time restricted) messages.
|
|
----------------
|
|
? explain
|
|
----------------
|
|
|
|
1.2) Creation of new material.
|
|
1.2.1) ability to create Groups.
|
|
|
|
----------------
|
|
int pushGrp(std::set<RsGxsGroup*>& grp, std::string& profileName);
|
|
int pushGrp(std::set<RsGxsGroup*>& grp, RsIdentityExchangeService::IdentityType type, const std::set<std::string>& peers,
|
|
const std::string& pseudonymName = "");
|
|
|
|
----------------
|
|
|
|
1.2.2) ability to create Messages.
|
|
|
|
void pushMsg(std::set<RsGxsMsg*>& msg);
|
|
|
|
1.3) Deletion of forums and posts.
|
|
1.3.1) discard forum (can't do this currently).
|
|
----------------
|
|
done automatically by GDService based on cutoff
|
|
----------------
|
|
|
|
1.3.2) delete post.
|
|
----------------
|
|
// post is removed from system and note made in db not to syn it
|
|
// this is cleaned from db post expires
|
|
// very likely to also propagate to friends
|
|
int requestDeleteMsg(const RsGxsMsgId& msgId);
|
|
int requestDeleteGrp(const RsGxsGrpId& grpId);
|
|
----------------
|
|
|
|
1.3.3) discard old posts.
|
|
----------------
|
|
done automatically by GDService based on cutoff
|
|
----------------
|
|
|
|
1.4) Control of Forums
|
|
|
|
1.4.1) Storage Period of subscribed forums
|
|
|
|
----------------
|
|
void setSubscribedGroupDiscardAge(uint32_t length);
|
|
----------------
|
|
|
|
1.4.2) Storage Period of unsubscribed forums.
|
|
|
|
----------------
|
|
void setUnsubscribedGrpDiscardAge(uint32_t length);
|
|
----------------
|
|
|
|
1.4.3) transfer unsubscribed forums and posts (yes/no)
|
|
|
|
----------------
|
|
don't think I want this, definitely default false
|
|
int GXService::allUnsubscribedTransfer(bool)
|
|
----------------
|
|
|
|
1.4.4) modify forums we own.
|
|
|
|
----------------
|
|
int GXService::updateGroup(multimap<grpId, version>)
|
|
----------------
|
|
|
|
----------------
|
|
int GXService::updateMsg(multimap<grpId, msgId>)
|
|
----------------
|
|
|
|
1.4.5) modify read status.
|
|
|
|
----------------
|
|
int flagMsgRead(const RsGxsMsgId& msgId, bool read) ;
|
|
----------------
|
|
1.4.6) Subscribe to forums
|
|
|
|
----------------
|
|
int requestSubscribeToGrp(const RsGxsGrpId& grpId, bool subscribe);
|
|
----------------
|
|
|
|
1.5) Finding other forums.
|
|
1.5.1) Listing of other forums.
|
|
int GXService::requestGroupList();
|
|
void receiveGroupList(token, list<grpId>); //call back
|
|
1.5.2) ability to temporarily get forum messages.
|
|
? Explain
|
|
1.5.3) search remote forums for keywords.
|
|
----------------
|
|
// service will have to provide own search module (can RsGDService can
|
|
// service remote search requests concurrent with GXS)
|
|
// module return message and groups (msgs can be marked compile time as not // searchable
|
|
int requestRemoteSearch(RsGxsSearch* term, uint32_t hops);
|
|
|
|
----------------
|
|
1.5.4) optional download of friends forums.
|
|
----------------
|
|
int requestPeersGrps(const std::string& sslId);
|
|
----------------
|
|
|
|
|
|
2) Channels
|
|
------------------------------------
|
|
2.1) Mostly like Forums, additional functionality.
|
|
2.1.1) Download files associated with Post.
|
|
|
|
----------------
|
|
? Explain, This should not be part of interface, this is feature specific
|
|
----------------
|
|
|
|
2.2) Comments
|
|
2.2.1) Write a comment.
|
|
----------------
|
|
see 1.2.2. RsGxsMsg with required indirection data members
|
|
to associate with message the comment is being made on
|
|
----------------
|
|
|
|
2.2.2) Reject (downgrade) bad comment.
|
|
----------------
|
|
user needs to verify publisher sent downgrage message
|
|
bool RsGxis::bool verify(const KeyRef& keyref, unsigned char* data, uint32_t dataLen, std::string& signature);
|
|
|
|
----------------
|
|
|
|
2.2.3) Control Comments: Allow / Disallow, Pseudo / Authed Comments.
|
|
----------------
|
|
bool RsGxis::bool sign(const KeyRef& keyref, unsigned char* data, uint32_t dataLen, std::string& signature);
|
|
|
|
----------------
|
|
|
|
|
|
3) Wiki
|
|
------------------------------------
|
|
3.1) Editing functionality
|
|
3.1.1) Access to Latest Version.
|
|
|
|
----------------
|
|
Pls see 1.1.7
|
|
----------------
|
|
|
|
3.1.2) Access to Version History. (including who edited).
|
|
|
|
----------------
|
|
// need to include std::map<version,authors> as top level RsGxsMsg
|
|
----------------
|
|
|
|
3.2) Controlling Editing Rights.
|
|
|
|
----------------
|
|
Pls see 1.1.7
|
|
----------------
|
|
|
|
|
|
3.2.1) Rejecting an Edit.
|
|
|
|
----------------
|
|
using 1.2.2 publisher can send messages with private key signature that he does not accept edit 'x'
|
|
bool GXIService verify(Identity, data, dataLen, signature)
|
|
----------------
|
|
|
|
3.2.2) Changing Edit Rights.
|
|
using 1.2.2, publisher sends new publish key under old private key signature, and user uses
|
|
|
|
3.3) Searching for Wikis.
|
|
3.3.1) Search for keyword.
|
|
----------------
|
|
see 1.5.3
|
|
----------------
|
|
|
|
3.3.2) Search for hashtag.
|
|
----------------
|
|
? Explain, anything different from keyword
|
|
see 1.5.3
|
|
----------------
|
|
|
|
|
|
3.3.3) Search for pattern?
|
|
----------------
|
|
Bit more detail on search type
|
|
RsGxsSearch{ int searchType; const int PATTERN_TYPE, TERM_TYPE; ....}
|
|
|
|
----------------
|
|
|
|
|
|
4) Wire (Twitter)
|
|
------------------------------------
|
|
4.1) Following Friends.
|
|
4.1.1) Adding Person.
|
|
|
|
----------------
|
|
See 1.4.6
|
|
----------------
|
|
|
|
|
|
4.2) Search The Wire.
|
|
4.2.1) Search for friends.
|
|
4.2.2) Search for hash tags.
|
|
4.2.3) Search for keywords.
|
|
4.2.4) Search for Retweets.
|
|
4.2.5) Search for replies.
|
|
----------------
|
|
for 4.2.* see 3.3.1
|
|
----------------
|
|
|
|
5) PhotoShare.
|
|
------------------------------------
|
|
5.1) Controlling Access.
|
|
5.1.1) Friends Only.
|
|
|
|
----------------
|
|
GXService::setShareGroup(grpId, group=RsGroups::GROUP_FRIENDS)
|
|
----------------
|
|
|
|
5.1.2) Groups Only.
|
|
|
|
----------------
|
|
5.1.1
|
|
----------------
|
|
|
|
5.1.3) Everyone.
|
|
----------------
|
|
5.1.1 GXService::setShareGroup(grpId, group=RsGroups::GROUP_ALL)
|
|
----------------
|
|
|
|
5.1.4) Deleting Photographs.
|
|
|
|
----------------
|
|
1.3.2
|
|
----------------
|
|
|
|
5.1.4) Deleting Album.
|
|
----------------
|
|
1.3.2
|
|
----------------
|
|
|
|
6) Acadeeb
|
|
------------------------------------
|
|
6.1) Review Article.
|
|
6.1.1) Write Review/Rate.
|
|
----------------
|
|
see 1.2.2 for sending message
|
|
----------------
|
|
|
|
6.1.2) Recommend Article.
|
|
----------------
|
|
see 1.2.2 for sending message
|
|
----------------
|
|
6.1.3) Get Rating of Article.
|
|
----------------
|
|
See 3.2.1 and 2.2.2
|
|
----------------
|
|
|
|
|
|
6.2) Submit Review of Article
|
|
6.2.1) stuff.
|
|
6.2.2) stuff.
|
|
|
|
|
|
7) Tracker.
|
|
------------------------------------
|
|
7.1) Tracker Stuff.
|
|
|