1 // Copyright 2005-2019 The Mumble Developers. All rights reserved.
2 // Use of this source code is governed by a BSD-style license
3 // that can be found in the LICENSE file at the root of the
4 // Mumble source tree or at <https://www.mumble.info/LICENSE>.
5 
6 #ifndef MUMBLE_MUMBLE_ENVUTILS_H_
7 #define MUMBLE_MUMBLE_ENVUTILS_H_
8 
9 #include <QString>
10 
11 class EnvUtils {
12 public:
13 	// getenv is a wrapper around _wgetenv_s (on Windows)
14 	// and getenv (on everything else).
15 	//
16 	// On Windows, it expects a Unicode environment -- so variables
17 	// are expected to be UTF16.
18 	//
19 	// On everything else, it expects environment variables to use the
20 	// locale-defined encoding. (From a Qt-perspective, we use toLocal8Bit/fromLocal8Bit.)
21 	static QString getenv(QString name);
22 
23 	static bool setenv(QString name, QString value);
24 };
25 
26 #endif
27