chromium/out/Default/gen/extensions/common/api/system_storage.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// GENERATED FROM THE API DEFINITION IN
//   extensions/common/api/system_storage.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#ifndef EXTENSIONS_COMMON_API_SYSTEM_STORAGE_H__
#define EXTENSIONS_COMMON_API_SYSTEM_STORAGE_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 system_storage {

//
// Types
//

enum class StorageUnitType {};


const char* ToString(StorageUnitType as_enum);
StorageUnitType ParseStorageUnitType(std::string_view as_string);
std::u16string GetStorageUnitTypeParseError(std::string_view as_string);

struct StorageUnitInfo {};

struct StorageAvailableCapacityInfo {};

enum class EjectDeviceResultCode {};


const char* ToString(EjectDeviceResultCode as_enum);
EjectDeviceResultCode ParseEjectDeviceResultCode(std::string_view as_string);
std::u16string GetEjectDeviceResultCodeParseError(std::string_view as_string);


//
// Functions
//

namespace GetInfo {

namespace Results {

base::Value::List Create(const std::vector<StorageUnitInfo>& info);
}  // namespace Results

}  // namespace GetInfo

namespace EjectDevice {

struct Params {};

namespace Results {

base::Value::List Create(const EjectDeviceResultCode& result);
}  // namespace Results

}  // namespace EjectDevice

namespace GetAvailableCapacity {

struct Params {};

namespace Results {

base::Value::List Create(const StorageAvailableCapacityInfo& info);
}  // namespace Results

}  // namespace GetAvailableCapacity

//
// Events
//

namespace OnAttached {

extern const char kEventName[];  // "system.storage.onAttached"

base::Value::List Create(const StorageUnitInfo& info);
}  // namespace OnAttached

namespace OnDetached {

extern const char kEventName[];  // "system.storage.onDetached"

base::Value::List Create(const std::string& id);
}  // namespace OnDetached

}  // namespace system_storage
}  // namespace api
}  // namespace extensions

#endif  // EXTENSIONS_COMMON_API_SYSTEM_STORAGE_H__