mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added updateGroup functions to gxs services.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7101 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0fd46e4f2b
commit
d9e483c48a
@ -109,6 +109,8 @@ virtual bool subscribeToGroup(uint32_t &token, const RsGxsGroupId &groupId, bool
|
|||||||
virtual bool createGroup(uint32_t &token, RsGxsChannelGroup &group) = 0;
|
virtual bool createGroup(uint32_t &token, RsGxsChannelGroup &group) = 0;
|
||||||
virtual bool createPost(uint32_t &token, RsGxsChannelPost &post) = 0;
|
virtual bool createPost(uint32_t &token, RsGxsChannelPost &post) = 0;
|
||||||
|
|
||||||
|
virtual bool updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsGxsChannelGroup &group) = 0;
|
||||||
|
|
||||||
// File Interface
|
// File Interface
|
||||||
virtual bool ExtraFileHash(const std::string &path, std::string filename) = 0;
|
virtual bool ExtraFileHash(const std::string &path, std::string filename) = 0;
|
||||||
virtual bool ExtraFileRemove(const std::string &hash) = 0;
|
virtual bool ExtraFileRemove(const std::string &hash) = 0;
|
||||||
|
@ -64,6 +64,8 @@ public:
|
|||||||
// for circles
|
// for circles
|
||||||
std::string mCircleId;
|
std::string mCircleId;
|
||||||
uint32_t mCircleType;
|
uint32_t mCircleType;
|
||||||
|
|
||||||
|
// other stuff.
|
||||||
uint32_t mAuthenFlags;
|
uint32_t mAuthenFlags;
|
||||||
std::string mParentGrpId;
|
std::string mParentGrpId;
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgI
|
|||||||
virtual bool createGroup(uint32_t &token, RsPostedGroup &group) = 0;
|
virtual bool createGroup(uint32_t &token, RsPostedGroup &group) = 0;
|
||||||
virtual bool createPost(uint32_t &token, RsPostedPost &post) = 0;
|
virtual bool createPost(uint32_t &token, RsPostedPost &post) = 0;
|
||||||
|
|
||||||
|
virtual bool updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsPostedGroup &group) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,6 +131,8 @@ virtual bool submitCollection(uint32_t &token, RsWikiCollection &collection) = 0
|
|||||||
virtual bool submitSnapshot(uint32_t &token, RsWikiSnapshot &snapshot) = 0;
|
virtual bool submitSnapshot(uint32_t &token, RsWikiSnapshot &snapshot) = 0;
|
||||||
virtual bool submitComment(uint32_t &token, RsWikiComment &comment) = 0;
|
virtual bool submitComment(uint32_t &token, RsWikiComment &comment) = 0;
|
||||||
|
|
||||||
|
virtual bool updateCollection(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsWikiCollection &collection) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -805,6 +805,23 @@ bool p3GxsChannels::createGroup(uint32_t &token, RsGxsChannelGroup &group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool p3GxsChannels::updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsGxsChannelGroup &group)
|
||||||
|
{
|
||||||
|
std::cerr << "p3GxsChannels::updateGroup()" << std::endl;
|
||||||
|
|
||||||
|
if(meta.getGroupId().empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
RsGxsChannelGroupItem* grpItem = new RsGxsChannelGroupItem();
|
||||||
|
grpItem->fromChannelGroup(group, true);
|
||||||
|
grpItem->meta.mGroupId = meta.getGroupId();
|
||||||
|
|
||||||
|
RsGenExchange::updateGroup(token, meta, grpItem);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool p3GxsChannels::createPost(uint32_t &token, RsGxsChannelPost &msg)
|
bool p3GxsChannels::createPost(uint32_t &token, RsGxsChannelPost &msg)
|
||||||
{
|
{
|
||||||
std::cerr << "p3GxsChannels::createChannelPost() GroupId: " << msg.mMeta.mGroupId;
|
std::cerr << "p3GxsChannels::createChannelPost() GroupId: " << msg.mMeta.mGroupId;
|
||||||
|
@ -92,6 +92,8 @@ virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsGxsChannelPost
|
|||||||
virtual bool createGroup(uint32_t &token, RsGxsChannelGroup &group);
|
virtual bool createGroup(uint32_t &token, RsGxsChannelGroup &group);
|
||||||
virtual bool createPost(uint32_t &token, RsGxsChannelPost &post);
|
virtual bool createPost(uint32_t &token, RsGxsChannelPost &post);
|
||||||
|
|
||||||
|
virtual bool updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsGxsChannelGroup &group);
|
||||||
|
|
||||||
// no tokens... should be cached.
|
// no tokens... should be cached.
|
||||||
virtual bool setChannelAutoDownload(const RsGxsGroupId &groupId, bool enabled);
|
virtual bool setChannelAutoDownload(const RsGxsGroupId &groupId, bool enabled);
|
||||||
virtual bool getChannelAutoDownload(const RsGxsGroupId &groupid);
|
virtual bool getChannelAutoDownload(const RsGxsGroupId &groupid);
|
||||||
|
@ -219,6 +219,23 @@ bool p3Posted::createGroup(uint32_t &token, RsPostedGroup &group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool p3Posted::updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsPostedGroup &group)
|
||||||
|
{
|
||||||
|
std::cerr << "p3Posted::updateGroup()" << std::endl;
|
||||||
|
|
||||||
|
if(meta.getGroupId().empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
RsGxsPostedGroupItem* grpItem = new RsGxsPostedGroupItem();
|
||||||
|
grpItem->mGroup = group;
|
||||||
|
grpItem->meta = group.mMeta;
|
||||||
|
grpItem->meta.mGroupId = meta.getGroupId();
|
||||||
|
|
||||||
|
RsGenExchange::updateGroup(token, meta, grpItem);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool p3Posted::createPost(uint32_t &token, RsPostedPost &msg)
|
bool p3Posted::createPost(uint32_t &token, RsPostedPost &msg)
|
||||||
{
|
{
|
||||||
std::cerr << "p3Posted::createPost() GroupId: " << msg.mMeta.mGroupId;
|
std::cerr << "p3Posted::createPost() GroupId: " << msg.mMeta.mGroupId;
|
||||||
|
@ -68,6 +68,8 @@ virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsPostedPost> &p
|
|||||||
virtual bool createGroup(uint32_t &token, RsPostedGroup &group);
|
virtual bool createGroup(uint32_t &token, RsPostedGroup &group);
|
||||||
virtual bool createPost(uint32_t &token, RsPostedPost &post);
|
virtual bool createPost(uint32_t &token, RsPostedPost &post);
|
||||||
|
|
||||||
|
virtual bool updateGroup(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsPostedGroup &group);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// WRAPPERS due to the separate Interface.
|
// WRAPPERS due to the separate Interface.
|
||||||
|
|
||||||
|
@ -299,6 +299,21 @@ bool p3Wiki::submitComment(uint32_t &token, RsWikiComment &comment)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3Wiki::updateCollection(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsWikiCollection &group)
|
||||||
|
{
|
||||||
|
std::cerr << "p3Wiki::updateCollection()" << std::endl;
|
||||||
|
|
||||||
|
if(meta.getGroupId().empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
RsGxsWikiCollectionItem* grpItem = new RsGxsWikiCollectionItem();
|
||||||
|
grpItem->collection = group;
|
||||||
|
grpItem->meta = group.mMeta;
|
||||||
|
grpItem->meta.mGroupId = meta.getGroupId();
|
||||||
|
|
||||||
|
RsGenExchange::updateGroup(token, meta, grpItem);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const RsWikiCollection &group)
|
std::ostream &operator<<(std::ostream &out, const RsWikiCollection &group)
|
||||||
|
@ -69,6 +69,7 @@ virtual bool submitCollection(uint32_t &token, RsWikiCollection &collection);
|
|||||||
virtual bool submitSnapshot(uint32_t &token, RsWikiSnapshot &snapshot);
|
virtual bool submitSnapshot(uint32_t &token, RsWikiSnapshot &snapshot);
|
||||||
virtual bool submitComment(uint32_t &token, RsWikiComment &comment);
|
virtual bool submitComment(uint32_t &token, RsWikiComment &comment);
|
||||||
|
|
||||||
|
virtual bool updateCollection(uint32_t &token, RsGxsGroupUpdateMeta& meta, RsWikiCollection &collection);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user