forked from microsoft/react-native-code-push
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodePushTelemetryManager.h
More file actions
29 lines (25 loc) · 1.47 KB
/
CodePushTelemetryManager.h
File metadata and controls
29 lines (25 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include "winrt/Windows.Data.Json.h"
#include <string_view>
namespace Microsoft::CodePush::ReactNative
{
struct CodePushTelemetryManager
{
static winrt::Windows::Data::Json::JsonObject GetBinaryUpdateReport(std::wstring_view appVersion);
static winrt::Windows::Data::Json::JsonObject GetRetryStatusReport();
static winrt::Windows::Data::Json::JsonObject GetRollbackReport(const winrt::Windows::Data::Json::JsonObject& lastFailedPackage);
static winrt::Windows::Data::Json::JsonObject GetUpdateReport(const winrt::Windows::Data::Json::JsonObject& currentPackage);
static void RecordStatusReported(const winrt::Windows::Data::Json::JsonObject& statusReport);
static void SaveStatusReportForRetry(const winrt::Windows::Data::Json::JsonObject& statusReport);
private:
static void ClearRetryStatusReport();
static std::wstring_view GetDeploymentKeyFromStatusReportIdentifier(std::wstring_view statusReportIdentifier);
static winrt::hstring GetPackageStatusReportIdentifier(const winrt::Windows::Data::Json::JsonObject& package);
static winrt::hstring GetPreviousStatusReportIdentifier();
static std::wstring_view GetVersionLabelFromStatusReportIdentifier(std::wstring_view statusReportIdentifier);
static bool IsStatusReportIdentifierCodePushLabel(std::wstring_view statusReportIdentifier);
static void SaveStatusReportedForIdentifier(std::wstring_view appVersionOrPackageIdentifier);
};
}