This file is indexed.

/usr/include/json-glib-1.0/json-glib/json-parser.h is in libjson-glib-dev 1.2.6-1.

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/* json-parser.h - JSON streams parser
 * 
 * This file is part of JSON-GLib
 * Copyright (C) 2007  OpenedHand Ltd.
 * Copyright (C) 2009  Intel Corp.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Author:
 *   Emmanuele Bassi  <ebassi@linux.intel.com>
 */

#ifndef __JSON_PARSER_H__
#define __JSON_PARSER_H__

#if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
#error "Only <json-glib/json-glib.h> can be included directly."
#endif

#include <gio/gio.h>
#include <json-glib/json-types.h>

G_BEGIN_DECLS

#define JSON_TYPE_PARSER                (json_parser_get_type ())
#define JSON_PARSER(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), JSON_TYPE_PARSER, JsonParser))
#define JSON_IS_PARSER(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), JSON_TYPE_PARSER))
#define JSON_PARSER_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), JSON_TYPE_PARSER, JsonParserClass))
#define JSON_IS_PARSER_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), JSON_TYPE_PARSER))
#define JSON_PARSER_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), JSON_TYPE_PARSER, JsonParserClass))

#define JSON_PARSER_ERROR               (json_parser_error_quark ())

typedef struct _JsonParser              JsonParser;
typedef struct _JsonParserPrivate       JsonParserPrivate;
typedef struct _JsonParserClass         JsonParserClass;

/**
 * JsonParserError:
 * @JSON_PARSER_ERROR_PARSE: parse error
 * @JSON_PARSER_ERROR_TRAILING_COMMA: unexpected trailing comma
 * @JSON_PARSER_ERROR_MISSING_COMMA: expected comma
 * @JSON_PARSER_ERROR_MISSING_COLON: expected colon
 * @JSON_PARSER_ERROR_INVALID_BAREWORD: invalid bareword
 * @JSON_PARSER_ERROR_EMPTY_MEMBER_NAME: empty member name (Since: 0.16)
 * @JSON_PARSER_ERROR_INVALID_DATA: invalid data (Since: 0.18)
 * @JSON_PARSER_ERROR_UNKNOWN: unknown error
 *
 * Error enumeration for #JsonParser
 *
 * This enumeration can be extended at later date
 */
typedef enum {
  JSON_PARSER_ERROR_PARSE,
  JSON_PARSER_ERROR_TRAILING_COMMA,
  JSON_PARSER_ERROR_MISSING_COMMA,
  JSON_PARSER_ERROR_MISSING_COLON,
  JSON_PARSER_ERROR_INVALID_BAREWORD,
  JSON_PARSER_ERROR_EMPTY_MEMBER_NAME,
  JSON_PARSER_ERROR_INVALID_DATA,

  JSON_PARSER_ERROR_UNKNOWN
} JsonParserError;

/**
 * JsonParser:
 * 
 * JSON data streams parser. The contents of the #JsonParser structure are
 * private and should only be accessed via the provided API.
 */
struct _JsonParser
{
  /*< private >*/
  GObject parent_instance;

  JsonParserPrivate *priv;
};

/**
 * JsonParserClass:
 * @parse_start: class handler for the JsonParser::parse-start signal
 * @object_start: class handler for the JsonParser::object-start signal
 * @object_member: class handler for the JsonParser::object-member signal
 * @object_end: class handler for the JsonParser::object-end signal
 * @array_start: class handler for the JsonParser::array-start signal
 * @array_element: class handler for the JsonParser::array-element signal
 * @array_end: class handler for the JsonParser::array-end signal
 * @parse_end: class handler for the JsonParser::parse-end signal
 * @error: class handler for the JsonParser::error signal
 *
 * #JsonParser class.
 */
struct _JsonParserClass
{
  /*< private >*/
  GObjectClass parent_class;

  /*< public  >*/
  void (* parse_start)   (JsonParser   *parser);

  void (* object_start)  (JsonParser   *parser);
  void (* object_member) (JsonParser   *parser,
                          JsonObject   *object,
                          const gchar  *member_name);
  void (* object_end)    (JsonParser   *parser,
                          JsonObject   *object);

  void (* array_start)   (JsonParser   *parser);
  void (* array_element) (JsonParser   *parser,
                          JsonArray    *array,
                          gint          index_);
  void (* array_end)     (JsonParser   *parser,
                          JsonArray    *array);

  void (* parse_end)     (JsonParser   *parser);
  
  void (* error)         (JsonParser   *parser,
                          const GError *error);

  /*< private >*/
  /* padding for future expansion */
  void (* _json_reserved1) (void);
  void (* _json_reserved2) (void);
  void (* _json_reserved3) (void);
  void (* _json_reserved4) (void);
  void (* _json_reserved5) (void);
  void (* _json_reserved6) (void);
  void (* _json_reserved7) (void);
  void (* _json_reserved8) (void);
};

JSON_AVAILABLE_IN_1_0
GQuark json_parser_error_quark (void);
JSON_AVAILABLE_IN_1_0
GType json_parser_get_type (void) G_GNUC_CONST;

JSON_AVAILABLE_IN_1_0
JsonParser *json_parser_new                     (void);
JSON_AVAILABLE_IN_1_2
JsonParser *json_parser_new_immutable           (void);
JSON_AVAILABLE_IN_1_0
gboolean    json_parser_load_from_file          (JsonParser           *parser,
                                                 const gchar          *filename,
                                                 GError              **error);
JSON_AVAILABLE_IN_1_0
gboolean    json_parser_load_from_data          (JsonParser           *parser,
                                                 const gchar          *data,
                                                 gssize                length,
                                                 GError              **error);
JSON_AVAILABLE_IN_1_0
gboolean    json_parser_load_from_stream        (JsonParser           *parser,
                                                 GInputStream         *stream,
                                                 GCancellable         *cancellable,
                                                 GError              **error);
JSON_AVAILABLE_IN_1_0
void        json_parser_load_from_stream_async  (JsonParser           *parser,
                                                 GInputStream         *stream,
                                                 GCancellable         *cancellable,
                                                 GAsyncReadyCallback   callback,
                                                 gpointer              user_data);
JSON_AVAILABLE_IN_1_0
gboolean    json_parser_load_from_stream_finish (JsonParser           *parser,
                                                 GAsyncResult         *result,
                                                 GError              **error);

JSON_AVAILABLE_IN_1_0
JsonNode *  json_parser_get_root                (JsonParser           *parser);

JSON_AVAILABLE_IN_1_0
guint       json_parser_get_current_line        (JsonParser           *parser);
JSON_AVAILABLE_IN_1_0
guint       json_parser_get_current_pos         (JsonParser           *parser);
JSON_AVAILABLE_IN_1_0
gboolean    json_parser_has_assignment          (JsonParser           *parser,
                                                 gchar               **variable_name);

#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonParser, g_object_unref)
#endif

G_END_DECLS

#endif /* __JSON_PARSER_H__ */