2007-02-14 01:40:09 +00:00
/*
* driver . h : core driver methods for managing qemu guests
*
* Copyright ( C ) 2006 , 2007 Red Hat , Inc .
* Copyright ( C ) 2006 Daniel P . Berrange
*
* This library is free software ; you can redistribute it and / or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version .
*
* This library is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* Lesser General Public License for more details .
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library ; if not , write to the Free Software
* Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*
* Author : Daniel P . Berrange < berrange @ redhat . com >
*/
# ifndef QEMUD_DRIVER_H
# define QEMUD_DRIVER_H
# include "internal.h"
2007-06-26 22:13:21 +00:00
# include "conf.h"
2007-02-14 01:40:09 +00:00
2007-06-26 22:13:21 +00:00
int qemudStartVMDaemon ( struct qemud_driver * driver ,
2007-06-26 20:41:25 +00:00
struct qemud_vm * vm ) ;
2007-06-26 22:13:21 +00:00
int qemudShutdownVMDaemon ( struct qemud_driver * driver ,
2007-06-26 20:41:25 +00:00
struct qemud_vm * vm ) ;
2007-06-26 22:13:21 +00:00
int qemudStartNetworkDaemon ( struct qemud_driver * driver ,
2007-06-26 20:41:25 +00:00
struct qemud_network * network ) ;
2007-06-26 22:13:21 +00:00
int qemudShutdownNetworkDaemon ( struct qemud_driver * driver ,
2007-06-26 20:41:25 +00:00
struct qemud_network * network ) ;
2007-06-26 22:13:21 +00:00
int qemudStartup ( void ) ;
void qemudReload ( void ) ;
void qemudShutdown ( void ) ;
2007-02-14 01:40:09 +00:00
2007-06-26 19:49:50 +00:00
int qemudGetNodeInfo ( unsigned int * memory ,
char * cpuModel , int cpuModelLength ,
unsigned int * cpus , unsigned int * mhz ,
unsigned int * nodes , unsigned int * sockets ,
unsigned int * cores , unsigned int * threads ) ;
2007-06-26 22:13:21 +00:00
char * qemudGetCapabilities ( struct qemud_driver * driver ) ;
int qemudMonitorCommand ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
struct qemud_vm * vm ,
const char * cmd ,
char * * reply ) ;
2007-06-26 22:13:21 +00:00
int qemudGetVersion ( struct qemud_driver * driver ) ;
int qemudListDomains ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
int * ids ,
int nids ) ;
2007-06-26 22:13:21 +00:00
int qemudNumDomains ( struct qemud_driver * driver ) ;
struct qemud_vm * qemudDomainCreate ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
const char * xml ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainSuspend ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
int id ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainResume ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
int id ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainDestroy ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
int id ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainGetInfo ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
const unsigned char * uuid ,
int * runstate ,
unsigned long long * cputime ,
unsigned long * maxmem ,
unsigned long * memory ,
unsigned int * nrVirtCpu ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainSave ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
int id ,
const char * path ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainRestore ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
const char * path ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainDumpXML ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
const unsigned char * uuid ,
char * xml ,
int xmllen ) ;
2007-06-26 22:13:21 +00:00
int qemudListDefinedDomains ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
char * const * names ,
int nnames ) ;
2007-06-26 22:13:21 +00:00
int qemudNumDefinedDomains ( struct qemud_driver * driver ) ;
struct qemud_vm * qemudDomainStart ( struct qemud_driver * driver ,
2007-02-23 08:41:23 +00:00
const unsigned char * uuid ) ;
2007-06-26 22:13:21 +00:00
struct qemud_vm * qemudDomainDefine ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
const char * xml ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainUndefine ( struct qemud_driver * driver ,
2007-02-14 01:40:09 +00:00
const unsigned char * uuid ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainGetAutostart ( struct qemud_driver * driver ,
2007-02-23 09:03:25 +00:00
const unsigned char * uuid ,
int * autostart ) ;
2007-06-26 22:13:21 +00:00
int qemudDomainSetAutostart ( struct qemud_driver * driver ,
2007-02-23 09:03:25 +00:00
const unsigned char * uuid ,
int autostart ) ;
2007-02-14 01:40:09 +00:00
2007-02-14 15:54:10 +00:00
2007-06-26 22:13:21 +00:00
int qemudNumNetworks ( struct qemud_driver * driver ) ;
int qemudListNetworks ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
char * const * names ,
int nnames ) ;
2007-06-26 22:13:21 +00:00
int qemudNumDefinedNetworks ( struct qemud_driver * driver ) ;
int qemudListDefinedNetworks ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
char * const * names ,
int nnames ) ;
2007-06-26 22:13:21 +00:00
struct qemud_network * qemudNetworkCreate ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
const char * xml ) ;
2007-06-26 22:13:21 +00:00
struct qemud_network * qemudNetworkDefine ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
const char * xml ) ;
2007-06-26 22:13:21 +00:00
struct qemud_network * qemudNetworkStart ( struct qemud_driver * driver ,
2007-02-23 08:41:23 +00:00
const unsigned char * uuid ) ;
2007-06-26 22:13:21 +00:00
int qemudNetworkUndefine ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
const unsigned char * uuid ) ;
2007-06-26 22:13:21 +00:00
int qemudNetworkDestroy ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
const unsigned char * uuid ) ;
2007-06-26 22:13:21 +00:00
int qemudNetworkDumpXML ( struct qemud_driver * driver ,
2007-02-14 15:54:10 +00:00
const unsigned char * uuid ,
char * xml ,
int xmllen ) ;
2007-06-26 22:13:21 +00:00
int qemudNetworkGetBridgeName ( struct qemud_driver * driver ,
2007-02-14 16:20:38 +00:00
const unsigned char * uuid ,
char * ifname ,
int ifnamelen ) ;
2007-06-26 22:13:21 +00:00
int qemudNetworkGetAutostart ( struct qemud_driver * driver ,
2007-02-23 09:03:25 +00:00
const unsigned char * uuid ,
int * autostart ) ;
2007-06-26 22:13:21 +00:00
int qemudNetworkSetAutostart ( struct qemud_driver * driver ,
2007-02-23 09:03:25 +00:00
const unsigned char * uuid ,
int autostart ) ;
2007-02-14 15:54:10 +00:00
2007-02-14 01:40:09 +00:00
# endif
/*
* Local variables :
* indent - tabs - mode : nil
* c - indent - level : 4
* c - basic - offset : 4
* tab - width : 4
* End :
*/