Extend libresapi with minimal support for channels

The code is not elegant as this version of the API will be soon obsolete
  but it offer a bunch of channels functionalities, comments and votes
  are not implemented yet

/channels/list_channels get all visibile channels
/channels/get_channel get content of a subscribed channel
/channels/toggle_subscribe subscribe/unsubscribe to a channel
/channels/toggle_auto_download set/unset auto-download for files attached
  to posts in a channel
/channels/toggle_read mark a post as read
/channels/create_channel create a new channel
/channels/create_post create a new post in given channel, group_id
  paramenter renamed to channel_id for consistence

mChannels use reference instead of pointer as it must be valid
  for the whole lifetime of the object
RsGxsCommentService and derivatives use proper types for parameter, avoid
  reference when unneeded
This commit is contained in:
Gioacchino Mazzurco 2018-03-28 16:30:35 +02:00
parent 73c6deebf4
commit 8d1f1da242
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
7 changed files with 449 additions and 77 deletions

View file

@ -240,7 +240,7 @@ public:
mTransfersHandler(sts, ifaces.mFiles, ifaces.mPeers, *ifaces.mNotify),
mChatHandler(sts, ifaces.mNotify, ifaces.mMsgs, ifaces.mPeers, ifaces.mIdentity, &mPeersHandler),
mApiPluginHandler(sts, ifaces),
mChannelsHandler(ifaces.mGxsChannels),
mChannelsHandler(*ifaces.mGxsChannels),
mStatsHandler()
#ifdef LIBRESAPI_QT
,mSettingsHandler(sts)