Beispiel #1
0
 std::string RemoteControl::CreateNote()
 {
   try {
     Note::Ptr note = m_manager.create ();
     return note->uri();
   } 
   catch(...)
   {
   }
   return "";
 }
Beispiel #2
0
  std::string RemoteControl::CreateNamedNote(const std::string& linked_title)
  {
    Note::Ptr note;

    note = m_manager.find (linked_title);
    if (note)
      return "";

    try {
      note = m_manager.create (linked_title);
      return note->uri();
    } 
    catch (const std::exception & e) {
      ERR_OUT("create throw: %s", e.what());
    }
    return "";
  }
Beispiel #3
0
void RemoteControl::on_note_saved(const Note::Ptr & note)
{
  if(note) {
    NoteSaved(note->uri());
  }
}
Beispiel #4
0
void RemoteControl::on_note_deleted(const Note::Ptr & note)
{
  if(note) {
    NoteDeleted(note->uri(), note->get_title());
  }
}
Beispiel #5
0
void RemoteControl::on_note_added(const Note::Ptr & note)
{
  if(note) {
    NoteAdded(note->uri());
  }
}
Beispiel #6
0
 std::string RemoteControl::FindStartHereNote()
 {
   Note::Ptr note = m_manager.find_by_uri (m_manager.start_note_uri());
   return (!note) ? "" : note->uri();
 }
Beispiel #7
0
 std::string RemoteControl::FindNote(const std::string& linked_title)
 {
   Note::Ptr note = m_manager.find (linked_title);
   return (!note) ? "" : note->uri();
 }