1 // Copyright 2019 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CAST_COMMON_CHANNEL_CAST_MESSAGE_HANDLER_H_ 6 #define CAST_COMMON_CHANNEL_CAST_MESSAGE_HANDLER_H_ 7 8 #include "cast/common/channel/proto/cast_channel.pb.h" 9 10 namespace openscreen { 11 namespace cast { 12 13 class CastSocket; 14 class VirtualConnectionRouter; 15 16 class CastMessageHandler { 17 public: 18 virtual ~CastMessageHandler() = default; 19 20 // |socket| is null if the source of the message is a local peer. 21 virtual void OnMessage(VirtualConnectionRouter* router, 22 CastSocket* socket, 23 ::cast::channel::CastMessage message) = 0; 24 }; 25 26 } // namespace cast 27 } // namespace openscreen 28 29 #endif // CAST_COMMON_CHANNEL_CAST_MESSAGE_HANDLER_H_ 30