1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/lib/wsfs/adapter/impl/time/timer.h
Falk Werner 1c9d1c8420
feat(API wrapper): separates implementation from public API
* moves implementation to impl subdirectory
* adds prefix _impl to implementation symbols
* removes double compilation for shared and static libraries
* fixes include guards
* fixes usage of extern "C"
2019-03-26 15:35:33 +01:00

49 lines
1.0 KiB
C

#ifndef WSFS_ADAPTER_IMPL_TIME_TIMER_H
#define WSFS_ADAPTER_IMPL_TIME_TIMER_H
#include "wsfs/adapter/impl/time/timepoint.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_impl_timer;
struct wsfs_impl_timeout_manager;
typedef void wsfs_impl_timer_timeout_fn(struct wsfs_impl_timer * timer);
struct wsfs_impl_timer
{
struct wsfs_impl_timeout_manager * manager;
wsfs_impl_timepoint timeout;
wsfs_impl_timer_timeout_fn * timeout_handler;
void * user_data;
struct wsfs_impl_timer * next;
struct wsfs_impl_timer * prev;
};
extern void wsfs_impl_timer_init(
struct wsfs_impl_timer * timer,
struct wsfs_impl_timeout_manager * manager);
extern void wsfs_impl_timer_cleanup(
struct wsfs_impl_timer * timer);
extern void wsfs_impl_timer_start(
struct wsfs_impl_timer * timer,
wsfs_impl_timepoint absolute_timeout,
wsfs_impl_timer_timeout_fn * handler,
void * user_data);
extern void wsfs_impl_timer_cancel(
struct wsfs_impl_timer * timer);
#ifdef __cplusplus
}
#endif
#endif