2006-03-23 15:42:10 +00:00
|
|
|
/*
|
|
|
|
* xs_internal.h: internal API for access to XenStore
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 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__
|
|
|
|
|
2007-08-10 18:25:15 +00:00
|
|
|
#include "internal.h"
|
2008-12-17 21:26:16 +00:00
|
|
|
#include "driver.h"
|
2007-08-10 18:25:15 +00:00
|
|
|
|
Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c, src/proxy_internal.h,
src.xen_internal.c, src/xen_internal.h,
src/xen_unified.c, src/xen_unified.h,
src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h,
src/xs_internal.c, src/xs_internal.h: The interface
between xen_unified.c and its underlying driver now uses
a custom structure (struct xenUnifiedDriver) instead
of reusing virDriver.
* src/xen_unified.c: virDomainLookup* functions in Xen
now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
* src/xs_internal.c: Fix indentation.
2007-07-06 15:11:22 +00:00
|
|
|
extern struct xenUnifiedDriver xenStoreDriver;
|
2007-04-04 14:19:49 +00:00
|
|
|
int xenStoreInit (void);
|
|
|
|
|
2008-12-17 21:26:16 +00:00
|
|
|
virDrvOpenStatus xenStoreOpen (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
virConnectAuthPtr auth,
|
|
|
|
int flags);
|
2006-04-03 13:46:43 +00:00
|
|
|
int xenStoreClose (virConnectPtr conn);
|
|
|
|
int xenStoreGetDomainInfo (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virDomainInfoPtr info);
|
2006-04-03 13:46:43 +00:00
|
|
|
int xenStoreNumOfDomains (virConnectPtr conn);
|
|
|
|
int xenStoreListDomains (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *ids,
|
|
|
|
int maxids);
|
Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c, src/proxy_internal.h,
src.xen_internal.c, src/xen_internal.h,
src/xen_unified.c, src/xen_unified.h,
src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h,
src/xs_internal.c, src/xs_internal.h: The interface
between xen_unified.c and its underlying driver now uses
a custom structure (struct xenUnifiedDriver) instead
of reusing virDriver.
* src/xen_unified.c: virDomainLookup* functions in Xen
now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
* src/xs_internal.c: Fix indentation.
2007-07-06 15:11:22 +00:00
|
|
|
virDomainPtr xenStoreLookupByName(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *name);
|
2006-04-03 13:46:43 +00:00
|
|
|
unsigned long xenStoreGetMaxMemory (virDomainPtr domain);
|
2006-04-13 17:18:49 +00:00
|
|
|
int xenStoreDomainSetMemory (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long memory);
|
2006-04-03 13:46:43 +00:00
|
|
|
unsigned long xenStoreDomainGetMaxMemory(virDomainPtr domain);
|
|
|
|
int xenStoreDomainShutdown (virDomainPtr domain);
|
|
|
|
int xenStoreDomainReboot (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
2006-08-09 15:21:16 +00:00
|
|
|
|
2006-11-07 16:28:16 +00:00
|
|
|
/* those are entry point for the proxy */
|
|
|
|
int xenStoreDomainGetVNCPort(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int domid);
|
2006-11-07 16:28:16 +00:00
|
|
|
char * xenStoreDomainGetConsolePath(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int domid);
|
2006-11-07 16:28:16 +00:00
|
|
|
char * xenStoreDomainGetOSTypeID(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
2006-11-20 16:42:16 +00:00
|
|
|
char * xenStoreDomainGetNetworkID(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id,
|
|
|
|
const char *mac);
|
2007-11-06 11:49:01 +00:00
|
|
|
char * xenStoreDomainGetDiskID(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id,
|
|
|
|
const char *dev);
|
2007-08-10 18:25:15 +00:00
|
|
|
char * xenStoreDomainGetName(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
2008-11-25 10:44:52 +00:00
|
|
|
int xenStoreDomainGetUUID(virConnectPtr conn,
|
|
|
|
int id,
|
|
|
|
unsigned char *uuid);
|
2006-08-08 20:14:40 +00:00
|
|
|
|
2008-11-25 10:44:52 +00:00
|
|
|
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);
|
2006-03-23 15:42:10 +00:00
|
|
|
#endif /* __VIR_XS_INTERNAL_H__ */
|