2008-06-14 11:23:31 -04:00
/*
Unix SMB / CIFS implementation .
Copyright ( C ) Andrew Tridgell 2003
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
# include "includes.h"
2009-03-12 10:05:47 +01:00
# define TEVENT_DEPRECATED 1
2009-01-02 15:34:37 +01:00
# include "lib/events/events.h"
2008-06-14 11:23:31 -04:00
2008-06-14 13:00:53 -04:00
/*
create a event_context structure . This must be the first events
call , and all subsequent calls pass this event_context as the first
element . Event handlers also receive this as their first argument .
This samba4 specific call sets the samba4 debug handler .
*/
2008-12-29 20:24:57 +01:00
struct tevent_context * s4_event_context_init ( TALLOC_CTX * mem_ctx )
2008-06-14 13:00:53 -04:00
{
2008-12-29 20:24:57 +01:00
struct tevent_context * ev ;
2008-06-14 13:00:53 -04:00
2009-01-02 15:34:37 +01:00
ev = tevent_context_init_byname ( mem_ctx , NULL ) ;
2008-06-14 13:00:53 -04:00
if ( ev ) {
2013-02-21 08:35:50 +01:00
samba_tevent_set_debug ( ev , " s4_tevent " ) ;
2009-03-12 10:05:47 +01:00
tevent_loop_allow_nesting ( ev ) ;
2008-06-14 13:00:53 -04:00
}
return ev ;
}