mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-01 04:46:47 -05:00
Merge pull request #1512 from G10h4ck/csoler-jsonapi-channel
Improve GxsChannels API
This commit is contained in:
commit
276328dd91
11 changed files with 722 additions and 105 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* libretroshare: retroshare core library *
|
||||
* *
|
||||
* Copyright (C) 2012 Robert Fernie <retroshare@lunamutt.com> *
|
||||
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
|
|
@ -33,6 +33,8 @@
|
|||
#include "serialiser/rsserializable.h"
|
||||
#include "retroshare/rsturtle.h"
|
||||
#include "util/rsdeprecate.h"
|
||||
#include "retroshare/rsgxscircles.h"
|
||||
#include "util/rsmemory.h"
|
||||
|
||||
class RsGxsChannels;
|
||||
|
||||
|
|
@ -102,34 +104,98 @@ public:
|
|||
/**
|
||||
* @brief Create channel. Blocking API.
|
||||
* @jsonapi{development}
|
||||
* @param[inout] channel Channel data (name, description...)
|
||||
* @return false on error, true otherwise
|
||||
* @param[in] name Name of the channel
|
||||
* @param[in] description Description of the channel
|
||||
* @param[in] thumbnail Optional image to show as channel thumbnail.
|
||||
* @param[in] authorId Optional id of the author. Leave empty for an
|
||||
* anonymous channel.
|
||||
* @param[in] circleType Optional visibility rule, default public.
|
||||
* @param[in] circleId If the channel is not public specify the id of the
|
||||
* circle who can see the channel. Depending on the value you pass for
|
||||
* circleType this should be be an external circle if EXTERNAL is passed, a
|
||||
* local friend group id if NODES_GROUP is passed, empty otherwise.
|
||||
* @param[out] channelId Optional storage for the id of the created channel,
|
||||
* meaningful only if creations succeeds.
|
||||
* @param[out] errorMessage Optional storage for error messsage, meaningful
|
||||
* only if creation fail.
|
||||
* @return False on error, true otherwise.
|
||||
*/
|
||||
virtual bool createChannel(RsGxsChannelGroup& channel) = 0;
|
||||
virtual bool createChannelV2(
|
||||
const std::string& name, const std::string& description,
|
||||
const RsGxsImage& thumbnail = RsGxsImage(),
|
||||
const RsGxsId& authorId = RsGxsId(),
|
||||
RsGxsCircleType circleType = RsGxsCircleType::PUBLIC,
|
||||
const RsGxsCircleId& circleId = RsGxsCircleId(),
|
||||
RsGxsGroupId& channelId = RS_DEFAULT_STORAGE_PARAM(RsGxsGroupId),
|
||||
std::string& errorMessage = RS_DEFAULT_STORAGE_PARAM(std::string) ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Add a comment on a post or on another comment
|
||||
* @jsonapi{development}
|
||||
* @param[inout] comment
|
||||
* @param[in] channelId Id of the channel in which the comment is to be posted
|
||||
* @param[in] parentId Id of the parent of the comment that is either a
|
||||
* channel post Id or the Id of another comment.
|
||||
* @param[in] comment UTF-8 string containing the comment
|
||||
* @param[out] commentMessageId Optional storage for the id of the comment
|
||||
* that was created, meaningful only on success.
|
||||
* @param[out] errorMessage Optional storage for error message, meaningful
|
||||
* only on failure.
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
virtual bool createComment(RsGxsComment& comment) = 0;
|
||||
virtual bool createCommentV2(
|
||||
const RsGxsGroupId& channelId, const RsGxsMessageId& parentId,
|
||||
const std::string& comment,
|
||||
RsGxsMessageId& commentMessageId = RS_DEFAULT_STORAGE_PARAM(RsGxsMessageId),
|
||||
std::string& errorMessage = RS_DEFAULT_STORAGE_PARAM(std::string) )=0;
|
||||
|
||||
/**
|
||||
* @brief Create channel post. Blocking API.
|
||||
* @jsonapi{development}
|
||||
* @param[inout] post
|
||||
* @param[in] channelId Id of the channel where to put the post. Beware you
|
||||
* need publish rights on that channel to post.
|
||||
* @param[in] title Title of the post
|
||||
* @param[in] mBody Text content of the post
|
||||
* @param[in] files Optional list of attached files. These are supposed to
|
||||
* be already shared, @see ExtraFileHash() below otherwise.
|
||||
* @param[in] thumbnail Optional thumbnail image for the post.
|
||||
* @param[in] origPostId If this is supposed to replace an already existent
|
||||
* post, the id of the old post. If left blank a new post will be created.
|
||||
* @param[out] postId Optional storage for the id of the created post,
|
||||
* meaningful only on success.
|
||||
* @param[out] errorMessage Optional storage for the error message,
|
||||
* meaningful only on failure.
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
virtual bool createPost(RsGxsChannelPost& post) = 0;
|
||||
virtual bool createPostV2(
|
||||
const RsGxsGroupId& channelId, const std::string& title,
|
||||
const std::string& mBody,
|
||||
const std::list<RsGxsFile>& files = std::list<RsGxsFile>(),
|
||||
const RsGxsImage& thumbnail = RsGxsImage(),
|
||||
const RsGxsMessageId& origPostId = RsGxsMessageId(),
|
||||
RsGxsMessageId& postId = RS_DEFAULT_STORAGE_PARAM(RsGxsMessageId),
|
||||
std::string& errorMessage = RS_DEFAULT_STORAGE_PARAM(std::string) ) = 0;
|
||||
|
||||
/**
|
||||
* @brief createVote
|
||||
* @brief Create a vote
|
||||
* @jsonapi{development}
|
||||
* @param[inout] vote
|
||||
* @param[in] channelId Id of the channel where to vote
|
||||
* @param[in] postId Id of the channel post of which a comment is voted
|
||||
* @param[in] commentId Id of the comment that is voted
|
||||
* @param[in] authorId Id of the author. Needs to be of an owned identity.
|
||||
* @param[in] vote Vote value, either RsGxsVoteType::DOWN or
|
||||
* RsGxsVoteType::UP
|
||||
* @param[out] voteId Optional storage for the id of the created vote,
|
||||
* meaningful only on success.
|
||||
* @param[out] errorMessage Optional storage for error message, meaningful
|
||||
* only on failure.
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
virtual bool createVote(RsGxsVote& vote) = 0;
|
||||
virtual bool createVoteV2(
|
||||
const RsGxsGroupId& channelId, const RsGxsMessageId& postId,
|
||||
const RsGxsMessageId& commentId, const RsGxsId& authorId,
|
||||
RsGxsVoteType vote,
|
||||
RsGxsMessageId& voteId = RS_DEFAULT_STORAGE_PARAM(RsGxsMessageId),
|
||||
std::string& errorMessage = RS_DEFAULT_STORAGE_PARAM(std::string) ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Edit channel details.
|
||||
|
|
@ -315,6 +381,16 @@ public:
|
|||
/* Following functions are deprecated as they expose internal functioning
|
||||
* semantic, instead of a safe to use API */
|
||||
|
||||
/**
|
||||
* @brief Create channel. Blocking API.
|
||||
* @jsonapi{development}
|
||||
* @deprecated { substituted by createChannelV2 }
|
||||
* @param[inout] channel Channel data (name, description...)
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
RS_DEPRECATED_FOR(createChannelV2)
|
||||
virtual bool createChannel(RsGxsChannelGroup& channel) = 0;
|
||||
|
||||
RS_DEPRECATED_FOR(getChannelsInfo)
|
||||
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups) = 0;
|
||||
|
||||
|
|
@ -372,9 +448,29 @@ public:
|
|||
* @param[in] group Channel data (name, description...)
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
RS_DEPRECATED_FOR(createChannel)
|
||||
RS_DEPRECATED_FOR(createChannelV2)
|
||||
virtual bool createGroup(uint32_t& token, RsGxsChannelGroup& group) = 0;
|
||||
|
||||
/**
|
||||
* @brief Add a comment on a post or on another comment
|
||||
* @jsonapi{development}
|
||||
* @deprecated
|
||||
* @param[inout] comment
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
RS_DEPRECATED_FOR(createCommentV2)
|
||||
virtual bool createComment(RsGxsComment& comment) = 0;
|
||||
|
||||
/**
|
||||
* @brief Create channel post. Blocking API.
|
||||
* @jsonapi{development}
|
||||
* @deprecated
|
||||
* @param[inout] post
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
RS_DEPRECATED_FOR(createPostV2)
|
||||
virtual bool createPost(RsGxsChannelPost& post) = 0;
|
||||
|
||||
/**
|
||||
* @brief Request post creation.
|
||||
* The action is performed asyncronously, so it could fail in a subsequent
|
||||
|
|
@ -385,9 +481,19 @@ public:
|
|||
* @param[in] post
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
RS_DEPRECATED
|
||||
RS_DEPRECATED_FOR(createPostV2)
|
||||
virtual bool createPost(uint32_t& token, RsGxsChannelPost& post) = 0;
|
||||
|
||||
/**
|
||||
* @brief createVote
|
||||
* @jsonapi{development}
|
||||
* @deprecated
|
||||
* @param[inout] vote
|
||||
* @return false on error, true otherwise
|
||||
*/
|
||||
RS_DEPRECATED_FOR(createVoteV2)
|
||||
virtual bool createVote(RsGxsVote& vote) = 0;
|
||||
|
||||
/**
|
||||
* @brief Request channel change.
|
||||
* The action is performed asyncronously, so it could fail in a subsequent
|
||||
|
|
|
|||
|
|
@ -42,24 +42,35 @@ class RsGxsCircles;
|
|||
*/
|
||||
extern RsGxsCircles* rsGxsCircles;
|
||||
|
||||
enum class RsGxsCircleType : uint32_t // 32 bit overkill, just for retrocompat
|
||||
{
|
||||
UNKNOWN = 0, /// Used to detect uninizialized values.
|
||||
PUBLIC = 1, /// Public distribution
|
||||
EXTERNAL = 2, /// Restricted to an external circle
|
||||
|
||||
// TODO: convert to enum
|
||||
/// The meaning of the different circle types is:
|
||||
static const uint32_t GXS_CIRCLE_TYPE_UNKNOWN = 0x0000 ; /// Used to detect uninizialized values.
|
||||
static const uint32_t GXS_CIRCLE_TYPE_PUBLIC = 0x0001 ; // not restricted to a circle
|
||||
static const uint32_t GXS_CIRCLE_TYPE_EXTERNAL = 0x0002 ; // restricted to an external circle, made of RsGxsId
|
||||
static const uint32_t GXS_CIRCLE_TYPE_YOUR_FRIENDS_ONLY = 0x0003 ; // restricted to a subset of friend nodes of a given RS node given by a RsPgpId list
|
||||
static const uint32_t GXS_CIRCLE_TYPE_LOCAL = 0x0004 ; // not distributed at all
|
||||
static const uint32_t GXS_CIRCLE_TYPE_EXT_SELF = 0x0005 ; // self-restricted. Not used, except at creation time when the circle ID isn't known yet. Set to EXTERNAL afterwards.
|
||||
static const uint32_t GXS_CIRCLE_TYPE_YOUR_EYES_ONLY = 0x0006 ; // distributed to nodes signed by your own PGP key only.
|
||||
/** Restricted to a group of friend nodes, the administrator of the circle
|
||||
* behave as a hub for them */
|
||||
NODES_GROUP = 3,
|
||||
|
||||
LOCAL = 4, /// not distributed at all
|
||||
|
||||
/** Self-restricted. Used only at creation time of self-restricted circles
|
||||
* when the circle id isn't known yet. Once the circle id is known the type
|
||||
* is set to EXTERNAL, and the external circle id is set to the id of the
|
||||
* circle itself.
|
||||
*/
|
||||
EXT_SELF = 5,
|
||||
|
||||
/// distributed to nodes signed by your own PGP key only.
|
||||
YOUR_EYES_ONLY = 6
|
||||
};
|
||||
|
||||
// TODO: convert to enum class
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST = 0x0001 ;// user is validated by circle admin
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_SUBSCRIBED = 0x0002 ;// user has subscribed the group
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_KEY_AVAILABLE = 0x0004 ;// key is available, so we can encrypt for this circle
|
||||
static const uint32_t GXS_EXTERNAL_CIRCLE_FLAGS_ALLOWED = 0x0007 ;// user is allowed. Combines all flags above.
|
||||
|
||||
static const uint32_t GXS_CIRCLE_FLAGS_IS_EXTERNAL = 0x0008 ;// user is allowed
|
||||
|
||||
|
||||
struct RsGxsCircleGroup : RsSerializable
|
||||
{
|
||||
|
|
@ -110,8 +121,9 @@ struct RsGxsCircleMsg : RsSerializable
|
|||
struct RsGxsCircleDetails : RsSerializable
|
||||
{
|
||||
RsGxsCircleDetails() :
|
||||
mCircleType(GXS_CIRCLE_TYPE_EXTERNAL), mAmIAllowed(false) {}
|
||||
~RsGxsCircleDetails() {}
|
||||
mCircleType(static_cast<uint32_t>(RsGxsCircleType::EXTERNAL)),
|
||||
mAmIAllowed(false) {}
|
||||
~RsGxsCircleDetails() override {}
|
||||
|
||||
RsGxsCircleId mCircleId;
|
||||
std::string mCircleName;
|
||||
|
|
@ -264,3 +276,34 @@ public:
|
|||
RS_DEPRECATED_FOR("editCircle, inviteIdsToCircle")
|
||||
virtual void updateGroup(uint32_t &token, RsGxsCircleGroup &group) = 0;
|
||||
};
|
||||
|
||||
|
||||
/// @deprecated Used to detect uninizialized values.
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::UNKNOWN")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_UNKNOWN = 0x0000;
|
||||
|
||||
/// @deprecated not restricted to a circle
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::PUBLIC")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_PUBLIC = 0x0001;
|
||||
|
||||
/// @deprecated restricted to an external circle, made of RsGxsId
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::EXTERNAL")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_EXTERNAL = 0x0002;
|
||||
|
||||
/// @deprecated restricted to a subset of friend nodes of a given RS node given
|
||||
/// by a RsPgpId list
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::NODES_GROUP")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_YOUR_FRIENDS_ONLY = 0x0003;
|
||||
|
||||
/// @deprecated not distributed at all
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::LOCAL")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_LOCAL = 0x0004;
|
||||
|
||||
/// @deprecated self-restricted. Not used, except at creation time when the
|
||||
/// circle ID isn't known yet. Set to EXTERNAL afterwards.
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::EXT_SELF")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_EXT_SELF = 0x0005;
|
||||
|
||||
/// @deprecated distributed to nodes signed by your own PGP key only.
|
||||
RS_DEPRECATED_FOR("RsGxsCircleType::YOUR_EYES_ONLY")
|
||||
static const uint32_t GXS_CIRCLE_TYPE_YOUR_EYES_ONLY = 0x0006;
|
||||
|
|
|
|||
|
|
@ -19,11 +19,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#ifndef RETROSHARE_GXS_COMMON_OBJS_INTERFACE_H
|
||||
#define RETROSHARE_GXS_COMMON_OBJS_INTERFACE_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
|
|
@ -79,10 +77,12 @@ struct RsGxsImage : RsSerializable
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
#define GXS_VOTE_NONE 0x0000
|
||||
#define GXS_VOTE_DOWN 0x0001
|
||||
#define GXS_VOTE_UP 0x0002
|
||||
enum class RsGxsVoteType : uint32_t
|
||||
{
|
||||
NONE = 0, /// Used to detect unset vote?
|
||||
DOWN = 1, /// Negative vote
|
||||
UP = 2 /// Positive vote
|
||||
};
|
||||
|
||||
|
||||
// Status Flags to indicate Voting....
|
||||
|
|
@ -181,7 +181,11 @@ struct RsGxsCommentService
|
|||
std::pair<RsGxsGroupId, RsGxsMessageId>& msgId ) = 0;
|
||||
};
|
||||
|
||||
/// @deprecated use RsGxsVoteType::NONE instead @see RsGxsVoteType
|
||||
#define GXS_VOTE_NONE 0x0000
|
||||
|
||||
/// @deprecated use RsGxsVoteType::DOWN instead @see RsGxsVoteType
|
||||
#define GXS_VOTE_DOWN 0x0001
|
||||
|
||||
#endif
|
||||
|
||||
/// @deprecated use RsGxsVoteType::UP instead @see RsGxsVoteType
|
||||
#define GXS_VOTE_UP 0x0002
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* libretroshare: retroshare core library *
|
||||
* *
|
||||
* Copyright 2011 by Christopher Evi-Parker *
|
||||
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
|
|
@ -20,9 +20,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef RSGXSIFACEIMPL_H
|
||||
#define RSGXSIFACEIMPL_H
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
|
@ -292,19 +290,51 @@ protected:
|
|||
* Useful for blocking API implementation.
|
||||
* @param[in] token token associated to the request caller is waiting for
|
||||
* @param[in] maxWait maximum waiting time in milliseconds
|
||||
* @param[in] checkEvery time in millisecond between status checks
|
||||
*/
|
||||
RsTokenService::GxsRequestStatus waitToken(
|
||||
uint32_t token,
|
||||
std::chrono::milliseconds maxWait = std::chrono::milliseconds(500) )
|
||||
std::chrono::milliseconds maxWait = std::chrono::milliseconds(500),
|
||||
std::chrono::milliseconds checkEvery = std::chrono::milliseconds(2))
|
||||
{
|
||||
#if defined(__ANDROID__) && (__ANDROID_API__ < 24)
|
||||
auto wkStartime = std::chrono::steady_clock::now();
|
||||
int maxWorkAroundCnt = 10;
|
||||
LLwaitTokenBeginLabel:
|
||||
#endif
|
||||
auto timeout = std::chrono::steady_clock::now() + maxWait;
|
||||
auto st = requestStatus(token);
|
||||
while( !(st == RsTokenService::FAILED || st >= RsTokenService::COMPLETE)
|
||||
&& std::chrono::steady_clock::now() < timeout )
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
std::this_thread::sleep_for(checkEvery);
|
||||
st = requestStatus(token);
|
||||
}
|
||||
|
||||
#if defined(__ANDROID__) && (__ANDROID_API__ < 24)
|
||||
/* Work around for very slow/old android devices, we don't expect this
|
||||
* to be necessary on newer devices. If it take unreasonably long
|
||||
* something worser is already happening elsewere and we return anyway.
|
||||
*/
|
||||
if( st > RsTokenService::FAILED && st < RsTokenService::COMPLETE
|
||||
&& maxWorkAroundCnt-- > 0 )
|
||||
{
|
||||
maxWait *= 10;
|
||||
checkEvery *= 3;
|
||||
std::cerr << __PRETTY_FUNCTION__ << " Slow Android device "
|
||||
<< " workaround st: " << st
|
||||
<< " maxWorkAroundCnt: " << maxWorkAroundCnt
|
||||
<< " maxWait: " << maxWait.count()
|
||||
<< " checkEvery: " << checkEvery.count() << std::endl;
|
||||
goto LLwaitTokenBeginLabel;
|
||||
}
|
||||
std::cerr << __PRETTY_FUNCTION__ << " lasted: "
|
||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now() - wkStartime ).count()
|
||||
<< "ms" << std::endl;
|
||||
|
||||
#endif
|
||||
|
||||
return st;
|
||||
}
|
||||
|
||||
|
|
@ -312,5 +342,3 @@ private:
|
|||
RsGxsIface& mGxs;
|
||||
RsTokenService& mTokenService;
|
||||
};
|
||||
|
||||
#endif // RSGXSIFACEIMPL_H
|
||||
|
|
|
|||
|
|
@ -121,15 +121,14 @@ public:
|
|||
|
||||
enum GxsRequestStatus : uint8_t
|
||||
{
|
||||
FAILED,
|
||||
PENDING,
|
||||
PARTIAL,
|
||||
COMPLETE,
|
||||
DONE, /// Once all data has been retrived
|
||||
CANCELLED
|
||||
FAILED = 0,
|
||||
PENDING = 1,
|
||||
PARTIAL = 2,
|
||||
COMPLETE = 3,
|
||||
DONE = 4, /// Once all data has been retrived
|
||||
CANCELLED = 5
|
||||
};
|
||||
|
||||
|
||||
RsTokenService() {}
|
||||
virtual ~RsTokenService() {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue