////////////////////////////////////////////////////////////////////////// WriteDatabase //////////////////////////////////////////////////////////////////////////
| 349 | // WriteDatabase |
| 350 | /////////////////////////////////////////////////////////////////////////////// |
| 351 | void cTWUtil::WriteDatabase(const TCHAR* filename, |
| 352 | cFCODatabaseFile& db, |
| 353 | bool bEncrypt, |
| 354 | const cElGamalSigPrivateKey* pPrivateKey) |
| 355 | { |
| 356 | cFileHeader fileHeader; |
| 357 | fileHeader.SetID(db.GetFileHeaderID()); |
| 358 | |
| 359 | // I am almost positive that this does nothing, WriteObject() sets the version in the cFileHeader - Jun 8, 1999 - dmb |
| 360 | //fileHeader.SetVersion(1); |
| 361 | |
| 362 | #ifdef TW_PROFILE |
| 363 | cTaskTimer timer(_T("Write Database")); |
| 364 | timer.Start(); |
| 365 | #endif |
| 366 | |
| 367 | WriteObject(filename, 0, db, fileHeader, bEncrypt, pPrivateKey); |
| 368 | |
| 369 | #ifdef TW_PROFILE |
| 370 | timer.Stop(); |
| 371 | #endif |
| 372 | |
| 373 | iUserNotify::GetInstance()->Notify(iUserNotify::V_NORMAL, |
| 374 | _T("%s%s\n"), |
| 375 | TSS_GetString(cTW, tw::STR_WRITE_DB_FILE).c_str(), |
| 376 | cDisplayEncoder::EncodeInline(filename).c_str()); |
| 377 | } |
| 378 | |
| 379 | /////////////////////////////////////////////////////////////////////////////// |
| 380 | // ReadDatabase |