Skip to content

Commit

Permalink
Add IWebBrowserExt interface, remove the old .json file
Browse files Browse the repository at this point in the history
  • Loading branch information
VeithMetro committed Feb 7, 2025
1 parent a5fea3e commit 20ff732
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 110 deletions.
34 changes: 29 additions & 5 deletions interfaces/IBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ namespace Exchange {
virtual void VisibilityChange(const bool hidden) = 0;
// @brief Notifies that the web page requests to close its window
virtual void PageClosure() = 0;
/* @json:omit */
// @brief A Base64 encoded JSON message from legacy $badger bridge
// @param Requested action
virtual void BridgeQuery(const string& message) = 0;
};

Expand All @@ -114,10 +115,12 @@ namespace Exchange {
// @param fps: Current FPS
virtual uint32_t FPS(uint8_t& fps /* @out */) const = 0;

/* @json:omit */
virtual uint32_t HeaderList(string& headerlist /* @out */) const = 0;
/* @json:omit */
virtual uint32_t HeaderList(const string& headerlist ) = 0;
// @property
// @text headers
// @brief Headers to send on all requests that the browser makes
// @param Single string containing a list of headers
virtual Core::hresult HeaderList(string& headerlist /* @out @opaque */) const = 0;
virtual Core::hresult HeaderList(const string& headerlist /* @opaque */) = 0;

// @property
// @brief UserAgent string used by the browser
Expand Down Expand Up @@ -151,6 +154,27 @@ namespace Exchange {
virtual uint32_t CollectGarbage() = 0;
};

// @json 1.0.0 @text:legacy_lowercase @uncompliant:extended
struct EXTERNAL IWebBrowserExt : virtual public Core::IUnknown {

enum { ID = ID_WEB_BROWSER_EXT };

using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;

// @brief Removes contents of a directory from the persistent storage
// @alt:deprecated delete
// @description Use this method to recursively delete contents of a directory
// @param Path to directory (within the persistent storage) to delete contents of (e.g. .cache/wpe/disk-cache)
// @retval ERROR_UNKNOWN_KEY The given path cannot be empty
virtual Core::hresult DeleteDir(const string& path) = 0;

// @property
// @brief User preferred languages
virtual Core::hresult Languages(IStringIterator*& languages /* @out */) const = 0;
virtual Core::hresult Languages(IStringIterator* const languages) = 0;

};

// @json 1.0.0 @uncompliant:extended
struct EXTERNAL IBrowserResources : virtual public Core::IUnknown {

Expand Down
1 change: 1 addition & 0 deletions interfaces/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace Exchange {
ID_BROWSER_SCRIPTING = ID_BROWSER + 7,
ID_BROWSER_COOKIEJAR = ID_BROWSER + 8,
ID_BROWSER_COOKIEJAR_NOTIFICATION = ID_BROWSER + 9,
ID_WEB_BROWSER_EXT = ID_BROWSER + 10,

ID_POWER = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x010,
ID_POWER_NOTIFICATION = ID_POWER + 1,
Expand Down
105 changes: 0 additions & 105 deletions jsonrpc/WebKitBrowser.json

This file was deleted.

0 comments on commit 20ff732

Please sign in to comment.