reformat files before major edits

git-svn-id: http://encfs.googlecode.com/svn/trunk@78 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
Valient Gough 2012-04-26 02:18:26 +00:00
parent b28b97999e
commit 5d99db5376
2 changed files with 1395 additions and 1393 deletions

View File

@ -130,14 +130,16 @@ struct ConfigInfo
#include "boost-versioning.h"
// define serialization helpers
// TODO(vgough): eliminate entirely
namespace boost
{
namespace serialization
{
template<class Archive>
void save(Archive &ar, const EncFSConfig &cfg,
namespace serialization
{
template<class Archive>
void save(Archive &ar, const EncFSConfig &cfg,
unsigned int version)
{
{
(void)version;
// version 20 (aka 20100613)
if (cfg.subVersion == 0)
@ -169,11 +171,11 @@ namespace boost
serial::make_binary_object(cfg.getSaltData(), size));
ar << make_nvp("kdfIterations", cfg.kdfIterations);
ar << make_nvp("desiredKDFDuration", cfg.desiredKDFDuration);
}
}
template<class Archive>
void load(Archive &ar, EncFSConfig &cfg, unsigned int version)
{
template<class Archive>
void load(Archive &ar, EncFSConfig &cfg, unsigned int version)
{
rInfo("version = %i", version);
// TODO: figure out how to deprecate all but the first case..
if (version == 20 || version >= 20100713)
@ -238,24 +240,24 @@ namespace boost
cfg.kdfIterations = 16;
cfg.desiredKDFDuration = NormalKDFDuration;
}
}
}
template<class Archive>
void serialize(Archive &ar, EncFSConfig &cfg, unsigned int version)
{
template<class Archive>
void serialize(Archive &ar, EncFSConfig &cfg, unsigned int version)
{
split_free(ar, cfg, version);
}
}
template<class Archive>
void serialize(Archive &ar, Interface &i, const unsigned int version)
{
template<class Archive>
void serialize(Archive &ar, Interface &i, const unsigned int version)
{
(void)version;
ar & make_nvp("name", i.name());
ar & make_nvp("major", i.current());
ar & make_nvp("minor", i.revision());
}
}
}
} // namespace serialization
} // namespace boost
EncFS_Root::EncFS_Root()
{

View File

@ -98,14 +98,14 @@ struct EncFS_Opts
/*
Read existing config file. Looks for any supported configuration version.
*/
*/
ConfigType readConfig( const std::string &rootDir,
const boost::shared_ptr<EncFSConfig> &config );
/*
Save the configuration. Saves back as the same configuration type as was
read from.
*/
*/
bool saveConfig( ConfigType type, const std::string &rootdir,
const boost::shared_ptr<EncFSConfig> &config );