
Defines | |
| #define | EXTRACT(name, l) |
| #define | ALLOC(l) |
| #define | PRINT(str) |
| #define | PRINTS(str, s) |
Functions | |
| static int | MacroParse (macro_t *m, char *psz_src) |
| static void | MacroClean (macro_t *m) |
| static int | StrToMacroType (const char *name) |
| static void | MacroDo (httpd_file_sys_t *p_args, macro_t *m, char *p_request, int i_request, char **pp_data, int *pi_data, char **pp_dst) |
| static char * | MacroSearch (char *src, char *end, int i_mvlc, bool b_after) |
| void | Execute (httpd_file_sys_t *p_args, char *p_request, int i_request, char **pp_data, int *pi_data, char **pp_dst, const char *_src, const char *_end) |
| This function parses a file for macros. | |
| #define ALLOC | ( | l | ) |
Value:
{ \
int __i__ = *pp_dst - *pp_data; \
*pi_data += (l); \
*pp_data = xrealloc( *pp_data, *pi_data ); \
*pp_dst = (*pp_data) + __i__; \
}
| #define EXTRACT | ( | name, | |||
| l | ) |
| #define PRINTS | ( | str, | |||
| s | ) |
Value:
ALLOC( strlen( str ) + strlen( s ) + 1 ); \ { \ char * psz_cur = *pp_dst; \ *pp_dst += sprintf( *pp_dst, str, s ); \ while( psz_cur && *psz_cur ) \ { \ /* Prevent script injection */ \ if( *psz_cur == '<' ) *psz_cur = '*'; \ if( *psz_cur == '>' ) *psz_cur = '*'; \ psz_cur++ ; \ } \ }
Referenced by MacroDo().
| static void MacroClean | ( | macro_t * | m | ) | [static] |
References macro_t::id, macro_t::param1, and macro_t::param2.
Referenced by Execute(), and MacroSearch().
| static void MacroDo | ( | httpd_file_sys_t * | p_args, | |
| macro_t * | m, | |||
| char * | p_request, | |||
| int | i_request, | |||
| char ** | pp_data, | |||
| int * | pi_data, | |||
| char ** | pp_dst | |||
| ) | [static] |
References AOUT_VOLUME_MAX, AOUT_VOLUME_MIN, aout_VolumeGet, aout_VolumeSet, ARRAY_VAL, asprintf(), atof(), config_GetFloat, config_GetInt, config_GetPsz, config_PutFloat, config_PutInt, config_PutPsz, decode_URI(), EvaluateRPN(), ExtractURIValue(), HandleSeek(), i, playlist_item_t::i_id, playlist_item_array_t::i_size, i_value, macro_t::id, input_GetVout(), input_item_GetURI(), playlist_t::items, libvlc_Quit(), lldiv(), MRLParse(), msg_Dbg, msg_Warn, mvar_AppendNewVar(), mvar_GetValue(), MVLC_ADD, MVLC_CLOSE, MVLC_CONTROL, MVLC_DEL, MVLC_EMPTY, MVLC_FLOAT, MVLC_FULLSCREEN, MVLC_GET, MVLC_INT, MVLC_KEEP, MVLC_MOVE, MVLC_NEXT, MVLC_PAUSE, MVLC_PLAY, MVLC_PREVIOUS, MVLC_RPN, MVLC_SEEK, MVLC_SET, MVLC_SHUTDOWN, MVLC_SORT, MVLC_STACK, MVLC_STOP, MVLC_STRING, MVLC_UNKNOWN, MVLC_VALUE, MVLC_VLM_DEL, MVLC_VLM_LOAD, MVLC_VLM_NEW, MVLC_VLM_PAUSE, MVLC_VLM_PLAY, MVLC_VLM_SAVE, MVLC_VLM_SEEK, MVLC_VLM_SETUP, MVLC_VLM_STOP, MVLC_VOLUME, name, order, ORDER_NORMAL, ORDER_REVERSE, playlist_item_array_t::p_elems, playlist_item_t::p_input, intf_sys_t::p_input, httpd_file_sys_t::p_intf, p_item, intf_thread_t::p_libvlc, intf_sys_t::p_playlist, playlist_t::p_root_onelevel, intf_thread_t::p_sys, p_sys, intf_sys_t::p_vlm, macro_t::param1, macro_t::param2, playlist_AddInput(), PLAYLIST_APPEND, playlist_Clear(), playlist_Control(), playlist_DeleteFromInput(), PLAYLIST_END, playlist_ItemGetById(), PLAYLIST_PAUSE, playlist_Play, playlist_RecursiveNodeSort(), PLAYLIST_SKIP, PLAYLIST_STOP, PLAYLIST_VIEWPLAY, PRINTS, vlm_message_t::psz_name, psz_name, vlm_message_t::psz_value, lldiv_t::quot, lldiv_t::rem, size, SORT_ARTIST, SORT_RANDOM, SORT_TITLE_NODES_FIRST, SSPop(), httpd_file_sys_t::stack, gen_builder::str, strdup(), strlcpy(), StrToMacroType(), TestURIParam(), value, var_SetBool, var_ToggleBool, httpd_file_sys_t::vars, vlc_gc_decref, vlc_object_release, VLC_SUCCESS, vlm_ExecuteCommand(), vlm_MessageDelete(), vlm_New, xmalloc(), and xrealloc().
Referenced by Execute().
| static int MacroParse | ( | macro_t * | m, | |
| char * | psz_src | |||
| ) | [static] |
References EXTRACT, macro_t::id, macro_t::param1, macro_t::param2, src, and strdup().
Referenced by Execute(), and MacroSearch().
| static char* MacroSearch | ( | char * | src, | |
| char * | end, | |||
| int | i_mvlc, | |||
| bool | b_after | |||
| ) | [static] |
References macro_t::id, MacroClean(), MacroParse(), MVLC_END, MVLC_FOREACH, MVLC_IF, and StrToMacroType().
Referenced by Execute().
| static int StrToMacroType | ( | const char * | name | ) | [static] |
References i, MVLC_UNKNOWN, psz_name, and StrToMacroTypeTab.
Referenced by Execute(), MacroDo(), and MacroSearch().
1.5.6