libkeepalive
Toggle main menu visibility
Loading...
Searching...
No Matches
keepalive-heartbeat.h
Go to the documentation of this file.
1
/****************************************************************************************
2
**
3
** Copyright (C) 2014 - 2018 Jolla Ltd.
4
**
5
** Author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
6
**
7
** All rights reserved.
8
**
9
** This file is part of nemo-keepalive package.
10
**
11
** You may use this file under the terms of the GNU Lesser General
12
** Public License version 2.1 as published by the Free Software Foundation
13
** and appearing in the file license.lgpl included in the packaging
14
** of this file.
15
**
16
** This library is free software; you can redistribute it and/or
17
** modify it under the terms of the GNU Lesser General Public
18
** License version 2.1 as published by the Free Software Foundation
19
** and appearing in the file license.lgpl included in the packaging
20
** of this file.
21
**
22
** This library is distributed in the hope that it will be useful,
23
** but WITHOUT ANY WARRANTY; without even the implied warranty of
24
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25
** Lesser General Public License for more details.
26
**
27
****************************************************************************************/
28
33
34
#ifndef KEEPALIVE_GLIB_HEARTBEAT_H_
35
# define KEEPALIVE_GLIB_HEARTBEAT_H_
36
37
# include <stdbool.h>
38
39
# ifdef __cplusplus
40
extern
"C"
{
41
# elif 0
42
}
/* fool JED indentation ... */
43
# endif
44
45
# pragma GCC visibility push(default)
46
52
typedef
struct
heartbeat_t
heartbeat_t
;
53
58
typedef
void (*
heartbeat_wakeup_fn
)(
void
*aptr);
59
69
typedef
void (*
heartbeat_free_fn
)(
void
*aptr);
70
82
heartbeat_t
*
heartbeat_new
(
void
);
83
92
heartbeat_t
*
heartbeat_ref
(
heartbeat_t
*self);
93
102
void
heartbeat_unref
(
heartbeat_t
*self);
103
117
void
heartbeat_set_delay
(
heartbeat_t
*self,
118
int
delay_lo,
119
int
delay_hi);
120
133
void
heartbeat_set_notify
(
heartbeat_t
*self,
134
heartbeat_wakeup_fn
notify_cb,
135
void
*user_data,
136
heartbeat_free_fn
user_free_cb);
137
142
void
heartbeat_start
(
heartbeat_t
*self);
143
148
void
heartbeat_stop
(
heartbeat_t
*self);
149
150
# pragma GCC visibility pop
151
152
# ifdef __cplusplus
153
};
154
# endif
155
156
#endif
/* KEEPALIVE_GLIB_HEARTBEAT_H_ */
heartbeat_unref
void heartbeat_unref(heartbeat_t *self)
heartbeat_t
struct heartbeat_t heartbeat_t
Definition
keepalive-heartbeat.h:52
heartbeat_start
void heartbeat_start(heartbeat_t *self)
heartbeat_wakeup_fn
void(* heartbeat_wakeup_fn)(void *aptr)
Definition
keepalive-heartbeat.h:58
heartbeat_new
heartbeat_t * heartbeat_new(void)
heartbeat_set_notify
void heartbeat_set_notify(heartbeat_t *self, heartbeat_wakeup_fn notify_cb, void *user_data, heartbeat_free_fn user_free_cb)
heartbeat_set_delay
void heartbeat_set_delay(heartbeat_t *self, int delay_lo, int delay_hi)
heartbeat_free_fn
void(* heartbeat_free_fn)(void *aptr)
Definition
keepalive-heartbeat.h:69
heartbeat_ref
heartbeat_t * heartbeat_ref(heartbeat_t *self)
heartbeat_stop
void heartbeat_stop(heartbeat_t *self)
Generated by
1.17.0