Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

engmodinit.c

Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 2005 by Kevin L. Mitchell <klmitch@mit.edu>
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 **
00018 ** @(#)$Id: engmodinit.c,v 1.2 2005/12/18 00:15:17 klmitch Exp $
00019 */
00027 #include "engines_int.h"
00028 
00029 RCSTAG("@(#)$Id: engmodinit.c,v 1.2 2005/12/18 00:15:17 klmitch Exp $");
00030 
00049 static ev_err_t
00050 emi_init(ev_ctx_t *ctx, ev_engine_t *engine, ev_flags_t *eng_flags)
00051 {
00052   return engine_activate(ctx, engine, *eng_flags);
00053 }
00054 
00070 static ev_err_t
00071 emi_poll(ev_ctx_t *ctx, ev_engine_t *engine, struct timeval *timeout)
00072 {
00073   return 0;
00074 }
00075 
00088 static ev_err_t
00089 emi_sock(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock)
00090 {
00091   return 0;
00092 }
00093 
00108 static ev_err_t
00109 emi_sockev(ev_ctx_t *ctx, ev_engine_t *engine, ev_sock_t *sock, ev_flags_t evs)
00110 {
00111   return 0;
00112 }
00113 
00126 static ev_err_t
00127 emi_sig(ev_ctx_t *ctx, ev_engine_t *engine, ev_sig_t *sig)
00128 {
00129   return 0;
00130 }
00131 
00145 static ev_err_t
00146 emi_tim(ev_ctx_t *ctx, ev_engine_t *engine, ev_tim_t *tim)
00147 {
00148   return 0;
00149 }
00150 
00157 static ev_engine_t engine =
00158   EV_ENGINE_INIT("engmodinit", "Engine module with an engine_mod_init() "
00159                  "function",
00160                  (EV_ENGINE_SOCKET | EV_ENGINE_SIGNAL | EV_ENGINE_TIMER),
00161                  emi_init, emi_poll, 0,
00162                  emi_sock, emi_sock, emi_sockev,
00163                  emi_sig, emi_sig,
00164                  emi_tim, emi_tim);
00165 
00166 #define ENGINE_MODULE engmodinit /* engine module name */
00167 
00168 ev_engine_t *
00169 engine_mod_init(ev_ctx_t *ctx)
00170 {
00171   if (engine_register(ctx, &engine))
00172     return 0; /* engine_register() call failed... */
00173 
00174   return &engine;
00175 }

Generated on Wed Dec 28 23:36:56 2005 for event by  doxygen 1.4.4