Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[usb-moded] Move usb_mode structure away from header
The usb_mode structure is by design used only within usb-moded.c
source file.

Clarify the intent by not exposing the structure in a header file.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Mar 28, 2018
1 parent 2ad2f47 commit 38bb4e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 15 additions & 0 deletions src/usb_moded.c
Expand Up @@ -65,6 +65,21 @@
# define VERBOSE_WAKELOCKING 0
#endif

/**
* a struct containing all the usb_moded info needed
*/
typedef struct usb_mode
{
/*@{*/
gboolean connected; /* connection status, 1 for connected */
gboolean mounted; /* mount status, 1 for mounted -UNUSED atm- */
gboolean android_usb_broken; /* Used to keep an active gadget for broken Android kernels */
char *mode; /* the mode name */
char *module; /* the module name for the specific mode */
struct mode_list_elem *data; /* contains the mode data */
/*@}*/
}usb_mode;

/* global definitions */

static int usb_moded_exitcode = EXIT_FAILURE;
Expand Down
15 changes: 0 additions & 15 deletions src/usb_moded.h
Expand Up @@ -43,21 +43,6 @@
#define USB_MODED_LOCKFILE "/var/run/usb_moded.pid"
#define MAX_READ_BUF 512

/**
* a struct containing all the usb_moded info needed
*/
typedef struct usb_mode
{
/*@{*/
gboolean connected; /* connection status, 1 for connected */
gboolean mounted; /* mount status, 1 for mounted -UNUSED atm- */
gboolean android_usb_broken; /* Used to keep an active gadget for broken Android kernels */
char *mode; /* the mode name */
char *module; /* the module name for the specific mode */
struct mode_list_elem *data; /* contains the mode data */
/*@}*/
}usb_mode;

typedef enum mode_list_type_t {
SUPPORTED_MODES_LIST,
AVAILABLE_MODES_LIST
Expand Down

0 comments on commit 38bb4e0

Please sign in to comment.