Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[doc] Fix Doxygen tagging issues
Fix warnings about undocumented function arguments during documentation
build.

Fix incorrectly tagged structure/enum members.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Mar 28, 2018
1 parent 38bb4e0 commit b38ec22
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 56 deletions.
18 changes: 9 additions & 9 deletions src/usb_moded-appsync.h
Expand Up @@ -32,6 +32,8 @@
#define APP_INFO_SYSTEMD_KEY "systemd"
#define APP_INFO_POST "post"

/** Application activation state
*/
typedef enum {
/** Application is not relevant for the current mode */
APP_STATE_DONTCARE = 0,
Expand All @@ -46,15 +48,13 @@ typedef enum {
*/
typedef struct list_elem
{
/*@{*/
char *name; /* name of the app to launch */
char *mode; /* mode in which to launch the app */
char *launch; /* dbus launch command/address */
app_state_t state; /* marker to check if the app has started sucessfully */
int systemd; /* marker to know if we start it with systemd or not */
int post; /* marker to indicate when to start the app */
/*@}*/
}list_elem;
char *name; /**< name of the app to launch */
char *mode; /**< mode in which to launch the app */
char *launch; /**< dbus launch command/address */
app_state_t state; /**< marker to check if the app has started sucessfully */
int systemd; /**< marker to know if we start it with systemd or not */
int post; /**< marker to indicate when to start the app */
} list_elem;

void readlist(int diag);
int activate_sync(const char *mode);
Expand Down
8 changes: 5 additions & 3 deletions src/usb_moded-config.h
Expand Up @@ -85,10 +85,12 @@ char * get_mode_whitelist(void);

int is_roaming_not_allowed(void);

/** Configuration change result
*/
typedef enum set_config_result_t {
SET_CONFIG_ERROR = -1,
SET_CONFIG_UPDATED,
SET_CONFIG_UNCHANGED
SET_CONFIG_ERROR = -1, /**< Value change failed */
SET_CONFIG_UPDATED, /**< Value change succeeded */
SET_CONFIG_UNCHANGED, /**< Value did not change */
} set_config_result_t;

int conf_file_merge(void);
Expand Down
54 changes: 26 additions & 28 deletions src/usb_moded-dyn-config.h
Expand Up @@ -65,36 +65,34 @@ android engineers prefered to have sysfs entries... go figure... */
*/
typedef struct mode_list_elem
{
/*@{ */
char *mode_name; /* mode name */
char *mode_module; /* needed module for given mode */
int appsync; /* requires appsync or not */
int network; /* bring up network or not */
int mass_storage; /* Use mass-storage functions */
char *network_interface; /* Which network interface to bring up if network needs to be enabled */
char *sysfs_path; /* path to set sysfs options */
char *sysfs_value; /* option name/value to write to sysfs */
char *sysfs_reset_value; /* value to reset the the sysfs to default */
char *softconnect; /* value to be written to softconnect interface */
char *softconnect_disconnect; /* value to set on the softconnect interface to disable after disconnect */
char *softconnect_path; /* path for the softconnect */
char *android_extra_sysfs_path; /* path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value; /* static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path2; /* path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value2; /* static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path3; /* path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value3; /* static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path4; /* path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value4; /* static value that never changes that needs to be set by sysfs :( */
char *idProduct; /* product id to assign to a specific profile */
char *idVendorOverride; /* Temporary vendor override for special modes used by odms in testing/manufacturing */
int nat; /* If NAT should be set up in this mode or not */
int dhcp_server; /* if a DHCP server needs to be configured and started or not */
char *mode_name; /**< Mode name */
char *mode_module; /**< Needed module for given mode */
int appsync; /**< Requires appsync or not */
int network; /**< Bring up network or not */
int mass_storage; /**< Use mass-storage functions */
char *network_interface; /**< Which network interface to bring up if network needs to be enabled */
char *sysfs_path; /**< Path to set sysfs options */
char *sysfs_value; /**< Option name/value to write to sysfs */
char *sysfs_reset_value; /**< Value to reset the the sysfs to default */
char *softconnect; /**< Value to be written to softconnect interface */
char *softconnect_disconnect; /**< Value to set on the softconnect interface to disable after disconnect */
char *softconnect_path; /**< Path for the softconnect */
char *android_extra_sysfs_path; /**< Path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value; /**< Static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path2; /**< Path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value2; /**< Static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path3; /**< Path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value3; /**< Static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path4; /**< Path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value4; /**< Static value that never changes that needs to be set by sysfs :( */
char *idProduct; /**< Product id to assign to a specific profile */
char *idVendorOverride; /**< Temporary vendor override for special modes used by odms in testing/manufacturing */
int nat; /**< If NAT should be set up in this mode or not */
int dhcp_server; /**< if a DHCP server needs to be configured and started or not */
#ifdef CONNMAN
char* connman_tethering; /* connman's tethering technology path */
char* connman_tethering; /**< Connman's tethering technology path */
#endif
/*@} */
}mode_list_elem;
} mode_list_elem;

/* diag is used to select a secondary configuration location for diagnostic purposes */
GList *read_mode_list(int diag);
Expand Down
21 changes: 16 additions & 5 deletions src/usb_moded-log.c
Expand Up @@ -65,12 +65,14 @@ static void log_gettime(struct timeval *tv)
timersub(tv, &log_begtime, tv);
}

/**
* Print the logged messages to the selected output
/** Print the logged messages to the selected output
*
* @param lev The wanted log level
* @param fmt The message to be logged
* @param va The stdarg variable list
* @param file Source file name
* @param func Function name
* @param line Line in source file
* @param lev The wanted log level
* @param fmt The message format string
* @param va Arguments for the format string
*/
void log_emit_va(const char *file, const char *func, int line, int lev, const char *fmt, va_list va)
{
Expand Down Expand Up @@ -138,6 +140,15 @@ void log_emit_va(const char *file, const char *func, int line, int lev, const ch
errno = saved;
}

/** Print the logged messages to the selected output
*
* @param file Source file name
* @param func Function name
* @param line Line in source file
* @param lev The wanted log level
* @param fmt The message format string
* @param ... Arguments for the format string
*/
void log_emit_real(const char *file, const char *func, int line, int lev, const char *fmt, ...)
{
va_list va;
Expand Down
19 changes: 8 additions & 11 deletions src/usb_moded.c
Expand Up @@ -65,20 +65,17 @@
# define VERBOSE_WAKELOCKING 0
#endif

/**
* a struct containing all the usb_moded info needed
/** 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;
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 */

Expand Down
4 changes: 4 additions & 0 deletions src/usb_moded.h
Expand Up @@ -43,8 +43,12 @@
#define USB_MODED_LOCKFILE "/var/run/usb_moded.pid"
#define MAX_READ_BUF 512

/** Mode list types
*/
typedef enum mode_list_type_t {
/** All configured modes */
SUPPORTED_MODES_LIST,
/** Configured modes that can be activated */
AVAILABLE_MODES_LIST
} mode_list_type_t;

Expand Down

0 comments on commit b38ec22

Please sign in to comment.