libosip  4.1.0
osip_www_authenticate.h
Go to the documentation of this file.
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2012 Aymeric MOIZARD amoizard@antisip.com
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_WWW_AUTHENTICATE_H_
22 #define _OSIP_WWW_AUTHENTICATE_H_
23 
24 
41 
47  {
48  char *auth_type;
49  char *realm;
50  char *domain;
51  char *nonce;
52  char *opaque;
53  char *stale;
54  char *algorithm;
55  char *qop_options;
56  char *auth_param;
57  };
58 
59 
60 #ifdef __cplusplus
61 extern "C"
62 {
63 #endif
64 
75  int osip_www_authenticate_parse (osip_www_authenticate_t * header, const char *hvalue);
81  int osip_www_authenticate_to_str (const osip_www_authenticate_t * header, char **dest);
93  osip_www_authenticate_t ** dest);
94 
106  char *value);
117  void osip_www_authenticate_set_realm (osip_www_authenticate_t * header, char *value);
128  void osip_www_authenticate_set_domain (osip_www_authenticate_t * header, char *value);
139  void osip_www_authenticate_set_nonce (osip_www_authenticate_t * header, char *value);
150  void osip_www_authenticate_set_opaque (osip_www_authenticate_t * header, char *value);
161  void osip_www_authenticate_set_stale (osip_www_authenticate_t * header, char *value);
166 #define osip_www_authenticate_set_stale_true(header) osip_www_authenticate_set_stale(header,osip_strdup("true"))
167 
171 #define osip_www_authenticate_set_stale_false(header) osip_www_authenticate_set_stale(header,osip_strdup("false"))
172 
183  char *value);
188 #define osip_www_authenticate_set_algorithm_MD5(header) osip_www_authenticate_set_algorithm(header,osip_strdup("MD5"))
189 
200  char *value);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
208 #endif