contact.h

Go to the documentation of this file.
00001 /*
00002  * $Id: contact.h 4518 2008-07-28 15:39:28Z henningw $
00003  *
00004  * Contact data type
00005  *
00006  * Copyright (C) 2001-2003 FhG Fokus
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  * History:
00025  * -------
00026  *  2003-030-25 Adapted to use new parameter parser (janakj)
00027  */
00028 
00029 
00030 #ifndef CONTACT_H
00031 #define CONTACT_H
00032 
00033 #include <stdio.h>
00034 #include "../../str.h"
00035 #include "../parse_param.h"
00036 
00037 
00038 /*
00039  * Structure representing a Contact HF body
00040  */
00041 typedef struct contact {
00042    str name;               /* Name part */
00043    str uri;                /* contact uri */
00044    param_t* q;             /* q parameter hook */
00045    param_t* expires;       /* expires parameter hook */
00046    param_t* methods;       /* methods parameter hook */
00047    param_t* received;      /* received parameter hook */
00048    param_t* params;        /* List of all parameters */
00049    int len;                /* Total length of the element */
00050    struct contact* next;   /* Next contact in the list */
00051 } contact_t;
00052 
00053 
00054 /*
00055  * Parse contacts in a Contact HF
00056  */
00057 int parse_contacts(str* _s, contact_t** _c);
00058 
00059 
00060 /*
00061  * Free list of contacts
00062  * _c is head of the list
00063  */
00064 void free_contacts(contact_t** _c);
00065 
00066 
00067 /*
00068  * Print list of contacts, just for debugging
00069  */
00070 void print_contacts(FILE* _o, contact_t* _c);
00071 
00072 
00073 #endif /* CONTACT_H */

Generated on Mon May 21 18:00:25 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6