| 285 | |
| 286 | |
| 287 | static void OutputDatabaseHeader(const cFCODbHeader& dbHeader, TOSTREAM* pOut) |
| 288 | { |
| 289 | const int headerColumnWidth = 30; |
| 290 | (*pOut) << TSS_GetString(cTW, tw::STR_DBPRINT_TITLE) << endl << endl; |
| 291 | |
| 292 | (*pOut).width(headerColumnWidth); |
| 293 | (*pOut) << TSS_GetString(cTW, tw::STR_DB_GENERATED_BY) << util_Encode(dbHeader.GetCreator()) << endl; |
| 294 | |
| 295 | TSTRING tstrDummy; |
| 296 | int64 i64CreateTime = dbHeader.GetCreationTime(); |
| 297 | (*pOut).width(headerColumnWidth); |
| 298 | (*pOut) << TSS_GetString(cTW, tw::STR_DB_CREATED_ON) << cTWLocale::FormatTime(i64CreateTime, tstrDummy).c_str() |
| 299 | << endl; |
| 300 | |
| 301 | (*pOut).width(headerColumnWidth); |
| 302 | (*pOut) << TSS_GetString(cTW, tw::STR_DB_LAST_UPDATE); |
| 303 | |
| 304 | int64 i64LastDBUTime = dbHeader.GetLastDBUpdateTime(); |
| 305 | if (i64LastDBUTime == 0) |
| 306 | { |
| 307 | (*pOut) << TSS_GetString(cTW, tw::STR_NEVER) << endl << endl; |
| 308 | } |
| 309 | else |
| 310 | { |
| 311 | (*pOut) << cTWLocale::FormatTime(i64LastDBUTime, tstrDummy).c_str() << endl << endl; |
| 312 | } |
| 313 | |
| 314 | OutputSectionDelimiter(tw::STR_DB_SUMMARY, pOut); |
| 315 | |
| 316 | (*pOut).width(headerColumnWidth); |
| 317 | (*pOut) << TSS_GetString(cTW, tw::STR_HOST_NAME) << dbHeader.GetSystemName().c_str() << endl; |
| 318 | (*pOut).width(headerColumnWidth); |
| 319 | (*pOut) << TSS_GetString(cTW, tw::STR_HOST_IP) << dbHeader.GetIPAddress() << endl; |
| 320 | |
| 321 | |
| 322 | (*pOut).width(headerColumnWidth); |
| 323 | (*pOut) << TSS_GetString(cTW, tw::STR_HOST_ID); |
| 324 | |
| 325 | if (!dbHeader.GetHostID().empty()) |
| 326 | (*pOut) << dbHeader.GetHostID() << endl; |
| 327 | else |
| 328 | (*pOut) << TSS_GetString(cTW, tw::STR_NONE) << endl; |
| 329 | |
| 330 | |
| 331 | (*pOut) << setw(headerColumnWidth) << TSS_GetString(cTW, tw::STR_POLICY_FILE_USED) |
| 332 | << util_Encode(dbHeader.GetPolicyFilename()) << endl; |
| 333 | |
| 334 | (*pOut) << setw(headerColumnWidth) << TSS_GetString(cTW, tw::STR_CONFIG_FILE_USED) |
| 335 | << util_Encode(dbHeader.GetConfigFilename()) << endl; |
| 336 | |
| 337 | (*pOut) << setw(headerColumnWidth) << TSS_GetString(cTW, tw::STR_DB_FILE_USED) |
| 338 | << util_Encode(dbHeader.GetDBFilename()) << endl; |
| 339 | |
| 340 | (*pOut) << setw(headerColumnWidth) << TSS_GetString(cTW, tw::STR_CMD_LINE_USED) |
| 341 | << util_Encode(dbHeader.GetCommandLineParams()) << endl |
| 342 | << endl; |
| 343 | } |
| 344 |
no test coverage detected