This file is indexed.

/usr/include/libinfinity-0.7/libinfinity/adopted/inf-adopted-session.h is in libinfinity-0.7-dev 0.7.1-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
/* libinfinity - a GObject-based infinote implementation
 * Copyright (C) 2007-2015 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_ADOPTED_SESSION_H__
#define __INF_ADOPTED_SESSION_H__

#include <libinfinity/adopted/inf-adopted-algorithm.h>
#include <libinfinity/adopted/inf-adopted-operation.h>
#include <libinfinity/common/inf-session.h>
#include <libinfinity/common/inf-io.h>

#include <glib-object.h>

G_BEGIN_DECLS

#define INF_ADOPTED_TYPE_SESSION                 (inf_adopted_session_get_type())
#define INF_ADOPTED_SESSION(obj)                 (G_TYPE_CHECK_INSTANCE_CAST((obj), INF_ADOPTED_TYPE_SESSION, InfAdoptedSession))
#define INF_ADOPTED_SESSION_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST((klass), INF_ADOPTED_TYPE_SESSION, InfAdoptedSessionClass))
#define INF_ADOPTED_IS_SESSION(obj)              (G_TYPE_CHECK_INSTANCE_TYPE((obj), INF_ADOPTED_TYPE_SESSION))
#define INF_ADOPTED_IS_SESSION_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE((klass), INF_ADOPTED_TYPE_SESSION))
#define INF_ADOPTED_SESSION_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS((obj), INF_ADOPTED_TYPE_SESSION, InfAdoptedSessionClass))

typedef struct _InfAdoptedSession InfAdoptedSession;
typedef struct _InfAdoptedSessionClass InfAdoptedSessionClass;

/**
 * InfAdoptedSessionError:
 * @INF_ADOPTED_SESSION_ERROR_NO_SUCH_USER: The "user" field in a request
 * message does not contain a valid user ID.
 * @INF_ADOPTED_SESSION_ERROR_MISSING_OPERATION: A request message does not
 * contain an operation.
 * @INF_ADOPTED_SESSION_ERROR_INVALID_REQUEST: A request in a synchronized
 * request log is invalid. Invalid means that it is not the request that
 * was issued after the previous request in the log, or that it is an Undo
 * or Redo request without a request to Undo or Redo, respectively.
 * @INF_ADOPTED_SESSION_ERROR_MISSING_STATE_VECTOR: A synchronized user does
 * not contain that the state that user currently is in.
 * @INF_ADOPTED_SESSION_ERROR_FAILED: No further specified error code.
 *
 * Error codes for #InfAdoptedSession. These only occur when invalid requests
 * are received from the network.
 */
typedef enum _InfAdoptedSessionError {
  INF_ADOPTED_SESSION_ERROR_NO_SUCH_USER,
  INF_ADOPTED_SESSION_ERROR_MISSING_OPERATION,
  INF_ADOPTED_SESSION_ERROR_INVALID_REQUEST,

  INF_ADOPTED_SESSION_ERROR_MISSING_STATE_VECTOR,
  
  INF_ADOPTED_SESSION_ERROR_FAILED
} InfAdoptedSessionError;

/**
 * InfAdoptedSessionClass:
 * @xml_to_request: Virtual function to deserialize an #InfAdoptedRequest
 * from XML. The implementation of this function can use
 * inf_adopted_session_read_request_info() to read the common info.
 * @request_to_xml: Virtual function to serialize an #InfAdoptedRequest
 * to XML. This function should add properties and children to the given XML
 * node. At might use inf_adopted_session_write_request_info() to write the
 * common info.
 * @check_request: Default signal handler of the
 * InfAdoptedSession::check-request signal.
 *
 * Virtual functions and default signal handlers for #InfAdoptedSession.
 */
struct _InfAdoptedSessionClass {
  /*< private >*/
  InfSessionClass parent_class;

  /* Virtual table */

  /*< public >*/
  InfAdoptedRequest*(*xml_to_request)(InfAdoptedSession* session,
                                      xmlNodePtr xml,
                                      InfAdoptedStateVector* diff_vec,
                                      gboolean for_sync,
                                      GError** error);

  void(*request_to_xml)(InfAdoptedSession* session,
                        xmlNodePtr xml,
                        InfAdoptedRequest* request,
                        InfAdoptedStateVector* diff_vec,
                        gboolean for_sync);

  /* Signals */

  gboolean(*check_request)(InfAdoptedSession* session,
                           InfAdoptedRequest* request,
                           InfAdoptedUser* user);
};

/**
 * InfAdoptedSession:
 *
 * #InfAdoptedSession is an opaque data type. You should only access it via
 * the public API functions.
 */
struct _InfAdoptedSession {
  /*< private >*/
  InfSession parent;
};

GType
inf_adopted_session_get_type(void);

InfIo*
inf_adopted_session_get_io(InfAdoptedSession* session);

InfAdoptedAlgorithm*
inf_adopted_session_get_algorithm(InfAdoptedSession* session);

void
inf_adopted_session_broadcast_request(InfAdoptedSession* session,
                                      InfAdoptedRequest* request);

void
inf_adopted_session_undo(InfAdoptedSession* session,
                         InfAdoptedUser* user,
                         guint n);

void
inf_adopted_session_redo(InfAdoptedSession* session,
                         InfAdoptedUser* user,
                         guint n);

gboolean
inf_adopted_session_read_request_info(InfAdoptedSession* session,
                                      xmlNodePtr xml,
                                      InfAdoptedStateVector* diff_vec,
                                      InfAdoptedUser** user,
                                      InfAdoptedStateVector** time,
                                      xmlNodePtr* operation,
                                      GError** error);

void
inf_adopted_session_write_request_info(InfAdoptedSession* session,
                                       InfAdoptedRequest* request,
                                       InfAdoptedStateVector* diff_vec,
                                       xmlNodePtr xml,
                                       xmlNodePtr operation);

G_END_DECLS

#endif /* __INF_ADOPTED_SESSION_H__ */

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