Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'jb38667_charger_type' into 'master'
Browse files Browse the repository at this point in the history
Add charger type D-Bus constants

See merge request mer-core/mce-dev!11
  • Loading branch information
spiiroin committed Aug 26, 2019
2 parents 03a4de1 + 5ee3ef6 commit 74b1d5e
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 2 deletions.
33 changes: 32 additions & 1 deletion include/mce/dbus-names.h
Expand Up @@ -5,7 +5,8 @@
* This file is part of mce-dev
* <p>
* Copyright © 2004-2011 Nokia Corporation and/or its subsidiary(-ies).
* Copyright (C) 2013-2017 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
* Copyright (c) 2019 Open Mobile Platform LLC.
* <p>
* @author David Weinehall <david.weinehall@nokia.com>
* @author Santtu Lakkala <ext-santtu.1.lakkala@nokia.com>
Expand Down Expand Up @@ -862,6 +863,36 @@
*/
# define MCE_BATTERY_LEVEL_SIG "battery_level_ind"

/** Query current charger type
*
* @since mce 1.102.0
*
* @return string: current charger type, one of:
* - #MCE_CHARGER_TYPE_NONE
* - #MCE_CHARGER_TYPE_USB
* - #MCE_CHARGER_TYPE_DCP
* - #MCE_CHARGER_TYPE_HVDCP
* - #MCE_CHARGER_TYPE_CDP
* - #MCE_CHARGER_TYPE_WIRELESS
* - #MCE_CHARGER_TYPE_OTHER
*/
# define MCE_CHARGER_TYPE_GET "get_charger_type"

/** Signal that indicates that charger type has changed
*
* @since mce 1.102.0
*
* @param charger_type string: current charger type, one of:
* - #MCE_CHARGER_TYPE_NONE
* - #MCE_CHARGER_TYPE_USB
* - #MCE_CHARGER_TYPE_DCP
* - #MCE_CHARGER_TYPE_HVDCP
* - #MCE_CHARGER_TYPE_CDP
* - #MCE_CHARGER_TYPE_WIRELESS
* - #MCE_CHARGER_TYPE_OTHER
*/
# define MCE_CHARGER_TYPE_SIG "charger_type_ind"

/*@}*/

/////////////////////////////////////////////////////////////////////////////
Expand Down
54 changes: 53 additions & 1 deletion include/mce/mode-names.h
Expand Up @@ -5,7 +5,8 @@
* This file is part of mce-dev
* <p>
* Copyright © 2004-2011 Nokia Corporation and/or its subsidiary(-ies).
* Copyright (C) 2012-2017 Jolla Ltd.
* Copyright (C) 2012-2019 Jolla Ltd.
* Copyright (c) 2019 Open Mobile Platform LLC.
* <p>
* @author David Weinehall <david.weinehall@nokia.com>
* @author Tapio Rantala <ext-tapio.rantala@nokia.com>
Expand Down Expand Up @@ -430,6 +431,57 @@

/*@}*/

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/** @name Charger Type Constants
*
*@{
*/

/** No charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_NONE "none"

/** Standard down port (pc/hub) charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_USB "usb"

/** Dedicated charging port (wall) charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_DCP "dcp"

/** High voltage DCP charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_HVDCP "hvdcp"

/** Charging Downstream Port charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_CDP "cdp"

/** Wireless charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_WIRELESS "wireless"

/** Other kind of charger is active
*
* @since mce 1.102.0
*/
# define MCE_CHARGER_TYPE_OTHER "other"

/*@}*/

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/** @name Battery Status Constants
Expand Down

0 comments on commit 74b1d5e

Please sign in to comment.