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 27, 2024
1 parent 0e0bee6 commit 027c25c
Show file tree
Hide file tree
Showing 9 changed files with 759 additions and 354 deletions.
33 changes: 23 additions & 10 deletions definitions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ 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 All @@ -60,6 +50,29 @@ set(WORKING_VARIABLE ${INTERFACES_PATTERNS})
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/qa_interfaces/")
file(GLOB QA_INTERFACE_FILE ${WORKING_VARIABLE})

if(NOT ENABLE_LEGACY_INTERFACE_SUPPORT)
list(REMOVE_ITEM JSON_FILE "${CMAKE_SOURCE_DIR}/jsonrpc/DeviceInfo.json")
list(REMOVE_ITEM JSON_FILE "${CMAKE_SOURCE_DIR}/jsonrpc/Monitor.json")
list(REMOVE_ITEM JSON_FILE "${CMAKE_SOURCE_DIR}/jsonrpc/OCDM.json")
list(REMOVE_ITEM JSON_FILE "${CMAKE_SOURCE_DIR}/jsonrpc/SecurityAgent.json")
list(REMOVE_ITEM JSON_FILE "${CMAKE_SOURCE_DIR}/jsonrpc/StateControl.json")
list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfo.h")
list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/IBrowser.h")
else()
list(REMOVE_ITEM INTERFACE_FILE
"${CMAKE_SOURCE_DIR}/interfaces/IBrowserExt.h"
"${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfoExt.h"
"${CMAKE_SOURCE_DIR}/interfaces/IMonitor.h"
"${CMAKE_SOURCE_DIR}/interfaces/IOCDM.h"
"${CMAKE_SOURCE_DIR}/interfaces/ISecurityAgent.h")
# list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/IBrowserExt.h")
# list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfoExt.h")
# list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/IMonitor.h")
# list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/IOCDM.h")
# list(REMOVE_ITEM INTERFACE_FILE "${CMAKE_SOURCE_DIR}/interfaces/ISecurityAgent.h")
endif()

#message("interfaces " ${INTERFACE_FILE})
set(PUBLIC_HEADERS "definitions.h" "ValuePoint.h" "Module.h")

if(NOT GENERATOR_SEARCH_PATH)
Expand Down
6 changes: 6 additions & 0 deletions definitions/Definitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
#include <interfaces/IContentDecryption.h>
#include <interfaces/ICryptography.h>
#include <interfaces/ICustomerCareOperations.h>

#if defined(ENABLE_LEGACY_INTERFACE_SUPPORT)
#include <interfaces/IDeviceInfo.h>
#else
#include <interfaces/IDeviceInfoExt.h>
#endif

#include <interfaces/IDictionary.h>
#include <interfaces/IDisplayInfo.h>
#include <interfaces/IDialServer.h>
Expand Down
19 changes: 19 additions & 0 deletions interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@ endif()

separate_arguments(INTERFACES_PATTERNS)
file(GLOB INTERFACES_HEADERS ${INTERFACES_PATTERNS})
if(NOT ENABLE_LEGACY_INTERFACE_SUPPORT)
list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IBrowser.h")
list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfo.h")
else()
list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IBrowserExt.h"
"${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfoExt.h"
"${CMAKE_SOURCE_DIR}/interfaces/IMonitor.h"
"${CMAKE_SOURCE_DIR}/interfaces/IOCDM.h"
"${CMAKE_SOURCE_DIR}/interfaces/ISecurityAgent.h")
# list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IBrowserExt.h")
# list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfoExt.h")
# list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IMonitor.h")
# list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/IOCDM.h")
# list(REMOVE_ITEM INTERFACES_HEADERS "${CMAKE_SOURCE_DIR}/interfaces/ISecurityAgent.h")
message("INTERFACES_HEADERS " ${INTERFACES_HEADERS})
endif()

message(" source --- ${CMAKE_SOURCE_DIR}/interfaces/IDeviceInfoExt.h")

ProxyStubGenerator(INPUT "${INTERFACES_HEADERS}" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH})

file(GLOB JSON_HEADERS json/*.h)
Expand Down
30 changes: 3 additions & 27 deletions interfaces/IBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ namespace Exchange {
EXCLUSIVELY_FROM_MAIN_DOCUMENT_DOMAIN = 3 /* @text:exclusivelyfrommaindocumentdomain */
};

#if !defined(ENABLE_LEGACY_INTERFACE_SUPPORT)
struct HeaderInfo {
string name /* @brief Header name */;
string value /* @brief Header value */;
};

using IHeadersIterator = RPC::IIteratorType<HeaderInfo, ID_WEB_BROWSER_HEADERS_ITERATOR>;
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;
#endif

// @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 @@ -100,11 +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;
#if !defined(ENABLE_LEGACY_INTERFACE_SUPPORT)
// @brief A Base64 encoded JSON message from legacy $badger bridge
// @param message BridgeQuery string
/* @json:omit */
virtual void BridgeQuery(const string& message) = 0;
#endif
};

virtual void Register(INotification* sink) = 0;
Expand All @@ -128,9 +115,9 @@ namespace Exchange {
virtual uint32_t FPS(uint8_t& fps /* @out */) const = 0;

/* @json:omit */
DEPRECATED virtual uint32_t HeaderList(string& headerlist /* @out */) const = 0;
virtual uint32_t HeaderList(string& headerlist /* @out */) const = 0;
/* @json:omit */
DEPRECATED virtual uint32_t HeaderList(const string& headerlist ) = 0;
virtual uint32_t HeaderList(const string& headerlist ) = 0;

// @property
// @brief UserAgent string used by the browser
Expand Down Expand Up @@ -162,17 +149,6 @@ namespace Exchange {

// @brief Initiate garbage collection
virtual uint32_t CollectGarbage() = 0;

#if !defined(ENABLE_LEGACY_INTERFACE_SUPPORT)
// @property
// @brief Browser prefered languages
virtual uint32_t Languages(IStringIterator*& languages /* @out */) const = 0;
virtual uint32_t Languages(IStringIterator* const languages) = 0;
// @property
// @brief 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;
#endif
};

// @json 1.0.0 @uncompliant:extended
Expand Down
Loading

0 comments on commit 027c25c

Please sign in to comment.