This file is indexed.

/usr/share/sip/PyKDE4/kio/global.sip is in python-kde4-dev 4:4.13.0-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
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
//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply

//                 Generated by twine

// This file is part of PyKDE4.

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

// PyKDE4 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 this program.  If not, see <http://www.gnu.org/licenses/>.

%ModuleHeaderCode
#include <global.h>
%End

namespace KIO
{
typedef qlonglong fileoffset_t;

typedef qulonglong filesize_t;

QString                 convertSize (KIO::filesize_t size);
QString                 number (KIO::filesize_t size);
QString                 convertSizeFromKiB (KIO::filesize_t kibSize);
unsigned int            calculateRemainingSeconds (KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed);
QString                 convertSeconds (unsigned int seconds);
QTime                   calculateRemaining (KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed);
QString                 itemsSummaryString (uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize);
QString                 encodeFileName (const QString& str);
QString                 decodeFileName (const QString& str);

enum Command
{
    CMD_HOST,
    CMD_CONNECT,
    CMD_DISCONNECT,
    CMD_SLAVE_STATUS,
    CMD_SLAVE_CONNECT,
    CMD_SLAVE_HOLD,
    CMD_NONE,
    CMD_TESTDIR,
    CMD_GET,
    CMD_PUT,
    CMD_STAT,
    CMD_MIMETYPE,
    CMD_LISTDIR,
    CMD_MKDIR,
    CMD_RENAME,
    CMD_COPY,
    CMD_DEL,
    CMD_CHMOD,
    CMD_SPECIAL,
    CMD_SETMODIFICATIONTIME,
    CMD_REPARSECONFIGURATION,
    CMD_META_DATA,
    CMD_SYMLINK,
    CMD_SUBURL,
    CMD_MESSAGEBOXANSWER,
    CMD_RESUMEANSWER,
    CMD_CONFIG,
    CMD_MULTI_GET,
    CMD_SETLINKDEST,
    CMD_OPEN,
    CMD_CHOWN,
    CMD_READ,
    CMD_WRITE,
    CMD_SEEK,
    CMD_CLOSE,
    CMD_HOST_INFO
};


enum Error
{
    ERR_CANNOT_OPEN_FOR_READING,
    ERR_CANNOT_OPEN_FOR_WRITING,
    ERR_CANNOT_LAUNCH_PROCESS,
    ERR_INTERNAL,
    ERR_MALFORMED_URL,
    ERR_UNSUPPORTED_PROTOCOL,
    ERR_NO_SOURCE_PROTOCOL,
    ERR_UNSUPPORTED_ACTION,
    ERR_IS_DIRECTORY,
    ERR_IS_FILE,
    ERR_DOES_NOT_EXIST,
    ERR_FILE_ALREADY_EXIST,
    ERR_DIR_ALREADY_EXIST,
    ERR_UNKNOWN_HOST,
    ERR_ACCESS_DENIED,
    ERR_WRITE_ACCESS_DENIED,
    ERR_CANNOT_ENTER_DIRECTORY,
    ERR_PROTOCOL_IS_NOT_A_FILESYSTEM,
    ERR_CYCLIC_LINK,
    ERR_USER_CANCELED,
    ERR_CYCLIC_COPY,
    ERR_COULD_NOT_CREATE_SOCKET,
    ERR_COULD_NOT_CONNECT,
    ERR_CONNECTION_BROKEN,
    ERR_NOT_FILTER_PROTOCOL,
    ERR_COULD_NOT_MOUNT,
    ERR_COULD_NOT_UNMOUNT,
    ERR_COULD_NOT_READ,
    ERR_COULD_NOT_WRITE,
    ERR_COULD_NOT_BIND,
    ERR_COULD_NOT_LISTEN,
    ERR_COULD_NOT_ACCEPT,
    ERR_COULD_NOT_LOGIN,
    ERR_COULD_NOT_STAT,
    ERR_COULD_NOT_CLOSEDIR,
    ERR_COULD_NOT_MKDIR,
    ERR_COULD_NOT_RMDIR,
    ERR_CANNOT_RESUME,
    ERR_CANNOT_RENAME,
    ERR_CANNOT_CHMOD,
    ERR_CANNOT_DELETE,
    ERR_SLAVE_DIED,
    ERR_OUT_OF_MEMORY,
    ERR_UNKNOWN_PROXY_HOST,
    ERR_COULD_NOT_AUTHENTICATE,
    ERR_ABORTED,
    ERR_INTERNAL_SERVER,
    ERR_SERVER_TIMEOUT,
    ERR_SERVICE_NOT_AVAILABLE,
    ERR_UNKNOWN,
    ERR_UNKNOWN_INTERRUPT,
    ERR_CANNOT_DELETE_ORIGINAL,
    ERR_CANNOT_DELETE_PARTIAL,
    ERR_CANNOT_RENAME_ORIGINAL,
    ERR_CANNOT_RENAME_PARTIAL,
    ERR_NEED_PASSWD,
    ERR_CANNOT_SYMLINK,
    ERR_NO_CONTENT,
    ERR_DISK_FULL,
    ERR_IDENTICAL_FILES,
    ERR_SLAVE_DEFINED,
    ERR_UPGRADE_REQUIRED,
    ERR_POST_DENIED,
    ERR_COULD_NOT_SEEK,
    ERR_CANNOT_SETTIME,
    ERR_CANNOT_CHOWN,
    ERR_POST_NO_SIZE
};

QString                 buildErrorString (int errorCode, const QString& errorText);
//ig QString                 buildHTMLErrorString (int errorCode, const QString& errorText, const KUrl* reqUrl = 0, int method = -1);
QByteArray              rawErrorDetail (int errorCode, const QString& errorText, const KUrl* reqUrl = 0, int method = -1);
QString                 unsupportedActionErrorString (const QString& protocol, int cmd);

enum CacheControl
{
    CC_CacheOnly,
    CC_Cache,
    CC_Verify,
    CC_Refresh,
    CC_Reload
};

KIO::CacheControl       parseCacheControl (const QString& cacheControl);
QString                 getCacheControlString (KIO::CacheControl cacheControl);
//ig QPixmap                 pixmapForUrl (const KUrl& _url, mode_t _mode = 0, KIconLoader::Group _group = KIconLoader::Desktop, int _force_size = 0, int _state = 0, QString* _path = 0);
KJobTrackerInterface*   getJobTracker ();

//ig class MetaData;

};
// KIO



%ModuleHeaderCode
#include <global.h>
%End


%MappedType KIO::MetaData
{
%TypeHeaderCode
#include<qmap.h>
%End

%ConvertFromTypeCode
    // Convert to a Python dict

    if (!sipCpp)
        return PyDict_New();

    PyObject *dict;

    // Create the dictionary.

    if ((dict = PyDict_New()) == NULL)
        return NULL;

    // Get it.

    const QMap<QString,QString> cppmap = *sipCpp;
    QMap<QString,QString>::ConstIterator it;

    for (it = cppmap.begin (); it != cppmap.end (); ++it)
    {
        QString acpp = it.key ();
        QString bcpp = it.value ();
        PyObject *ainst = 0;
        PyObject *binst = 0;
        if (((ainst = sipBuildResult (NULL, "N", new QString (acpp), sipType_QString)) == NULL)
            || ((binst = sipBuildResult (NULL, "N", new QString (bcpp), sipType_QString)) == NULL)
            || (PyDict_SetItem (dict, ainst, binst) < 0))
        {
            Py_XDECREF (ainst);
            Py_XDECREF (binst);
            Py_DECREF (dict);
            return NULL;
        }
    }

    return dict;
%End


%ConvertToTypeCode
    // Convert a Python dictionary to a QMap on the heap.

    if (sipIsErr == NULL)
        return PyDict_Check(sipPy);


    QMap<QString,QString> *cppmap = new QMap<QString,QString>;

    PyObject *aelem, *belem;
    SIP_SSIZE_T pos = 0;
    QString *acpp;
    QString *bcpp;

    while (PyDict_Next(sipPy, &pos, &aelem, &belem))
    {
        int iserr = 0;

        acpp = (QString *)sipForceConvertToType(aelem, sipType_QString, NULL, 0, NULL, &iserr);
        bcpp = (QString *)sipForceConvertToType(belem, sipType_QString, NULL, 0, NULL, &iserr);

        if (iserr)
        {
            *sipIsErr = 1;
            delete cppmap;
            return 0;
        }

        cppmap->insert (*acpp, *bcpp);
    }

    *sipCppPtr = (KIO::MetaData *)cppmap;

    return 1;
%End
};