• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

ark

archive.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2007 Henrique Pinto <henrique.pinto@kdemail.net>
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  *
00014  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00015  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00016  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00017  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00018  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT
00019  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00020  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
00021  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00022  * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
00023  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00024  */
00025 #ifndef KERFUFFLE_ARCHIVE_H
00026 #define KERFUFFLE_ARCHIVE_H
00027 
00028 #include "kerfuffle_export.h"
00029 
00030 #include <QString>
00031 #include <QStringList>
00032 #include <QHash>
00033 
00034 #include <KUrl>
00035 
00036 class KJob;
00037 
00038 namespace Kerfuffle
00039 {
00040     class ListJob;
00041     class ExtractJob;
00042     class DeleteJob;
00043     class AddJob;
00044 
00045     enum EntryMetaDataType { FileName = 0, OriginalFileName = 1, Permissions = 2, Owner = 3,
00046         Group = 4, Size = 5, CompressedSize = 6, Link = 7, Ratio = 8,
00047         CRC = 9, Method = 10, Version = 11, Timestamp = 12, IsDirectory = 13, Comment = 14, Custom = 1048576 };
00048 
00049     typedef QHash<int, QVariant> ArchiveEntry;
00050 
00051     class KERFUFFLE_EXPORT Archive
00052     {
00053         public:
00054             virtual ~Archive() {}
00055 
00056             virtual QString fileName() = 0;
00057             virtual bool isReadOnly() = 0;
00058             
00059             virtual KJob*       open() = 0;
00060             virtual KJob*       create() = 0;
00061             virtual ListJob*    list() = 0;
00062             virtual DeleteJob*  deleteFiles( const QList<QVariant> & files ) = 0;
00063             virtual AddJob*     addFiles( const QStringList & files ) = 0;
00064             virtual ExtractJob* copyFiles( const QList<QVariant> & files, const QString & destinationDir, bool preservePaths = false ) = 0;
00065     };
00066 
00067     KERFUFFLE_EXPORT Archive* factory( const QString & filename, const QString & requestedMimeType = QString() );
00068     KERFUFFLE_EXPORT QStringList supportedMimeTypes();
00069     KERFUFFLE_EXPORT QStringList supportedWriteMimeTypes();
00070 } // namespace Kerfuffle
00071 
00072 
00073 #endif // KERFUFFLE_ARCHIVE_H

ark

Skip menu "ark"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal