This file is indexed.

/usr/include/ubuntu/download_manager/download_struct.h is in libubuntu-download-manager-common-dev 1.2+16.04.20160408-0ubuntu1.

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
/*
 * Copyright 2013 Canonical Ltd.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of version 3 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program 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 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 DOWNLOADER_LIB_DOWNLOAD_STRUCT_H
#define DOWNLOADER_LIB_DOWNLOAD_STRUCT_H

#include <QMap>
#include <QString>
#include <QVariantMap>

class QDBusArgument;
namespace Ubuntu {

namespace DownloadManager {

typedef QMap<QString, QString> StringList;

/*!
    \class DownloadStruct 
    \brief The DownloadStruct represents the dbus structure that is used
           to communicate the download manager the details of a new
           download to be created.
    \since 0.3

    The DownloadStruct is the configuration structure that is sent to the
    download manager specifying the different attribute of a download. This
    attributes include from the url to be downloaded to the hash checksum
    and the algorithm used for the checksum.
*/
class DownloadStruct {
    Q_PROPERTY(QString url READ getUrl)
    Q_PROPERTY(QString hash READ getHash)
    Q_PROPERTY(QString algorithm READ getAlgorithm)
    Q_PROPERTY(QVariantMap metadata READ getMetadata)
    Q_PROPERTY(StringList headers READ getHeaders)

 public:
    /*
    */
    DownloadStruct();

    /*
       Creates a new download structure that will tell the download manager
       to download the file found in the provided \q url with no metadata,
       empty headers and without a checksum check.
    */
    DownloadStruct(const QString& url);

    /*
       Creates a new download structure that will tell the download manager
       to download the file found in the provided \a url with the given
       \a metadata and \a headers but without a checksum check.
    */
    DownloadStruct(const QString& url,
                   const QVariantMap& metadata,
                   const QMap<QString, QString>& headers);

    /*
       Creates a new download structure that will tell the download manager
       to download the file found in the provided \a url with the given
       \a metadata and \a headers. Once the file is download the checksum
       check will be done against the provided \a hash using the specified
       \a algorithm. The \a algorithm can be of one of the following string
       values:

         - "md5"
         - "sha1"
         - "sha224"
         - "sha256"
         - "sha384"
         - "sha512"

      \note If the hash provided is empty the download manager will assume
            that there is no need to perform the checksum.
      \note If the algorithm is an empty string or a not recognized value
            md5 will be used.
    */
    DownloadStruct(const QString& url,
                   const QString& hash,
                   const QString& algorithm,
                   const QVariantMap& metadata,
                   const QMap<QString, QString>& headers);

    /*
       Copy constructor.
    */
    DownloadStruct(const DownloadStruct& other);

    /*
       Assign operator.
    */
    DownloadStruct& operator=(const DownloadStruct& other);

    /*
        \internal
    */
    friend QDBusArgument &operator<<(QDBusArgument &argument,
        const DownloadStruct& download);

    /*
        \internal
    */
    friend const QDBusArgument &operator>>(const QDBusArgument &argument,
        DownloadStruct& download);

    /*
       \fn QString getUrl()

       Returns the url that points to the file that will be downloaded.
    */
    QString getUrl();

    /*
       \fn QString getHash()

       Returns the hash against which the checksum will be performed.
    */
    QString getHash();

    /*
       \fn QString getAlgorithm()

       Returns the algorithm that will be used to perform the checksum.
    */
    QString getAlgorithm();

    /*
       \fn QVariantMap getMetadata()

       Returns the metadata carried by the download.
    */
    QVariantMap getMetadata();

    /*
       \fn QMap<QString, QString> getHeaders()

       Returns the extra headers that will be used in the GET request of
       the download.
    */
    QMap<QString, QString> getHeaders();

 private:

    /*
        \internal
    */
    QString _url;

    /*
        \internal
    */
    QString _hash;

    /*
        \internal
    */
    QString _algorithm;

    /*
        \internal
    */
    QVariantMap _metadata;

    /*
        \internal
    */
    QMap<QString, QString> _headers;
};

}  // DownloadManager

}  // Ubunutu

#endif  // DOWNLOADER_LIB_DOWNLOAD_STRUCT_H