libosip  4.0.0
osip_authorization.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_AUTHORIZATION_H_
22 #define _OSIP_AUTHORIZATION_H_
23 
24 
41 
47  {
48  char *auth_type;
49  char *username;
50  char *realm;
51  char *nonce;
52  char *uri;
53  char *response;
54  char *digest;
55  char *algorithm;
56  char *cnonce;
57  char *opaque;
58  char *message_qop;
59  char *nonce_count;
60  char *auth_param;
61  };
62 
63 
64 #ifdef __cplusplus
65 extern "C"
66 {
67 #endif
68 
79  int osip_authorization_parse (osip_authorization_t * header, const char *hvalue);
85  int osip_authorization_to_str (const osip_authorization_t * header, char **dest);
97  osip_authorization_t ** dest);
98 
109  void osip_authorization_set_auth_type (osip_authorization_t * header, char *value);
120  void osip_authorization_set_username (osip_authorization_t * header, char *value);
131  void osip_authorization_set_realm (osip_authorization_t * header, char *value);
142  void osip_authorization_set_nonce (osip_authorization_t * header, char *value);
153  void osip_authorization_set_uri (osip_authorization_t * header, char *value);
164  void osip_authorization_set_response (osip_authorization_t * header, char *value);
175  void osip_authorization_set_digest (osip_authorization_t * header, char *value);
186  void osip_authorization_set_algorithm (osip_authorization_t * header, char *value);
197  void osip_authorization_set_cnonce (osip_authorization_t * header, char *value);
208  void osip_authorization_set_opaque (osip_authorization_t * header, char *value);
219  void osip_authorization_set_message_qop (osip_authorization_t * header, char *value);
230  void osip_authorization_set_nonce_count (osip_authorization_t * header, char *value);
231 
232 #ifdef __cplusplus
233 }
234 #endif
235 
238 #endif