27#ifndef USB_MODED_COMMON_H_
28# define USB_MODED_COMMON_H_
49 CABLE_STATE_DISCONNECTED,
50 CABLE_STATE_CHARGER_CONNECTED,
51 CABLE_STATE_PC_CONNECTED,
70const char *cable_state_repr(cable_state_t state);
76const char *common_map_mode_to_hardware (
const char *internal_mode);
77const char *common_map_mode_to_external (
const char *internal_mode);
84int common_system_ (
const char *file,
int line,
const char *func,
const char *command);
85FILE *
common_popen_ (
const char *file,
int line,
const char *func,
const char *command,
const char *type);
86waitres_t common_wait (
unsigned tot_ms,
bool (*ready_cb)(
void *aptr),
void *aptr);
87bool common_msleep_ (
const char *file,
int line,
const char *func,
unsigned msec);
97# define common_system(command) common_system_(__FILE__,__LINE__,__FUNCTION__,(command))
98# define common_popen(command, type) common_popen_(__FILE__,__LINE__,__FUNCTION__,(command),(type))
99# define common_msleep(msec) common_msleep_(__FILE__,__LINE__,__FUNCTION__,(msec))
100# define common_sleep(sec) common_msleep_(__FILE__,__LINE__,__FUNCTION__,(sec)*1000)
105# define UID_UNKNOWN ((uid_t)-1)
void common_release_wakelock(const char *wakelock_name)
int common_valid_mode(const char *mode)
int common_system_(const char *file, int line, const char *func, const char *command)
void common_send_available_modes_signal(void)
FILE * common_popen_(const char *file, int line, const char *func, const char *command, const char *type)
void common_send_whitelisted_modes_signal(void)
void common_send_hidden_modes_signal(void)
gchar * common_get_mode_list(mode_list_type_t type, uid_t uid)
bool common_modename_is_internal(const char *modename)
void common_acquire_wakelock(const char *wakelock_name)
bool common_msleep_(const char *file, int line, const char *func, unsigned msec)
bool common_modename_is_static(const char *modename)
void common_send_supported_modes_signal(void)