2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_container_state.h
|
|
|
|
|
*
|
|
|
|
|
* ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_container_state_H_
|
|
|
|
|
#define _v1_container_state_H_
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "../external/cJSON.h"
|
|
|
|
|
#include "../include/list.h"
|
|
|
|
|
#include "../include/keyValuePair.h"
|
2020-06-20 09:41:15 +08:00
|
|
|
#include "../include/binary.h"
|
|
|
|
|
|
|
|
|
|
typedef struct v1_container_state_t v1_container_state_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_container_state_running.h"
|
|
|
|
|
#include "v1_container_state_terminated.h"
|
|
|
|
|
#include "v1_container_state_waiting.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_container_state_t {
|
|
|
|
|
struct v1_container_state_running_t *running; //model
|
|
|
|
|
struct v1_container_state_terminated_t *terminated; //model
|
|
|
|
|
struct v1_container_state_waiting_t *waiting; //model
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
int _library_owned; // Is the library responsible for freeing this object?
|
2020-03-18 17:24:33 +08:00
|
|
|
} v1_container_state_t;
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
__attribute__((deprecated)) v1_container_state_t *v1_container_state_create(
|
2020-03-18 17:24:33 +08:00
|
|
|
v1_container_state_running_t *running,
|
|
|
|
|
v1_container_state_terminated_t *terminated,
|
|
|
|
|
v1_container_state_waiting_t *waiting
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_container_state_free(v1_container_state_t *v1_container_state);
|
|
|
|
|
|
|
|
|
|
v1_container_state_t *v1_container_state_parseFromJSON(cJSON *v1_container_stateJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_container_state_convertToJSON(v1_container_state_t *v1_container_state);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_container_state_H_ */
|
|
|
|
|
|