1 /* libundertow - undertow-main.h
2 * Copyright (C) 2008 Michael Frank <msfrank@syntaxjockey.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 /**\file undertow-main.h */
22 #ifndef LIBUNDERTOW_MAIN_H
23 #define LIBUNDERTOW_MAIN_H
25 #include "undertow-error.h"
32 * @addtogroup ControllingTheDispatcher
37 * An opaque value used to identify deferred instances.
39 typedef int * lut_deferred_handle
;
42 * The function prototype for the callback passed to
43 * lut_main_defer() and lut_main_defer_with_timeout()
45 typedef void (*lut_deferred_funct
)(void *);
47 lut_errno
lut_main_start (void);
48 lut_errno
lut_main_stop (void);
49 int lut_main_is_running (void);
50 lut_errno
lut_main_defer_with_timeout (int timeout
,
51 lut_deferred_handle
* handle
,
54 lut_errno
lut_main_defer (lut_deferred_handle
* handle
,
57 lut_errno
lut_main_cancel_deferred (lut_deferred_handle handle
);
58 lut_errno
lut_main_loop_run (void);
59 lut_errno
lut_main_loop_quit (void);