1 #ifndef __DALI_INTERNAL_ADAPTOR_LOG_OPTIONS_H__
2 #define __DALI_INTERNAL_ADAPTOR_LOG_OPTIONS_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://floralicense.org/license/
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
20 #include <dali/integration-api/debug.h>
30 * Contains log settings and the ability to install a log function.
43 * non-virtual destructor, not intended as a base class
48 * @param logFunction logging function
49 * @param logFilterOptions bitmask of the logging options defined in intergration/debug.h (e.g.
50 * @param logFrameRateFrequency frequency of how often FPS is logged out (e.g. 0 = off, 2 = every 2 seconds).
51 * @param logupdateStatusFrequency frequency of how often the update status is logged in number of frames
52 * @param logPerformanceLevel performance logging, 0 = disabled, 1+ = enabled
53 * @param logPanGestureLevel pan-gesture logging, 0 = disabled, 1 = enabled
55 void SetOptions( const Dali::Integration::Log::LogFunction& logFunction,
56 unsigned int logFrameRateFrequency,
57 unsigned int logupdateStatusFrequency,
58 unsigned int logPerformanceLevel,
59 unsigned int logPanGestureLevel );
62 * Install the log function for the current thread.
64 void InstallLogFunction() const;
67 * Un-install the log function for the current thread.
69 void UnInstallLogFunction() const;
72 * @return frequency of how often FPS is logged out (e.g. 0 = off, 2 = every 2 seconds).
74 unsigned int GetFrameRateLoggingFrequency() const;
77 * @return frequency of how often Update Status is logged out (e.g. 0 = off, 60 = log every 60 frames = 1 second @ 60FPS).
79 unsigned int GetUpdateStatusLoggingFrequency() const;
82 * @return logPerformanceLevel performance log level ( 0 = off )
84 unsigned int GetPerformanceLoggingLevel() const;
87 * @return pan-gesture logging level ( 0 == off )
89 unsigned int GetPanGestureLoggingLevel() const;
93 unsigned int mFpsFrequency; ///< how often fps is logged out in seconds
94 unsigned int mUpdateStatusFrequency; ///< how often update status is logged out in frames
95 unsigned int mPerformanceLoggingLevel; ///< performance log level
96 unsigned int mPanGestureLoggingLevel; ///< pan-gesture log level
98 Dali::Integration::Log::LogFunction mLogFunction;
100 // Undefined copy constructor.
101 LogOptions( const LogOptions& );
103 // Undefined assignment operator.
104 LogOptions& operator=( const LogOptions& );
112 #endif // __DALI_INTERNAL_ADAPTOR_LOG_OPTIONS_H__