*/
# define VIR_DOMAIN_GUEST_INFO_OS_VARIANT_ID "os.variant-id"
+
+/**
+ * VIR_DOMAIN_GUEST_INFO_TIMEZONE_NAME:
+ *
+ * The name of the timezone as a string.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_GUEST_INFO_TIMEZONE_NAME "timezone.name"
+
+/**
+ * VIR_DOMAIN_GUEST_INFO_TIMEZONE_OFFSET:
+ *
+ * The offset to UTC in seconds as an int.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_GUEST_INFO_TIMEZONE_OFFSET "timezone.offset"
+
/**
* virDomainGuestInfoTypes:
*
* keys.
*
* VIR_DOMAIN_GUEST_INFO_TIMEZONE:
- * Returns information about the timezone within the domain. The typed
- * parameter keys are in this format:
- *
- * "timezone.name" - the name of the timezone as a string
- * "timezone.offset" - the offset to UTC in seconds as an int
+ * Returns information about the timezone within the domain.
+ * The VIR_DOMAIN_GUEST_INFO_TIMEZONE_* constants define the known typed parameter
+ * keys.
*
* VIR_DOMAIN_GUEST_INFO_FILESYSTEM:
* Returns information about the filesystems within the domain. The typed
}
if ((name = virJSONValueObjectGetString(data, "zone")))
- virTypedParamListAddString(list, name, "timezone.name");
+ virTypedParamListAddString(list, name, VIR_DOMAIN_GUEST_INFO_TIMEZONE_NAME);
if ((virJSONValueObjectGetNumberInt(data, "offset", &offset)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
return -1;
}
- virTypedParamListAddInt(list, offset, "timezone.offset");
+ virTypedParamListAddInt(list, offset, VIR_DOMAIN_GUEST_INFO_TIMEZONE_OFFSET);
return 0;
}