1 /* 2 * secret_conf.h: internal <secret> XML handling API 3 * 4 * Copyright (C) 2009-2010, 2013-2014, 2016 Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library. If not, see 18 * <http://www.gnu.org/licenses/>. 19 */ 20 21 #pragma once 22 23 #include "internal.h" 24 25 typedef struct _virSecretDef virSecretDef; 26 struct _virSecretDef { 27 bool isephemeral; 28 bool isprivate; 29 unsigned char uuid[VIR_UUID_BUFLEN]; 30 char *description; /* May be NULL */ 31 int usage_type; /* virSecretUsageType */ 32 char *usage_id; /* May be NULL */ 33 }; 34 35 void virSecretDefFree(virSecretDef *def); 36 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSecretDef, virSecretDefFree); 37 38 virSecretDef *virSecretDefParseString(const char *xml, unsigned int flags); 39 virSecretDef *virSecretDefParseFile(const char *filename); 40 char *virSecretDefFormat(const virSecretDef *def); 41 42 #define VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL \ 43 (VIR_CONNECT_LIST_SECRETS_EPHEMERAL | \ 44 VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL) 45 46 #define VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE \ 47 (VIR_CONNECT_LIST_SECRETS_PRIVATE | \ 48 VIR_CONNECT_LIST_SECRETS_NO_PRIVATE) 49 50 #define VIR_CONNECT_LIST_SECRETS_FILTERS_ALL \ 51 (VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL | \ 52 VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE) 53