summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2015-04-14 12:53:54 +0200
committerKrzysztof Opasiak <k.opasiak@samsung.com>2015-04-27 10:14:26 +0200
commit6ec3444145226aa7145b1930a587dbbf892f919c (patch)
treef01508509e79deee3d570bec2e74ec1d8d12d2a5 /include
parentddb5964c07ecd9f14ca4896af47ed5c85a72558c (diff)
downloadlibusbg-6ec3444145226aa7145b1930a587dbbf892f919c.tar.gz
libusbg-6ec3444145226aa7145b1930a587dbbf892f919c.tar.bz2
libusbg-6ec3444145226aa7145b1930a587dbbf892f919c.zip
libusbg: Add support for mass storage function
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/usbg/usbg.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h
index c15673d..39585fc 100644
--- a/include/usbg/usbg.h
+++ b/include/usbg/usbg.h
@@ -22,6 +22,7 @@
#include <netinet/ether.h>
#include <stdint.h>
#include <limits.h>
+#include <stdbool.h>
#include <stdio.h> /* For FILE * */
#ifdef __cplusplus
@@ -180,6 +181,7 @@ typedef enum
F_RNDIS,
F_PHONET,
F_FFS,
+ F_MASS_STORAGE,
USBG_FUNCTION_TYPE_MAX,
} usbg_function_type;
@@ -221,6 +223,29 @@ typedef struct {
} usbg_f_ffs_attrs;
/**
+ * @typedef usbg_f_ms_attrs
+ * @brief Attributes for mass storage functions
+ */
+typedef struct usbg_f_ms_lun_attrs {
+ int id;
+ bool cdrom;
+ bool ro;
+ bool nofua;
+ bool removable;
+ char *filename;
+} usbg_f_ms_lun_attrs;
+
+/**
+ * @typedef usbg_f_ms_attrs
+ * @brief Attributes for mass storage functions
+ */
+typedef struct {
+ bool stall;
+ int nluns;
+ usbg_f_ms_lun_attrs **luns;
+} usbg_f_ms_attrs;
+
+/**
* @typedef attrs
* @brief Attributes for a given function type
*/
@@ -229,6 +254,7 @@ typedef union {
usbg_f_net_attrs net;
usbg_f_phonet_attrs phonet;
usbg_f_ffs_attrs ffs;
+ usbg_f_ms_attrs ms;
} usbg_f_attrs;
typedef enum {
@@ -236,6 +262,7 @@ typedef enum {
USBG_F_ATTRS_NET,
USBG_F_ATTRS_PHONET,
USBG_F_ATTRS_FFS,
+ USBG_F_ATTRS_MS,
} usbg_f_attrs_type;
typedef struct {