+ if (vasprintf (&text, fmt, ap) != -1)
+ {
+ dialog_fatal_t dialog = { title, text, modal, };
+ var_SetAddress (provider, "dialog-fatal", &dialog);
+ free (text);
+ }
+ vlc_object_release (provider);
+}
+
+#undef dialog_Login
+/**
+ * Requests a username and password through the user interface.
+ * @param obj the VLC object requesting credential informations
+ * @param username a pointer to the specified username [OUT]
+ * @param password a pointer to the specified password [OUT]
+ * @param title title for the dialog
+ * @param text text for the dialog
+ * @return Nothing. If a user name resp. a password was specified,
+ * it will be returned as a heap-allocated character array
+ * into the username resp password pointer. Those must be freed with free().
+ * Otherwise *username resp *password will be NULL.
+ */
+void dialog_Login (vlc_object_t *obj, char **username, char **password,
+ const char *title, const char *text)
+{
+ assert ((username != NULL) && (password != NULL));
+
+ *username = *password = NULL;
+ if (obj->i_flags & OBJECT_FLAGS_NOINTERACT)
+ return;
+
+ vlc_object_t *provider = dialog_GetProvider (obj);
+ if (provider == NULL)