2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_capabilities.h
|
|
|
|
|
*
|
|
|
|
|
* Adds and removes POSIX capabilities from running containers.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_capabilities_H_
|
|
|
|
|
#define _v1_capabilities_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_capabilities_t v1_capabilities_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_capabilities_t {
|
|
|
|
|
list_t *add; //primitive container
|
|
|
|
|
list_t *drop; //primitive container
|
|
|
|
|
|
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_capabilities_t;
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
__attribute__((deprecated)) v1_capabilities_t *v1_capabilities_create(
|
2020-03-18 17:24:33 +08:00
|
|
|
list_t *add,
|
|
|
|
|
list_t *drop
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_capabilities_free(v1_capabilities_t *v1_capabilities);
|
|
|
|
|
|
|
|
|
|
v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_capabilities_convertToJSON(v1_capabilities_t *v1_capabilities);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_capabilities_H_ */
|
|
|
|
|
|