summaryrefslogtreecommitdiff
path: root/src/lib/install/include/adaptor/adaptor_api_types.h
diff options
context:
space:
mode:
authorhwajeong.son <hwajeong.son@samsung.com>2018-08-20 13:20:53 +0900
committerhwajeong.son <hwajeong.son@samsung.com>2018-08-20 13:20:53 +0900
commit27763b024648b848430481a929d716038d887952 (patch)
treea5388eec33d3b55cbf75e2e1ea360c32de7de78f /src/lib/install/include/adaptor/adaptor_api_types.h
parent81dc7d90889e619942f34c4a584768b4b3179445 (diff)
downloaddocker-adaptor-submit/tizen_4.0/20180820.062059.tar.gz
docker-adaptor-submit/tizen_4.0/20180820.062059.tar.bz2
docker-adaptor-submit/tizen_4.0/20180820.062059.zip
Signed-off-by: hwajeong.son <hwajeong.son@samsung.com>
Diffstat (limited to 'src/lib/install/include/adaptor/adaptor_api_types.h')
-rw-r--r--src/lib/install/include/adaptor/adaptor_api_types.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/lib/install/include/adaptor/adaptor_api_types.h b/src/lib/install/include/adaptor/adaptor_api_types.h
new file mode 100644
index 0000000..e68cb1f
--- /dev/null
+++ b/src/lib/install/include/adaptor/adaptor_api_types.h
@@ -0,0 +1,66 @@
+/**
+ * @file adaptor_api_types.h
+ * @brief Types of API for dockzen
+
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * This software is the confidential and proprietary information
+ * of Samsung Electronics, Inc. ("Confidential Information"). You
+ * shall not disclose such Confidential Information and shall use
+ * it only in accordance with the terms of the license agreement
+ * you entered into with Samsung.
+ */
+
+#ifndef __ADAPTOR_API_TYPES_H__
+#define __ADAPTOR_API_TYPES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_CONTAINER_NUM (10)
+#define MAX_DISK_NUM (10)
+
+/**
+ * @brief This enum contains dockzen error information
+ *
+ * The adaptor_api_error_e indicates what error is happened
+ *
+ */
+typedef enum {
+ ADAPTOR_API_ERROR_NONE = 0, /**< Successful */
+ ADAPTOR_API_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ ADAPTOR_API_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ ADAPTOR_API_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ ADAPTOR_API_ERROR_NOT_SUPPORTED, /**< Not supported */
+} ADAPTOR_API_error_e;
+
+/**
+ * @struct os_info_s
+ * @brief This struct contains os information
+ */
+typedef struct{
+ char * platformVer;
+ char * baseOSVer;
+ char * dockerVer;
+} os_info_s;
+
+
+/**
+ * @struct disk_info_s
+ * @brief This struct contains disk information
+ */
+typedef struct{
+ int count; /**< the counts of containers info */
+ struct {
+ char * path;
+ int free; /* MB */
+ int total; /* MB */
+ int used; /* MB */
+ int usedpercent; /* divide by 100 to get percentage. (float)disk_info.disk[index].usedpercent/(float)100 */
+ }disk[MAX_DISK_NUM]; /**< Max Count constraint */
+} disk_info_s;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __ADAPTOR_API_TYPES_H__ */