/
usb_moded-modes.h
95 lines (83 loc) · 3.38 KB
/
usb_moded-modes.h
1
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* 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: Thomas Perl <m@thp.io>
* 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
*/
#ifndef USB_MODED_MODES_H_
# define USB_MODED_MODES_H_
/* ========================================================================= *
* Constants
* ========================================================================= */
/* ------------------------------------------------------------------------- *
* Internal modes
*
* These modes are defined internally within usb-moded and are thus
* always available.
*
* Generally speaking these are also activated automatically and thus
* not really selectable - except:
* - MODE_ASK which can be set as default mode
* - MODE_CHARGING which can be acticated on request too
* ------------------------------------------------------------------------- */
/** No cable connected */
# define MODE_UNDEFINED "undefined"
/** Pending mode activation
*
* Used for signaling "in between modes" state.
*/
# define MODE_BUSY "busy"
/** Connected to a dedicated charger */
# define MODE_CHARGER "dedicated_charger"
/** Blocked mode selection
*
* While prerequisites for dynamic mode activation are not met e.g.
* device is locked, pc connection is used for charging.
*/
# define MODE_CHARGING_FALLBACK "charging_only_fallback"
/** Pending mode selection
*
* While mode selection dialog is shown to user, pc connection
* is used for charging.
*/
# define MODE_ASK "ask"
/** Charging only selected */
# define MODE_CHARGING "charging_only"
/* ------------------------------------------------------------------------- *
* Dynamic modes
*
* These modes are defined in usb-moded configuration files.
*
* From usb-moded point of view mode names have no special meaning,
* but a set of known values is still defined (and are likely to
* have localized name presentation in UI context).
* ------------------------------------------------------------------------- */
# define MODE_MASS_STORAGE "mass_storage"
# define MODE_DEVELOPER "developer_mode"
# define MODE_MTP "mtp_mode"
# define MODE_HOST "host_mode"
# define MODE_CONNECTION_SHARING "connection_sharing"
# define MODE_DIAG "diag_mode"
# define MODE_ADB "adb_mode"
# define MODE_PC_SUITE "pc_suite"
#endif /* USB_MODED_MODES_H_ */