Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c512b811
Commit
c512b811
authored
Jan 18, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog: add dialog_vaLogin (see #16404)
parent
7e421dca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
19 deletions
+33
-19
include/vlc_dialog.h
include/vlc_dialog.h
+5
-0
src/interface/dialog.c
src/interface/dialog.c
+27
-19
src/libvlccore.sym
src/libvlccore.sym
+1
-0
No files found.
include/vlc_dialog.h
View file @
c512b811
...
...
@@ -83,6 +83,11 @@ VLC_API void dialog_Login(vlc_object_t *, const char *, char **, char **, bool *
#define dialog_Login(o, u, p, s, t, v, w, ...) \
dialog_Login(VLC_OBJECT(o), u, p, s, t, v, w, __VA_ARGS__)
VLC_API
void
dialog_vaLogin
(
vlc_object_t
*
,
const
char
*
,
char
**
,
char
**
,
bool
*
,
const
char
*
,
const
char
*
,
va_list
args
);
#define dialog_vaLogin(o, u, p, s, t, v, w, x) \
dialog_vaLogin(VLC_OBJECT(o), u, p, s, t, v, w, x)
/**
* A question dialog.
*/
...
...
src/interface/dialog.c
View file @
c512b811
...
...
@@ -128,22 +128,10 @@ void dialog_VFatal (vlc_object_t *obj, bool modal, const char *title,
vlc_object_release
(
provider
);
}
#undef dialog_Login
/**
* Requests a username and password through the user interface.
* @param obj the VLC object requesting credential information
* @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 fmt format string for the message in 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
,
const
char
*
default_username
,
char
**
username
,
char
**
password
,
bool
*
store
,
const
char
*
title
,
const
char
*
fmt
,
...)
#undef dialog_vaLogin
void
dialog_vaLogin
(
vlc_object_t
*
obj
,
const
char
*
default_username
,
char
**
username
,
char
**
password
,
bool
*
store
,
const
char
*
title
,
const
char
*
fmt
,
va_list
ap
)
{
assert
((
username
!=
NULL
)
&&
(
password
!=
NULL
));
...
...
@@ -156,9 +144,7 @@ void dialog_Login (vlc_object_t *obj, const char *default_username,
return
;
char
*
text
;
va_list
ap
;
va_start
(
ap
,
fmt
);
if
(
vasprintf
(
&
text
,
fmt
,
ap
)
!=
-
1
)
{
dialog_login_t
dialog
=
{
title
,
text
,
default_username
,
username
,
...
...
@@ -166,10 +152,32 @@ void dialog_Login (vlc_object_t *obj, const char *default_username,
var_SetAddress
(
provider
,
"dialog-login"
,
&
dialog
);
free
(
text
);
}
va_end
(
ap
);
vlc_object_release
(
provider
);
}
#undef dialog_Login
/**
* Requests a username and password through the user interface.
* @param obj the VLC object requesting credential information
* @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 fmt format string for the message in 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
,
const
char
*
default_username
,
char
**
username
,
char
**
password
,
bool
*
store
,
const
char
*
title
,
const
char
*
fmt
,
...)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
dialog_vaLogin
(
obj
,
default_username
,
username
,
password
,
store
,
title
,
fmt
,
ap
);
va_end
(
ap
);
}
#undef dialog_Question
/**
...
...
src/libvlccore.sym
View file @
c512b811
...
...
@@ -96,6 +96,7 @@ demux_vaControl
demux_vaControlHelper
dialog_ExtensionUpdate
dialog_Login
dialog_vaLogin
dialog_ProgressCancelled
dialog_ProgressCreate
dialog_ProgressDestroy
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment