1 | /* Utility functions |
---|
2 | * |
---|
3 | * Project : minidlna |
---|
4 | * Website : http://sourceforge.net/projects/minidlna/ |
---|
5 | * Author : Justin Maggard |
---|
6 | * |
---|
7 | * MiniDLNA media server |
---|
8 | * Copyright (C) 2008-2009 Justin Maggard |
---|
9 | * |
---|
10 | * This file is part of MiniDLNA. |
---|
11 | * |
---|
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. |
---|
15 | * |
---|
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. |
---|
20 | * |
---|
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/>. |
---|
23 | */ |
---|
24 | #ifndef __UTILS_H__ |
---|
25 | #define __UTILS_H__ |
---|
26 | |
---|
27 | int |
---|
28 | strcatf(struct string_s *str, char *fmt, ...); |
---|
29 | |
---|
30 | int |
---|
31 | ends_with(const char * haystack, const char * needle); |
---|
32 | |
---|
33 | char * |
---|
34 | trim(char *str); |
---|
35 | |
---|
36 | char * |
---|
37 | strstrc(const char *s, const char *p, const char t); |
---|
38 | |
---|
39 | char * |
---|
40 | modifyString(char * string, const char * before, const char * after, short like); |
---|
41 | |
---|
42 | char * |
---|
43 | escape_tag(const char *tag, int force_alloc); |
---|
44 | |
---|
45 | void |
---|
46 | strip_ext(char * name); |
---|
47 | |
---|
48 | int |
---|
49 | make_dir(char * path, mode_t mode); |
---|
50 | |
---|
51 | int |
---|
52 | is_video(const char * file); |
---|
53 | |
---|
54 | int |
---|
55 | is_audio(const char * file); |
---|
56 | |
---|
57 | int |
---|
58 | is_image(const char * file); |
---|
59 | |
---|
60 | int |
---|
61 | is_playlist(const char * file); |
---|
62 | |
---|
63 | int |
---|
64 | is_album_art(const char * name); |
---|
65 | |
---|
66 | int |
---|
67 | resolve_unknown_type(const char * path, enum media_types dir_type); |
---|
68 | |
---|
69 | #endif |
---|