예제 #1
0
 std::string RemoteControl::CreateNote()
 {
   try {
     Note::Ptr note = m_manager.create ();
     return note->uri();
   } 
   catch(...)
   {
   }
   return "";
 }
예제 #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 "";
  }
예제 #3
0
void RemoteControl::on_note_saved(const Note::Ptr & note)
{
  if(note) {
    NoteSaved(note->uri());
  }
}
예제 #4
0
void RemoteControl::on_note_deleted(const Note::Ptr & note)
{
  if(note) {
    NoteDeleted(note->uri(), note->get_title());
  }
}
예제 #5
0
void RemoteControl::on_note_added(const Note::Ptr & note)
{
  if(note) {
    NoteAdded(note->uri());
  }
}
예제 #6
0
 std::string RemoteControl::FindStartHereNote()
 {
   Note::Ptr note = m_manager.find_by_uri (m_manager.start_note_uri());
   return (!note) ? "" : note->uri();
 }
예제 #7
0
 std::string RemoteControl::FindNote(const std::string& linked_title)
 {
   Note::Ptr note = m_manager.find (linked_title);
   return (!note) ? "" : note->uri();
 }