analytics: Add operation result code for Payload analytics, IV

PiperOrigin-RevId: 704265442
This commit is contained in:
Edwin Wu
2024-12-09 06:44:40 -08:00
committed by Copybara-Service
parent c60b6c46f6
commit eeeb93bf53
4 changed files with 75 additions and 40 deletions
@@ -15,22 +15,23 @@
#ifndef CORE_INTERNAL_INTERNAL_PAYLOAD_FACTORY_H_
#define CORE_INTERNAL_INTERNAL_PAYLOAD_FACTORY_H_
#include <string>
#include <memory>
#include <string>
#include "connections/implementation/internal_payload.h"
#include "connections/payload.h"
#include "internal/platform/expected.h"
namespace nearby {
namespace connections {
// Creates an InternalPayload representing an outgoing Payload.
std::unique_ptr<InternalPayload> CreateOutgoingInternalPayload(Payload payload);
ErrorOr<std::unique_ptr<InternalPayload>> CreateOutgoingInternalPayload(
Payload payload);
// Creates an InternalPayload representing an incoming Payload from a remote
// endpoint.
std::unique_ptr<InternalPayload> CreateIncomingInternalPayload(
ErrorOr<std::unique_ptr<InternalPayload>> CreateIncomingInternalPayload(
const location::nearby::connections::PayloadTransferFrame& frame,
const std::string& custom_save_path);