Commit Graph

18 Commits

Author SHA1 Message Date
Gioacchino Mazzurco
0f01f110ad
jsonapi-generator fix param initialization on Android
without this patch Android compilation would fail in cases like
RsPeerId sslid(RsPeerId());
2018-10-04 23:37:39 +02:00
Gioacchino Mazzurco
f26a0c793e
jsonapi-generator Fix warning that cause errors on mageia 2018-10-03 18:17:29 +02:00
Gioacchino Mazzurco
359e11433b
jsonapi-generator add missing include 2018-09-25 20:09:06 +02:00
G10h4ck
f09bef2ac8
Merge pull request #1349 from G10h4ck/jsonapi
Implement JSON API HTTP Basic authentication
2018-09-25 18:10:16 +02:00
zapek
458a8b0878 fixed JSONAPI build for Windows 2018-09-20 22:24:05 +02:00
Gioacchino Mazzurco
eb77f921ec
Implement JSON API HTTP Basic authentication
jsonapi-generator is now capable of generating API for headers outside
  retroshare/ directory
jsonapi-generator do a bit of methods parameter sanity check
JsonApiServer is now integrated in the rsinit hell like other services
Add *::exportGPGKeyPairToString to a bunch of classes in cascade
RsControl is now capable of calling back a function when retroshare is almost
  completely stopped, this is useful when running retroshare toghether with
  externally managed runloop such as QCoreApplication
Expose a bunch of methods through JSON API
retroshare-nogui remove some dead code and fix stopping from the RetroShare API
2018-09-19 21:28:26 +02:00
Gioacchino Mazzurco
148e46346d
JSON API accessible via HTTP GET method
This is useful in cases where the client cannot use POST method.
/jsonApiServer/shutdown now reply before shutting down the core.
2018-09-12 23:40:34 +02:00
Gioacchino Mazzurco
5245765964
JSON API expose retroshare version
Added a couple of macro to reduce boilerplate in manually written API
wrappers, use them in auto-generated wrappers too
2018-09-12 10:49:37 +02:00
Gioacchino Mazzurco
7a37c11e47
Prevent crash calling uninitialized service via JSON API 2018-09-01 15:29:09 +02:00
Gioacchino Mazzurco
a9b1a15b43
jsonapi-generator handle multiple services per file
Before this commit jsonapi-generator was able to parse only one service
instance pointer per file, so only the first one got exposed now it
handle also files where more then one service instance pointer is
declared
2018-08-30 19:02:50 +02:00
Gioacchino Mazzurco
40c2a8e469
Improve JSON API documentation following Cyril suggestion 2018-08-28 14:05:02 +02:00
Gioacchino Mazzurco
1dfe64443f
Improve documentation 2018-08-26 11:39:26 +02:00
Gioacchino Mazzurco
8fd903ac90
Improve JSON API documentation 2018-08-25 22:36:47 +02:00
Gioacchino Mazzurco
e878ba99b2
Add support for default parameters value in jsonapi-generator 2018-08-25 22:24:49 +02:00
Gioacchino Mazzurco
4b6f751b09
Implement JSON API generation for async API calls
Move JSON helpers to util/rsjson.* for better usability
Implement JSON ostream manipulator to print compact and pretty JSON
Use lambdas for API wrappers, integrate better and avoid namespace
  pollution
Removed experimental JSON API for notify client wrapper, notifications
  can be implemented automatically with moderns async API calls
Implement and automatically expose to JSON API
  RsGxsChannels::turtleSearchRequest(
        const std::string& matchString,
        const std::function<void (const RsGxsGroupSummary&)>& multiCallback,
        std::time_t maxWait )
2018-08-16 23:48:21 +02:00
Gioacchino Mazzurco
d14a455cf1
jsonapi-generator fix support for void methods
Thanks sehraf for reporting
retroshare://forum?name=fucking%20genius&id=8fd22bd8f99754461e7ba1ca8a727995&msgid=503d75bf7ed7fa7568eeae4db5c8d31a7e124c98
2018-06-26 22:01:17 +02:00
Gioacchino Mazzurco
15f39129f1
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
2018-06-26 13:20:24 +02:00
Gioacchino Mazzurco
7ad337c8d2
Implement automatic JSON API generation
qmake file add jsonapi-generator target to compile JSON API generator
qmake files add rs_jsonapi CONFIG option to enable/disable JSON API at compile
  time
RsTypeSerializer pass down same serialization flags when creating new context
  for nested objects serial job
RsGxsChannels expose a few methods through JSON API as example
Derive a few GXS types (RsGxsChannelGroup, RsGxsChannelPost, RsGxsFile,
  RsMsgMetaData) from RsSerializables so they can be used for the JSON API
Create RsGenericSerializer::SERIALIZATION_FLAG_YIELDING so JSON objects that
  miss some fields can be still deserialized, this improve API usability
SerializeContext offer friendly constructor with default paramethers
Add restbed 4.6 library as git submodule as most systems doesn't have it yet
Add a bit of documentation about JSON API into jsonapi-generator/README.adoc
Add JsonApiServer class to expose the JSON API via HTTP protocol
2018-06-24 16:28:33 +02:00