Home | History | Annotate | Download | only in logging
      1 // Copyright 2014 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 MEDIA_CAST_LOGGING_RAW_EVENT_SUBSCRIBER_H_
      6 #define MEDIA_CAST_LOGGING_RAW_EVENT_SUBSCRIBER_H_
      7 
      8 #include "media/cast/logging/logging_defines.h"
      9 
     10 namespace media {
     11 namespace cast {
     12 
     13 // A subscriber interface to subscribe to cast raw event logs.
     14 // Those who wish to subscribe to raw event logs must implement this interface,
     15 // and call LoggingImpl::AddRawEventSubscriber() with the subscriber, in order
     16 // to start receiving raw event logs.
     17 class RawEventSubscriber {
     18  public:
     19   virtual ~RawEventSubscriber() {}
     20 
     21   // Called on main thread when a FrameEvent, given by |frame_event|, is logged.
     22   virtual void OnReceiveFrameEvent(const FrameEvent& frame_event) = 0;
     23 
     24   // Called on main thread when a PacketEvent, given by |packet_event|,
     25   // is logged.
     26   virtual void OnReceivePacketEvent(const PacketEvent& packet_event) = 0;
     27 };
     28 
     29 }  // namespace cast
     30 }  // namespace media
     31 
     32 #endif  // MEDIA_CAST_LOGGING_RAW_EVENT_SUBSCRIBER_H_
     33