Skip to content

Commit e1a0226

Browse files
RDKEMW-1017: Include Player state adn Errorcode in MiracastService
Signed-off-by: yuvaramachandran_gurusamy <[email protected]>
1 parent 97679e8 commit e1a0226

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

apis/Miracast/IMiracastService.h

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#pragma once
2121

2222
#include "Module.h"
23-
#include "IMiracastPlayer.h"
24-
// @stubgen:include "IMiracastPlayer.h"
25-
// @stubgen:include <com/IIteratorType.h>
2623

2724
namespace WPEFramework
2825
{
@@ -42,6 +39,38 @@ namespace WPEFramework
4239
ERROR_CODE_GENERIC_FAILURE = 104 /* @text GENERIC_FAILURE */
4340
};
4441

42+
enum PlayerState : uint8_t
43+
{
44+
STATE_IDLE = 0 /* @text IDLE */,
45+
STATE_INITIATED = 1 /* @text INITIATED */,
46+
STATE_INPROGRESS = 2 /* @text INPROGRESS */,
47+
STATE_PLAYING = 3 /* @text PLAYING */,
48+
STATE_STOPPED = 4 /* @text STOPPED */
49+
};
50+
51+
enum PlayerErrorCode : uint8_t
52+
{
53+
ERROR_CODE_SUCCESS = 200 /* @text SUCCESS */,
54+
ERROR_CODE_APP_REQ_TO_STOP = 201 /* @text APP_REQ_TO_STOP */,
55+
ERROR_CODE_SRC_DEV_REQ_TO_STOP = 202 /* @text SRC_DEV_REQ_TO_STOP */,
56+
ERROR_CODE_RTSP_ERROR = 203 /* @text RTSP_FAILURE */,
57+
ERROR_CODE_RTSP_TIMEOUT = 204 /* @text RTSP_TIMEOUT */,
58+
ERROR_CODE_RTSP_METHOD_NOT_SUPPORTED = 205 /* @text RTSP_NOT_SUPPORTED */,
59+
ERROR_CODE_GST_ERROR = 206 /* @text GST_FAILURE */,
60+
ERROR_CODE_INT_FAILURE = 207 /* @text INTERNAL_FAILURE */,
61+
ERROR_CODE_NEW_SRC_DEV_CONNECT_REQ = 208 /* @text NEW_SRC_DEV_CONNECT_REQ */,
62+
};
63+
64+
enum LogLevel : uint8_t
65+
{
66+
LOG_LEVEL_FATAL = 0 /* @text FATAL */,
67+
LOG_LEVEL_ERROR = 1 /* @text ERROR */,
68+
LOG_LEVEL_WARNING = 2 /* @text WARNING */,
69+
LOG_LEVEL_INFO = 3 /* @text INFO */,
70+
LOG_LEVEL_VERBOSE = 4 /* @text VERBOSE */,
71+
LOG_LEVEL_TRACE = 5 /* @text TRACE */
72+
};
73+
4574
struct EXTERNAL DeviceParameters
4675
{
4776
string sourceDeviceIP /* @text source_dev_ip */ /* @brief IP Address of Source Device */;
@@ -128,14 +157,14 @@ namespace WPEFramework
128157
// @param reasonCode: Reason code for the player state update
129158
// @param reason: Reason for the player state update
130159
// @param success: Is the operation successful or not
131-
virtual Core::hresult UpdatePlayerState(const string &clientMac /* @in @text mac */, const IMiracastPlayer::State &playerState /* @in @text state */, const IMiracastPlayer::ErrorCode &reasonCode /* @in @text reason_code */, Result &returnPayload /* @out */) = 0;
160+
virtual Core::hresult UpdatePlayerState(const string &clientMac /* @in @text mac */, const PlayerState &playerState /* @in @text state */, const PlayerErrorCode &reasonCode /* @in @text reason_code */, Result &returnPayload /* @out */) = 0;
132161

133162
// @brief Enable or Disable or Reduce the Logging level for Miracast
134163
// @text setLogging
135164
// @param logLevel: The logging level to be set (e.g., "DEBUG", "INFO", "WARN", "ERROR")
136165
// @param separateLogger: Contains the separate logger properties
137166
// @param success: Is the operation successful or not
138-
virtual Core::hresult SetLogging(const IMiracastPlayer::LogLevel &logLevel /* @in @text level */, const SeparateLogger &separateLogger /* @in @text separate_logger */, Result &returnPayload /* @out */) = 0;
167+
virtual Core::hresult SetLogging(const LogLevel &logLevel /* @in @text level */, const SeparateLogger &separateLogger /* @in @text separate_logger */, Result &returnPayload /* @out */) = 0;
139168

140169
// @brief Sets the status of the MiracastService backend discovery
141170
// @text setP2PBackendDiscovery

0 commit comments

Comments
 (0)