Git commit 46a21349a5402008af6009dedda81a30b03d39cd by Simon Edwards. Committed on 25/01/2014 at 23:09. Pushed by sedwards into branch 'master'. Added karchive. M +7 -2 CMakeLists.txt A +50 -0 sip/karchive/k7zip.sip A +59 -0 sip/karchive/kar.sip A +117 -0 sip/karchive/karchive.sip A +36 -0 sip/karchive/karchivemod.sip A +49 -0 sip/karchive/kcompressiondevice.sip A +61 -0 sip/karchive/kfilterbase.sip A +29 -0 sip/karchive/kfilterdev.sip A +61 -0 sip/karchive/ktar.sip A +99 -0 sip/karchive/kzip.sip A +40 -0 sip/typedefs.sip http://commits.kde.org/pykde5/46a21349a5402008af6009dedda81a30b03d39cd diff --git a/CMakeLists.txt b/CMakeLists.txt index bfe3aad..7e40194 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ include(PythonMacros) include(FeatureSummary) include(ECMSetupVersion) = -find_package(KF5 CONFIG REQUIRED Auth ItemModels ItemViews) +find_package(KF5 CONFIG REQUIRED Auth ItemModels ItemViews Archive) = #option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 t= ools" FALSE) = @@ -113,7 +113,12 @@ file(GLOB kitemviews_files_sip sip/kitemviews/*.sip) set(SIP_EXTRA_FILES_DEPEND ${kitemviews_files_sip}) add_sip_python_module(PyKDE5.kitemviews sip/kitemviews/kitemviewsmod.sip K= F5::ItemViews) = -set(PYKDE_MODULES "kitemmodels kitemviews") +# karchive +file(GLOB karchive_files_sip sip/karchive/*.sip) +set(SIP_EXTRA_FILES_DEPEND ${karchive_files_sip}) +add_sip_python_module(PyKDE5.karchive sip/karchive/karchivemod.sip KF5::Ar= chive) + +set(PYKDE_MODULES "kitemmodels kitemviews karchive") = ##########################################################################= ##### = diff --git a/sip/karchive/k7zip.sip b/sip/karchive/k7zip.sip new file mode 100644 index 0000000..0e46e0c --- /dev/null +++ b/sip/karchive/k7zip.sip @@ -0,0 +1,50 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class K7Zip : KArchive +{ +%TypeHeaderCode +#include +%End + +public: + explicit K7Zip (const QString& filename); + explicit K7Zip (QIODevice* dev); + virtual ~K7Zip (); +protected: + bool doWriteSymLink (const QString& name, const QSt= ring& target, const QString& user, const QString& group, mode_t perm, const= QDateTime& atime, const QDateTime& mtime, const QDateTime& ctime); + bool doWriteDir (const QString& name, const QString= & user, const QString& group, mode_t perm, const QDateTime& atime, const QD= ateTime& mtime, const QDateTime& ctime); + bool doPrepareWriting (const QString& name, const Q= String& user, const QString& group, qint64 size, mode_t perm, const QDateTi= me& atime, const QDateTime& mtime, const QDateTime& ctime); + bool doFinishWriting (qint64 size); + bool writeData (const char* data, qint64 size); + bool openArchive (QIODevice::OpenMode mode); + bool closeArchive (); + void virtual_hook (int id, void* data); +%ConvertToSubClassCode + // CTSCC for subclasses of 'K7Zip' + sipType =3D NULL; + + if (dynamic_cast(sipCpp)) + sipType =3D sipType_K7Zip; +%End +}; +%ModuleHeaderCode +//ctscc +#include +%End diff --git a/sip/karchive/kar.sip b/sip/karchive/kar.sip new file mode 100644 index 0000000..09b0e02 --- /dev/null +++ b/sip/karchive/kar.sip @@ -0,0 +1,59 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KAr : KArchive +{ +%TypeHeaderCode +#include +%End + +public: + KAr (const QString& filename); + KAr (QIODevice* dev); + virtual ~KAr (); +protected: + bool doPrepareWriting (const QString& name, const Q= String& user, const QString& group, qint64 size, mode_t perm, const QDateTi= me& atime, const QDateTime& mtime, const QDateTime& ctime); + bool doFinishWriting (qint64 size); + bool doWriteDir (const QString& name, const QString= & user, const QString& group, mode_t perm, const QDateTime& atime, const QD= ateTime& mtime, const QDateTime& ctime); + bool doWriteSymLink (const QString& name, const QSt= ring& target, const QString& user, const QString& group, mode_t perm, const= QDateTime& atime, const QDateTime& mtime, const QDateTime& ctime); + bool openArchive (QIODevice::OpenMode mode); + bool closeArchive (); + void virtual_hook (int id, void* data); +%ConvertToSubClassCode + // CTSCC for subclasses of 'KArchive' + sipType =3D NULL; + + if (dynamic_cast(sipCpp)) + sipType =3D sipType_K7Zip; + else if (dynamic_cast(sipCpp)) + sipType =3D sipType_KAr; + else if (dynamic_cast(sipCpp)) + sipType =3D sipType_KTar; + else if (dynamic_cast(sipCpp)) + sipType =3D sipType_KZip; +%End +}; +%ModuleHeaderCode +//ctscc +#include +#include +#include +#include +#include +%End diff --git a/sip/karchive/karchive.sip b/sip/karchive/karchive.sip new file mode 100644 index 0000000..bdf5d5a --- /dev/null +++ b/sip/karchive/karchive.sip @@ -0,0 +1,117 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KArchive +{ +%TypeHeaderCode +#include +%End + +protected: + KArchive (const QString& fileName); + KArchive (QIODevice* dev); +public: + virtual ~KArchive (); + virtual bool open (QIODevice::OpenMode mode); + virtual bool close (); + bool isOpen () const; + QIODevice::OpenMode mode () const; + QIODevice* device () const; + QString fileName () const; + const KArchiveDirectory* directory () const; + bool addLocalFile (const QString& fileName, const Q= String& destName); + bool addLocalDirectory (const QString& path, const = QString& destName); + bool writeDir (const QString& name, const QString& = user =3D QString(), const QString& group =3D QString(), mode_t perm =3D 040= 755, const QDateTime& atime =3D QDateTime(), const QDateTime& mtime =3D QDa= teTime(), const QDateTime& ctime =3D QDateTime()); + bool writeSymLink (const QString& name, const QStri= ng& target, const QString& user =3D QString(), const QString& group =3D QSt= ring(), mode_t perm =3D 0120755, const QDateTime& atime =3D QDateTime(), co= nst QDateTime& mtime =3D QDateTime(), const QDateTime& ctime =3D QDateTime(= )); + bool writeFile (const QString& name, const QByteArr= ay& data, mode_t perm =3D 0100644, const QString& user =3D QString(), const= QString& group =3D QString(), const QDateTime& atime =3D QDateTime(), cons= t QDateTime& mtime =3D QDateTime(), const QDateTime& ctime =3D QDateTime()); + bool prepareWriting (const QString& name, const QSt= ring& user, const QString& group, qint64 size, mode_t perm =3D 0100644, con= st QDateTime& atime =3D QDateTime(), const QDateTime& mtime =3D QDateTime()= , const QDateTime& ctime =3D QDateTime()); + virtual bool writeData (const char* data, qint64 size); + bool finishWriting (qint64 size); +protected: + virtual bool openArchive (QIODevice::OpenMode mode)=3D0; + virtual bool closeArchive ()=3D0; + virtual KArchiveDirectory* rootDir (); + virtual bool doWriteDir (const QString& name, const QString= & user, const QString& group, mode_t perm, const QDateTime& atime, const QD= ateTime& mtime, const QDateTime& ctime)=3D0; + virtual bool doWriteSymLink (const QString& name, const QSt= ring& target, const QString& user, const QString& group, mode_t perm, const= QDateTime& atime, const QDateTime& mtime, const QDateTime& ctime)=3D0; + virtual bool doPrepareWriting (const QString& name, const Q= String& user, const QString& group, qint64 size, mode_t perm, const QDateTi= me& atime, const QDateTime& mtime, const QDateTime& ctime)=3D0; + virtual bool doFinishWriting (qint64 size)=3D0; + KArchiveDirectory* findOrCreate (const QString& path); + virtual bool createDevice (QIODevice::OpenMode mode); + void setDevice (QIODevice* dev); + void setRootDir (KArchiveDirectory* rootDir); + virtual void virtual_hook (int id, void* data); +}; +class KArchiveEntry +{ +%TypeHeaderCode +#include +%End + +public: + KArchiveEntry (KArchive* archive, const QStrin= g& name, int access, const QDateTime& date, const QString& user, const QStr= ing& group, const QString& symlink); + virtual ~KArchiveEntry (); + QDateTime date () const; + QString name () const; + mode_t permissions () const; + QString user () const; + QString group () const; + QString symLinkTarget () const; + virtual bool isFile () const; + virtual bool isDirectory () const; +protected: + KArchive* archive () const; + virtual void virtual_hook (int id, void* data); +}; +class KArchiveFile : KArchiveEntry +{ +%TypeHeaderCode +#include +%End + +public: + KArchiveFile (KArchive* archive, const QString= & name, int access, const QDateTime& date, const QString& user, const QStri= ng& group, const QString& symlink, qint64 pos, qint64 size); + virtual ~KArchiveFile (); + qint64 position () const; + qint64 size () const; + void setSize (qint64 s); + virtual QByteArray data () const; + virtual QIODevice* createDevice () const; + virtual bool isFile () const; + bool copyTo (const QString& dest) const; +protected: + virtual void virtual_hook (int id, void* data); +}; +class KArchiveDirectory : KArchiveEntry +{ +%TypeHeaderCode +#include +%End + +public: + KArchiveDirectory (KArchive* archive, const QS= tring& name, int access, const QDateTime& date, const QString& user, const = QString& group, const QString& symlink); + virtual ~KArchiveDirectory (); + QStringList entries () const; + const KArchiveEntry* entry (const QString& name) const; + void addEntry (KArchiveEntry*); + void removeEntry (KArchiveEntry*); + virtual bool isDirectory () const; + bool copyTo (const QString& dest, bool recursive = =3D 1) const; +protected: + virtual void virtual_hook (int id, void* data); +}; diff --git a/sip/karchive/karchivemod.sip b/sip/karchive/karchivemod.sip new file mode 100644 index 0000000..d3f7915 --- /dev/null +++ b/sip/karchive/karchivemod.sip @@ -0,0 +1,36 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +%Module PyKDE5.karchive + +%ModuleHeaderCode +#pragma GCC visibility push(default) +%End + +%Import typedefs.sip +%Import QtCore/QtCoremod.sip + +%Include k7zip.sip +%Include kar.sip +%Include karchive.sip +%Include kcompressiondevice.sip +%Include kfilterbase.sip +%Include kfilterdev.sip +%Include ktar.sip +%Include kzip.sip diff --git a/sip/karchive/kcompressiondevice.sip b/sip/karchive/kcompressio= ndevice.sip new file mode 100644 index 0000000..62c4d82 --- /dev/null +++ b/sip/karchive/kcompressiondevice.sip @@ -0,0 +1,49 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KCompressionDevice : QIODevice +{ +%TypeHeaderCode +#include +%End + +public: + enum CompressionType + { + GZip, + BZip2, + Xz, + None + }; + KCompressionDevice (QIODevice* inputDevice, bo= ol autoDeleteInputDevice, KCompressionDevice::CompressionType type); + KCompressionDevice (const QString& fileName, K= CompressionDevice::CompressionType type); + virtual ~KCompressionDevice (); + KCompressionDevice::CompressionType compressionType () const; + virtual bool open (QIODevice::OpenMode mode); + virtual void close (); + void setOrigFileName (const QByteArray& fileName); + void setSkipHeaders (); + virtual bool seek (qint64); + virtual bool atEnd () const; + static KFilterBase* filterForCompressionType (KCompressionDevice::= CompressionType type); +protected: + virtual qint64 readData (char* data, qint64 maxlen); + virtual qint64 writeData (const char* data, qint64 len); + KFilterBase* filterBase (); +}; diff --git a/sip/karchive/kfilterbase.sip b/sip/karchive/kfilterbase.sip new file mode 100644 index 0000000..d2cf81c --- /dev/null +++ b/sip/karchive/kfilterbase.sip @@ -0,0 +1,61 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KFilterBase /NoDefaultCtors/ +{ +%TypeHeaderCode +#include +%End + +public: + KFilterBase (); + virtual ~KFilterBase (); + void setDevice (QIODevice* dev, bool autodelete =3D= 0); + QIODevice* device (); + virtual bool init (int mode)=3D0; + virtual int mode () const=3D0; + virtual bool terminate (); + virtual void reset (); + virtual bool readHeader ()=3D0; + virtual bool writeHeader (const QByteArray& filename)=3D0; + virtual void setOutBuffer (char* data, uint maxlen)=3D0; + virtual void setInBuffer (const char* data, uint size)=3D0; + virtual bool inBufferEmpty () const; + virtual int inBufferAvailable () const=3D0; + virtual bool outBufferFull () const; + virtual int outBufferAvailable () const=3D0; + enum Result + { + Ok, + End, + Error + }; + virtual KFilterBase::Result uncompress ()=3D0; + virtual KFilterBase::Result compress (bool finish)=3D0; + enum FilterFlags + { + NoHeaders, + WithHeaders, + ZlibHeaders + }; + void setFilterFlags (KFilterBase::FilterFlags flags= ); + KFilterBase::FilterFlags filterFlags () const; +protected: + virtual void virtual_hook (int id, void* data); +}; diff --git a/sip/karchive/kfilterdev.sip b/sip/karchive/kfilterdev.sip new file mode 100644 index 0000000..e658a8d --- /dev/null +++ b/sip/karchive/kfilterdev.sip @@ -0,0 +1,29 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KFilterDev : KCompressionDevice +{ +%TypeHeaderCode +#include +%End + +public: + KFilterDev (const QString& fileName); + static KCompressionDevice::CompressionType compressionTypeForMimeType= (const QString& mimetype); +}; diff --git a/sip/karchive/ktar.sip b/sip/karchive/ktar.sip new file mode 100644 index 0000000..a3f4359 --- /dev/null +++ b/sip/karchive/ktar.sip @@ -0,0 +1,61 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KTar : KArchive +{ +%TypeHeaderCode +#include +%End + +public: + explicit KTar (const QString& filename, const QString& = mimetype =3D QString()); + explicit KTar (QIODevice* dev); + virtual ~KTar (); + void setOrigFileName (const QByteArray& fileName); +protected: + bool doWriteSymLink (const QString& name, const QSt= ring& target, const QString& user, const QString& group, mode_t perm, const= QDateTime& atime, const QDateTime& mtime, const QDateTime& ctime); + bool doWriteDir (const QString& name, const QString= & user, const QString& group, mode_t perm, const QDateTime& atime, const QD= ateTime& mtime, const QDateTime& ctime); + bool doPrepareWriting (const QString& name, const Q= String& user, const QString& group, qint64 size, mode_t perm, const QDateTi= me& atime, const QDateTime& mtime, const QDateTime& ctime); + bool doFinishWriting (qint64 size); + bool openArchive (QIODevice::OpenMode mode); + bool closeArchive (); + bool createDevice (QIODevice::OpenMode mode); + void virtual_hook (int id, void* data); +%ConvertToSubClassCode + // CTSCC for subclasses of 'KArchive' + sipType =3D NULL; + + if (dynamic_cast(sipCpp)) + sipType =3D sipType_K7Zip; + else if (dynamic_cast(sipCpp)) + sipType =3D sipType_KAr; + else if (dynamic_cast(sipCpp)) + sipType =3D sipType_KTar; + else if (dynamic_cast(sipCpp)) + sipType =3D sipType_KZip; +%End +}; +%ModuleHeaderCode +//ctscc +#include +#include +#include +#include +#include +%End diff --git a/sip/karchive/kzip.sip b/sip/karchive/kzip.sip new file mode 100644 index 0000000..a06cdbc --- /dev/null +++ b/sip/karchive/kzip.sip @@ -0,0 +1,99 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KZip : KArchive +{ +%TypeHeaderCode +#include +%End + +public: + KZip (const QString& filename); + KZip (QIODevice* dev); + virtual ~KZip (); + enum ExtraField + { + NoExtraField, + ModificationTime, + DefaultExtraField + }; + void setExtraField (KZip::ExtraField ef); + KZip::ExtraField extraField () const; + enum Compression + { + NoCompression, + DeflateCompression + }; + void setCompression (KZip::Compression c); + KZip::Compression compression () const; + bool writeData (const char* data, qint64 size); +protected: + bool doWriteSymLink (const QString& name, const QSt= ring& target, const QString& user, const QString& group, mode_t perm, const= QDateTime& atime, const QDateTime& mtime, const QDateTime& ctime); + bool doPrepareWriting (const QString& name, const Q= String& user, const QString& group, qint64 size, mode_t perm, const QDateTi= me& atime, const QDateTime& mtime, const QDateTime& creationTime); + bool doFinishWriting (qint64 size); + bool openArchive (QIODevice::OpenMode mode); + bool closeArchive (); + bool doWriteDir (const QString& name, const QString= & user, const QString& group, mode_t perm, const QDateTime& atime, const QD= ateTime& mtime, const QDateTime& ctime); + void virtual_hook (int id, void* data); +%ConvertToSubClassCode + // CTSCC for subclasses of 'KZip' + sipType =3D NULL; + + if (dynamic_cast(sipCpp)) + sipType =3D sipType_KZip; +%End +}; +class KZipFileEntry : KArchiveFile +{ +%TypeHeaderCode +#include +%End + +public: + KZipFileEntry (KZip* zip, const QString& name,= int access, const QDateTime& date, const QString& user, const QString& gro= up, const QString& symlink, const QString& path, qint64 start, qint64 uncom= pressedSize, int encoding, qint64 compressedSize); + ~KZipFileEntry (); + int encoding () const; + qint64 compressedSize () const; + void setCompressedSize (qint64 compressedSize); + void setHeaderStart (qint64 headerstart); + qint64 headerStart () const; + unsigned long crc32 () const; + void setCRC32 (unsigned long crc32); + const QString& path () const; + QByteArray data () const; + QIODevice* createDevice () const; +%ConvertToSubClassCode + // CTSCC for subclasses of 'KArchiveEntry' + sipType =3D NULL; + + if (dynamic_cast(sipCpp)) + sipType =3D sipType_KArchiveDirectory; + else if (dynamic_cast(sipCpp)) + { + sipType =3D sipType_KArchiveFile; + if (dynamic_cast(sipCpp)) + sipType =3D sipType_KZipFileEntry; + } +%End +}; +%ModuleHeaderCode +//ctscc +#include +#include +%End diff --git a/sip/typedefs.sip b/sip/typedefs.sip new file mode 100644 index 0000000..a1d2375 --- /dev/null +++ b/sip/typedefs.sip @@ -0,0 +1,40 @@ +// Copyright 2014 Simon Edwards + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +%Module PyKDE5.typedefs + +typedef uint mode_t; + +typedef long time_t; + +typedef ulong size_t; + +typedef int ssize_t; + +typedef int pid_t; + +typedef ulong Window; + +typedef bool Bool; + +typedef uint WFlags; + +typedef long off_t; + +typedef uint uid_t; + +typedef uint gid_t;