2 * Copyright 2017 The WebRTC Project Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef API_TURN_CUSTOMIZER_H_
12 #define API_TURN_CUSTOMIZER_H_
16 #include "api/transport/stun.h"
20 } // namespace cricket
24 class TurnCustomizer
{
26 // This is called before a TURN message is sent.
27 // This could be used to add implementation specific attributes to a request.
28 virtual void MaybeModifyOutgoingStunMessage(
29 cricket::PortInterface
* port
,
30 cricket::StunMessage
* message
) = 0;
32 // TURN can send data using channel data messages or Send indication.
33 // This method should return false if `data` should be sent using
34 // a Send indication instead of a ChannelData message, even if a
36 virtual bool AllowChannelData(cricket::PortInterface
* port
,
41 virtual ~TurnCustomizer() {}
46 #endif // API_TURN_CUSTOMIZER_H_