diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-07-26 10:49:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-07-26 10:49:23 +0100 |
commit | 537a7180a0d5132c11636c4fd8b1450cd99d352c (patch) | |
tree | fb9f8c84955a411bdffbd6371ea32f2716fb3687 /src/libserver/async_session.h | |
parent | 5fd7a90fdaa33f52c59bdb0ca84451e5c1e22365 (diff) | |
download | rspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.tar.gz rspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.zip |
[Rework] Use clang-format to unify formatting in all sources
No meaningful changes.
Diffstat (limited to 'src/libserver/async_session.h')
-rw-r--r-- | src/libserver/async_session.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/libserver/async_session.h b/src/libserver/async_session.h index b5323b1df..4573545f1 100644 --- a/src/libserver/async_session.h +++ b/src/libserver/async_session.h @@ -19,16 +19,16 @@ #include "config.h" #include "mem_pool.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif struct rspamd_async_event; struct rspamd_async_session; -typedef void (*event_finalizer_t) (gpointer ud); +typedef void (*event_finalizer_t)(gpointer ud); -typedef gboolean (*session_finalizer_t) (gpointer user_data); +typedef gboolean (*session_finalizer_t)(gpointer user_data); /** * Make new async session @@ -39,9 +39,9 @@ typedef gboolean (*session_finalizer_t) (gpointer user_data); * @param user_data abstract user data * @return */ -struct rspamd_async_session *rspamd_session_create (rspamd_mempool_t *pool, - session_finalizer_t fin, event_finalizer_t restore, - event_finalizer_t cleanup, gpointer user_data); +struct rspamd_async_session *rspamd_session_create(rspamd_mempool_t *pool, + session_finalizer_t fin, event_finalizer_t restore, + event_finalizer_t cleanup, gpointer user_data); /** * Insert new event to the session @@ -51,14 +51,14 @@ struct rspamd_async_session *rspamd_session_create (rspamd_mempool_t *pool, * @param forced unused */ struct rspamd_async_event * -rspamd_session_add_event_full (struct rspamd_async_session *session, - event_finalizer_t fin, - gpointer user_data, - const gchar *subsystem, - const gchar *event_source); +rspamd_session_add_event_full(struct rspamd_async_session *session, + event_finalizer_t fin, + gpointer user_data, + const gchar *subsystem, + const gchar *event_source); #define rspamd_session_add_event(session, fin, user_data, subsystem) \ - rspamd_session_add_event_full(session, fin, user_data, subsystem, G_STRLOC) + rspamd_session_add_event_full(session, fin, user_data, subsystem, G_STRLOC) /** * Remove normal event @@ -66,45 +66,45 @@ rspamd_session_add_event_full (struct rspamd_async_session *session, * @param fin final callback * @param ud user data object */ -void rspamd_session_remove_event_full (struct rspamd_async_session *session, - event_finalizer_t fin, - gpointer ud, - const gchar *event_source); +void rspamd_session_remove_event_full(struct rspamd_async_session *session, + event_finalizer_t fin, + gpointer ud, + const gchar *event_source); #define rspamd_session_remove_event(session, fin, user_data) \ - rspamd_session_remove_event_full(session, fin, user_data, G_STRLOC) + rspamd_session_remove_event_full(session, fin, user_data, G_STRLOC) /** * Must be called at the end of session, it calls fin functions for all non-forced callbacks * @return true if the whole session was destroyed and false if there are forced events */ -gboolean rspamd_session_destroy (struct rspamd_async_session *session); +gboolean rspamd_session_destroy(struct rspamd_async_session *session); /** * Try to remove all events pending */ -void rspamd_session_cleanup (struct rspamd_async_session *session, bool forced_cleanup); +void rspamd_session_cleanup(struct rspamd_async_session *session, bool forced_cleanup); /** * Returns mempool associated with async session * @param session * @return */ -rspamd_mempool_t *rspamd_session_mempool (struct rspamd_async_session *session); +rspamd_mempool_t *rspamd_session_mempool(struct rspamd_async_session *session); /** * Check session for events pending and call fin callback if no events are pending * @param session session object * @return TRUE if session has pending events */ -gboolean rspamd_session_pending (struct rspamd_async_session *session); +gboolean rspamd_session_pending(struct rspamd_async_session *session); /** * Returns number of events pending * @param session * @return */ -guint rspamd_session_events_pending (struct rspamd_async_session *session); +guint rspamd_session_events_pending(struct rspamd_async_session *session); /** @@ -112,9 +112,9 @@ guint rspamd_session_events_pending (struct rspamd_async_session *session); * @param s * @return */ -gboolean rspamd_session_blocked (struct rspamd_async_session *s); +gboolean rspamd_session_blocked(struct rspamd_async_session *s); -#ifdef __cplusplus +#ifdef __cplusplus } #endif |