1 | /* MiniDLNA project |
---|
2 | * http://minidlna.sourceforge.net/ |
---|
3 | * |
---|
4 | * MiniDLNA media server |
---|
5 | * Copyright (C) 2008-2009 Justin Maggard |
---|
6 | * |
---|
7 | * This file is part of MiniDLNA. |
---|
8 | * |
---|
9 | * MiniDLNA is free software; you can redistribute it and/or modify |
---|
10 | * it under the terms of the GNU General Public License version 2 as |
---|
11 | * published by the Free Software Foundation. |
---|
12 | * |
---|
13 | * MiniDLNA is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>. |
---|
20 | */ |
---|
21 | #ifndef __UPNPSOAP_H__ |
---|
22 | #define __UPNPSOAP_H__ |
---|
23 | |
---|
24 | #define DEFAULT_RESP_SIZE 131072 |
---|
25 | #define MAX_RESPONSE_SIZE 2097152 |
---|
26 | |
---|
27 | #define CONTENT_DIRECTORY_SCHEMAS \ |
---|
28 | " xmlns:dc=\"http://purl.org/dc/elements/1.1/\"" \ |
---|
29 | " xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\"" \ |
---|
30 | " xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"" |
---|
31 | #define DLNA_NAMESPACE \ |
---|
32 | " xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\"" |
---|
33 | |
---|
34 | struct Response |
---|
35 | { |
---|
36 | struct string_s *str; |
---|
37 | int start; |
---|
38 | int returned; |
---|
39 | int requested; |
---|
40 | int iface; |
---|
41 | uint32_t filter; |
---|
42 | uint32_t flags; |
---|
43 | enum client_types client; |
---|
44 | }; |
---|
45 | |
---|
46 | /* ExecuteSoapAction(): |
---|
47 | * this method executes the requested Soap Action */ |
---|
48 | void |
---|
49 | ExecuteSoapAction(struct upnphttp *, const char *, int); |
---|
50 | |
---|
51 | /* SoapError(): |
---|
52 | * sends a correct SOAP error with an UPNPError code and |
---|
53 | * description */ |
---|
54 | void |
---|
55 | SoapError(struct upnphttp * h, int errCode, const char * errDesc); |
---|
56 | |
---|
57 | #endif |
---|
58 | |
---|