+capi-system-runtime-info (0.0.1-9) unstable; urgency=low
+
+ * Applying vconf-key changes
+ * Git: slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-9
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Wen, 13 Jun 2012 16:32:44 +0900
+
+capi-system-runtime-info (0.0.1-8) unstable; urgency=low
+
+ * Added charger connection feature
+ * Git: slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-8
+
+ -- Jinkun Jang <jinkun.jang@samsung.com> Mon, 11 Jun 2012 13:32:44 +0900
+
+capi-system-runtime-info (0.0.1-7) unstable; urgency=low
+
+ * Added haptic vibration level
+ * Git: slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-7
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Thu, 10 May 2012 21:27:44 +0900
+
+capi-system-runtime-info (0.0.1-6) unstable; urgency=low
+
+ * Added usb connection feature
+ * Git: slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-6
+
+ -- Jinkun Jang <jinkun.jang@samsung.com> Tue, 08 May 2012 17:04:41 +0900
+
+capi-system-runtime-info (0.0.1-5) unstable; urgency=low
+
+ * Added tv-out, audio-jack and sliding keboard features
+ * Git: slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-5
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Thu, 26 Apr 2012 20:51:41 +0900
+
capi-system-runtime-info (0.0.1-4) unstable; urgency=low
* Updated build configuration
- * Git: api/runtime-info
+ * Git: slp/api/runtime-info
* Tag: capi-system-runtime-info_0.0.1-4
-- Junghyuk Park <junghyuk.park@samsung.com> Thu, 15 Mar 2012 11:43:57 +0900
capi-system-runtime-info (0.0.1-3) unstable; urgency=low
* Added version numbering
- * Git: api/runtime-info
+ * Git: slp/api/runtime-info
* Tag: capi-system-runtime-info_0.0.1-3
-- Junghyuk Park <junghyuk.park@samsung.com> Wed, 15 Feb 2012 10:51:38 +0900
capi-system-runtime-info (0.0.1-2) unstable; urgency=low
- * Initial release.
+ * Code refactoring
+ * Git: slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-2
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Sat, 10 Dec 2011 17:09:25 +0900
+
+capi-system-runtime-info (0.0.1-1) unstable; urgency=low
+
+ * Initial upload
+ * Git: slp-source.sec.samsung.net:slp/api/runtime-info
+ * Tag: capi-system-runtime-info_0.0.1-1
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Tue, 06 Dec 2011 21:16:07 +0900
+
- -- Junghyuk Park <junghyuk.park@samsung.com> Thu, 08 Dec 2011 08:40:35 +0900
RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED, /**<Indicates whether audio jack is connected. */
RUNTIME_INFO_KEY_GPS_STATUS, /**<Indicates the current status of GPS. */
RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, /**<Indicates the battery is currently charging. */
+ RUNTIME_INFO_KEY_TV_OUT_CONNECTED, /**<Indicates whether TV out is connected. */
+ RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, /**<Indicates the current status of audio jack. */
+ RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED, /**<Indicates whether sliding keyboard is opened. */
+ RUNTIME_INFO_KEY_USB_CONNECTED, /**<Indicates whether USB is connected. */
+ RUNTIME_INFO_KEY_CHARGER_CONNECTED, /**<Indicates whether charger is connected. */
+ RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK, /**<Indicates the current vibration level of haptic feedback. */
} runtime_info_key_e;
} runtime_info_first_day_of_week_e;
/**
+ * @brief Enumeration of audio jack status
+ */
+typedef enum
+{
+ RUNTIME_INFO_AUDIO_JACK_STATUS_UNCONNECTED, /**< audio jack is not connected */
+ RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_3WIRE, /**< 3-conductor wire is connected. */
+ RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_4WIRE, /**< 4-conductor wire is connected. */
+} runtime_info_audio_jack_status_e;
+
+
+/**
* @brief Called when the runtime information changes
* @param[in] key Type of notification
* @param[in] user_data The user data passed from the callback registration function
int runtime_info_vconf_get_value_bool(const char *vconf_key, bool *value);
int runtime_info_vconf_get_value_double(const char *vconf_key, double *value);
int runtime_info_vconf_get_value_string(const char *vconf_key, char **value);
-int runtime_info_vconf_set_event_cb(const char *vconf_key, runtime_info_key_e runtime_info_key);
-void runtime_info_vconf_unset_event_cb(const char *vconf_key);
+
+int runtime_info_vconf_set_event_cb(const char *vconf_key, runtime_info_key_e runtime_info_key, int slot);
+void runtime_info_vconf_unset_event_cb(const char *vconf_key, int slot);
int runtime_info_flightmode_get_value(runtime_info_value_h);
int runtime_info_flightmode_set_event_cb(void);
int runtime_info_battery_charging_set_event_cb(void);
void runtime_info_battery_charging_unset_event_cb(void);
+int runtime_info_tvout_connected_get_value(runtime_info_value_h value);
+int runtime_info_tvout_connected_set_event_cb();
+void runtime_info_tvout_connected_unset_event_cb();
+
+int runtime_info_audio_jack_status_get_value (runtime_info_value_h value);
+int runtime_info_audio_jack_status_set_event_cb ();
+void runtime_info_audio_jack_status_unset_event_cb();
+
+int runtime_info_sliding_keyboard_opened_get_value(runtime_info_value_h value);
+int runtime_info_sliding_keyboard_opened_set_event_cb();
+void runtime_info_sliding_keyboard_opened_unset_event_cb();
+
+int runtime_info_usb_connected_get_value(runtime_info_value_h value);
+int runtime_info_usb_connected_set_event_cb();
+void runtime_info_usb_connected_unset_event_cb();
+
+int runtime_info_charger_connected_get_value(runtime_info_value_h value);
+int runtime_info_charger_connected_set_event_cb();
+void runtime_info_charger_connected_unset_event_cb();
+
+int runtime_info_vibration_level_haptic_feedback_get_value(runtime_info_value_h value);
+int runtime_info_vibration_level_haptic_feedback_set_event_cb();
+void runtime_info_vibration_level_haptic_feedback_unset_event_cb();
+
#ifdef __cplusplus
}
#endif
Name: capi-system-runtime-info
Summary: A Runtime Information library in Tizen Native API
Version: 0.0.1
-Release: 4
+Release: 9
Group: TO_BE/FILLED_IN
License: TO BE FILLED IN
Source0: %{name}-%{version}.tar.gz
NULL
},
+
+{
+ RUNTIME_INFO_KEY_TV_OUT_CONNECTED, /**<Indicates whether TV out is connected. */
+ RUNTIME_INFO_DATA_TYPE_BOOL,
+ runtime_info_tvout_connected_get_value,
+ runtime_info_tvout_connected_set_event_cb,
+ runtime_info_tvout_connected_unset_event_cb,
+ NULL
+},
+
+
+{
+ RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, /**<Indicates the current status of audio jack. */
+ RUNTIME_INFO_DATA_TYPE_INT,
+ runtime_info_audio_jack_status_get_value,
+ runtime_info_audio_jack_status_set_event_cb,
+ runtime_info_audio_jack_status_unset_event_cb,
+ NULL
+},
+
+
+{
+ RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED, /**<Indicates whether sliding keyboard is opened. */
+ RUNTIME_INFO_DATA_TYPE_BOOL,
+ runtime_info_sliding_keyboard_opened_get_value,
+ runtime_info_sliding_keyboard_opened_set_event_cb,
+ runtime_info_sliding_keyboard_opened_unset_event_cb,
+ NULL
+},
+
+
+{
+ RUNTIME_INFO_KEY_USB_CONNECTED, /**<Indicates whether usb is connected. */
+ RUNTIME_INFO_DATA_TYPE_BOOL,
+ runtime_info_usb_connected_get_value,
+ runtime_info_usb_connected_set_event_cb,
+ runtime_info_usb_connected_unset_event_cb,
+ NULL
+},
+
+{
+ RUNTIME_INFO_KEY_CHARGER_CONNECTED, /**<Indicates whether charger is connected. */
+ RUNTIME_INFO_DATA_TYPE_BOOL,
+ runtime_info_charger_connected_get_value,
+ runtime_info_charger_connected_set_event_cb,
+ runtime_info_charger_connected_unset_event_cb,
+ NULL
+},
+
+{
+ RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK, /**<Indicates the current vibration level of haptic feedback. */
+ RUNTIME_INFO_DATA_TYPE_INT,
+ runtime_info_vibration_level_haptic_feedback_get_value,
+ runtime_info_vibration_level_haptic_feedback_set_event_cb,
+ runtime_info_vibration_level_haptic_feedback_unset_event_cb,
+ NULL
+},
+
+
{
RUNTIME_INFO_MAX, RUNTIME_INFO_DATA_TYPE_INT, NULL, NULL, NULL, NULL
}
return;
}
+ memset(¤t_value, 0, sizeof(runtime_info_value_u));
+
runtime_info_get_value(key, runtime_info_item->data_type, ¤t_value);
if (runtime_info_item->event_subscription->most_recent_value != NULL)
}
else
{
- runtime_info_item->event_subscription->most_recent_value = malloc(sizeof(runtime_info_value_u));
+ runtime_info_item->event_subscription->most_recent_value = calloc(1, sizeof(runtime_info_value_u));
if (runtime_info_item->event_subscription->most_recent_value == NULL)
{
static const char *VCONF_USB_HOTSPOT_ENABLED = VCONFKEY_MOBILE_HOTSPOT_MODE;
static const char *VCONF_PACKET_DATA_ENABLED = VCONFKEY_3G_ENABLE;
static const char *VCONF_DATA_ROAMING_ENABLED = "db/setting/data_roaming";
-static const char *VCONF_GPS_STATUS = VCONFKEY_GPS_STATE;
+static const char *VCONF_GPS_STATUS = VCONFKEY_LOCATION_GPS_STATE;
int runtime_info_wifi_status_get_value(runtime_info_value_h value)
{
int runtime_info_wifi_status_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_WIFI_STATUS, RUNTIME_INFO_KEY_WIFI_STATUS);
+ return runtime_info_vconf_set_event_cb(VCONF_WIFI_STATUS, RUNTIME_INFO_KEY_WIFI_STATUS, 0);
}
void runtime_info_wifi_status_unset_event_cb ()
{
- runtime_info_vconf_unset_event_cb(VCONF_WIFI_STATUS);
+ runtime_info_vconf_unset_event_cb(VCONF_WIFI_STATUS, 0);
}
int runtime_info_bt_enabled_get_value(runtime_info_value_h value)
int runtime_info_bt_enabled_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_BT_ENABLED, RUNTIME_INFO_KEY_BLUETOOTH_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_BT_ENABLED, RUNTIME_INFO_KEY_BLUETOOTH_ENABLED, 0);
}
void runtime_info_bt_enabled_unset_event_cb ()
{
- runtime_info_vconf_unset_event_cb(VCONF_BT_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_BT_ENABLED, 0);
}
int runtime_info_wifi_hotspot_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_WIFI_HOTSPOT_ENABLED, RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_WIFI_HOTSPOT_ENABLED, RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED, 0);
}
void runtime_info_wifi_hotspot_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_WIFI_HOTSPOT_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_WIFI_HOTSPOT_ENABLED, 0);
}
int runtime_info_bt_hotspot_get_value(runtime_info_value_h value)
int runtime_info_bt_hotspot_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_BT_HOTSPOT_ENABLED, RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_BT_HOTSPOT_ENABLED, RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED, 0);
}
void runtime_info_bt_hotspot_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_BT_HOTSPOT_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_BT_HOTSPOT_ENABLED, 0);
}
int runtime_info_usb_hotspot_get_value(runtime_info_value_h value)
int runtime_info_usb_hotspot_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_USB_HOTSPOT_ENABLED, RUNTIME_INFO_KEY_USB_TETHERING_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_USB_HOTSPOT_ENABLED, RUNTIME_INFO_KEY_USB_TETHERING_ENABLED, 0);
}
void runtime_info_usb_hotspot_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_USB_HOTSPOT_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_USB_HOTSPOT_ENABLED, 0);
}
int runtime_info_packet_data_get_value(runtime_info_value_h value)
int runtime_info_packet_data_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_PACKET_DATA_ENABLED, RUNTIME_INFO_KEY_PACKET_DATA_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_PACKET_DATA_ENABLED, RUNTIME_INFO_KEY_PACKET_DATA_ENABLED, 0);
}
void runtime_info_packet_data_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_PACKET_DATA_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_PACKET_DATA_ENABLED, 0);
}
int runtime_info_data_roaming_get_value(runtime_info_value_h value)
int runtime_info_data_roaming_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_DATA_ROAMING_ENABLED, RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_DATA_ROAMING_ENABLED, RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED, 0);
}
void runtime_info_data_roaming_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_DATA_ROAMING_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_DATA_ROAMING_ENABLED, 0);
}
int runtime_info_gps_status_get_value(runtime_info_value_h value)
switch (vconf_value)
{
- case VCONFKEY_GPS_OFF:
+ case VCONFKEY_LOCATION_GPS_OFF:
value->i = RUNTIME_INFO_GPS_STATUS_DISABLED;
break;
- case VCONFKEY_GPS_SEARCHING:
+ case VCONFKEY_LOCATION_GPS_SEARCHING:
value->i = RUNTIME_INFO_GPS_STATUS_SEARCHING;
break;
- case VCONFKEY_GPS_CONNECTED:
+ case VCONFKEY_LOCATION_GPS_CONNECTED:
value->i = RUNTIME_INFO_GPS_STATUS_CONNECTED;
break;
int runtime_info_gps_status_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_GPS_STATUS, RUNTIME_INFO_KEY_GPS_STATUS);
+ return runtime_info_vconf_set_event_cb(VCONF_GPS_STATUS, RUNTIME_INFO_KEY_GPS_STATUS, 0);
}
void runtime_info_gps_status_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_GPS_STATUS);
+ runtime_info_vconf_unset_event_cb(VCONF_GPS_STATUS, 0);
}
int runtime_info_24hour_format_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_24HOUR_FORMAT, RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_24HOUR_FORMAT, RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED, 0);
}
void runtime_info_24hour_format_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_24HOUR_FORMAT);
+ runtime_info_vconf_unset_event_cb(VCONF_24HOUR_FORMAT, 0);
}
int runtime_info_first_day_of_week_get_value(runtime_info_value_h value)
int runtime_info_first_day_of_week_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_FIRST_DAY_OF_WEEK, RUNTIME_INFO_KEY_FIRST_DAY_OF_WEEK);
+ return runtime_info_vconf_set_event_cb(VCONF_FIRST_DAY_OF_WEEK, RUNTIME_INFO_KEY_FIRST_DAY_OF_WEEK, 0);
}
void runtime_info_first_day_of_week_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_FIRST_DAY_OF_WEEK);
+ runtime_info_vconf_unset_event_cb(VCONF_FIRST_DAY_OF_WEEK, 0);
}
int runtime_info_language_get_value(runtime_info_value_h value)
int runtime_info_language_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_LANGUAGE, RUNTIME_INFO_KEY_LANGUAGE);
+ return runtime_info_vconf_set_event_cb(VCONF_LANGUAGE, RUNTIME_INFO_KEY_LANGUAGE, 0);
}
void runtime_info_language_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_LANGUAGE);
+ runtime_info_vconf_unset_event_cb(VCONF_LANGUAGE, 0);
}
int runtime_info_region_get_value(runtime_info_value_h value)
int runtime_info_region_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_REGION, RUNTIME_INFO_KEY_REGION);
+ return runtime_info_vconf_set_event_cb(VCONF_REGION, RUNTIME_INFO_KEY_REGION, 0);
}
void runtime_info_region_unset_event_cb ()
{
- runtime_info_vconf_unset_event_cb(VCONF_REGION);
+ runtime_info_vconf_unset_event_cb(VCONF_REGION, 0);
}
int runtime_info_location_service_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_LOCATION_SERVICE_ENABLED, RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_LOCATION_SERVICE_ENABLED, RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED, 0);
}
void runtime_info_location_service_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_LOCATION_SERVICE_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_LOCATION_SERVICE_ENABLED, 0);
}
int runtime_info_location_agps_get_value(runtime_info_value_h value)
int runtime_info_location_agps_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_LOCATION_AGPS_ENABLED, RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_LOCATION_AGPS_ENABLED, RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED, 0);
}
void runtime_info_location_agps_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_LOCATION_AGPS_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_LOCATION_AGPS_ENABLED, 0);
}
int runtime_info_location_network_get_value(runtime_info_value_h value)
int runtime_info_location_network_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_LOCATION_NETWORK_ENABLED, RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_LOCATION_NETWORK_ENABLED, RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED, 0);
}
void runtime_info_location_network_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_LOCATION_NETWORK_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_LOCATION_NETWORK_ENABLED, 0);
}
int runtime_info_location_sensor_get_value(runtime_info_value_h value)
int runtime_info_location_sensor_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_LOCATION_SENSOR_ENABLED, RUNTIME_INFO_KEY_LOCATION_SENSOR_AIDING_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_LOCATION_SENSOR_ENABLED, RUNTIME_INFO_KEY_LOCATION_SENSOR_AIDING_ENABLED, 0);
}
void runtime_info_location_sensor_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_LOCATION_SENSOR_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_LOCATION_SENSOR_ENABLED, 0);
}
static const char *VCONF_VIBRATION_ENABLED = "db/setting/sound/vibration_on";
static const char *VCONF_ROTATION_LOCK_ENABLED = VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL;
static const char *VCONF_BATTERY_CHARGING = VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW;
+static const char *VCONF_TVOUT_CONNECTED = VCONFKEY_SYSMAN_EARJACK;
+static const char *VCONF_AUDIO_JACK_STATUS = VCONFKEY_SYSMAN_EARJACK;
+static const char *VCONF_SLIDING_KEYBOARD_STATUS = VCONFKEY_SYSMAN_SLIDING_KEYBOARD;
+static const char *VCONF_USB_CONNECTED = VCONFKEY_SYSMAN_USB_STATUS;
+static const char *VCONF_CHARGER_CONNECTED = VCONFKEY_SYSMAN_CHARGER_STATUS;
int runtime_info_flightmode_get_value(runtime_info_value_h value)
int runtime_info_flightmode_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_FLIGHT_MODE, RUNTIME_INFO_KEY_FLIGHT_MODE_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_FLIGHT_MODE, RUNTIME_INFO_KEY_FLIGHT_MODE_ENABLED, 0);
}
void runtime_info_flightmode_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_FLIGHT_MODE);
+ runtime_info_vconf_unset_event_cb(VCONF_FLIGHT_MODE, 0);
}
int runtime_info_audiojack_get_value (runtime_info_value_h value)
int runtime_info_audiojack_set_event_cb ()
{
- return runtime_info_vconf_set_event_cb(VCONF_AUDIO_JACK, RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED);
+ return runtime_info_vconf_set_event_cb(VCONF_AUDIO_JACK, RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED, 0);
}
void runtime_info_audiojack_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_AUDIO_JACK);
+ runtime_info_vconf_unset_event_cb(VCONF_AUDIO_JACK, 0);
}
int runtime_info_silent_mode_get_value(runtime_info_value_h value)
int runtime_info_silent_mode_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_SILENT_MODE, RUNTIME_INFO_KEY_SILENT_MODE_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_SILENT_MODE, RUNTIME_INFO_KEY_SILENT_MODE_ENABLED, 0);
}
void runtime_info_silent_mode_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_SILENT_MODE);
+ runtime_info_vconf_unset_event_cb(VCONF_SILENT_MODE, 0);
}
int runtime_info_vibration_enabled_get_value(runtime_info_value_h value)
int runtime_info_vibration_enabled_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_VIBRATION_ENABLED, RUNTIME_INFO_KEY_VIBRATION_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_VIBRATION_ENABLED, RUNTIME_INFO_KEY_VIBRATION_ENABLED, 0);
}
void runtime_info_vibration_enabled_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_VIBRATION_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_VIBRATION_ENABLED, 0);
}
int runtime_info_rotation_lock_enabled_get_value(runtime_info_value_h value)
int runtime_info_rotation_lock_enabled_set_event_cb()
{
- return runtime_info_vconf_set_event_cb(VCONF_ROTATION_LOCK_ENABLED, RUNTIME_INFO_KEY_ROTATION_LOCK_ENABLED);
+ return runtime_info_vconf_set_event_cb(VCONF_ROTATION_LOCK_ENABLED, RUNTIME_INFO_KEY_ROTATION_LOCK_ENABLED, 0);
}
void runtime_info_rotation_lock_enabled_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_ROTATION_LOCK_ENABLED);
+ runtime_info_vconf_unset_event_cb(VCONF_ROTATION_LOCK_ENABLED, 0);
}
int runtime_info_battery_charging_get_value (runtime_info_value_h value)
int runtime_info_battery_charging_set_event_cb ()
{
- return runtime_info_vconf_set_event_cb(VCONF_BATTERY_CHARGING, RUNTIME_INFO_KEY_BATTERY_IS_CHARGING);
+ return runtime_info_vconf_set_event_cb(VCONF_BATTERY_CHARGING, RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, 0);
}
void runtime_info_battery_charging_unset_event_cb()
{
- runtime_info_vconf_unset_event_cb(VCONF_BATTERY_CHARGING);
+ runtime_info_vconf_unset_event_cb(VCONF_BATTERY_CHARGING, 0);
}
+
+int runtime_info_tvout_connected_get_value (runtime_info_value_h value)
+{
+ int vconf_value;
+
+ if (runtime_info_vconf_get_value_int(VCONF_TVOUT_CONNECTED, &vconf_value))
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ switch (vconf_value)
+ {
+ case VCONFKEY_SYSMAN_EARJACK_TVOUT:
+ value->b = true;
+ break;
+
+ default:
+ value->b = false;
+ break;
+ }
+
+ return RUNTIME_INFO_ERROR_NONE;
+}
+
+int runtime_info_tvout_connected_set_event_cb ()
+{
+ return runtime_info_vconf_set_event_cb(VCONF_TVOUT_CONNECTED, RUNTIME_INFO_KEY_TV_OUT_CONNECTED, 1);
+}
+
+void runtime_info_tvout_connected_unset_event_cb()
+{
+ runtime_info_vconf_unset_event_cb(VCONF_TVOUT_CONNECTED, 1);
+}
+
+
+int runtime_info_audio_jack_status_get_value (runtime_info_value_h value)
+{
+ int vconf_value;
+
+ if (runtime_info_vconf_get_value_int(VCONF_AUDIO_JACK_STATUS, &vconf_value))
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ switch (vconf_value)
+ {
+ case VCONFKEY_SYSMAN_EARJACK_3WIRE:
+ value->i = RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_3WIRE;
+ break;
+
+ case VCONFKEY_SYSMAN_EARJACK_4WIRE:
+ value->i = RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_4WIRE;
+ break;
+
+ default:
+ value->i = RUNTIME_INFO_AUDIO_JACK_STATUS_UNCONNECTED;
+ break;
+ }
+
+ return RUNTIME_INFO_ERROR_NONE;
+}
+
+int runtime_info_audio_jack_status_set_event_cb ()
+{
+ return runtime_info_vconf_set_event_cb(VCONF_AUDIO_JACK_STATUS, RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, 2);
+}
+
+void runtime_info_audio_jack_status_unset_event_cb()
+{
+ runtime_info_vconf_unset_event_cb(VCONF_AUDIO_JACK_STATUS, 2);
+}
+
+
+int runtime_info_sliding_keyboard_opened_get_value (runtime_info_value_h value)
+{
+ int vconf_value;
+
+ if (runtime_info_vconf_get_value_int(VCONF_SLIDING_KEYBOARD_STATUS, &vconf_value))
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ switch (vconf_value)
+ {
+ case VCONFKEY_SYSMAN_SLIDING_KEYBOARD_NOT_AVAILABE:
+ value->b = false;
+ break;
+
+ case VCONFKEY_SYSMAN_SLIDING_KEYBOAED_AVAILABLE:
+ value->b = true;
+ break;
+
+ case VCONFKEY_SYSMAN_SLIDING_KEYBOARD_NOT_SUPPORTED:
+ value->b = false;
+ break;
+
+ default:
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ return RUNTIME_INFO_ERROR_NONE;
+}
+
+int runtime_info_sliding_keyboard_opened_set_event_cb ()
+{
+ return runtime_info_vconf_set_event_cb(VCONF_SLIDING_KEYBOARD_STATUS, RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED, 0);
+}
+
+void runtime_info_sliding_keyboard_opened_unset_event_cb()
+{
+ runtime_info_vconf_unset_event_cb(VCONF_SLIDING_KEYBOARD_STATUS, 0);
+}
+
+
+int runtime_info_usb_connected_get_value(runtime_info_value_h value)
+{
+ int vconf_value;
+
+ if (runtime_info_vconf_get_value_int(VCONF_USB_CONNECTED, &vconf_value))
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ switch (vconf_value)
+ {
+ case VCONFKEY_SYSMAN_USB_DISCONNECTED:
+ value->b = false;
+ break;
+
+ case VCONFKEY_SYSMAN_USB_CONNECTED:
+ value->b = false;
+ break;
+
+ case VCONFKEY_SYSMAN_USB_AVAILABLE:
+ value->b = true;
+ break;
+
+ default:
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ return RUNTIME_INFO_ERROR_NONE;
+}
+
+int runtime_info_usb_connected_set_event_cb()
+{
+ return runtime_info_vconf_set_event_cb(VCONF_USB_CONNECTED, RUNTIME_INFO_KEY_USB_CONNECTED, 0);
+}
+
+void runtime_info_usb_connected_unset_event_cb()
+{
+ runtime_info_vconf_unset_event_cb(VCONF_USB_CONNECTED, 0);
+}
+
+int runtime_info_charger_connected_get_value(runtime_info_value_h value)
+{
+ int vconf_value;
+
+ if (runtime_info_vconf_get_value_int(VCONF_CHARGER_CONNECTED, &vconf_value))
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ switch (vconf_value)
+ {
+ case VCONFKEY_SYSMAN_CHARGER_DISCONNECTED:
+ value->b = false;
+ break;
+
+ case VCONFKEY_SYSMAN_CHARGER_CONNECTED:
+ value->b = true;
+ break;
+
+ default:
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ return RUNTIME_INFO_ERROR_NONE;
+}
+
+int runtime_info_charger_connected_set_event_cb()
+{
+ return runtime_info_vconf_set_event_cb(VCONF_CHARGER_CONNECTED, RUNTIME_INFO_KEY_CHARGER_CONNECTED, 0);
+}
+
+void runtime_info_charger_connected_unset_event_cb()
+{
+ runtime_info_vconf_unset_event_cb(VCONF_CHARGER_CONNECTED, 0);
+}
+
+
+int runtime_info_vibration_level_haptic_feedback_get_value (runtime_info_value_h value)
+{
+ int vconf_value;
+
+ if (runtime_info_vconf_get_value_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vconf_value))
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ switch (vconf_value)
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ value->i = vconf_value;
+ break;
+ default:
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ return RUNTIME_INFO_ERROR_NONE;
+}
+
+int runtime_info_vibration_level_haptic_feedback_set_event_cb ()
+{
+ return runtime_info_vconf_set_event_cb(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK, 0);
+}
+
+void runtime_info_vibration_level_haptic_feedback_unset_event_cb()
+{
+ runtime_info_vconf_unset_event_cb(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0);
+}
+
+
}
}
-static void runtime_info_vconf_event_broker(keynode_t *node, void *event_data)
+typedef void (*runtime_info_vconf_event_cb)(keynode_t *node, void *event_data);
+
+static void runtime_info_vconf_event_cb0(keynode_t *node, void *event_data)
{
if (node != NULL)
{
}
}
-int runtime_info_vconf_set_event_cb (const char *vconf_key, runtime_info_key_e runtime_info_key)
+static void runtime_info_vconf_event_cb1(keynode_t *node, void *event_data)
{
- if (vconf_notify_key_changed(vconf_key, runtime_info_vconf_event_broker, (void*)runtime_info_key))
+ if (node != NULL)
+ {
+ runtime_info_updated((runtime_info_key_e)event_data);
+ }
+}
+
+static void runtime_info_vconf_event_cb2(keynode_t *node, void *event_data)
+{
+ if (node != NULL)
+ {
+ runtime_info_updated((runtime_info_key_e)event_data);
+ }
+}
+
+static void runtime_info_vconf_event_cb3(keynode_t *node, void *event_data)
+{
+ if (node != NULL)
+ {
+ runtime_info_updated((runtime_info_key_e)event_data);
+ }
+}
+
+static void runtime_info_vconf_event_cb4(keynode_t *node, void *event_data)
+{
+ if (node != NULL)
+ {
+ runtime_info_updated((runtime_info_key_e)event_data);
+ }
+}
+
+static runtime_info_vconf_event_cb runtime_info_vconf_get_event_cb_slot(int slot)
+{
+ switch (slot)
+ {
+ case 0:
+ return runtime_info_vconf_event_cb0;
+
+ case 1:
+ return runtime_info_vconf_event_cb1;
+
+ case 2:
+ return runtime_info_vconf_event_cb2;
+
+ case 3:
+ return runtime_info_vconf_event_cb3;
+
+ case 4:
+ return runtime_info_vconf_event_cb4;
+
+ default:
+ return NULL;
+ }
+}
+
+int runtime_info_vconf_set_event_cb (const char *vconf_key, runtime_info_key_e runtime_info_key, int slot)
+{
+ runtime_info_vconf_event_cb vconf_event_cb;
+
+ vconf_event_cb = runtime_info_vconf_get_event_cb_slot(slot);
+
+ if (vconf_event_cb == NULL)
+ {
+ return RUNTIME_INFO_ERROR_IO_ERROR;
+ }
+
+ if (vconf_notify_key_changed(vconf_key, vconf_event_cb, (void*)runtime_info_key))
{
return RUNTIME_INFO_ERROR_IO_ERROR;
}
return RUNTIME_INFO_ERROR_NONE;
}
-void runtime_info_vconf_unset_event_cb (const char *vconf_key)
+void runtime_info_vconf_unset_event_cb (const char *vconf_key, int slot)
{
- vconf_ignore_key_changed(vconf_key, runtime_info_vconf_event_broker);
+ runtime_info_vconf_event_cb vconf_event_cb;
+
+ vconf_event_cb = runtime_info_vconf_get_event_cb_slot(slot);
+
+ if (vconf_event_cb != NULL)
+ {
+ vconf_ignore_key_changed(vconf_key, vconf_event_cb);
+ }
}