This file is indexed.

/usr/include/evolution/calendar/gui/e-cal-model.h is in evolution-dev 3.28.1-2.

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
/*
 *
 * Evolution calendar - Data model for ETable
 *
 * This program 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.
 *
 * This program 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 Lesser General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 *
 *
 * Authors:
 *		Rodrigo Moya <rodrigo@ximian.com>
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 */

#ifndef E_CAL_MODEL_H
#define E_CAL_MODEL_H

#include <libecal/libecal.h>

#include <e-util/e-util.h>
#include <shell/e-shell.h>
#include <calendar/gui/e-cal-data-model.h>

#include "e-cell-date-edit-text.h"

/* Standard GObject macros */
#define E_TYPE_CAL_MODEL \
	(e_cal_model_get_type ())
#define E_CAL_MODEL(obj) \
	(G_TYPE_CHECK_INSTANCE_CAST \
	((obj), E_TYPE_CAL_MODEL, ECalModel))
#define E_CAL_MODEL_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_CAST \
	((cls), E_TYPE_CAL_MODEL, ECalModelClass))
#define E_IS_CAL_MODEL(obj) \
	(G_TYPE_CHECK_INSTANCE_TYPE \
	((obj), E_TYPE_CAL_MODEL))
#define E_IS_CAL_MODEL_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_TYPE \
	((cls), E_TYPE_CAL_MODEL))
#define E_CAL_MODEL_GET_CLASS(obj) \
	(G_TYPE_INSTANCE_GET_CLASS \
	((obj), E_TYPE_CAL_MODEL, ECalModelClass))

/* Standard GObject macros */
#define E_TYPE_CAL_MODEL_COMPONENT \
	(e_cal_model_component_get_type ())
#define E_CAL_MODEL_COMPONENT(obj) \
	(G_TYPE_CHECK_INSTANCE_CAST \
	((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponent))
#define E_CAL_MODEL_COMPONENT_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_CAST \
	((cls), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponentClass))
#define E_IS_CAL_MODEL_COMPONENT(obj) \
	(G_TYPE_CHECK_INSTANCE_TYPE \
	((obj), E_TYPE_CAL_MODEL_COMPONENT))
#define E_IS_CAL_MODEL_COMPONENT_CLASS(cls) \
	(G_TYPE_CHECK_CLASS_TYPE \
	((cls), E_TYPE_CAL_MODEL_COMPONENT))
#define E_CAL_MODEL_COMPONENT_GET_CLASS(obj) \
	(G_TYPE_INSTANCE_GET_CLASS \
	((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponentClass))

G_BEGIN_DECLS

typedef enum {
	/* If you add new items here or reorder them, you have to update the
	 * .etspec files for the tables using this model */
	E_CAL_MODEL_FIELD_CATEGORIES,
	E_CAL_MODEL_FIELD_CLASSIFICATION,
	E_CAL_MODEL_FIELD_COLOR,            /* not a real field */
	E_CAL_MODEL_FIELD_COMPONENT,        /* not a real field */
	E_CAL_MODEL_FIELD_DESCRIPTION,
	E_CAL_MODEL_FIELD_DTSTART,
	E_CAL_MODEL_FIELD_HAS_ALARMS,       /* not a real field */
	E_CAL_MODEL_FIELD_ICON,             /* not a real field */
	E_CAL_MODEL_FIELD_SUMMARY,
	E_CAL_MODEL_FIELD_UID,
	E_CAL_MODEL_FIELD_CREATED,
	E_CAL_MODEL_FIELD_LASTMODIFIED,
	E_CAL_MODEL_FIELD_SOURCE,           /* not a real field */
	E_CAL_MODEL_FIELD_LAST
} ECalModelField;

typedef struct _ECalModel ECalModel;
typedef struct _ECalModelClass ECalModelClass;
typedef struct _ECalModelPrivate ECalModelPrivate;

typedef struct _ECalModelComponent ECalModelComponent;
typedef struct _ECalModelComponentClass ECalModelComponentClass;
typedef struct _ECalModelComponentPrivate ECalModelComponentPrivate;

struct _ECalModelComponent {
	GObject object;

	ECalClient *client;
	icalcomponent *icalcomp;
	time_t instance_start;
	time_t instance_end;
	gboolean is_new_component;

	/* Private data used by ECalModelCalendar and ECalModelTasks */
	/* keep these public to avoid many accessor functions */
	ECellDateEditValue *dtstart;
	ECellDateEditValue *dtend;
	ECellDateEditValue *due;
	ECellDateEditValue *completed;
	ECellDateEditValue *created;
	ECellDateEditValue *lastmodified;
	gchar *color;

	ECalModelComponentPrivate *priv;
};

struct _ECalModelComponentClass {
	GObjectClass parent_class;
};

typedef struct {
	ECalModelComponent *comp_data;
	gpointer cb_data;
} ECalModelGenerateInstancesData;

struct _ECalModel {
	GObject parent;
	ECalModelPrivate *priv;
};

struct _ECalModelClass {
	GObjectClass parent_class;

	/* virtual methods */
	const gchar *	(*get_color_for_component)
						(ECalModel *model,
						 ECalModelComponent *comp_data);
	void		(*store_values_from_model)
						(ECalModel *model,
						 ETableModel *source_model,
						 gint row,
						 GHashTable *values); /* column ID ~> value */
	void		(*fill_component_from_values)
						(ECalModel *model,
						 ECalModelComponent *comp_data,
						 GHashTable *values); /* column ID ~> value, populated by store_values_from_model() */

	/* Signals */
	void		(*time_range_changed)	(ECalModel *model,
						 gint64 start, /* time_t */
						 gint64 end); /* time_t */
	void		(*row_appended)		(ECalModel *model);
	void		(*comps_deleted)	(ECalModel *model,
						 gpointer list);
	void		(*timezone_changed)	(ECalModel *model,
						 icaltimezone *old_zone,
						 icaltimezone *new_zone);
	void		(*object_created)	(ECalModel *model,
						 ECalClient *where);
};

typedef time_t (*ECalModelDefaultTimeFunc) (ECalModel *model, gpointer user_data);

GType		e_cal_model_get_type		(void);
GType		e_cal_model_component_get_type	(void);
ECalDataModel *	e_cal_model_get_data_model	(ECalModel *model);
ESourceRegistry *
		e_cal_model_get_registry	(ECalModel *model);
EShell *	e_cal_model_get_shell		(ECalModel *model);
EClientCache *	e_cal_model_get_client_cache	(ECalModel *model);
icalcomponent_kind
		e_cal_model_get_component_kind	(ECalModel *model);
void		e_cal_model_set_component_kind	(ECalModel *model,
						 icalcomponent_kind kind);
gboolean	e_cal_model_get_confirm_delete	(ECalModel *model);
void		e_cal_model_set_confirm_delete	(ECalModel *model,
						 gboolean confirm_delete);
icaltimezone *	e_cal_model_get_timezone	(ECalModel *model);
void		e_cal_model_set_timezone	(ECalModel *model,
						 icaltimezone *zone);
gboolean	e_cal_model_get_compress_weekend
						(ECalModel *model);
void		e_cal_model_set_compress_weekend
						(ECalModel *model,
						 gboolean compress_weekend);
void		e_cal_model_set_default_category
						(ECalModel *model,
						 const gchar *default_cat);
gint		e_cal_model_get_default_reminder_interval
						(ECalModel *model);
void		e_cal_model_set_default_reminder_interval
						(ECalModel *model,
						 gint def_reminder_interval);
EDurationType	e_cal_model_get_default_reminder_units
						(ECalModel *model);
void		e_cal_model_set_default_reminder_units
						(ECalModel *model,
						 EDurationType def_reminder_units);
gboolean	e_cal_model_get_use_24_hour_format
						(ECalModel *model);
void		e_cal_model_set_use_24_hour_format
						(ECalModel *model,
						 gboolean use24);
gboolean	e_cal_model_get_use_default_reminder
						(ECalModel *model);
void		e_cal_model_set_use_default_reminder
						(ECalModel *model,
						 gboolean use_def_reminder);
GDateWeekday	e_cal_model_get_week_start_day	(ECalModel *model);
void		e_cal_model_set_week_start_day	(ECalModel *model,
						 GDateWeekday week_start_day);
gboolean	e_cal_model_get_work_day	(ECalModel *model,
						 GDateWeekday weekday);
void		e_cal_model_set_work_day	(ECalModel *model,
						 GDateWeekday weekday,
						 gboolean work_day);
GDateWeekday	e_cal_model_get_work_day_first	(ECalModel *model);
GDateWeekday	e_cal_model_get_work_day_last	(ECalModel *model);
gint		e_cal_model_get_work_day_end_hour
						(ECalModel *model);
void		e_cal_model_set_work_day_end_hour
						(ECalModel *model,
						 gint work_day_end_hour);
gint		e_cal_model_get_work_day_end_minute
						(ECalModel *model);
void		e_cal_model_set_work_day_end_minute
						(ECalModel *model,
						 gint work_day_end_minute);
gint		e_cal_model_get_work_day_start_hour
						(ECalModel *model);
void		e_cal_model_set_work_day_start_hour
						(ECalModel *model,
						 gint work_day_start_hour);
gint		e_cal_model_get_work_day_start_minute
						(ECalModel *model);
void		e_cal_model_set_work_day_start_minute
						(ECalModel *model,
						 gint work_day_start_minute);
gint		e_cal_model_get_work_day_start_mon
						(ECalModel *model);
void		e_cal_model_set_work_day_start_mon
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_mon
						(ECalModel *model);
void		e_cal_model_set_work_day_end_mon
						(ECalModel *model,
						 gint work_day_end);
gint		e_cal_model_get_work_day_start_tue
						(ECalModel *model);
void		e_cal_model_set_work_day_start_tue
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_tue
						(ECalModel *model);
void		e_cal_model_set_work_day_end_tue
						(ECalModel *model,
						 gint work_day_end);
gint		e_cal_model_get_work_day_start_wed
						(ECalModel *model);
void		e_cal_model_set_work_day_start_wed
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_wed
						(ECalModel *model);
void		e_cal_model_set_work_day_end_wed
						(ECalModel *model,
						 gint work_day_end);
gint		e_cal_model_get_work_day_start_thu
						(ECalModel *model);
void		e_cal_model_set_work_day_start_thu
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_thu
						(ECalModel *model);
void		e_cal_model_set_work_day_end_thu
						(ECalModel *model,
						 gint work_day_end);
gint		e_cal_model_get_work_day_start_fri
						(ECalModel *model);
void		e_cal_model_set_work_day_start_fri
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_fri
						(ECalModel *model);
void		e_cal_model_set_work_day_end_fri
						(ECalModel *model,
						 gint work_day_end);
gint		e_cal_model_get_work_day_start_sat
						(ECalModel *model);
void		e_cal_model_set_work_day_start_sat
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_sat
						(ECalModel *model);
void		e_cal_model_set_work_day_end_sat
						(ECalModel *model,
						 gint work_day_end);
gint		e_cal_model_get_work_day_start_sun
						(ECalModel *model);
void		e_cal_model_set_work_day_start_sun
						(ECalModel *model,
						 gint work_day_start);
gint		e_cal_model_get_work_day_end_sun
						(ECalModel *model);
void		e_cal_model_set_work_day_end_sun
						(ECalModel *model,
						 gint work_day_end);
void		e_cal_model_get_work_day_range_for
						(ECalModel *model,
						 GDateWeekday weekday,
						 gint *start_hour,
						 gint *start_minute,
						 gint *end_hour,
						 gint *end_minute);
const gchar *	e_cal_model_get_default_source_uid
						(ECalModel *model);
void		e_cal_model_set_default_source_uid
						(ECalModel *model,
						 const gchar *source_uid);
void		e_cal_model_remove_all_objects	(ECalModel *model);
void		e_cal_model_get_time_range	(ECalModel *model,
						 time_t *start,
						 time_t *end);
void		e_cal_model_set_time_range	(ECalModel *model,
						 time_t start,
						 time_t end);
icalcomponent *	e_cal_model_create_component_with_defaults_sync
						(ECalModel *model,
						 ECalClient *client,
						 gboolean all_day,
						 GCancellable *cancellable,
						 GError **error);
gchar *		e_cal_model_get_attendees_status_info
						(ECalModel *model,
						 ECalComponent *comp,
						 ECalClient *cal_client);
const gchar *	e_cal_model_get_color_for_component
						(ECalModel *model,
						 ECalModelComponent *comp_data);
gboolean	e_cal_model_get_rgba_for_component
						(ECalModel *model,
						 ECalModelComponent *comp_data,
						 GdkRGBA *rgba);
gboolean	e_cal_model_get_rgb_color_for_component
						(ECalModel *model,
						 ECalModelComponent *comp_data,
						 gdouble *red,
						 gdouble *green,
						 gdouble *blue);
ECalModelComponent *
		e_cal_model_get_component_at	(ECalModel *model,
						 gint row);
ECalModelComponent *
		e_cal_model_get_component_for_client_and_uid
						(ECalModel *model,
						 ECalClient *client,
						 const ECalComponentId *id);
gchar *		e_cal_model_date_value_to_string (ECalModel *model,
						 gconstpointer value);
void		e_cal_model_generate_instances_sync
						(ECalModel *model,
						 time_t start,
						 time_t end,
						 ECalRecurInstanceFn cb,
						 gpointer cb_data);
GPtrArray *	e_cal_model_get_object_array	(ECalModel *model);
void		e_cal_model_set_instance_times	(ECalModelComponent *comp_data,
						 const icaltimezone *zone);
gboolean	e_cal_model_test_row_editable	(ECalModel *model,
						 gint row);
void		e_cal_model_set_default_time_func
						(ECalModel *model,
						 ECalModelDefaultTimeFunc func,
						 gpointer user_data);

void		e_cal_model_update_comp_time	(ECalModel *model,
						 ECalModelComponent *comp_data,
						 gconstpointer time_value,
						 icalproperty_kind kind,
						 void (*set_func) (icalproperty *prop,
								   struct icaltimetype v),
						 icalproperty * (*new_func) (struct icaltimetype v));

void		e_cal_model_emit_object_created	(ECalModel *model,
						 ECalClient *where);

void		e_cal_model_modify_component	(ECalModel *model,
						 ECalModelComponent *comp_data,
						 ECalObjModType mod);

void		e_cal_model_util_set_value	(GHashTable *values,
						 ETableModel *table_model,
						 gint column,
						 gint row);
gpointer	e_cal_model_util_get_value	(GHashTable *values,
						 gint column);

ECellDateEditValue *
		e_cal_model_copy_cell_date_value
						(const ECellDateEditValue *value);

G_END_DECLS

#endif /* E_CAL_MODEL_H */