diff options
Diffstat (limited to 'cast/common/public/message_port.h')
-rw-r--r-- | cast/common/public/message_port.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cast/common/public/message_port.h b/cast/common/public/message_port.h index aa614167..0e62dfe6 100644 --- a/cast/common/public/message_port.h +++ b/cast/common/public/message_port.h @@ -14,21 +14,23 @@ namespace cast { // This interface is intended to provide an abstraction for communicating // cast messages across a pipe with guaranteed delivery. This is used to -// decouple the cast receiver session (and potentially other classes) from any +// decouple the cast streaming receiver and sender sessions from the // network implementation. class MessagePort { public: class Client { public: - virtual void OnMessage(const std::string& sender_id, + virtual void OnMessage(const std::string& source_sender_id, const std::string& message_namespace, const std::string& message) = 0; virtual void OnError(Error error) = 0; }; virtual ~MessagePort() = default; - virtual void SetClient(Client* client) = 0; - virtual void PostMessage(const std::string& sender_id, + virtual void SetClient(Client* client, std::string client_sender_id) = 0; + virtual void ResetClient() = 0; + + virtual void PostMessage(const std::string& destination_sender_id, const std::string& message_namespace, const std::string& message) = 0; }; |