root / Community Core Vision / Windows / libs / poco / include / Poco / Environment_UNIX.h @ 8

View | Annotate | Download (2.4 KB)

1 8 amit
//
2 8 amit
// Environment_UNIX.h
3 8 amit
//
4 8 amit
// $Id: //poco/1.3/Foundation/include/Poco/Environment_UNIX.h#2 $
5 8 amit
//
6 8 amit
// Library: Foundation
7 8 amit
// Package: Core
8 8 amit
// Module:  Environment
9 8 amit
//
10 8 amit
// Definition of the EnvironmentImpl class for Unix.
11 8 amit
//
12 8 amit
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
13 8 amit
// and Contributors.
14 8 amit
//
15 8 amit
// Permission is hereby granted, free of charge, to any person or organization
16 8 amit
// obtaining a copy of the software and accompanying documentation covered by
17 8 amit
// this license (the "Software") to use, reproduce, display, distribute,
18 8 amit
// execute, and transmit the Software, and to prepare derivative works of the
19 8 amit
// Software, and to permit third-parties to whom the Software is furnished to
20 8 amit
// do so, all subject to the following:
21 8 amit
//
22 8 amit
// The copyright notices in the Software and this entire statement, including
23 8 amit
// the above license grant, this restriction and the following disclaimer,
24 8 amit
// must be included in all copies of the Software, in whole or in part, and
25 8 amit
// all derivative works of the Software, unless such copies or derivative
26 8 amit
// works are solely in the form of machine-executable object code generated by
27 8 amit
// a source language processor.
28 8 amit
//
29 8 amit
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 8 amit
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 8 amit
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
32 8 amit
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
33 8 amit
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
34 8 amit
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
35 8 amit
// DEALINGS IN THE SOFTWARE.
36 8 amit
//
37 8 amit
38 8 amit
39 8 amit
#ifndef Foundation_Environment_UNIX_INCLUDED
40 8 amit
#define Foundation_Environment_UNIX_INCLUDED
41 8 amit
42 8 amit
43 8 amit
#include "Poco/Foundation.h"
44 8 amit
#include "Poco/Mutex.h"
45 8 amit
#include <map>
46 8 amit
47 8 amit
48 8 amit
namespace Poco {
49 8 amit
50 8 amit
51 8 amit
class Foundation_API EnvironmentImpl
52 8 amit
{
53 8 amit
public:
54 8 amit
        typedef UInt8 NodeId[6]; /// Ethernet address.
55 8 amit
56 8 amit
        static std::string getImpl(const std::string& name);
57 8 amit
        static bool hasImpl(const std::string& name);
58 8 amit
        static void setImpl(const std::string& name, const std::string& value);
59 8 amit
        static std::string osNameImpl();
60 8 amit
        static std::string osVersionImpl();
61 8 amit
        static std::string osArchitectureImpl();
62 8 amit
        static std::string nodeNameImpl();
63 8 amit
        static void nodeIdImpl(NodeId& id);
64 8 amit
65 8 amit
private:
66 8 amit
        typedef std::map<std::string, std::string> StringMap;
67 8 amit
68 8 amit
        static StringMap _map;
69 8 amit
        static FastMutex _mutex;
70 8 amit
};
71 8 amit
72 8 amit
73 8 amit
} // namespace Poco
74 8 amit
75 8 amit
76 8 amit
#endif // Foundation_Environment_UNIX_INCLUDED