oRTP: src/rtptimer.h Source File

- Main Page
- Data Structures
- Files

# src/rtptimer.h

    00001 /*
    00002   The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) stack.
    00003   Copyright (C) 2001  Simon MORLAT simon.morlat@linphone.org
    00004
    00005   This library is free software; you can redistribute it and/or
    00006   modify it under the terms of the GNU Lesser General Public
    00007   License as published by the Free Software Foundation; either
    00008   version 2.1 of the License, or (at your option) any later version.
    00009
    00010   This library is distributed in the hope that it will be useful,
    00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013   Lesser General Public License for more details.
    00014
    00015   You should have received a copy of the GNU Lesser General Public
    00016   License along with this library; if not, write to the Free Software
    00017   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00018 */
    00019
    00020 #ifndef RTPTIMER_H
    00021 #define RTPTIMER_H
    00022
    00023 #if     !defined(_WIN32) && !defined(_WIN32_WCE)
    00024 #include <sys/time.h>
    00025 #else
    00026 #include <time.h>
    00027 #include "winsock2.h"
    00028 #endif
    00029
    00030 #include <ortp/port.h>
    00031
    00032
    00033 typedef void (*RtpTimerFunc)(void);
    00034
    00035 struct _RtpTimer
    00036 {
    00037         int state;
    00038 #define RTP_TIMER_RUNNING 1
    00039 #define RTP_TIMER_STOPPED 0
    00040         RtpTimerFunc timer_init;
    00041         RtpTimerFunc timer_do;
    00042         RtpTimerFunc timer_uninit;
    00043         struct timeval interval;
    00044 };
    00045
    00046 typedef struct _RtpTimer RtpTimer;
    00047
    00048 void rtp_timer_set_interval(RtpTimer *timer, struct timeval *interval);
    00049
    00050 extern RtpTimer posix_timer;
    00051
    00052 #endif