libvirt/src/xen/xs_internal.h

106 lines
4.1 KiB
C
Raw Normal View History

/*
* xs_internal.h: internal API for access to XenStore
*
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
* Copyright (C) 2006, 2010-2011 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_XS_INTERNAL_H__
# define __VIR_XS_INTERNAL_H__
# include "internal.h"
# include "driver.h"
extern struct xenUnifiedDriver xenStoreDriver;
int xenStoreInit (void);
virDrvOpenStatus xenStoreOpen (virConnectPtr conn,
virConnectAuthPtr auth,
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
unsigned int flags);
int xenStoreClose (virConnectPtr conn);
int xenStoreGetDomainInfo (virDomainPtr domain,
virDomainInfoPtr info);
int xenStoreDomainGetState (virDomainPtr domain,
int *state,
int *reason,
unsigned int flags);
int xenStoreNumOfDomains (virConnectPtr conn);
int xenStoreListDomains (virConnectPtr conn,
int *ids,
int maxids);
virDomainPtr xenStoreLookupByName(virConnectPtr conn,
const char *name);
unsigned long xenStoreGetMaxMemory (virDomainPtr domain);
int xenStoreDomainSetMemory (virDomainPtr domain,
unsigned long memory);
unsigned long xenStoreDomainGetMaxMemory(virDomainPtr domain);
int xenStoreDomainShutdown (virDomainPtr domain);
int xenStoreDomainReboot (virDomainPtr domain,
unsigned int flags);
int xenStoreDomainGetVNCPort(virConnectPtr conn,
int domid);
char * xenStoreDomainGetConsolePath(virConnectPtr conn,
int domid);
char * xenStoreDomainGetNetworkID(virConnectPtr conn,
int id,
const char *mac);
char * xenStoreDomainGetDiskID(virConnectPtr conn,
int id,
const char *dev);
char * xenStoreDomainGetPCIID(virConnectPtr conn,
int domid,
const char *bdf);
char * xenStoreDomainGetName(virConnectPtr conn,
int id);
int xenStoreDomainGetUUID(virConnectPtr conn,
int id,
unsigned char *uuid);
typedef int (*xenStoreWatchCallback)(virConnectPtr conn,
const char *path,
const char *token,
void *opaque);
struct _xenStoreWatch {
char *path;
char *token;
xenStoreWatchCallback cb;
void *opaque;
};
typedef struct _xenStoreWatch xenStoreWatch;
typedef xenStoreWatch *xenStoreWatchPtr;
struct _xenStoreWatchList {
unsigned int count;
xenStoreWatchPtr *watches;
};
typedef struct _xenStoreWatchList xenStoreWatchList;
typedef xenStoreWatchList *xenStoreWatchListPtr;
int xenStoreAddWatch(virConnectPtr conn,
const char *path,
const char *token,
xenStoreWatchCallback cb,
void *opaque);
int xenStoreRemoveWatch(virConnectPtr conn,
const char *path,
const char *token);
/* domain events */
int xenStoreDomainIntroduced(virConnectPtr conn,
const char *path,
const char *token,
void *opaque);
int xenStoreDomainReleased(virConnectPtr conn,
const char *path,
const char *token,
void *opaque);
int xenStoreDomainEventEmitted(virDomainEventType evt);
#endif /* __VIR_XS_INTERNAL_H__ */