本文整理汇总了C++中CItemData::SetATime方法的典型用法代码示例。如果您正苦于以下问题:C++ CItemData::SetATime方法的具体用法?C++ CItemData::SetATime怎么用?C++ CItemData::SetATime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItemData
的用法示例。
在下文中一共展示了CItemData::SetATime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void FileV3Test::SetUp()
{
fullItem.CreateUUID();
fullItem.SetTitle(title);
fullItem.SetPassword(password);
fullItem.SetUser(user);
fullItem.SetNotes(notes);
fullItem.SetGroup(group);
fullItem.SetURL(url);
fullItem.SetAutoType(at);
fullItem.SetEmail(email);
fullItem.SetPolicyName(polname);
fullItem.SetSymbols(symbols);
fullItem.SetRunCommand(runcmd);
fullItem.SetATime(aTime);
fullItem.SetCTime(cTime);
fullItem.SetXTime(xTime);
fullItem.SetPMTime(pmTime);
fullItem.SetRMTime(rmTime);
fullItem.SetDCA(iDCA);
fullItem.SetShiftDCA(iSDCA);
fullItem.SetKBShortcut(kbs);
smallItem.CreateUUID();
smallItem.SetTitle(_T("picollo"));
smallItem.SetPassword(_T("tiny-passw"));
}
示例2: testAttFile
void FileV4Test::SetUp()
{
hdr.m_prefString = _T("aPrefString");
hdr.m_whenlastsaved = 1413129351; // overwritten in Open()
hdr.m_lastsavedby = _T("aUser");
hdr.m_lastsavedon = _T("aMachine");
hdr.m_whatlastsaved = _T("PasswordSafe test framework");
hdr.m_DB_Name = fname.c_str();
hdr.m_DB_Description = _T("Test the header's persistency");
fullItem.CreateUUID();
fullItem.SetTitle(title);
fullItem.SetPassword(password);
fullItem.SetUser(user);
fullItem.SetNotes(notes);
fullItem.SetGroup(group);
fullItem.SetURL(url);
fullItem.SetAutoType(at);
fullItem.SetEmail(email);
fullItem.SetSymbols(symbols);
fullItem.SetRunCommand(runcmd);
fullItem.SetATime(aTime);
fullItem.SetCTime(cTime);
fullItem.SetXTime(xTime);
fullItem.SetPMTime(pmTime);
fullItem.SetRMTime(rmTime);
fullItem.SetDCA(iDCA);
fullItem.SetShiftDCA(iSDCA);
smallItem.CreateUUID();
smallItem.SetTitle(_T("picollo"));
smallItem.SetPassword(_T("tiny-passw"));
attItem.CreateUUID();
attItem.SetTitle(L"I'm an attachment");
const stringT testAttFile(L"data/image1.jpg");
int status = attItem.Import(testAttFile);
ASSERT_EQ(PWSfile::SUCCESS, status);
}
示例3: SetUp
void ItemDataTest::SetUp()
{
fullItem.SetTitle(title);
fullItem.SetPassword(password);
fullItem.SetUser(user);
fullItem.SetNotes(notes);
fullItem.SetGroup(group);
fullItem.SetURL(url);
fullItem.SetAutoType(at);
fullItem.SetEmail(email);
fullItem.SetPolicyName(polname);
fullItem.SetSymbols(symbols);
fullItem.SetRunCommand(runcmd);
fullItem.SetATime(aTime);
fullItem.SetCTime(cTime);
fullItem.SetXTime(xTime);
fullItem.SetPMTime(pmTime);
fullItem.SetRMTime(rmTime);
fullItem.SetDCA(iDCA);
fullItem.SetShiftDCA(iSDCA);
fullItem.SetXTimeInt(xTimeInt);
fullItem.SetKBShortcut(kbs);
}
示例4: AddXMLEntries
void XMLFileHandlers::AddXMLEntries()
{
// First add any Policy Names imported that are not already in the database
// This must be done prior to importing entries that may reference them
if (!m_MapPSWDPLC.empty()) {
Command *pcmd = DBPolicyNamesCommand::Create(m_pXMLcore, m_MapPSWDPLC,
DBPolicyNamesCommand::NP_ADDNEW);
m_pmulticmds->Add(pcmd);
}
// Get current DB default password policy and that from the XML file and
// check that they are the same?
PWPolicy st_to_default_pp, st_import_default_pp;
st_to_default_pp = PWSprefs::GetInstance()->GetDefaultPolicy();
st_import_default_pp = PWSprefs::GetInstance()->GetDefaultPolicy(true);
const bool bPWPDefaults_Different = st_to_default_pp != st_import_default_pp;
StringX sxEntriesWithNewNamedPolicies;
vdb_entries::iterator entry_iter;
CItemData ci_temp;
bool bMaintainDateTimeStamps = PWSprefs::GetInstance()->
GetPref(PWSprefs::MaintainDateTimeStamps);
bool bIntoEmpty = m_pXMLcore->GetNumEntries() == 0;
// Initialize sets
GTUSet setGTU;
m_pXMLcore->InitialiseGTU(setGTU);
UUIDSet setUUID;
m_pXMLcore->InitialiseUUID(setUUID);
Command *pcmd1 = UpdateGUICommand::Create(m_pXMLcore,
UpdateGUICommand::WN_UNDO,
UpdateGUICommand::GUI_UNDO_IMPORT);
m_pmulticmds->Add(pcmd1);
for (entry_iter = m_ventries.begin(); entry_iter != m_ventries.end(); entry_iter++) {
bool bNoPolicy(false);
pw_entry *cur_entry = *entry_iter;
StringX sxtitle(cur_entry->title);
StringX sxMissingPolicyName;
EmptyIfOnlyWhiteSpace(sxtitle);
// Title and Password are mandatory fields!
if (sxtitle.empty() || cur_entry->password.empty()) {
stringT cs_error, cs_temp, cs_id, cs_tp, cs_t(_T("")), cs_p(_T(""));
int num = 0;
if (sxtitle.empty()) {
num++;
cs_t = CItemData::EngFieldName(CItemData::TITLE);
}
if (cur_entry->password.empty()) {
num++;
cs_p = CItemData::EngFieldName(CItemData::PASSWORD);
}
Format(cs_tp, _T("%s%s%s"), cs_t.c_str(), num == 2 ? _T(" & ") : _T(""), cs_p.c_str());
stringT::iterator new_end = std::remove(cs_tp.begin(), cs_tp.end(), TCHAR('\t'));
cs_tp.erase(new_end, cs_tp.end());
LoadAString(cs_id, IDSC_IMPORT_ENTRY_ID);
Format(cs_temp, IDSC_IMPORTENTRY, cs_id.c_str(), cur_entry->id,
cur_entry->group.c_str(), cur_entry->title.c_str(), cur_entry->username.c_str());
Format(cs_error, IDSC_IMPORTRECSKIPPED, cs_temp.c_str(), cs_tp.c_str());
m_strSkippedList += cs_error;
m_numEntriesSkipped++;
m_numEntries--;
delete cur_entry;
continue;
}
if (m_bImportPSWDsOnly) {
ItemListIter iter = m_pXMLcore->Find(cur_entry->group, cur_entry->title, cur_entry->username);
if (iter == m_pXMLcore->GetEntryEndIter()) {
stringT cs_error, cs_id, cs_temp;
LoadAString(cs_id, IDSC_IMPORT_ENTRY_ID);
Format(cs_temp, IDSC_IMPORTENTRY, cs_id.c_str(), cur_entry->id,
cur_entry->group.c_str(), cur_entry->title.c_str(), cur_entry->username.c_str());
Format(cs_error, IDSC_IMPORTRECNOTFOUND, cs_temp.c_str());
m_strSkippedList += cs_error;
m_numEntriesSkipped++;
m_numEntries--;
} else {
CItemData *pci = &iter->second;
Command *pcmd = UpdatePasswordCommand::Create(m_pXMLcore, *pci,
cur_entry->password);
pcmd->SetNoGUINotify();
m_pmulticmds->Add(pcmd);
if (bMaintainDateTimeStamps) {
pci->SetATime();
}
}
delete cur_entry;
continue;
}
uuid_array_t ua;
ci_temp.Clear();
bool bNewUUID(true);
if (!cur_entry->uuid.empty()) {
stringT temp = cur_entry->uuid.c_str();
//.........这里部分代码省略.........