
Data Structures | |
| struct | httpd_t |
| struct | httpd_host_t |
| struct | httpd_url_t |
| struct | httpd_client_t |
| struct | http_status_info |
| struct | httpd_file_t |
| struct | httpd_handler_t |
| struct | httpd_redirect_t |
| struct | httpd_stream_t |
Defines | |
| #define | HTTPD_CL_BUFSIZE 10000 |
Enumerations | |
| enum | { HTTPD_CLIENT_RECEIVING, HTTPD_CLIENT_RECEIVE_DONE, HTTPD_CLIENT_SENDING, HTTPD_CLIENT_SEND_DONE, HTTPD_CLIENT_WAITING, HTTPD_CLIENT_DEAD, HTTPD_CLIENT_TLS_HS_IN, HTTPD_CLIENT_TLS_HS_OUT } |
| enum | { HTTPD_CLIENT_FILE, HTTPD_CLIENT_STREAM, HTTPD_CLIENT_BIDIR } |
Functions | |
| static void | httpd_ClientClean (httpd_client_t *cl) |
| static const char * | httpd_MimeFromUrl (const char *psz_url) |
| static const char * | httpd_ReasonFromCode (unsigned i_code) |
| static size_t | httpd_HtmlError (char **body, int code, const char *url) |
| static int | httpd_FileCallBack (httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, const httpd_message_t *query) |
| httpd_file_t * | httpd_FileNew (httpd_host_t *host, const char *psz_url, const char *psz_mime, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl, httpd_file_callback_t pf_fill, httpd_file_sys_t *p_sys) |
| httpd_file_sys_t * | httpd_FileDelete (httpd_file_t *file) |
| static int | httpd_HandlerCallBack (httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, const httpd_message_t *query) |
| httpd_handler_t * | httpd_HandlerNew (httpd_host_t *host, const char *psz_url, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl, httpd_handler_callback_t pf_fill, httpd_handler_sys_t *p_sys) |
| httpd_handler_sys_t * | httpd_HandlerDelete (httpd_handler_t *handler) |
| static int | httpd_RedirectCallBack (httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, const httpd_message_t *query) |
| httpd_redirect_t * | httpd_RedirectNew (httpd_host_t *host, const char *psz_url_dst, const char *psz_url_src) |
| void | httpd_RedirectDelete (httpd_redirect_t *rdir) |
| static int | httpd_StreamCallBack (httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, const httpd_message_t *query) |
| httpd_stream_t * | httpd_StreamNew (httpd_host_t *host, const char *psz_url, const char *psz_mime, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl) |
| int | httpd_StreamHeader (httpd_stream_t *stream, uint8_t *p_data, int i_data) |
| int | httpd_StreamSend (httpd_stream_t *stream, uint8_t *p_data, int i_data) |
| void | httpd_StreamDelete (httpd_stream_t *stream) |
| static void * | httpd_HostThread (void *) |
| httpd_host_t * | httpd_HostNew (vlc_object_t *p_this, const char *psz_host, int i_port) |
| httpd_host_t * | httpd_TLSHostNew (vlc_object_t *p_this, const char *psz_hostname, int i_port, const char *psz_cert, const char *psz_key, const char *psz_ca, const char *psz_crl) |
| void | httpd_HostDelete (httpd_host_t *host) |
| static httpd_url_t * | httpd_UrlNewPrivate (httpd_host_t *host, const char *psz_url, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl, bool b_check) |
| httpd_url_t * | httpd_UrlNew (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_UrlNewUnique (httpd_host_t *host, const char *psz_url, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl) |
| int | httpd_UrlCatch (httpd_url_t *url, int i_msg, httpd_callback_t cb, httpd_callback_sys_t *p_sys) |
| void | httpd_UrlDelete (httpd_url_t *url) |
| static void | httpd_MsgInit (httpd_message_t *msg) |
| static void | httpd_MsgClean (httpd_message_t *msg) |
| const char * | httpd_MsgGet (const httpd_message_t *msg, const char *name) |
| void | httpd_MsgAdd (httpd_message_t *msg, const char *name, const char *psz_value,...) |
| static void | httpd_ClientInit (httpd_client_t *cl, mtime_t now) |
| void | httpd_ClientModeStream (httpd_client_t *cl) |
| void | httpd_ClientModeBidir (httpd_client_t *cl) |
| char * | httpd_ClientIP (const httpd_client_t *cl, char *psz_ip) |
| char * | httpd_ServerIP (const httpd_client_t *cl, char *psz_ip) |
| static httpd_client_t * | httpd_ClientNew (int fd, tls_session_t *p_tls, mtime_t now) |
| static ssize_t | httpd_NetRecv (httpd_client_t *cl, uint8_t *p, size_t i_len) |
| static ssize_t | httpd_NetSend (httpd_client_t *cl, const uint8_t *p, size_t i_len) |
| static void | httpd_ClientRecv (httpd_client_t *cl) |
| static void | httpd_ClientSend (httpd_client_t *cl) |
| static void | httpd_ClientTlsHsIn (httpd_client_t *cl) |
| static void | httpd_ClientTlsHsOut (httpd_client_t *cl) |
Variables | |
| struct { | |
| const char psz_ext [8] | |
| const char * psz_mime | |
| } | http_mime [] |
| static const http_status_info | http_reason [] |
| static const char | psz_fallback_reason [5][16] |
| static const char | psz_object_type [] = "http server" |
| static vlc_mutex_t | httpd_mutex = PTHREAD_MUTEX_INITIALIZER |
| struct { | |
| const char name [16] | |
| int i_type | |
| int i_proto | |
| } | msg_type [] |
| #define HTTPD_CL_BUFSIZE 10000 |
| anonymous enum |
| static void httpd_ClientClean | ( | httpd_client_t * | cl | ) | [static] |
| static void httpd_ClientInit | ( | httpd_client_t * | cl, | |
| mtime_t | now | |||
| ) | [static] |
| char* httpd_ClientIP | ( | const httpd_client_t * | cl, | |
| char * | psz_ip | |||
| ) |
References httpd_client_t::fd, and net_GetSockAddress().
| void httpd_ClientModeBidir | ( | httpd_client_t * | cl | ) |
References httpd_client_t::fd, and net_GetPeerAddress().
| void httpd_ClientModeStream | ( | httpd_client_t * | cl | ) |
References HTTPD_CLIENT_BIDIR, and httpd_client_t::i_mode.
| static httpd_client_t* httpd_ClientNew | ( | int | fd, | |
| tls_session_t * | p_tls, | |||
| mtime_t | now | |||
| ) | [static] |
| static void httpd_ClientRecv | ( | httpd_client_t * | cl | ) | [static] |
References c, httpd_NetRecv(), httpd_client_t::i_buffer, and httpd_client_t::p_buffer.
| static void httpd_ClientSend | ( | httpd_client_t * | cl | ) | [static] |
References httpd_client_t::answer, HTTPD_PROTO_HTTP, httpd_ReasonFromCode(), httpd_client_t::i_buffer, httpd_client_t::i_buffer_size, httpd_message_t::i_name, httpd_message_t::i_proto, httpd_message_t::i_status, httpd_message_t::i_version, httpd_message_t::name, httpd_client_t::p_buffer, and httpd_message_t::value.
| static void httpd_ClientTlsHsIn | ( | httpd_client_t * | cl | ) | [static] |
| static void httpd_ClientTlsHsOut | ( | httpd_client_t * | cl | ) | [static] |
| static int httpd_FileCallBack | ( | httpd_callback_sys_t * | p_sys, | |
| httpd_client_t * | cl, | |||
| httpd_message_t * | answer, | |||
| const httpd_message_t * | query | |||
| ) | [static] |
| httpd_file_sys_t* httpd_FileDelete | ( | httpd_file_t * | file | ) |
| httpd_file_t* httpd_FileNew | ( | httpd_host_t * | host, | |
| const char * | psz_url, | |||
| const char * | psz_mime, | |||
| const char * | psz_user, | |||
| const char * | psz_password, | |||
| const vlc_acl_t * | p_acl, | |||
| httpd_file_callback_t | pf_fill, | |||
| httpd_file_sys_t * | p_sys | |||
| ) |
| static int httpd_HandlerCallBack | ( | httpd_callback_sys_t * | p_sys, | |
| httpd_client_t * | cl, | |||
| httpd_message_t * | answer, | |||
| const httpd_message_t * | query | |||
| ) | [static] |
| httpd_handler_sys_t* httpd_HandlerDelete | ( | httpd_handler_t * | handler | ) |
| httpd_handler_t* httpd_HandlerNew | ( | httpd_host_t * | host, | |
| const char * | psz_url, | |||
| const char * | psz_user, | |||
| const char * | psz_password, | |||
| const vlc_acl_t * | p_acl, | |||
| httpd_handler_callback_t | pf_fill, | |||
| httpd_handler_sys_t * | p_sys | |||
| ) |
| void httpd_HostDelete | ( | httpd_host_t * | host | ) |
| httpd_host_t* httpd_HostNew | ( | vlc_object_t * | p_this, | |
| const char * | psz_host, | |||
| int | i_port | |||
| ) |
References httpd_TLSHostNew().
| static void * httpd_HostThread | ( | void * | data | ) | [static] |
Referenced by httpd_TLSHostNew().
| static size_t httpd_HtmlError | ( | char ** | body, | |
| int | code, | |||
| const char * | url | |||
| ) | [static] |
| static const char* httpd_MimeFromUrl | ( | const char * | psz_url | ) | [static] |
| void httpd_MsgAdd | ( | httpd_message_t * | msg, | |
| const char * | name, | |||
| const char * | psz_value, | |||
| ... | ||||
| ) |
| static void httpd_MsgClean | ( | httpd_message_t * | msg | ) | [static] |
| const char* httpd_MsgGet | ( | const httpd_message_t * | msg, | |
| const char * | name | |||
| ) |
References httpd_message_t::name, strcasecmp(), and httpd_message_t::value.
| static void httpd_MsgInit | ( | httpd_message_t * | msg | ) | [static] |
| static ssize_t httpd_NetRecv | ( | httpd_client_t * | cl, | |
| uint8_t * | p, | |||
| size_t | i_len | |||
| ) | [static] |
Referenced by httpd_ClientRecv().
| static ssize_t httpd_NetSend | ( | httpd_client_t * | cl, | |
| const uint8_t * | p, | |||
| size_t | i_len | |||
| ) | [static] |
| static const char* httpd_ReasonFromCode | ( | unsigned | i_code | ) | [static] |
Referenced by httpd_ClientSend().
| static int httpd_RedirectCallBack | ( | httpd_callback_sys_t * | p_sys, | |
| httpd_client_t * | cl, | |||
| httpd_message_t * | answer, | |||
| const httpd_message_t * | query | |||
| ) | [static] |
References VLC_SUCCESS.
| void httpd_RedirectDelete | ( | httpd_redirect_t * | rdir | ) |
| httpd_redirect_t* httpd_RedirectNew | ( | httpd_host_t * | host, | |
| const char * | psz_url_dst, | |||
| const char * | psz_url_src | |||
| ) |
| char* httpd_ServerIP | ( | const httpd_client_t * | cl, | |
| char * | psz_ip | |||
| ) |
References httpd_client_t::fd.
| static int httpd_StreamCallBack | ( | httpd_callback_sys_t * | p_sys, | |
| httpd_client_t * | cl, | |||
| httpd_message_t * | answer, | |||
| const httpd_message_t * | query | |||
| ) | [static] |
| void httpd_StreamDelete | ( | httpd_stream_t * | stream | ) |
| int httpd_StreamHeader | ( | httpd_stream_t * | stream, | |
| uint8_t * | p_data, | |||
| int | i_data | |||
| ) |
References httpd_stream_t::p_header.
| httpd_stream_t* httpd_StreamNew | ( | httpd_host_t * | host, | |
| const char * | psz_url, | |||
| const char * | psz_mime, | |||
| const char * | psz_user, | |||
| const char * | psz_password, | |||
| const vlc_acl_t * | p_acl | |||
| ) |
References httpd_MimeFromUrl(), HTTPD_MSG_GET, HTTPD_MSG_HEAD, HTTPD_MSG_POST, httpd_StreamCallBack(), httpd_UrlCatch(), httpd_UrlNewUnique(), httpd_stream_t::i_buffer_last_pos, httpd_stream_t::i_buffer_pos, httpd_stream_t::i_buffer_size, httpd_stream_t::i_header, httpd_stream_t::lock, httpd_stream_t::p_buffer, httpd_stream_t::p_header, httpd_stream_t::psz_mime, strdup(), httpd_stream_t::url, and vlc_mutex_init().
| int httpd_StreamSend | ( | httpd_stream_t * | stream, | |
| uint8_t * | p_data, | |||
| int | i_data | |||
| ) |
References VLC_SUCCESS.
| httpd_host_t* httpd_TLSHostNew | ( | vlc_object_t * | p_this, | |
| const char * | psz_hostname, | |||
| int | i_port, | |||
| const char * | psz_cert, | |||
| const char * | psz_key, | |||
| const char * | psz_ca, | |||
| const char * | psz_crl | |||
| ) |
References httpd_host_t::client, httpd_host_t::fds, httpd_t::host, httpd_host_t::httpd, httpd_HostThread(), httpd_host_t::i_client, httpd_t::i_host, httpd_host_t::i_port, httpd_host_t::i_ref, httpd_host_t::i_url, libvlc_priv(), httpd_host_t::lock, msg_Err, msg_Info, net_ListenClose(), net_ListenTCP, httpd_host_t::nfd, vlc_value_t::p_address, libvlc_priv_t::p_httpd, httpd_t::p_libvlc, vlc_object_t::p_libvlc, httpd_host_t::p_tls, httpd_host_t::psz_hostname, strdup(), TAB_APPEND, httpd_host_t::thread, tls_ServerAddCA(), tls_ServerAddCRL(), tls_ServerCreate(), tls_ServerDelete(), httpd_host_t::url, vlc_clone(), vlc_cond_destroy(), vlc_cond_init(), vlc_custom_create, vlc_mutex_destroy(), vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, vlc_object_attach, vlc_object_detach, VLC_OBJECT_GENERIC, vlc_object_release, vlc_object_waitpipe(), VLC_THREAD_PRIORITY_LOW, and httpd_host_t::wait.
| int httpd_UrlCatch | ( | httpd_url_t * | url, | |
| int | i_msg, | |||
| httpd_callback_t | cb, | |||
| httpd_callback_sys_t * | p_sys | |||
| ) |
| void httpd_UrlDelete | ( | httpd_url_t * | url | ) |
| httpd_url_t* httpd_UrlNew | ( | httpd_host_t * | host, | |
| const char * | psz_url, | |||
| const char * | psz_user, | |||
| const char * | psz_password, | |||
| const vlc_acl_t * | p_acl | |||
| ) |
| static httpd_url_t* httpd_UrlNewPrivate | ( | httpd_host_t * | host, | |
| const char * | psz_url, | |||
| const char * | psz_user, | |||
| const char * | psz_password, | |||
| const vlc_acl_t * | p_acl, | |||
| bool | b_check | |||
| ) | [static] |
| 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 | |||
| ) |
struct { ... } http_mime[] [static] |
const http_status_info http_reason[] [static] |
Initial value:
{
{ 200, "OK" },
{ 301, "Moved permanently" },
{ 401, "Unauthorized" },
{ 403, "Forbidden" },
{ 404, "Not found" },
{ 405, "Method not allowed" },
{ 454, "Session not found" },
{ 456, "Header field not valid for resource" },
{ 459, "Aggregate operation not allowed" },
{ 460, "Non-aggregate operation not allowed" },
{ 461, "Unsupported transport" },
{ 500, "Internal server error" },
{ 501, "Not implemented" },
{ 503, "Service unavailable" },
{ 505, "Protocol version not supported" },
{ 551, "Option not supported" },
{ 999, "" }
}
vlc_mutex_t httpd_mutex = PTHREAD_MUTEX_INITIALIZER [static] |
| int i_proto |
Referenced by MMSTUOpen().
| int i_type |
Referenced by __config_ChainParse(), __config_GetType(), __config_LoadCmdLine(), __var_Command(), __var_Type(), ApplicationInformationHandle(), ASF_ReadObject_extended_content_description(), CreateChoicesMenu(), CreateMenuItem(), decode_clut(), decode_segment(), Demux(), DemuxStation(), DemuxVideo(), DroppingController::dropEvent(), EvaluateRPN(), DroppingController::eventFilter(), ConfigControl::GetType(), IsMenuEmpty(), libvlc_media_player_next_chapter(), libvlc_media_player_previous_chapter(), MainLoop(), MP4_BoxFree(), MP4_ReadBox(), MP4_ReadBox_esds(), Mpeg4ReadAudioObjectType(), mvar_InputVarSetNew(), OnMenuEvent(), Open(), OpenCommon(), OpenDll(), OpenFrenchTV(), AbstractController::parseAndCreate(), ParseMPEGBlock(), ParsePicture(), ParseSei(), PMTSetupEsDvbSubtitle(), Preparse(), PrintMsg(), ps_track_fill(), ReadMeta(), Run(), VLCControls::setupVarMenu:forMenuItem:target:var:selector:, VLCControls::setupVarMenuItem:target:var:selector:, WidgetListing::startDrag(), var_OptionParse(), vlc_object_type_from_string(), vlc_osd_slider_type_from_string(), vlclua_libvlc_command(), vlclua_object_find(), vlclua_osd_slider(), vlclua_playlist_sort(), vlclua_var_create(), vlclua_var_get(), vlclua_var_set(), and XdsParse().
struct { ... }
msg_type[] [static] |
| const char name[16] |
Referenced by __config_ChainParse(), __config_LoadCmdLine(), __module_need(), add_meta(), AddDevice(), AddItem(), cmp_entity(), DemuxGenre(), DemuxStation(), EvaluateRPN(), CmdUpdateItem::execute(), VLCOpen::eyetvChanged:, get_volume_info(), ConfigControl::GetName(), VLCEyeTVController::globalNotificationReceived:, input_ControlVarStop(), libvlc_InternalInit(), MacroDo(), VLCMain::manageIntf:, XMLParser::parse(), matroska_segment_c::ParseChapterAtom(), IniFile::parseFile(), PrintObject(), save_data(), ScanCameras(), SetAvailControlsByString(), SSPopN(), stub_getaddrinfo(), VLCControls::toggleVarThread:, vlc_object_get_name(), vlc_plugin_set(), vlc_sdp_Start(), vout_window_New(), XdsDecodeChannel(), XdsDecodeCurrentFuture(), xtag_parse_attribute(), xtag_parse_tag(), and xvmc_check_colorkey_properties().
| const char psz_ext[8] |
const char psz_fallback_reason[5][16] [static] |
Initial value:
{ "Continue", "OK", "Found", "Client error", "Server error" }
| const char* psz_mime |
const char psz_object_type[] = "http server" [static] |
1.5.6