// // Copyright 2006 Jim Bublitz // 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., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class KFileMimeTypeInfo { %TypeHeaderCode #include %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 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 %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 %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 %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 %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 %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