VLC_API void httpd_HostDelete( httpd_host_t * );
/* register a new url */
-VLC_API httpd_url_t * httpd_UrlNewUnique( httpd_host_t *, const char *psz_url, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl ) VLC_USED;
+VLC_API httpd_url_t * httpd_UrlNew( httpd_host_t *, const char *psz_url, const char *psz_user, const char *psz_password ) VLC_USED;
/* register callback on a url */
VLC_API int httpd_UrlCatch( httpd_url_t *, int i_msg, httpd_callback_t, httpd_callback_sys_t * );
/* delete a url */
p_sys->psz_path, psz_name ) <0 )
return NULL;
p_media->p_rtsp_url =
- httpd_UrlNewUnique( p_sys->p_rtsp_host, p_media->psz_rtsp_path, NULL,
- NULL, NULL );
+ httpd_UrlNew( p_sys->p_rtsp_host, p_media->psz_rtsp_path, NULL, NULL );
if( !p_media->p_rtsp_url )
{
}
p_es->p_rtsp_url =
- httpd_UrlNewUnique( p_vod->p_sys->p_rtsp_host, psz_urlc, NULL, NULL,
- NULL );
+ httpd_UrlNew( p_vod->p_sys->p_rtsp_host, psz_urlc, NULL, NULL );
if( !p_es->p_rtsp_url )
{
char *user = var_InheritString(owner, "sout-rtsp-user");
char *pwd = var_InheritString(owner, "sout-rtsp-pwd");
- rtsp->url = httpd_UrlNewUnique( rtsp->host, rtsp->psz_path,
- user, pwd, NULL );
+ rtsp->url = httpd_UrlNew( rtsp->host, rtsp->psz_path, user, pwd );
free(user);
free(pwd);
if( rtsp->url == NULL )
char *user = var_InheritString(rtsp->owner, "sout-rtsp-user");
char *pwd = var_InheritString(rtsp->owner, "sout-rtsp-pwd");
- url = id->url = httpd_UrlNewUnique( rtsp->host, urlbuf, user, pwd, NULL );
+ url = id->url = httpd_UrlNew( rtsp->host, urlbuf, user, pwd );
free( user );
free( pwd );
free( urlbuf );
assert (0);
}
-httpd_url_t *httpd_UrlNewUnique (httpd_host_t *host, const char *url,
- const char *login, const char *password,
- const vlc_acl_t *acl)
+httpd_url_t *httpd_UrlNew (httpd_host_t *host, const char *url,
+ const char *login, const char *password)
{
- (void) host; (void) url; (void) login; (void) password; (void) acl;
+ (void) host; (void) url; (void) login; (void) password;
assert (0);
}
#endif /* !ENABLE_HTTPD */
#endif
static void httpd_ClientClean( httpd_client_t *cl );
+static httpd_url_t *httpd_UrlNewPrivate( httpd_host_t *, const char *,
+ const char *, const char *,
+ const vlc_acl_t * );
/* each host run in his own thread */
struct httpd_host_t
{
httpd_file_t *file = xmalloc( sizeof( httpd_file_t ) );
- if( ( file->url = httpd_UrlNewUnique( host, psz_url, psz_user,
- psz_password, p_acl )
- ) == NULL )
+ file->url = httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password,
+ p_acl );
+ if( file->url == NULL )
{
free( file );
return NULL;
{
httpd_handler_t *handler = xmalloc( sizeof( httpd_handler_t ) );
- if( ( handler->url = httpd_UrlNewUnique( host, psz_url, psz_user,
- psz_password, p_acl )
- ) == NULL )
+ handler->url = httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password,
+ p_acl );
+ if( handler->url == NULL )
{
free( handler );
return NULL;
{
httpd_redirect_t *rdir = xmalloc( sizeof( httpd_redirect_t ) );
- if( !( rdir->url = httpd_UrlNewUnique( host, psz_url_src, NULL, NULL, NULL ) ) )
+ rdir->url = httpd_UrlNew( host, psz_url_src, NULL, NULL );
+ if( rdir->url == NULL )
{
free( rdir );
return NULL;
{
httpd_stream_t *stream = xmalloc( sizeof( httpd_stream_t ) );
- if( ( stream->url = httpd_UrlNewUnique( host, psz_url, psz_user,
- psz_password, p_acl )
- ) == NULL )
+ stream->url = httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password,
+ p_acl );
+ if( stream->url == NULL )
{
free( stream );
return NULL;
return url;
}
-httpd_url_t *httpd_UrlNewUnique( httpd_host_t *host, const char *psz_url,
- const char *psz_user, const char *psz_password,
- const vlc_acl_t *p_acl )
+httpd_url_t *httpd_UrlNew( httpd_host_t *host, const char *psz_url,
+ const char *psz_user, const char *psz_password )
{
- return httpd_UrlNewPrivate( host, psz_url, psz_user,
- psz_password, p_acl );
+ return httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password, NULL );
}
/* register callback on a url */