CAPS Universe documentation  1.0.4
All you need to know to be successful
caps-si-local.h
Go to the documentation of this file.
1#pragma once
2
3/*
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 *
6 * (c) 2017 Juergen Borleis <projects@caps-printing.org>
7 *
8 * This library is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License 2.1 as published by the Free
10 * Software Foundation.
11 */
12#include <stdlib.h>
13#include <stdint.h>
14#include <pthread.h>
15#include <stdbool.h>
16#include <unistd.h>
17#include <fcntl.h>
18#include <errno.h>
19#include <inttypes.h>
20#include <libcapsbase.h>
21#include <libcapsinif.h>
22#include <libcapsppd.h>
23
24#include "libcapsppcommon.h"
39#ifdef DSO_HIDDEN
40# define DSO_VISIBLE __attribute__ ((visibility("default")))
41#else
42# define DSO_VISIBLE
43#endif /* DSO_HIDDEN */
44
45#ifndef ARRAY_SIZE
46# define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
47#endif
48
49#ifdef DEBUG
50# define caps_invalidate_pointer(pointer) (pointer = NULL)
51#else
52# define caps_invalidate_pointer(pointer)
53#endif
54
55#ifdef DEBUG
56# define caps_print_debug(fmt, ...) caps_print_debug_template(fmt, ##__VA_ARGS__)
57#else
58# define caps_print_debug(fmt, ...)
59#endif
60
61#ifdef ENABLE_NLS
62
63# ifndef PACKAGE
64# error "Missing 'PACKAGE' macro: include 'config.h' first"
65# endif /* PACKAGE */
66
67# define _(string) dgettext(PACKAGE, string)
68# include <libintl.h>
69
70#else /* ENABLE_NLS */
71
72# define _(string) (string)
73
74#endif /* ENABLE_NLS */
75
76#define NLS_(string) (string)
77
85#define CAPS_DRIVER_INI_NAME "driver-ini"
91#define CAPS_DRIVER_INI_NAME_SHORT 'f'
99#define CAPS_PARAM_DIRECTORY_NAME "parameter-dir"
105#define CAPS_PARAM_DIRECTORY_NAME_SHORT 'd'
106
113#define CAPS_RUNTIME_CONFIG_LEVEL "base"
114
116void runtime_configuration_class_merge_in(struct caps_inif_table *runtime_config, enum caps_user_class clss) __nonnull();
117void runtime_configuration_apply(struct caps_inif_table *runtime_config, enum caps_user_class clss, const char *package) __nonnull((1));
118void runtime_configuration_apply_verbosity(const struct caps_inif_table *runtime_config) __nonnull();
119
120#ifdef SYSTEMD_EXEC
121# define RETVAL_BAD 255
122# define RETVAL_FAIL 1
123# define RETVAL_OK 0
124#else
125# define RETVAL_BAD 1
126# define RETVAL_FAIL 1
127# define RETVAL_OK 0
128#endif
129/*
130 * @ }
131 */
void runtime_configuration_apply(struct caps_inif_table *runtime_config, enum caps_user_class clss, const char *package)
Definition: libppcommon.c:247
void runtime_configuration_apply_verbosity(const struct caps_inif_table *runtime_config)
Definition: libppcommon.c:223
void runtime_configuration_base_read_in(struct caps_inif_table *runtime_config)
Definition: libppcommon.c:89
void runtime_configuration_class_merge_in(struct caps_inif_table *runtime_config, enum caps_user_class clss)
Definition: libppcommon.c:138
#define __nonnull(params)
Definition: libcapsbase.h:84
Basic API for everything else of the CAPS universe.
Basic API for INI file management in the CAPS universe.
Common definitions used by printing coordinator components (libcapsclient and libcapsprovider)
caps_user_class
Definition: libcapsppcommon.h:337
Data declaration to handle PPD file information.
Manage a table of INI entries.
Definition: libcapsinif.h:256