1 /***************************************************************************
2 * Copyright 2012 BMW Car IT GmbH
3 * Copyright (C) 2012 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 ****************************************************************************/
20 #ifndef __CONFIGURATION_H__
21 #define __CONFIGURATION_H__
26 //============================================================================
27 // default configuration for LayerManagementService
28 //============================================================================
29 #define DEFAULT_DISPLAY_NAME ":0"
30 #define DEFAULT_DISPLAY_WIDTH 1280
31 #define DEFAULT_DISPLAY_HEIGHT 480
33 #define DEFAULT_LOG_LEVEL_CONSOLE 2
34 #define DEFAULT_LOG_LEVEL_FILE 0
35 #define DEFAULT_LOG_LEVEL_TRACE 4
37 #define DEFAULT_PLUGIN_PATH CMAKE_INSTALL_PREFIX"/lib/layermanager"
39 //============================================================================
40 // configuration class
41 //============================================================================
45 Configuration(int argc, char** argv);
47 std::string getDisplayName();
48 int getDisplayWidth();
49 int getDisplayHeight();
51 int getLogLevelConsole();
52 int getLogLevelFile();
53 int getLogLevelTrace();
55 std::string getPluginPath();
57 void logAllSettings();
60 void processCommandLine(int argc, char** argv);
61 void processBuildFlags();
62 void processEnvironmentVariables();
65 // command line arguments
66 std::string mCommandLine;
74 std::string mDisplayName;
75 std::string mPluginPath;
78 const BuildFlag* mpBuildFlags;
79 const int mBuildFlagCount;
82 #endif // __CONFIGURATION_H__