modules_k/p_usrloc/urecord.h

Go to the documentation of this file.
00001 /*
00002  * $Id: urecord.h 5241 2008-11-21 12:52:25Z henningw $ 
00003  *
00004  * Copyright (C) 2001-2003 FhG Fokus
00005  *
00006  * This file is part of Kamailio, a free SIP server.
00007  *
00008  * Kamailio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * Kamailio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License 
00019  * along with this program; if not, write to the Free Software 
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 
00029 #ifndef URECORD_H
00030 #define URECORD_H
00031 
00032 
00033 #include <stdio.h>
00034 #include <time.h>
00035 #include "hslot.h"
00036 #include "../../str.h"
00037 #include "../../qvalue.h"
00038 #include "ucontact.h"
00039 #include "../usrloc/usrloc.h"
00040 
00048 int new_urecord(str* _dom, str* _aor, urecord_t** _r);
00049 
00050 
00059 void free_urecord(urecord_t* _r);
00060 
00061 
00067 void print_urecord(FILE* _f, urecord_t* _r);
00068 
00069 
00080 ucontact_t* mem_insert_ucontact(urecord_t* _r, str* _c, ucontact_info_t* _ci);
00081 
00082 
00088 void mem_remove_ucontact(urecord_t* _r, ucontact_t* _c);
00089 
00090 
00096 void mem_delete_ucontact(urecord_t* _r, ucontact_t* _c);
00097 
00098 
00106 void timer_urecord(urecord_t* _r);
00107 
00108 
00114 int db_delete_urecord(struct udomain* _d, urecord_t* _r);
00115 
00124 int insert_ucontact(urecord_t* _r, str* _contact,
00125            ucontact_info_t* _ci, ucontact_t** _c);
00126 
00127 
00134 int delete_ucontact(urecord_t* _r, struct ucontact* _c);
00135 
00136 
00148 int get_ucontact(urecord_t* _r, str* _c, str* _callid, str* _path,
00149            int _cseq,
00150            struct ucontact** _co);
00151 
00152 /* ===== Module interface ======== */
00153 
00154 
00163 void release_urecord(urecord_t* _r);
00164 
00165 
00166 
00167 #endif