|
|
7cfb7a |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
7cfb7a |
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
|
|
|
7cfb7a |
Date: Thu, 13 Jul 2017 16:43:53 -0300
|
|
|
7cfb7a |
Subject: [PATCH] Move resource type definitions to ovirt-types.h
|
|
|
7cfb7a |
|
|
|
7cfb7a |
With recently added ovirt_resource_new* functions, it is now possible to
|
|
|
7cfb7a |
create any type of resource, being only necessary to pass the type as
|
|
|
7cfb7a |
argument.
|
|
|
7cfb7a |
|
|
|
7cfb7a |
In order to avoid interdependencies between objects, we need a common
|
|
|
7cfb7a |
place for definition of the resource types. For instance, it should be
|
|
|
7cfb7a |
possible to access a OvirtHost from a OvirtVm and vice-versa.
|
|
|
7cfb7a |
|
|
|
7cfb7a |
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
|
|
|
7cfb7a |
---
|
|
|
7cfb7a |
govirt/ovirt-api.h | 1 -
|
|
|
7cfb7a |
govirt/ovirt-cdrom.h | 1 -
|
|
|
7cfb7a |
govirt/ovirt-collection.h | 1 -
|
|
|
7cfb7a |
govirt/ovirt-storage-domain.h | 1 -
|
|
|
7cfb7a |
govirt/ovirt-types.h | 7 +++++++
|
|
|
7cfb7a |
govirt/ovirt-vm-display.h | 2 +-
|
|
|
7cfb7a |
govirt/ovirt-vm-pool.h | 1 -
|
|
|
7cfb7a |
govirt/ovirt-vm.h | 1 -
|
|
|
7cfb7a |
8 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-api.h b/govirt/ovirt-api.h
|
|
|
7cfb7a |
index 1bf6c02..d511d70 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-api.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-api.h
|
|
|
7cfb7a |
@@ -37,7 +37,6 @@ G_BEGIN_DECLS
|
|
|
7cfb7a |
#define OVIRT_IS_API_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_API))
|
|
|
7cfb7a |
#define OVIRT_API_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_API, OvirtApiClass))
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtApi OvirtApi;
|
|
|
7cfb7a |
typedef struct _OvirtApiPrivate OvirtApiPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtApiClass OvirtApiClass;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-cdrom.h b/govirt/ovirt-cdrom.h
|
|
|
7cfb7a |
index a268d01..a43d85d 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-cdrom.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-cdrom.h
|
|
|
7cfb7a |
@@ -36,7 +36,6 @@ G_BEGIN_DECLS
|
|
|
7cfb7a |
#define OVIRT_IS_CDROM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_CDROM))
|
|
|
7cfb7a |
#define OVIRT_CDROM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_CDROM, OvirtCdromClass))
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtCdrom OvirtCdrom;
|
|
|
7cfb7a |
typedef struct _OvirtCdromPrivate OvirtCdromPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtCdromClass OvirtCdromClass;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-collection.h b/govirt/ovirt-collection.h
|
|
|
7cfb7a |
index b41d269..af630e1 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-collection.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-collection.h
|
|
|
7cfb7a |
@@ -36,7 +36,6 @@ G_BEGIN_DECLS
|
|
|
7cfb7a |
#define OVIRT_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_COLLECTION))
|
|
|
7cfb7a |
#define OVIRT_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_COLLECTION, OvirtCollectionClass))
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtCollection OvirtCollection;
|
|
|
7cfb7a |
typedef struct _OvirtCollectionPrivate OvirtCollectionPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtCollectionClass OvirtCollectionClass;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-storage-domain.h b/govirt/ovirt-storage-domain.h
|
|
|
7cfb7a |
index 79f1741..dd7b593 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-storage-domain.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-storage-domain.h
|
|
|
7cfb7a |
@@ -61,7 +61,6 @@ typedef enum {
|
|
|
7cfb7a |
OVIRT_STORAGE_DOMAIN_TYPE_IMAGE,
|
|
|
7cfb7a |
} OvirtStorageDomainType;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtStorageDomain OvirtStorageDomain;
|
|
|
7cfb7a |
typedef struct _OvirtStorageDomainPrivate OvirtStorageDomainPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtStorageDomainClass OvirtStorageDomainClass;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-types.h b/govirt/ovirt-types.h
|
|
|
7cfb7a |
index 6e83368..c89521b 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-types.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-types.h
|
|
|
7cfb7a |
@@ -25,7 +25,14 @@
|
|
|
7cfb7a |
|
|
|
7cfb7a |
G_BEGIN_DECLS
|
|
|
7cfb7a |
|
|
|
7cfb7a |
+typedef struct _OvirtApi OvirtApi;
|
|
|
7cfb7a |
+typedef struct _OvirtCdrom OvirtCdrom;
|
|
|
7cfb7a |
+typedef struct _OvirtCollection OvirtCollection;
|
|
|
7cfb7a |
typedef struct _OvirtProxy OvirtProxy;
|
|
|
7cfb7a |
+typedef struct _OvirtStorageDomain OvirtStorageDomain;
|
|
|
7cfb7a |
+typedef struct _OvirtVmDisplay OvirtVmDisplay;
|
|
|
7cfb7a |
+typedef struct _OvirtVmPool OvirtVmPool;
|
|
|
7cfb7a |
+typedef struct _OvirtVm OvirtVm;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
G_END_DECLS
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-vm-display.h b/govirt/ovirt-vm-display.h
|
|
|
7cfb7a |
index 2b8a86d..f7eb310 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-vm-display.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-vm-display.h
|
|
|
7cfb7a |
@@ -23,6 +23,7 @@
|
|
|
7cfb7a |
#define __OVIRT_VM_DISPLAY_H__
|
|
|
7cfb7a |
|
|
|
7cfb7a |
#include <glib-object.h>
|
|
|
7cfb7a |
+#include <govirt/ovirt-types.h>
|
|
|
7cfb7a |
|
|
|
7cfb7a |
G_BEGIN_DECLS
|
|
|
7cfb7a |
|
|
|
7cfb7a |
@@ -33,7 +34,6 @@ G_BEGIN_DECLS
|
|
|
7cfb7a |
#define OVIRT_IS_VM_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_VM_DISPLAY))
|
|
|
7cfb7a |
#define OVIRT_VM_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_VM_DISPLAY, OvirtVmDisplayClass))
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtVmDisplay OvirtVmDisplay;
|
|
|
7cfb7a |
typedef struct _OvirtVmDisplayPrivate OvirtVmDisplayPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtVmDisplayClass OvirtVmDisplayClass;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-vm-pool.h b/govirt/ovirt-vm-pool.h
|
|
|
7cfb7a |
index ee2f55c..10e7be7 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-vm-pool.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-vm-pool.h
|
|
|
7cfb7a |
@@ -35,7 +35,6 @@ G_BEGIN_DECLS
|
|
|
7cfb7a |
#define OVIRT_IS_VM_POOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_VM_POOL))
|
|
|
7cfb7a |
#define OVIRT_VM_POOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_VM_POOL, OvirtVmPoolClass))
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtVmPool OvirtVmPool;
|
|
|
7cfb7a |
typedef struct _OvirtVmPoolPrivate OvirtVmPoolPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtVmPoolClass OvirtVmPoolClass;
|
|
|
7cfb7a |
|
|
|
7cfb7a |
diff --git a/govirt/ovirt-vm.h b/govirt/ovirt-vm.h
|
|
|
7cfb7a |
index 10910e3..1e6c7ad 100644
|
|
|
7cfb7a |
--- a/govirt/ovirt-vm.h
|
|
|
7cfb7a |
+++ b/govirt/ovirt-vm.h
|
|
|
7cfb7a |
@@ -41,7 +41,6 @@ G_BEGIN_DECLS
|
|
|
7cfb7a |
#define OVIRT_IS_VM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_VM))
|
|
|
7cfb7a |
#define OVIRT_VM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_VM, OvirtVmClass))
|
|
|
7cfb7a |
|
|
|
7cfb7a |
-typedef struct _OvirtVm OvirtVm;
|
|
|
7cfb7a |
typedef struct _OvirtVmPrivate OvirtVmPrivate;
|
|
|
7cfb7a |
typedef struct _OvirtVmClass OvirtVmClass;
|
|
|
7cfb7a |
|