You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
461 lines
13 KiB
461 lines
13 KiB
14 years ago
|
//
|
||
|
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
|
||
|
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
|
||
|
// may also apply
|
||
|
|
||
|
|
||
|
// Generated by preSip
|
||
12 years ago
|
// module tdeio version KDE 3.5.3
|
||
14 years ago
|
|
||
|
|
||
|
// 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.,
|
||
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
|
||
|
|
||
|
class KFileMimeTypeInfo
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
14 years ago
|
%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:
|
||
13 years ago
|
TQStringList supportedKeys () const;
|
||
|
const TQString& name () const;
|
||
|
const TQString& translatedName () const;
|
||
|
const KFileMimeTypeInfo::ItemInfo* itemInfo (const TQString&) const;
|
||
14 years ago
|
uint attributes () const;
|
||
|
bool supportsVariableKeys () const;
|
||
|
const KFileMimeTypeInfo::ItemInfo* variableItemInfo () const;
|
||
|
|
||
|
private:
|
||
13 years ago
|
GroupInfo (const TQString&, const TQString&);
|
||
14 years ago
|
|
||
|
}; // class GroupInfo
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
class ItemInfo
|
||
|
{
|
||
|
|
||
|
public:
|
||
|
ItemInfo ();
|
||
13 years ago
|
const TQString& prefix () const;
|
||
|
const TQString& suffix () const;
|
||
|
TQVariant::Type type () const;
|
||
|
const TQString& key () const;
|
||
14 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
TQString string (const TQVariant&, bool = 1) const;
|
||
14 years ago
|
%End
|
||
|
|
||
|
bool isVariableItem () const;
|
||
13 years ago
|
const TQString& translatedKey () const;
|
||
14 years ago
|
uint attributes () const;
|
||
|
uint hint () const;
|
||
|
uint unit () const;
|
||
|
|
||
|
private:
|
||
13 years ago
|
ItemInfo (const TQString&, const TQString&, TQVariant::Type);
|
||
14 years ago
|
|
||
|
}; // class ItemInfo
|
||
|
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQValidator* createValidator (const TQString&, const TQString&, TQObject* /Transfer/ = 0, const char* = 0) const;
|
||
|
TQStringList supportedGroups () const;
|
||
|
TQStringList translatedGroups () const;
|
||
|
TQStringList preferredGroups () const;
|
||
|
TQString mimeType () const;
|
||
|
const KFileMimeTypeInfo::GroupInfo* groupInfo (const TQString&) const;
|
||
|
TQStringList supportedKeys () const;
|
||
|
TQStringList preferredKeys () const;
|
||
|
KFileMimeTypeInfo::GroupInfo* addGroupInfo (const TQString&, const TQString&);
|
||
|
TQString m_translatedName;
|
||
|
TQStringList m_supportedKeys;
|
||
14 years ago
|
uint m_attr;
|
||
13 years ago
|
//ig TQDict<ItemInfo> m_itemDict;
|
||
14 years ago
|
|
||
|
protected:
|
||
13 years ago
|
KFileMimeTypeInfo (const TQString&);
|
||
14 years ago
|
|
||
|
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
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
typedef KFileMimeTypeInfo::Hint Hint;
|
||
|
//ig typedef KFileMimeTypeInfo::Unit Unit;
|
||
|
typedef KFileMimeTypeInfo::Attributes Attributes;
|
||
13 years ago
|
KFileMetaInfoItem (const KFileMimeTypeInfo::ItemInfo*, const TQString&, const TQVariant&);
|
||
14 years ago
|
KFileMetaInfoItem (const KFileMetaInfoItem&);
|
||
|
KFileMetaInfoItem ();
|
||
13 years ago
|
TQString key () const;
|
||
|
TQString translatedKey () const;
|
||
|
const TQVariant& value () const;
|
||
|
TQString string (bool = 1) const;
|
||
|
bool setValue (const TQVariant&);
|
||
|
TQVariant::Type type () const;
|
||
14 years ago
|
bool isEditable () const;
|
||
|
bool isRemoved () const;
|
||
|
bool isModified () const;
|
||
13 years ago
|
TQString prefix () const;
|
||
|
TQString suffix () const;
|
||
14 years ago
|
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
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
13 years ago
|
KFileMetaInfoGroup (const TQString&, const KFileMimeTypeInfo*);
|
||
14 years ago
|
KFileMetaInfoGroup (const KFileMetaInfoGroup&);
|
||
|
KFileMetaInfoGroup ();
|
||
|
bool isValid () const;
|
||
|
bool isEmpty () const;
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
|
bool isModified () const;
|
||
|
|
||
|
%If ( KDE_3_1_4 - )
|
||
13 years ago
|
KFileMetaInfoItem operator [] (const TQString&) const;
|
||
14 years ago
|
%MethodCode
|
||
|
//returns (KFileMetaInfoItem)
|
||
13 years ago
|
//takes key | (TQString)
|
||
|
KFileMetaInfoItem sipResObj = ((*sipCpp) [*static_cast<const TQString*>(a0)]);
|
||
13 years ago
|
sipRes = &sipResObj;
|
||
14 years ago
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
13 years ago
|
KFileMetaInfoItem item (const TQString&) const;
|
||
14 years ago
|
KFileMetaInfoItem item (uint) const;
|
||
13 years ago
|
const TQVariant value (const TQString&) const;
|
||
|
TQStringList supportedKeys () const;
|
||
14 years ago
|
bool supportsVariableKeys () const;
|
||
13 years ago
|
bool contains (const TQString&) const;
|
||
|
TQStringList keys () const;
|
||
|
TQStringList preferredKeys () const;
|
||
|
KFileMetaInfoItem addItem (const TQString&);
|
||
|
bool removeItem (const TQString&);
|
||
|
TQStringList removedItems ();
|
||
|
TQString name () const;
|
||
14 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
TQString translatedName () const;
|
||
14 years ago
|
%End
|
||
|
|
||
|
uint attributes () const;
|
||
|
|
||
|
protected:
|
||
|
void setAdded ();
|
||
13 years ago
|
KFileMetaInfoItem appendItem (const TQString&, const TQVariant&);
|
||
14 years ago
|
void ref ();
|
||
|
void deref ();
|
||
|
|
||
|
}; // class KFileMetaInfoGroup
|
||
|
|
||
|
|
||
|
class KFileMetaInfo
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
14 years ago
|
%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
|
||
|
};
|
||
|
|
||
13 years ago
|
KFileMetaInfo (const TQString&, const TQString& = TQString ::null , uint = Fastest );
|
||
14 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
KFileMetaInfo (const KURL&, const TQString& = TQString ::null , uint = Fastest );
|
||
14 years ago
|
%End
|
||
|
|
||
|
KFileMetaInfo ();
|
||
|
KFileMetaInfo (const KFileMetaInfo&);
|
||
13 years ago
|
TQStringList groups () const;
|
||
|
TQStringList supportedGroups () const;
|
||
|
TQStringList preferredGroups () const;
|
||
|
TQStringList preferredKeys () const;
|
||
|
TQStringList supportedKeys () const;
|
||
|
TQStringList editableGroups () const;
|
||
|
KFileMetaInfoItem item (const TQString&) const;
|
||
14 years ago
|
KFileMetaInfoItem item (const Hint) const;
|
||
13 years ago
|
KFileMetaInfoItem saveItem (const TQString&, const TQString& = TQString ::null , bool = 1);
|
||
|
KFileMetaInfoGroup group (const TQString&) const;
|
||
14 years ago
|
|
||
|
%If ( KDE_3_1_4 - )
|
||
13 years ago
|
KFileMetaInfoGroup operator [] (const TQString&) const;
|
||
14 years ago
|
%MethodCode
|
||
|
//returns (KFileMetaInfoGroup)
|
||
13 years ago
|
//takes key | (TQString)
|
||
|
KFileMetaInfoGroup sipResObj = ((*sipCpp) [*static_cast<const TQString*>(a0)]);
|
||
13 years ago
|
sipRes = &sipResObj;
|
||
14 years ago
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
13 years ago
|
bool addGroup (const TQString&);
|
||
|
bool removeGroup (const TQString&);
|
||
|
TQStringList removedGroups ();
|
||
14 years ago
|
bool applyChanges ();
|
||
|
|
||
|
%If ( KDE_3_5_3 - )
|
||
13 years ago
|
bool applyChanges (const TQString&);
|
||
14 years ago
|
%End
|
||
|
|
||
13 years ago
|
bool contains (const TQString&) const;
|
||
|
bool containsGroup (const TQString&) const;
|
||
|
const TQVariant value (const TQString&) const;
|
||
14 years ago
|
bool isValid () const;
|
||
|
bool isEmpty () const;
|
||
13 years ago
|
TQString mimeType () const;
|
||
|
TQString path () const;
|
||
14 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
KURL url () const;
|
||
|
%End
|
||
|
|
||
|
|
||
|
protected:
|
||
13 years ago
|
KFileMetaInfoGroup appendGroup (const TQString&);
|
||
14 years ago
|
KFilePlugin* plugin () const;
|
||
|
void ref ();
|
||
|
void deref ();
|
||
|
|
||
|
}; // class KFileMetaInfo
|
||
|
|
||
|
|
||
13 years ago
|
class KFilePlugin : TQObject
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
13 years ago
|
KFilePlugin (TQObject* /TransferThis/, const char*, const TQStringList&);
|
||
14 years ago
|
virtual bool readInfo (KFileMetaInfo&, uint = KFileMetaInfo ::Fastest ) = 0;
|
||
|
virtual bool writeInfo (const KFileMetaInfo&) const;
|
||
13 years ago
|
virtual TQValidator* createValidator (const TQString&, const TQString&, const TQString&, TQObject*, const char*) const;
|
||
14 years ago
|
|
||
|
protected:
|
||
13 years ago
|
KFileMimeTypeInfo* addMimeTypeInfo (const TQString&);
|
||
|
KFileMimeTypeInfo::GroupInfo* addGroupInfo (KFileMimeTypeInfo*, const TQString&, const TQString&) const;
|
||
14 years ago
|
void setAttributes (KFileMimeTypeInfo::GroupInfo*, uint) const;
|
||
13 years ago
|
void addVariableInfo (KFileMimeTypeInfo::GroupInfo*, TQVariant::Type, uint) const;
|
||
|
KFileMimeTypeInfo::ItemInfo* addItemInfo (KFileMimeTypeInfo::GroupInfo*, const TQString&, const TQString&, TQVariant::Type);
|
||
14 years ago
|
void setAttributes (KFileMimeTypeInfo::ItemInfo*, uint);
|
||
|
void setHint (KFileMimeTypeInfo::ItemInfo*, uint);
|
||
|
void setUnit (KFileMimeTypeInfo::ItemInfo*, uint);
|
||
13 years ago
|
void setPrefix (KFileMimeTypeInfo::ItemInfo*, const TQString&);
|
||
|
void setSuffix (KFileMimeTypeInfo::ItemInfo*, const TQString&);
|
||
|
KFileMetaInfoGroup appendGroup (KFileMetaInfo&, const TQString&);
|
||
|
void appendItem (KFileMetaInfoGroup&, const TQString&, TQVariant);
|
||
14 years ago
|
|
||
|
protected:
|
||
|
//igx virtual void virtual_hook (int, void*);
|
||
|
|
||
|
}; // class KFilePlugin
|
||
|
|
||
|
|
||
13 years ago
|
class KFileMetaInfoProvider : TQObject
|
||
14 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
14 years ago
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
static KFileMetaInfoProvider* self ();
|
||
13 years ago
|
KFilePlugin* plugin (const TQString&);
|
||
14 years ago
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
13 years ago
|
KFilePlugin* plugin (const TQString&, const TQString&);
|
||
14 years ago
|
%End
|
||
|
|
||
13 years ago
|
const KFileMimeTypeInfo* mimeTypeInfo (const TQString&);
|
||
14 years ago
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
13 years ago
|
const KFileMimeTypeInfo* mimeTypeInfo (const TQString&, const TQString&);
|
||
14 years ago
|
%End
|
||
|
|
||
13 years ago
|
TQStringList preferredKeys (const TQString&) const;
|
||
|
TQStringList preferredGroups (const TQString&) const;
|
||
14 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
TQStringList supportedMimeTypes () const;
|
||
14 years ago
|
%End
|
||
|
|
||
|
|
||
|
protected:
|
||
|
//ig KFileMetaInfoProvider ();
|
||
|
//force
|
||
|
|
||
|
private:
|
||
|
KFileMetaInfoProvider ();
|
||
|
//end
|
||
|
|
||
|
}; // class KFileMetaInfoProvider
|
||
|
|
||
|
|
||
|
%If ( KDE_3_1_4 - )
|
||
13 years ago
|
//igx TQDataStream& operator << (TQDataStream&, const KFileMetaInfoItem&);
|
||
|
//igx TQDataStream& operator >> (TQDataStream&, KFileMetaInfoItem&);
|
||
|
//igx TQDataStream& operator << (TQDataStream&, const KFileMetaInfoGroup&);
|
||
|
//igx TQDataStream& operator >> (TQDataStream&, KFileMetaInfoGroup&);
|
||
|
//igx TQDataStream& operator << (TQDataStream&, const KFileMetaInfo&);
|
||
|
//igx TQDataStream& operator >> (TQDataStream&, KFileMetaInfo&);
|
||
14 years ago
|
%End
|