This file is indexed.

/usr/include/tse3/Panic.h is in libtse3-dev 0.3.1-4.3.

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
/*
 * @(#)Panic.h 3.00 21 June 1999
 *
 * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
 *
 * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
 *
 * This library is modifiable/redistributable under the terms of the GNU
 * General Public License.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; see the file COPYING. If not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 */

#ifndef TSE3_PANIC_H
#define TSE3_PANIC_H

#include "tse3/listen/Panic.h"

#include "tse3/Notifier.h"
#include "tse3/Midi.h"
#include "tse3/Playable.h"
#include "tse3/Serializable.h"

namespace TSE3
{
    /**
     * The Panic class encapsulates the playable 'panic' information that can
     * reset attached MIDI devices. This MIDI data stream is produced for a
     * single port number, which you can specify.
     *
     * Several different kinds of reset information can be sent:
     *   @li A basic MIDI reset sequence
     *   @li A GM format MIDI reset sequence
     *   @li A GS format MIDI reset sequence (to particular device IDs)
     *   @li An XG format MIDI reset sequence (to particular device IDs)
     *   @li Different MIDI protocol reset messages.
     *
     * @short   Playable 'panic' sequencer generator
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     MidiData
     * @see     PhraseList
     */
    class Panic : public Playable,
                  public Notifier<PanicListener>
    {
        public:

            /**
             * Creates a Panic object with the default values. These are
             * to send basic MIDI reset and GM MIDI reset sequences.
             *
             * The default output port is MidiScheduler::AllPorts.
             */
            Panic();
            virtual ~Panic();

            /**
             * Returns the panic status: whether this panic sequence is
             * generated.
             *
             * This takes precidence over all of the other status settings;
             * if it is set to false, no MIDI events will be generated by
             * the Panic object.
             *
             * @return Whether panic sequence is generated
             * @see    setStatus
             */
            bool status() const { return _status; }

            /**
             * Sets the panic sequence.
             *
             * @param s New status value
             * @see   status
             */
            void setStatus(bool s);

            /**
             * Returns which port the object will produce output on.
             *
             * @return Output port number
             * @see    setPort
             */
            int port() const { return _port; }

            /**
             * Sets the output port for this object.
             *
             * @param port New port number
             * @see   port
             */
            void setPort(int port);

            /*
             * Various MIDI protocol reset messages
             */

            /**
             * Returns the basic MIDI reset status.
             *
             * @return Whether MIDI reset is generated
             * @see    setMidiReset
             */
            bool midiReset() const { return _midi; }

            /**
             * Sets the basic MIDI reset status.
             *
             * @param s New status value
             * @see   midiReset
             */
            void setMidiReset(bool s);

            /**
             * Returns the GM format MIDI reset status.
             *
             * @return Whether GM reset is generated
             * @see    setGmReset
             */
            bool gmReset() const { return _gm; }

            /**
             * Sets the GM format MIDI reset status.
             *
             * @param s New status value
             * @see   gmReset
             */
            void setGmReset(bool s);

            /**
             * Returns the GS format MIDI reset status.
             *
             * @return Whether GS reset is generated
             * @see    setGsReset
             */
            bool gsReset() const { return _gs; }

            /**
             * Sets the GS format MIDI reset status.
             *
             * @param s New status value
             * @see   gsReset
             */
            void setGsReset(bool s);

            /**
             * Returns the XG format MIDI reset status.
             *
             * @return Whether XG reset is generated
             * @see    setXgReset
             */
            bool xgReset() const { return _xg; }

            /**
             * Sets the XG format MIDI reset status.
             *
             * @param s New status value
             * @see   xgReset
             */
            void setXgReset(bool s);

            /**
             * Returns the device mask for a GS device.
             *
             * @param  device A GS device ID (0-31)
             * @return true if a GS reset is enabled for that device
             * @see    setGsIDMask
             */
            bool gsIDMask(size_t device) const;

            /**
             * Sets a GS device mask.
             *
             * @param s New status value
             * @see   gsIDMask
             */
            void setGsIDMask(size_t device, bool s);

            /**
             * Returns the device mask for an XG device.
             *
             * @param  device An XG device ID (0-31)
             * @return true if an XG reset is enabled for that device
             * @see    setXgIDMask
             */
            bool xgIDMask(size_t device) const;

            /**
             * Sets an XG device mask.
             *
             * @param s New status value
             * @see   xgIDMask
             */
            void setXgIDMask(size_t device, bool s);

            /*
             * MIDI protocol messages.
             */

            /**
             * Whether to send a MidiControl_AllNotesOff.
             *
             * @return Whether MidiControl_AllNotesOff is generated
             * @see    setAllNotesOff
             */
            bool allNotesOff() { return _allNotesOff; }

            /**
             * Set whether to send a MidiControl_AllNotesOff.
             *
             * @param s New status value
             * @see   allNotesOff
             */
            void setAllNotesOff(bool s);

            /**
             * Whether to send a MidiCommand_NoteOff for every note manually.
             *
             * @return Whether manual note offs are generated
             * @see    setAllNotesOffManually
             */
            bool allNotesOffManually() { return _allNotesOffManually; }

            /**
             * Set whether to send a MidiCommand_NoteOff for every note
             * manually.
             *
             * @param s New status value
             * @see   allNotesOffManually
             */
            void setAllNotesOffManually(bool s);

            /**
             * Whether to send a MidiControl_ModulationMSB/LSB zero.
             *
             * @return Whether MidiControl_ModulationMSB/LSB are generated
             * @see    setAllModsOff
             */
            bool allModsOff() { return _allModsOff; }

            /**
             * Set whether to send a MidiControl_ModulationMSB/LSB zero.
             *
             * @param s New status value
             * @see   allModsOff
             */
            void setAllModsOff(bool s);

            /**
             * Whether to send a MidiCommand_PitchBend zero.
             *
             * @return Whether MidiCommand_PitchBend zero is generated
             * @see    setAllPitchOff
             */
            bool allPitchOff() { return _allPitchOff; }

            /**
             * Set whether to send a MidiCommand_PitchBend zero.
             *
             * @param s New status value
             * @see   allPitchOff
             */
            void setAllPitchOff(bool s);

            /**
             * Whether to send a MidiControl_ResetAllControllers.
             *
             * @return Whether MidiControl_ResetAllControllers is generated
             * @see    setAllCtrlOff
             */
            bool allCtrlOff() { return _allCtrlOff; }

            /**
             * Set whether to send a MidiControl_ResetAllControllers.
             *
             * @param s New status value
             * @see   allCtrlOff
             */
            void setAllCtrlOff(bool s);

            /**
             * Whether to send a list MidiControl_SustainPedal.
             *
             * @return Whether MidiControll_SustainPedal lift is generated
             * @see    setLiftSustain
             */
            bool liftSustain() { return _liftSustain; }

            /**
             * Set whether to send a list MidiControl_SustainPedal.
             *
             * @param s New status value
             * @see   liftSustain
             */
            void setLiftSustain(bool s);

            /**
             * @reimplemented
             */
            virtual PlayableIterator *iterator(Clock index);

            /**
             * @reimplemented
             */
            virtual Clock lastClock() const;

        protected:

            bool _status;

            int _port;

            // Various MIDI protocol resets
            bool         _midi, _gm, _gs, _xg;
            unsigned int gsMask, xgMask;

            // MIDI protocol messages
            bool _allNotesOff;
            bool _allNotesOffManually;
            bool _allModsOff;
            bool _allPitchOff;
            bool _allCtrlOff;
            bool _liftSustain;

        private:

            Panic &operator=(const Panic &);
            Panic(const Panic &);
    };
}

#endif