blob: ccc501436a6aae6bfe6d0eb5fd07721f23dc7727 [file] [log] [blame]
Bob Beckbc97b7a2023-04-18 08:35:15 -06001// Copyright 2023 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef BSSL_FILLINS_PATH_SERVICE_H
6#define BSSL_FILLINS_PATH_SERVICE_H
7
8#include <openssl/base.h>
9
10#include <string>
11
12namespace bssl {
13
14namespace fillins {
15
Bob Beck85081c62023-08-28 21:25:30 +000016class FilePath {
Bob Beckbc97b7a2023-04-18 08:35:15 -060017 public:
Bob Becka3add9e2023-08-25 16:40:58 +000018 FilePath();
19 FilePath(const std::string &path);
Bob Beckbc97b7a2023-04-18 08:35:15 -060020
Bob Becka3add9e2023-08-25 16:40:58 +000021 const std::string &value() const;
Bob Beckbc97b7a2023-04-18 08:35:15 -060022
Bob Becka3add9e2023-08-25 16:40:58 +000023 FilePath AppendASCII(const std::string &ascii_path_element) const;
Bob Beckbc97b7a2023-04-18 08:35:15 -060024
25 private:
26 std::string path_;
27};
28
Bob Becka1403cb2023-08-28 16:44:45 +000029enum PathKey {
Bob Beck7fb818f2023-10-25 20:13:06 +000030 BSSL_TEST_DATA_ROOT = 0,
Bob Beckbc97b7a2023-04-18 08:35:15 -060031};
32
Bob Beck85081c62023-08-28 21:25:30 +000033class PathService {
Bob Beckbc97b7a2023-04-18 08:35:15 -060034 public:
35 static void Get(PathKey key, FilePath *out);
36};
37
38} // namespace fillins
39
40} // namespace bssl
41
42#endif // BSSL_FILLINS_PATH_SERVICE_H