On 9/19/22 9:09 AM, Peter Krempa wrote:
+{
+ qemuNbdkitCaps *nbdkit = QEMU_NBDKIT_CAPS(object);
+
+ g_clear_pointer(&nbdkit->path, g_free);
+ g_clear_pointer(&nbdkit->version, g_free);
+ g_clear_pointer(&nbdkit->flags, virBitmapFree);
+
+ G_OBJECT_CLASS(qemu_nbdkit_caps_parent_class)->finalize(object);
+}
+
+
+void qemu_nbdkit_caps_init(qemuNbdkitCaps *caps)
Same here and also inconsistent capitalization format.
regarding the capitalization format, this is the implementation of a
function that is declared by G_DEFINE_TYPE, so it needs to be formatted
this way.
+
+typedef struct _qemuNbdkitCaps qemuNbdkitCaps;
+
+typedef enum {
You should go for the same markers you have when implementing the enum.
I'm afraid I can't quite figure out what you're trying to suggest here.
+ QEMU_NBDKIT_CAPS_PLUGIN_CURL,
+ QEMU_NBDKIT_CAPS_PLUGIN_SSH,
+ QEMU_NBDKIT_CAPS_FILTER_READAHEAD,
+ QEMU_NBDKIT_CAPS_LAST,
+} qemuNbdkitCapsFlags;
+
+VIR_ENUM_DECL(qemuNbdkitCaps);
+
+qemuNbdkitCaps* qemuQueryNbdkitCaps(void);
+
+qemuNbdkitCaps* qemuNbdkitCapsNew(const char *path);
+
+bool qemuNbdkitCapsGet(qemuNbdkitCaps *nbdkitCaps, qemuNbdkitCapsFlags flag);
+
+void qemuNbdkitCapsSet(qemuNbdkitCaps *nbdkitCaps, qemuNbdkitCapsFlags flag);
Please use the modern header formatting style (same as the function
headers in the .c file).
+
+#define QEMU_TYPE_NBDKIT_CAPS qemu_nbdkit_caps_get_type()
+G_DECLARE_FINAL_TYPE(qemuNbdkitCaps, qemu_nbdkit_caps, QEMU, NBDKIT_CAPS,
GObject);
--
2.37.1