summaryrefslogtreecommitdiff
path: root/include/adaptor_api_types.h
blob: e68cb1fa241f7b023389b3726f60097f3518e44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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__ */