Skip to content

CPESP-9115 : Change sessionID from uint32 to string#490

Open
npoltorapavlo wants to merge 1 commit intordkcentral:masterfrom
npoltorapavlo:topic/CPESP-9115
Open

CPESP-9115 : Change sessionID from uint32 to string#490
npoltorapavlo wants to merge 1 commit intordkcentral:masterfrom
npoltorapavlo:topic/CPESP-9115

Conversation

@npoltorapavlo
Copy link
Copy Markdown
Contributor

@npoltorapavlo npoltorapavlo commented Mar 23, 2026

Reason for change: Current CPS plugin has sessionId as uint32,
change that to string as per HLD document.
Add a new interface that can take error ID as parameter
and returns the error message.
Test Procedure: None
Risks: Low
version: Patch

Reason for change: Current CPS plugin has sessionId as uint32,
change that to string as per HLD document.
Add a new interface that can take error ID as parameter
and returns the error message.
Test Procedure: None
Risks: Low
version: Patch
@npoltorapavlo npoltorapavlo marked this pull request as ready for review April 22, 2026 15:39
Copilot AI review requested due to automatic review settings April 22, 2026 15:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Thunder Exchange ContentProtection interfaces to represent sessionId as a string (per HLD) and introduces a new interface for converting error codes to human-readable strings.

Changes:

  • Added a new interface ID (ID_ERRORTOSTRING) for a new RPC interface.
  • Updated IContentProtection APIs to use string for sessionId (including notification payloads).
  • Added IErrorToString interface with an ErrorToString(code, result) method.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
interfaces/Ids.h Adds a new interface ID constant for the new IErrorToString interface.
interfaces/IContentProtection.h Changes sessionId type to string, adjusts RPC annotations, switches several API return types to Core::hresult, and adds the new IErrorToString interface definition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +73 to +74
virtual Core::hresult Register(INotification* notification) = 0;
virtual Core::hresult Unregister(INotification* notification) = 0;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all sides will be updated together , no IContentProtection2 is needed

Comment on lines +65 to 77
// @text onWatermarkStatusChanged
// @param sessionId session id for the content protection session
// (e.g. 930762523)
// (e.g. "930762523")
// @param appId application that should receive the notification
virtual void WatermarkStatusChanged(
uint32_t sessionId /* @text:sessionId */,
const string& appId /* @text:appId */,
const Status& status)
= 0;
virtual void WatermarkStatusChanged(const string& sessionId,
const string& appId, const Status& status) = 0;
};

virtual uint32_t Register(INotification* notification) = 0;
virtual uint32_t Unregister(INotification* notification) = 0;
virtual Core::hresult Register(INotification* notification) = 0;
virtual Core::hresult Unregister(INotification* notification) = 0;

// @alt openDrmSession
// @text openDrmSession
// @param clientId client that establishes the playback session
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need camelCase, keeping both names is not necessary


// @text errorToString
virtual Core::hresult ErrorToString(
const int32_t code, string& result /* @out */) const = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants