chromium/third_party/webrtc/pc/dtmf_sender.cc

/*
 *  Copyright 2012 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "pc/dtmf_sender.h"

#include <ctype.h>
#include <string.h>

#include "api/task_queue/pending_task_safety_flag.h"
#include "api/task_queue/task_queue_base.h"
#include "api/units/time_delta.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

namespace webrtc {

// RFC4733
//  +-------+--------+------+---------+
//  | Event | Code   | Type | Volume? |
//  +-------+--------+------+---------+
//  | 0--9  | 0--9   | tone | yes     |
//  | *     | 10     | tone | yes     |
//  | #     | 11     | tone | yes     |
//  | A--D  | 12--15 | tone | yes     |
//  +-------+--------+------+---------+
// The "," is a special event defined by the WebRTC spec. It means to delay for
// 2 seconds before processing the next tone. We use -1 as its code.
static const int kDtmfCommaDelay =;
static const char kDtmfValidTones[] =;
static const char kDtmfTonesTable[] =;
// The duration cannot be more than 6000ms or less than 40ms. The gap between
// tones must be at least 50 ms.
// Source for values: W3C WEBRTC specification.
// https://w3c.github.io/webrtc-pc/#dom-rtcdtmfsender-insertdtmf
static const int kDtmfDefaultDurationMs =;
static const int kDtmfMinDurationMs =;
static const int kDtmfMaxDurationMs =;
static const int kDtmfDefaultGapMs =;
static const int kDtmfMinGapMs =;

// Get DTMF code from the DTMF event character.
bool GetDtmfCode(char tone, int* code) {}

rtc::scoped_refptr<DtmfSender> DtmfSender::Create(
    TaskQueueBase* signaling_thread,
    DtmfProviderInterface* provider) {}

DtmfSender::DtmfSender(TaskQueueBase* signaling_thread,
                       DtmfProviderInterface* provider)
    :{}

void DtmfSender::OnDtmfProviderDestroyed() {}

DtmfSender::~DtmfSender() {}

void DtmfSender::RegisterObserver(DtmfSenderObserverInterface* observer) {}

void DtmfSender::UnregisterObserver() {}

bool DtmfSender::CanInsertDtmf() {}

bool DtmfSender::InsertDtmf(const std::string& tones,
                            int duration,
                            int inter_tone_gap,
                            int comma_delay) {}

std::string DtmfSender::tones() const {}

int DtmfSender::duration() const {}

int DtmfSender::inter_tone_gap() const {}

int DtmfSender::comma_delay() const {}

void DtmfSender::QueueInsertDtmf(uint32_t delay_ms) {}

void DtmfSender::DoInsertDtmf() {}

void DtmfSender::StopSending() {}

}  // namespace webrtc