parser/parse_nameaddr.h
5717778e
 /* 
  * $Id$
  *
c32feee5
  * Copyright (C) 2001-2003 FhG Fokus
5717778e
  *
  * This file is part of ser, a free SIP server.
  *
  * ser is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License 
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * History
  * --------
  * 2003-03-24 Created by janakj
  */
 
1eb01c66
 /*! \file
  * \brief Parser :: Parse name-addr part
  *
  * \ingroup parser
  */
 
5717778e
 #ifndef PARSE_NAMEADDR_H
 #define PARSE_NAMEADDR_H
 
1c6135b6
 #include <stdio.h>
5717778e
 #include "../str.h"
 
1eb01c66
 /*! \brief
5717778e
  * Name-addr structure, see RFC3261 for more details
  */
 typedef struct name_addr {
1eb01c66
 	str name;   /*!< Display name part */
 	str uri;    /*!< Uri part without surrounding <> */
 	int len;    /*!< Total length of the field (including all
b85054de
 		    * whitechars present in the parsed message */
5717778e
 } name_addr_t;
 
 
1eb01c66
 /*! \brief
5717778e
  * Parse name-addr part, the given string can be longer,
b85054de
  * parsing will stop when closing > is found
5717778e
  */
 int parse_nameaddr(str* _s, name_addr_t* _a);
 
 
1eb01c66
 /*! \brief
5717778e
  * Print a name-addr structure, just for debugging
  */
1c6135b6
 void print_nameaddr(FILE* _o, name_addr_t* _a);
5717778e
 
 
 #endif /* PARSE_NAMEADDR_H */