annotate src/services.h @ 177:1d6674183e76

Fix problem: If do not specify DLNA, will not call pthread_join(stream_thread,)
author Naoya OYAMA <naoya.oyama@gmail.com>
date Wed, 07 Nov 2012 22:54:19 +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 * services.h : GeeXboX uShare UPnP services handler 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 * Parts of the code are originated from GMediaServer from Oskar Liljeblad.
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
5 * Copyright (C) 2005-2007 Benjamin Zores <ben@geexbox.org>
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
6 *
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
8 * 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
9 * the Free Software Foundation; either version 2 of the License, or
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
10 * (at your option) any later version.
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
11 *
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
15 * GNU Library General Public License for more details.
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
16 *
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
17 * 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
18 * with this program; if not, write to the Free Software Foundation,
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
22 #ifndef _SERVICES_H_
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
23 #define _SERVICES_H_
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
24
136
2a9ac5ce2c7e Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
25 #include <upnp.h>
2a9ac5ce2c7e Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
26 #include <upnptools.h>
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
27 #include "ushare.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 struct service_action_t {
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
30 char *name;
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
31 bool (*function) (struct action_event_t *);
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
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
34 struct service_t {
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
35 char *id;
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
36 char *type;
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
37 struct service_action_t *actions;
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
38 };
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
39
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
40 #define SERVICE_CONTENT_TYPE "text/xml"
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
41
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
42 bool find_service_action (struct Upnp_Action_Request *request,
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
43 struct service_t **service,
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
44 struct service_action_t **action);
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
45
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
46 bool upnp_add_response (struct action_event_t *event,
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
47 char *key, const char *value);
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 char * upnp_get_string (struct Upnp_Action_Request *request, const char *key);
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
50
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
51 int upnp_get_ui4 (struct Upnp_Action_Request *request, const char *key);
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
52
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
53 #endif /* _SERVICES_H_ */