diff options
| author | Mason Reed <mason@vector35.com> | 2025-07-13 14:39:14 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-07-15 12:34:43 -0400 |
| commit | 4a49ba509bdc0b4ffa650fc8461738c2085161c7 (patch) | |
| tree | 0c55d84afde06cfe1416f8f199df985b41a0f1ff /plugins/warp/api/warp.cpp | |
| parent | 9c80b724bc28eca0b1b4fad1b955d4fd2ba48ab5 (diff) | |
[WARP] Add network container
This is going to be disabled by default on this upcoming stable, however users may enable it once we deploy the public server. The data from the server is done through `Container::fetch_functions` independent of the nonblocking function lookup functions.
The sidebar has been updated to drive fetching so that when users navigate to a new function the fetcher will kick off. This fetcher operates on a separate thread, in the event of a user navigating to many functions before the current fetch has completed they all will be batched together in a single fetch.
Networked container currently is limited to just function prototypes, other type information separate from the function object will be omitted.
Diffstat (limited to 'plugins/warp/api/warp.cpp')
| -rw-r--r-- | plugins/warp/api/warp.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/warp/api/warp.cpp b/plugins/warp/api/warp.cpp index 147add8e..52c7ea9d 100644 --- a/plugins/warp/api/warp.cpp +++ b/plugins/warp/api/warp.cpp @@ -249,6 +249,16 @@ bool Container::RemoveTypes(const Source &source, const std::vector<TypeGUID> &g return result; } +void Container::FetchFunctions(const Target &target, const std::vector<FunctionGUID> &guids) const +{ + size_t count = guids.size(); + BNWARPFunctionGUID *apiGuids = new BNWARPFunctionGUID[count]; + for (size_t i = 0; i < count; i++) + apiGuids[i] = *guids[i].Raw(); + BNWARPContainerFetchFunctions(m_object, target.m_object, apiGuids, count); + delete[] apiGuids; +} + std::vector<Source> Container::GetSourcesWithFunctionGUID(const Target& target, const FunctionGUID &guid) const { size_t count; |
