chromium/out/Default/gen/chrome/common/extensions/api/notifications.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
//   chrome/common/extensions/api/notifications.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#ifndef CHROME_COMMON_EXTENSIONS_API_NOTIFICATIONS_H__
#define CHROME_COMMON_EXTENSIONS_API_NOTIFICATIONS_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 notifications {

//
// Types
//

enum class TemplateType {};


const char* ToString(TemplateType as_enum);
TemplateType ParseTemplateType(std::string_view as_string);
std::u16string GetTemplateTypeParseError(std::string_view as_string);

enum class PermissionLevel {};


const char* ToString(PermissionLevel as_enum);
PermissionLevel ParsePermissionLevel(std::string_view as_string);
std::u16string GetPermissionLevelParseError(std::string_view as_string);

struct NotificationItem {};

struct NotificationBitmap {};

struct NotificationButton {};

struct NotificationOptions {};


//
// Functions
//

namespace Create {

struct Params {};

namespace Results {

base::Value::List Create(const std::string& notification_id);
}  // namespace Results

}  // namespace Create

namespace Update {

struct Params {};

namespace Results {

base::Value::List Create(bool was_updated);
}  // namespace Results

}  // namespace Update

namespace Clear {

struct Params {};

namespace Results {

base::Value::List Create(bool was_cleared);
}  // namespace Results

}  // namespace Clear

namespace GetAll {

namespace Results {

struct Notifications {};


base::Value::List Create(const Notifications& notifications);
}  // namespace Results

}  // namespace GetAll

namespace GetPermissionLevel {

namespace Results {

base::Value::List Create(const PermissionLevel& level);
}  // namespace Results

}  // namespace GetPermissionLevel

//
// Events
//

namespace OnClosed {

extern const char kEventName[];  // "notifications.onClosed"

base::Value::List Create(const std::string& notification_id, bool by_user);
}  // namespace OnClosed

namespace OnClicked {

extern const char kEventName[];  // "notifications.onClicked"

base::Value::List Create(const std::string& notification_id);
}  // namespace OnClicked

namespace OnButtonClicked {

extern const char kEventName[];  // "notifications.onButtonClicked"

base::Value::List Create(const std::string& notification_id, int button_index);
}  // namespace OnButtonClicked

namespace OnPermissionLevelChanged {

extern const char kEventName[];  // "notifications.onPermissionLevelChanged"

base::Value::List Create(const PermissionLevel& level);
}  // namespace OnPermissionLevelChanged

namespace OnShowSettings {

extern const char kEventName[];  // "notifications.onShowSettings"

base::Value::List Create();
}  // namespace OnShowSettings

}  // namespace notifications
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_NOTIFICATIONS_H__