Gazebo Fuel_tools

API Reference

10.0.0
ClientConfig.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Open Source Robotics Foundation
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*/
17
18#ifndef GZ_FUEL_TOOLS_CLIENTCONFIG_HH_
19#define GZ_FUEL_TOOLS_CLIENTCONFIG_HH_
20
21#include <memory>
22#include <string>
23#include <vector>
24
25#include <gz/common/URI.hh>
26
27#include "gz/fuel_tools/Export.hh"
29
30#ifdef _WIN32
31// Disable warning C4251 which is triggered by
32// std::unique_ptr
33#pragma warning(push)
34#pragma warning(disable: 4251)
35#endif
36
38{
40 class ClientConfigPrivate;
41
44 class GZ_FUEL_TOOLS_VISIBLE ClientConfig
45 {
47 public: ClientConfig();
48
51 public: ClientConfig(const ClientConfig &_copy);
52
55 public: ClientConfig &operator=(const ClientConfig &_copy);
56
58 public: ~ClientConfig();
59
63 public: void Clear();
64
67 public: void SetUserAgent(const std::string &_agent);
68
71 public: const std::string &UserAgent() const;
72
77 public: bool LoadConfig(const std::string &_file);
78
83 public: std::string ConfigPath() const;
84
88
92
95 public: void AddServer(const ServerConfig &_srv);
96
99 public: std::string CacheLocation() const;
100
103 public: void SetCacheLocation(const std::string &_path);
104
108 public: std::string AsString(const std::string &_prefix = "") const;
109
112 };
113} // namespace gz::fuel_tools
114
115#ifdef _MSC_VER
116#pragma warning(pop)
117#endif
118
119#endif // GZ_FUEL_TOOLS_CLIENTCONFIG_HH_