modules_k/usrloc/urecord.h

Go to the documentation of this file.
00001 /*
00002  * $Id$ 
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.h"
00040 
00041 struct hslot; 
00053 int new_urecord(str* _dom, str* _aor, urecord_t** _r);
00054 
00055 
00064 void free_urecord(urecord_t* _r);
00065 
00066 
00072 void print_urecord(FILE* _f, urecord_t* _r);
00073 
00074 
00085 ucontact_t* mem_insert_ucontact(urecord_t* _r, str* _c, ucontact_info_t* _ci);
00086 
00087 
00093 void mem_remove_ucontact(urecord_t* _r, ucontact_t* _c);
00094 
00095 
00101 void mem_delete_ucontact(urecord_t* _r, ucontact_t* _c);
00102 
00103 
00111 void timer_urecord(urecord_t* _r);
00112 
00113 
00119 int db_delete_urecord(urecord_t* _r);
00120 
00121 
00122 /* ===== Module interface ======== */
00123 
00124 
00133 void release_urecord(urecord_t* _r);
00134 
00135 
00144 int insert_ucontact(urecord_t* _r, str* _contact,
00145                 ucontact_info_t* _ci, ucontact_t** _c);
00146 
00147 
00154 int delete_ucontact(urecord_t* _r, struct ucontact* _c);
00155 
00156 
00168 int get_ucontact(urecord_t* _r, str* _c, str* _callid, str* _path,
00169                 int _cseq,
00170                 struct ucontact** _co);
00171 
00181 int get_ucontact_by_instance(urecord_t* _r, str* _c, ucontact_info_t* _ci,
00182                 ucontact_t** _co);
00183 
00184 #endif