mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-01 04:46:47 -05:00
added new method to create a channel with more explicit parameters and JSon API for it
This commit is contained in:
parent
ef1755d97f
commit
e0af46eb85
6 changed files with 153 additions and 5 deletions
|
|
@ -107,6 +107,28 @@ public:
|
|||
*/
|
||||
virtual bool createChannel(RsGxsChannelGroup& channel) = 0;
|
||||
|
||||
/**
|
||||
* @brief Create channel. Blocking API.
|
||||
* @jsonapi{development}
|
||||
* @param[in] name Name of the channel
|
||||
* @param[in] description Description of the channel
|
||||
* @param[in] image Thumbnail that is shown to advertise the channel. Possibly empty.
|
||||
* @param[in] author_id GxsId of the contact author. For an anonymous channel, leave this to RsGxsId()="00000....0000"
|
||||
* @param[in] circle_type Type of visibility restriction, among { GXS_CIRCLE_TYPE_PUBLIC, GXS_CIRCLE_TYPE_EXTERNAL, GXS_CIRCLE_TYPE_YOUR_FRIENDS_ONLY, GXS_CIRCLE_TYPE_YOUR_EYES_ONLY }
|
||||
* @param[in] circle_id Id of the circle (should be an external circle or GXS_CIRCLE_TYPE_EXTERNAL, a local friend group for GXS_CIRCLE_TYPE_YOUR_FRIENDS_ONLY, GxsCircleId()="000....000" otherwise
|
||||
* @param[out] channel_group_id Group id of the created channel, if command succeeds.
|
||||
* @param[out] error_message Error messsage supplied when the channel creation fails.
|
||||
* @return False on error, true otherwise.
|
||||
*/
|
||||
virtual bool createChannel(const std::string& name,
|
||||
const std::string& description,
|
||||
const RsGxsImage& image,
|
||||
const RsGxsId& author_id,
|
||||
uint32_t circle_type,
|
||||
RsGxsCircleId& circle_id,
|
||||
RsGxsGroupId& channel_group_id,
|
||||
std::string& error_message)=0;
|
||||
|
||||
/**
|
||||
* @brief Add a comment on a post or on another comment
|
||||
* @jsonapi{development}
|
||||
|
|
|
|||
|
|
@ -52,14 +52,15 @@ namespace GXS_SERV {
|
|||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_MASK = 0x0000ff00;
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_NONE = 0x00000000;
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_GPG = 0x00000100; // Anti-spam feature. Allows to ask higher reputation to anonymous IDs
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_REQUIRED = 0x00000200;
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN = 0x00000400;
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_REQUIRED = 0x00000200; // unused
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN = 0x00000400; // ???
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES = 0x00000800; // not used anymore
|
||||
static const uint32_t FLAG_AUTHOR_AUTHENTICATION_GPG_KNOWN = 0x00001000; // Anti-spam feature. Allows to ask higher reputation to unknown IDs and anonymous IDs
|
||||
|
||||
// These are *not used*
|
||||
static const uint32_t FLAG_GROUP_SIGN_PUBLISH_MASK = 0x000000ff;
|
||||
static const uint32_t FLAG_GROUP_SIGN_PUBLISH_ENCRYPTED = 0x00000001;
|
||||
static const uint32_t FLAG_GROUP_SIGN_PUBLISH_ALLSIGNED = 0x00000002;
|
||||
static const uint32_t FLAG_GROUP_SIGN_PUBLISH_ALLSIGNED = 0x00000002; // unused
|
||||
static const uint32_t FLAG_GROUP_SIGN_PUBLISH_THREADHEAD = 0x00000004;
|
||||
static const uint32_t FLAG_GROUP_SIGN_PUBLISH_NONEREQ = 0x00000008;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue