Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2132d1d
RDKEMW-3789: refactor ILEDControl.h to add enum states
arun-madhavan-013 Aug 28, 2025
995545c
RDKEMW-3789: clean up the ILEDControl header
arun-madhavan-013 Aug 29, 2025
7389e69
RDKEMW-3789: update ILEDControl with documentation tags
arun-madhavan-013 Aug 31, 2025
42504be
Merge branch 'develop' into feature/RDKEMW-3789-LEDPluginIssue
arun-madhavan-013 Aug 31, 2025
829b9d5
Merge pull request #490 from rdkcentral/develop
arun-madhavan-013 Sep 2, 2025
779375b
RDKEMW-3789: update the LEDControlPlugin.md
arun-madhavan-013 Sep 2, 2025
473abde
RDKEMW-3789: remove unnecessary TAGs from ILEDControl header
arun-madhavan-013 Sep 4, 2025
42a43bf
RDKEMW-3789: correct LEDControl API doc
arun-madhavan-013 Sep 4, 2025
f75142a
Merge branch 'develop' into feature/RDKEMW-3789-LEDPluginIssue
arun-madhavan-013 Sep 4, 2025
e706432
RDKEMW-3789: optimize LEDControl plugin doc
arun-madhavan-013 Sep 4, 2025
d75472e
Merge branch 'develop' into feature/RDKEMW-3789-LEDPluginIssue
arun-madhavan-013 Sep 10, 2025
29efbd8
Merge pull request #520 from rdkcentral/develop
arun-madhavan-013 Sep 15, 2025
3cc189c
RDKEMW-3789: add backward compatibility for GetLEDState
arun-madhavan-013 Sep 16, 2025
72fd53f
RDKEMW-3789: ILEDControl remove the conflicting method
arun-madhavan-013 Sep 17, 2025
0c4b1ab
Merge pull request #528 from rdkcentral/develop
arun-madhavan-013 Sep 17, 2025
1d34939
Merge pull request #531 from rdkcentral/develop
arun-madhavan-013 Sep 18, 2025
f14278e
Merge pull request #543 from rdkcentral/develop
arun-madhavan-013 Sep 22, 2025
42feaa5
Merge pull request #547 from rdkcentral/develop
arun-madhavan-013 Sep 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions apis/LEDControl/ILEDControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,42 @@ namespace WPEFramework

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

struct EXTERNAL LEDControlState {
string state;
virtual ~ILEDControl() = default;

enum LEDControlState : uint8_t {
LEDSTATE_NONE = 0 /* @text NONE */,
LEDSTATE_ACTIVE /* @text ACTIVE */,
LEDSTATE_STANDBY /* @text STANDBY */,
LEDSTATE_WPS_CONNECTING /* @text WPS_CONNECTING */,
LEDSTATE_WPS_CONNECTED /* @text WPS_CONNECTED */,
LEDSTATE_WPS_ERROR /* @text WPS_ERROR */,
LEDSTATE_FACTORY_RESET /* @text FACTORY_RESET */,
LEDSTATE_USB_UPGRADE /* @text USB_UPGRADE */,
LEDSTATE_DOWNLOAD_ERROR /* @text DOWNLOAD_ERROR */,
LEDSTATE_MAX /* @text MAX */
};

// Struct to wrap LEDControlState for API compatibility
struct EXTERNAL LEDState {
LEDControlState state;
};

// @text getSupportedLEDStates
// @brief Returns all the LED states supported by the platform
// @param supportedLEDStates - out - string [] of supported LED states
// @param success - out - boolean
// @details Returns the list of LED states that are actually supported by the platform at runtime. Possible values include `NONE`, `ACTIVE`, `STANDBY`, `WPS_CONNECTING`, `WPS_CONNECTED`, `WPS_ERROR`, `FACTORY_RESET`, `USB_UPGRADE` and `DOWNLOAD_ERROR`.
// @param supportedLEDStates: string [] of supported LED states. e.g. "['ACTIVE', 'STANDBY', 'WPS_CONNECTING', 'WPS_CONNECTED', 'WPS_ERROR', 'FACTORY_RESET', 'USB_UPGRADE', 'DOWNLOAD_ERROR']"
// @param success: boolean
virtual Core::hresult GetSupportedLEDStates(IStringIterator*& supportedLEDStates /* @out */, bool& success /* @out */) = 0;

// @text getLEDState
// @brief Returns current LED state.
// @param LEDControlState - out
virtual Core::hresult GetLEDState(LEDControlState& ledState /* @out */) = 0;
// @brief Retrieves current state of the LED. e.g. {"state":"WPS_CONNECTING"}
// @param ledState: LEDState
virtual Core::hresult GetLEDState(LEDState& ledState /* @out */) = 0;

// @text setLEDState
// @brief Change the device LED state to one mentioned in the input argument.
// @param state - in - string
// @param success - out - boolean
virtual Core::hresult SetLEDState(const string& state, bool& success /* @out */) = 0;
// @brief Sets the device LED to a requested state from those available in `GetSupportedLEDStates`.
// @param state: LEDControlState. e.g. "FACTORY_RESET"
// @param success: boolean
virtual Core::hresult SetLEDState(const LEDControlState& state, bool& success /* @out */) = 0;
};
} // namespace Exchange
} // namespace WPEFramework
Loading
Loading