Skip to content

Commit

Permalink
Json meta to IDL changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Nov 5, 2024
1 parent 9bb995b commit 5064240
Show file tree
Hide file tree
Showing 9 changed files with 423 additions and 102 deletions.
10 changes: 10 additions & 0 deletions definitions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ set(WORKING_VARIABLE ${JSONRPC_PATTERNS})
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/jsonrpc/")
file(GLOB JSON_FILE ${WORKING_VARIABLE})

if(NOT ENABLE_LEGACY_INTERFACE_SUPPORT)
list(REMOVE_ITEM JSON_FILE
"${CMAKE_SOURCE_DIR}/jsonrpc/DeviceInfo.json"
"${CMAKE_SOURCE_DIR}/jsonrpc/Monitor.json"
"${CMAKE_SOURCE_DIR}/jsonrpc/OCDM.json"
"${CMAKE_SOURCE_DIR}/jsonrpc/SecurityAgent.json"
"${CMAKE_SOURCE_DIR}/jsonrpc/StateControl.json"
)
endif()

separate_arguments(JSONRPC_PATTERNS)
set(WORKING_VARIABLE ${JSONRPC_PATTERNS})
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/qa_jsonrpc/")
Expand Down
2 changes: 2 additions & 0 deletions definitions/Definitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ ENUM_CONVERSION_BEGIN(Exchange::IBrightness::Brightness)
{ Exchange::IBrightness::SdrToHdrGraphicsBrightness_Max, _TXT("max") },
ENUM_CONVERSION_END(Exchange::IBrightness::Brightness)

#if ENABLE_LEGACY_INTERFACE_SUPPORT
ENUM_CONVERSION_BEGIN(Exchange::IDeviceAudioCapabilities::AudioOutput)
{ Exchange::IDeviceAudioCapabilities::AudioOutput::AUDIO_OTHER, _TXT("OTHER") },
{ Exchange::IDeviceAudioCapabilities::AudioOutput::AUDIO_ANALOG, _TXT("ANALOG") },
Expand Down Expand Up @@ -264,6 +265,7 @@ ENUM_CONVERSION_BEGIN(Exchange::IDeviceVideoCapabilities::CopyProtection)
{ Exchange::IDeviceVideoCapabilities::CopyProtection::HDCP_21, _TXT("2.1") },
{ Exchange::IDeviceVideoCapabilities::CopyProtection::HDCP_22, _TXT("2.2") },
ENUM_CONVERSION_END(Exchange::IDeviceVideoCapabilities::CopyProtection)
#endif

ENUM_CONVERSION_BEGIN(Exchange::IValuePoint::basic)
{ Exchange::IValuePoint::basic::regulator, _TXT("regulator") },
Expand Down
27 changes: 25 additions & 2 deletions interfaces/IBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ namespace Exchange {
ONLY_FROM_MAIN_DOCUMENT_DOMAIN = 2 /* @text:onlyfrommaindocumentdomain */,
EXCLUSIVELY_FROM_MAIN_DOCUMENT_DOMAIN = 3 /* @text:exclusivelyfrommaindocumentdomain */
};


struct HeadersInfo {
string name /* @brief Header name */;
string value /* @brief Header value */;
};

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

// @event @uncompliant:extended // NOTE: extended format is deprecated!! Do not just copy this line!
struct INotification : virtual public Core::IUnknown {
enum { ID = ID_WEBKITBROWSER_NOTIFICATION };
Expand All @@ -90,8 +98,12 @@ 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 message BridgeQuery string
virtual void BridgeQuery(const string& message) = 0;
// @brief Signals a state change of the Browser
// @param suspended Suspended(true) or Resumed (false)
virtual void StateChange(const bool& suspended) = 0;
};

virtual void Register(INotification* sink) = 0;
Expand Down Expand Up @@ -149,6 +161,17 @@ namespace Exchange {

// @brief Initiate garbage collection
virtual uint32_t CollectGarbage() = 0;
// @brief Delete directory
// @param path: Path to be deleted
virtual uint32_t Delete(const string& path) = 0;
// @property
// @brief Languages: Browser prefered languages
virtual uint32_t Languages(IStringIterator*& languages /* @out */) const = 0;
virtual uint32_t Languages(IStringIterator* const languages) = 0;
// @property
// @brief Headers: Headers to send on all requests that the browser makes
virtual uint32_t Headers(IHeadersIterator*& headers /* @out */) const = 0;
virtual uint32_t Headers(IHeadersIterator* const headers) = 0;
};

// @json 1.0.0 @uncompliant:extended
Expand Down
2 changes: 1 addition & 1 deletion interfaces/IContentDecryption.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace Exchange {
/* @event */
struct EXTERNAL INotification : virtual public Core::IUnknown {

enum {ID = ID_CONTENTDECRYPTION_NOTIFICATION};
enum { ID = ID_CONTENTDECRYPTION_NOTIFICATION };

/* @brief initialization status. */
virtual void initializationStatus(const std::string& drm,
Expand Down
Loading

0 comments on commit 5064240

Please sign in to comment.