void GnoteSyncClient::note_deleted_handler(const NoteBase::Ptr & deletedNote) { m_deleted_notes[deletedNote->id()] = deletedNote->get_title(); m_file_revisions.erase(deletedNote->id()); write(m_local_manifest_file_path); }
int GnoteSyncClient::get_revision(const NoteBase::Ptr & note) { std::string note_guid = note->id(); std::map<std::string, int>::const_iterator iter = m_file_revisions.find(note_guid); if(iter != m_file_revisions.end()) { return iter->second; } else { return -1; } }
void GnoteSyncClient::set_revision(const NoteBase::Ptr & note, int revision) { m_file_revisions[note->id()] = revision; // TODO: Should we write on each of these or no? write(m_local_manifest_file_path); }