Complete GxsChannels JSON API with blocking methods

RsGxsIfaceHelper::requestStatus expose it to JSON API
Implemented RsGxsIfaceHelper::waitToken to wait for GXS operations
RsItem::serial_process fix doxygen warning as it's a comment not documentation
RsTypeSerializer add JSON conversion methods for double [de]serialization not
	implemented yet
RsTypeSerializer_PRIVATE_{FROM,TO}_JSON_ARRAY fix doxygen warning as it's a
	comment not documentation
make GxsChannels::ExtraFileHash a bit more reasonable
jsonapi-generator fix unused variable warning if there is no input or output
	paramethers
jsonapi-generator fix generation for inerithed jsonapi methods
Convert to RsSerializable some Gxs structs for the JSON API
This commit is contained in:
Gioacchino Mazzurco 2018-06-26 13:20:24 +02:00
parent d731b665db
commit 15f39129f1
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
13 changed files with 316 additions and 82 deletions

View file

@ -94,17 +94,23 @@ namespace GXS_SERV {
class RsGxsVote
struct RsGxsVote : RsSerializable
{
public:
RsGxsVote();
RsMsgMetaData mMeta;
uint32_t mVoteType;
/// @see RsSerializable
virtual void serial_process( RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx )
{
RS_SERIAL_PROCESS(mMeta);
RS_SERIAL_PROCESS(mVoteType);
}
};
class RsGxsComment
struct RsGxsComment : RsSerializable
{
public:
RsGxsComment();
RsMsgMetaData mMeta;
std::string mComment;
@ -119,6 +125,19 @@ class RsGxsComment
// This is filled in if detailed Comment Data is called.
std::list<RsGxsVote> mVotes;
/// @see RsSerializable
virtual void serial_process( RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx )
{
RS_SERIAL_PROCESS(mMeta);
RS_SERIAL_PROCESS(mComment);
RS_SERIAL_PROCESS(mUpVotes);
RS_SERIAL_PROCESS(mDownVotes);
RS_SERIAL_PROCESS(mScore);
RS_SERIAL_PROCESS(mOwnVote);
RS_SERIAL_PROCESS(mVotes);
}
const std::ostream &print(std::ostream &out, std::string indent = "", std::string varName = "") const {
out << indent << varName << " of RsGxsComment Values ###################" << std::endl;
mMeta.print(out, indent + " ", "mMeta");