2014-09-11 16:24:03 +00:00
|
|
|
/*
|
|
|
|
* parallels_sdk.h: core driver functions for managing
|
|
|
|
* Parallels Cloud Server hosts
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Parallels, Inc.
|
|
|
|
*
|
|
|
|
* 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, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <Parallels.h>
|
|
|
|
|
|
|
|
#include "parallels_utils.h"
|
|
|
|
|
|
|
|
int prlsdkInit(parallelsConnPtr privconn);
|
|
|
|
void prlsdkDeinit(void);
|
|
|
|
int prlsdkConnect(parallelsConnPtr privconn);
|
|
|
|
void prlsdkDisconnect(parallelsConnPtr privconn);
|
2014-12-01 15:38:48 +00:00
|
|
|
int
|
|
|
|
prlsdkLoadDomains(parallelsConnPtr privconn);
|
|
|
|
virDomainObjPtr
|
|
|
|
prlsdkAddDomain(parallelsConnPtr privconn, const unsigned char *uuid);
|
2014-12-01 15:38:54 +00:00
|
|
|
int prlsdkUpdateDomain(parallelsConnPtr privconn, virDomainObjPtr dom);
|
2014-12-01 15:38:50 +00:00
|
|
|
int prlsdkSubscribeToPCSEvents(parallelsConnPtr privconn);
|
|
|
|
void prlsdkUnsubscribeFromPCSEvents(parallelsConnPtr privconn);
|
2015-04-07 20:35:00 +00:00
|
|
|
PRL_RESULT prlsdkStart(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
|
|
|
PRL_RESULT prlsdkKill(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
|
|
|
PRL_RESULT prlsdkStop(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
|
|
|
PRL_RESULT prlsdkPause(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
|
|
|
PRL_RESULT prlsdkResume(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
2015-04-07 20:35:02 +00:00
|
|
|
PRL_RESULT prlsdkSuspend(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
2014-12-01 15:38:51 +00:00
|
|
|
|
2014-12-01 15:39:01 +00:00
|
|
|
typedef PRL_RESULT (*prlsdkChangeStateFunc)(parallelsConnPtr privconn, PRL_HANDLE sdkdom);
|
2014-12-01 15:38:51 +00:00
|
|
|
int
|
|
|
|
prlsdkDomainChangeState(virDomainPtr domain,
|
|
|
|
prlsdkChangeStateFunc chstate);
|
2014-12-01 15:38:52 +00:00
|
|
|
int
|
2015-04-07 20:35:01 +00:00
|
|
|
prlsdkDomainChangeStateLocked(parallelsConnPtr privconn,
|
|
|
|
virDomainObjPtr dom,
|
|
|
|
prlsdkChangeStateFunc chstate);
|
|
|
|
int
|
2014-12-01 15:38:52 +00:00
|
|
|
prlsdkApplyConfig(virConnectPtr conn,
|
|
|
|
virDomainObjPtr dom,
|
|
|
|
virDomainDefPtr new);
|
2014-12-01 15:38:53 +00:00
|
|
|
int prlsdkCreateVm(virConnectPtr conn, virDomainDefPtr def);
|
|
|
|
int prlsdkCreateCt(virConnectPtr conn, virDomainDefPtr def);
|
2014-12-01 15:38:58 +00:00
|
|
|
int
|
|
|
|
prlsdkUnregisterDomain(parallelsConnPtr privconn, virDomainObjPtr dom);
|
2015-04-07 20:35:02 +00:00
|
|
|
int
|
|
|
|
prlsdkDomainManagedSaveRemove(parallelsConnPtr privconn, virDomainObjPtr dom);
|