comparison src/metadata.h @ 125:e413158cae13

Add ushare project files.
author naoyan@johnstown.minaminoshima.org
date Sun, 03 Oct 2010 11:35:19 +0900
parents
children 2a9ac5ce2c7e
comparison
equal deleted inserted replaced
124:9c7bc6c0327e 125:e413158cae13
1 /*
2 * metadata.h : GeeXboX uShare CDS Metadata DB header.
3 * Originally developped for the GeeXboX project.
4 * Copyright (C) 2005-2007 Benjamin Zores <ben@geexbox.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21 #ifndef _METADATA_H_
22 #define _METADATA_H_
23
24 #include <upnp/upnp.h>
25 #include <upnp/upnptools.h>
26 #include <stdbool.h>
27 #include <sys/types.h>
28
29 #include "ushare.h"
30 #include "http.h"
31 #include "content.h"
32
33 struct upnp_entry_t {
34 int id;
35 char *fullpath;
36 #ifdef HAVE_DLNA
37 dlna_profile_t *dlna_profile;
38 #endif /* HAVE_DLNA */
39 struct upnp_entry_t *parent;
40 int child_count;
41 struct upnp_entry_t **childs;
42 struct mime_type_t *mime_type;
43 char *title;
44 char *url;
45 off_t size;
46 int fd;
47 };
48
49 typedef struct xml_convert_s {
50 char charac;
51 char *xml;
52 } xml_convert_t;
53
54 void free_metadata_list (struct ushare_t *ut);
55 void build_metadata_list (struct ushare_t *ut);
56 struct upnp_entry_t *upnp_get_entry (struct ushare_t *ut, int id);
57 void upnp_entry_free (struct ushare_t *ut, struct upnp_entry_t *entry);
58 int rb_compare (const void *pa, const void *pb, const void *config);
59
60 #endif /* _METADATA_H_ */