~ubuntu-branches/ubuntu/precise/kgpg/precise-updates

« back to all changes in this revision

Viewing changes to foldercompressjob.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-12-24 23:16:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: package-import@ubuntu.com-20111224231612-6w15s57d2106roq2
Tags: upstream-4.7.95
Import upstream version 4.7.95

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Rolf Eike Beer <kde@opensource.sf-tec.de>
 
3
 */
 
4
 
 
5
/***************************************************************************
 
6
 *                                                                         *
 
7
 *   This program is free software; you can redistribute it and/or modify  *
 
8
 *   it under the terms of the GNU General Public License as published by  *
 
9
 *   the Free Software Foundation; either version 2 of the License, or     *
 
10
 *   (at your option) any later version.                                   *
 
11
 *                                                                         *
 
12
 ***************************************************************************/
 
13
 
 
14
#ifndef FOLDERCOMPRESSJOB_H
 
15
#define FOLDERCOMPRESSJOB_H
 
16
 
 
17
#include <KJob>
 
18
#include <KUrl>
 
19
#include <QStringList>
 
20
 
 
21
class KTemporaryFile;
 
22
 
 
23
#include "transactions/kgpgencrypt.h"
 
24
 
 
25
/**
 
26
 * @brief Show systray status for something KGpg is doing in the background
 
27
 *
 
28
 * @author Rolf Eike Beer
 
29
 */
 
30
class FolderCompressJob : public KJob {
 
31
        Q_OBJECT
 
32
 
 
33
        Q_DISABLE_COPY(FolderCompressJob)
 
34
        FolderCompressJob(); // = delete C++0x
 
35
 
 
36
        const QString m_description;
 
37
        const KUrl m_source;
 
38
        const KUrl m_dest;
 
39
        KTemporaryFile * const m_tempfile;
 
40
        const QStringList m_keys;
 
41
        QStringList m_options;
 
42
        const KGpgEncrypt::EncryptOptions m_encOptions;
 
43
 
 
44
public:
 
45
        /**
 
46
         * @brief create a new KJob to compress and encrypt a folder
 
47
         * @param parent object owning this job
 
48
         * @param description
 
49
         *
 
50
         * The job will take ownership of the transaction, i.e.
 
51
         * will delete the transaction object when the job is done.
 
52
         */
 
53
        FolderCompressJob(QObject *parent, const KUrl &source, const KUrl &dest, KTemporaryFile *tempfile, const QStringList &keys, const QStringList &options, const KGpgEncrypt::EncryptOptions encOptions);
 
54
        
 
55
        /**
 
56
         * @brief FolderCompressJob destructor
 
57
         */
 
58
        virtual ~FolderCompressJob();
 
59
 
 
60
        /**
 
61
         * @brief shows the progress indicator
 
62
         */
 
63
        virtual void start();
 
64
 
 
65
private slots:
 
66
        void doWork();
 
67
        void slotEncryptionDone(int result);
 
68
};
 
69
 
 
70
#endif /* FOLDERCOMPRESSJOB_H */