stumpless 2.2.0
Loading...
Searching...
No Matches
chain.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Apache-2.0 */
2
3/*
4 * Copyright 2024 Joel E. Anderson
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
39#ifndef __STUMPLESS_TARGET_CHAIN_H
40#define __STUMPLESS_TARGET_CHAIN_H
41
42#include <stddef.h>
43#include <stumpless/config.h>
44#include <stumpless/target.h>
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
78struct stumpless_target *
80 struct stumpless_target *target );
81
107void
109
135void
137
160size_t
162
186struct stumpless_target *
188
189#ifdef __cplusplus
190} /* extern "C" */
191#endif
192
193#endif /* __STUMPLESS_TARGET_CHAIN_H */
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_new_chain(const char *name)
Creates a new target chain.
STUMPLESS_PUBLIC_FUNCTION void stumpless_close_chain_only(struct stumpless_target *chain)
Closes a chain target.
STUMPLESS_PUBLIC_FUNCTION size_t stumpless_get_chain_length(const struct stumpless_target *chain)
Gets the number of targets currently in a chain.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_add_target_to_chain(struct stumpless_target *chain, struct stumpless_target *target)
Adds a target to an existing chain target.
STUMPLESS_PUBLIC_FUNCTION void stumpless_close_chain_and_contents(struct stumpless_target *chain)
Closes a chain of targets.
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition config.h:31
A target that log entries can be sent to.
Definition target.h:140
char * name
The name of this target.
Definition target.h:157
General types and functions for working with all targets.