[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-glib 01/13] Add GVirConfigDomainController skeleton



---
 libvirt-gconfig/Makefile.am                        |    2 +
 .../libvirt-gconfig-domain-controller.c            |   50 ++++++++++++++++
 .../libvirt-gconfig-domain-controller.h            |   63 ++++++++++++++++++++
 libvirt-gconfig/libvirt-gconfig.h                  |    1 +
 libvirt-gconfig/libvirt-gconfig.sym                |    2 +
 5 files changed, 118 insertions(+)
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-controller.c
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-controller.h

diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
index 181ec57..06b95af 100644
--- a/libvirt-gconfig/Makefile.am
+++ b/libvirt-gconfig/Makefile.am
@@ -20,6 +20,7 @@ GCONFIG_HEADER_FILES = \
 			libvirt-gconfig-domain-chardev-source-spicevmc.h \
 			libvirt-gconfig-domain-clock.h \
 			libvirt-gconfig-domain-console.h \
+			libvirt-gconfig-domain-controller.h \
 			libvirt-gconfig-domain-device.h \
 			libvirt-gconfig-domain-disk.h \
 			libvirt-gconfig-domain-filesys.h \
@@ -73,6 +74,7 @@ GCONFIG_SOURCE_FILES = \
 			libvirt-gconfig-domain-chardev-source-spicevmc.c \
 			libvirt-gconfig-domain-clock.c \
 			libvirt-gconfig-domain-console.c \
+			libvirt-gconfig-domain-controller.c \
 			libvirt-gconfig-domain-device.c \
 			libvirt-gconfig-domain-disk.c \
 			libvirt-gconfig-domain-filesys.c \
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller.c b/libvirt-gconfig/libvirt-gconfig-domain-controller.c
new file mode 100644
index 0000000..3aea5ba
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller.c
@@ -0,0 +1,50 @@
+/*
+ * libvirt-gconfig-domain-controller.c: libvirt domain controller configuration
+ *
+ * Copyright (C) 2012 Red Hat, 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Christophe Fergeau <cfergeau redhat com>
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-private.h"
+
+#define GVIR_CONFIG_DOMAIN_CONTROLLER_GET_PRIVATE(obj)                         \
+        (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER, GVirConfigDomainControllerPrivate))
+
+struct _GVirConfigDomainControllerPrivate
+{
+    gboolean unused;
+};
+
+G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainController, gvir_config_domain_controller, GVIR_CONFIG_TYPE_DOMAIN_DEVICE);
+
+
+static void gvir_config_domain_controller_class_init(GVirConfigDomainControllerClass *klass)
+{
+    g_type_class_add_private(klass, sizeof(GVirConfigDomainControllerPrivate));
+}
+
+
+static void gvir_config_domain_controller_init(GVirConfigDomainController *controller)
+{
+    g_debug("Init GVirConfigDomainController=%p", controller);
+
+    controller->priv = GVIR_CONFIG_DOMAIN_CONTROLLER_GET_PRIVATE(controller);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller.h b/libvirt-gconfig/libvirt-gconfig-domain-controller.h
new file mode 100644
index 0000000..41847c3
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-controller.h
@@ -0,0 +1,63 @@
+/*
+ * libvirt-gconfig-domain-controller.h: libvirt domain controller configuration
+ *
+ * Copyright (C) 2012 Red Hat, 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Christophe Fergeau <cfergeau redhat com>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_DOMAIN_CONTROLLER_H__
+#define __LIBVIRT_GCONFIG_DOMAIN_CONTROLLER_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER            (gvir_config_domain_controller_get_type ())
+#define GVIR_CONFIG_DOMAIN_CONTROLLER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER, GVirConfigDomainController))
+#define GVIR_CONFIG_DOMAIN_CONTROLLER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER, GVirConfigDomainControllerClass))
+#define GVIR_CONFIG_IS_DOMAIN_CONTROLLER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER))
+#define GVIR_CONFIG_IS_DOMAIN_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER))
+#define GVIR_CONFIG_DOMAIN_CONTROLLER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GVIR_CONFIG_TYPE_DOMAIN_CONTROLLER, GVirConfigDomainControllerClass))
+
+typedef struct _GVirConfigDomainController GVirConfigDomainController;
+typedef struct _GVirConfigDomainControllerPrivate GVirConfigDomainControllerPrivate;
+typedef struct _GVirConfigDomainControllerClass GVirConfigDomainControllerClass;
+
+struct _GVirConfigDomainController
+{
+    GVirConfigDomainDevice parent;
+
+    GVirConfigDomainControllerPrivate *priv;
+
+    /* Do not add fields to this struct */
+};
+
+struct _GVirConfigDomainControllerClass
+{
+    GVirConfigDomainDeviceClass parent_class;
+
+    gpointer padding[20];
+};
+
+GType gvir_config_domain_controller_get_type(void);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_DOMAIN_CONTROLLER_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.h b/libvirt-gconfig/libvirt-gconfig.h
index 2fcc4ba..c433060 100644
--- a/libvirt-gconfig/libvirt-gconfig.h
+++ b/libvirt-gconfig/libvirt-gconfig.h
@@ -37,6 +37,7 @@
 #include <libvirt-gconfig/libvirt-gconfig-domain-channel.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-clock.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-console.h>
+#include <libvirt-gconfig/libvirt-gconfig-domain-controller.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-device.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-disk.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-filesys.h>
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 717c3c9..7b590ff 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -69,6 +69,8 @@ LIBVIRT_GCONFIG_0.0.4 {
 	gvir_config_domain_console_set_target_type;
 	gvir_config_domain_console_target_type_get_type;
 
+	gvir_config_domain_controller_get_type;
+
 	gvir_config_domain_device_get_type;
 
 	gvir_config_domain_disk_get_type;
-- 
1.7.9.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]