-
Notifications
You must be signed in to change notification settings - Fork 17
RDKEMW-8865: Fixing Coding Guideline Errors SAP #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Reason for change: fixing coding guideline errors Test Procedure: Mentioned in ticket Risks: Low Signed-off-by: kumar <[email protected]>
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request addresses coding guideline violations in the SystemAudioPlayer interface by making two key corrections:
- Changed the notification method from pure virtual to default implementation (line 34)
- Updated all method return types from
uint32_ttoCore::hresult(lines 39-53)
| virtual Core::hresult Configure(PluginHost::IShell* service) = 0; | ||
| virtual Core::hresult Register(INotification* sink) = 0; | ||
| virtual Core::hresult Unregister(INotification* sink) = 0; | ||
| virtual Core::hresult Open(const string &input, string &output /* @out */) = 0; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required documentation tags for this method. According to the documentation guidelines, all methods must include:
@brief— A concise description of the purpose or behavior@param— Description of each parameter (forinputandoutput)@retval— Description of each return code
Example format:
// @brief Opens an audio stream
// @param input: Input parameters for opening the stream
// @param output: Output result or status information
// @retval Core::ERROR_NONE: Success
// @retval Core::ERROR_GENERAL: Failed to open stream
virtual Core::hresult Open(const string &input, string &output /* @out */) = 0;| virtual Core::hresult Play(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult PlayBuffer(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Pause(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Resume(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Stop(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Close(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult SetMixerLevels(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult SetSmartVolControl(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult IsPlaying(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Config(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult GetPlayerSessionId(const string &input, string &output /* @out */) = 0; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required documentation tags for these methods. According to the documentation guidelines, all methods must include:
@brief— A concise description of the purpose or behavior@param— Description of each parameter (forinputandoutput)@retval— Description of each return code
These methods need proper documentation to explain their purpose, parameters, and possible return values.
|
|
||
| virtual ~INotification() {} | ||
| virtual void OnSAPEvents(const string &data) = 0; | ||
| virtual void OnSAPEvents(const string &data) {} |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required documentation tags for the event method. According to the documentation guidelines, all events must include:
@brief— A concise description of the purpose or behavior@param— Description of each parameter (for thedataparameter in this case)
Example format:
// @text onSAPEvents
// @brief Triggered when SAP events occur
// @param data: Event data payload
virtual void OnSAPEvents(const string &data) {}| virtual uint32_t IsPlaying(const string &input, string &output /* @out */) = 0; | ||
| virtual uint32_t Config(const string &input, string &output /* @out */) = 0; | ||
| virtual uint32_t GetPlayerSessionId(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Configure(PluginHost::IShell* service) = 0; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required documentation tags for this method. According to the documentation guidelines, all methods must include:
@brief— A concise description of the purpose or behavior@param— Description of each parameter@retval— Description of each return code
Example format:
// @brief Configures the SystemAudioPlayer service
// @param service: Plugin host shell service pointer
// @retval Core::ERROR_NONE: Success
// @retval Core::ERROR_GENERAL: Configuration failed
virtual Core::hresult Configure(PluginHost::IShell* service) = 0;| virtual uint32_t Config(const string &input, string &output /* @out */) = 0; | ||
| virtual uint32_t GetPlayerSessionId(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Configure(PluginHost::IShell* service) = 0; | ||
| virtual Core::hresult Register(INotification* sink) = 0; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required documentation tags for this method. According to the documentation guidelines, all methods must include:
@brief— A concise description of the purpose or behavior@param— Description of each parameter@retval— Description of each return code
Example format:
// @brief Registers a notification callback
// @param sink: Notification interface pointer
// @retval Core::ERROR_NONE: Success
// @retval Core::ERROR_GENERAL: Registration failed
virtual Core::hresult Register(INotification* sink) = 0;| virtual uint32_t GetPlayerSessionId(const string &input, string &output /* @out */) = 0; | ||
| virtual Core::hresult Configure(PluginHost::IShell* service) = 0; | ||
| virtual Core::hresult Register(INotification* sink) = 0; | ||
| virtual Core::hresult Unregister(INotification* sink) = 0; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing required documentation tags for this method. According to the documentation guidelines, all methods must include:
@brief— A concise description of the purpose or behavior@param— Description of each parameter@retval— Description of each return code
Example format:
// @brief Unregisters a notification callback
// @param sink: Notification interface pointer
// @retval Core::ERROR_NONE: Success
// @retval Core::ERROR_GENERAL: Unregistration failed
virtual Core::hresult Unregister(INotification* sink) = 0;Reason for change: resolving guidelines errors Test Procedure: Mentioned in ticket Risks: Low Signed-off-by: kumar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 16 comments.
| virtual Core::hresult Stop(const string &input, string &output /* @out */) = 0; | ||
|
|
||
| // @text close | ||
| // @brief closing audio playback |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "closing audio playback" to "Closing audio playback".
| // @brief closing audio playback | |
| // @brief Closing audio playback |
| virtual Core::hresult SetSmartVolControl(const string &input, string &output /* @out */) = 0; | ||
|
|
||
| // @text isPlaying | ||
| // @brief get state of audio player |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "get state of audio player" to "Get state of audio player".
| // @brief get state of audio player | |
| // @brief Get state of audio player |
| // @brief start playback of audio. | ||
| // @param input: parameters needed for audio playback | ||
| // @param output: response params | ||
| // @retval Core::NONE: Indicates successful opening of audio player |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @RetVal description is incorrect. This method is for the Play operation, not for opening the audio player. Change "Indicates successful opening of audio player" to "Indicates successful start of audio playback".
| // @retval Core::NONE: Indicates successful opening of audio player | |
| // @retval Core::NONE: Indicates successful start of audio playback |
| virtual Core::hresult Unregister(INotification* sink) = 0; | ||
|
|
||
| // @text open | ||
| // @brief open player instance |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "open player instance" to "Open player instance".
| // @brief open player instance | |
| // @brief Open player instance |
| virtual Core::hresult IsPlaying(const string &input, string &output /* @out */) = 0; | ||
|
|
||
| // @text config | ||
| // @brief setting audio player configuration |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "setting audio player configuration" to "Setting audio player configuration".
| // @brief setting audio player configuration | |
| // @brief Setting audio player configuration |
| virtual Core::hresult SetMixerLevels(const string &input, string &output /* @out */) = 0; | ||
|
|
||
| // @text setSmartVolControl | ||
| // @brief setting smart volume level |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "setting smart volume level" to "Setting smart volume level".
| // @brief setting smart volume level | |
| // @brief Setting smart volume level |
| // @text isPlaying | ||
| // @brief get state of audio player | ||
| // @param input: audio player details | ||
| // @param output: response params | ||
| // @retval Core::NONE: Indicates audio player state retrieved successfuly | ||
| virtual Core::hresult IsPlaying(const string &input, string &output /* @out */) = 0; |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the getter/setter naming conventions, getter methods should start with "Get". The method name IsPlaying does not follow this convention. Consider renaming to GetPlayingState or similar, with the @text annotation as getPlayingState.
| virtual Core::hresult Resume(const string &input, string &output /* @out */) = 0; | ||
|
|
||
| // @text stop | ||
| // @brief stopping audio playback |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "stopping audio playback" to "Stopping audio playback".
| // @brief stopping audio playback | |
| // @brief Stopping audio playback |
| // @brief get state of audio player | ||
| // @param input: audio player details | ||
| // @param output: response params | ||
| // @retval Core::NONE: Indicates audio player state retrieved successfuly |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "successfuly" should be "successfully".
| virtual Core::hresult Pause(const string &input, string &output /* @out */) = 0; | ||
|
|
||
| // @text resume | ||
| // @brief resuming audio playback |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @brief description should start with a capital letter for consistency with documentation standards. Change "resuming audio playback" to "Resuming audio playback".
| // @brief resuming audio playback | |
| // @brief Resuming audio playback |
Reason for change: resolving guidelines errors Test Procedure: Mentioned in ticket Risks: Low Signed-off-by: kumar <[email protected]>
Reason for change: fixing coding guideline errors
Test Procedure: Mentioned in ticket
Risks: Low