Skip to content

Commit 37d4560

Browse files
RDKEMW-1017: Fixed the code guidelines for MiracastService
Signed-off-by: yuvaramachandran_gurusamy <[email protected]>
1 parent 23f4422 commit 37d4560

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

apis/Miracast/IMiracastService.h

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ namespace WPEFramework
5959
string logStatus /* @text status */ /* @brief Whether ENABLE or DISABLE the separate logging */;
6060
};
6161

62-
struct EXTERNAL Result {
62+
struct EXTERNAL Result
63+
{
6364
string message /* @text message */ /* @brief reason for success or failure */;
6465
bool success;
6566
};
@@ -69,22 +70,22 @@ namespace WPEFramework
6970
{
7071
enum { ID = ID_MIRACAST_SERVICE_NOTIFICATION };
7172

72-
// @brief Notifies when a Miracast source device wants to connect
73+
// @brief Triggered when the Miracast Service plugin receives a new connection request from a client
7374
// @text onClientConnectionRequest
7475
// @param clientMac: MacAddress of the client device
7576
// @param clientName: Name of the client device
7677
virtual void OnClientConnectionRequest(const string &clientMac /* @text mac */, const string &clientName /* @text name */) {};
7778

78-
// @brief Notifies when a Miracast source device wants to connect
79+
// @brief It is triggered when the Miracast Service plugin failed to connect with the source streaming device due to some error, like P2P related errors during activation or while streaming
7980
// @text onClientConnectionError
8081
// @param clientMac: MacAddress of the client device
8182
// @param clientName: Name of the client device
8283
// @param errorCode: Error code for the connection failure
8384
// @param reason: Reason for the connection failure
8485
virtual void OnClientConnectionError(const string &clientMac /* @text mac */, const string &clientName /* @text name */, const string &errorCode /* @text error_code */, const string &reason /* @text reason */) {};
8586

87+
// @brief Miracast Service Plugin raises this Event to request RA or MiracastWidget to launch the Miracast Player
8688
// @text onLaunchRequest
87-
// @brief Triggered once P2P Group Started event received and further need to trigger MiracastPlayer's playRequest method
8889
// @param DeviceParameters: Contains Source and Sink Device related properties
8990
virtual void OnLaunchRequest(const DeviceParameters deviceParameters/* @text device_parameters*/) {};
9091
};
@@ -98,52 +99,52 @@ namespace WPEFramework
9899
// @json:omit
99100
virtual Core::hresult Deinitialize(PluginHost::IShell* service) = 0;
100101

101-
// @brief Sets the status of the MiracastService discovery
102-
// @text setEnabled
102+
// @brief To enable or disable the Miracast feature
103+
// @text setEnable
103104
// @param enabled: Is the MiracastService discovery enabled or not
104105
// @param success: Is the operation successful or not
105-
virtual Core::hresult SetEnabled(const bool &enabled /* @in */, Result &success /* @out */) = 0;
106+
virtual Core::hresult SetEnabled(const bool &enabled /* @in @text enabled */, Result &returnPayload /* @out */) = 0;
106107

107-
// @brief Gets the status of the MiracastService discovery
108+
// @brief To get the enable status of the Miracast feature
108109
// @text getEnable
109110
// @param enabled: Is the MiracastService discovery enabled or not
110111
// @param success: Is the operation successful or not
111-
virtual Core::hresult GetEnabled(bool &enabled /* @out */, bool &success /* @out */) = 0;
112+
virtual Core::hresult GetEnabled(bool &enabled /* @out @text enabled */, bool &success /* @out */) = 0;
112113

113-
// @brief To accept or reject client connection requests for the Miracast
114+
// @brief To accept or reject new client connection requests for the Miracast feature
114115
// @text acceptClientConnection
115116
// @param requestStatus: It should be "Accept" or "Reject"
116117
// @param success: Is the operation successful or not
117-
virtual Core::hresult AcceptClientConnection(const string &requestStatus /* @in */, Result &success /* @out */) = 0;
118+
virtual Core::hresult AcceptClientConnection(const string &requestStatus /* @in @text requestStatus */, Result &returnPayload /* @out */) = 0;
118119

119120
// @brief To abort the ongoing connection after accepted connection request
120121
// @text stopClientConnection
121-
// @param clienMac: MacAddress of the client device
122+
// @param clientMac: MacAddress of the client device
122123
// @param clienName: Name of the client device
123124
// @param success: Is the operation successful or not
124-
virtual Core::hresult StopClientConnection(const string &clienMac /* @in @text mac */, const string &clienName /* @in @text name */, Result &success /* @out */) = 0;
125+
virtual Core::hresult StopClientConnection(const string &clientMac /* @in @text mac */, const string &clientName /* @in @text name */, Result &returnPayload /* @out */) = 0;
125126

126-
// @brief To Update the Miracast Player State to the Miracast Service Plugin
127+
// @brief Update the Miracast Player State to the Miracast Service Plugin
127128
// @text updatePlayerState
128-
// @param clienMac: MacAddress of the client device
129+
// @param clientMac: MacAddress of the client device
129130
// @param playerState: Player state to be updated
130131
// @param reasonCode: Reason code for the player state update
131132
// @param reason: Reason for the player state update
132133
// @param success: Is the operation successful or not
133-
virtual Core::hresult UpdatePlayerState(const string &clienMac /* @in @text mac */, const string &playerState /* @in @text state */, const PlayerReasonCode &reasonCode /* @in @text reason_code */, const string &reason /* @in @text reason */, Result &success /* @out */) = 0;
134+
virtual Core::hresult UpdatePlayerState(const string &clientMac /* @in @text mac */, const string &playerState /* @in @text state */, const PlayerReasonCode &reasonCode /* @in @text reason_code */, Result &returnPayload /* @out */) = 0;
134135

135-
// @brief To Enable/Disable/Reduce the Logging level for Miracast
136+
// @brief Enable or Disable or Reduce the Logging level for Miracast
136137
// @text setLogging
137-
// @param clienMac: MacAddress of the client device
138-
// @param clienName: Name of the client device
138+
// @param logLevel: The logging level to be set (e.g., "DEBUG", "INFO", "WARN", "ERROR")
139+
// @param separateLogger: Contains the separate logger properties
139140
// @param success: Is the operation successful or not
140-
virtual Core::hresult SetLogging(const string &logLevel /* @in @text level */, const SeparateLogger &separateLogger /* @in @text separate_logger */, Result &success /* @out */) = 0;
141+
virtual Core::hresult SetLogging(const string &logLevel /* @in @text level */, const SeparateLogger &separateLogger /* @in @text separate_logger */, Result &returnPayload /* @out */) = 0;
141142

142143
// @brief Sets the status of the MiracastService backend discovery
143144
// @text setP2PBackendDiscovery
144145
// @param enabled: Is the MiracastService backend discovery enabled or not
145146
// @param success: Is the operation successful or not
146-
virtual Core::hresult SetP2PBackendDiscovery(const bool &enabled /* @in */, Result &success /* @out */) = 0;
147+
virtual Core::hresult SetP2PBackendDiscovery(const bool &enabled /* @in @text enabled */, Result &returnPayload /* @out */) = 0;
147148
};
148149
} // namespace Exchange
149150
} // namespace WPEFramework

0 commit comments

Comments
 (0)