// 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/gcm.json // by tools/json_schema_compiler. // DO NOT EDIT. #ifndef CHROME_COMMON_EXTENSIONS_API_GCM_H__ #define CHROME_COMMON_EXTENSIONS_API_GCM_H__ #include <stdint.h> #include <map> #include <memory> #include <optional> #include <string> #include <vector> #include "base/values.h" namespace extensions { namespace api { namespace gcm { // // Properties // // The maximum size (in bytes) of all key/value pairs in a message. extern const int MAX_MESSAGE_SIZE; // // Functions // namespace Register { struct Params { … }; namespace Results { // A registration ID assigned to the application by the FCM. base::Value::List Create(const std::string& registration_id); } // namespace Results } // namespace Register namespace Unregister { namespace Results { base::Value::List Create(); } // namespace Results } // namespace Unregister namespace Send { struct Params { … }; namespace Results { // The ID of the message that the callback was issued for. base::Value::List Create(const std::string& message_id); } // namespace Results } // namespace Send // // Events // namespace OnMessage { extern const char kEventName[]; // "gcm.onMessage" // A message received from another party via FCM. struct Message { … }; // A message received from another party via FCM. base::Value::List Create(const Message& message); } // namespace OnMessage namespace OnMessagesDeleted { extern const char kEventName[]; // "gcm.onMessagesDeleted" base::Value::List Create(); } // namespace OnMessagesDeleted namespace OnSendError { extern const char kEventName[]; // "gcm.onSendError" // An error that occured while trying to send the message either in Chrome or on // the FCM server. Application can retry sending the message with a reasonable // backoff and possibly longer time-to-live. struct Error { … }; // An error that occured while trying to send the message either in Chrome or on // the FCM server. Application can retry sending the message with a reasonable // backoff and possibly longer time-to-live. base::Value::List Create(const Error& error); } // namespace OnSendError } // namespace gcm } // namespace api } // namespace extensions #endif // CHROME_COMMON_EXTENSIONS_API_GCM_H__