This file is indexed.

/usr/include/tse3/app/Application.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
/*
 * @(#)app/Application.h 1.00 16 Nov 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_APP_APPLICATION_H
#define TSE3_APP_APPLICATION_H

#include "tse3/Song.h"

#include <string>
#include <vector>
#include <map>
#include <cstddef>

namespace TSE3
{
    class Metronome;
    class Transport;
    class MidiScheduler;
    class MidiSchedulerFactory;
    class PresetColours;

    namespace Cmd
    {
        class CommandHistory;
    }

    namespace Ins
    {
        class Destination;
    }

    /**
     * The App namespace contains classes that use the @ref TSE3
     * API, and provide a level of application support - including facilities
     * such as choices file saving.
     *
     * @short   @ref TSE3 library application support
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     TSE3
     */
    namespace App
    {
        class ChoicesManager;
        class Record;

        /**
         * This class provides the GUI independant core functionality of a
         * sequencer application based upon the @ref TSE3 library.
         *
         * The functionality provided by this class includes:
         * @li Choices file saved to user's directory
         * @li Management of the lifetimes of the common TSE3 objects
         *
         * This class is used as a singleton.
         *
         * @short   Support class providing core TSE3 application functionality
         * @author  Pete Goodliffe
         * @version 1.00
         * @see     TSE3
         */
        class Application : public TSE3::Listener<TSE3::SongListener>
        {
            public:

                /**
                 * Create the application.
                 *
                 * @param appname     The appname supplied is the name of this
                 *                    application. Any use of the application
                 *                    name should access it from this object in
                 *                    future.
                 * @param appversion  A string containing the application
                 *                    version number.
                 * @param msf         A factory use to generate a
                 *                    @ref MidiScheduler.
                 * @param choicesFile The name of the file that choices are
                 *                    loaded from on startup, and saved to by
                 *                    default. You will conventionally want
                 *                    this to be something like "$HOME/.tse3".
                 *                    If you specify no choicesFile then no
                 *                    default choices loading/saving will be
                 *                    performed.
                 */
                Application(const std::string          &appname,
                            const std::string          &appversion,
                            TSE3::MidiSchedulerFactory *msf,
                            const std::string          &choicesFile = "");

                /**
                 * Any @ref Song objects 'managed' by the application will
                 * be deleted.
                 */
                ~Application();

                /**
                 * Returns the application's name.
                 *
                 * If you need to quote the application's name at some
                 * point in your code, use the Application::name() method,
                 * rather than hardcoding a string constant.
                 */
                const std::string &appName() const { return _appname; }

                /**
                 * Returns the application's version.
                 *
                 * If you need to quote the application's version at some
                 * point in your code, use the Application::name() method,
                 * rather than hardcoding a string constant.
                 */
                const std::string &appVersion() const { return _appversion; }

                /**************************************************************
                 * Access to the main non-Song TSE3 components
                 *************************************************************/

                /**
                 * Returns a pointer to the @ref Metronome object used in this
                 * application.
                 */
                TSE3::Metronome *metronome() const { return _metronome; }

                /**
                 * Returns a pointer to the @ref Transport object used in this
                 * application.
                 */
                TSE3::Transport *transport() const { return _transport; }

                /**
                 * Returns a pointer to the @ref MidiScheduler object used in
                 * this application. This has been created from the
                 * @ref MidiSchedulerFactory object passed to the constructor.
                 */
                TSE3::MidiScheduler *scheduler() const { return _scheduler; }

                /**
                 * Returns a pointer to the @ref ChoicesManager.
                 */
                ChoicesManager *choicesManager() const { return _cm; }

                /**
                 * Returns a pointer to the Application's @ref Record object.
                 * This object is only created when it's needed.
                 */
                Record *record() const;

                /**
                 * Returns the @ref TSE3::Ins::Destintation object used in this
                 * application.
                 */
                TSE3::Ins::Destination *destination() const
                    { return _destination; }

                /**
                 * Returns the @ref TSE3::PresetColours object used in this
                 * application.
                 */
                TSE3::PresetColours *presetColours() const
                    { return _presetColours; }

                /**************************************************************
                 * Configuration of the application behaviour
                 *************************************************************/

                /**
                 * Sets whether choices are saved on destruction or not.
                 *
                 * @see setSaveChoicesOnDestroy
                 */
                bool saveChoicesOnDestroy() const
                    { return _saveChoicesOnDestroy; }

                /**
                 * Returns whether choices are saved on destruction.
                 *
                 * @see saveChoicesOnDestroy
                 */
                void setSaveChoicesOnDestroy(bool s);

                /**************************************************************
                 * Functionality
                 *************************************************************/

                /**
                 * Saves the current choices to the given filename. If no
                 * filename is supplied then the default one is used.
                 */
                void saveChoices(const std::string &filename = "");

                /**
                 * Add a new @ref TSE3::Song to the Application object. If you
                 * don't specify a @ref TSE3::Song, then a new @ref TSE3::Song
                 * will be created.
                 *
                 * You can remove the @ref TSE3::Song by simply deleting it.
                 *
                 * @param  song @ref TSE3::Song to add, or zero to create a
                 *              new one.
                 * @return Pointer to the @ref TSE3::Song that has been added
                 *         (useful if @p song was zero).
                 */
                TSE3::Song *addSong(TSE3::Song *song = 0);

                /**
                 * Returns the number of @ref TSE3::Song objects being
                 * managed by this Application.
                 */
                size_t numSongs() const;

                /**
                 * Returns the @ref CommandHistory object associated with this
                 * @ref Song.
                 *
                 * @param song @ref TSE3::Song to get history object for.
                 */
                TSE3::Cmd::CommandHistory *history(TSE3::Song *song);

                /**
                 * @reimplemented
                 */
                virtual void Notifier_Deleted(TSE3::Song *song);

            protected:

                std::string             _appname;
                std::string             _appversion;
                std::string             _choicesFile;

                TSE3::Metronome        *_metronome;
                TSE3::Transport        *_transport;
                TSE3::MidiScheduler    *_scheduler;
                ChoicesManager         *_cm;
                Record                 *_record;
                TSE3::Ins::Destination *_destination;
                TSE3::PresetColours    *_presetColours;

                bool                    _saveChoicesOnDestroy;

                std::vector<TSE3::Song *>                           songs;
                std::map<TSE3::Song *, TSE3::Cmd::CommandHistory *> histories;
        };
    }
}

#endif