This file is indexed.

/usr/include/libinfinity-0.7/libinfinity/common/inf-chat-buffer.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __INF_CHAT_BUFFER_H__
#define __INF_CHAT_BUFFER_H__

#include <libinfinity/common/inf-buffer.h>
#include <libinfinity/common/inf-user.h>

#include <glib-object.h>

G_BEGIN_DECLS

#define INF_TYPE_CHAT_BUFFER                 (inf_chat_buffer_get_type())
#define INF_CHAT_BUFFER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST((obj), INF_TYPE_CHAT_BUFFER, InfChatBuffer))
#define INF_CHAT_BUFFER_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST((klass), INF_TYPE_CHAT_BUFFER, InfChatBufferClass))
#define INF_IS_CHAT_BUFFER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE((obj), INF_TYPE_CHAT_BUFFER))
#define INF_IS_CHAT_BUFFER_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE((klass), INF_TYPE_CHAT_BUFFER))
#define INF_CHAT_BUFFER_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS((obj), INF_TYPE_CHAT_BUFFER, InfChatBufferClass))

#define INF_TYPE_CHAT_BUFFER_MESSAGE_TYPE    (inf_chat_buffer_message_type_get_type())
#define INF_TYPE_CHAT_BUFFER_MESSAGE         (inf_chat_buffer_message_get_type())

typedef struct _InfChatBuffer InfChatBuffer;
typedef struct _InfChatBufferClass InfChatBufferClass;

typedef struct _InfChatBufferMessage InfChatBufferMessage;

/**
 * InfChatBufferMessageType:
 * @INF_CHAT_BUFFER_MESSAGE_NORMAL: A normal chat message.
 * @INF_CHAT_BUFFER_MESSAGE_EMOTE: An emote chat message (/me is doing
 * something).
 * @INF_CHAT_BUFFER_MESSAGE_USERJOIN: A user join notification.
 * @INF_CHAT_BUFFER_MESSAGE_USERPART: A user part notification.
 *
 * Possible chat message types.
 */
typedef enum _InfChatBufferMessageType {
  INF_CHAT_BUFFER_MESSAGE_NORMAL,
  INF_CHAT_BUFFER_MESSAGE_EMOTE,
  INF_CHAT_BUFFER_MESSAGE_USERJOIN,
  INF_CHAT_BUFFER_MESSAGE_USERPART
} InfChatBufferMessageType;

/**
 * InfChatBufferMessageFlags:
 * @INF_CHAT_BUFFER_MESSAGE_BACKLOG: The message is a backlog message, i.e.
 * it originated in a previous session.
 *
 * Possible chat message flags.
 */
typedef enum _InfChatBufferMessageFlags {
  INF_CHAT_BUFFER_MESSAGE_BACKLOG = 1 << 0
} InfChatBufferMessageFlags;

/**
 * InfChatBufferMessage:
 * @type: The #InfChatBufferMessageType of the message.
 * @user: The #InfUser that issued the message.
 * @text: The UTF-8 encoded text of the message.
 * @length: The length of the message, in bytes.
 * @time: The time at which the message was received.
 * @flags: Additional flags for the message, see #InfChatBufferMessageFlags.
 *
 * Represents a chat message.
 */
struct _InfChatBufferMessage {
  InfChatBufferMessageType type;
  InfUser* user;
  gchar* text;
  gsize length;
  time_t time;
  InfChatBufferMessageFlags flags;
};

/**
 * InfChatBufferClass:
 * @add_message: Default signal handler for the #InfChatBuffer::add-message
 * signal.
 *
 * This structure contains default signal handlers for #InfChatBuffer.
 */
struct _InfChatBufferClass {
  /*< private >*/
  GObjectClass parent_class;

  /*< public >*/
  void (*add_message)(InfChatBuffer* buffer,
                      const InfChatBufferMessage* message);
};

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

GType
inf_chat_buffer_message_get_type(void) G_GNUC_CONST;

GType
inf_chat_buffer_message_type_get_type(void) G_GNUC_CONST;

GType
inf_chat_buffer_message_flags_get_type(void) G_GNUC_CONST;

GType
inf_chat_buffer_get_type(void) G_GNUC_CONST;

InfChatBufferMessage*
inf_chat_buffer_message_copy(const InfChatBufferMessage* message);

void
inf_chat_buffer_message_free(InfChatBufferMessage* message);

InfChatBuffer*
inf_chat_buffer_new(guint size);

void
inf_chat_buffer_add_message(InfChatBuffer* buffer,
                            InfUser* by,
                            const gchar* message,
                            gsize length,
                            time_t time,
                            InfChatBufferMessageFlags flags);

void
inf_chat_buffer_add_emote_message(InfChatBuffer* buffer,
                                  InfUser* by,
                                  const gchar* message,
                                  gsize length,
                                  time_t time,
                                  InfChatBufferMessageFlags flags);

void
inf_chat_buffer_add_userjoin_message(InfChatBuffer* buffer,
                                     InfUser* user,
                                     time_t time,
                                     InfChatBufferMessageFlags flags);

void
inf_chat_buffer_add_userpart_message(InfChatBuffer* buffer,
                                     InfUser* user,
                                     time_t time,
                                     InfChatBufferMessageFlags flags);

const InfChatBufferMessage*
inf_chat_buffer_get_message(InfChatBuffer* buffer,
                            guint n);

guint
inf_chat_buffer_get_n_messages(InfChatBuffer* buffer);

guint
inf_chat_buffer_get_size(InfChatBuffer* buffer);

G_END_DECLS

#endif /* __INF_CHAT_BUFFER_H__ */

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