This file is indexed.

/usr/include/hidrd/fmt/spec/snk.h is in libhidrd0-dev 0.2.0-11.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/** @file
 * @brief HID report descriptor - specification example sink
 *
 * Copyright (C) 2010 Nikolai Kondrashov
 *
 * This file is part of hidrd.
 *
 * Hidrd is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Hidrd is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with hidrd; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @author Nikolai Kondrashov <spbnick@gmail.com>
 *
 * @(#) $Id: snk.h 439 2010-05-24 13:59:30Z spb_nick $
 */

#ifndef __HIDRD_FMT_SPEC_SNK_H__
#define __HIDRD_FMT_SPEC_SNK_H__

#include "hidrd/strm/snk/inst.h"
#include "hidrd/fmt/spec/snk/ent_list.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Declarations of the specification example sink type methods and constants
 */
extern bool hidrd_spec_snk_init(hidrd_snk *snk, char **perr,
                                size_t tabstop, bool dumps, bool comments);
extern bool hidrd_spec_snk_initv(hidrd_snk *snk, char **perr, va_list ap);
extern const hidrd_opt_spec hidrd_spec_snk_opts_spec[];
extern bool hidrd_spec_snk_init_opts(hidrd_snk         *snk,
                                     char             **perr,
                                     const hidrd_opt   *list);
extern bool hidrd_spec_snk_valid(const hidrd_snk *snk);
extern char *hidrd_spec_snk_errmsg(const hidrd_snk *snk);
extern bool hidrd_spec_snk_put(hidrd_snk *snk, const hidrd_item *item);
extern bool hidrd_spec_snk_flush(hidrd_snk *snk);
extern void hidrd_spec_snk_clnp(hidrd_snk *snk);

/** Specification example sink type */
const hidrd_snk_type    hidrd_spec_snk;

/** Specification example sink item state table */
typedef struct hidrd_spec_snk_state hidrd_spec_snk_state;
struct hidrd_spec_snk_state {
    hidrd_spec_snk_state   *prev;       /**< Previous state */
    hidrd_usage_page        usage_page; /**< Usage page in effect */
};

/** Specification example sink error code */
typedef enum hidrd_spec_snk_err {
    HIDRD_SPEC_SNK_ERR_NONE,    /**< No error */
    HIDRD_SPEC_SNK_ERR_ALLOC    /**< Memory allocation failure */
} hidrd_spec_snk_err;

/** Specification example sink instance */
typedef struct hidrd_spec_snk_inst {
    hidrd_snk                   snk;        /**< Parent structure */
    size_t                      tabstop;    /**< Number of spaces per tab */
    bool                        dumps;      /**< "Output item dumps" flag */
    bool                        comments;   /**< "Output comments" flag */

    int                         depth;      /**< Current nesting depth */
    hidrd_spec_snk_state       *state;      /**< Item state table stack */

    hidrd_spec_snk_ent_list     list;       /**< Entry list */
    hidrd_spec_snk_err          err;        /**< Last error code */
} hidrd_spec_snk_inst;

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* __HIDRD_FMT_SPEC_SNK_H__ */