Android-cuttlefish cvd tool
android_build_url.h
Go to the documentation of this file.
1//
2// Copyright (C) 2025 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <string>
19#include <string_view>
20#include <vector>
21
22namespace cuttlefish {
23
25 public:
26 AndroidBuildUrl(std::string api_base_url, std::string api_key,
27 std::string project_id);
28
29 std::string GetLatestBuildIdUrl(std::string_view branch,
30 std::string_view target);
31 std::string GetBuildUrl(std::string_view id, std::string_view target);
32 std::string GetArtifactUrl(std::string_view id, std::string_view target,
33 const std::vector<std::string>& artifact_filenames,
34 std::string_view page_token);
35 std::string GetArtifactDownloadUrl(std::string_view id,
36 std::string_view target,
37 std::string_view artifact);
38
39 private:
40 std::string api_base_url_;
41 std::string api_key_;
42 std::string project_id_;
43};
44
45} // namespace cuttlefish
Definition: android_build_url.h:24
AndroidBuildUrl(std::string api_base_url, std::string api_key, std::string project_id)
Definition: android_build_url.cpp:112
std::string GetLatestBuildIdUrl(std::string_view branch, std::string_view target)
Definition: android_build_url.cpp:118
std::string GetArtifactUrl(std::string_view id, std::string_view target, const std::vector< std::string > &artifact_filenames, std::string_view page_token)
Definition: android_build_url.cpp:140
std::string api_key_
Definition: android_build_url.h:41
std::string GetArtifactDownloadUrl(std::string_view id, std::string_view target, std::string_view artifact)
Definition: android_build_url.cpp:159
std::string api_base_url_
Definition: android_build_url.h:40
std::string GetBuildUrl(std::string_view id, std::string_view target)
Definition: android_build_url.cpp:132
std::string project_id_
Definition: android_build_url.h:42
Definition: alloc_utils.cpp:23