Summary:
Expose a new API to be used to check if there's an open connection with Flipper Desktop.
Changelog: new FlipperClient isConnected API
Reviewed By: antonk52
Differential Revision: D46841095
fbshipit-source-id: 82a60f52496fb218cb50c6a28d7ffe7225ae23aa
Summary:
folly::dynamic, std::string, implicit constructors and method overloading is not a good combination.
This renames the send method to sendRaw as to avoid issues with existing plugins currently sending string params.
Reviewed By: mweststrate
Differential Revision: D38827539
fbshipit-source-id: 653f62e41ebfbe93d1af25f39c81f6b05bf84cb4
Summary:
For C++, folly::dynamic is used throughout.
On iOS and Android though, Flipper goes through multiple conversions to get to a folly::dynamic only to ultimately obtain a JSON string from it.
Let's take a look at Android:
There are multiple types like FlipperObject, FlipperArray that wrap around a JSONObject.
When data needs to be sent:
1. The JSONObject is asked for its string representation.
2. The string representation is then parsed by folly to construct the folly::dynamic instance.
3. The step above involves an extra boundary cross through JNI.
4. Ultimately, a socket or ws connection does not understand folly::dynamic so we then get a JSON string representation from it.
5. Data is sent.
As described above, for big enough objects, this represents an issue.
So, the idea of this change, is to allow plugins to send a JSON string instead. This will remove a few serialisation/deserialisation steps from the process.
*Note: this API is not currently used by anything so there's no impact to existing plugins.*
Changelog: expose a send method that accept a string as params
Reviewed By: LukeDefeo
Differential Revision: D38741582
fbshipit-source-id: 78e0acd80fc8c97378ee986cbaf377078996ed60
Summary:
This diff adds a toggle setting in wilde which will enable certificate exchange through www.
Right now it just sends the information about which medium to be used for cert exchange to Flipper JS and its client side. But its implementation is not done yet.
### Flow for Wilde
Whenever user changes the setting(or when user logs out) we set the state of exchange medium and accordingly set/reset authtoken. Note at no given point we remove already existing certificates.
### Context for OSS
With this diff we introduce another way to do certificate exchange. Before this diff, we did certificate exchange by accessing the file system of app. But it turns out it's not possible to do that in applications signed by enterprise certs. Thus with this diff one can write their FlipperKitCertificateProvider and fetch the certificate from WWW.
Reviewed By: jknoxville
Differential Revision: D22896320
fbshipit-source-id: 55aef7028a62e71ba9c02f9f79acaab41d09c0c6
Summary:
`/*` is the standard throughout open source code. For example, Firefox uses single /*: https://hg.mozilla.org/mozilla-central/file/21d22b2f541258d3d1cf96c7ba5ad73e96e616b5/gfx/ipc/CompositorWidgetVsyncObserver.cpp#l3
In addition, Rust considers `/**` to be a doc comment (similar to Javadoc) and having such a comment at the beginning of the file causes `rustc` to barf.
Note that some JavaScript tooling requires `/**`. This is OK since JavaScript files were not covered by the linter in the first place, but it would be good to have that tooling fixed too.
Reviewed By: zertosh
Differential Revision: D15640366
fbshipit-source-id: b4ed4599071516364d6109720750d6a43304c089
Summary:
Changing FlipperRSocketResponder to only use public parts of FlipperConnectionManagerImpl.
This means we can test it by injecting a FCM mock, and it can use its public interface.
Reviewed By: passy
Differential Revision: D14000078
fbshipit-source-id: c0431a888b0ca041807631c81b99fb8b947274d6
Summary:
Flipper exposes a call() api to plugins which lets them call their sdk component, and it returns a promise with the response.
Currently this is done by sending a fireAndForget request, noting the id of the request, and then receiving fireAndForget requests and matching up the ids to give the result back to the right plugin promise.
Instead, it will be simpler to use rsocket requestResponse, instead of fireAndForget, which is for this exact use case. This diff adds a requestResponse handler to the SDK, so that it can deal with such requests and respond accordingly, while preserving the current functionality if it receives a fireAndForget.
So this part is backwards compatible and should be safe to land in isolation.
A later diff will change the desktop app to use requestResponse, which may not be backwards compatible, so that will have to be deployed more carefully.
Reviewed By: passy
Differential Revision: D13974049
fbshipit-source-id: b371d94a86b1f186375161ed8f2242a462ce418f
Summary:
Part of Sonar -> Flipper rename.
It's about time this is renamed from *Websocket as well, since it doesn't use websockets anymore.
Reviewed By: passy
Differential Revision: D9919695
fbshipit-source-id: 78a63bfb7d5de19c093b7fb775d1426b4fc58f77