Skip to content

Commit d8d283e

Browse files
committed
CPESP-9115 : Change sessionID from uint32 to string
Reason for change: Current CPS plugin has sessionId as uint32, change that to string as per HLD document. Test Procedure: None Risks: Low version: Patch
1 parent ad71a2f commit d8d283e

File tree

1 file changed

+38
-57
lines changed

1 file changed

+38
-57
lines changed

interfaces/IContentProtection.h

Lines changed: 38 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace Thunder {
2525
namespace Exchange {
2626

27-
// @json 1.0.0
27+
// @json 1.0.0 @text:keep
2828
struct EXTERNAL IContentProtection : virtual public Core::IUnknown {
2929
enum { ID = ID_CONTENTPROTECTION };
3030

@@ -59,33 +59,29 @@ namespace Exchange {
5959
State state;
6060
// @brief same as that returned by the SecManager.
6161
// For other cases greater than 20000 (e.g. 2)
62-
// @text failureReason
6362
int32_t failureReason;
6463
};
6564

66-
// @alt onWatermarkStatusChanged
65+
// @text onWatermarkStatusChanged
6766
// @param sessionId session id for the content protection session
68-
// (e.g. 930762523)
67+
// (e.g. "930762523")
6968
// @param appId application that should receive the notification
70-
virtual void WatermarkStatusChanged(
71-
uint32_t sessionId /* @text:sessionId */,
72-
const string& appId /* @text:appId */,
73-
const Status& status)
74-
= 0;
69+
virtual void WatermarkStatusChanged(const string& sessionId,
70+
const string& appId, const Status& status) = 0;
7571
};
7672

77-
virtual uint32_t Register(INotification* notification) = 0;
78-
virtual uint32_t Unregister(INotification* notification) = 0;
73+
virtual Core::hresult Register(INotification* notification) = 0;
74+
virtual Core::hresult Unregister(INotification* notification) = 0;
7975

80-
// @alt openDrmSession
76+
// @text openDrmSession
8177
// @param clientId client that establishes the playback session
8278
// (e.g. "com.comcast.vipa:1")
8379
// @param appId application requesting the new watermarking session
8480
// @param licenseRequest base64-encoded DRM license request
8581
// @param initData video platform specific init data
8682
// (e.g. "{\"sessionConfiguration\":{\"distributedTraceId\":\"...\"},\"accessToken\":\"...\",\"contentMetadata\":\"...\"}")
8783
// @param sessionId generated by SecManager to track sessions
88-
// (e.g. 930762523)
84+
// (e.g. "930762523")
8985
// @param response video platform specific response data
9086
// (e.g. "{\"license\":\"...\",\"refreshDuration\":0}")
9187
// @retval 21002 Invalid aspect dimension
@@ -111,28 +107,23 @@ namespace Exchange {
111107
// @retval 23003 Watermark request timeout
112108
// @retval 23012 Watermark memory allocation error
113109
// @retval 23014 Watermark perceptibility error
114-
virtual uint32_t OpenDrmSession(
115-
const string& clientId /* @text:clientId */,
116-
const string& appId /* @text:appId */,
117-
KeySystem keySystem /* @text:keySystem */,
118-
const string& licenseRequest /* @text:licenseRequest */,
119-
const string& initData /* @text:initData */,
120-
uint32_t& sessionId /* @text:sessionId @out */,
121-
string& response /* @text:openSessionResponse @out */)
122-
= 0;
123-
124-
// @alt setDrmSessionState
110+
virtual Core::hresult OpenDrmSession(
111+
const string& clientId, const string& appId,
112+
KeySystem keySystem,
113+
const string& licenseRequest, const string& initData,
114+
string& sessionId /* @out */,
115+
string& response /* @text:openSessionResponse @out */) = 0;
116+
117+
// @text setDrmSessionState
125118
// @param sessionId sec manager generated playback session id
126-
// (e.g. 930762523)
119+
// (e.g. "930762523")
127120
// @retval 21009 Invalid session id
128-
virtual uint32_t SetDrmSessionState(
129-
uint32_t sessionId /* @text:sessionId */,
130-
State sessionState /* @text:sessionState */)
131-
= 0;
121+
virtual Core::hresult SetDrmSessionState(const string& sessionId,
122+
State sessionState) = 0;
132123

133-
// @alt updateDrmSession
124+
// @text updateDrmSession
134125
// @param sessionId sec manager generated playback session id
135-
// (e.g. 930762523)
126+
// (e.g. "930762523")
136127
// @param licenseRequest base64-encoded DRM license request
137128
// @param initData video platform specific init data
138129
// (e.g. "{\"sessionConfiguration\":{\"distributedTraceId\":\"...\"},\"accessToken\":\"...\",\"contentMetadata\":\"...\"}")
@@ -161,43 +152,33 @@ namespace Exchange {
161152
// @retval 23003 Watermark request timeout
162153
// @retval 23012 Watermark memory allocation error
163154
// @retval 23014 Watermark perceptibility error
164-
virtual uint32_t UpdateDrmSession(
165-
uint32_t sessionId /* @text:sessionId */,
166-
const string& licenseRequest /* @text:licenseRequest */,
167-
const string& initData /* @text:initData */,
168-
string& response /* @text:updateSessionResponse @out */)
169-
= 0;
170-
171-
// @alt closeDrmSession
155+
virtual Core::hresult UpdateDrmSession(const string& sessionId,
156+
const string& licenseRequest, const string& initData,
157+
string& response /* @text:updateSessionResponse @out */) = 0;
158+
159+
// @text closeDrmSession
172160
// @param sessionId sec manager generated playback session id
173-
// (e.g. 930762523)
161+
// (e.g. "930762523")
174162
// @param response video platform specific response data
175163
// @retval 21009 Invalid session id
176164
// @retval 21012 Invalid client id
177-
virtual uint32_t CloseDrmSession(
178-
uint32_t sessionId /* @text:sessionId */,
179-
string& response /* @text:closeSessionResponse @out */)
180-
= 0;
165+
virtual Core::hresult CloseDrmSession(const string& sessionId,
166+
string& response /* @text:closeSessionResponse @out */) = 0;
181167

182-
// @alt showWatermark
168+
// @text showWatermark
183169
// @param sessionId id returned on a call to openDrmSession
184-
// (e.g. 930762523)
170+
// (e.g. "930762523")
185171
// @param show true when watermark has to be presented
186-
virtual uint32_t ShowWatermark(
187-
uint32_t sessionId /* @text:sessionId */,
188-
bool show,
189-
const uint8_t opacityLevel /* @text:opacityLevel @restrict:0..100 */)
190-
= 0;
172+
virtual Core::hresult ShowWatermark(const string& sessionId,
173+
bool show, const uint8_t opacityLevel /* @restrict:0..100 */) = 0;
191174

192-
// @alt setPlaybackPosition
175+
// @text setPlaybackPosition
193176
// @param sessionId sec manager generated playback session id
194-
// (e.g. 930762523)
177+
// (e.g. "930762523")
195178
// @param speed current playback speed
196179
// @param position current playback position
197-
virtual uint32_t SetPlaybackPosition(
198-
uint32_t sessionId /* @text:sessionId */,
199-
int32_t speed, long position)
200-
= 0;
180+
virtual Core::hresult SetPlaybackPosition(const string& sessionId,
181+
int32_t speed, long position) = 0;
201182
};
202183

203184
} // namespace Exchange

0 commit comments

Comments
 (0)