2 * driver-secret.h: entry points for secret drivers
4 * Copyright (C) 2006-2014 Red Hat, Inc.
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.
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.
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/>.
23 #ifndef __VIR_DRIVER_H_INCLUDES___
24 # error "Don't include this file directly, only use driver.h"
28 /* This getValue call is inside libvirt, override the "private" flag.
29 This flag cannot be set by outside callers. */
30 VIR_SECRET_GET_VALUE_INTERNAL_CALL
= 1 << 0,
34 (*virDrvSecretLookupByUUID
)(virConnectPtr conn
,
35 const unsigned char *uuid
);
38 (*virDrvSecretLookupByUsage
)(virConnectPtr conn
,
43 (*virDrvSecretDefineXML
)(virConnectPtr conn
,
48 (*virDrvSecretGetXMLDesc
)(virSecretPtr secret
,
52 (*virDrvSecretSetValue
)(virSecretPtr secret
,
53 const unsigned char *value
,
57 typedef unsigned char *
58 (*virDrvSecretGetValue
)(virSecretPtr secret
,
61 unsigned int internalFlags
);
64 (*virDrvSecretUndefine
)(virSecretPtr secret
);
67 (*virDrvConnectNumOfSecrets
)(virConnectPtr conn
);
70 (*virDrvConnectListSecrets
)(virConnectPtr conn
,
75 (*virDrvConnectListAllSecrets
)(virConnectPtr conn
,
76 virSecretPtr
**secrets
,
80 (*virDrvConnectSecretEventRegisterAny
)(virConnectPtr conn
,
83 virConnectSecretEventGenericCallback cb
,
85 virFreeCallback freecb
);
88 (*virDrvConnectSecretEventDeregisterAny
)(virConnectPtr conn
,
91 typedef struct _virSecretDriver virSecretDriver
;
92 typedef virSecretDriver
*virSecretDriverPtr
;
97 * Structure associated to a driver for storing secrets, defining the various
98 * entry points for it.
100 struct _virSecretDriver
{
101 const char *name
; /* the name of the driver */
102 virDrvConnectNumOfSecrets connectNumOfSecrets
;
103 virDrvConnectListSecrets connectListSecrets
;
104 virDrvConnectListAllSecrets connectListAllSecrets
;
105 virDrvSecretLookupByUUID secretLookupByUUID
;
106 virDrvSecretLookupByUsage secretLookupByUsage
;
107 virDrvSecretDefineXML secretDefineXML
;
108 virDrvSecretGetXMLDesc secretGetXMLDesc
;
109 virDrvSecretSetValue secretSetValue
;
110 virDrvSecretGetValue secretGetValue
;
111 virDrvSecretUndefine secretUndefine
;
112 virDrvConnectSecretEventRegisterAny connectSecretEventRegisterAny
;
113 virDrvConnectSecretEventDeregisterAny connectSecretEventDeregisterAny
;