1//
2// Environment_UNIX.h
3//
4// Library: Foundation
5// Package: Core
6// Module: Environment
7//
8// Definition of the EnvironmentImpl class for Unix.
9//
10// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
11// and Contributors.
12//
13// SPDX-License-Identifier: BSL-1.0
14//
15
16
17#ifndef Foundation_Environment_UNIX_INCLUDED
18#define Foundation_Environment_UNIX_INCLUDED
19
20
21#include "Poco/Foundation.h"
22#include "Poco/Mutex.h"
23#include <map>
24
25
26namespace Poco {
27
28
29class Foundation_API EnvironmentImpl
30{
31public:
32 typedef UInt8 NodeId[6]; /// Ethernet address.
33
34 static std::string getImpl(const std::string& name);
35 static bool hasImpl(const std::string& name);
36 static void setImpl(const std::string& name, const std::string& value);
37 static std::string osNameImpl();
38 static std::string osDisplayNameImpl();
39 static std::string osVersionImpl();
40 static std::string osArchitectureImpl();
41 static std::string nodeNameImpl();
42 static void nodeIdImpl(NodeId& id);
43 static unsigned processorCountImpl();
44
45private:
46 typedef std::map<std::string, std::string> StringMap;
47
48 static StringMap _map;
49 static FastMutex _mutex;
50};
51
52
53} // namespace Poco
54
55
56#endif // Foundation_Environment_UNIX_INCLUDED
57