Added authentication policy and policy function for gxs forums

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6117 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2013-02-10 17:41:30 +00:00
parent 39a7942337
commit bf5981e8b4
2 changed files with 19 additions and 1 deletions

View File

@ -51,7 +51,7 @@ RsGxsForums *rsGxsForums = NULL;
/********************************************************************************/
p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *nes)
: RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXSV1_TYPE_FORUMS), RsGxsForums(this)
: RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXSV1_TYPE_FORUMS, NULL, forumsAuthenPolicy()), RsGxsForums(this)
{
// For Dummy Msgs.
mGenActive = false;
@ -64,6 +64,22 @@ p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *ne
}
uint32_t p3GxsForums::forumsAuthenPolicy()
{
uint32_t policy;
uint32_t flag = GXS_SERV::MSG_AUTHEN_ROOT_AUTHOR_SIGN |
GXS_SERV::MSG_AUTHEN_CHILD_AUTHOR_SIGN;
RsGenExchange::setAuthenPolicyFlag(flag, policy,
RsGenExchange::RESTRICTED_GRP_BITS);
RsGenExchange::setAuthenPolicyFlag(flag, policy,
RsGenExchange::PUBLIC_GRP_BITS);
RsGenExchange::setAuthenPolicyFlag(flag, policy,
RsGenExchange::PRIVATE_GRP_BITS);
return policy;
}
void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
{
receiveChanges(changes);

View File

@ -78,6 +78,8 @@ virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg);
private:
static uint32_t forumsAuthenPolicy();
virtual bool generateDummyData();
std::string genRandomId();