libosip 3.6.0

osip_authorization.h

Go to the documentation of this file.
00001 /*
00002   The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
00003   Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org
00004   
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009   
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014   
00015   You should have received a copy of the GNU Lesser General Public
00016   License along with this library; if not, write to the Free Software
00017   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00020 
00021 #ifndef _OSIP_AUTHORIZATION_H_
00022 #define _OSIP_AUTHORIZATION_H_
00023 
00024 
00040   typedef struct osip_authorization osip_authorization_t;
00041 
00046   struct osip_authorization
00047   {
00048     char *auth_type;            
00049     char *username;             
00050     char *realm;                
00051     char *nonce;                
00052     char *uri;                  
00053     char *response;             
00054     char *digest;               
00055     char *algorithm;            
00056     char *cnonce;               
00057     char *opaque;               
00058     char *message_qop;          
00059     char *nonce_count;          
00060     char *auth_param;           
00061   };
00062 
00063 
00064 #ifdef __cplusplus
00065 extern "C"
00066 {
00067 #endif
00068 
00073   int osip_authorization_init (osip_authorization_t ** header);
00079   int osip_authorization_parse (osip_authorization_t * header, const char *hvalue);
00085   int osip_authorization_to_str (const osip_authorization_t * header, char **dest);
00090   void osip_authorization_free (osip_authorization_t * header);
00096   int osip_authorization_clone (const osip_authorization_t * header,
00097                            osip_authorization_t ** dest);
00098 
00103   char *osip_authorization_get_auth_type (const osip_authorization_t * header);
00109   void osip_authorization_set_auth_type (osip_authorization_t * header, char *value);
00114   char *osip_authorization_get_username (osip_authorization_t * header);
00120   void osip_authorization_set_username (osip_authorization_t * header, char *value);
00125   char *osip_authorization_get_realm (osip_authorization_t * header);
00131   void osip_authorization_set_realm (osip_authorization_t * header, char *value);
00136   char *osip_authorization_get_nonce (osip_authorization_t * header);
00142   void osip_authorization_set_nonce (osip_authorization_t * header, char *value);
00147   char *osip_authorization_get_uri (osip_authorization_t * header);
00153   void osip_authorization_set_uri (osip_authorization_t * header, char *value);
00158   char *osip_authorization_get_response (osip_authorization_t * header);
00164   void osip_authorization_set_response (osip_authorization_t * header, char *value);
00169   char *osip_authorization_get_digest (osip_authorization_t * header);
00175   void osip_authorization_set_digest (osip_authorization_t * header, char *value);
00180   char *osip_authorization_get_algorithm (osip_authorization_t * header);
00186   void osip_authorization_set_algorithm (osip_authorization_t * header, char *value);
00191   char *osip_authorization_get_cnonce (osip_authorization_t * header);
00197   void osip_authorization_set_cnonce (osip_authorization_t * header, char *value);
00202   char *osip_authorization_get_opaque (osip_authorization_t * header);
00208   void osip_authorization_set_opaque (osip_authorization_t * header, char *value);
00213   char *osip_authorization_get_message_qop (osip_authorization_t * header);
00219   void osip_authorization_set_message_qop (osip_authorization_t * header, char *value);
00224   char *osip_authorization_get_nonce_count (osip_authorization_t * header);
00230   void osip_authorization_set_nonce_count (osip_authorization_t * header, char *value);
00231 
00232 #ifdef __cplusplus
00233 }
00234 #endif
00235 
00238 #endif