From 336a8a7aa6a5590e360768c2216075760ccafeec Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Fri, 8 Aug 2025 14:57:05 +0530 Subject: [PATCH 01/41] RDKEMW-6718 : Create entservices-errorcodes.h --- apis/entservices-errorcodes.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 apis/entservices-errorcodes.h diff --git a/apis/entservices-errorcodes.h b/apis/entservices-errorcodes.h new file mode 100644 index 00000000..c9008d26 --- /dev/null +++ b/apis/entservices-errorcodes.h @@ -0,0 +1,25 @@ +#include + +// 1. The single source of truth: a list of all errors. +#define ERROR_LIST \ + X(FILE_IO, "File Read or Write error") \ + X(PERMISSION_DENIED, "Permission denied") \ + +// 2. Define the 'X' macro to generate the enum. +#define X(name, string) ERROR_##name, +typedef enum { + // Start the first error code at 1000 + ERROR_BASE = 1000, + ERROR_LIST + MAX_ERROR_CODE +} ErrorCode; +// Undefine 'X' to avoid conflicts. +#undef X + +// 3. Define the 'X' macro to generate the string array. +#define X(name, string) string, +const char *error_strings[] = { + "Error base", + ERROR_LIST + "Unknown error code" +}; From 158a61cd1c282336691bf29c6aa1f594c2e0e844 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Fri, 8 Aug 2025 15:02:08 +0530 Subject: [PATCH 02/41] RDKEMW-6718:Rename entservices-errorcodes.h to entservices_errorcodes.h --- apis/{entservices-errorcodes.h => entservices_errorcodes.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apis/{entservices-errorcodes.h => entservices_errorcodes.h} (100%) diff --git a/apis/entservices-errorcodes.h b/apis/entservices_errorcodes.h similarity index 100% rename from apis/entservices-errorcodes.h rename to apis/entservices_errorcodes.h From 7f9ac2ee38fadfb974a4457895d589383615f775 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Fri, 8 Aug 2025 15:03:16 +0530 Subject: [PATCH 03/41] Update IHdcpProfile.h --- apis/HdcpProfile/IHdcpProfile.h | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/HdcpProfile/IHdcpProfile.h b/apis/HdcpProfile/IHdcpProfile.h index 3b123901..a74d0fe3 100644 --- a/apis/HdcpProfile/IHdcpProfile.h +++ b/apis/HdcpProfile/IHdcpProfile.h @@ -19,6 +19,7 @@ #pragma once #include "Module.h" + #include "entservices_errorcodes.h" namespace WPEFramework { From c676833b3cfbb46bd10d83dc82396d3425b60721 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 11 Aug 2025 10:30:34 +0530 Subject: [PATCH 04/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index c9008d26..366b0def 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -10,7 +10,7 @@ typedef enum { // Start the first error code at 1000 ERROR_BASE = 1000, - ERROR_LIST + ERROR_LIST, MAX_ERROR_CODE } ErrorCode; // Undefine 'X' to avoid conflicts. @@ -20,6 +20,6 @@ typedef enum { #define X(name, string) string, const char *error_strings[] = { "Error base", - ERROR_LIST + ERROR_LIST, "Unknown error code" }; From e50345043043d39465ad4a8c71992664964e484e Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 13 Aug 2025 17:41:48 +0530 Subject: [PATCH 05/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 366b0def..94fff1aa 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -2,11 +2,12 @@ // 1. The single source of truth: a list of all errors. #define ERROR_LIST \ - X(FILE_IO, "File Read or Write error") \ - X(PERMISSION_DENIED, "Permission denied") \ + X(ERROR_FILE_IO, "File Read or Write error") \ + X(ERROR_PERMISSION_DENIED, "Permission denied") \ +/******** PLEASE DO NOT MODIFY ANYTHING BELOW THIS **********/ // 2. Define the 'X' macro to generate the enum. -#define X(name, string) ERROR_##name, +#define X(name, string) name, typedef enum { // Start the first error code at 1000 ERROR_BASE = 1000, @@ -23,3 +24,10 @@ const char *error_strings[] = { ERROR_LIST, "Unknown error code" }; + +//4.Fetch Error strings +#define ERROR_MESSAGE(errorcode) \ + (((errorcode) >= ERROR_BASE && \ + (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ + ? error_strings[(errorcode) - ERROR_BASE] \ + : "Unknown error") From 5326630eb9d51938588557e81188f7b2d96e2642 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 13 Aug 2025 17:57:00 +0530 Subject: [PATCH 06/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 94fff1aa..5e06b257 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -11,7 +11,7 @@ typedef enum { // Start the first error code at 1000 ERROR_BASE = 1000, - ERROR_LIST, + ERROR_LIST MAX_ERROR_CODE } ErrorCode; // Undefine 'X' to avoid conflicts. @@ -21,7 +21,7 @@ typedef enum { #define X(name, string) string, const char *error_strings[] = { "Error base", - ERROR_LIST, + ERROR_LIST "Unknown error code" }; From ebde8d00f9d71a6bac55749d3c66c910d0a49e58 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Tue, 19 Aug 2025 15:50:02 +0530 Subject: [PATCH 07/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 5e06b257..4896286a 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -27,7 +27,13 @@ const char *error_strings[] = { //4.Fetch Error strings #define ERROR_MESSAGE(errorcode) \ - (((errorcode) >= ERROR_BASE && \ - (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ - ? error_strings[(errorcode) - ERROR_BASE] \ - : "Unknown error") + ({ \ + const char *msg = \ + (((errorcode) >= ERROR_BASE && \ + (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ + ? error_strings[(errorcode) - ERROR_BASE] \ + : "Unknown error"); \ + printf("[DEBUG] ErrorCode=%d -> %s\n", errorcode, msg); \ + msg; \ + }) + From 9530b304d1cec396a5f653ae3987715a9f7eb841 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Fri, 22 Aug 2025 13:22:30 +0530 Subject: [PATCH 08/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 4896286a..f35b4355 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -32,7 +32,7 @@ const char *error_strings[] = { (((errorcode) >= ERROR_BASE && \ (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ ? error_strings[(errorcode) - ERROR_BASE] \ - : "Unknown error"); \ + : ""); \ printf("[DEBUG] ErrorCode=%d -> %s\n", errorcode, msg); \ msg; \ }) From d5c39604ac17ecb81e62f47e74e8e41cef6f4344 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Fri, 22 Aug 2025 15:58:49 +0530 Subject: [PATCH 09/41] Update IPowerManager.h --- apis/PowerManager/IPowerManager.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apis/PowerManager/IPowerManager.h b/apis/PowerManager/IPowerManager.h index b617976d..b8c0c564 100755 --- a/apis/PowerManager/IPowerManager.h +++ b/apis/PowerManager/IPowerManager.h @@ -100,7 +100,7 @@ namespace WPEFramework virtual void OnRebootBegin(const string &rebootReasonCustom, const string &rebootReasonOther, const string &rebootRequestor) {}; }; virtual Core::hresult Register(Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(const Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0; // @event struct EXTERNAL IModePreChangeNotification : virtual public Core::IUnknown @@ -119,7 +119,7 @@ namespace WPEFramework // @brief Unregister for Power Mode pre-change event // IMPORTANT: If client is also engaged in power mode pre-change operation (requested via AddPowerModePreChangeClient API), // make sure to disengage (using RemovePowerModePreChangeClient API) before calling Unregister. - virtual Core::hresult Unregister(const IModePreChangeNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(IModePreChangeNotification* notification /* @in */) = 0; // @event struct EXTERNAL IModeChangedNotification : virtual public Core::IUnknown @@ -132,7 +132,7 @@ namespace WPEFramework virtual void OnPowerModeChanged(const PowerState currentState, const PowerState newState) {}; }; virtual Core::hresult Register(IModeChangedNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(const IModeChangedNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(IModeChangedNotification* notification /* @in */) = 0; // @event struct EXTERNAL IDeepSleepTimeoutNotification : virtual public Core::IUnknown @@ -144,7 +144,7 @@ namespace WPEFramework virtual void OnDeepSleepTimeout(const int wakeupTimeout) {}; }; virtual Core::hresult Register(IDeepSleepTimeoutNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(const IDeepSleepTimeoutNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(IDeepSleepTimeoutNotification* notification /* @in */) = 0; // @event struct EXTERNAL INetworkStandbyModeChangedNotification : virtual public Core::IUnknown @@ -156,7 +156,7 @@ namespace WPEFramework virtual void OnNetworkStandbyModeChanged(const bool enabled) {}; }; virtual Core::hresult Register(INetworkStandbyModeChangedNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(const INetworkStandbyModeChangedNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(INetworkStandbyModeChangedNotification* notification /* @in */) = 0; // @event struct EXTERNAL IThermalModeChangedNotification : virtual public Core::IUnknown @@ -170,7 +170,7 @@ namespace WPEFramework virtual void OnThermalModeChanged(const ThermalTemperature currentThermalLevel, const ThermalTemperature newThermalLevel, const float currentTemperature) {}; }; virtual Core::hresult Register(IThermalModeChangedNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(const IThermalModeChangedNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(IThermalModeChangedNotification* notification /* @in */) = 0; /** Engage a client in power mode change operation. */ // @text addPowerModePreChangeClient @@ -329,4 +329,3 @@ namespace WPEFramework } // namespace Exchange } // namespace WPEFramework - From 5aa3c23716d1fb39f3e97204b47ed3930767bbe4 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Thu, 28 Aug 2025 11:06:15 +0530 Subject: [PATCH 10/41] Update IPowerManager.h --- apis/PowerManager/IPowerManager.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apis/PowerManager/IPowerManager.h b/apis/PowerManager/IPowerManager.h index b8c0c564..b3f9d79f 100755 --- a/apis/PowerManager/IPowerManager.h +++ b/apis/PowerManager/IPowerManager.h @@ -100,7 +100,7 @@ namespace WPEFramework virtual void OnRebootBegin(const string &rebootReasonCustom, const string &rebootReasonOther, const string &rebootRequestor) {}; }; virtual Core::hresult Register(Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(const Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0; // @event struct EXTERNAL IModePreChangeNotification : virtual public Core::IUnknown @@ -119,7 +119,7 @@ namespace WPEFramework // @brief Unregister for Power Mode pre-change event // IMPORTANT: If client is also engaged in power mode pre-change operation (requested via AddPowerModePreChangeClient API), // make sure to disengage (using RemovePowerModePreChangeClient API) before calling Unregister. - virtual Core::hresult Unregister(IModePreChangeNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(const IModePreChangeNotification* notification /* @in */) = 0; // @event struct EXTERNAL IModeChangedNotification : virtual public Core::IUnknown @@ -132,7 +132,7 @@ namespace WPEFramework virtual void OnPowerModeChanged(const PowerState currentState, const PowerState newState) {}; }; virtual Core::hresult Register(IModeChangedNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(IModeChangedNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(const IModeChangedNotification* notification /* @in */) = 0; // @event struct EXTERNAL IDeepSleepTimeoutNotification : virtual public Core::IUnknown @@ -144,7 +144,7 @@ namespace WPEFramework virtual void OnDeepSleepTimeout(const int wakeupTimeout) {}; }; virtual Core::hresult Register(IDeepSleepTimeoutNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(IDeepSleepTimeoutNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(const IDeepSleepTimeoutNotification* notification /* @in */) = 0; // @event struct EXTERNAL INetworkStandbyModeChangedNotification : virtual public Core::IUnknown @@ -156,7 +156,7 @@ namespace WPEFramework virtual void OnNetworkStandbyModeChanged(const bool enabled) {}; }; virtual Core::hresult Register(INetworkStandbyModeChangedNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(INetworkStandbyModeChangedNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(const INetworkStandbyModeChangedNotification* notification /* @in */) = 0; // @event struct EXTERNAL IThermalModeChangedNotification : virtual public Core::IUnknown @@ -170,7 +170,7 @@ namespace WPEFramework virtual void OnThermalModeChanged(const ThermalTemperature currentThermalLevel, const ThermalTemperature newThermalLevel, const float currentTemperature) {}; }; virtual Core::hresult Register(IThermalModeChangedNotification* notification /* @in */) = 0; - virtual Core::hresult Unregister(IThermalModeChangedNotification* notification /* @in */) = 0; + virtual Core::hresult Unregister(const IThermalModeChangedNotification* notification /* @in */) = 0; /** Engage a client in power mode change operation. */ // @text addPowerModePreChangeClient From 3ec7f0b659a3c5a549054314b4256211b4999919 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Fri, 29 Aug 2025 16:28:14 +0530 Subject: [PATCH 11/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index f35b4355..d6c28162 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -32,7 +32,7 @@ const char *error_strings[] = { (((errorcode) >= ERROR_BASE && \ (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ ? error_strings[(errorcode) - ERROR_BASE] \ - : ""); \ + : "null"); \ printf("[DEBUG] ErrorCode=%d -> %s\n", errorcode, msg); \ msg; \ }) From 43966f04cd4239f083f9cae079c195069e29ed94 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 1 Sep 2025 15:31:50 +0530 Subject: [PATCH 12/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index d6c28162..a891e09d 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -32,7 +32,7 @@ const char *error_strings[] = { (((errorcode) >= ERROR_BASE && \ (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ ? error_strings[(errorcode) - ERROR_BASE] \ - : "null"); \ + : Core::ErrorToString(errorcode)); \ printf("[DEBUG] ErrorCode=%d -> %s\n", errorcode, msg); \ msg; \ }) From 608ce084932335fac226a40692ce7d46289c68e4 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 3 Sep 2025 16:55:16 +0530 Subject: [PATCH 13/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index a891e09d..6f656bf9 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -25,15 +25,13 @@ const char *error_strings[] = { "Unknown error code" }; -//4.Fetch Error strings +//4.Check if Error code is within the entservices error code range. +#define IS_ENTSERVICES_ERRORCODE(errorcode) \ + ((errorcode) >= ERROR_BASE && \ + (errorcode) < ERROR_BASE + (sizeof(error_strings) / sizeof(error_strings[0]))) + + +//5.Fetch Error strings #define ERROR_MESSAGE(errorcode) \ - ({ \ - const char *msg = \ - (((errorcode) >= ERROR_BASE && \ - (errorcode) < ERROR_BASE + (sizeof(error_strings)/sizeof(error_strings[0]))) \ - ? error_strings[(errorcode) - ERROR_BASE] \ - : Core::ErrorToString(errorcode)); \ - printf("[DEBUG] ErrorCode=%d -> %s\n", errorcode, msg); \ - msg; \ - }) + (error_strings[(errorcode) - ERROR_BASE]) From 33b691329ed4fb7baf3aa7107831cf8659525727 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 3 Sep 2025 22:26:20 +0530 Subject: [PATCH 14/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 6f656bf9..cb03eb29 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -3,7 +3,10 @@ // 1. The single source of truth: a list of all errors. #define ERROR_LIST \ X(ERROR_FILE_IO, "File Read or Write error") \ - X(ERROR_PERMISSION_DENIED, "Permission denied") \ + X(ERROR_INVALID_DEVICENAME, "Invalid device name") \ + X(ERROR_INVALID_MOUNTPOINT, "Invalid mount path") \ + X(ERROR_FIRMWAREUPDATE_INPROGRESS, "Firmware update inprogress") \ + X(ERROR_FIRMWAREUPDATE_UPTODATE, "Firmware upto date") \ /******** PLEASE DO NOT MODIFY ANYTHING BELOW THIS **********/ // 2. Define the 'X' macro to generate the enum. From aeb1eff86c0c983df740999cac6c7647ff0efb15 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 3 Sep 2025 22:30:18 +0530 Subject: [PATCH 15/41] Update IFirmwareUpdate.h --- apis/FirmwareUpdate/IFirmwareUpdate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/FirmwareUpdate/IFirmwareUpdate.h b/apis/FirmwareUpdate/IFirmwareUpdate.h index 0488400d..866a9fb6 100644 --- a/apis/FirmwareUpdate/IFirmwareUpdate.h +++ b/apis/FirmwareUpdate/IFirmwareUpdate.h @@ -19,6 +19,7 @@ #pragma once #include "Module.h" +#include namespace WPEFramework { namespace Exchange { From af58cfb1f0d0b659a486eaf93326554d98704671 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 3 Sep 2025 22:33:54 +0530 Subject: [PATCH 16/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index cb03eb29..159a9445 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -3,10 +3,11 @@ // 1. The single source of truth: a list of all errors. #define ERROR_LIST \ X(ERROR_FILE_IO, "File Read or Write error") \ + X(ERROR_INVALID_PARAMETER, "Invalid Parameter") \ X(ERROR_INVALID_DEVICENAME, "Invalid device name") \ X(ERROR_INVALID_MOUNTPOINT, "Invalid mount path") \ - X(ERROR_FIRMWAREUPDATE_INPROGRESS, "Firmware update inprogress") \ - X(ERROR_FIRMWAREUPDATE_UPTODATE, "Firmware upto date") \ + X(ERROR_FIRMWAREUPDATE_INPROGRESS, "Firmware update already in progress") \ + X(ERROR_FIRMWAREUPDATE_UPTODATE, "Firmware is already upto date") \ /******** PLEASE DO NOT MODIFY ANYTHING BELOW THIS **********/ // 2. Define the 'X' macro to generate the enum. From 9ffb073ba1fc4ebafc341efd380289d64f5d2c0b Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 3 Sep 2025 23:16:47 +0530 Subject: [PATCH 17/41] Update IHdcpProfile.h --- apis/HdcpProfile/IHdcpProfile.h | 1 - 1 file changed, 1 deletion(-) diff --git a/apis/HdcpProfile/IHdcpProfile.h b/apis/HdcpProfile/IHdcpProfile.h index a74d0fe3..3b123901 100644 --- a/apis/HdcpProfile/IHdcpProfile.h +++ b/apis/HdcpProfile/IHdcpProfile.h @@ -19,7 +19,6 @@ #pragma once #include "Module.h" - #include "entservices_errorcodes.h" namespace WPEFramework { From a8bdb3f5674e5a62bbe8a21bf79550073e1bada6 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 3 Sep 2025 23:17:33 +0530 Subject: [PATCH 18/41] Update IUSBDevice.h --- apis/USBDevice/IUSBDevice.h | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/USBDevice/IUSBDevice.h b/apis/USBDevice/IUSBDevice.h index ea3fb6f3..a3dd6b42 100644 --- a/apis/USBDevice/IUSBDevice.h +++ b/apis/USBDevice/IUSBDevice.h @@ -20,6 +20,7 @@ #pragma once #include "Module.h" +#include "entservices_errorcodes.h" // @stubgen:include From cb053a5dd34f202f98b34a3e03b97c70f44fb3aa Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Thu, 4 Sep 2025 14:59:41 +0530 Subject: [PATCH 19/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 159a9445..b781a827 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -1,3 +1,4 @@ +#pragma once #include // 1. The single source of truth: a list of all errors. @@ -22,12 +23,7 @@ typedef enum { #undef X // 3. Define the 'X' macro to generate the string array. -#define X(name, string) string, -const char *error_strings[] = { - "Error base", - ERROR_LIST - "Unknown error code" -}; +extern const char *error_strings[]; //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ From f088b575b5a83cf78252f55fb262c872b121f006 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Thu, 4 Sep 2025 15:00:45 +0530 Subject: [PATCH 20/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index b781a827..0fd87161 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -28,7 +28,7 @@ extern const char *error_strings[]; //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ ((errorcode) >= ERROR_BASE && \ - (errorcode) < ERROR_BASE + (sizeof(error_strings) / sizeof(error_strings[0]))) + (errorcode) < MAX_ERROR_CODE) //5.Fetch Error strings From 331ea6732c37ece9eedefc9ac1a72c63779ff234 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Thu, 4 Sep 2025 15:03:47 +0530 Subject: [PATCH 21/41] Create entservices_errorcodes.cpp --- apis/entservices_errorcodes.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 apis/entservices_errorcodes.cpp diff --git a/apis/entservices_errorcodes.cpp b/apis/entservices_errorcodes.cpp new file mode 100644 index 00000000..b426377d --- /dev/null +++ b/apis/entservices_errorcodes.cpp @@ -0,0 +1,8 @@ +#include "entservices_errors.h" + +#define X(name, string) string, +const char *error_strings[] = { + "Error base", + ERROR_LIST + "Unknown error code" +}; From 853a71dac6b51aa6c7442d8d4f3c21ce4ec6eadf Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Thu, 4 Sep 2025 15:08:06 +0530 Subject: [PATCH 22/41] Update CMakeLists.txt --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb40a4e4..bed41527 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,7 @@ add_custom_target(install_headers ALL add_library(${Target} SHARED ./apis/Module.cpp + ./apis/entservices_errorcodes.cpp ${PROXY_STUB_SOURCES} ) add_dependencies(${NAMESPACE}Marshalling install_headers) From df9ca5d2f3d2495c017233fee087f5058c622dac Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Thu, 4 Sep 2025 15:19:41 +0530 Subject: [PATCH 23/41] Update entservices_errorcodes.cpp --- apis/entservices_errorcodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.cpp b/apis/entservices_errorcodes.cpp index b426377d..03e3f8ed 100644 --- a/apis/entservices_errorcodes.cpp +++ b/apis/entservices_errorcodes.cpp @@ -1,4 +1,4 @@ -#include "entservices_errors.h" +#include "entservices_errorcodes.h" #define X(name, string) string, const char *error_strings[] = { From 7d77efa4a7a2adb076d18814cd154a24569bb19a Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Sun, 7 Sep 2025 18:55:43 +0530 Subject: [PATCH 24/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 0fd87161..d36fa339 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -23,7 +23,7 @@ typedef enum { #undef X // 3. Define the 'X' macro to generate the string array. -extern const char *error_strings[]; +extern const char **error_strings; //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ From 785401c0d08bba82e6ccd908c2b550a9483e90f2 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 03:17:46 -0400 Subject: [PATCH 25/41] Update IUSBDevice.h --- apis/USBDevice/IUSBDevice.h | 1 - 1 file changed, 1 deletion(-) diff --git a/apis/USBDevice/IUSBDevice.h b/apis/USBDevice/IUSBDevice.h index a3dd6b42..ea3fb6f3 100644 --- a/apis/USBDevice/IUSBDevice.h +++ b/apis/USBDevice/IUSBDevice.h @@ -20,7 +20,6 @@ #pragma once #include "Module.h" -#include "entservices_errorcodes.h" // @stubgen:include From d920bc9d2a931853c3b7788ee69c072aed67c783 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 03:18:15 -0400 Subject: [PATCH 26/41] Update IFirmwareUpdate.h --- apis/FirmwareUpdate/IFirmwareUpdate.h | 1 - 1 file changed, 1 deletion(-) diff --git a/apis/FirmwareUpdate/IFirmwareUpdate.h b/apis/FirmwareUpdate/IFirmwareUpdate.h index 866a9fb6..0488400d 100644 --- a/apis/FirmwareUpdate/IFirmwareUpdate.h +++ b/apis/FirmwareUpdate/IFirmwareUpdate.h @@ -19,7 +19,6 @@ #pragma once #include "Module.h" -#include namespace WPEFramework { namespace Exchange { From bffa18aa5fb84f7bffefe3fcf913e89421ee3d14 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 04:23:28 -0400 Subject: [PATCH 27/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index d36fa339..0fd87161 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -23,7 +23,7 @@ typedef enum { #undef X // 3. Define the 'X' macro to generate the string array. -extern const char **error_strings; +extern const char *error_strings[]; //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ From 801347644ad5457ef41ef925063efe2c2cd694d7 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 04:47:46 -0400 Subject: [PATCH 28/41] Update Module.h --- apis/Module.h | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/Module.h b/apis/Module.h index cd077f84..39e05c2b 100644 --- a/apis/Module.h +++ b/apis/Module.h @@ -36,3 +36,4 @@ // in the file calls Ids.h, please extend it with your requried interface number // if you are creating a new interface. #include "Ids.h" +#include From 74bc0068b912dd7b5a44b80f82b7d7a69ce1c389 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 05:20:18 -0400 Subject: [PATCH 29/41] Update IPowerManager.h --- apis/PowerManager/IPowerManager.h | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/PowerManager/IPowerManager.h b/apis/PowerManager/IPowerManager.h index b3f9d79f..b617976d 100755 --- a/apis/PowerManager/IPowerManager.h +++ b/apis/PowerManager/IPowerManager.h @@ -329,3 +329,4 @@ namespace WPEFramework } // namespace Exchange } // namespace WPEFramework + From 29b0b93f0616675e1737030ef43ba92e15850207 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 06:12:46 -0400 Subject: [PATCH 30/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 0fd87161..b4e50815 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -23,7 +23,7 @@ typedef enum { #undef X // 3. Define the 'X' macro to generate the string array. -extern const char *error_strings[]; +extern const char* const error_strings[]; //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ From d313ec1f91f9d8cbc9450a0d3d9e55e65a740726 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 06:55:00 -0400 Subject: [PATCH 31/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index b4e50815..1719d2f3 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -24,6 +24,7 @@ typedef enum { // 3. Define the 'X' macro to generate the string array. extern const char* const error_strings[]; +#error "EXITING SOUND" //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ @@ -32,6 +33,5 @@ extern const char* const error_strings[]; //5.Fetch Error strings -#define ERROR_MESSAGE(errorcode) \ - (error_strings[(errorcode) - ERROR_BASE]) +#define ERROR_MESSAGE(errorcode) (error_strings[(errorcode) - ERROR_BASE]) From d4227860cecc8705902771329082e4c20f6779f9 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 08:07:45 -0400 Subject: [PATCH 32/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 1719d2f3..cfdfe91d 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -13,7 +13,7 @@ /******** PLEASE DO NOT MODIFY ANYTHING BELOW THIS **********/ // 2. Define the 'X' macro to generate the enum. #define X(name, string) name, -typedef enum { +typedef enum ErrorCodeEnum{ // Start the first error code at 1000 ERROR_BASE = 1000, ERROR_LIST From 34d223e0a4037c8c0b216bd804031dfeaac4d9a2 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 08:18:27 -0400 Subject: [PATCH 33/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 1 - 1 file changed, 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index cfdfe91d..88e16ee4 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -24,7 +24,6 @@ typedef enum ErrorCodeEnum{ // 3. Define the 'X' macro to generate the string array. extern const char* const error_strings[]; -#error "EXITING SOUND" //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ From de6a4cd3aa08c8b8e44e516aa752afa80d1c65f0 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 09:54:20 -0400 Subject: [PATCH 34/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 88e16ee4..0a4633b5 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -13,12 +13,12 @@ /******** PLEASE DO NOT MODIFY ANYTHING BELOW THIS **********/ // 2. Define the 'X' macro to generate the enum. #define X(name, string) name, -typedef enum ErrorCodeEnum{ +enum ErrorCodeEnum{ // Start the first error code at 1000 ERROR_BASE = 1000, ERROR_LIST MAX_ERROR_CODE -} ErrorCode; +}; // Undefine 'X' to avoid conflicts. #undef X From 8d219c0e83c3b08c85260b92c314f1e00da57812 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 10:21:22 -0400 Subject: [PATCH 35/41] Update entservices_errorcodes.cpp --- apis/entservices_errorcodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.cpp b/apis/entservices_errorcodes.cpp index 03e3f8ed..157f974a 100644 --- a/apis/entservices_errorcodes.cpp +++ b/apis/entservices_errorcodes.cpp @@ -1,7 +1,7 @@ #include "entservices_errorcodes.h" #define X(name, string) string, -const char *error_strings[] = { +const char* const error_strings[] = { "Error base", ERROR_LIST "Unknown error code" From 9139cbe84bbb8b3d9cb510272622fd989dc83beb Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Mon, 8 Sep 2025 10:32:04 -0400 Subject: [PATCH 36/41] Update CMakeLists.txt --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bed41527..1ea204b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,9 @@ if(NOT GENERATOR_SEARCH_PATH) set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}) endif() +file(GLOB_RECURSE INTERFACES_HEADERS_INPUT ./apis/*/I*.h ./apis/I*.h) set(PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/apis") -ProxyStubGenerator(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/apis/*" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/apis" PROJECT_DIR ${PROJECT_DIR}) +ProxyStubGenerator(INPUT "${INTERFACES_HEADERS_INPUT}" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/apis" PROJECT_DIR ${PROJECT_DIR}) file(GLOB_RECURSE INTERFACES_HEADERS ./apis/*/I*.h ./apis/*.h) file(GLOB PROXY_STUB_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/ProxyStubs*.cpp") From ae5d1f376d0d6308ab90f60e002ed7cda9edc1d9 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Tue, 9 Sep 2025 03:26:02 -0400 Subject: [PATCH 37/41] Update CMakeLists.txt --- build/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index f3a5260b..b0f477b6 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -55,6 +55,7 @@ list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids_comcast add_library(${Target} SHARED ${JSON_ENUM_SOURCES} + ../apis/entservices_errorcodes.cpp ) target_link_libraries(${Target} From 4ada22099781dff5b6e4d3fbed953a6099020aac Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Tue, 9 Sep 2025 03:26:59 -0400 Subject: [PATCH 38/41] Update CMakeLists.txt --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ea204b9..9c14ac71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,6 @@ add_custom_target(install_headers ALL add_library(${Target} SHARED ./apis/Module.cpp - ./apis/entservices_errorcodes.cpp ${PROXY_STUB_SOURCES} ) add_dependencies(${NAMESPACE}Marshalling install_headers) From dde8bfbb60c6bb420a1b4087e78d69c32c59de37 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 10 Sep 2025 12:53:28 -0400 Subject: [PATCH 39/41] Update entservices_errorcodes.h --- apis/entservices_errorcodes.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apis/entservices_errorcodes.h b/apis/entservices_errorcodes.h index 0a4633b5..c59873ed 100644 --- a/apis/entservices_errorcodes.h +++ b/apis/entservices_errorcodes.h @@ -1,3 +1,5 @@ +#ifndef ENTSERVICES_ERRORCODES_H +#define ENTSERVICES_ERRORCODES_H #pragma once #include @@ -23,7 +25,12 @@ enum ErrorCodeEnum{ #undef X // 3. Define the 'X' macro to generate the string array. -extern const char* const error_strings[]; +#define X(name, string) string, +const char* const error_strings[] = { + "Error base", + ERROR_LIST + "Unknown error code" +}; //4.Check if Error code is within the entservices error code range. #define IS_ENTSERVICES_ERRORCODE(errorcode) \ @@ -34,3 +41,4 @@ extern const char* const error_strings[]; //5.Fetch Error strings #define ERROR_MESSAGE(errorcode) (error_strings[(errorcode) - ERROR_BASE]) +#endif //ENTSERVICES_ERRORCODES_H From 7d13579190e82e97eb9874991ea4e2bd5d78d828 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 10 Sep 2025 12:53:51 -0400 Subject: [PATCH 40/41] Delete apis/entservices_errorcodes.cpp --- apis/entservices_errorcodes.cpp | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 apis/entservices_errorcodes.cpp diff --git a/apis/entservices_errorcodes.cpp b/apis/entservices_errorcodes.cpp deleted file mode 100644 index 157f974a..00000000 --- a/apis/entservices_errorcodes.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "entservices_errorcodes.h" - -#define X(name, string) string, -const char* const error_strings[] = { - "Error base", - ERROR_LIST - "Unknown error code" -}; From 14d0950adddfa26124b576447722d4f9ef1d03b2 Mon Sep 17 00:00:00 2001 From: ssitar583 Date: Wed, 10 Sep 2025 12:54:07 -0400 Subject: [PATCH 41/41] Delete build/CMakeLists.txt --- build/CMakeLists.txt | 100 ------------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 build/CMakeLists.txt diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt deleted file mode 100644 index b0f477b6..00000000 --- a/build/CMakeLists.txt +++ /dev/null @@ -1,100 +0,0 @@ -# If not stated otherwise in this file or this component's license file the -# following copyright and licenses apply: -# -# Copyright 2020 Metrological -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cmake_minimum_required(VERSION 3.3) - -project(Definitions) - -find_package(WPEFramework) - -project_version(4.4.1) - -find_package(CompileSettingsDebug REQUIRED) -find_package(JsonGenerator REQUIRED) -find_package(${NAMESPACE}Core REQUIRED) -find_package(${NAMESPACE}PrivilegedRequest QUIET) - -set(Target ${NAMESPACE}${PROJECT_NAME}) - -file(GLOB JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../apis/*/*.json" "${CMAKE_CURRENT_SOURCE_DIR}/../apis/*.json") -file(GLOB INTERFACE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../apis/*/I*.h") - -if(NOT GENERATOR_SEARCH_PATH) - set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}) -endif() -file(GLOB_RECURSE INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}../apis") -JsonGenerator(CODE INPUT ${JSON_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} CPPIFDIR "${INCLUDE_PATH}" LEGACY_ALT) -JsonGenerator(CODE INPUT ${INTERFACE_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../apis" LEGACY_ALT) - -file(GLOB JSON_ENUM_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/JsonEnum*.cpp") -file(GLOB JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/J*.h") - -include(CreateLink) -CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Module.h" TARGET "../Module.h") -list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Module.h") -CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids.h" TARGET "../Ids.h") -list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids.h") -CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/Module.h" TARGET "../apis/Module.h") -list(APPEND PUBLIC_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/Module.h") -CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids_comcast.h" TARGET "../Ids_comcast.h") -list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids_comcast.h") - -add_library(${Target} SHARED - ${JSON_ENUM_SOURCES} - ../apis/entservices_errorcodes.cpp - ) - -target_link_libraries(${Target} - PRIVATE - ${NAMESPACE}Core::${NAMESPACE}Core - CompileSettingsDebug::CompileSettingsDebug - ) - -set_target_properties(${Target} PROPERTIES - CXX_STANDARD 11 - CXX_STANDARD_REQUIRED YES - FRAMEWORK FALSE - VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR} - PUBLIC_HEADER "${PUBLIC_HEADERS}" # specify the public headers - ) - -target_include_directories(${Target} PRIVATE - $ - $ - $) -install( - TARGETS ${Target} EXPORT ${Target}Targets # for downstream dependencies - ARCHIVE DESTINATION lib/ COMPONENT libs # static lib - LIBRARY DESTINATION lib/ COMPONENT libs # shared lib - RUNTIME DESTINATION bin COMPONENT libs # binaries - FRAMEWORK DESTINATION bin/ COMPONENT libs # for mac - INCLUDES DESTINATION include/${NAMESPACE} # default include path -) - -install( - FILES ${JSON_LINK_HEADERS} - DESTINATION include/${NAMESPACE}/interfaces/json -) - -InstallPackageConfig( - TARGETS ${Target} - DESCRIPTION "Share lookup tables associated with interface enums." - ) - - -InstallCMakeConfig(TARGETS ${Target})