chromium/third_party/webrtc/logging/rtc_event_log/events/rtc_event_log_parse_status.h

/*
 *  Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_LOG_PARSE_STATUS_H_
#define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_LOG_PARSE_STATUS_H_

#include <string>

#include "absl/base/attributes.h"
#include "absl/strings/string_view.h"
#include "rtc_base/checks.h"

#define RTC_PARSE_RETURN_ERROR(X)

#define RTC_PARSE_CHECK_OR_RETURN(X)

#define RTC_PARSE_CHECK_OR_RETURN_MESSAGE(X, M)

#define RTC_PARSE_CHECK_OR_RETURN_OP(OP, X, Y)

#define RTC_PARSE_CHECK_OR_RETURN_EQ(X, Y)

#define RTC_PARSE_CHECK_OR_RETURN_NE(X, Y)

#define RTC_PARSE_CHECK_OR_RETURN_LT(X, Y)

#define RTC_PARSE_CHECK_OR_RETURN_LE(X, Y)

#define RTC_PARSE_CHECK_OR_RETURN_GT(X, Y)

#define RTC_PARSE_CHECK_OR_RETURN_GE(X, Y)

#define RTC_PARSE_WARN_AND_RETURN_SUCCESS_IF(X, M)

#define RTC_RETURN_IF_ERROR(X)

// TODO(terelius): Compared to a generic 'Status' class, this
// class allows us additional information about the context
// in which the error occurred. This is currently limited to
// the source location (file and line), but we plan on adding
// information about the event and field name being parsed.
// If/when we start using absl::Status in WebRTC, consider
// whether payloads would be an appropriate alternative.
class RtcEventLogParseStatus {};

template <typename T>
class RtcEventLogParseStatusOr {};

#endif  // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_LOG_PARSE_STATUS_H_