2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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.
21 * @brief Power manager setting module header
23 #ifndef __PM_SETTING_H__
24 #define __PM_SETTING_H__
29 * @addtogroup POWER_MANAGER
35 SETTING_TO_NORMAL = SETTING_BEGIN,
41 SETTING_PM_STATE = SETTING_GET_END,
45 extern int get_setting_brightness();
48 * @brief setting initialization function
50 * get the variables if it exists. otherwise, set the default.
51 * and register some callback functions.
54 * @param[in] func configuration change callback function
55 * @return 0 : success, -1 : error
57 extern int init_setting(int (*func) (int key_idx, int val));
59 extern int exit_setting();
62 * get normal state timeout from SLP-setting SLP_SETTING_LCD_TIMEOUT_NORMAL
65 * @param[out] timeout timeout variable pointer
66 * @return 0 : success, -1 : error
68 extern int get_run_timeout(int *timeout);
71 * get LCD dim state timeout from environment variable.
74 * @param[out] timeout timeout variable pointer
75 * @return 0 : success, -1 : error
77 extern int get_dim_timeout(int *timeout);
80 * get LCD off state timeout from environment variable.
83 * @param[out] timeout timeout variable pointer
84 * @return 0 : success, -1 : error
86 extern int get_off_timeout(int *timeout);
89 * get USB connection status from SLP-setting SLP_SETTING_USB_STATUS
92 * @param[out] val usb connection status variable pointer, 0 is disconnected, others is connected.
93 * @return 0 : success, -1 : error
95 extern int get_usb_status(int *val);
98 * set Current power manager state at SLP-setting "memory/pwrmgr/state"
101 * @param[in] val current power manager state.
102 * @return 0 : success, -1 : error
104 extern int set_setting_pmstate(int val);
107 * get charging status at SLP-setting "memory/Battery/Charger"
110 * @param[in] val charging or not (1 or 0 respectively).
111 * @return 0 : success, -1 : error
113 extern int get_charging_status(int *val);
116 * get current battery low status at SLP-setting "memory/Battery/Status/Low"
119 * @param[in] val current low battery status
120 * @return 0 : success, -1 : error
122 extern int get_lowbatt_status(int *val);