| 1 |
/* rsyslog's janitor |
| 2 |
* |
| 3 |
* Copyright (C) 2014 by Rainer Gerhards and Adiscon GmbH. |
| 4 |
* |
| 5 |
* This file is part of the rsyslog runtime library. |
| 6 |
* |
| 7 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 |
* you may not use this file except in compliance with the License. |
| 9 |
* You may obtain a copy of the License at |
| 10 |
* |
| 11 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 12 |
* -or- |
| 13 |
* see COPYING.ASL20 in the source distribution |
| 14 |
* |
| 15 |
* Unless required by applicable law or agreed to in writing, software |
| 16 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 17 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 |
* See the License for the specific language governing permissions and |
| 19 |
* limitations under the License. |
| 20 |
*/ |
| 21 |
#ifndef INCLUDED_JANITOR_H |
| 22 |
#define INCLUDED_JANITOR_H |
| 23 |
|
| 24 |
struct janitorEtry { |
| 25 |
struct janitorEtry *next; |
| 26 |
char *id; /* ID used to remove entry */ |
| 27 |
void (*cb)(void *pUsr); |
| 28 |
void *pUsr; /* user-settable pointer (passed to callback) */ |
| 29 |
}; |
| 30 |
|
| 31 |
rsRetVal janitorAddEtry(void (*cb)(void *), const char *id, void *pUsr); |
| 32 |
rsRetVal janitorDelEtry(const char *__restrict__ const id); |
| 33 |
void janitorRun(void); |
| 34 |
|
| 35 |
#endif /* #ifndef INCLUDED_JANITOR_H */ |