diff --git a/include/mce/dbus-names.h b/include/mce/dbus-names.h index 5129420..6ff098a 100644 --- a/include/mce/dbus-names.h +++ b/include/mce/dbus-names.h @@ -5,7 +5,8 @@ * This file is part of mce-dev *

* 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. *

* @author David Weinehall * @author Santtu Lakkala @@ -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" + /*@}*/ ///////////////////////////////////////////////////////////////////////////// diff --git a/include/mce/mode-names.h b/include/mce/mode-names.h index f107fdb..8c5526c 100644 --- a/include/mce/mode-names.h +++ b/include/mce/mode-names.h @@ -5,7 +5,8 @@ * This file is part of mce-dev *

* 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. *

* @author David Weinehall * @author Tapio Rantala @@ -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