usb_moded 0.86.0+mer64
|
#include "usb_moded-common.h"
Go to the source code of this file.
Functions | |
uid_t | control_get_user_for_mode (void) |
void | control_set_user_for_mode (uid_t uid) |
const char * | control_get_selected_mode (void) |
void | control_set_selected_mode (const char *mode) |
bool | control_select_mode (const char *mode) |
const char * | control_get_usb_mode (void) |
void | control_user_changed (void) |
void | control_device_lock_changed (void) |
void | control_device_state_changed (void) |
void | control_settings_changed (void) |
void | control_init_done_changed (void) |
void | control_set_enabled (bool enable) |
void | control_set_cable_state (cable_state_t cable_state) |
cable_state_t | control_get_cable_state (void) |
bool | control_get_connection_state (void) |
Copyright (c) 2013 - 2021 Jolla Ltd. Copyright (c) 2020 Open Mobile Platform LLC.
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
Definition in file usb_moded-control.h.
void control_device_lock_changed | ( | void | ) |
React to device lock state changes
Definition at line 479 of file usb_moded-control.c.
void control_device_state_changed | ( | void | ) |
React to device state changes
Definition at line 492 of file usb_moded-control.c.
cable_state_t control_get_cable_state | ( | void | ) |
get the usb connection status
Definition at line 852 of file usb_moded-control.c.
bool control_get_connection_state | ( | void | ) |
Get if the cable (pc or charger) is connected or not
@ return true if connected, false if disconnected
Definition at line 870 of file usb_moded-control.c.
const char * control_get_selected_mode | ( | void | ) |
get mode selected by user
Definition at line 287 of file usb_moded-control.c.
const char * control_get_usb_mode | ( | void | ) |
uid_t control_get_user_for_mode | ( | void | ) |
Get uid of the user that set the current mode
Definition at line 157 of file usb_moded-control.c.
void control_init_done_changed | ( | void | ) |
React to init-done changes
Definition at line 511 of file usb_moded-control.c.
bool control_select_mode | ( | const char * | mode | ) |
handle mode request from client / udev trigger
mode | The requested USB mode |
Definition at line 313 of file usb_moded-control.c.
void control_set_cable_state | ( | cable_state_t | cable_state | ) |
set the usb connection status
cable_state | CABLE_STATE_DISCONNECTED, ... |
Definition at line 828 of file usb_moded-control.c.
void control_set_enabled | ( | bool | enable | ) |
Enable/disable mode changes
Definition at line 527 of file usb_moded-control.c.
void control_set_selected_mode | ( | const char * | mode | ) |
set mode selected by user
mode | selected mode, or NULL to reset selection |
Definition at line 297 of file usb_moded-control.c.
void control_set_user_for_mode | ( | uid_t | uid | ) |
Set the uid of the user that set the current mode
uid | of current user |
Definition at line 167 of file usb_moded-control.c.
void control_settings_changed | ( | void | ) |
React to settings changes
Definition at line 502 of file usb_moded-control.c.
void control_user_changed | ( | void | ) |
React to current user change
Definition at line 451 of file usb_moded-control.c.