chromium/components/update_client/protocol_definition.h

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

#ifndef COMPONENTS_UPDATE_CLIENT_PROTOCOL_DEFINITION_H_
#define COMPONENTS_UPDATE_CLIENT_PROTOCOL_DEFINITION_H_

#include <stdint.h>

#include <optional>
#include <string>
#include <vector>

#include "base/containers/flat_map.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/update_client/activity_data_service.h"

namespace update_client::protocol_request {

// The protocol versions so far are:
// * Version 3.1: it changes how the run actions are serialized.
// * Version 3.0: it is the version implemented by the desktop updaters.
extern const char kProtocolVersion[];

// Due to implementation constraints of the JSON parser and serializer,
// precision of integer numbers greater than 2^53 is lost.
inline constexpr int64_t kProtocolMaxInt =;

// Event type codes as described in //docs/updater/protocol_3_1.md.
inline constexpr int kEventInstall =;
inline constexpr int kEventUpdate =;
inline constexpr int kEventUninstall =;
inline constexpr int kEventDownload =;

// App Command Events.
inline constexpr int kEventAppCommandComplete =;

inline constexpr int kEventAction =;

struct HW {};

struct OS {};

struct Updater {};

struct UpdateCheck {};

// `data` element.
struct Data {};

// didrun element. The element is named "ping" for legacy reasons.
struct Ping {};

struct App {};

struct Request {};

}  // namespace update_client::protocol_request

#endif  // COMPONENTS_UPDATE_CLIENT_PROTOCOL_DEFINITION_H_