• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

local_timer.h

00001 /*
00002  * $Id$
00003  *
00004  * Copyright (C) 2007 iptelorg GmbH
00005  *
00006  * This file is part of ser, a free SIP server.
00007  *
00008  * ser 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  * For a license to use the ser software under conditions
00014  * other than those described here, or to purchase support for this
00015  * software, please contact iptel.org by e-mail at the following addresses:
00016  *    info@iptel.org
00017  *
00018  * ser is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License 
00024  * along with this program; if not, write to the Free Software 
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  */
00027 /* local timer routines
00028  * WARNING: this should be used only from within the same process.
00029  * The local timers are not multi-process or multi-thread safe 
00030  *  (there are no locks)
00031  *
00032  * History:
00033  * --------
00034  *  2007-11-22  created by andrei
00035  */
00036 
00037 #ifndef _local_timer_h
00038 #define _local_timer_h
00039 
00040 #include "timer_ticks.h"
00041 #include "timer_funcs.h"
00042 
00043 
00044 struct local_timer {
00045         /* private timer information */
00046         ticks_t prev_ticks; /* last time we ran the timer */
00047         struct timer_lists timer_lst; /* actual timer lists */
00048 };
00049 
00050 
00051 #define local_timer_init(tl, fun, param, flgs) timer_init(tl, fun, param, flgs)
00052 
00053 #define local_timer_reinit(tl) timer_reinit((tl))
00054 
00055 int init_local_timer(struct local_timer *lt_handle, ticks_t crt_ticks);
00056 void destroy_local_timer(struct local_timer* lt_handle);
00057 
00058 int local_timer_add(struct local_timer* h, struct timer_ln* tl, ticks_t delta,
00059                                                 ticks_t crt_ticks);
00060 
00061 void local_timer_del(struct local_timer* h, struct timer_ln* tl);
00062 void local_timer_run(struct local_timer* lt, ticks_t crt_ticks);
00063 
00064 #endif /* _local_timer_h */

Generated on Tue May 22 2012 13:10:10 for SIP Router by  doxygen 1.7.1