kitchensync
md5metatemplate.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OPIE_HELPER_META_TEMPLATE_NEW_H
00022 #define OPIE_HELPER_META_TEMPLATE_NEW_H
00023
00024 #include <synchistory.h>
00025
00026 #include <konnector.h>
00027 #include <idhelper.h>
00028
00029
00030 namespace OpieHelper {
00031
00032 template <class Syncee = KSync::Syncee, class Entry = KSync::SyncEntry>
00033 class MD5Template : public KSync::SyncHistory<Syncee,Entry> {
00034 public:
00035 MD5Template( Syncee*, const QString& file );
00036 ~MD5Template();
00037
00038 protected:
00039 virtual QString entryToString( Entry* ) = 0;
00040 virtual QString string( Entry* );
00041 };
00042
00043
00044 template<class Syncee, class Entry>
00045 MD5Template<Syncee, Entry>::MD5Template( Syncee* syncee, const QString& file )
00046 : KSync::SyncHistory<Syncee, Entry>( syncee, file )
00047 {}
00048
00049 template<class Syncee, class Entry>
00050 MD5Template<Syncee, Entry>::~MD5Template()
00051 {}
00052
00053 template<class Syncee, class Entry>
00054 QString MD5Template<Syncee, Entry>::string( Entry* ent) {
00055 QString str = entryToString( ent );
00056 return KSync::Konnector::generateMD5Sum( str );
00057 }
00058 }
00059
00060
00061 #endif
|