aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/timeout.h
blob: 5230057ef6fb11ca85f611bd308cab399af0b344 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef TIMEOUT_H
#define TIMEOUT_H

#include <dbus/dbus.h>

#include <gnunet/platform.h>
#include <gnunet/gnunet_common.h>
#include <gnunet/gnunet_scheduler_lib.h>

struct Timeout;

struct TimeoutIter
{
  struct TimeoutIter *next;
  struct TimeoutIter *prev;

  struct Timeout *t;
};

struct Timeout *timeout_create (DBusTimeout *timeout);
void timeout_ref (struct Timeout *t);
void timeout_unref (struct Timeout *t);

void timeout_schedule (struct Timeout *t);
void timeout_unschedule (struct Timeout *t);
void do_timeout_unschedule (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);

struct TimeoutIter *timeout_find (struct TimeoutIter *, DBusTimeout *timeout);

#endif