Fix the lib path
[external/gssdp.git] / libgssdp / gssdp-protocol.h
1 /* 
2  * Copyright (C) 2006, 2007 OpenedHand Ltd.
3  *
4  * Author: Jorn Baayen <jorn@openedhand.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GSSDP_PROTOCOL_H__
23 #define __GSSDP_PROTOCOL_H__
24
25 G_BEGIN_DECLS
26
27 #define SSDP_ADDR "239.255.255.250"
28 #define SSDP_PORT 1900
29 #define SSDP_PORT_STR "1900"
30
31 #define SSDP_DISCOVERY_REQUEST                      \
32         "M-SEARCH * HTTP/1.1\r\n"                   \
33         "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
34         "Man: \"ssdp:discover\"\r\n"                \
35         "ST: %s\r\n"                                \
36         "MX: %d\r\n"                                \
37         "User-Agent: %s GSSDP/" VERSION "\r\n\r\n"  \
38
39 #define SSDP_DISCOVERY_RESPONSE                     \
40         "HTTP/1.1 200 OK\r\n"                       \
41         "Location: %s\r\n"                          \
42         "%s"                                        \
43         "Ext:\r\n"                                  \
44         "USN: %s\r\n"                               \
45         "Server: %s\r\n"                            \
46         "Cache-Control: max-age=%d\r\n"             \
47         "ST: %s\r\n"                                \
48         "Date: %s\r\n"                              \
49         "Content-Length: 0\r\n\r\n"
50
51 #define SSDP_ALIVE_MESSAGE                          \
52         "NOTIFY * HTTP/1.1\r\n"                     \
53         "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
54         "Cache-Control: max-age=%d\r\n"             \
55         "Location: %s\r\n"                          \
56         "%s"                                        \
57         "Server: %s\r\n"                            \
58         "NTS: ssdp:alive\r\n"                       \
59         "NT: %s\r\n"                                \
60         "USN: %s\r\n\r\n"
61
62 #define SSDP_BYEBYE_MESSAGE                         \
63         "NOTIFY * HTTP/1.1\r\n"                     \
64         "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
65         "NTS: ssdp:byebye\r\n"                     \
66         "NT: %s\r\n"                                \
67         "USN: %s\r\n\r\n"
68
69 #define SSDP_SEARCH_METHOD "M-SEARCH"
70 #define GENA_NOTIFY_METHOD "NOTIFY"
71
72 #define SSDP_ALIVE_NTS  "ssdp:alive"
73 #define SSDP_BYEBYE_NTS "ssdp:byebye"
74
75 #define SSDP_DEFAULT_MAX_AGE 1800
76 #define SSDP_DEFAULT_MX      3
77
78 G_END_DECLS
79
80 #endif /* __GSSDP_PROTOCOL_H__ */