License conversion from Flora to Apache 2.0
[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   mLogFunction( NULL )
36 {
37 }
38
39 EnvironmentOptions::~EnvironmentOptions()
40 {
41 }
42
43 void EnvironmentOptions::SetLogOptions( const Dali::Integration::Log::LogFunction& logFunction,
44                              unsigned int logFrameRateFrequency,
45                              unsigned int logupdateStatusFrequency,
46                              unsigned int logPerformanceLevel,
47                              unsigned int logPanGestureLevel )
48 {
49   mLogFunction = logFunction;
50   mFpsFrequency = logFrameRateFrequency;
51   mUpdateStatusFrequency = logupdateStatusFrequency;
52   mPerformanceLoggingLevel = logPerformanceLevel;
53   mPanGestureLoggingLevel = logPanGestureLevel;
54 }
55
56 void EnvironmentOptions::InstallLogFunction() const
57 {
58   Dali::Integration::Log::InstallLogFunction( mLogFunction );
59 }
60
61 void EnvironmentOptions::UnInstallLogFunction() const
62 {
63   Dali::Integration::Log::UninstallLogFunction();
64 }
65
66 unsigned int EnvironmentOptions::GetFrameRateLoggingFrequency() const
67 {
68   return mFpsFrequency;
69 }
70
71 unsigned int EnvironmentOptions::GetUpdateStatusLoggingFrequency() const
72 {
73   return mUpdateStatusFrequency;
74 }
75
76 unsigned int EnvironmentOptions::GetPerformanceLoggingLevel() const
77 {
78   return mPerformanceLoggingLevel;
79 }
80
81 unsigned int EnvironmentOptions::GetPanGestureLoggingLevel() const
82 {
83   return mPanGestureLoggingLevel;
84 }
85
86 unsigned int EnvironmentOptions::GetPanGestureSmoothingMode() const
87 {
88   return mPanGesturePredictionMode;
89 }
90
91 } // Adaptor
92
93 } // Internal
94
95 } // Dali