summaryrefslogtreecommitdiffstats
path: root/python/pykde/sip/kio/kfilemetainfo.sip
blob: 18ace51907e2256153ba04f5ba59a1f48f159038 (plain)
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
//
//     Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
//     may also apply


//                 Generated by preSip
//            module kio  version KDE 3.5.3


// This software 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.
//
// This software 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 library; see the file COPYING.
// If not, write to the Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


class KFileMimeTypeInfo
{
%TypeHeaderCode
#include <kfilemetainfo.h>
%End


public:
                         KFileMimeTypeInfo ();

%If ( KDE_3_3_0 -  )

    enum Attributes
    {
        Addable, 
        Removable, 
        Modifiable, 
        Cumulative, 
        Cummulative, 
        Averaged, 
        MultiLine, 
        SqueezeText
    };

%End


    enum Hint
    {
        NoHint, 
        Name, 
        Author, 
        Description, 
        Width, 
        Height, 
        Size, 
        Bitrate, 
        Length, 
        Hidden, 
        Thumbnail
    };


%If ( KDE_3_3_0 -  )

    enum Unit
    {
        NoUnit, 
        Seconds, 
        MilliSeconds, 
        BitsPerSecond, 
        Pixels, 
        Inches, 
        Centimeters, 
        Bytes, 
        FramesPerSecond, 
        DotsPerInch, 
        BitsPerPixel, 
        Hertz, 
        KiloBytes, 
        Millimeters
    };

%End


    class GroupInfo
    {

    public:
        QStringList          supportedKeys () const;
        const QString&       name () const;
        const QString&       translatedName () const;
        const KFileMimeTypeInfo::ItemInfo* itemInfo (const QString&) const;
        uint                 attributes () const;
        bool                 supportsVariableKeys () const;
        const KFileMimeTypeInfo::ItemInfo* variableItemInfo () const;

    private:
                             GroupInfo (const QString&, const QString&);

    };  // class GroupInfo


public:

    class ItemInfo
    {

    public:
                             ItemInfo ();
        const QString&       prefix () const;
        const QString&       suffix () const;
        QVariant::Type       type () const;
        const QString&       key () const;

%If ( KDE_3_1_0 -  )
        QString              string (const QVariant&, bool = 1) const;
%End

        bool                 isVariableItem () const;
        const QString&       translatedKey () const;
        uint                 attributes () const;
        uint                 hint () const;
        uint                 unit () const;

    private:
                             ItemInfo (const QString&, const QString&, QVariant::Type);

    };  // class ItemInfo


public:
    QValidator*          createValidator (const QString&, const QString&, QObject* /Transfer/ = 0, const char* = 0) const;
    QStringList          supportedGroups () const;
    QStringList          translatedGroups () const;
    QStringList          preferredGroups () const;
    QString              mimeType () const;
    const KFileMimeTypeInfo::GroupInfo* groupInfo (const QString&) const;
    QStringList          supportedKeys () const;
    QStringList          preferredKeys () const;
    KFileMimeTypeInfo::GroupInfo* addGroupInfo (const QString&, const QString&);
    QString              m_translatedName;
    QStringList          m_supportedKeys;
    uint                 m_attr;
//ig     QDict<ItemInfo>      m_itemDict;

protected:
                         KFileMimeTypeInfo (const QString&);

public:

%If ( KDE_3_1_0 - KDE_3_3_0 )

    enum Attributes
    {
        Addable, 
        Removable, 
        Modifiable, 
        Cummulative, 
        Averaged, 
        MultiLine, 
        SqueezeText
    };

%End


public:

%If (  - KDE_3_1_0 )

    enum Attributes
    {
        Addable, 
        Removable, 
        Modifiable, 
        Cummulative, 
        Averaged
    };

%End


};  // class KFileMimeTypeInfo


class KFileMetaInfoItem
{
%TypeHeaderCode
#include <kfilemetainfo.h>
%End


public:
    typedef KFileMimeTypeInfo::Hint Hint;
//ig     typedef KFileMimeTypeInfo::Unit Unit;
    typedef KFileMimeTypeInfo::Attributes Attributes;
                         KFileMetaInfoItem (const KFileMimeTypeInfo::ItemInfo*, const QString&, const QVariant&);
                         KFileMetaInfoItem (const KFileMetaInfoItem&);
                         KFileMetaInfoItem ();
    QString              key () const;
    QString              translatedKey () const;
    const QVariant&      value () const;
    QString              string (bool = 1) const;
    bool                 setValue (const QVariant&);
    QVariant::Type       type () const;
    bool                 isEditable () const;
    bool                 isRemoved () const;
    bool                 isModified () const;
    QString              prefix () const;
    QString              suffix () const;
    uint                 hint () const;
//ig     uint                 unit () const;
    uint                 attributes () const;
    bool                 isValid () const;

protected:
    void                 setAdded ();

%If ( KDE_3_1_0 -  )
    void                 setRemoved ();
%End

    void                 ref ();
    void                 deref ();

};  // class KFileMetaInfoItem


class KFileMetaInfoGroup
{
%TypeHeaderCode
#include <kfilemetainfo.h>
%End


public:
                         KFileMetaInfoGroup (const QString&, const KFileMimeTypeInfo*);
                         KFileMetaInfoGroup (const KFileMetaInfoGroup&);
                         KFileMetaInfoGroup ();
    bool                 isValid () const;
    bool                 isEmpty () const;

%If ( KDE_3_1_0 -  )
    bool                 isModified () const;

%If ( KDE_3_1_4 -  )
    KFileMetaInfoItem    operator [] (const QString&) const;
%MethodCode
//returns (KFileMetaInfoItem)
//takes key | (QString)
    sipRes = &((*sipCpp) [(const QString&) *a0]);
%End

%End

%End

    KFileMetaInfoItem    item (const QString&) const;
    KFileMetaInfoItem    item (uint) const;
    const QVariant       value (const QString&) const;
    QStringList          supportedKeys () const;
    bool                 supportsVariableKeys () const;
    bool                 contains (const QString&) const;
    QStringList          keys () const;
    QStringList          preferredKeys () const;
    KFileMetaInfoItem    addItem (const QString&);
    bool                 removeItem (const QString&);
    QStringList          removedItems ();
    QString              name () const;

%If ( KDE_3_2_0 -  )
    QString              translatedName () const;
%End

    uint                 attributes () const;

protected:
    void                 setAdded ();
    KFileMetaInfoItem    appendItem (const QString&, const QVariant&);
    void                 ref ();
    void                 deref ();

};  // class KFileMetaInfoGroup


class KFileMetaInfo
{
%TypeHeaderCode
#include <kfilemetainfo.h>
%End


public:
    typedef KFileMimeTypeInfo::Hint Hint;
//ig     typedef KFileMimeTypeInfo::Unit Unit;
    typedef KFileMimeTypeInfo::Attributes Attributes;

    enum What
    {
        Fastest, 
        DontCare, 
        TechnicalInfo, 
        ContentInfo, 
        ExtenedAttr, 
        Thumbnail, 
        Preferred, 
        Everything
    };

                         KFileMetaInfo (const QString&, const QString& = QString ::null , uint = Fastest );

%If ( KDE_3_2_0 -  )
                         KFileMetaInfo (const KURL&, const QString& = QString ::null , uint = Fastest );
%End

                         KFileMetaInfo ();
                         KFileMetaInfo (const KFileMetaInfo&);
    QStringList          groups () const;
    QStringList          supportedGroups () const;
    QStringList          preferredGroups () const;
    QStringList          preferredKeys () const;
    QStringList          supportedKeys () const;
    QStringList          editableGroups () const;
    KFileMetaInfoItem    item (const QString&) const;
    KFileMetaInfoItem    item (const Hint) const;
    KFileMetaInfoItem    saveItem (const QString&, const QString& = QString ::null , bool = 1);
    KFileMetaInfoGroup   group (const QString&) const;

%If ( KDE_3_1_4 -  )
    KFileMetaInfoGroup   operator [] (const QString&) const;
%MethodCode
//returns (KFileMetaInfoGroup)
//takes key | (QString)
    sipRes = &((*sipCpp) [(const QString&)*a0]);
%End

%End

    bool                 addGroup (const QString&);
    bool                 removeGroup (const QString&);
    QStringList          removedGroups ();
    bool                 applyChanges ();

%If ( KDE_3_5_3 -  )
    bool                 applyChanges (const QString&);
%End

    bool                 contains (const QString&) const;
    bool                 containsGroup (const QString&) const;
    const QVariant       value (const QString&) const;
    bool                 isValid () const;
    bool                 isEmpty () const;
    QString              mimeType () const;
    QString              path () const;

%If ( KDE_3_2_0 -  )
    KURL                 url () const;
%End


protected:
    KFileMetaInfoGroup   appendGroup (const QString&);
    KFilePlugin*         plugin () const;
    void                 ref ();
    void                 deref ();

};  // class KFileMetaInfo


class KFilePlugin : QObject
{
%TypeHeaderCode
#include <kfilemetainfo.h>
%End


public:
                         KFilePlugin (QObject* /TransferThis/, const char*, const QStringList&);
    virtual bool         readInfo (KFileMetaInfo&, uint = KFileMetaInfo ::Fastest )  = 0;
    virtual bool         writeInfo (const KFileMetaInfo&) const;
    virtual QValidator*  createValidator (const QString&, const QString&, const QString&, QObject*, const char*) const;

protected:
    KFileMimeTypeInfo*   addMimeTypeInfo (const QString&);
    KFileMimeTypeInfo::GroupInfo* addGroupInfo (KFileMimeTypeInfo*, const QString&, const QString&) const;
    void                 setAttributes (KFileMimeTypeInfo::GroupInfo*, uint) const;
    void                 addVariableInfo (KFileMimeTypeInfo::GroupInfo*, QVariant::Type, uint) const;
    KFileMimeTypeInfo::ItemInfo* addItemInfo (KFileMimeTypeInfo::GroupInfo*, const QString&, const QString&, QVariant::Type);
    void                 setAttributes (KFileMimeTypeInfo::ItemInfo*, uint);
    void                 setHint (KFileMimeTypeInfo::ItemInfo*, uint);
    void                 setUnit (KFileMimeTypeInfo::ItemInfo*, uint);
    void                 setPrefix (KFileMimeTypeInfo::ItemInfo*, const QString&);
    void                 setSuffix (KFileMimeTypeInfo::ItemInfo*, const QString&);
    KFileMetaInfoGroup   appendGroup (KFileMetaInfo&, const QString&);
    void                 appendItem (KFileMetaInfoGroup&, const QString&, QVariant);

protected:
//igx     virtual void         virtual_hook (int, void*);

};  // class KFilePlugin


class KFileMetaInfoProvider : QObject
{
%TypeHeaderCode
#include <kfilemetainfo.h>
%End


public:
    static KFileMetaInfoProvider* self ();
    KFilePlugin*         plugin (const QString&);

%If ( KDE_3_4_0 -  )
    KFilePlugin*         plugin (const QString&, const QString&);
%End

    const KFileMimeTypeInfo* mimeTypeInfo (const QString&);

%If ( KDE_3_4_0 -  )
    const KFileMimeTypeInfo* mimeTypeInfo (const QString&, const QString&);
%End

    QStringList          preferredKeys (const QString&) const;
    QStringList          preferredGroups (const QString&) const;

%If ( KDE_3_1_0 -  )
    QStringList          supportedMimeTypes () const;
%End


protected:
//ig                          KFileMetaInfoProvider ();
//force

private:
                         KFileMetaInfoProvider ();
//end

};  // class KFileMetaInfoProvider


%If ( KDE_3_1_4 -  )
//igx QDataStream&         operator << (QDataStream&, const KFileMetaInfoItem&);
//igx QDataStream&         operator >> (QDataStream&, KFileMetaInfoItem&);
//igx QDataStream&         operator << (QDataStream&, const KFileMetaInfoGroup&);
//igx QDataStream&         operator >> (QDataStream&, KFileMetaInfoGroup&);
//igx QDataStream&         operator << (QDataStream&, const KFileMetaInfo&);
//igx QDataStream&         operator >> (QDataStream&, KFileMetaInfo&);
%End