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 #ifndef GPASMAN_RC2_CODEC_PROTOTYPE_H
00030 #define GPASMAN_RC2_CODEC_PROTOTYPE_H
00031
00032 #include <stdio.h>
00033 #include <pwd.h>
00034 #include <sys/types.h>
00035 #include <unistd.h>
00036 #include <errno.h>
00037
00038 #include <list>
00039 #include <string>
00040 #include <vector>
00041
00042 #include <Passguard.h>
00043
00044 #include <RC2.h>
00045
00046 using namespace std;
00047
00048
00049
00050
00051
00052 class GPasmanRC2CodecPrototype : public PasswordCodecPrototype
00053 {
00054 public:
00055 GPasmanRC2CodecPrototype ();
00056 GPasmanRC2CodecPrototype (const GPasmanRC2CodecPrototype& password_codec_prototype);
00057 virtual ~GPasmanRC2CodecPrototype ();
00058
00059 virtual PasswordCodecPrototype* clone (void) const;
00060
00061 virtual bool loadFile (string filename, string password);
00062 virtual bool saveFile (string password);
00063
00064 virtual bool pushPasswordInfos (PasswordInfos* password_infos);
00065
00066 virtual bool hasFixedField (void) const;
00067 virtual int getNbField (void) const;
00068 virtual PasswordInfos getFieldsName (void) const;
00069 virtual bool setFieldsName (PasswordInfos fields_name_infos);
00070
00071 private:
00072 string _filename;
00073 PasswordInfos _fields_name;
00074 list<PasswordInfos*> _password_infos_list;
00075 };
00076
00077 #endif