qbloop.h | qbloop.h | |||
---|---|---|---|---|
skipping to change at line 24 | skipping to change at line 24 | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | * GNU Lesser General Public License for more details. | |||
* | * | |||
* You should have received a copy of the GNU Lesser General Public License | * You should have received a copy of the GNU Lesser General Public License | |||
* along with libqb. If not, see <http://www.gnu.org/licenses/>. | * along with libqb. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | */ | |||
#ifndef QB_LOOP_DEFINED | #ifndef QB_LOOP_DEFINED | |||
#define QB_LOOP_DEFINED | #define QB_LOOP_DEFINED | |||
/* *INDENT-OFF* */ | ||||
#ifdef __cplusplus | ||||
extern "C" { | ||||
#endif | ||||
/* *INDENT-ON* */ | ||||
#include <signal.h> | #include <signal.h> | |||
#include <stdint.h> | ||||
/** | /** | |||
* @file qbloop.h | * @file qbloop.h | |||
* | * | |||
* Main loop manages timers, jobs and polling sockets. | * Main loop manages timers, jobs and polling sockets. | |||
* | ||||
* @example tcpserver.c | ||||
*/ | */ | |||
/** | /** | |||
* Priorites for jobs, timers & poll | * Priorites for jobs, timers & poll | |||
*/ | */ | |||
enum qb_loop_priority { | enum qb_loop_priority { | |||
QB_LOOP_LOW = 0, | QB_LOOP_LOW = 0, | |||
QB_LOOP_MED = 1, | QB_LOOP_MED = 1, | |||
QB_LOOP_HIGH = 2, | QB_LOOP_HIGH = 2, | |||
}; | }; | |||
skipping to change at line 130 | skipping to change at line 139 | |||
* | * | |||
* @param l pointer to the loop instance | * @param l pointer to the loop instance | |||
* @param th handle to delete the timer if needed. | * @param th handle to delete the timer if needed. | |||
* @return status (0 == ok, -errno == failure) | * @return status (0 == ok, -errno == failure) | |||
*/ | */ | |||
int32_t qb_loop_timer_del(qb_loop_t *l, qb_loop_timer_handle th); | int32_t qb_loop_timer_del(qb_loop_t *l, qb_loop_timer_handle th); | |||
/** | /** | |||
* Get the time remaining before it expires. | * Get the time remaining before it expires. | |||
* | * | |||
* @note if the timer has already expired it will return 0 | ||||
* | ||||
* @param l pointer to the loop instance | * @param l pointer to the loop instance | |||
* @param th timer handle. | * @param th timer handle. | |||
* @return nano seconds left | * @return nano seconds left | |||
*/ | */ | |||
uint64_t qb_loop_timer_expire_time_get(struct qb_loop *l, qb_loop_timer_han dle th); | uint64_t qb_loop_timer_expire_time_get(struct qb_loop *l, qb_loop_timer_han dle th); | |||
/** | /** | |||
* Set a callback to receive events on file descriptors | * Set a callback to receive events on file descriptors | |||
* getting low. | * getting low. | |||
* @param l pointer to the loop instance | * @param l pointer to the loop instance | |||
skipping to change at line 240 | skipping to change at line 251 | |||
/** | /** | |||
* Delete the signal job. | * Delete the signal job. | |||
* | * | |||
* @param l pointer to the loop instance | * @param l pointer to the loop instance | |||
* @param handle (in) a reference to the signal job | * @param handle (in) a reference to the signal job | |||
* @return status (0 == ok, -errno == failure) | * @return status (0 == ok, -errno == failure) | |||
*/ | */ | |||
int32_t qb_loop_signal_del(qb_loop_t *l, | int32_t qb_loop_signal_del(qb_loop_t *l, | |||
qb_loop_signal_handle handle); | qb_loop_signal_handle handle); | |||
/* *INDENT-OFF* */ | ||||
#ifdef __cplusplus | ||||
} | ||||
#endif /* __cplusplus */ | ||||
/* *INDENT-ON* */ | ||||
#endif /* QB_LOOP_DEFINED */ | #endif /* QB_LOOP_DEFINED */ | |||
End of changes. 5 change blocks. | ||||
0 lines changed or deleted | 16 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |