This file is indexed.

/usr/include/libinfinity-0.6/libinfinity/common/inf-browser.h is in libinfinity-0.6-dev 0.6.7-1build1.

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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
/* libinfinity - a GObject-based infinote implementation
 * Copyright (C) 2007-2014 Armin Burgmeier <armin@arbur.net>
 *
 * 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 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, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */

#ifndef __INF_BROWSER_H__
#define __INF_BROWSER_H__

#include <glib-object.h>
#include <libinfinity/common/inf-browser-iter.h>
#include <libinfinity/common/inf-request.h>
#include <libinfinity/common/inf-session-proxy.h>
#include <libinfinity/common/inf-session.h>
#include <libinfinity/common/inf-acl.h>

G_BEGIN_DECLS

#define INF_TYPE_BROWSER                 (inf_browser_get_type())
#define INF_BROWSER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST((obj), INF_TYPE_BROWSER, InfBrowser))
#define INF_IS_BROWSER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE((obj), INF_TYPE_BROWSER))
#define INF_BROWSER_GET_IFACE(inst)      (G_TYPE_INSTANCE_GET_INTERFACE((inst), INF_TYPE_BROWSER, InfBrowserIface))

#define INF_TYPE_BROWSER_STATUS          (inf_browser_status_get_type())

/**
 * InfBrowser:
 *
 * #InfBrowser is an opaque data type. You should only access it
 * via the public API functions.
 */
typedef struct _InfBrowser InfBrowser;
typedef struct _InfBrowserIface InfBrowserIface;

/**
 * InfBrowserStatus:
 * @INF_BROWSER_CLOSED: The browser is closed and cannot be used currently.
 * @INF_BROWSER_OPENING: The browser is currently being opened but cannot be
 * used yet.
 * @INF_BROWSER_OPEN: The browser is open and can be used to browse the
 * directory.
 *
 * This enumeration contains possible status values for
 * #InfBrowser. Several operations, such as exploring a node or subscribing
 * to a session can only be performed when the browser is open (for example,
 * connected to a remote infinote server).
 */
typedef enum _InfBrowserStatus {
  INF_BROWSER_CLOSED,
  INF_BROWSER_OPENING,
  INF_BROWSER_OPEN
} InfBrowserStatus;

/**
 * InfBrowserIface:
 * @error: Default signal handler for the #InfBrowser::error signal.
 * @node_added: Default signal handler for the #InfBrowser::node-added
 * signal.
 * @node_removed: Default signal handler for the #InfBrowser::node-removed
 * signal.
 * @subscribe_session: Default signal handler for the
 * #InfBrowser::subscribe-session signal.
 * @unsubscribe_session: Default signal handler for the
 * #InfBrowser::unsubscribe-session signal.
 * @begin_request: Default signal handler for the
 * #InfBrowser::begin-request signal.
 * @acl_account_added: Default signal handler for the
 * #InfBrowser::acl-account-added signal.
 * @acl_account_removed: Default signal handler for the
 * #InfBrowser::acl-account-removed signal.
 * @acl_local_account_changed: Default signal handler for the
 * #InfBrowser::acl-local-account-changed signal.
 * @acl_changed: Default signal handler for the
 * #InfBrowser::acl-changed signal.
 * @get_root: Virtual function to return the root node of the browser.
 * @get_next: Virtual function to return the next sibling in a browser.
 * @get_prev: Virtual function to return the previous sibling in a browser.
 * @get_parent: Virtual function to return the parent node in a browser.
 * @get_child: Virtual function to return the first child node in a browser.
 * @explore: Virtual function to start exploring a node.
 * @get_explored: Virtual function to query whether a node is explored
 * already.
 * @is_subdirectory: Virtual function to find out whether a node is a
 * subdirectory node.
 * @add_note: Virtual function to add a new leaf node to the directory.
 * @add_subdirectory: Virtual function to a new subdirectory node to the
 * directory.
 * @remove_node: Virtual function to remove a node from the directory.
 * @get_node_name: Virtual function to return the name of a node in a browser.
 * @get_node_type: Virtual function to return the type of a node in a browser.
 * @subscribe: Virtual function to subscribe to a session of a node in a
 * browser.
 * @get_session: Virtual function to return a session for a node in a browser.
 * @list_pending_requests: Virtual function to return a list of all pending
 * requests for a node in a browser.
 * @iter_from_request: Virtual function to return an iterator pointing to the
 * node a given request was made for.
 * @get_acl_default_account: Virtual function to return the
 * &quot;default&quot; ACL account.
 * @get_acl_local_account: Virtual function to return the ACL account of the
 * local host.
 * @query_acl_account_list: Virtual function for querying the list of
 * accounts.
 * @lookup_acl_accounts: Virtual function to find accounts by their ID.
 * @lookup_acl_account_by_name: Virtual function to find an account by its
 * name.
 * @create_acl_account: Virtual function to create a new account.
 * @remove_acl_account: Virtual function to remove an account.
 * @query_acl: Virtual function for querying the ACL for a node for all
 * other users.
 * @has_acl: Virtual function for checking whether the ACL has been queried
 * or is otherwise available.
 * @get_acl: Virtual function for obtaining the full ACL for a node.
 * @set_acl: Virtual function for changing the ACL for one node.
 *
 * Signals and virtual functions for the #InfBrowser interface.
 */
struct _InfBrowserIface {
  /*< private >*/
  GTypeInterface parent;

  /* Signals */

  /*< public >*/
  void (*error)(InfBrowser* browser,
                const GError* error);

  void (*node_added)(InfBrowser* browser,
                     const InfBrowserIter* iter,
                     InfRequest* request);

  void (*node_removed)(InfBrowser* browser,
                       const InfBrowserIter* iter,
                       InfRequest* request);

  void (*subscribe_session)(InfBrowser* browser,
                            const InfBrowserIter* iter,
                            InfSessionProxy* proxy,
                            InfRequest* request);

  void (*unsubscribe_session)(InfBrowser* browser,
                              const InfBrowserIter* iter,
                              InfSessionProxy* proxy,
                              InfRequest* request);

  void (*begin_request)(InfBrowser* browser,
                        const InfBrowserIter* iter,
                        InfRequest* request);

  void (*acl_account_added)(InfBrowser* browser,
                            const InfAclAccount* account,
                            InfRequest* request);

  void (*acl_account_removed)(InfBrowser* browser,
                              const InfAclAccount* account,
                              InfRequest* request);

  void (*acl_local_account_changed)(InfBrowser* browser,
                                    const InfAclAccount* account,
                                    InfRequest* request);

  void (*acl_changed)(InfBrowser* browser,
                      const InfBrowserIter* iter,
                      const InfAclSheetSet* sheet_set,
                      InfRequest* request);

  /* Virtual functions */

  gboolean (*get_root)(InfBrowser* browser,
                       InfBrowserIter* iter);
  gboolean (*get_next)(InfBrowser* browser,
                       InfBrowserIter* iter);
  gboolean (*get_prev)(InfBrowser* browser,
                       InfBrowserIter* iter);
  gboolean (*get_parent)(InfBrowser* browser,
                         InfBrowserIter* iter);
  gboolean (*get_child)(InfBrowser* browser,
                        InfBrowserIter* iter);
  InfRequest* (*explore)(InfBrowser* browser,
                         const InfBrowserIter* iter,
                         InfRequestFunc func,
                         gpointer user_data);
  gboolean (*get_explored)(InfBrowser* browser,
                           const InfBrowserIter* iter);
  gboolean (*is_subdirectory)(InfBrowser* browser,
                              const InfBrowserIter* iter);

  InfRequest* (*add_note)(InfBrowser* browser,
                          const InfBrowserIter* iter,
                          const char* name,
                          const char* type,
                          const InfAclSheetSet* acl,
                          InfSession* session,
                          gboolean initial_subscribe,
                          InfRequestFunc func,
                          gpointer user_data);
  InfRequest* (*add_subdirectory)(InfBrowser* browser,
                                  const InfBrowserIter* iter,
                                  const char* name,
                                  const InfAclSheetSet* acl,
                                  InfRequestFunc func,
                                  gpointer user_data);
  InfRequest* (*remove_node)(InfBrowser* browser,
                             const InfBrowserIter* iter,
                             InfRequestFunc func,
                             gpointer user_data);
  const gchar* (*get_node_name)(InfBrowser* browser,
                                const InfBrowserIter* iter);
  const gchar* (*get_node_type)(InfBrowser* browser,
                                const InfBrowserIter* iter);

  InfRequest* (*subscribe)(InfBrowser* browser,
                           const InfBrowserIter* iter,
                           InfRequestFunc func,
                           gpointer user_data);
  InfSessionProxy* (*get_session)(InfBrowser* browser,
                                  const InfBrowserIter* iter);

  GSList* (*list_pending_requests)(InfBrowser* browser,
                                   const InfBrowserIter* iter,
                                   const gchar* request_type);
  gboolean (*iter_from_request)(InfBrowser* browser,
                                InfRequest* request,
                                InfBrowserIter* iter);

  const InfAclAccount* (*get_acl_default_account)(InfBrowser* browser);

  const InfAclAccount* (*get_acl_local_account)(InfBrowser* browser);

  InfRequest* (*query_acl_account_list)(InfBrowser* browser,
                                        InfRequestFunc func,
                                        gpointer user_data);

  InfRequest* (*lookup_acl_accounts)(InfBrowser* browser,
                                     const InfAclAccountId* ids,
                                     guint n_ids,
                                     InfRequestFunc func,
                                     gpointer user_data);

  InfRequest* (*lookup_acl_account_by_name)(InfBrowser* browser,
                                            const gchar* name,
                                            InfRequestFunc func,
                                            gpointer user_data);

  InfRequest* (*create_acl_account)(InfBrowser* browser,
                                    gnutls_x509_crq_t crq,
                                    InfRequestFunc func,
                                    gpointer user_data);

  InfRequest* (*remove_acl_account)(InfBrowser* browser,
                                    InfAclAccountId account,
                                    InfRequestFunc func,
                                    gpointer user_data);

  InfRequest* (*query_acl)(InfBrowser* browser,
                           const InfBrowserIter* iter,
                           InfRequestFunc func,
                           gpointer user_data);

  gboolean (*has_acl)(InfBrowser* browser,
                      const InfBrowserIter* iter,
                      InfAclAccountId account);

  const InfAclSheetSet* (*get_acl)(InfBrowser* browser,
                                   const InfBrowserIter* iter);

  InfRequest* (*set_acl)(InfBrowser* browser,
                         const InfBrowserIter* iter,
                         const InfAclSheetSet* sheet_set,
                         InfRequestFunc func,
                         gpointer user_data);
};

GType
inf_browser_status_get_type(void) G_GNUC_CONST;

GType
inf_browser_get_type(void) G_GNUC_CONST;

gboolean
inf_browser_get_root(InfBrowser* browser,
                     InfBrowserIter* iter);

gboolean
inf_browser_get_next(InfBrowser* browser,
                     InfBrowserIter* iter);

gboolean
inf_browser_get_prev(InfBrowser* browser,
                     InfBrowserIter* iter);

gboolean
inf_browser_get_parent(InfBrowser* browser,
                       InfBrowserIter* iter);

gboolean
inf_browser_get_child(InfBrowser* browser,
                      InfBrowserIter* iter);

gboolean
inf_browser_is_ancestor(InfBrowser* browser,
                        const InfBrowserIter* ancestor,
                        const InfBrowserIter* iter);

InfRequest*
inf_browser_explore(InfBrowser* browser,
                    const InfBrowserIter* iter,
                    InfRequestFunc func,
                    gpointer user_data);

gboolean
inf_browser_get_explored(InfBrowser* browser,
                         const InfBrowserIter* iter);

gboolean
inf_browser_is_subdirectory(InfBrowser* browser,
                            const InfBrowserIter* iter);

InfRequest*
inf_browser_add_note(InfBrowser* browser,
                     const InfBrowserIter* iter,
                     const char* name,
                     const char* type,
                     const InfAclSheetSet* acl,
                     InfSession* session,
                     gboolean initial_subscribe,
                     InfRequestFunc func,
                     gpointer user_data);

InfRequest*
inf_browser_add_subdirectory(InfBrowser* browser,
                             const InfBrowserIter* iter,
                             const char* name,
                             const InfAclSheetSet* acl,
                             InfRequestFunc func,
                             gpointer user_data);

InfRequest*
inf_browser_remove_node(InfBrowser* browser,
                        const InfBrowserIter* iter,
                        InfRequestFunc func,
                        gpointer user_data);

const gchar*
inf_browser_get_node_name(InfBrowser* browser,
                          const InfBrowserIter* iter);

const gchar*
inf_browser_get_node_type(InfBrowser* browser,
                          const InfBrowserIter* iter);

gchar*
inf_browser_get_path(InfBrowser* browser,
                     const InfBrowserIter* iter);

InfRequest*
inf_browser_subscribe(InfBrowser* browser,
                      const InfBrowserIter* iter,
                      InfRequestFunc func,
                      gpointer user_data);

InfSessionProxy*
inf_browser_get_session(InfBrowser* browser,
                        const InfBrowserIter* iter);

GSList*
inf_browser_list_pending_requests(InfBrowser* browser,
                                  const InfBrowserIter* iter,
                                  const gchar* request_type);

gboolean
inf_browser_iter_from_request(InfBrowser* browser,
                              InfRequest* request,
                              InfBrowserIter* iter);

InfRequest*
inf_browser_get_pending_request(InfBrowser* browser,
                                const InfBrowserIter* iter,
                                const gchar* request_type);

const InfAclAccount*
inf_browser_get_acl_default_account(InfBrowser* browser);

const InfAclAccount*
inf_browser_get_acl_local_account(InfBrowser* browser);

InfRequest*
inf_browser_query_acl_account_list(InfBrowser* browser,
                                   InfRequestFunc func,
                                   gpointer user_data);

InfRequest*
inf_browser_lookup_acl_accounts(InfBrowser* browser,
                                const InfAclAccountId* ids,
                                guint n_ids,
                                InfRequestFunc func,
                                gpointer user_data);

InfRequest*
inf_browser_lookup_acl_account_by_name(InfBrowser* browser,
                                       const gchar* name,
                                       InfRequestFunc func,
                                       gpointer user_data);

InfRequest*
inf_browser_create_acl_account(InfBrowser* browser,
                               gnutls_x509_crq_t crq,
                               InfRequestFunc func,
                               gpointer user_data);

InfRequest*
inf_browser_remove_acl_account(InfBrowser* browser,
                               InfAclAccountId account,
                               InfRequestFunc func,
                               gpointer user_data);

InfRequest*
inf_browser_query_acl(InfBrowser* browser,
                      const InfBrowserIter* iter,
                      InfRequestFunc func,
                      gpointer user_data);

gboolean
inf_browser_has_acl(InfBrowser* browser,
                    const InfBrowserIter* iter,
                    InfAclAccountId account);

const InfAclSheetSet*
inf_browser_get_acl(InfBrowser* browser,
                    const InfBrowserIter* iter);

InfRequest*
inf_browser_set_acl(InfBrowser* browser,
                    const InfBrowserIter* iter,
                    const InfAclSheetSet* sheet_set,
                    InfRequestFunc func,
                    gpointer user_data);

gboolean
inf_browser_check_acl(InfBrowser* browser,
                      const InfBrowserIter* iter,
                      InfAclAccountId account,
                      const InfAclMask* check_mask,
                      InfAclMask* out_mask);

void
inf_browser_error(InfBrowser* browser,
                  const GError* error);

void
inf_browser_node_added(InfBrowser* browser,
                       const InfBrowserIter* iter,
                       InfRequest* request);

void
inf_browser_node_removed(InfBrowser* browser,
                         const InfBrowserIter* iter,
                         InfRequest* request);

void
inf_browser_subscribe_session(InfBrowser* browser,
                              const InfBrowserIter* iter,
                              InfSessionProxy* proxy,
                              InfRequest* request);

void
inf_browser_unsubscribe_session(InfBrowser* browser,
                                const InfBrowserIter* iter,
                                InfSessionProxy* proxy,
                                InfRequest* request);

void
inf_browser_begin_request(InfBrowser* browser,
                          const InfBrowserIter* iter,
                          InfRequest* request);

void
inf_browser_acl_account_added(InfBrowser* browser,
                              const InfAclAccount* account,
                              InfRequest* request);

void
inf_browser_acl_account_removed(InfBrowser* browser,
                                const InfAclAccount* account,
                                InfRequest* request);

void
inf_browser_acl_local_account_changed(InfBrowser* browser,
                                      const InfAclAccount* account,
                                      InfRequest* request);

void
inf_browser_acl_changed(InfBrowser* browser,
                        const InfBrowserIter* iter,
                        const InfAclSheetSet* sheet_set,
                        InfRequest* request);

G_END_DECLS

#endif /* __INF_BROWSER_H__ */

/* vim:set et sw=2 ts=2: */