annotate src/metadata.h @ 176:2ae60285f383

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