parse_disposition.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  *
00005  * Copyright (C) 2001-2003 FhG Fokus
00006  *
00007  * This file is part of ser, a free SIP server.
00008  *
00009  * ser is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version
00013  *
00014  * ser is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License 
00020  * along with this program; if not, write to the Free Software 
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  * History:
00024  * 2003-09-09 created (bogdan)
00025  */
00026 
00034 #ifndef _PARSE_DISPOSITION_H_
00035 #define _PARSE_DISPOSITION_H_
00036 
00037 #include "../str.h"
00038 #include "msg_parser.h"
00039 
00040 
00041 #define get_content_disposition(_msg_) \
00042         ((struct disposition*)((_msg_)->content_disposition->parsed))
00043 
00044 
00045 struct disposition_param {
00046         str name;
00047         str body;
00048         int is_quoted;
00049         struct disposition_param *next;
00050 };
00051 
00052 
00053 struct disposition {
00054         str type;
00055         struct disposition_param *params;
00056 };
00057 
00058 
00066 int parse_content_disposition( struct sip_msg *msg );
00067 
00068 
00072 int parse_disposition( str *s, struct disposition *disp);
00073 
00074 
00076 void free_disposition( struct disposition **disp);
00077 
00079 void print_disposition( struct disposition *disp);
00080 
00081 #endif
00082