Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / minidlna / utils.h
blob4e06b9d7a78c21e97b4bddd19658354d613e84c9
1 /* Utility functions
3 * Project : minidlna
4 * Website : http://sourceforge.net/projects/minidlna/
5 * Author : Justin Maggard
7 * MiniDLNA media server
8 * Copyright (C) 2008-2009 Justin Maggard
10 * This file is part of MiniDLNA.
12 * MiniDLNA is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * MiniDLNA is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef __UTILS_H__
25 #define __UTILS_H__
27 int
28 strcatf(struct string_s *str, char *fmt, ...);
30 void
31 strncpyt(char *dst, const char *src, size_t len);
33 int
34 ends_with(const char * haystack, const char * needle);
36 char *
37 trim(char *str);
39 char *
40 strstrc(const char *s, const char *p, const char t);
42 char *
43 strcasestrc(const char *s, const char *p, const char t);
45 char *
46 modifyString(char * string, const char * before, const char * after, short like);
48 char *
49 escape_tag(const char *tag, int force_alloc);
51 void
52 strip_ext(char * name);
54 int
55 make_dir(char * path, mode_t mode);
57 unsigned int
58 DJBHash(const char *str, int len);
60 int
61 is_video(const char * file);
63 int
64 is_audio(const char * file);
66 int
67 is_image(const char * file);
69 int
70 is_playlist(const char * file);
72 int
73 is_album_art(const char * name);
75 int
76 resolve_unknown_type(const char * path, enum media_types dir_type);
78 void
79 begin_scan();
81 void
82 end_scan();
84 #endif