This file is indexed.

/usr/include/libdivecomputer/device.h is in libdivecomputer-dev 0.4.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
/* 
 * libdivecomputer
 * 
 * Copyright (C) 2008 Jef Driesen
 * 
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301 USA
 */

#ifndef DC_DEVICE_H
#define DC_DEVICE_H

#include "common.h"
#include "context.h"
#include "descriptor.h"
#include "buffer.h"
#include "datetime.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef enum dc_event_type_t {
	DC_EVENT_WAITING = (1 << 0),
	DC_EVENT_PROGRESS = (1 << 1),
	DC_EVENT_DEVINFO = (1 << 2),
	DC_EVENT_CLOCK = (1 << 3),
	DC_EVENT_VENDOR = (1 << 4)
} dc_event_type_t;

typedef struct dc_device_t dc_device_t;

typedef struct dc_event_progress_t {
	unsigned int current;
	unsigned int maximum;
} dc_event_progress_t;

typedef struct dc_event_devinfo_t {
	unsigned int model;
	unsigned int firmware;
	unsigned int serial;
} dc_event_devinfo_t;

typedef struct dc_event_clock_t {
	unsigned int devtime;
	dc_ticks_t systime;
} dc_event_clock_t;

typedef struct dc_event_vendor_t {
	const unsigned char *data;
	unsigned int size;
} dc_event_vendor_t;

typedef int (*dc_cancel_callback_t) (void *userdata);

typedef void (*dc_event_callback_t) (dc_device_t *device, dc_event_type_t event, const void *data, void *userdata);

typedef int (*dc_dive_callback_t) (const unsigned char *data, unsigned int size, const unsigned char *fingerprint, unsigned int fsize, void *userdata);

dc_status_t
dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descriptor, const char *name);

dc_family_t
dc_device_get_type (dc_device_t *device);

dc_status_t
dc_device_set_cancel (dc_device_t *device, dc_cancel_callback_t callback, void *userdata);

dc_status_t
dc_device_set_events (dc_device_t *device, unsigned int events, dc_event_callback_t callback, void *userdata);

dc_status_t
dc_device_set_fingerprint (dc_device_t *device, const unsigned char data[], unsigned int size);

dc_status_t
dc_device_version (dc_device_t *device, unsigned char data[], unsigned int size);

dc_status_t
dc_device_read (dc_device_t *device, unsigned int address, unsigned char data[], unsigned int size);

dc_status_t
dc_device_write (dc_device_t *device, unsigned int address, const unsigned char data[], unsigned int size);

dc_status_t
dc_device_dump (dc_device_t *device, dc_buffer_t *buffer);

dc_status_t
dc_device_foreach (dc_device_t *device, dc_dive_callback_t callback, void *userdata);

dc_status_t
dc_device_close (dc_device_t *device);

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* DC_DEVICE_H */