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

[virt-tools-list] [libosinfo v2 09/11] Document osinfo_install_script_get_product_key_format



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

Document the format of the string returned by this function.
---
 osinfo/osinfo_install_script.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
index 8c4f3e8..54dae64 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -381,6 +381,29 @@ const gchar *osinfo_install_script_get_profile(OsinfoInstallScript *script)
                                          OSINFO_INSTALL_SCRIPT_PROP_PROFILE);
 }
 
+/**
+ * osinfo_install_script_get_product_key_format:
+ *
+ * If this function returns a non-NULL string, it means that the @script
+ * requires you to specify product registration key through #OsinfoInstallConfig
+ * instance passed to script generation methods.
+ *
+ * The returned string specifies the expected format of the product key like this:
+ *
+ * @ - any character
+ * % - alphabet
+ * # - numeric character
+ * $ - alphanumeric character
+ *
+ * All other characters represent themselves.
+ *
+ * For example in case of installer for Microsoft Windows XP, you'll get
+ * "$$$$$-$$$$$-$$$$$-$$$$$-$$$$$". That means a product key consists of 24
+ * alphanumeric characters and 4 '-' characters at (0-based) indices 5, 11, 17
+ * and 23.
+ *
+ * Returns: (transfer none): Product key format mask, or NULL.
+ */
 const gchar *osinfo_install_script_get_product_key_format(OsinfoInstallScript *script)
 {
     return osinfo_entity_get_param_value(OSINFO_ENTITY(script),
-- 
1.8.0


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