Skip to content

Commit 21f5aae

Browse files
RDKEMW-1017 RDKEMW-1018: Updated as per review comments
Signed-off-by: yuvaramachandran_gurusamy <[email protected]>
1 parent fb71e0b commit 21f5aae

File tree

2 files changed

+17
-31
lines changed

2 files changed

+17
-31
lines changed

apis/Miracast/IMiracastPlayer.h

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ namespace WPEFramework
5555
REASON_CODE_NEW_SRC_DEV_CONNECT_REQ = 208 /* @text NEW_SRC_DEV_CONNECT_REQ */,
5656
};
5757

58-
enum StopReasonCode : uint16_t
59-
{
60-
STOP_REASON_APP_REQ_FOR_EXIT = 300 /* @text APP_REQ_TO_STOP_ON_EXIT */,
61-
STOP_REASON_APP_REQ_FOR_NEW_CONNECTION = 301 /* @text APP_REQ_TO_STOP_ON_NEW_CONNECTION */
62-
};
63-
6458
struct EXTERNAL DeviceParameters
6559
{
6660
string sourceDeviceIP /* @text source_dev_ip */ /* @brief IP Address of Source Device */;
@@ -71,10 +65,10 @@ namespace WPEFramework
7165

7266
struct EXTERNAL VideoRectangle
7367
{
74-
int32_t startX /* @text X */ /* @brief X coordinate of the rectangle */;
75-
int32_t startY /* @text Y */ /* @brief Y coordinate of the rectangle */;
76-
int32_t width /* @text W */ /* @brief Width of the rectangle */;
77-
int32_t height /* @text H */ /* @brief Height of the rectangle */;
68+
int startX /* @text X */ /* @brief X coordinate of the rectangle */;
69+
int startY /* @text Y */ /* @brief Y coordinate of the rectangle */;
70+
int width /* @text W */ /* @brief Width of the rectangle */;
71+
int height /* @text H */ /* @brief Height of the rectangle */;
7872
};
7973

8074
struct EXTERNAL Result
@@ -102,24 +96,20 @@ namespace WPEFramework
10296
// @param playerState: Current state of the player (e.g., INITIATED | INPROGRESS | PLAYING | STOPPED/IDLE(Default State).)
10397
// @param reasonCode: Reason code for the player state update
10498
// @param reason: reason code Decription
105-
virtual void OnStateChange(const string &clientName /* @text name */, const string &clientMac /* @text mac */, const State &playerState /* @text state */, const string &reasonCode /* @text reason_code */, const ReasonCode &reasonDescription /* @text reason */) {};
99+
virtual void OnStateChange(const string &clientName /* @text name */, const string &clientMac /* @text mac */, const State playerState /* @text state */, const string &reasonCode /* @text reason_code */, const ReasonCode reasonDescription /* @text reason */) {};
106100
};
107101

108102
// @json:omit
109103
virtual Core::hresult Register(Exchange::IMiracastPlayer::INotification *notification) = 0;
110104
// @json:omit
111105
virtual Core::hresult Unregister(Exchange::IMiracastPlayer::INotification *notification) = 0;
112-
// @json:omit
113-
virtual Core::hresult Initialize(PluginHost::IShell* service) = 0;
114-
// @json:omit
115-
virtual Core::hresult Deinitialize(PluginHost::IShell* service) = 0;
116106

117107
// @brief To set the Miracast Player State to Play after the Miracast session like RTSP communication and GStreamer Playback
118108
// @text playRequest
119109
// @param deviceParam: Contains Source and Sink Device related properties
120110
// @param videoRect: Video rectangle to be used for Miracast playback (x, y, width, height)
121111
// @param success: Is the operation successful or not
122-
virtual Core::hresult PlayRequest(const DeviceParameters &deviceParam /* @in @text device_parameters */, const VideoRectangle &videoRect /* @in @text video_rectangle */, Result &result /* @out */) = 0;
112+
virtual Core::hresult PlayRequest(const DeviceParameters &deviceParam /* @text device_parameters */, const VideoRectangle videoRect /* @text video_rectangle */, Result &result /* @out */) = 0;
123113

124114
// @brief To stop the Miracast Player to tear down the RTSP communication, stop/close the GStreamer pipeline, clean up, and reset the player state
125115
// @text stopRequest
@@ -128,7 +118,7 @@ namespace WPEFramework
128118
// @param reasonCode: Reason code for the player stop request
129119
// @param reason: Reason for the player stop request
130120
// @param success: Is the operation successful or not
131-
virtual Core::hresult StopRequest(const string &clientMac /* @in @text mac */, const string &clientName /* @in @text name */, const int &reasonCode /* @in @text reason_code */, Result &result /* @out */) = 0;
121+
virtual Core::hresult StopRequest(const string &clientMac /* @text mac */, const string &clientName /* @text name */, const int reasonCode /* @text reason_code */, Result &result /* @out */) = 0;
132122

133123
// @brief Set the Video Rectangle.
134124
// @text setVideoRectangle
@@ -137,13 +127,13 @@ namespace WPEFramework
137127
// @param width: Width of the rectangle
138128
// @param height: Height of the rectangle
139129
// @param success: Is the operation successful or not
140-
virtual Core::hresult SetVideoRectangle(const int &startX /* @in @text X */, const int &startY /* @in @text Y */, const int &width /* @in @text W */, const int &height /* @in @text H */, Result &result /* @out */) = 0;
130+
virtual Core::hresult SetVideoRectangle(const int startX /* @text X */, const int startY /* @text Y */, const int width /* @text W */, const int height /* @text H */, Result &result /* @out */) = 0;
141131

142132
// @brief To configure the westeros environment arguments for the Miracast Player. This will be deprecated and SetEnvArguments will be used instead.
143133
// @text setWesterosEnvironment
144134
// @param westerosArgs: Westeros environment arguments to be set
145135
// @param success: Is the operation successful or not
146-
virtual Core::hresult SetWesterosEnvironment( IEnvArgumentsIterator * const westerosArgs /* @in @text westerosArgs */, Result &result /* @out */) = 0;
136+
virtual Core::hresult SetWesterosEnvironment( IEnvArgumentsIterator * const westerosArgs /* @text westerosArgs */, Result &result /* @out */) = 0;
147137

148138
// @brief To reset the westeros environment arguments for the Miracast Player. This will be deprecated and UnsetEnvArguments will be used instead.
149139
// @text unsetWesterosEnvironment
@@ -154,7 +144,7 @@ namespace WPEFramework
154144
// @text setEnvArguments
155145
// @param envArgs: environment arguments to be set
156146
// @param success: Is the operation successful or not
157-
virtual Core::hresult SetEnvArguments( IEnvArgumentsIterator * const envArgs /* @in @text envArgs */, Result &result /* @out */) = 0;
147+
virtual Core::hresult SetEnvArguments( IEnvArgumentsIterator * const envArgs /* @text envArgs */, Result &result /* @out */) = 0;
158148

159149
// @brief To reset the environment arguments for the Miracast Player
160150
// @text unsetEnvArguments

apis/Miracast/IMiracastService.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,28 +92,24 @@ namespace WPEFramework
9292
// @param clientName: Name of the client device
9393
// @param errorCode: Error code for the connection failure
9494
// @param reason: Reason for the connection failure
95-
virtual void OnClientConnectionError(const string &clientMac /* @text mac */, const string &clientName /* @text name */, const string &reasonCode /* @text error_code */, const ReasonCode &reasonDescription /* @text reason */) {};
95+
virtual void OnClientConnectionError(const string &clientMac /* @text mac */, const string &clientName /* @text name */, const string &reasonCode /* @text error_code */, const ReasonCode reasonDescription /* @text reason */) {};
9696

9797
// @brief Miracast Service Plugin raises this Event to request RA or MiracastWidget to launch the Miracast Player
9898
// @text onLaunchRequest
9999
// @param DeviceParameters: Contains Source and Sink Device related properties
100-
virtual void OnLaunchRequest(const DeviceParameters deviceParameters/* @text device_parameters*/) {};
100+
virtual void OnLaunchRequest(const DeviceParameters &deviceParameters/* @text device_parameters*/) {};
101101
};
102102

103103
// @json:omit
104104
virtual Core::hresult Register(Exchange::IMiracastService::INotification *notification) = 0;
105105
// @json:omit
106106
virtual Core::hresult Unregister(Exchange::IMiracastService::INotification *notification) = 0;
107-
// @json:omit
108-
virtual Core::hresult Initialize(PluginHost::IShell* service) = 0;
109-
// @json:omit
110-
virtual Core::hresult Deinitialize(PluginHost::IShell* service) = 0;
111107

112108
// @brief To enable or disable the Miracast feature
113109
// @text setEnable
114110
// @param enabled: Is the MiracastService discovery enabled or not
115111
// @param success: Is the operation successful or not
116-
virtual Core::hresult SetEnabled(const bool &enabled /* @in @text enabled */, Result &result /* @out */) = 0;
112+
virtual Core::hresult SetEnabled(const bool enabled /* @text enabled */, Result &result /* @out */) = 0;
117113

118114
// @brief To get the enable status of the Miracast feature
119115
// @text getEnable
@@ -125,14 +121,14 @@ namespace WPEFramework
125121
// @text acceptClientConnection
126122
// @param requestStatus: It should be "Accept" or "Reject"
127123
// @param success: Is the operation successful or not
128-
virtual Core::hresult AcceptClientConnection(const string &requestStatus /* @in @text requestStatus */, Result &result /* @out */) = 0;
124+
virtual Core::hresult AcceptClientConnection(const string &requestStatus /* @text requestStatus */, Result &result /* @out */) = 0;
129125

130126
// @brief To abort the ongoing connection after accepted connection request
131127
// @text stopClientConnection
132128
// @param clientMac: MacAddress of the client device
133129
// @param clientName: Name of the client device
134130
// @param success: Is the operation successful or not
135-
virtual Core::hresult StopClientConnection(const string &clientMac /* @in @text mac */, const string &clientName /* @in @text name */, Result &result /* @out */) = 0;
131+
virtual Core::hresult StopClientConnection(const string &clientMac /* @text mac */, const string &clientName /* @text name */, Result &result /* @out */) = 0;
136132

137133
// @brief Update the Miracast Player State to the Miracast Service Plugin
138134
// @text updatePlayerState
@@ -141,13 +137,13 @@ namespace WPEFramework
141137
// @param reasonCode: Reason code for the player state update
142138
// @param reason: Reason for the player state update
143139
// @param success: Is the operation successful or not
144-
virtual Core::hresult UpdatePlayerState(const string &clientMac /* @in @text mac */, const PlayerState &playerState /* @in @text state */, const int &reasonCode /* @in @text reason_code */, Result &result /* @out */) = 0;
140+
virtual Core::hresult UpdatePlayerState(const string &clientMac /* @text mac */, const PlayerState playerState /* @text state */, const int reasonCode /* @text reason_code */, Result &result /* @out */) = 0;
145141

146142
// @brief Sets the status of the MiracastService backend discovery
147143
// @text setP2PBackendDiscovery
148144
// @param enabled: Is the MiracastService backend discovery enabled or not
149145
// @param success: Is the operation successful or not
150-
virtual Core::hresult SetP2PBackendDiscovery(const bool &enabled /* @in @text enabled */, Result &result /* @out */) = 0;
146+
virtual Core::hresult SetP2PBackendDiscovery(const bool enabled /* @text enabled */, Result &result /* @out */) = 0;
151147
};
152148
} // namespace Exchange
153149
} // namespace WPEFramework

0 commit comments

Comments
 (0)