Binary Ninja API C++: BinaryNinja::CoreDownloadInstance Class Reference
Public Member Functions | |
| CoreDownloadInstance (BNDownloadInstance *instance) | |
| virtual | ~CoreDownloadInstance () |
| virtual int | PerformRequest (const std::string &url) override |
| Virtual method to synchronously perform a GET request to a url, overridden by a subclass. | |
| virtual int | PerformCustomRequest (const std::string &method, const std::string &url, const std::unordered_map< std::string, std::string > &headers, DownloadInstance::Response &response) override |
| Virtual method to synchronously perform a request to a url, overridden by a subclass. | |
| Public Member Functions inherited from BinaryNinja::DownloadInstance | |
| int | PerformRequest (const std::string &url, BNDownloadInstanceOutputCallbacks *callbacks) |
| Send a GET request to a url, synchronously. | |
| int | PerformCustomRequest (const std::string &method, const std::string &url, const std::unordered_map< std::string, std::string > &headers, Response &response, BNDownloadInstanceInputOutputCallbacks *callbacks) |
| Send a request to a url, synchronously. | |
| std::string | GetError () const |
| Retrieve the error from the last request sent by this instance. | |
| Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDownloadInstance, BNNewDownloadInstanceReference, BNFreeDownloadInstance > | |
| CoreRefCountObject () | |
| virtual | ~CoreRefCountObject () |
| BNDownloadInstance * | GetObject () const |
| void | AddRef () |
| void | Release () |
| void | AddRefForRegistration () |
| void | ReleaseForRegistration () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Additional Inherited Members | |
| Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNDownloadInstance, BNNewDownloadInstanceReference, BNFreeDownloadInstance > | |
| std::atomic< int > | m_refs |
| bool | m_registeredRef |
| BNDownloadInstance * | m_object |
| Protected Member Functions inherited from BinaryNinja::DownloadInstance | |
| DownloadInstance (DownloadProvider *provider) | |
| DownloadInstance (BNDownloadInstance *instance) | |
| virtual void | DestroyInstance () |
| Cleanup any resources created by the instance. | |
| int64_t | ReadDataCallback (uint8_t *data, uint64_t len) |
| uint64_t | WriteDataCallback (uint8_t *data, uint64_t len) |
| bool | NotifyProgressCallback (uint64_t progress, uint64_t total) |
| void | SetError (const std::string &error) |
| Static Protected Member Functions inherited from BinaryNinja::DownloadInstance | |
| static void | DestroyInstanceCallback (void *ctxt) |
| static int | PerformRequestCallback (void *ctxt, const char *url) |
| static int | PerformCustomRequestCallback (void *ctxt, const char *method, const char *url, uint64_t headerCount, const char *const *headerKeys, const char *const *headerValues, BNDownloadInstanceResponse **response) |
| static void | PerformFreeResponse (void *ctxt, BNDownloadInstanceResponse *response) |
◆ ~CoreDownloadInstance()
|
inlinevirtual |
◆ PerformRequest()
|
overridevirtual |
Virtual method to synchronously perform a GET request to a url, overridden by a subclass.
- Parameters
- Returns
- Zero on successful request, negative on failed request
Implements BinaryNinja::DownloadInstance.
◆ PerformCustomRequest()
|
overridevirtual |
Virtual method to synchronously perform a request to a url, overridden by a subclass.
- Parameters
-
method Request method e.g. GET url Full url to request headers HTTP headers as keys/values response Structure into which the response status code and headers should be stored
- Returns
- Zero on successful request, negative on failed request
Implements BinaryNinja::DownloadInstance.