Compare commits

...

13 Commits

Author SHA1 Message Date
Simo Piiroinen
6ca93012d5 Bump mce-dev version to 1.21.0 2017-01-23 11:59:57 +02:00
spiiroin
accc1f4bde Merge branch 'jb37422_expose_battery_data' into 'master'
Expose battery/charging data on D-Bus

See merge request !3
2017-01-23 09:57:18 +00:00
Simo Piiroinen
efb7efd024 [mce] Expose battery/charging data on D-Bus. Contributes to JB#37422
Add names of D-Bus method calls and signals related to querying and
tracking of battery/charging related information.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
2017-01-20 12:02:04 +02:00
Simo Piiroinen
780ae8245b Bump mce-dev version to 1.20.0 2016-11-10 08:53:37 +02:00
Simo Piiroinen
5a8d06c02e [build] Allow OBS builds without explicit version tag
The mce-dev version information is recorded in several files. To keep
these in sync, there is a script that will cause rpm builds to fail unless
all of the places have the same version.

While this is good for making sure releases do not end up using out of
sync version numbers, it also makes it impossible to do builds in OBS
without creating explicit version tag.

The same way as mce itself already does, relax the version checking for
spec file so that versions constructed from matching version + extra git
hash identification are also accepted.
2016-11-10 08:53:12 +02:00
spiiroin
22a9feb64e Merge branch 'jb34813_get_all_settings' into 'master'
Add method call for getting all mce settings



See merge request !2
2016-11-10 06:25:51 +00:00
Simo Piiroinen
5ea1f28ad7 [mce] Add method call for getting all mce settings. JB#34813 2016-11-09 14:02:43 +02:00
Simo Piiroinen
13e1c2b3c0 Bump mce-dev version to 1.19.0 2016-05-04 12:56:55 +03:00
spiiroin
34edc46e9e Merge branch 'jb20728_blank_ignored_call' into 'master'
Add D-Bus method for ignoring incoming call



See merge request !1
2016-05-04 09:53:47 +00:00
Simo Piiroinen
358243f960 [powerkey] Add method for ignoring incoming call. JB#20728 2016-04-12 14:31:19 +03:00
Simo Piiroinen
e6e96ef67f Bump mce-dev version to 1.18.0 2015-09-14 11:45:58 +03:00
Simo Piiroinen
002e5fd865 Merge pull request #11 from kimmoli/powerkeytriggers
Add constants for powerkey events
2015-09-14 11:43:42 +03:00
Kimmo Lindholm
62d5ea325f [powerkey] Add constants for powerkey events. Fixes MER#1310
New constants
 * MCE_POWERKEY_EVENT_SHORT_PRESS
 * MCE_POWERKEY_EVENT_LONG_PRESS
 * MCE_POWERKEY_EVENT_DOUBLE_PRESS
2015-09-13 21:03:22 +03:00
6 changed files with 245 additions and 13 deletions

24
debian/changelog vendored
View File

@@ -1,3 +1,27 @@
mce-dev (1.21.0) unstable; urgency=low
* [mce] Expose battery/charging data on D-Bus. Contributes to JB#37422
-- Simo Piiroinen <simo.piiroinen@jollamobile.com> Mon, 23 Jan 2017 11:58:37 +0200
mce-dev (1.20.0) unstable; urgency=low
* [mce] Add method call for getting all mce settings. JB#34813
-- Simo Piiroinen <simo.piiroinen@jollamobile.com> Thu, 10 Nov 2016 08:27:14 +0200
mce-dev (1.19.0) unstable; urgency=low
* [powerkey] Add method for ignoring incoming call. JB#20728
-- Simo Piiroinen <simo.piiroinen@jollamobile.com> Wed, 04 May 2016 12:54:34 +0300
mce-dev (1.18.0) unstable; urgency=low
* [powerkey] Add constants for powerkey events. Fixes MER#1310
-- Simo Piiroinen <simo.piiroinen@jollamobile.com> Mon, 14 Sep 2015 11:44:27 +0300
mce-dev (1.17.0) unstable; urgency=low
* [mce] Add D-Bus constants for exposing display blanking policy.

View File

@@ -241,6 +241,19 @@
*/
#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
*
@@ -345,10 +358,8 @@
* 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; @c 0 == short powerkey press,
* @c 1 == long powerkey press,
* @c 2 == double powerkey press
* @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"
@@ -463,6 +474,18 @@
*/
#define MCE_CONFIG_GET "get_config"
/** Query all configuration values
*
* Get array of (key,value) pairs for all runtime changeable settings
* that mce supports.
*
* @since v1.83.0
*
* @return ARRAY(DICT_ENTRY(STRING, VARIANT)), or
* error reply
*/
#define MCE_CONFIG_GET_ALL "get_config_all"
/** Set configuration value
*
* @since v1.12.15
@@ -487,6 +510,58 @@
* @return Number of changed settings as DBUS_TYPE_INT32; -1 on failure
*/
#define MCE_CONFIG_RESET "reset_config"
/** Query current USB cable state
*
* Possible return values are:
* - #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"
/** Query current charger state
*
* Possible return values are:
* - #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"
/** Query current battery status
*
* Possible return values are:
* - #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"
/*@}*/
/**
@@ -595,6 +670,46 @@
*/
#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"
/** Signal that indicates that battery status has changed
*
* See #MCE_BATTERY_STATUS_GET for possible argument values
*
* @since v1.86.0
*
* @param battery_status battery status as DBUS_TYPE_STRING
*/
#define MCE_BATTERY_STATUS_SIG "battery_status_ind"
/** Signal that indicates that battery level has changed
*
* See #MCE_BATTERY_LEVEL_GET for possible argument values
*
* @since v1.86.0
*
* @param battery_level battery level as DBUS_TYPE_INT32
*/
#define MCE_BATTERY_LEVEL_SIG "battery_level_ind"
/*@}*/

View File

@@ -239,5 +239,87 @@
* @since v1.8.88
*/
#define MCE_CABC_MODE_MOVING_IMAGE "moving-image"
/**
* POWERKEY EVENT for single powerkey press
*
* @since v1.10.54
*/
#define MCE_POWERKEY_EVENT_SHORT_PRESS (0u)
/**
* POWERKEY EVENT for long powerkey press
*
* @since v1.10.54
*/
#define MCE_POWERKEY_EVENT_LONG_PRESS (1u)
/**
* POWERKEY EVENT for double powerkey press
*
* @since v1.10.54
*/
#define MCE_POWERKEY_EVENT_DOUBLE_PRESS (2u)
/** USB cable state is not known
*
* @since v1.86.0
*/
#define MCE_USB_CABLE_STATE_UNKNOWN "unknown"
/** USB cable is connected
*
* @since v1.86.0
*/
#define MCE_USB_CABLE_STATE_CONNECTED "connected"
/** USB cable is disconnected
*
* @since v1.86.0
*/
#define MCE_USB_CABLE_STATE_DISCONNECTED "disconnected"
/** Charger state is not known
*
* @since v1.86.0
*/
#define MCE_CHARGER_STATE_UNKNOWN "unknown"
/** Charger is active
*
* @since v1.86.0
*/
#define MCE_CHARGER_STATE_ON "on"
/** Charger is inactive
*
* @since v1.86.0
*/
#define MCE_CHARGER_STATE_OFF "off"
/** Battery status is not known
*
* @since v1.86.0
*/
#define MCE_BATTERY_STATUS_UNKNOWN "unknown"
/** Battery is full
*
* @since v1.86.0
*/
#define MCE_BATTERY_STATUS_FULL "full"
/** Battery is neither full nor empty
*
* @since v1.86.0
*/
#define MCE_BATTERY_STATUS_OK "ok"
/** Battery is low on power
*
* @since v1.86.0
*/
#define MCE_BATTERY_STATUS_LOW "low"
/** Battery is empty
*
* @since v1.86.0
*/
#define MCE_BATTERY_STATUS_EMPTY "empty"
/** Battery level percentage is not known
*
* @since v1.86.0
*/
#define MCE_BATTERY_LEVEL_UNKNOWN (-1)
#endif /* _MCE_MODE_NAMES_H_ */

2
mce.pc
View File

@@ -3,7 +3,7 @@ includedir=${prefix}/include
Name: mce
Description: Mode Control Entity
Version: 1.17.0
Version: 1.21.0
Requires:
Libs:
Cflags: -I${includedir}

View File

@@ -1,6 +1,6 @@
Name: mce-headers
Summary: Development files for mce
Version: 1.17.0
Version: 1.21.0
Release: 1
Group: Development/Libraries
License: LGPLv2

View File

@@ -8,23 +8,34 @@ PC_VERS=$(grep '^Version:' $PC_PATH |sed -e 's/^.*:[[:space:]]*//')
DEB_PATH=debian/changelog
DEB_VERS=$(head -1 $DEB_PATH | sed -e 's/^.*(//' -e 's/).*$//')
SPEC_PATH=${RPM_SOURCE_DIR:-rpm}/${RPM_PACKAGE_NAME:-mce-headers}.spec
SPEC_VERS=$(grep '^Version:' $SPEC_PATH |sed -e 's/^.*:[[:space:]]*//')
RPM_PATH=${RPM_SOURCE_DIR:-rpm}/${RPM_PACKAGE_NAME:-mce-headers}.spec
RPM_VERS=$(grep '^Version:' $RPM_PATH |sed -e 's/^.*:[[:space:]]*//')
# Remove initial part of rpm version that equals with version from pkgconfig
RPM_XTRA=${RPM_VERS#$PC_VERS}
# From that remove initial part that equals with version from spec-file
RPM_XTRA=${RPM_XTRA#$RPM_VERS}
# If the result is non-empty string, then OBS is doing
# delta-after-matching-tag kind of build, which is ok.
# But empty string means that spec and Makefile are completely
# out of sync, which is bad.
RES=0
if [ "$DEB_VERS" != "$PC_VERS" ]; then
echo >&2 "$PC_PATH $PC_VERS vs $DEB_PATH $DEB_VERS"
RES=1
fi
if [ "$SPEC_VERS" != "$PC_VERS" ]; then
echo >&2 "$PC_PATH $PC_VERS vs $SPEC_PATH $SPEC_VERS"
RES=1
if [ "$RPM_VERS" != "$PC_VERS" ]; then
if [ -z "$RPM_XTRA" ]; then
echo >&2 "$PC_PATH $PC_VERS vs $RPM_PATH $RPM_VERS"
RES=1
else
echo "(ignoring patch level in spec file: $RPM_XTRA)"
fi
fi
if [ $RES != 0 ]; then
echo >&2 "Conflicting package versions"
fi