kleopatra
signencryptfilescommand.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef __KLEO_UISERVER_SIGNENCRYPTFILESCOMMAND_H__
00034 #define __KLEO_UISERVER_SIGNENCRYPTFILESCOMMAND_H__
00035
00036 #include "assuancommand.h"
00037
00038 #include <utils/pimpl_ptr.h>
00039
00040 namespace Kleo {
00041
00042 class SignEncryptFilesCommand : public Kleo::AssuanCommandMixin<SignEncryptFilesCommand> {
00043 public:
00044 SignEncryptFilesCommand();
00045 virtual ~SignEncryptFilesCommand();
00046
00047 protected:
00048 enum Operation {
00049 SignDisallowed = 0,
00050 SignAllowed = 1,
00051 SignForced = 2,
00052
00053 SignMask = SignAllowed|SignForced,
00054
00055 EncryptDisallowed = 0,
00056 EncryptAllowed = 4,
00057 EncryptForced = 8,
00058
00059 EncryptMask = EncryptAllowed|EncryptForced
00060 };
00061
00062 private:
00063 virtual unsigned int operation() const { return SignAllowed|EncryptAllowed ; }
00064 private:
00065 int doStart();
00066 void doCanceled();
00067 public:
00068 static const char * staticName() { return "SIGN_ENCRYPT_FILES"; }
00069
00070 class Private;
00071 private:
00072 kdtools::pimpl_ptr<Private> d;
00073 };
00074
00075 class EncryptSignFilesCommand : public Kleo::AssuanCommandMixin<EncryptSignFilesCommand,SignEncryptFilesCommand> {
00076 public:
00077 static const char * staticName() { return "ENCRYPT_SIGN_FILES"; }
00078 };
00079
00080 class EncryptFilesCommand : public Kleo::AssuanCommandMixin<EncryptFilesCommand,SignEncryptFilesCommand> {
00081 public:
00082 static const char * staticName() { return "ENCRYPT_FILES"; }
00083 unsigned int operation() const { return SignAllowed|EncryptForced; }
00084 };
00085
00086 class SignFilesCommand : public Kleo::AssuanCommandMixin<SignFilesCommand,SignEncryptFilesCommand> {
00087 public:
00088 static const char * staticName() { return "SIGN_FILES"; }
00089 unsigned int operation() const { return SignForced|EncryptAllowed; }
00090 };
00091
00092 }
00093
00094 #endif