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 * History: 00023 * --------- 00024 * 2003-03-12 added replication mark and three zombie states (nils) 00025 * 2005-07-11 added FL_NAT_SIPPING for nat pinging with SIP method 00026 * instead of UDP package (bogdan) 00027 */ 00028 00035 #ifndef UCONTACT_H 00036 #define UCONTACT_H 00037 00038 00039 #include <stdio.h> 00040 #include "usrloc.h" 00041 00042 00044 #define UL_EXPIRED_TIME 10 00045 00046 00055 ucontact_t* new_ucontact(str* _dom, str* _aor, str* _contact, 00056 ucontact_info_t* _ci); 00057 00058 00063 void free_ucontact(ucontact_t* _c); 00064 00065 00071 void print_ucontact(FILE* _f, ucontact_t* _c); 00072 00073 00080 int mem_update_ucontact(ucontact_t* _c, ucontact_info_t *_ci); 00081 00082 00083 /* ===== State transition functions - for write back cache scheme ======== */ 00084 00089 void st_update_ucontact(ucontact_t* _c); 00090 00091 00097 int st_delete_ucontact(ucontact_t* _c); 00098 00099 00105 int st_expired_ucontact(ucontact_t* _c); 00106 00107 00113 int st_flush_ucontact(ucontact_t* _c); 00114 00115 00116 /* ==== Database related functions ====== */ 00117 00123 int db_insert_ucontact(ucontact_t* _c); 00124 00125 00131 int db_update_ucontact(ucontact_t* _c); 00132 00133 00139 int db_delete_ucontact(ucontact_t* _c); 00140 00141 /* ====== Module interface ====== */ 00142 00150 int update_ucontact(struct urecord* _r, ucontact_t* _c, ucontact_info_t* _ci); 00151 00152 #endif
1.7.1