00001 #ifndef __ut_timer_h__ 00002 #define __ut_timer_h__ 00003 00004 #include <glib.h> 00005 00006 #ifdef __cplusplus 00007 extern "C" { 00008 #endif 00009 00010 typedef struct _ut_Timer ut_Timer; 00011 00012 // A non-NULL timerError indicates an error. 00013 // Caller takes ownership of any timerError. 00014 typedef void (ut_TimerCallback)(void* userdata, GError* timerError); 00015 00016 ut_Timer* ut_Timer_new(void* userdata, ut_TimerCallback* cb, GError** error); 00017 00018 void ut_Timer_destroy(ut_Timer* self); 00019 00020 gboolean ut_Timer_set_after(ut_Timer* self, int secs, GError** error); 00021 00022 void ut_Timer_cancel(ut_Timer* self); 00023 00024 gboolean ut_Timer_is_active(ut_Timer* self); 00025 00026 #ifdef __cplusplus 00027 } /* extern "C" */ 00028 #endif 00029 00030 #endif /* __ut_timer_h__ */ 00031 00032 /** 00033 00034 ut_timer.h 00035 00036 Copyright 2009 Helsinki Institute for Information Technology (HIIT) 00037 and the authors. All rights reserved. 00038 00039 Authors: Tero Hasu <tero.hasu@hut.fi> 00040 00041 Permission is hereby granted, free of charge, to any person 00042 obtaining a copy of this software and associated documentation files 00043 (the "Software"), to deal in the Software without restriction, 00044 including without limitation the rights to use, copy, modify, merge, 00045 publish, distribute, sublicense, and/or sell copies of the Software, 00046 and to permit persons to whom the Software is furnished to do so, 00047 subject to the following conditions: 00048 00049 The above copyright notice and this permission notice shall be 00050 included in all copies or substantial portions of the Software. 00051 00052 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00053 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00054 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00055 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 00056 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00057 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00058 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00059 SOFTWARE. 00060 00061 **/
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:57 2011 by Doxygen 1.6.1