//
// Copyright (C) 2026 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include <string>
#include <string_view>
#include <vector>

#include "cuttlefish/result/result.h"

namespace cuttlefish {

// This is very similar to gflags::CommandLineFlagInfo, but excludes
// has_validator_fn, is_default and flag_ptr as those only make sense for flags
// defined in the current process and are not in the XML.
struct GflagDescription {
  std::string file;
  std::string name;
  std::string meaning;
  std::string default_value;
  std::string current_value;
  std::string type;

  bool operator==(const GflagDescription&) const = default;
};
Result<std::vector<GflagDescription>> ParseGflagsXmlHelp(
    std::string_view xml_help);

}  // namespace cuttlefish
