blob: 459309f2ae292539a0e055c5a0c4c9ffe0b31d9b [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_DEVELOPER_FORENSICS_CRASH_REPORTS_INFO_QUEUE_INFO_H_
#define SRC_DEVELOPER_FORENSICS_CRASH_REPORTS_INFO_QUEUE_INFO_H_
#include <lib/syslog/cpp/macros.h>
#include <memory>
#include "src/developer/forensics/crash_reports/info/info_context.h"
namespace forensics {
namespace crash_reports {
// Information about the queue we want to export.
struct QueueInfo {
public:
QueueInfo(std::shared_ptr<InfoContext> context);
void RecordUploadAttemptNumber(uint64_t upload_attempt);
void MarkReportAsUploaded(const std::string& server_report_id, uint64_t upload_attempts);
void MarkReportAsArchived();
void MarkReportAsDeleted(uint64_t upload_attempts);
void MarkReportAsGarbageCollected(uint64_t upload_attempts);
void MarkReportAsThrottledByServer(uint64_t upload_attempts);
void MarkReportAsTimedOut(uint64_t upload_attempts);
private:
std::shared_ptr<InfoContext> context_;
};
} // namespace crash_reports
} // namespace forensics
#endif // SRC_DEVELOPER_FORENSICS_CRASH_REPORTS_INFO_QUEUE_INFO_H_