[libgovirt] Add OvirtCdrom skeleton
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Add OvirtCdrom skeleton
- Date: Mon, 2 Sep 2013 15:46:17 +0000 (UTC)
commit b44f9f0b6b4ee9bd8d57de4e8034c8995e08d32f
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sat Jun 29 13:01:32 2013 +0200
Add OvirtCdrom skeleton
govirt/Makefile.am | 2 +
govirt/govirt.h | 1 +
govirt/govirt.sym | 2 +
govirt/ovirt-cdrom.c | 43 ++++++++++++++++++++++++++++++++++
govirt/ovirt-cdrom.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 111 insertions(+), 0 deletions(-)
---
diff --git a/govirt/Makefile.am b/govirt/Makefile.am
index 4a57487..0c89ec1 100644
--- a/govirt/Makefile.am
+++ b/govirt/Makefile.am
@@ -16,6 +16,7 @@ libgovirt_ladir = $(includedir)/govirt-1.0/govirt
libgovirt_la_HEADERS = \
govirt.h \
ovirt-api.h \
+ ovirt-cdrom.h \
ovirt-collection.h \
ovirt-error.h \
ovirt-proxy.h \
@@ -43,6 +44,7 @@ noinst_HEADERS = \
libgovirt_la_SOURCES = \
glib-compat.c \
ovirt-api.c \
+ ovirt-cdrom.c \
ovirt-collection.c \
ovirt-error.c \
ovirt-proxy.c \
diff --git a/govirt/govirt.h b/govirt/govirt.h
index 81264d2..a1a7513 100644
--- a/govirt/govirt.h
+++ b/govirt/govirt.h
@@ -24,6 +24,7 @@
#include <govirt/ovirt-enum-types.h>
#include <govirt/ovirt-api.h>
+#include <govirt/ovirt-cdrom.h>
#include <govirt/ovirt-collection.h>
#include <govirt/ovirt-error.h>
#include <govirt/ovirt-proxy.h>
diff --git a/govirt/govirt.sym b/govirt/govirt.sym
index 4faef2c..fad6d2a 100644
--- a/govirt/govirt.sym
+++ b/govirt/govirt.sym
@@ -55,6 +55,8 @@ GOVIRT_0.2.1 {
ovirt_api_get_vms;
ovirt_api_get_storage_domains;
+ ovirt_cdrom_get_type;
+
ovirt_collection_fetch;
ovirt_collection_fetch_async;
ovirt_collection_fetch_finish;
diff --git a/govirt/ovirt-cdrom.c b/govirt/ovirt-cdrom.c
new file mode 100644
index 0000000..3fe7dd9
--- /dev/null
+++ b/govirt/ovirt-cdrom.c
@@ -0,0 +1,43 @@
+/*
+ * ovirt-cdrom.c: oVirt cdrom handling
+ *
+ * Copyright (C) 2013 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, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Christophe Fergeau <cfergeau redhat com>
+ */
+
+#include <config.h>
+#include "ovirt-cdrom.h"
+
+#define OVIRT_CDROM_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), OVIRT_TYPE_CDROM, OvirtCdromPrivate))
+
+struct _OvirtCdromPrivate {
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(OvirtCdrom, ovirt_cdrom, OVIRT_TYPE_RESOURCE);
+
+static void ovirt_cdrom_class_init(OvirtCdromClass *klass)
+{
+ g_type_class_add_private(klass, sizeof(OvirtCdromPrivate));
+}
+
+static void ovirt_cdrom_init(OvirtCdrom *cdrom)
+{
+ cdrom->priv = OVIRT_CDROM_GET_PRIVATE(cdrom);
+}
diff --git a/govirt/ovirt-cdrom.h b/govirt/ovirt-cdrom.h
new file mode 100644
index 0000000..604426e
--- /dev/null
+++ b/govirt/ovirt-cdrom.h
@@ -0,0 +1,63 @@
+/*
+ * ovirt-cdrom.h: oVirt cdrom resource
+ *
+ * Copyright (C) 2012, 2013 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, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Christophe Fergeau <cfergeau redhat com>
+ */
+#ifndef __OVIRT_CDROM_H__
+#define __OVIRT_CDROM_H__
+
+#include <gio/gio.h>
+#include <glib-object.h>
+#include <govirt/ovirt-types.h>
+#include <govirt/ovirt-resource.h>
+
+G_BEGIN_DECLS
+
+#define OVIRT_TYPE_CDROM (ovirt_cdrom_get_type ())
+#define OVIRT_CDROM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OVIRT_TYPE_CDROM, OvirtCdrom))
+#define OVIRT_CDROM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OVIRT_TYPE_CDROM, OvirtCdromClass))
+#define OVIRT_IS_CDROM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OVIRT_TYPE_CDROM))
+#define OVIRT_IS_CDROM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_CDROM))
+#define OVIRT_CDROM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_CDROM, OvirtCdromClass))
+
+typedef struct _OvirtCdrom OvirtCdrom;
+typedef struct _OvirtCdromPrivate OvirtCdromPrivate;
+typedef struct _OvirtCdromClass OvirtCdromClass;
+
+struct _OvirtCdrom
+{
+ OvirtResource parent;
+
+ OvirtCdromPrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _OvirtCdromClass
+{
+ OvirtResourceClass parent_class;
+
+ gpointer padding[20];
+};
+
+GType ovirt_cdrom_get_type(void);
+
+G_END_DECLS
+
+#endif /* __OVIRT_CDROM_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]