pua.h

00001 /*
00002  * $Id$
00003  *
00004  * pua module - presence user agent module
00005  *
00006  * Copyright (C) 2006 Voice Sistem S.R.L.
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 
00025 #ifndef PUBLISH_H
00026 #define PUBLISH_H
00027 
00028 #include "../../str.h"
00029 #include "../../lib/srdb1/db.h"
00030 #include "hash.h"
00031 
00032 #define INSERT_TYPE      1<<1
00033 #define UPDATE_TYPE      1<<2
00034 
00035 #define REQ_OTHER  0
00036 #define REQ_ME     1
00037 
00038 #define PUA_DB_DEFAULT 0
00039 #define PUA_DB_MODE1_RESERVED 1
00040 #define PUA_DB_ONLY 2
00041 
00042 extern str default_domain;
00043 extern struct tm_binds tmb;
00044 extern htable_t* HashT;
00045 extern int HASH_SIZE;
00046 extern int min_expires;
00047 extern int pua_ul_publish;
00048 extern int default_expires;
00049 extern str outbound_proxy;
00050 extern int check_remote_contact;
00051 extern int dbmode;
00052 
00053 int reginfo_increase_version;
00054 
00055 extern int update_pua(ua_pres_t* p);
00056 extern int clean_puadb( int update_period, int min_expires );
00057 
00058 extern db_func_t pua_dbf;
00059 extern db1_con_t *pua_db;
00060 extern int pua_fetch_rows;
00061 
00062 
00063 #endif