Commit Graph

7 Commits

Author SHA1 Message Date
Gioacchino Mazzurco
46266c8575 JSON API close restbed session before shutting down 2018-09-01 15:54:11 +02:00
Gioacchino Mazzurco
2b2069d1c4 Prevent crash calling uninitialized service via JSON API 2018-09-01 15:29:09 +02:00
Gioacchino Mazzurco
041afcc74d Improve API
Manually expose /rsFiles/getFileData to stream/preview files
Automatically expose a bunch of methods via JSON API
Implement serial_process for std::pair
2018-08-23 01:39:26 +02:00
Gioacchino Mazzurco
f8f49d849f 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
d2742f9583 Experiment of notification via NotifyClient + JSON API 2018-07-23 14:52:17 +02:00
Gioacchino Mazzurco
21fdabe005 Extend JSON API to shutdown retroshare gracefully 2018-06-28 15:04:06 +02:00
Gioacchino Mazzurco
16eacb36d1 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