2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FSys_RuntimeInfoImpl.h
19 * @brief This is the header file for _RuntimeInfoImpl class.
22 #ifndef _FSYSTEM_INTERNAL_RUNTIMEINFO_IMPL_H_
23 #define _FSYSTEM_INTERNAL_RUNTIMEINFO_IMPL_H_
25 #include <FSysRuntimeInfo.h>
26 #include <FSysIRuntimeInfoGetIntAsyncResultListener.h>
27 #include <FSysIRuntimeInfoGetLonglongAsyncResultListener.h>
29 namespace Tizen { namespace System
33 class _OSP_EXPORT_ _RuntimeInfoImpl
34 : public Tizen::Base::Object
37 _RuntimeInfoImpl(void);
39 virtual ~_RuntimeInfoImpl(void);
41 static result GetValue(const Tizen::Base::String& key, Tizen::Base::String& value);
42 static result GetValue(const Tizen::Base::String& key, int& value);
43 static result GetValue(const Tizen::Base::String& key, long long& value);
44 static result GetValue(const Tizen::Base::String& key, double& value);
45 static result GetValue(const Tizen::Base::String& key, bool& value);
46 static result GetValue(const Tizen::Base::String& key, Tizen::Base::UuId& value);
47 static result GetValueAsync(const Tizen::Base::String& key, IRuntimeInfoGetIntAsyncResultListener* listener);
48 static result GetValueAsync(const Tizen::Base::String& key, IRuntimeInfoGetLonglongAsyncResultListener* listener);
49 static _RuntimeInfoImpl* GetInstance(RuntimeInfo& runtimeinfo);
50 static const _RuntimeInfoImpl* GetInstance(const RuntimeInfo& runtimeinfo);
53 static result GetBatteryLevel(int& value);
54 static result IsChargingMode(bool& value);
55 static result GetAvailableInternalStorage(long long& value);
56 static result GetAvailableExternalStorage(long long& value);
57 static result GetAvailableMediaStorage(long long& value);
58 static result GetCapacity(const char* path, long long& totalSize, long long& availableSize);
59 static result GetFromProc(const char* path, const char* key, int& value);
60 static result GetFromProcLonglong(const char* path, const char* key, long long& value);
61 static long long GetDirectorySize(const char* path);
62 static void* GetDirectorySizeAsync(void* data);
63 static void* GetCpuUsageAsync(void* data);
68 #endif //_FSYSTEM_INTERNAL_ALARM_IMPL_H_