Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / libosip2 / include / osipparser2 / osip_const.h
1 /*
2   The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)
3   Copyright (C) 2001  Aymeric MOIZARD jack@atosc.org
4   
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9   
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14   
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 */
19
20
21 #ifndef _OSIP_CONST_H_
22 #define _OSIP_CONST_H_
23
24 #ifdef ENABLE_MPATROL
25 #include <mpatrol.h>
26 #endif
27
28 #define CRLF "\r\n\0"
29 #define CR   "\r\0"
30 #define LF   "\n\0"
31 #define SP   " \0"
32
33
34 #define ACCEPT                  "accept"
35 #define ACCEPT_ENCODING         "accept-encoding"
36 #define ACCEPT_LANGUAGE         "accept-language"
37 #define ALERT_INFO              "alert-info"
38 #define ALLOW                   "allow"
39 #define AUTHENTICATION_INFO     "authentication-info"
40 #define AUTHORIZATION           "authorization"
41 #define CALL_ID                 "call-id"
42 #define CALL_ID_SHORT           "i"
43 #define CALL_INFO               "call-info"
44 #define CONTACT                 "contact"
45 #define CONTACT_SHORT           "m"
46 #define CONTENT_DISPOSITION     "content-disposition"
47 #define CONTENT_ENCODING_SHORT  "e"
48 #define CONTENT_ENCODING        "content-encoding"
49 #define CONTENT_LANGUAGE        "content-language"
50 #define CONTENT_LENGTH_SHORT    "l"
51 #define CONTENT_LENGTH          "content-length"
52 #define CONTENT_TYPE_SHORT      "c"
53 #define CONTENT_TYPE            "content-type"
54 #define CSEQ                    "cseq"
55 #define SIPDATE                 "date"
56 #define ERROR_INFO              "error-info"
57 #define EXPIRES                 "expires"
58 #define FROM                    "from"
59 #define FROM_SHORT              "f"
60 #define IN_REPLY_TO             "in-reply-to"
61 #define MAX_FORWARDS            "max-forwards"
62 #define MIME_VERSION            "mime-version"
63 #define MIN_EXPIRES             "min-expires"
64 #define ORGANIZATION            "organization"
65 #define PRIORITY                "priority"
66 #define PROXY_AUTHENTICATE      "proxy-authenticate"
67 #define PROXY_AUTHORIZATION     "proxy-authorization"
68 #define PROXY_REQUIRE           "proxy-require"
69 #define RECORD_ROUTE            "record-route"
70 #define REPLY_TO                "reply-to"
71 #define REQUIRE                 "require"
72 #define RETRY_AFTER             "retry-after"
73 #define ROUTE                   "route"
74 #define SERVER                  "server"
75 #define SUBJECT                 "subject"
76 #define SUBJECT_SHORT           "s"
77 #define SUPPORTED               "supported"
78 #define TIMESTAMP               "timestamp"
79 #define TO                      "to"
80 #define TO_SHORT                "t"
81 #define UNSUPPORTED             "unsupported"
82 #define USER_AGENT              "user-agent"
83 #define VIA                     "via"
84 #define VIA_SHORT               "v"
85 #define WARNING                 "warning"
86 #define WWW_AUTHENTICATE        "www-authenticate"
87
88
89 #define RESPONSE_CODES 51
90
91 #define SIP_TRYING                        100
92 #define SIP_RINGING                       180
93 #define SIP_CALL_IS_BEING_FORWARDED       181
94 #define SIP_QUEUED                        182
95 #define SIP_SESSION_PROGRESS              183
96 #define SIP_OK                            200
97 #define SIP_ACCEPTED                      202
98 #define SIP_MULTIPLE_CHOICES              300
99 #define SIP_MOVED_PERMANENTLY             301
100 #define SIP_MOVED_TEMPORARILY             302
101 #define SIP_USE_PROXY                     305
102 #define SIP_ALTERNATIVE_SERVICE           380
103 #define SIP_BAD_REQUEST                   400
104 #define SIP_UNAUTHORIZED                  401
105 #define SIP_PAYMENT_REQUIRED              402
106 #define SIP_FORBIDDEN                     403
107 #define SIP_NOT_FOUND                     404
108 #define SIP_METHOD_NOT_ALLOWED            405
109 #define SIP_406_NOT_ACCEPTABLE            406
110 #define SIP_PROXY_AUTHENTICATION_REQUIRED 407
111 #define SIP_REQUEST_TIME_OUT              408
112 #define SIP_GONE                          410
113 #define SIP_REQUEST_ENTITY_TOO_LARGE      413
114 #define SIP_REQUEST_URI_TOO_LARGE         414
115 #define SIP_UNSUPPORTED_MEDIA_TYPE        415
116 #define SIP_UNSUPPORTED_URI_SCHEME        416
117 #define SIP_BAD_EXTENSION                 420
118 #define SIP_EXTENSION_REQUIRED            421
119 #define SIP_INTERVAL_TOO_BRIEF            423
120 #define SIP_TEMPORARILY_UNAVAILABLE       480
121 #define SIP_CALL_TRANSACTION_DOES_NOT_EXIST 481
122 #define SIP_LOOP_DETECTED                 482
123 #define SIP_TOO_MANY_HOPS                 483
124 #define SIP_ADDRESS_INCOMPLETE            484
125 #define SIP_AMBIGUOUS                     485
126 #define SIP_BUSY_HERE                     486
127 #define SIP_REQUEST_TERMINATED            487
128 #define SIP_NOT_ACCEPTABLE_HERE           488
129 #define SIP_REQUEST_PENDING               491
130 #define SIP_UNDECIPHERABLE                493
131 #define SIP_INTERNAL_SERVER_ERROR         500
132 #define SIP_NOT_IMPLEMENTED               501
133 #define SIP_BAD_GATEWAY                   502
134 #define SIP_SERVICE_UNAVAILABLE           503
135 #define SIP_SERVER_TIME_OUT               504
136 #define SIP_VERSION_NOT_SUPPORTED         505
137 #define SIP_MESSAGE_TOO_LARGE             513
138 #define SIP_BUSY_EVRYWHERE                600
139 #define SIP_DECLINE                       603
140 #define SIP_DOES_NOT_EXIST_ANYWHERE       604
141 #define SIP_606_NOT_ACCEPTABLE                606
142
143 /** is the status code informational */
144 #define OSIP_IS_SIP_INFO(x)         (((x) >= 100)&&((x) < 200))
145 /** is the status code OK ?*/
146 #define OSIP_IS_SIP_SUCCESS(x)      (((x) >= 200)&&((x) < 300))
147 /** is the status code a redirect */
148 #define OSIP_IS_SIP_REDIRECT(x)     (((x) >= 300)&&((x) < 400))
149 /** is the status code a error (client or server) */
150 #define OSIP_IS_SIP_ERROR(x)        (((x) >= 400)&&((x) < 600))
151 /** is the status code a client error  */
152 #define OSIP_IS_SIP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
153 /** is the status code a server error  */
154 #define OSIP_IS_SIP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
155
156
157 #endif /*  _CONST_H_ */