This file is indexed.

/usr/include/k3baudiodoc.h is in libk3b-dev 17.12.3-0ubuntu3.

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
/*
 *
 * Copyright (C) 2003-2008 Sebastian Trueg <trueg@k3b.org>
 * Copyright (C)      2009 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
 * Copyright (C)      2010 Michal Malek <michalm@jabster.pl>
 *
 * This file is part of the K3b project.
 * Copyright (C) 1998-2009 Sebastian Trueg <trueg@k3b.org>
 *
 * This program 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.
 * See the file "COPYING" for the exact licensing terms.
 */


#ifndef K3BAUDIODOC_H
#define K3BAUDIODOC_H

#include "k3bdoc.h"
#include "k3bcdtext.h"
#include "k3btoc.h"

#include "k3b_export.h"

class QDomElement;

namespace K3b {
    class AudioTrack;
    class AudioDataSource;
    class AudioDecoder;
    class AudioFile;

    /**
     * Document class for an audio project.
     * @author Sebastian Trueg
     */
    class LIBK3B_EXPORT AudioDoc : public Doc
    {
        Q_OBJECT

        friend class MixedDoc;
        friend class AudioTrack;
        friend class AudioFile;

    public:
        AudioDoc( QObject* );
        ~AudioDoc();

        virtual Type type() const { return AudioProject; }
        virtual QString typeString() const { return QString::fromLatin1("audio"); }

        QString name() const;

        bool newDocument();

        void clear();

        Device::MediaTypes supportedMediaTypes() const;

        bool hideFirstTrack() const;
        int numOfTracks() const;

        bool normalize() const;

        AudioTrack* firstTrack() const;
        AudioTrack* lastTrack() const;

        /**
         * Slow.
         * \return the AudioTrack with track number trackNum (starting at 1) or 0 if trackNum > numOfTracks()
         */
        AudioTrack* getTrack( int trackNum );

        /**
         * Creates a new audiofile inside this doc which has no track yet.
         */
        AudioFile* createAudioFile( const QUrl& url );

        /** get the current size of the project */
        KIO::filesize_t size() const;
        Msf length() const;

        // CD-Text
        bool cdText() const;
        QString title() const;
        QString artist() const;
        QString disc_id() const;
        QString arranger() const;
        QString songwriter() const;
        QString composer() const;
        QString upc_ean() const;
        QString cdTextMessage() const;

        /**
         * Create complete CD-Text including the tracks' data.
         */
        Device::CdText cdTextData() const;

        int audioRippingParanoiaMode() const;
        int audioRippingRetries() const;
        bool audioRippingIgnoreReadErrors() const;

        /**
         * Represent the structure of the doc as CD Table of Contents.
         */
        Device::Toc toToc() const;

        BurnJob* newBurnJob( JobHandler*, QObject* parent = 0 );

        /**
         * returns the new after track, ie. the the last added track or null if
         * the import failed.
         *
         * This is a blocking method.
         *
         * \param cuefile The Cuefile to be imported
         * \param after   The track after which the new tracks should be inserted
         * \param decoder The decoder to be used for the new tracks. If 0 a new one will be created.
         *
         * BE AWARE THAT THE DECODER HAS TO FIT THE AUDIO FILE IN THE CUE.
         */
        AudioTrack* importCueFile( const QString& cuefile, AudioTrack* after, AudioDecoder* decoder = 0 );

        /**
         * Create a decoder for a specific url. If another AudioFileSource with this
         * url is already part of this project the associated decoder is returned.
         *
         * In the first case the decoder will not be initialized yet (AudioDecoder::analyseFile
         * is not called yet).
         *
         * \param url The url for which a decoder is requested.
         * \param reused If not null this variable is set to true if the decoder is already in
         *               use and AudioDecoder::analyseFile() does not have to be called anymore.
         */
        AudioDecoder* getDecoderForUrl( const QUrl& url, bool* reused = 0 );

        /**
         * Transforms given url list into flat file list.
         * Each directory and M3U playlist is expanded into the files.
         * Note: directories are not expanded recursively.
         */
        static QList<QUrl> extractUrlList( const QList<QUrl>& urls );

        static bool readPlaylistFile( const QUrl& url, QList<QUrl>& playlist );

    public Q_SLOTS:
        void addUrls( const QList<QUrl>& );
        void addTrack( const QUrl&, int );
        void addTracks( const QList<QUrl>&, int );
        /**
         * Adds a track without any testing
         *
         * Slow because it uses getTrack.
         */
        void addTrack( AudioTrack* track, int position = 0 );

        void addSources( AudioTrack* parent, const QList<QUrl>& urls, AudioDataSource* sourceAfter = 0 );

        void removeTrack( AudioTrack* );
        void moveTrack( AudioTrack* track, AudioTrack* after );

        void setHideFirstTrack( bool b );
        void setNormalize( bool b );

        // CD-Text
        void writeCdText( bool b );
        void setTitle( const QString& v );
        void setArtist( const QString& v );
        void setPerformer( const QString& v );
        void setDisc_id( const QString& v );
        void setArranger( const QString& v );
        void setSongwriter( const QString& v );
        void setComposer( const QString& v );
        void setUpc_ean( const QString& v );
        void setCdTextMessage( const QString& v );

        // Audio-CD Ripping
        void setAudioRippingParanoiaMode( int i );
        void setAudioRippingRetries( int r );
        void setAudioRippingIgnoreReadErrors( bool b );

    private Q_SLOTS:
        void slotTrackChanged( K3b::AudioTrack* track );
        void slotTrackRemoved( int position );

    Q_SIGNALS:
        void trackChanged( K3b::AudioTrack* track );

        // signals for the model
        void trackAboutToBeAdded( int position );
        void trackAdded( int position );
        void trackAboutToBeRemoved( int position );
        void trackRemoved( int position );
        void sourceAboutToBeAdded( K3b::AudioTrack* parent, int position );
        void sourceAdded( K3b::AudioTrack* parent, int position );
        void sourceAboutToBeRemoved( K3b::AudioTrack* parent, int position );
        void sourceRemoved( K3b::AudioTrack* parent, int position );

    protected:
        /** reimplemented from Doc */
        bool loadDocumentData( QDomElement* );
        /** reimplemented from Doc */
        bool saveDocumentData( QDomElement* );

    private:
        // the stuff for adding files
        // ---------------------------------------------------------
        AudioTrack* createTrack( const QUrl& url );

        /**
         * Used by AudioTrack to update the track list
         */
        void setFirstTrack( AudioTrack* track );
        /**
         * Used by AudioTrack to update the track list
         */
        void setLastTrack( AudioTrack* track );

        /**
         * Used by AudioFile to tell the doc that it does not need the decoder anymore.
         */
        void decreaseDecoderUsage( AudioDecoder* );
        void increaseDecoderUsage( AudioDecoder* );

        class Private;
        Private* d;
    };
}

#endif