diff --git a/include/mce/dbus-names.h b/include/mce/dbus-names.h
index 4a720d5..ec229e3 100644
--- a/include/mce/dbus-names.h
+++ b/include/mce/dbus-names.h
@@ -5,8 +5,13 @@
* This file is part of mce-dev
*
* Copyright © 2004-2011 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2013-2017 Jolla Ltd.
*
* @author David Weinehall
+ * @author Santtu Lakkala
+ * @author Victor Portnov
+ * @author Simo Piiroinen
+ * @author Kimmo Lindholm
*
* These headers are free software; you can redistribute them
* and/or modify them under the terms of the GNU Lesser General Public
@@ -21,360 +26,551 @@
* License along with these headers.
* If not, see .
*/
-#ifndef _MCE_DBUS_NAMES_H_
-#define _MCE_DBUS_NAMES_H_
+#ifndef MCE_DBUS_NAMES_H_
+# define MCE_DBUS_NAMES_H_
-/**
- * @name D-Bus Daemon
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name MCE D-Bus Service
+ *
+ *@{
*/
-/*@{*/
+/** MCE D-Bus service name
+ *
+ * @since mce 0.3
+ */
+# define MCE_SERVICE "com.nokia.mce"
-/**
- * MCE D-Bus service
+/** MCE D-Bus Request interface
*
- * @since v0.3
+ * @since mce 0.3
*/
-#define MCE_SERVICE "com.nokia.mce"
+# define MCE_REQUEST_IF "com.nokia.mce.request"
+/** MCE D-Bus Signal interface
+ *
+ * @since mce 0.3
+ */
+# define MCE_SIGNAL_IF "com.nokia.mce.signal"
+/** MCE D-Bus Request path
+ *
+ * @since mce 0.3
+ */
+# define MCE_REQUEST_PATH "/com/nokia/mce/request"
+/** MCE D-Bus Signal path
+ *
+ * @since mce 0.3
+ */
+# define MCE_SIGNAL_PATH "/com/nokia/mce/signal"
-/**
- * MCE D-Bus Request interface
+/** The MCE D-Bus error interface; currently not used
*
- * @since v0.3
+ * @since mce 0.3
*/
-#define MCE_REQUEST_IF "com.nokia.mce.request"
-/**
- * MCE D-Bus Signal interface
+# define MCE_ERROR_FATAL "com.nokia.mce.error.fatal"
+/** The D-Bus interface for invalid arguments; currently not used
*
- * @since v0.3
+ * @since mce 0.3
*/
-#define MCE_SIGNAL_IF "com.nokia.mce.signal"
-/**
- * MCE D-Bus Request path
- *
- * @since v0.3
- */
-#define MCE_REQUEST_PATH "/com/nokia/mce/request"
-/**
- * MCE D-Bus Signal path
- *
- * @since v0.3
- */
-#define MCE_SIGNAL_PATH "/com/nokia/mce/signal"
-
-/**
- * The MCE D-Bus error interface; currently not used
- *
- * @since v0.3
- */
-#define MCE_ERROR_FATAL "com.nokia.mce.error.fatal"
-/**
- * The D-Bus interface for invalid arguments; currently not used
- *
- * @since v0.3
- */
-#define MCE_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
+# define MCE_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
/*@}*/
-/**
- * @name Generic D-Bus methods
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Radio State
+ *
+ *@{
*/
-/*@{*/
-
-/**
- * Query radio states
+/** Query radio states
*
- * @since v1.10.60
- * @return @c dbus_uint32_t Radio states or:ed together
- * (see @ref mce/mode-names.h for defines for the radio states)
+ * @since mce 1.10.60
+ *
+ * Radio state bitmasks are constructed from:
+ * - #MCE_RADIO_STATE_MASTER
+ * - #MCE_RADIO_STATE_CELLULAR
+ * - #MCE_RADIO_STATE_WLAN
+ * - #MCE_RADIO_STATE_BLUETOOTH
+ * - #MCE_RADIO_STATE_NFC
+ * - #MCE_RADIO_STATE_FMTX
+ *
+ * @return uint32: bitmask of currently enabled radios
*/
-#define MCE_RADIO_STATES_GET "get_radio_states"
+# define MCE_RADIO_STATES_GET "get_radio_states"
-/**
- * Query the call state
+/** Request radio states change
*
- * @since v1.8.1
- * @return @c gchar @c * with the new call state
- * (see @ref mce/mode-names.h for valid call states)
- * @return @c gchar @c * with the new emergency state type
- * (see @ref mce/mode-names.h for valid emergency state types)
+ * @since mce 1.10.60
+ *
+ * @note Aegis credential for Nokia N9: mce::DeviceModeControl
+ *
+ * Radio state bitmasks are constructed from:
+ * - #MCE_RADIO_STATE_MASTER
+ * - #MCE_RADIO_STATE_CELLULAR
+ * - #MCE_RADIO_STATE_WLAN
+ * - #MCE_RADIO_STATE_BLUETOOTH
+ * - #MCE_RADIO_STATE_NFC
+ * - #MCE_RADIO_STATE_FMTX
+ *
+ * Changes the radio state bits set in the mask parameter
+ * to state given in the value parameter, i.e.
+ *
+ * current = (current & ~mask) | (value & mask)
+ *
+ * @param value uint32: bitmask of values to use
+ * @param mask uint32: bitmask of values to change
*/
-#define MCE_CALL_STATE_GET "get_call_state"
+# define MCE_RADIO_STATES_CHANGE_REQ "req_radio_states_change"
-/**
- * Query the touchscreen/keypad lock mode
+/** Notify everyone that the radio states have changed
*
- * @since v1.4.0
- * @return @c gchar @c * with the touchscreen/keypad lock mode
- * (see @ref mce/mode-names.h for valid lock modes)
+ * @since mce 1.10.60
+ *
+ * Radio state bitmasks are constructed from:
+ * - #MCE_RADIO_STATE_MASTER
+ * - #MCE_RADIO_STATE_CELLULAR
+ * - #MCE_RADIO_STATE_WLAN
+ * - #MCE_RADIO_STATE_BLUETOOTH
+ * - #MCE_RADIO_STATE_NFC
+ * - #MCE_RADIO_STATE_FMTX
+ *
+ * @param current uint32: bitmask of currently active radios
*/
-#define MCE_TKLOCK_MODE_GET "get_tklock_mode"
+# define MCE_RADIO_STATES_SIG "radio_states_ind"
-/**
- * Query the display status
- *
- * @since v1.5.21
- * @return @c gchar @c * with the display state
- * (see @ref mce/mode-names.h for valid display states)
- */
-#define MCE_DISPLAY_STATUS_GET "get_display_status"
+/*@}*/
-/**
- * Query CABC mode
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Call State
*
- * @since v1.10.0
- * @return @c gchar @c * with the CABC mode
- * (see @ref mce/mode-names.h for valid CABC modes)
+ *@{
*/
-#define MCE_CABC_MODE_GET "get_cabc_mode"
-/**
- * Query the automatic power saving mode
+/** Query the call state
*
- * @since v1.10.44
- * @return @c dbus_bool_t @c TRUE if automatic power saving mode is active,
- * @c FALSE if automatic power saving mode is inactive
+ * @since mce 1.8.1
+ *
+ * @return string: current call state, one of:
+ * - #MCE_CALL_STATE_NONE
+ * - #MCE_CALL_STATE_RINGING
+ * - #MCE_CALL_STATE_ACTIVE
+ * - #MCE_CALL_STATE_SERVICE
+ *
+ * @return string: current call type, one of:
+ * - #MCE_NORMAL_CALL
+ * - #MCE_EMERGENCY_CALL
*/
-#define MCE_PSM_STATE_GET "get_psm_state"
+# define MCE_CALL_STATE_GET "get_call_state"
-/**
- * Query key backlight state
+/** Request call state change
*
- * @since v1.10.30
- * @return @c dbus_bool_t @c TRUE if the key backlight is on,
- * @c FALSE if the key backlight is off
+ * @since mce 1.8.1
+ *
+ * MCE tracks call state separately:
+ * - from ofono modem and call properties
+ * - for each client using issuing call state requests
+ *
+ * The overall call state will be "ringing" if at least
+ * one of the tracked entities declares ringing state.
+ *
+ * The call type will be "emergency" it at least one of
+ * the tracked entities declares emergency call type.
+ *
+ * If a client that has requested a call state change
+ * drops from system bus, it will be handled as if
+ * the client would have made a "none":"normal" request.
+ *
+ * @note Aegis credential for Nokia N9: mce::CallStateControl
+ *
+ * @param call_state string: call state to request, one of:
+ * - #MCE_CALL_STATE_NONE
+ * - #MCE_CALL_STATE_RINGING
+ * - #MCE_CALL_STATE_ACTIVE
+ * - #MCE_CALL_STATE_SERVICE
+ *
+ * @param call_type string: call type to request, one of:
+ * - #MCE_NORMAL_CALL
+ * - #MCE_EMERGENCY_CALL
+ *
+ * @return boolean: TRUE if the new call state was accepted, or
+ * FALSE if the new call state was vetoed
*/
-#define MCE_KEY_BACKLIGHT_STATE_GET "get_key_backlight_state"
+# define MCE_CALL_STATE_CHANGE_REQ "req_call_state_change"
-/**
- * Add an activity notification callback;
- * the next user activity will trigger this callback
- * callbacks are one-shot -- once the callback has been invoked,
- * it will be unregistered
+/** Notify everyone that the call state has changed
*
- * @since 1.10.106
- * @param service @c gchar @c * The method call service
- * @param path @c gchar @c * The method call path
- * @param interface @c gchar @c * The method call interface
- * @param name @c gchar @c * The name of the method to call
- * @return @c dbus_bool_t @c TRUE if registration was successful,
- * @c FALSE if registration was a failure
- * (too many registered clients)
+ * @since mce 1.8.1
+ *
+ * @param call_state string: current call state, one of:
+ * - #MCE_CALL_STATE_NONE
+ * - #MCE_CALL_STATE_RINGING
+ * - #MCE_CALL_STATE_ACTIVE
+ * - #MCE_CALL_STATE_SERVICE
+ *
+ * @param call_type string: current call type, one of:
+ * - #MCE_NORMAL_CALL
+ * - #MCE_EMERGENCY_CALL
*/
-#define MCE_ADD_ACTIVITY_CALLBACK_REQ "add_activity_callback"
+# define MCE_CALL_STATE_SIG "sig_call_state_ind"
-/**
- * Remove any activity notification callback belonging to the calling process
- *
- * @since 1.10.106
- */
-#define MCE_REMOVE_ACTIVITY_CALLBACK_REQ "remove_activity_callback"
+/*@}*/
-/**
- * Query the inactivity status
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display State
*
- * @since v1.5.2
- * @return @c dbus_bool_t @c TRUE if the system is inactive,
- * @c FALSE if the system is active
+ *@{
*/
-#define MCE_INACTIVITY_STATUS_GET "get_inactivity_status"
-/**
- * Query the current color profile id
+/** Query the display status
*
- * @since v1.11.2
- * @return @c gchar @c * with the the current profile id
+ * @since mce 1.5.21
+ *
+ * Display state is one of:
+ *
+ * @return string: current display state, one of:
+ * - #MCE_DISPLAY_ON_STRING
+ * - #MCE_DISPLAY_DIM_STRING
+ * - #MCE_DISPLAY_OFF_STRING
*/
-#define MCE_COLOR_PROFILE_GET "get_color_profile"
+# define MCE_DISPLAY_STATUS_GET "get_display_status"
-/**
- * Query the list of the available color profile ids
+/** Unblank display
*
- * @since v1.11.2
- * @return @c gchar @c ** with the nul-terminated array of the color profile ids
+ * @since mce 0.5
+ *
+ * @note Applications should never make explicit display on requests.
*/
-#define MCE_COLOR_PROFILE_IDS_GET "get_color_profile_ids"
+# define MCE_DISPLAY_ON_REQ "req_display_state_on"
-/**
- * Query the MCE version
+/**Dim display
*
- * @since v1.1.6
- * @return @c gchar @c * with the MCE version
+ * @since mce 1.6.20
+ *
+ * @note Applications should never make explicit display dim requests.
*/
-#define MCE_VERSION_GET "get_version"
+# define MCE_DISPLAY_DIM_REQ "req_display_state_dim"
-/**
- * Request radio states change
+/** Blank display
*
- * @since v1.10.60
- * @credential mce::DeviceModeControl
- * @param @c dbus_uint32_t New radio states or:ed together
- * (see @ref mce/mode-names.h for defines for the radio states)
- * @param @c dbus_uint32_t Mask for radio states or:ed together
- * (see @ref mce/mode-names.h for defines for the radio states)
+ * @since mce 1.6.20
+ *
+ * @note Lockscreen is also activated when this call is made.
*/
-#define MCE_RADIO_STATES_CHANGE_REQ "req_radio_states_change"
-
-/**
- * Request call state change
- * Changes can only be made to/from the "none" state; all other
- * transitions will be vetoed. This is to avoid race conditions
- * between different services.
- *
- * An exception is made when the tuple is active:emergency;
- * such requests are always accepted
- *
- * If the service that requests the transition emits a NameOwnerChanged,
- * then the call state will revert back to "none", to ensure that
- * crashing applications doesn't cause a forever busy call state
- *
- * @since v1.8.1
- * @credential mce::CallStateControl
- * @param call_state @c gchar @c * with the new call state
- * (see @ref mce/mode-names.h for valid call states)
- * @param call_type @c gchar @c * with the new call type
- * (see @ref mce/mode-names.h for valid call types)
- * @return @c dbus_bool_t @c TRUE if the new call state was accepted,
- * @c FALSE if the new call state was vetoed
- */
-#define MCE_CALL_STATE_CHANGE_REQ "req_call_state_change"
-
-/** Inform mce that incoming call has been ignored by ui
- *
- * When there is an incoming call, mce reserves the power key
- * for silencing the ringing tone.
- *
- * This method can be used by the call ui to inform mce that the
- * call has been ignored and power key can be used for display
- * power control even though there are calls in ringing state.
- *
- * @since v1.19.0
- */
-#define MCE_IGNORE_INCOMING_CALL_REQ "req_ignore_incoming_call"
-
-/**
- * Unblank display
- *
- * @since v0.5
- */
-#define MCE_DISPLAY_ON_REQ "req_display_state_on"
-
-/**
- * Dim display
- *
- * @since v1.6.20
- */
-#define MCE_DISPLAY_DIM_REQ "req_display_state_dim"
-
-/**
- * Blank display
- *
- * @since v1.6.20
- */
-#define MCE_DISPLAY_OFF_REQ "req_display_state_off"
+# define MCE_DISPLAY_OFF_REQ "req_display_state_off"
/** Set display to low power mode
+ *
+ * @since mce 1.33.0
+ *
+ * Blank screen via going through Display Low Power state.
+ *
+ * If LPM feature is not enabled, blanks display immediately.
*
* Low power mode is a display off sub state. From normal
* display state signaling point of view it behaves just as
* display off would. Depending on available hw support and
* configuration extra ipc relevant for home screen / system
* ui only might happen.
- *
- * @since v1.33.0
*/
-#define MCE_DISPLAY_LPM_REQ "req_display_state_lpm"
+# define MCE_DISPLAY_LPM_REQ "req_display_state_lpm"
-/**
- * Prevent display from blanking
+/** Notify everyone that the display is on/dimmed/off
*
- * @since v0.5
+ * @since mce 1.5.21
+ *
+ * @param display_state string: current display state, one of:
+ * - #MCE_DISPLAY_ON_STRING
+ * - #MCE_DISPLAY_DIM_STRING
+ * - #MCE_DISPLAY_OFF_STRING
*/
-#define MCE_PREVENT_BLANK_REQ "req_display_blanking_pause"
+# define MCE_DISPLAY_SIG "display_status_ind"
-/**
- * Cancel display blanking prevention
- *
- * @since v1.10.35
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Touchscreen And Keypad Lock State
+ * @{
*/
-#define MCE_CANCEL_PREVENT_BLANK_REQ "req_display_cancel_blanking_pause"
+
+/** Query the touchscreen/keypad lock mode
+ *
+ * @since mce 1.4.0
+ *
+ * @return string: current tklock state, one of:
+ * - #MCE_TK_LOCKED
+ * - #MCE_TK_SILENT_LOCKED
+ * - #MCE_TK_LOCKED_DIM
+ * - #MCE_TK_LOCKED_DELAY
+ * - #MCE_TK_SILENT_LOCKED_DIM
+ * - #MCE_TK_UNLOCKED
+ * - #MCE_TK_SILENT_UNLOCKED
+ */
+# define MCE_TKLOCK_MODE_GET "get_tklock_mode"
+
+/** Request tklock mode change
+ *
+ * @since mce 1.4.0
+ *
+ * @note Aegis credential for Nokia N9: mce::TKLockControl
+ *
+ * @param mode string: requested tklock state, one of:
+ * - #MCE_TK_LOCKED
+ * - #MCE_TK_SILENT_LOCKED
+ * - #MCE_TK_LOCKED_DIM
+ * - #MCE_TK_LOCKED_DELAY
+ * - #MCE_TK_SILENT_LOCKED_DIM
+ * - #MCE_TK_UNLOCKED
+ * - #MCE_TK_SILENT_UNLOCKED
+ */
+# define MCE_TKLOCK_MODE_CHANGE_REQ "req_tklock_mode_change"
+
+/** Signal that indicates that the touchscreen/keypad lock mode has changed
+ *
+ * @since mce 1.4.0
+ *
+ * @param mode string: current tklock state, one of:
+ * - #MCE_TK_LOCKED
+ * - #MCE_TK_SILENT_LOCKED
+ * - #MCE_TK_LOCKED_DIM
+ * - #MCE_TK_LOCKED_DELAY
+ * - #MCE_TK_SILENT_LOCKED_DIM
+ * - #MCE_TK_UNLOCKED
+ * - #MCE_TK_SILENT_UNLOCKED
+ */
+# define MCE_TKLOCK_MODE_SIG "tklock_mode_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display Blank Prevention
+ *
+ *@{
+ */
+
+/** Prevent display from blanking
+ *
+ * @since mce 0.5
+ *
+ * If display is on and lockscreen is not active, normal blanking
+ * timers are stopped for 60 seconds.
+ *
+ * To keep display from blanking for longer periods, the client
+ * needs to re-issue this call every 60 seconds.
+ *
+ * When application no longer wishes to keep display from blanking,
+ * it should make a #MCE_CANCEL_PREVENT_BLANK_REQ method call.
+ *
+ * @note If client drops from the system bus, it is handled as if
+ * the client would have made a #MCE_CANCEL_PREVENT_BLANK_REQ
+ * call.
+ */
+# define MCE_PREVENT_BLANK_REQ "req_display_blanking_pause"
+
+/** Cancel display blanking prevention
+ *
+ * @since mce 1.10.35
+ */
+# define MCE_CANCEL_PREVENT_BLANK_REQ "req_display_cancel_blanking_pause"
/** Get current blank prevention status
*
- * @since 1.51.0
+ * @since mce 1.51.0
*
- * @return @c gchar @c * with the blanking pause state
- * (see @ref mce/mode-names.h for valid blanking pause states)
+ * @return string: current blank prevention status, one of:
+ * - #MCE_PREVENT_BLANK_ACTIVE_STRING
+ * - #MCE_PREVENT_BLANK_INACTIVE_STRING
+ */
+# define MCE_PREVENT_BLANK_GET "get_display_blanking_pause"
+
+/** Notify everyone whether the display blanking is paused
+ *
+ * @since mce 1.51.0
+ *
+ * @param status string: current blank prevention status, one of:
+ * - #MCE_PREVENT_BLANK_ACTIVE_STRING
+ * - #MCE_PREVENT_BLANK_INACTIVE_STRING
+ */
+# define MCE_PREVENT_BLANK_SIG "display_blanking_pause_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display Blanking Inhibit State
+ *
+ *@{
*/
-#define MCE_PREVENT_BLANK_GET "get_display_blanking_pause"
/** Get current blank inhibition status
*
- * @since 1.51.0
+ * @since mce 1.51.0
*
- * @return @c gchar @c * with the blanking inhibit state
- * (see @ref mce/mode-names.h for valid blanking inhibit states)
+ * @return string: current blanking inhibit status, one of:
+ * - #MCE_INHIBIT_BLANK_ACTIVE_STRING
+ * - #MCE_INHIBIT_BLANK_INACTIVE_STRING
+ */
+# define MCE_BLANKING_INHIBIT_GET "get_display_blanking_inhibit"
+
+/** Notify everyone whether the display blanking is inhibited
+ *
+ * @since mce 1.51.0
+ *
+ * @param status string: current blanking inhibit status, one of:
+ * - #MCE_INHIBIT_BLANK_ACTIVE_STRING
+ * - #MCE_INHIBIT_BLANK_INACTIVE_STRING
+ */
+# define MCE_BLANKING_INHIBIT_SIG "display_blanking_inhibit_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display Blanking Policy State
+ *
+ *@{
*/
-#define MCE_BLANKING_INHIBIT_GET "get_display_blanking_inhibit"
/** Get current display blanking policy status
*
- * @since v1.55.0
+ * @since mce 1.55.0
*
- * @return @c gchar @c * with the blanking polic state
- * (see @ref mce/mode-names.h for valid blanking policy states)
+ * @return string: current blanking policy, one of:
+ * - #MCE_BLANKING_POLICY_DEFAULT_STRING
+ * - #MCE_BLANKING_POLICY_NOTIFICATION_STRING
+ * - #MCE_BLANKING_POLICY_ALARM_STRING
+ * - #MCE_BLANKING_POLICY_CALL_STRING
+ * - #MCE_BLANKING_POLICY_LINGER_STRING
*/
-#define MCE_BLANKING_POLICY_GET "get_display_blanking_policy"
+# define MCE_BLANKING_POLICY_GET "get_display_blanking_policy"
-/**
- * Request CABC mode change
+/** Notify everyone when the display blanking policy changes
*
- * @since v1.10.0
- * @param mode @c gchar @c * with the new CABC mode
- * (see @ref mce/mode-names.h for valid CABC modes)
- * @return @c gchar @c * with the updated CABC mode
- * (see @ref mce/mode-names.h for valid CABC modes)
+ * @since mce 1.55.0
+ *
+ * @param policy string: current blanking policy, one of:
+ * - #MCE_BLANKING_POLICY_DEFAULT_STRING
+ * - #MCE_BLANKING_POLICY_NOTIFICATION_STRING
+ * - #MCE_BLANKING_POLICY_ALARM_STRING
+ * - #MCE_BLANKING_POLICY_CALL_STRING
+ * - #MCE_BLANKING_POLICY_LINGER_STRING
*/
-#define MCE_CABC_MODE_REQ "req_cabc_mode"
+# define MCE_BLANKING_POLICY_SIG "display_blanking_policy_ind"
-/**
- * Request tklock mode change
- *
- * @since v1.4.0
- * @credential mce::TKLockControl
- * @param mode @c gchar @c * with the new touchscreen/keypad lock mode
- * (see @ref mce/mode-names.h for valid lock modes)
- */
-#define MCE_TKLOCK_MODE_CHANGE_REQ "req_tklock_mode_change"
+/*@}*/
-/**
- * Request powerkey event triggering
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Power Save Mode
*
- * @credential mce::DeviceModeControl
- * @since v1.5.3
- * @param type @c dbus_bool_t with the type of powerkey event to
- * trigger; @c FALSE == short powerkey press,
- * @c TRUE == long powerkey press
- * @since v1.10.54
- * @param type @c dbus_uint32_t with the type of powerkey event to trigger
- * (see @ref mce/mode-names.h for valid events)
+ *@{
*/
-#define MCE_TRIGGER_POWERKEY_EVENT_REQ "req_trigger_powerkey_event"
-/**
- * Request color profile change
+/** Query the automatic power saving mode
*
- * @since v1.11.2
- * @credential mce::ColorProfileControl
- * @param mode @c gchar @c * with the new color profile id
- * (see @ref MCE_COLOR_PROFILE_IDS_GET to learn
- * how to get the valid color profile ids)
+ * @since mce 1.10.44
+ *
+ * @return boolean: TRUE if automatic power saving mode is active, or
+ * FALSE if automatic power saving mode is inactive
+ */
+# define MCE_PSM_STATE_GET "get_psm_state"
+
+/** Notify everyone that the state of the automatic power saving mode changed
+ *
+ * @since mce 1.10.44
+ *
+ * @param active boolean: TRUE if automatic power saving mode is active, or
+ * FALSE if automatic power saving mode is inactive
+ */
+# define MCE_PSM_STATE_SIG "psm_state_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Keypad Backlight Status
+ *
+ *@{
+ */
+
+/** Query key backlight state
+ *
+ * @since mce 1.10.30
+ *
+ * @return boolean: TRUE if the key backlight is on, or
+ * FALSE if the key backlight is off
+ */
+# define MCE_KEY_BACKLIGHT_STATE_GET "get_key_backlight_state"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Device Inactivity
+ *
+ *@{
+ */
+
+/** Query the inactivity status
+ *
+ * @since mce 1.5.2
+ *
+ * @return boolean: TRUE if the system is inactive, or
+ * FALSE if the system is active
+ */
+# define MCE_INACTIVITY_STATUS_GET "get_inactivity_status"
+
+/** Notify everyone that the system is active/inactive
+ *
+ * @since mce 0.9.3
+ *
+ * @param active boolean: TRUE if the system is inactive, or
+ * FALSE if the system is active
+ */
+# define MCE_INACTIVITY_SIG "system_inactivity_ind"
+
+/** Add an activity notification callback;
+ *
+ * @since mce 1.10.106
+ *
+ * The next user activity will trigger this callback.
+ *
+ * Callbacks are one-shot -- once the callback has been invoked,
+ * it will be unregistered.
+ *
+ * @param service string: The method call service
+ * @param path string: The method call path
+ * @param interface string: The method call interface
+ * @param name string: The name of the method to call
+ *
+ * @return boolean: TRUE if registration was successful, or
+ * FALSE if registration was a failure
+ * (too many registered clients)
+ */
+# define MCE_ADD_ACTIVITY_CALLBACK_REQ "add_activity_callback"
+
+/** Remove any activity notification callback belonging to the calling process
+ *
+ * @since mce 1.10.106
+ */
+# define MCE_REMOVE_ACTIVITY_CALLBACK_REQ "remove_activity_callback"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name CPU Keepalive
+ *
+ *@{
*/
-#define MCE_COLOR_PROFILE_CHANGE_REQ "req_color_profile_change"
/** Query the length of time late suspend can be blocked
+ *
+ * @since mce 1.12.8
*
* The idea is: if some process needs to do non-interactive
* background processing, it can prevent the system from
@@ -394,9 +590,7 @@
* lost D-Bus connection (exit, crash, ...) or all timeouts
* have been missed.
*
- * @since v1.12.8
- *
- * @since v1.23.7
+ * @since mce 1.23.7
*
* An unique within process tracking id can be passed to all
* cpu keepalive related D-Bus method calls. This allows mce
@@ -407,95 +601,110 @@
* as long as the client process does not have multiple
* overlapping periods at once.
*
- * @param context Tracking id as DBUS_TYPE_STRING
+ * @param context string: "unique enough" tracking id
*
- * @return period in seconds as DBUS_TYPE_INT32
+ * @return int32: renew period in seconds
*/
-#define MCE_CPU_KEEPALIVE_PERIOD_REQ "req_cpu_keepalive_period"
+# define MCE_CPU_KEEPALIVE_PERIOD_REQ "req_cpu_keepalive_period"
/** Temporarily disable enter late suspend policy
+ *
+ * @since mce 1.12.8
*
* This method call must be repeated periodically to keep
* the system from entering late suspend.
*
* The period length can be obtained via #MCE_CPU_KEEPALIVE_PERIOD_REQ.
*
- * Note: The boolean reply message is optional and will be sent
+ * @note The boolean reply message is optional and will be sent
* only if requested.
*
- * @since v1.12.8
+ * @param context string: "unique enough" tracking id
*
- * @param context Tracking id as DBUS_TYPE_STRING
- *
- * @return success as DBUS_TYPE_BOOLEAN
+ * @return boolean: TRUE on success, or FALSE in case of errors
*/
-#define MCE_CPU_KEEPALIVE_START_REQ "req_cpu_keepalive_start"
+# define MCE_CPU_KEEPALIVE_START_REQ "req_cpu_keepalive_start"
/** Allow normal enter late suspend policy again
+ *
+ * @since mce 1.12.8
*
* If a process blocks late suspend via #MCE_CPU_KEEPALIVE_START_REQ,
* it must call #MCE_CPU_KEEPALIVE_STOP_REQ when background processing
* is finished to enable normal late suspend policy again.
*
- * Note: The boolean reply message is optional and will be sent
+ * @note The boolean reply message is optional and will be sent
* only if requested.
*
- * @since v1.12.8
+ * @param context string: "unique enough" tracking id
*
- * @param context Tracking id as DBUS_TYPE_STRING
- *
- * @return success as DBUS_TYPE_BOOLEAN
+ * @return boolean: TRUE on success, or FALSE in case of errors
*/
-#define MCE_CPU_KEEPALIVE_STOP_REQ "req_cpu_keepalive_stop"
+# define MCE_CPU_KEEPALIVE_STOP_REQ "req_cpu_keepalive_stop"
/** Signal wakeup from suspend due to aligned timer triggering
*
- * NOTE: This is reserved for use from dsme iphb module and is
- * used to transfer ownership of rtc irq wakeup wakelock from
- * dsme to mce.
+ * @since mce 1.12.8
*
- * Note: The boolean reply message is optional and will be sent
+ * @note This is reserved for use from dsme iphb module and is
+ * used for transferring ownership of rtc irq wakeup wakelock
+ * from dsme to mce.
+ *
+ * @note The boolean reply message is optional and will be sent
* only if requested.
*
- * @since v1.12.8
- *
- * @return success as DBUS_TYPE_BOOLEAN
+ * @return boolean: TRUE on success, or FALSE in case of errors
+ */
+# define MCE_CPU_KEEPALIVE_WAKEUP_REQ "req_cpu_keepalive_wakeup"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name MCE Settings
+ *
+ *@{
*/
-#define MCE_CPU_KEEPALIVE_WAKEUP_REQ "req_cpu_keepalive_wakeup"
/** Query configuration value
*
- * @since v1.12.15
+ * @since mce 1.12.15
*
- * @param key Configuration value name as DBUS_TYPE_STRING
+ * @param key string: name of the setting value to query
*
- * @return Configuration value as DBUS_TYPE_VARIANT, or
- * error reply
+ * @return variant: setting value, or error reply in case of errors
*/
-#define MCE_CONFIG_GET "get_config"
+# define MCE_CONFIG_GET "get_config"
/** Query all configuration values
+ *
+ * @since mce 1.83.0
*
* Get array of (key,value) pairs for all runtime changeable settings
* that mce supports.
*
- * @since v1.83.0
+ * array [
+ * dict entry(
+ * string SETTING_KEY_NAME
+ * variant SETTING_KEY_VALUE
+ * )
+ * ...
+ * ]
*
- * @return ARRAY(DICT_ENTRY(STRING, VARIANT)), or
- * error reply
+ * @return array of dict entries from setting key names and value variants
*/
-#define MCE_CONFIG_GET_ALL "get_config_all"
+# define MCE_CONFIG_GET_ALL "get_config_all"
/** Set configuration value
*
- * @since v1.12.15
+ * @since mce 1.12.15
*
- * @param key Configuration value name as DBUS_TYPE_STRING
- * @param val Configuration value as DBUS_TYPE_VARIANT
+ * @param key string: setting key name
+ * @param val variant: setting key value
*
- * @return Success as DBUS_TYPE_BOOLEAN, or error reply
+ * @return boolean: success, or error reply in case of failure
*/
-#define MCE_CONFIG_SET "set_config"
+# define MCE_CONFIG_SET "set_config"
/** Reset configuration values to default
*
@@ -503,386 +712,777 @@
* will be reset to configured defaults e.g. using "/" resets all
* settings while using "/display/" resets only display related values.
*
- * @since v1.42.0
+ * @since mce 1.42.0
*
- * @param keyish Substring of config value name as DBUS_TYPE_STRING
+ * @param key string: setting key name / initial part of key name
*
- * @return Number of changed settings as DBUS_TYPE_INT32; -1 on failure
+ * @return int32: number of changed settings, or -1 on failure
+ */
+# define MCE_CONFIG_RESET "reset_config"
+
+/** Notify everyone that mce configuration value has changed
+ *
+ * @since mce 1.14.1
+ *
+ * @param key string: setting key name
+ * @param val variant: setting key value
+ */
+# define MCE_CONFIG_CHANGE_SIG "config_change_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Battery And Charging State
+ *
+ *@{
*/
-#define MCE_CONFIG_RESET "reset_config"
/** Query current USB cable state
*
- * Possible return values are:
+ * @since mce 1.86.0
+ *
+ * @return string: current cable state, one of:
* - #MCE_USB_CABLE_STATE_UNKNOWN
* - #MCE_USB_CABLE_STATE_CONNECTED
* - #MCE_USB_CABLE_STATE_DISCONNECTED
- *
- * @since v1.86.0
- *
- * @return USB cable connection state as DBUS_TYPE_STRING
*/
-#define MCE_USB_CABLE_STATE_GET "get_usb_cable_state"
+# define MCE_USB_CABLE_STATE_GET "get_usb_cable_state"
+
+/** Signal that indicates that USB cable state has changed
+ *
+ * @since mce 1.86.0
+ *
+ * @param cable_state string: current cable state, one of:
+ * - #MCE_USB_CABLE_STATE_UNKNOWN
+ * - #MCE_USB_CABLE_STATE_CONNECTED
+ * - #MCE_USB_CABLE_STATE_DISCONNECTED
+ */
+# define MCE_USB_CABLE_STATE_SIG "usb_cable_state_ind"
/** Query current charger state
*
- * Possible return values are:
+ * @since mce 1.86.0
+ *
+ * @return string: current charger state, one of:
* - #MCE_CHARGER_STATE_UNKNOWN
* - #MCE_CHARGER_STATE_ON
* - #MCE_CHARGER_STATE_OFF
- *
- * @since v1.86.0
- *
- * @return charger state as DBUS_TYPE_STRING
*/
-#define MCE_CHARGER_STATE_GET "get_charger_state"
+# define MCE_CHARGER_STATE_GET "get_charger_state"
+
+/** Signal that indicates that charger state has changed
+ *
+ * @since mce 1.86.0
+ *
+ * @param charger_state string: current charger state, one of:
+ * - #MCE_CHARGER_STATE_UNKNOWN
+ * - #MCE_CHARGER_STATE_ON
+ * - #MCE_CHARGER_STATE_OFF
+ */
+# define MCE_CHARGER_STATE_SIG "charger_state_ind"
/** Query current battery status
*
- * Possible return values are:
+ * @since mce 1.86.0
+ *
+ * @return string: current battery status, one of:
* - #MCE_BATTERY_STATUS_UNKNOWN
* - #MCE_BATTERY_STATUS_FULL
* - #MCE_BATTERY_STATUS_OK
* - #MCE_BATTERY_STATUS_LOW
* - #MCE_BATTERY_STATUS_EMPTY
- *
- * @since v1.86.0
- *
- * @return battery status as DBUS_TYPE_STRING
*/
-#define MCE_BATTERY_STATUS_GET "get_battery_status"
-
-/** Query current battery level
- *
- * Return value is in range from 0 to 100 percent,
- * or #MCE_BATTERY_LEVEL_UNKNOWN
- *
- * @since v1.86.0
- *
- * @return battery level as DBUS_TYPE_INT32
- */
-#define MCE_BATTERY_LEVEL_GET "get_battery_level"
-/*@}*/
-
-/**
- * @name Generic D-Bus signals
- */
-
-/*@{*/
-
-/**
- * Signal that indicates that the touchscreen/keypad lock mode has changed
- *
- * @since v1.4.0
- * @return @c gchar @c * with the new touchscreen/keypad lock mode
- * (see @ref mce/mode-names.h for valid lock modes)
- */
-#define MCE_TKLOCK_MODE_SIG "tklock_mode_ind"
-
-/**
- * Notify everyone that the display is on/dimmed/off
- *
- * @since v1.5.21
- * @return @c gchar @c * with the display state
- * (see @ref mce/mode-names.h for valid display states)
- */
-#define MCE_DISPLAY_SIG "display_status_ind"
-
-/** Notify everyone whether the display blanking is paused
- *
- * @since v1.51.0
- *
- * @return @c gchar @c * with the blanking pause state
- * (see @ref mce/mode-names.h for valid blanking pause states)
- */
-#define MCE_PREVENT_BLANK_SIG "display_blanking_pause_ind"
-
-/** Notify everyone whether the display blanking is inhibited
- *
- * @since v1.51.0
- *
- * @return @c gchar @c * with the display baling inhibit state
- * (see @ref mce/mode-names.h for valid blanking inhibit states)
- */
-#define MCE_BLANKING_INHIBIT_SIG "display_blanking_inhibit_ind"
-
-/** Notify everyone when the display blanking policy changes
- *
- * @since v1.55.0
- *
- * @return @c gchar @c * with the display blankiing policy state
- * (see @ref mce/mode-names.h for valid blanking policy states)
- */
-#define MCE_BLANKING_POLICY_SIG "display_blanking_policy_ind"
-
-/**
- * Notify everyone that the state of the automatic power saving mode changed
- *
- * @since v1.10.44
- * @return @c dbus_bool_t @c TRUE if automatic power saving mode is active,
- * @c FALSE if automatic power saving mode is inactive
- */
-#define MCE_PSM_STATE_SIG "psm_state_ind"
-
-/**
- * Notify everyone that the system is active/inactive
- *
- * @since v0.9.3
- * @return @c dbus_bool_t @c TRUE if the system is inactive,
- * @c FALSE if the system is active
- */
-#define MCE_INACTIVITY_SIG "system_inactivity_ind"
-
-/**
- * Notify everyone that the color profile has changed
- *
- * @since v1.11.2
- * @return @c gchar @c * with the color profile id
- */
-#define MCE_COLOR_PROFILE_SIG "color_profile_ind"
-
-/**
- * Notify everyone that the radio states have changed
- *
- * @since v1.10.60
- * @return @c dbus_uint32_t Radio states or:ed together
- * (see @ref mce/mode-names.h for defines for the radio states)
- */
-#define MCE_RADIO_STATES_SIG "radio_states_ind"
-
-/**
- * Notify everyone that the call state has changed
- *
- * @since v1.8.1
- * @return @c gchar @c * with the new call state
- * (see @ref mce/mode-names.h for valid call states)
- * @return @c gchar @c * with the new emergency state type
- * (see @ref mce/mode-names.h for valid emergency state types)
- */
-#define MCE_CALL_STATE_SIG "sig_call_state_ind"
-
-/** Notify everyone that mce configuration value has changed
- *
- * @since v1.14.1
- *
- * @param key Config value name as DBUS_TYPE_STRING
- * @param val Config value as DBUS_TYPE_VARIANT
- */
-#define MCE_CONFIG_CHANGE_SIG "config_change_ind"
-
-/** Signal that indicates that USB cable state has changed
- *
- * Possible arguments values are:
- * See #MCE_USB_CABLE_STATE_GET for possible argument values
- *
- * @since v1.86.0
- *
- * @param cable_state USB cable connection state as DBUS_TYPE_STRING
- */
-#define MCE_USB_CABLE_STATE_SIG "usb_cable_state_ind"
-
-/** Signal that indicates that charger state has changed
- *
- * See #MCE_CHARGER_STATE_GET for possible argument values
- *
- * @since v1.86.0
- *
- * @param charger_state charger state as DBUS_TYPE_STRING
- */
-#define MCE_CHARGER_STATE_SIG "charger_state_ind"
+# define MCE_BATTERY_STATUS_GET "get_battery_status"
/** Signal that indicates that battery status has changed
*
- * See #MCE_BATTERY_STATUS_GET for possible argument values
+ * @since mce 1.86.0
*
- * @since v1.86.0
- *
- * @param battery_status battery status as DBUS_TYPE_STRING
+ * @param battery_status string: current battery status, one of:
+ * - #MCE_BATTERY_STATUS_UNKNOWN
+ * - #MCE_BATTERY_STATUS_FULL
+ * - #MCE_BATTERY_STATUS_OK
+ * - #MCE_BATTERY_STATUS_LOW
+ * - #MCE_BATTERY_STATUS_EMPTY
*/
-#define MCE_BATTERY_STATUS_SIG "battery_status_ind"
+# define MCE_BATTERY_STATUS_SIG "battery_status_ind"
+
+/** Query current battery level
+ *
+ * @since mce 1.86.0
+ *
+ * @return int32: battery level percent, or #MCE_BATTERY_LEVEL_UNKNOWN
+ */
+# define MCE_BATTERY_LEVEL_GET "get_battery_level"
/** Signal that indicates that battery level has changed
*
- * See #MCE_BATTERY_LEVEL_GET for possible argument values
+ * @since mce 1.86.0
*
- * @since v1.86.0
- *
- * @param battery_level battery level as DBUS_TYPE_INT32
+ * @param bettery_level int32: battery level percent, or #MCE_BATTERY_LEVEL_UNKNOWN
*/
-#define MCE_BATTERY_LEVEL_SIG "battery_level_ind"
+# define MCE_BATTERY_LEVEL_SIG "battery_level_ind"
/*@}*/
-/**
- * @name LED interface D-Bus methods
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name LED Control
+ *
+ *@{
*/
-/*@{*/
-
-/**
- * Activates a pre-defined LED pattern
+/** Activate a pre-defined LED pattern
*
- * Non-existing patterns are ignored
+ * @since mce 1.5.0
+ *
+ * @note Aegis credential for Nokia N9: mce::LEDControl
+ *
+ * Available patterns depends on mce configuration.
+ *
+ * Non-existing patterns are ignored.
*
* See also: MCE_LED_PATTERN_ACTIVATED_SIG
*
- * @credential mce::LEDControl
- * @since v1.5.0
- * @param pattern @c gchar @c * with the pattern name
- * (see @c /etc/mce/mce.ini for valid pattern names)
+ * @param pattern string: led pattern name
*/
-#define MCE_ACTIVATE_LED_PATTERN "req_led_pattern_activate"
+# define MCE_ACTIVATE_LED_PATTERN "req_led_pattern_activate"
-/**
- * Deactivates a pre-defined LED pattern
+/** Deactivate a pre-defined LED pattern
+ *
+ * @since mce 1.5.0
+ *
+ * @note Aegis credential for Nokia N9: mce::LEDControl
+ *
+ * Available patterns depends on mce configuration.
*
* Non-existing patterns are ignored
*
* See also: MCE_LED_PATTERN_DEACTIVATED_SIG
*
- * @credential mce::LEDControl
- * @since v1.5.0
- * @param pattern @c gchar @c * with the pattern name
- * (see @c /etc/mce/mce.ini for valid pattern names)
+ * @param pattern string: led pattern name
*/
-#define MCE_DEACTIVATE_LED_PATTERN "req_led_pattern_deactivate"
+# define MCE_DEACTIVATE_LED_PATTERN "req_led_pattern_deactivate"
/** Notify everyone that a led pattern has been activated
*
- * @since v1.25.0
- * @return @c gchar @c * led pattern name
+ * @since mce 1.25.0
+ *
+ * @param activated_pattern string: led pattern name
*/
-#define MCE_LED_PATTERN_ACTIVATED_SIG "led_pattern_activated_ind"
+# define MCE_LED_PATTERN_ACTIVATED_SIG "led_pattern_activated_ind"
/** Notify everyone that a led pattern has been deactivated
*
- * @since v1.25.0
- * @return @c gchar @c * led pattern name
+ * @since mce 1.25.0
+ *
+ * @param deactivated_pattern string: led pattern name
*/
-#define MCE_LED_PATTERN_DEACTIVATED_SIG "led_pattern_deactivated_ind"
+# define MCE_LED_PATTERN_DEACTIVATED_SIG "led_pattern_deactivated_ind"
-/**
- * Enable LED; this does not affect the LED pattern stack
- * Note: The GConf setting for LED flashing overrides this value
- * If the pattern stack does not contain any active patterns,
- * the LED logic will still remain in enabled mode,
- * but will not display any patterns until a pattern is activated
+/** Allow activation of normal led patterns
*
- * Do NOT use this as a "master switch" for the LED framework,
- * since some patterns should *always* be visible
- * this interface is meant for testing and development only
+ * @since mce 1.5.0
*
- * @credential mce::LEDControl
- * @since v1.5.0
+ * @note Aegis credential for Nokia N9: mce::LEDControl
+ *
+ * The current led stack is re-evaluated and also normal
+ * led patterns are considered when choosing active pattern.
+ *
+ * @note Applications should never call this method. It is reserved
+ * for things like development time debugging and CSD test
+ * application (which needs to be sure patterns used by it
+ * do get priority over normal led patterns).
*/
-#define MCE_ENABLE_LED "req_led_enable"
+# define MCE_ENABLE_LED "req_led_enable"
-/**
- * Disable LED; this does not affect the LED pattern stack
- * Note: Do NOT use this as a "master switch" for the LED framework,
- * since some patterns should *always* be visible
- * this interface is meant for testing and development only
+/** Deny actiovation of normal led patterns
*
- * @credential mce::LEDControl
- * @since v1.5.0
+ * @since mce 1.5.0
+ *
+ * @note Aegis credential for Nokia N9: mce::LEDControl
+ *
+ * The current led stack is re-evaluated and normal led patterns
+ * are ignored when choosing active pattern.
+ *
+ * @note Applications should never call this method. It is reserved
+ * for things like development time debugging and CSD test
+ * application (which needs to be sure patterns used by it
+ * do get priority over normal led patterns).
*/
-#define MCE_DISABLE_LED "req_led_disable"
+# define MCE_DISABLE_LED "req_led_disable"
/*@}*/
-/**
- * @name Input policy D-Bus methods and signals
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Input Event Handling Policy
+ *
+ *@{
*/
-/*@{*/
-
/** Get current touch screen input policy
*
- * Possible return values are:
+ * @since mce 1.87.0
+ *
+ * @return string: current touch input policy state, one of:
* - #MCE_INPUT_POLICY_ENABLED
* - #MCE_INPUT_POLICY_DISABLED
- *
- * @since v1.87.0
- *
- * @return input policy as DBUS_TYPE_STRING
*/
-#define MCE_TOUCH_INPUT_POLICY_GET "get_touch_input_policy"
+# define MCE_TOUCH_INPUT_POLICY_GET "get_touch_input_policy"
/** Indication for change of touch screen input policy
*
- * Possible values are:
+ * @since mce 1.87.0
+ *
+ * @param input_state string: current touch input input policy state, one of:
* - #MCE_INPUT_POLICY_ENABLED
* - #MCE_INPUT_POLICY_DISABLED
- *
- * @since v1.87.0
- *
- * @param input policy as DBUS_TYPE_STRING
*/
-#define MCE_TOUCH_INPUT_POLICY_SIG "touch_input_policy_ind"
+# define MCE_TOUCH_INPUT_POLICY_SIG "touch_input_policy_ind"
/** Get current volume key input policy
*
- * Possible return values are:
+ * @since mce 1.87.0
+ *
+ * @return string: current volkey input policy state, one of:
* - #MCE_INPUT_POLICY_ENABLED
* - #MCE_INPUT_POLICY_DISABLED
- *
- * @since v1.87.0
- *
- * @return input policy as DBUS_TYPE_STRING
*/
-#define MCE_VOLKEY_INPUT_POLICY_GET "get_keypad_input_policy"
+# define MCE_VOLKEY_INPUT_POLICY_GET "get_keypad_input_policy"
/** Indication for change of volume key input policy
*
- * Possible values are:
+ * @since mce 1.87.0
+ *
+ * @param input_state string: current volkey input input policy state, one of:
* - #MCE_INPUT_POLICY_ENABLED
* - #MCE_INPUT_POLICY_DISABLED
- *
- * @since v1.87.0
- *
- * @param input policy as DBUS_TYPE_STRING
*/
-#define MCE_VOLKEY_INPUT_POLICY_SIG "keypad_input_policy_ind"
+# define MCE_VOLKEY_INPUT_POLICY_SIG "keypad_input_policy_ind"
/*@}*/
-/**
- * @name Button backlight policy D-Bus methods and signals
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Button Backlight Policy
+ *
+ *@{
*/
-/*@{*/
-
/** Get current button backlight state
+ *
+ * @since mce 1.90.0
*
* Returns true when button backlight is lit, false otherwise.
*
- * @since v1.90.0
- *
- * @return button backlight state as DBUS_TYPE_BOOLEAN
+ * @return boolean: TRUE for backlight is on, FALSE for off
*/
-#define MCE_BUTTON_BACKLIGHT_GET "get_button_backlight"
+# define MCE_BUTTON_BACKLIGHT_GET "get_button_backlight"
/** Request button backlight state change
+ *
+ * @since mce 1.90.0
*
* The button backlight is lit when policy permits is, at least one
* D-Bus client has requested it, and the required control file
* configuration has been provided.
*
- * @since v1.90.0
- *
- * @param state DBUS_TYPE_BOOLEAN
+ * @param state boolean: TRUE for backlight on, FALSE for off
*/
-#define MCE_BUTTON_BACKLIGHT_CHANGE_REQ "req_button_backlight_change"
+# define MCE_BUTTON_BACKLIGHT_CHANGE_REQ "req_button_backlight_change"
/** Indication for change of button backlight state
+ *
+ * @since mce 1.90.0
*
* The state is true when button backlight is lit, false otherwise.
*
- * @since v1.90.0
- *
- * @param state button backlight state as DBUS_TYPE_BOOLEAN
+ * @param state boolean: TRUE for backlight in on, FALSE for off
*/
-#define MCE_BUTTON_BACKLIGHT_SIG "sig_button_backlight_ind"
+# define MCE_BUTTON_BACKLIGHT_SIG "sig_button_backlight_ind"
/*@}*/
-#endif /* _MCE_DBUS_NAMES_H_ */
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Hardware Keyboard Availability
+ *
+ *@{
+ */
+
+/** Query HW keyboard availability
+ *
+ * @since mce 1.39.0
+ *
+ * Non-slidable keyboard present, or sliding keyboard present and opened
+ *
+ * Used for example in evaluating whether virtual keyboard
+ * should be used or not.
+ *
+ * @return string: availability state, one of:
+ * - #MCE_HARDWARE_KEYBOARD_UNDEF
+ * - #MCE_HARDWARE_KEYBOARD_AVAILABLE
+ * - #MCE_HARDWARE_KEYBOARD_NOT_AVAILABLE
+ */
+# define MCE_HARDWARE_KEYBOARD_STATE_GET "keyboard_available_state_req"
+
+/** Notify changes in HW keyboard availability
+ *
+ * @since mce 1.39.0
+ *
+ * Non-slidable keyboard present, or sliding keyboard present and opened
+ *
+ * @return string: availability state, one of:
+ * - #MCE_HARDWARE_KEYBOARD_UNDEF
+ * - #MCE_HARDWARE_KEYBOARD_AVAILABLE
+ * - #MCE_HARDWARE_KEYBOARD_NOT_AVAILABLE
+ */
+# define MCE_HARDWARE_KEYBOARD_STATE_SIG "keyboard_available_state_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Sliding Keyboard State
+ *
+ *@{
+ */
+
+/** Query current sliding keyboard state
+ *
+ * @since mce 1.39.0
+ *
+ * @return string: keyboard state, one of:
+ * - #MCE_SLIDING_KEYBOARD_OPEN
+ * - #MCE_SLIDING_KEYBOARD_CLOSED
+ * - #MCE_SLIDING_KEYBOARD_UNDEF
+ */
+# define MCE_SLIDING_KEYBOARD_STATE_GET "keyboard_slide_state_req"
+
+/** Notify sliding keyboard state changes
+ *
+ * @since mce 1.39.0
+ *
+ * @param state string: keyboard state, one of:
+ * - #MCE_SLIDING_KEYBOARD_OPEN
+ * - #MCE_SLIDING_KEYBOARD_CLOSED
+ * - #MCE_SLIDING_KEYBOARD_UNDEF
+ */
+# define MCE_SLIDING_KEYBOARD_STATE_SIG "keyboard_slide_state_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Interaction Between MCE And UI Components
+ *
+ *@{
+ */
+
+/** Signal for controlling compositor side display dimming
+ *
+ * @since mce 1.34.0
+ *
+ * In situations where there is not enough dynamic range available
+ * to make the difference between "on" and "dimmed" display states
+ * clear to user, mce sends this signal to instruct compositor to
+ * complement the display backlight brightness based dimming by
+ * blending the whole visible ui with an all black rectangle.
+ *
+ * The amount of requested dimming depends on hw specific
+ * configuration and backlight brightness level in use.
+ *
+ * The requested fade animation duration is derived from what
+ * mce would use for backlight brightness fade anination and
+ * depends on mce side configuration.
+ *
+ * It is expected that compositor can and will cap both the
+ * amount of dimming and transition length to some span that
+ * makes sense from compositor point of view.
+ *
+ * @param dimming int32: dimming percent
+ * - 0 for normal, undimmed ui
+ * - ...
+ * - 100 completely blacked out ui
+ * @param duration int32: fade animation duration [ms]
+ */
+# define MCE_FADER_OPACITY_SIG "fader_opacity_ind"
+
+/** Signal for notifying alarm ui about power key presses / device flip overs
+ *
+ * @since mce 1.26.0
+ *
+ * Used for silencing alarm via power key press / device flip over.
+ *
+ * @param event string: event name, such as:
+ * - #MCE_FEEDBACK_EVENT_POWERKEY
+ * - #MCE_FEEDBACK_EVENT_FLIPOVER
+ */
+# define MCE_ALARM_UI_FEEDBACK_SIG "alarm_ui_feedback_ind"
+
+/** Signal for notifying call ui about power key presses / device flip overs
+ *
+ * @since mce 1.26.0
+ *
+ * Used for silencing incoming call via power key press / device flip over
+ *
+ * @param event string: event name, such as:
+ * - #MCE_FEEDBACK_EVENT_POWERKEY
+ * - #MCE_FEEDBACK_EVENT_FLIPOVER
+ */
+# define MCE_CALL_UI_FEEDBACK_SIG "call_ui_feedback_ind"
+
+/** Inform mce that incoming call has been ignored by ui
+ *
+ * @since mce 1.19.0
+ *
+ * When there is an incoming call, mce reserves the power key
+ * for alarm ui and silencing the ringing tone.
+ *
+ * This method can be used by the call ui to inform mce that the
+ * call has been ignored and power key can again be used for display
+ * power control even though there still are calls in ringing state.
+ */
+# define MCE_IGNORE_INCOMING_CALL_REQ "req_ignore_incoming_call"
+
+/** Signal for notifying systemui about power button etc related events
+ *
+ * @since mce 1.37.0
+ *
+ * @param event string: partly configurable and varies, but includes:
+ * - #MCE_FEEDBACK_EVENT_HOMEKEY wake up to fingerprint detection,
+ * or toggle between home and app view
+ * - #MCE_FEEDBACK_EVENT_UNLOCK switch ui to device unlock view
+ */
+# define MCE_POWER_BUTTON_TRIGGER "power_button_trigger"
+
+/** Method for sending tklock feedback from systemui to mce
+ *
+ * @since mce 1.10.88 (legacy)
+ *
+ * @deprecated Must not be used in application code and should be removed
+ * altogether both from mce and lipstick.
+ *
+ * @param status int32: tklock feedback, one of:
+ * - #TKLOCK_UNLOCK
+ * - #TKLOCK_RETRY
+ * - #TKLOCK_TIMEOUT
+ * - #TKLOCK_CLOSED
+ */
+# define MCE_TKLOCK_CB_REQ "tklock_callback"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display Low Power Mode
+ *
+ *@{
+ */
+
+/** Request transition to lpm-off display state
+ *
+ * @since mce 1.82.3
+ *
+ * @note This method is not available in normal mce builds and
+ * it is meant strictly for debugging transitions to/from
+ * lpm display states only.
+ */
+# define MCE_DISPLAY_STATE_LPM_OFF_REQ "req_display_state_lpm_off"
+
+/** Request transition to lpm-on display state
+ *
+ * @since mce 1.82.3
+ *
+ * @note This method is not available in normal mce builds and
+ * it is meant strictly for debugging transitions to/from
+ * lpm display states only.
+ */
+# define MCE_DISPLAY_STATE_LPM_ON_REQ "req_display_state_lpm_on"
+
+/** Used for triggering UI transitions to/from LPM view
+ *
+ * @since mce 1.30.0
+ *
+ * The "Display Low Power Mode" is substate applicable when display
+ * is logically in off state and lockscreen is active.
+ *
+ * The intent is that display gets powered up and lockscreen ui
+ * with less decorations and suitable for low brightness display
+ * is shown.
+ *
+ * Normal applications should not have any reason to follow these
+ * signals.
+ *
+ * @param state string, one of:
+ * - #MCE_LPM_UI_ENABLED
+ * - #MCE_LPM_UI_DISABLED
+ */
+# define MCE_LPM_UI_MODE_SIG "lpm_ui_mode_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name System Memory Pressure
+ *
+ *@{
+ */
+
+/** Method for querying current system memory pressure level
+ *
+ * @since mce 1.35.0
+ *
+ * @return level string, one of:
+ * - #MCE_MEMORY_LEVEL_UNKNOWN
+ * - #MCE_MEMORY_LEVEL_NORMAL
+ * - #MCE_MEMORY_LEVEL_WARNING
+ * - #MCE_MEMORY_LEVEL_CRITICAL
+ */
+# define MCE_MEMORY_LEVEL_GET "get_memory_level"
+
+/** Signal for notifying system memory pressure level changes
+ *
+ * @since mce 1.35.0
+ *
+ * @param level string, one of:
+ * - #MCE_MEMORY_LEVEL_UNKNOWN
+ * - #MCE_MEMORY_LEVEL_NORMAL
+ * - #MCE_MEMORY_LEVEL_WARNING
+ * - #MCE_MEMORY_LEVEL_CRITICAL
+ */
+# define MCE_MEMORY_LEVEL_SIG "sig_memory_level_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Time Limited Display Wakeups
+ *
+ *@{
+ */
+
+/** Method for declaring start of exceptional display on state
+ *
+ * @since mce 1.29.0
+ *
+ * @param name string: unique-enough identifier
+ * @param duration int32: notification duration [ms]
+ * @param extend int32: extend due to user activity time [ms]
+ */
+# define MCE_NOTIFICATION_BEGIN_REQ "notification_begin_req"
+
+/** Method for declaring end of exceptional display on state
+ *
+ * @since mce 1.29.0
+ *
+ * @param name string: unique-enough identifier
+ * @param linger int32: remain in display on time [ms]
+ */
+# define MCE_NOTIFICATION_END_REQ "notification_end_req"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Content Adaptive Backlight Control Mode
+ *
+ *@{
+ */
+
+/** Query CABC mode
+ *
+ * @since mce 1.10.0
+ *
+ * @return string: current cabc mode, one of:
+ * - #MCE_CABC_MODE_OFF
+ * - #MCE_CABC_MODE_UI
+ * - #MCE_CABC_MODE_STILL_IMAGE
+ * - #MCE_CABC_MODE_MOVING_IMAGE
+ */
+# define MCE_CABC_MODE_GET "get_cabc_mode"
+
+/** Request CABC mode change
+ *
+ * @since mce 1.10.0
+ *
+ * @note Content Adaptive Backlight Control has been supported only in
+ * maemo/meego phones made by Nokia.
+ *
+ * A non-functional skeleton interface is available unless suitable
+ * hw and driver support exists along with relevant configuration.
+ *
+ * @param mode string: requested cabc mode, one of:
+ * - #MCE_CABC_MODE_OFF
+ * - #MCE_CABC_MODE_UI
+ * - #MCE_CABC_MODE_STILL_IMAGE
+ * - #MCE_CABC_MODE_MOVING_IMAGE
+ *
+ * @return string: updated cabc mode, one of:
+ * - #MCE_CABC_MODE_OFF
+ * - #MCE_CABC_MODE_UI
+ * - #MCE_CABC_MODE_STILL_IMAGE
+ * - #MCE_CABC_MODE_MOVING_IMAGE
+ */
+# define MCE_CABC_MODE_REQ "req_cabc_mode"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Color Profile
+ *
+ *@{
+ */
+
+/** Query the current color profile id
+ *
+ * @since mce 1.11.2
+ *
+ * @return string: the current profile id
+ */
+# define MCE_COLOR_PROFILE_GET "get_color_profile"
+
+/** Query the list of the available color profile ids
+ *
+ * @since mce 1.11.2
+ *
+ * Apart from built-in "hardcoded" the available color profiles
+ * depends on mce configuration.
+ *
+ * @return array of strings: supported color profile ids
+ */
+# define MCE_COLOR_PROFILE_IDS_GET "get_color_profile_ids"
+
+/** Request color profile change
+ *
+ * @since mce 1.11.2
+ *
+ * @note Currently the color profiles are not supported and a skeleton
+ * API is available solely for backwards compatibility.
+ *
+ * @note Aegis credential for Nokia N9: mce::ColorProfileControl
+ *
+ * @param mode string: requested color profile id
+ */
+# define MCE_COLOR_PROFILE_CHANGE_REQ "req_color_profile_change"
+
+/** Notify everyone that the color profile has changed
+ *
+ * @since mce 1.11.2
+ *
+ * @note Color profiles have been supported only in maemo/meego phones
+ * made by Nokia.
+ *
+ * @deprecated Only a skeleton functionality is provided for backwards
+ * compatibility.
+ *
+ * @param mode string: current color profile id
+ */
+# define MCE_COLOR_PROFILE_SIG "color_profile_ind"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Miscellaneous
+ *
+ *@{
+ */
+
+/** Query MCE version
+ *
+ * @since mce 1.1.6
+ *
+ * @return string: MCE version
+ */
+# define MCE_VERSION_GET "get_version"
+
+/** Request powerkey event triggering
+ *
+ * @since mce 1.5.3 (implemented)
+ * @since mce 1.10.54 (argument changed from boolean to uint32)
+ *
+ * @note Aegis credential for Nokia N9: mce::DeviceModeControl
+ *
+ * @note Intended for use from automated qa testing only.
+ *
+ * @param type uint32: power key event to trigger, one of:
+ * - #MCE_POWERKEY_EVENT_SHORT_PRESS
+ * - #MCE_POWERKEY_EVENT_LONG_PRESS
+ * - #MCE_POWERKEY_EVENT_DOUBLE_PRESS
+ */
+# define MCE_TRIGGER_POWERKEY_EVENT_REQ "req_trigger_powerkey_event"
+
+/** Get amount of time spent in each display state
+ *
+ * @since mce 1.74.0
+ *
+ * Used for: Debugging power drain issues, QA reporting, etc.
+ *
+ * After MCE process starts up, it keeps track of the number of times
+ * various display states have been entered and total time spent in
+ * each state. Time before mce startup gets accounted to "undefined"
+ * display state.
+ *
+ * The data returned is - in dbus terms - array of dictionary entries
+ * having display state name as a key and total time and entry count
+ * as value.
+ *
+ * array [
+ * dict entry(
+ * string DISPLAY_STATE_NAME
+ * struct {
+ * int64 MS_SPENT_IN_THE_STATE
+ * int64 ENTRY_COUNT_TO_THE_STATE
+ * }
+ * )
+ * ...
+ * ]
+ *
+ * @return array of entries as described above
+ */
+# define MCE_DISPLAY_STATS_GET "get_display_stats"
+
+/** Query current uptime and time spent in suspend
+ *
+ * @since mce 1.65.0
+ *
+ * Used for: Automated suspend testing, QA reporting, etc.
+ *
+ * Basically:
+ * - uptime is taken from CLOCK_BOOTTIME
+ * - suspend time is taken from CLOCK_MONOTONIC - CLOCK_BOOTTIME
+ *
+ * @return int64: uptime_ms
+ * @return int64: suspend_ms
+ */
+# define MCE_SUSPEND_STATS_GET "get_suspend_stats"
+
+/** Query current logging verbosity
+ *
+ * @since mce 1.71.0
+ *
+ * @return int32: syslog compatible verbosity level:
+ * - 0 == LOG_EMERG
+ * - ...
+ * - 7 == LOG_DEBUG
+ */
+# define MCE_VERBOSITY_GET "get_verbosity"
+
+/** Change current logging verbosity
+ *
+ * @since mce 1.71.0
+ *
+ * @param verbosity int32: syslog compatible verbosity level:
+ * - 0 == LOG_EMERG
+ * - ...
+ * - 7 == LOG_DEBUG
+ */
+# define MCE_VERBOSITY_REQ "set_verbosity"
+
+/*@}*/
+
+#endif /* MCE_DBUS_NAMES_H_ */
diff --git a/include/mce/mode-names.h b/include/mce/mode-names.h
index f56b30e..a0152da 100644
--- a/include/mce/mode-names.h
+++ b/include/mce/mode-names.h
@@ -4,9 +4,14 @@
*
* This file is part of mce-dev
*
- * Copyright © 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright © 2004-2011 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2012-2017 Jolla Ltd.
*
* @author David Weinehall
+ * @author Tapio Rantala
+ * @author Vesa Halttunen
+ * @author Simo Piiroinen
+ * @author Kimmo Lindholm
*
* These headers are free software; you can redistribute them
* and/or modify them under the terms of the GNU Lesser General Public
@@ -21,317 +26,714 @@
* License along with these headers.
* If not, see .
*/
-#ifndef _MCE_MODE_NAMES_H_
-#define _MCE_MODE_NAMES_H_
+#ifndef MCE_MODE_NAMES_H_
+# define MCE_MODE_NAMES_H_
-/**
- * Master switch; set - radios enabled, unset - radios disabled
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Radio State Constants
*
- * @since v1.10.60
+ *@{
*/
-#define MCE_RADIO_STATE_MASTER (1 << 0)
-/**
- * Cellular; set - enabled, unset - disabled
- *
- * @since v1.10.60
- */
-#define MCE_RADIO_STATE_CELLULAR (1 << 1)
-/**
- * WLAN; set - enabled, unset - disabled
- *
- * @since v1.10.60
- */
-#define MCE_RADIO_STATE_WLAN (1 << 2)
-/**
- * Bluetooth; set - enabled, unset - disabled
- *
- * @since v1.10.60
- */
-#define MCE_RADIO_STATE_BLUETOOTH (1 << 3)
-/**
- * NFC; set - enabled, unset - disabled
- *
- * @since v1.10.93
- */
-#define MCE_RADIO_STATE_NFC (1 << 4)
-/**
- * FM transmitter; set - enabled, unset - disabled
- *
- * @since v1.10.93
- */
-#define MCE_RADIO_STATE_FMTX (1 << 5)
-/**
- * No ongoing call
+/** Master switch; set - radios enabled, unset - radios disabled
*
- * @since v1.8.4
- */
-#define MCE_CALL_STATE_NONE "none"
-/**
- * Call ringing
+ * @since mce 1.10.60
*
- * @since v1.8.29
+ * @note Effectively is an alias for connman offline mode property.
+ * Chamges to offline mode are reflected to mce master radio
+ * bit and vise versa.
*/
-#define MCE_CALL_STATE_RINGING "ringing"
-/**
- * Call on-going
+# define MCE_RADIO_STATE_MASTER (1 << 0)
+
+/** Cellular; set - enabled, unset - disabled
*
- * @since v1.8.29
+ * @since mce 1.10.60
+ *
+ * @note Currently this exists for backwards compatibility only.
*/
-#define MCE_CALL_STATE_ACTIVE "active"
-/**
- * Service operation on-going
- * use to prevent calls from being initiated;
+# define MCE_RADIO_STATE_CELLULAR (1 << 1)
+
+/** WLAN; set - enabled, unset - disabled
+ *
+ * @since mce 1.10.60
+ *
+ * @note Currently this exists for backwards compatibility only.
+ */
+# define MCE_RADIO_STATE_WLAN (1 << 2)
+
+/** Bluetooth; set - enabled, unset - disabled
+ *
+ * @since mce 1.10.60
+ *
+ * @note Currently this exists for backwards compatibility only.
+ */
+# define MCE_RADIO_STATE_BLUETOOTH (1 << 3)
+
+/** NFC; set - enabled, unset - disabled
+ *
+ * @since mce 1.10.93
+ *
+ * @note Currently this exists for backwards compatibility only.
+ */
+# define MCE_RADIO_STATE_NFC (1 << 4)
+
+/** FM transmitter; set - enabled, unset - disabled
+ *
+ * @since mce 1.10.93
+ *
+ * @note Currently this exists for backwards compatibility only.
+ */
+# define MCE_RADIO_STATE_FMTX (1 << 5)
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Call State Constants
+ *
+ *@{
+ */
+
+/** No ongoing call
+ *
+ * @since mce 1.8.4
+ */
+# define MCE_CALL_STATE_NONE "none"
+
+/** Call ringing
+ *
+ * @since mce 1.8.29
+ */
+# define MCE_CALL_STATE_RINGING "ringing"
+
+/** Call on-going
+ *
+ * @since mce 1.8.29
+ */
+# define MCE_CALL_STATE_ACTIVE "active"
+
+/** Service operation on-going
+ *
+ * @since mce 1.8.29
+ *
+ * @deprecated No longer in active use.
+ *
+ * Use to prevent calls from being initiated;
* will not prevent emergency calls
- *
- * @since v1.8.29
*/
-#define MCE_CALL_STATE_SERVICE "service"
+# define MCE_CALL_STATE_SERVICE "service"
-/**
- * Normal call
- *
- * @since v1.8.4
- */
-#define MCE_NORMAL_CALL "normal"
-/**
- * Emergency call
- *
- * @since v1.8.4
- */
-#define MCE_EMERGENCY_CALL "emergency"
+/*@}*/
-/**
- * Touchscreen/Keypad locked
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Call Type Constants
*
- * @since v1.4.5
+ *@{
*/
-#define MCE_TK_LOCKED "locked"
-/**
- * Touchscreen/Keypad silently locked
- *
- * @since v1.4.15
- */
-#define MCE_TK_SILENT_LOCKED "silent-locked"
-/**
- * Touchscreen/Keypad locked with fadeout
- *
- * @since v1.4.15
- */
-#define MCE_TK_LOCKED_DIM "locked-dim"
-/**
- * Touchscreen/Keypad locked with delay
- *
- * @since v1.12.2
- */
-#define MCE_TK_LOCKED_DELAY "locked-delay"
-/**
- * Touchscreen/Keypad silently locked with fadeout
- *
- * @since v1.4.15
- */
-#define MCE_TK_SILENT_LOCKED_DIM "silent-locked-dim"
-/**
- * Touchscreen/Keypad unlocked
- *
- * @since v1.4.5
- */
-#define MCE_TK_UNLOCKED "unlocked"
-/**
- * Touchscreen/Keypad silently unlocked
- *
- * @since v1.6.33
- */
-#define MCE_TK_SILENT_UNLOCKED "silent-unlocked"
-/**
- * Display state name for display on
+/** Normal call
*
- * @since v1.5.21
+ * @since mce 1.8.4
*/
-#define MCE_DISPLAY_ON_STRING "on"
-/**
- * Display state name for display dim
+# define MCE_NORMAL_CALL "normal"
+
+/** Emergency call
*
- * @since v1.5.21
+ * @since mce 1.8.4
*/
-#define MCE_DISPLAY_DIM_STRING "dimmed"
-/**
- * Display state name for display off
+# define MCE_EMERGENCY_CALL "emergency"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Touchscreen And Keypad Lock State Constants
*
- * @since v1.5.21
+ *@{
+ */
+
+/** Touchscreen/Keypad locked
+ *
+ * @since mce 1.4.5
+ */
+# define MCE_TK_LOCKED "locked"
+
+/** Touchscreen/Keypad silently locked
+ *
+ * @since mce 1.4.15
+ *
+ * @deprecated Handled as an alias for #MCE_TK_LOCKED
+ */
+# define MCE_TK_SILENT_LOCKED "silent-locked"
+
+/** Touchscreen/Keypad locked with fadeout
+ *
+ * @since mce 1.4.15
+ *
+ * @deprecated Handled as an alias for #MCE_TK_LOCKED
+ */
+# define MCE_TK_LOCKED_DIM "locked-dim"
+
+/** Touchscreen/Keypad locked with delay
+ *
+ * @since mce 1.12.2
+ *
+ * @deprecated Handled as an alias for #MCE_TK_LOCKED
+ */
+# define MCE_TK_LOCKED_DELAY "locked-delay"
+
+/** Touchscreen/Keypad silently locked with fadeout
+ *
+ * @since mce 1.4.15
+ *
+ * @deprecated Handled as an alias for #MCE_TK_LOCKED
+ */
+# define MCE_TK_SILENT_LOCKED_DIM "silent-locked-dim"
+
+/** Touchscreen/Keypad unlocked
+ *
+ * @since mce 1.4.5
+ */
+# define MCE_TK_UNLOCKED "unlocked"
+
+/** Touchscreen/Keypad silently unlocked
+ *
+ * @since mce 1.6.33
+ *
+ * @deprecated Handled as an alias for #MCE_TK_UNLOCKED
+ */
+# define MCE_TK_SILENT_UNLOCKED "silent-unlocked"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display State Constants
+ *
+ *@{
+ */
+
+/** Display state name for display on
+ *
+ * @since mce 1.5.21
+ */
+# define MCE_DISPLAY_ON_STRING "on"
+
+/** Display state name for display dim
+ *
+ * @since mce 1.5.21
+ */
+# define MCE_DISPLAY_DIM_STRING "dimmed"
+
+/** Display state name for display off
+ *
+ * @since mce 1.5.21
+ */
+# define MCE_DISPLAY_OFF_STRING "off"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Blank Prevention State Constants
+ *
+ *@{
*/
-#define MCE_DISPLAY_OFF_STRING "off"
/** Blank prevent state name for active
*
- * @since v1.51.0
+ * @since mce 1.51.0
*/
-#define MCE_PREVENT_BLANK_ACTIVE_STRING "active"
+# define MCE_PREVENT_BLANK_ACTIVE_STRING "active"
+
/** Blank prevent state name for inactive
*
- * @since v1.51.0
+ * @since mce 1.51.0
+ */
+# define MCE_PREVENT_BLANK_INACTIVE_STRING "inactive"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Blanking Inhibit State Constants
+ *
+ *@{
*/
-#define MCE_PREVENT_BLANK_INACTIVE_STRING "inactive"
/** Blank inhibit state name for active
*
- * @since v1.51.0
+ * @since mce 1.51.0
*/
-#define MCE_INHIBIT_BLANK_ACTIVE_STRING "active"
+# define MCE_INHIBIT_BLANK_ACTIVE_STRING "active"
+
/** Blank inhibit state name for inactive
*
- * @since v1.51.0
+ * @since mce 1.51.0
+ */
+# define MCE_INHIBIT_BLANK_INACTIVE_STRING "inactive"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Blanking Policy State Constants
+ *
+ *@{
*/
-#define MCE_INHIBIT_BLANK_INACTIVE_STRING "inactive"
/** Default blanking policy active
*
- * @since v1.55.0
+ * @since mce 1.55.0
*/
-#define MCE_BLANKING_POLICY_DEFAULT_STRING "default"
+# define MCE_BLANKING_POLICY_DEFAULT_STRING "default"
/** Default blanking policy disabled due to notifications
*
- * @since v1.55.0
+ * @since mce 1.55.0
*/
-#define MCE_BLANKING_POLICY_NOTIFICATION_STRING "notification"
+# define MCE_BLANKING_POLICY_NOTIFICATION_STRING "notification"
/** Default blanking policy disabled due to alarm dialog state
*
- * @since v1.55.0
+ * @since mce 1.55.0
*/
-#define MCE_BLANKING_POLICY_ALARM_STRING "alarm"
+# define MCE_BLANKING_POLICY_ALARM_STRING "alarm"
/** Default blanking policy disabled due to call state
*
- * @since v1.55.0
+ * @since mce 1.55.0
*/
-#define MCE_BLANKING_POLICY_CALL_STRING "call"
+# define MCE_BLANKING_POLICY_CALL_STRING "call"
/** Default blanking policy is about to be restored
*
- * @since v1.55.0
+ * @since mce 1.55.0
*/
-#define MCE_BLANKING_POLICY_LINGER_STRING "linger"
+# define MCE_BLANKING_POLICY_LINGER_STRING "linger"
-/**
- * CABC name for CABC disabled
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name CABC Mode Constants
*
- * @since v1.8.88
+ *@{
*/
-#define MCE_CABC_MODE_OFF "off"
-/**
- * CABC name for UI mode
+
+/** CABC name for CABC disabled
*
- * @since v1.8.88
+ * @since mce 1.8.88
*/
-#define MCE_CABC_MODE_UI "ui"
-/**
- * CABC name for still image mode
+# define MCE_CABC_MODE_OFF "off"
+
+/** CABC name for UI mode
*
- * @since v1.8.88
+ * @since mce 1.8.88
*/
-#define MCE_CABC_MODE_STILL_IMAGE "still-image"
-/**
- * CABC name for moving image mode
+# define MCE_CABC_MODE_UI "ui"
+
+/** CABC name for still image mode
*
- * @since v1.8.88
+ * @since mce 1.8.88
*/
-#define MCE_CABC_MODE_MOVING_IMAGE "moving-image"
-/**
- * POWERKEY EVENT for single powerkey press
+# define MCE_CABC_MODE_STILL_IMAGE "still-image"
+
+/** CABC name for moving image mode
*
- * @since v1.10.54
+ * @since mce 1.8.88
*/
-#define MCE_POWERKEY_EVENT_SHORT_PRESS (0u)
-/**
- * POWERKEY EVENT for long powerkey press
+# define MCE_CABC_MODE_MOVING_IMAGE "moving-image"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Power Key Trigger Constants
*
- * @since v1.10.54
+ *@{
*/
-#define MCE_POWERKEY_EVENT_LONG_PRESS (1u)
-/**
- * POWERKEY EVENT for double powerkey press
+
+/** Simulate single powerkey press
*
- * @since v1.10.54
+ * @since mce 1.10.54
+ */
+# define MCE_POWERKEY_EVENT_SHORT_PRESS (0u)
+
+/** Simulate long powerkey press
+ *
+ * @since mce 1.10.54
+ */
+# define MCE_POWERKEY_EVENT_LONG_PRESS (1u)
+
+/** Simulate double powerkey press
+ *
+ * @since mce 1.10.54
+ */
+# define MCE_POWERKEY_EVENT_DOUBLE_PRESS (2u)
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name USB Cable State Constants
+ *
+ *@{
*/
-#define MCE_POWERKEY_EVENT_DOUBLE_PRESS (2u)
/** USB cable state is not known
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_USB_CABLE_STATE_UNKNOWN "unknown"
+# define MCE_USB_CABLE_STATE_UNKNOWN "unknown"
+
/** USB cable is connected
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_USB_CABLE_STATE_CONNECTED "connected"
+# define MCE_USB_CABLE_STATE_CONNECTED "connected"
+
/** USB cable is disconnected
*
- * @since v1.86.0
+ * @since mce 1.86.0
+ */
+# define MCE_USB_CABLE_STATE_DISCONNECTED "disconnected"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Charger State Constants
+ *
+ *@{
*/
-#define MCE_USB_CABLE_STATE_DISCONNECTED "disconnected"
/** Charger state is not known
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_CHARGER_STATE_UNKNOWN "unknown"
+# define MCE_CHARGER_STATE_UNKNOWN "unknown"
+
/** Charger is active
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_CHARGER_STATE_ON "on"
+# define MCE_CHARGER_STATE_ON "on"
+
/** Charger is inactive
*
- * @since v1.86.0
+ * @since mce 1.86.0
+ */
+# define MCE_CHARGER_STATE_OFF "off"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Battery Status Constants
+ *
+ *@{
*/
-#define MCE_CHARGER_STATE_OFF "off"
/** Battery status is not known
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_BATTERY_STATUS_UNKNOWN "unknown"
+# define MCE_BATTERY_STATUS_UNKNOWN "unknown"
+
/** Battery is full
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_BATTERY_STATUS_FULL "full"
+# define MCE_BATTERY_STATUS_FULL "full"
+
/** Battery is neither full nor empty
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_BATTERY_STATUS_OK "ok"
+# define MCE_BATTERY_STATUS_OK "ok"
+
/** Battery is low on power
*
- * @since v1.86.0
+ * @since mce 1.86.0
*/
-#define MCE_BATTERY_STATUS_LOW "low"
+# define MCE_BATTERY_STATUS_LOW "low"
+
/** Battery is empty
*
- * @since v1.86.0
+ * @since mce 1.86.0
+ */
+# define MCE_BATTERY_STATUS_EMPTY "empty"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Battery Level Constants
+ *
+ *@{
*/
-#define MCE_BATTERY_STATUS_EMPTY "empty"
/** Battery level percentage is not known
*
- * @since v1.86.0
+ * @since mce 1.86.0
+ */
+# define MCE_BATTERY_LEVEL_UNKNOWN (-1)
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Input Policy State Constants
+ *
+ *@{
*/
-#define MCE_BATTERY_LEVEL_UNKNOWN (-1)
/** Input events should be processed normally
*
- * @since v1.87.0
+ * @since mce 1.87.0
*/
-#define MCE_INPUT_POLICY_ENABLED "enabled"
+# define MCE_INPUT_POLICY_ENABLED "enabled"
/** Input events should be ignored
*
- * @since v1.87.0
+ * @since mce 1.87.0
*/
-#define MCE_INPUT_POLICY_DISABLED "disabled"
+# define MCE_INPUT_POLICY_DISABLED "disabled"
-#endif /* _MCE_MODE_NAMES_H_ */
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Hardware Keyboard Availability Constants
+ *
+ *@{
+ */
+
+/** Hardware Keyboard availability is not known
+ *
+ * @since mce 1.39.0
+ */
+# define MCE_HARDWARE_KEYBOARD_UNDEF "undef"
+
+/** Hardware Keyboard is available
+ *
+ * @since mce 1.39.0
+ */
+# define MCE_HARDWARE_KEYBOARD_AVAILABLE "available"
+
+/** Hardware Keyboard is not available
+ *
+ * @since mce 1.39.0
+ */
+# define MCE_HARDWARE_KEYBOARD_NOT_AVAILABLE "not-available"
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Feedback Event Name Constants
+ *
+ *@{
+ */
+
+/** Notify that an application should handle powerkey press
+ *
+ * @since mce 1.26.0
+ *
+ * Normally MCE handles powerkey presses internally, however
+ * there are some exceptions - for example during alarms and
+ * incoming calls - where reacting to power key press is
+ * delegated to application ui relevant to the context.
+ *
+ * See:
+ * - #MCE_ALARM_UI_FEEDBACK_SIG
+ * - #MCE_CALL_UI_FEEDBACK_SIG
+ */
+# define MCE_FEEDBACK_EVENT_POWERKEY "powerkey"
+
+/** Notify that an application should handle device flipover
+ *
+ * @since mce 1.26.0
+ *
+ * While there are incoming calls or ringing alarms, MCE does
+ * device flipover detection. Reacting to such "sensor gestures"
+ * is delegated to application ui relevant to the context.
+ *
+ * See:
+ * - #MCE_ALARM_UI_FEEDBACK_SIG
+ * - #MCE_CALL_UI_FEEDBACK_SIG
+ */
+# define MCE_FEEDBACK_EVENT_FLIPOVER "flipover"
+
+/** Request lockscreen ui to switch to device unlock view
+ *
+ * @since mce 1.37.0
+ *
+ * When MCE bumps into situation where removing tklock is
+ * requested while device is locked, it asks ui to switch
+ * into device unlock view instead of deactivating tklock.
+ *
+ * See:
+ * - #MCE_POWER_BUTTON_TRIGGER
+ *
+ * @note The "double-power-key" value is just unfortunate
+ * historical artefact that can't be changed without
+ * causing a D-Bus API break.
+ */
+# define MCE_FEEDBACK_EVENT_UNLOCK "double-power-key"
+
+/** Notify lipstick about homekey presses
+ *
+ * @since mce 1.82.0
+ *
+ * Artefact from tk7001 adaptation: The fingerprint sensor
+ * doubles as home key. To facilitate "wakeup display and
+ * activate fingerprint sensor" type activity homekey
+ * handling is divided in two parts: 1st mce subjects the
+ * press to similar unblanking rules as what is done to
+ * the powerkey and then after/when display is powered up
+ * reaction to the homekey is delegated to lipstick.
+ *
+ * See:
+ * - #MCE_POWER_BUTTON_TRIGGER
+ */
+# define MCE_FEEDBACK_EVENT_HOMEKEY "home-key"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Sliding Keyboard Availability Constants
+ *
+ * Used for example in evaluating whether virtual keyboard
+ * should be used or not.
+ *
+ * See:
+ * - #MCE_SLIDING_KEYBOARD_STATE_GET
+ * - #MCE_SLIDING_KEYBOARD_STATE_SIG
+ *
+ *@{
+ */
+
+/** Sliding Keyboard state is not known
+ *
+ * @since mce 1.39.0
+ */
+# define MCE_SLIDING_KEYBOARD_UNDEF "undef"
+
+/** Sliding Keyboard is opened
+ *
+ * @since mce 1.39.0
+ */
+# define MCE_SLIDING_KEYBOARD_OPEN "open"
+
+/** Sliding Keyboard is closed
+ *
+ * @since mce 1.39.0
+ */
+# define MCE_SLIDING_KEYBOARD_CLOSED "closed"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name Display Low Power Mode Constants
+ *
+ *@{
+ */
+
+/** Display Low Power Mode is Enabled
+ *
+ * @since mce 1.30.0
+ */
+# define MCE_LPM_UI_ENABLED "enabled"
+
+/** Display Low Power Mode is Disabled
+ *
+ * @since mce 1.30.0
+ */
+# define MCE_LPM_UI_DISABLED "disabled"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** @name System Memory Pressure Constants
+ *
+ *@{
+ */
+
+/** System memory use is at normal level
+ *
+ * @since mce 1.35.0
+ */
+# define MCE_MEMORY_LEVEL_NORMAL "normal"
+
+/** System memory use is above normal level
+ *
+ * @since mce 1.35.0
+ *
+ * Signifies: Unnecesary resources should be released.
+ */
+# define MCE_MEMORY_LEVEL_WARNING "warning"
+
+/** System memory use is at critical level
+ *
+ * @since mce 1.35.0
+ *
+ * Signifies: Unnecessary processes should exit. Non-critical
+ * processes can be expected to get terminated by kernel side
+ * out of memory killer.
+ */
+# define MCE_MEMORY_LEVEL_CRITICAL "critical"
+
+/** System memory use can't be evaluated
+ *
+ * @since mce 1.35.0
+ *
+ * Signifies: Kernel does not provide memnotify interface
+ * and/or memory use limits have not been defined in mce
+ * configuration.
+ */
+# define MCE_MEMORY_LEVEL_UNKNOWN "unknown"
+
+/*@}*/
+
+/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
+/** TKLock status replies from SystemUI
+ *
+ *@{
+ */
+
+/** TKLock was unlocked by the user
+ *
+ * @since mce 1.10.92 (legacy)
+ */
+# define TKLOCK_UNLOCK 1
+/** TKLock unlock attempt failed
+ *
+ * @since mce 1.10.92 (legacy)
+ *
+ * @deprecated Ignored by MCE
+ */
+# define TKLOCK_RETRY 2
+
+/** Attempt to open TKLock timed out
+ *
+ * @since mce 1.10.92 (legacy)
+ *
+ * @deprecated Ignored by MCE
+ */
+# define TKLOCK_TIMEOUT 3
+/** TKLock closed on request from mce
+ *
+ * @since mce 1.10.92 (legacy)
+ */
+# define TKLOCK_CLOSED 4
+
+/*@}*/
+
+#endif /* MCE_MODE_NAMES_H_ */