Skip to content

Latest commit

 

History

History
99 lines (89 loc) · 5.15 KB

usb_moded-dbus.h

File metadata and controls

99 lines (89 loc) · 5.15 KB
 
Mar 22, 2011
Mar 22, 2011
1
/*
Aug 24, 2018
Aug 24, 2018
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2012-2018 Jolla. All rights reserved.
*
* Author: Philippe De Swert <philippe.de-swert@nokia.com>
* Author: Philippe De Swert <philippedeswert@gmail.com>
* Author: Philippe De Swert <philippe.deswert@jollamobile.com>
* Author: Vesa Halttunen <vesa.halttunen@jollamobile.com>
* Author: Slava Monich <slava.monich@jolla.com>
* Author: Martin Jones <martin.jones@jollamobile.com>
* Author: Andrew den Exter <andrew.den.exter@jolla.com>
* Author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Lesser GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the Lesser GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
Mar 22, 2011
Mar 22, 2011
28
Aug 24, 2018
Aug 24, 2018
29
30
#ifndef USB_MODED_DBUS_H_
# define USB_MODED_DBUS_H_
Mar 22, 2011
Mar 22, 2011
31
Aug 24, 2018
Aug 24, 2018
32
33
34
/* ========================================================================= *
* Constants
* ========================================================================= */
Mar 22, 2011
Mar 22, 2011
35
36
/**
Aug 24, 2018
Aug 24, 2018
37
38
39
40
41
* @credential usb-moded::usb-moded-dbus-bind Credential needed to connect to the bus
**/
# define USB_MODE_SERVICE "com.meego.usb_moded"
# define USB_MODE_INTERFACE "com.meego.usb_moded"
# define USB_MODE_OBJECT "/com/meego/usb_moded"
Apr 28, 2015
Apr 28, 2015
42
43
44
45
46
47
48
/**
* sig_usb_state_ind: Notify interested parties of state and mode changes
*
* This signals both the transient states listed below as well as the "real"
* states listed in usb_moded-modes.h.
**/
Aug 24, 2018
Aug 24, 2018
49
50
51
52
53
54
55
# define USB_MODE_SIGNAL_NAME "sig_usb_state_ind"
# define USB_MODE_CONFIG_SIGNAL_NAME "sig_usb_config_ind"
# define USB_MODE_ERROR_SIGNAL_NAME "sig_usb_state_error_ind"
# define USB_MODE_SUPPORTED_MODES_SIGNAL_NAME "sig_usb_supported_modes_ind"
# define USB_MODE_HIDDEN_MODES_SIGNAL_NAME "sig_usb_hidden_modes_ind"
# define USB_MODE_WHITELISTED_MODES_SIGNAL_NAME "sig_usb_whitelisted_modes_ind"
# define USB_MODE_AVAILABLE_MODES_SIGNAL_NAME "sig_usb_available_modes_ind"
Mar 22, 2011
Mar 22, 2011
56
57
/* supported methods */
Aug 24, 2018
Aug 24, 2018
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# define USB_MODE_STATE_REQUEST "mode_request" /* returns the current mode */
# define USB_MODE_RESCUE_OFF "rescue_off" /* turns rescue mode off so normal mode selection is restored */
# define USB_MODE_CONFIG_GET "get_config" /* returns the mode set in the config */
# define USB_MODE_LIST "get_modes" /* returns a comma-separated list of supported modes for ui's */
# define USB_MODE_HIDE "hide_mode" /* hide a mode */
# define USB_MODE_UNHIDE "unhide_mode" /* unhide a mode */
# define USB_MODE_HIDDEN_GET "get_hidden" /* return the hidden modes */
# define USB_MODE_STATE_SET "set_mode" /* set a mode (only works when connected) */
# define USB_MODE_CONFIG_SET "set_config" /* set the mode that needs to be activated in the config file */
# define USB_MODE_NETWORK_SET "net_config" /* set the network config in the config file */
# define USB_MODE_NETWORK_GET "get_net_config" /* get the network config from the config file */
# define USB_MODE_WHITELISTED_MODES_GET "get_whitelisted_modes" /* get the list of whitelisted modes */
# define USB_MODE_WHITELISTED_MODES_SET "set_whitelisted_modes" /* set the list of whitelisted modes */
# define USB_MODE_WHITELISTED_SET "set_whitelisted" /* sets whether an specific mode is in the whitelist */
# define USB_MODE_AVAILABLE_MODES_GET "get_available_modes" /* returns a comma separated list of modes which are currently available for selection */
Mar 22, 2011
Mar 22, 2011
73
Apr 28, 2015
Apr 28, 2015
74
75
76
77
/**
* (Transient) states reported by "sig_usb_state_ind" that are not modes.
* These are only reported by the signal, and never returned by e.g. "mode_request".
**/
Aug 24, 2018
Aug 24, 2018
78
79
80
81
82
83
84
85
86
87
# define USB_CONNECTED "USB connected"
# define USB_DISCONNECTED "USB disconnected"
# define USB_REALLY_DISCONNECT "USB mode change in progress"
# define DATA_IN_USE "data_in_use"
# define USB_CONNECTED_DIALOG_SHOW "mode_requested_show_dialog"
# define USB_PRE_UNMOUNT "pre-unmount"
# define RE_MOUNT_FAILED "mount_failed"
# define CHARGER_CONNECTED "charger_connected"
# define CHARGER_DISCONNECTED "charger_disconnected"
# define MODE_SETTING_FAILED "mode_setting_failed"
Mar 22, 2011
Mar 22, 2011
88
89
/* errors */
Aug 24, 2018
Aug 24, 2018
90
# define UMOUNT_ERROR "Unmounting filesystem failed. Exporting impossible"
Mar 22, 2011
Mar 22, 2011
91
/* qtn_usb_filessystem_inuse is the NOKIA/Meego error string */
Aug 24, 2018
Aug 24, 2018
92
93
94
95
96
97
98
99
/* ========================================================================= *
* Prototypes
* ========================================================================= */
// (in usb_moded-dbus-private.h)
#endif /* USB_MODED_DBUS_H_ */