(EnvironmentVariables)Added getter functions that take value by reference and return...
[platform/core/uifw/dali-adaptor.git] / adaptors / base / environment-options.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include "environment-options.h"
20
21 namespace Dali
22 {
23
24 namespace Internal
25 {
26
27 namespace Adaptor
28 {
29
30 EnvironmentOptions::EnvironmentOptions()
31 : mFpsFrequency(0),
32   mUpdateStatusFrequency(0),
33   mPerformanceLoggingLevel(0),
34   mPanGestureLoggingLevel(0),
35   mPanGesturePredictionMode(-1),
36   mLogFunction( NULL )
37 {
38 }
39
40 EnvironmentOptions::~EnvironmentOptions()
41 {
42 }
43
44 void EnvironmentOptions::SetLogOptions( const Dali::Integration::Log::LogFunction& logFunction,
45                              unsigned int logFrameRateFrequency,
46                              unsigned int logupdateStatusFrequency,
47                              unsigned int logPerformanceLevel,
48                              unsigned int logPanGestureLevel )
49 {
50   mLogFunction = logFunction;
51   mFpsFrequency = logFrameRateFrequency;
52   mUpdateStatusFrequency = logupdateStatusFrequency;
53   mPerformanceLoggingLevel = logPerformanceLevel;
54   mPanGestureLoggingLevel = logPanGestureLevel;
55 }
56
57 void EnvironmentOptions::InstallLogFunction() const
58 {
59   Dali::Integration::Log::InstallLogFunction( mLogFunction );
60 }
61
62 void EnvironmentOptions::UnInstallLogFunction() const
63 {
64   Dali::Integration::Log::UninstallLogFunction();
65 }
66
67 unsigned int EnvironmentOptions::GetFrameRateLoggingFrequency() const
68 {
69   return mFpsFrequency;
70 }
71
72 unsigned int EnvironmentOptions::GetUpdateStatusLoggingFrequency() const
73 {
74   return mUpdateStatusFrequency;
75 }
76
77 unsigned int EnvironmentOptions::GetPerformanceLoggingLevel() const
78 {
79   return mPerformanceLoggingLevel;
80 }
81
82 unsigned int EnvironmentOptions::GetPanGestureLoggingLevel() const
83 {
84   return mPanGestureLoggingLevel;
85 }
86
87 unsigned int EnvironmentOptions::GetPanGestureSmoothingMode() const
88 {
89   return mPanGesturePredictionMode;
90 }
91
92 } // Adaptor
93
94 } // Internal
95
96 } // Dali