repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / server / ServerSettings.h
blobf882c10f93841755d6acac414ea366d7200d8282
1 /*
2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
6 #ifndef SERVER_SETTINGS_H
7 #define SERVER_SETTINGS_H
9 #include <File.h>
10 #include <HttpHeaders.h>
11 #include <String.h>
12 #include <Url.h>
15 class ServerSettings {
16 public:
17 static status_t SetBaseUrl(const BUrl& baseUrl);
18 static const BString GetUserAgent();
19 static void AugmentHeaders(BHttpHeaders& headers);
20 static BUrl CreateFullUrl(
21 const BString urlPathComponents);
23 private:
24 static void _InitUserAgent();
25 static const BString _GetUserAgentVersionString();
27 static BUrl sBaseUrl;
28 static BString sUserAgent;
29 static pthread_once_t sUserAgentInitOnce;
32 #endif // SERVER_SETTINGS_H