#ifndef EXTENSIONS_COMMON_API_AUDIO_H__
#define EXTENSIONS_COMMON_API_AUDIO_H__
#include <stdint.h>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/values.h"
#include <string_view>
namespace extensions {
namespace api {
namespace audio {
enum class StreamType { … };
const char* ToString(StreamType as_enum);
StreamType ParseStreamType(std::string_view as_string);
std::u16string GetStreamTypeParseError(std::string_view as_string);
enum class DeviceType { … };
const char* ToString(DeviceType as_enum);
DeviceType ParseDeviceType(std::string_view as_string);
std::u16string GetDeviceTypeParseError(std::string_view as_string);
struct AudioDeviceInfo { … };
struct DeviceFilter { … };
struct DeviceProperties { … };
struct DeviceIdLists { … };
struct MuteChangedEvent { … };
struct LevelChangedEvent { … };
namespace GetDevices {
struct Params { … };
namespace Results {
base::Value::List Create(const std::vector<AudioDeviceInfo>& devices);
}
}
namespace SetActiveDevices {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace SetProperties {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace GetMute {
struct Params { … };
namespace Results {
base::Value::List Create(bool value);
}
}
namespace SetMute {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace OnLevelChanged {
extern const char kEventName[];
base::Value::List Create(const LevelChangedEvent& event);
}
namespace OnMuteChanged {
extern const char kEventName[];
base::Value::List Create(const MuteChangedEvent& event);
}
namespace OnDeviceListChanged {
extern const char kEventName[];
base::Value::List Create(const std::vector<AudioDeviceInfo>& devices);
}
}
}
}
#endif