@@ -32,23 +32,42 @@ namespace WPEFramework
32
32
{
33
33
enum { ID = ID_MIRACAST_PLAYER };
34
34
35
- enum PlayerReasonCode : uint32_t
35
+ enum State : uint8_t
36
36
{
37
- REASON_CODE_SUCCESS = 200 /* @text SUCCESS */ ,
38
- REASON_CODE_APP_REQ_TO_STOP = 201 /* @text APP_REQ_TO_STOP */ ,
39
- REASON_CODE_SRC_DEV_REQ_TO_STOP = 202 /* @text SRC_DEV_REQ_TO_STOP */ ,
40
- REASON_CODE_RTSP_ERROR = 203 /* @text RTSP_FAILURE */ ,
41
- REASON_CODE_RTSP_TIMEOUT = 204 /* @text RTSP_TIMEOUT */ ,
42
- REASON_CODE_RTSP_METHOD_NOT_SUPPORTED = 205 /* @text RTSP_NOT_SUPPORTED */ ,
43
- REASON_CODE_GST_ERROR = 206 /* @text GST_FAILURE */ ,
44
- REASON_CODE_INT_FAILURE = 207 /* @text INTERNAL_FAILURE */ ,
45
- REASON_CODE_NEW_SRC_DEV_CONNECT_REQ = 208 /* @text NEW_SRC_DEV_CONNECT_REQ */ ,
37
+ STATE_IDLE = 0 /* @text IDLE */ ,
38
+ STATE_INITIATED = 1 /* @text INITIATED */ ,
39
+ STATE_INPROGRESS = 2 /* @text INPROGRESS */ ,
40
+ STATE_PLAYING = 3 /* @text PLAYING */ ,
41
+ STATE_STOPPED = 4 /* @text STOPPED */
46
42
};
47
43
48
- enum PlayerStopReasonCode : uint32_t
44
+ enum ErrorCode : uint8_t
49
45
{
50
- MIRACAST_PLAYER_APP_REQ_TO_STOP_ON_EXIT = 301 /* @text APP_REQ_TO_STOP_ON_EXIT */ ,
51
- MIRACAST_PLAYER_APP_REQ_TO_STOP_ON_NEW_CONNECTION = 302 /* @text APP_REQ_TO_STOP_ON_NEW_CONNECTION */
46
+ ERROR_CODE_SUCCESS = 200 /* @text SUCCESS */ ,
47
+ ERROR_CODE_APP_REQ_TO_STOP = 201 /* @text APP_REQ_TO_STOP */ ,
48
+ ERROR_CODE_SRC_DEV_REQ_TO_STOP = 202 /* @text SRC_DEV_REQ_TO_STOP */ ,
49
+ ERROR_CODE_RTSP_ERROR = 203 /* @text RTSP_FAILURE */ ,
50
+ ERROR_CODE_RTSP_TIMEOUT = 204 /* @text RTSP_TIMEOUT */ ,
51
+ ERROR_CODE_RTSP_METHOD_NOT_SUPPORTED = 205 /* @text RTSP_NOT_SUPPORTED */ ,
52
+ ERROR_CODE_GST_ERROR = 206 /* @text GST_FAILURE */ ,
53
+ ERROR_CODE_INT_FAILURE = 207 /* @text INTERNAL_FAILURE */ ,
54
+ ERROR_CODE_NEW_SRC_DEV_CONNECT_REQ = 208 /* @text NEW_SRC_DEV_CONNECT_REQ */ ,
55
+ };
56
+
57
+ enum StopReasonCode : uint16_t
58
+ {
59
+ STOP_REASON_APP_REQ_FOR_EXIT = 301 /* @text APP_REQ_TO_STOP_ON_EXIT */ ,
60
+ STOP_REASON_APP_REQ_FOR_NEW_CONNECTION = 302 /* @text APP_REQ_TO_STOP_ON_NEW_CONNECTION */
61
+ };
62
+
63
+ enum LogLevel : uint8_t
64
+ {
65
+ LOG_LEVEL_FATAL = 0 /* @text FATAL */ ,
66
+ LOG_LEVEL_ERROR = 1 /* @text ERROR */ ,
67
+ LOG_LEVEL_WARNING = 2 /* @text WARNING */ ,
68
+ LOG_LEVEL_INFO = 3 /* @text INFO */ ,
69
+ LOG_LEVEL_VERBOSE = 4 /* @text VERBOSE */ ,
70
+ LOG_LEVEL_TRACE = 5 /* @text TRACE */
52
71
};
53
72
54
73
struct EXTERNAL DeviceParameters
@@ -98,7 +117,7 @@ namespace WPEFramework
98
117
// @param playerState: Current state of the player (e.g., INITIATED | INPROGRESS | PLAYING | STOPPED/IDLE(Default State).)
99
118
// @param reasonCode: Reason code for the player state update
100
119
// @param reason: reason code Decription
101
- virtual void OnStateChange (const string &clientName /* @text name */ , const string &clientMac /* @text mac */ , const string &playerState /* @text state */ , const PlayerReasonCode &reasonCode /* @text reason_code */ , const string &reason /* @text reason */ ) {};
120
+ virtual void OnStateChange (const string &clientName /* @text name */ , const string &clientMac /* @text mac */ , const State &playerState /* @text state */ , const ErrorCode &reasonCode /* @text reason_code */ , const string &reason /* @text reason */ ) {};
102
121
};
103
122
104
123
// @json:omit
@@ -124,7 +143,7 @@ namespace WPEFramework
124
143
// @param reasonCode: Reason code for the player stop request
125
144
// @param reason: Reason for the player stop request
126
145
// @param success: Is the operation successful or not
127
- virtual Core::hresult StopRequest (const string &clientMac /* @in @text mac */ , const string &clientName /* @in @text name */ , const PlayerStopReasonCode &reasonCode /* @in @text reason_code */ , Result &returnPayload /* @out */ ) = 0;
146
+ virtual Core::hresult StopRequest (const string &clientMac /* @in @text mac */ , const string &clientName /* @in @text name */ , const StopReasonCode &reasonCode /* @in @text reason_code */ , Result &returnPayload /* @out */ ) = 0;
128
147
129
148
// @brief Set the Video Rectangle.
130
149
// @text setVideoRectangle
@@ -140,7 +159,7 @@ namespace WPEFramework
140
159
// @param clienMac: MacAddress of the client device
141
160
// @param clienName: Name of the client device
142
161
// @param success: Is the operation successful or not
143
- virtual Core::hresult SetLogging (const string &logLevel /* @in @text level */ , const SeparateLogger &separateLogger /* @in @text separate_logger */ , Result &returnPayload /* @out */ ) = 0;
162
+ virtual Core::hresult SetLogging (const LogLevel &logLevel /* @in @text level */ , const SeparateLogger &separateLogger /* @in @text separate_logger */ , Result &returnPayload /* @out */ ) = 0;
144
163
145
164
// @brief To configure the westeros environment arguments for the Miracast Player
146
165
// @text setWesterosEnvironment
0 commit comments