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.
5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_H_
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_H_
10 #include "base/callback.h"
11 #include "components/copresence/public/copresence_constants.h"
13 namespace copresence
{
15 class WhispernetClient
;
19 virtual ~AudioManager() {}
21 // Initializes the object. Do not use this object before calling this method.
22 virtual void Initialize(WhispernetClient
* whispernet_client
,
23 const TokensCallback
& tokens_cb
) = 0;
25 virtual void StartPlaying(AudioType type
) = 0;
26 virtual void StopPlaying(AudioType type
) = 0;
28 virtual void StartRecording(AudioType type
) = 0;
29 virtual void StopRecording(AudioType type
) = 0;
31 virtual void SetToken(AudioType type
,
32 const std::string
& url_safe_token
) = 0;
34 virtual const std::string
GetToken(AudioType type
) = 0;
36 virtual bool IsPlayingTokenHeard(AudioType type
) = 0;
38 virtual void SetTokenLength(AudioType type
, size_t token_length
) = 0;
41 } // namespace copresence
43 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_H_