This file is indexed.

/usr/include/libdjconsole/djconsole.h is in libdjconsole-dev 0.1.3-1ubuntu2.

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
/****************************************************************************
(c) 2006 Melanie Thielker

This file is part of libdjconsole.

libdjconsole is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

libdjconsole 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 General Public License along with
libdjconsole; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 
****************************************************************************/

#ifndef _DJCONSOLE_H_INCLUDED
#define _DJCONSOLE_H_INCLUDED

#include <pthread.h>
#include <usb.h>

#include "delta.h"
#include "bitfield.h"

#define LEDS 16
#define BUTTONS 32

#define LEFT_PLAY 1
#define LEFT_CUE 2
#define RIGHT_PLAY 3
#define RIGHT_CUE 4
#define LEFT_MASTER_TEMPO 5
#define RIGHT_MASTER_TEMPO 6
#define LEFT_AUTO_BEAT 7
#define RIGHT_AUTO_BEAT 8
#define LEFT_FX 9
#define RIGHT_FX 10
#define LEFT_FX_CUE 11
#define RIGHT_FX_CUE 12
#define LEFT_LOOP 13
#define RIGHT_LOOP 14
#define LEFT_MONITOR 15
#define RIGHT_MONITOR 16
#define LEFT_SKIP_BACK 17
#define LEFT_SKIP_FORWARD 18
#define RIGHT_SKIP_BACK 19
#define RIGHT_SKIP_FORWARD 20
#define LEFT_PITCH_DOWN 21
#define LEFT_PITCH_UP 22
#define RIGHT_PITCH_DOWN 23
#define RIGHT_PITCH_UP 24
#define LEFT_1 25
#define LEFT_2 26
#define LEFT_3 27
#define RIGHT_1 28
#define RIGHT_2 29
#define RIGHT_3 30
#define LEFT_FX_SELECT 31
#define RIGHT_FX_SELECT 32
#define LEFT_BASS 33
#define LEFT_MID 34
#define LEFT_HIGH 35
#define RIGHT_BASS 36
#define RIGHT_MID 37
#define RIGHT_HIGH 38
#define LEFT_VOL 39
#define RIGHT_VOL 40
#define LEFT_PITCH 41
#define RIGHT_PITCH 42
#define LEFT_JOG 43
#define RIGHT_JOG 44
#define XFADER 45

#define MOUSE_X 46
#define MOUSE_Y 47
#define MOUSE_L 48
#define MOUSE_R 49

// DJ Console Mk2 Headphone monitor switch
#define MONITOR_DECK_A 51
#define MONITOR_DECK_B 52
#define MONITOR_MIX 58
#define MONITOR_SPLIT 54

// DJ Console RMX
// Rmx Controls
#define GAIN_A 902
#define GAIN_B 903
#define MAIN_VOL 900
#define BALANCE 901

// Rmx Buttons
#define SCRATCH 601
#define LEFT_KILL_HIGH 1032
#define LEFT_KILL_MID 1064
#define LEFT_KILL_BASS 1128
#define RIGHT_KILL_HIGH 2032
#define RIGHT_KILL_MID 2064
#define RIGHT_KILL_BASS 2128
#define LOAD_DECK_A 302
#define LOAD_DECK_B 332
#define LEFT_PITCH_RESET 301
#define RIGHT_PITCH_RESET 4128
#define UP 602
#define DOWN 604
#define LEFT 608
#define RIGHT 616

#define LEFT_STOP 216
#define RIGHT_STOP 516
#define LEFT_4 108
#define LEFT_5 116
#define LEFT_6 132
#define RIGHT_4 408
#define RIGHT_5 416
#define RIGHT_6 432

class DJConsole
{
public:
	DJConsole(bool load_data=false);
	~DJConsole();

	bool detected();
	bool ready();
	void setCallback(void (*)(void *, int, int), void *);
	void loadData();

	unsigned short vendor();
	unsigned short product();

	Delta ControlDelta;
	Delta MouseDelta;
	Bitfield Leds;
protected:
	pthread_t Worker1, Worker2;
	pthread_mutex_t EventLock;
	pthread_mutex_t StartLock;
	pthread_cond_t StartSignal;

	void (*Callback)(void *, int, int);
	void *UserData;

	bool Worker1Started, Worker1Running, Worker2Started, Worker2Running;
	static void *worker1Helper(void *);
	static void *worker2Helper(void *);
	static void worker1Reset(void *);
	static void worker2Reset(void *);

	void worker1();
	void worker2();

	bool startThreads();
	void stopThreads();
	void setLeds();

	void processEvent(DeltaEvent ev);

	bool Opened;
	usb_dev_handle *hdev1;
	usb_dev_handle *hdev2;
	struct usb_device *dev;
	int ControlInterface;
	int MouseInterface;
	int Configuration;
	unsigned short Vendor;
	unsigned short Product;
};

#endif