[gnote] Replace std::string by Glib::ustring in remotecontrol-glue
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in remotecontrol-glue
- Date: Fri, 17 Feb 2017 20:53:47 +0000 (UTC)
commit 40786a5d7762403b2a972970621dcc220db2b050
Author: Aurimas Černius <aurisc4 gmail com>
Date: Fri Feb 17 22:01:00 2017 +0200
Replace std::string by Glib::ustring in remotecontrol-glue
src/dbus/remotecontrol-glue.cpp | 40 ++++++--------------
src/dbus/remotecontrol-glue.hpp | 78 +++++++++++++++++++--------------------
src/dbus/remotecontrol.cpp | 78 +++++++++++++++++++-------------------
src/dbus/remotecontrol.hpp | 55 +++++++++++++--------------
4 files changed, 116 insertions(+), 135 deletions(-)
---
diff --git a/src/dbus/remotecontrol-glue.cpp b/src/dbus/remotecontrol-glue.cpp
index 867e60b..f30248c 100644
--- a/src/dbus/remotecontrol-glue.cpp
+++ b/src/dbus/remotecontrol-glue.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011,2017 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -65,12 +65,12 @@ RemoteControl_adaptor::RemoteControl_adaptor(const Glib::RefPtr<Gio::DBus::Conne
m_stubs["Version"] = &RemoteControl_adaptor::Version_stub;
}
-void RemoteControl_adaptor::NoteAdded(const std::string & uri)
+void RemoteControl_adaptor::NoteAdded(const Glib::ustring & uri)
{
emit_signal("NoteAdded",
Glib::VariantContainerBase::create_tuple(Glib::Variant<Glib::ustring>::create(uri)));
}
-void RemoteControl_adaptor::NoteDeleted(const std::string & uri, const std::string & title)
+void RemoteControl_adaptor::NoteDeleted(const Glib::ustring & uri, const Glib::ustring & title)
{
std::vector<Glib::VariantBase> parameters;
parameters.push_back(Glib::Variant<Glib::ustring>::create(uri));
@@ -78,7 +78,7 @@ void RemoteControl_adaptor::NoteDeleted(const std::string & uri, const std::stri
emit_signal("NoteDeleted", Glib::VariantContainerBase::create_tuple(parameters));
}
-void RemoteControl_adaptor::NoteSaved(const std::string & uri)
+void RemoteControl_adaptor::NoteSaved(const Glib::ustring & uri)
{
emit_signal("NoteSaved",
Glib::VariantContainerBase::create_tuple(Glib::Variant<Glib::ustring>::create(uri)));
}
@@ -361,54 +361,38 @@ Glib::VariantContainerBase RemoteControl_adaptor::stub_string_string(const Glib:
Glib::VariantContainerBase RemoteControl_adaptor::stub_vectorstring_void(const Glib::VariantContainerBase &,
vectorstring_void_func func)
{
- std::vector<std::string> result = (this->*func)();
+ std::vector<Glib::ustring> result = (this->*func)();
- //work-around glibmm bug 657030
- std::vector<Glib::ustring> res;
- for(unsigned i = 0; i < result.size(); ++i) {
- res.push_back(result[i]);
- }
-
- return Glib::VariantContainerBase::create_tuple(Glib::Variant<std::vector<Glib::ustring> >::create(res));
+ return Glib::VariantContainerBase::create_tuple(Glib::Variant<std::vector<Glib::ustring>
::create(result));
}
Glib::VariantContainerBase RemoteControl_adaptor::stub_vectorstring_string(const Glib::VariantContainerBase
& parameters,
vectorstring_string_func func)
{
- std::vector<Glib::ustring> res;
+ std::vector<Glib::ustring> result;
if(parameters.get_n_children() == 1) {
Glib::Variant<Glib::ustring> param;
parameters.get_child(param);
- std::vector<std::string> result = (this->*func)(param.get());
-
- //work-around glibmm bug 657030
- for(unsigned i = 0; i < result.size(); ++i) {
- res.push_back(result[i]);
- }
+ result = (this->*func)(param.get());
}
- return Glib::VariantContainerBase::create_tuple(Glib::Variant<std::vector<Glib::ustring> >::create(res));
+ return Glib::VariantContainerBase::create_tuple(Glib::Variant<std::vector<Glib::ustring>
::create(result));
}
Glib::VariantContainerBase RemoteControl_adaptor::stub_vectorstring_string_bool(const
Glib::VariantContainerBase & parameters,
vectorstring_string_bool_func func)
{
- std::vector<Glib::ustring> res;
+ std::vector<Glib::ustring> result;
if(parameters.get_n_children() == 2) {
Glib::Variant<Glib::ustring> param1;
parameters.get_child(param1, 0);
Glib::Variant<bool> param2;
parameters.get_child(param2, 1);
- std::vector<std::string> result = (this->*func)(param1.get(), param2.get());
-
- //work-around glibmm bug 657030
- for(unsigned i = 0; i < result.size(); ++i) {
- res.push_back(result[i]);
- }
+ result = (this->*func)(param1.get(), param2.get());
}
- return Glib::VariantContainerBase::create_tuple(Glib::Variant<std::vector<Glib::ustring> >::create(res));
+ return Glib::VariantContainerBase::create_tuple(Glib::Variant<std::vector<Glib::ustring>
::create(result));
}
diff --git a/src/dbus/remotecontrol-glue.hpp b/src/dbus/remotecontrol-glue.hpp
index 5fbac10..251144b 100644
--- a/src/dbus/remotecontrol-glue.hpp
+++ b/src/dbus/remotecontrol-glue.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011,2017 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
*/
-#include <string>
-
#include <giomm/dbusconnection.h>
#include <giomm/dbusinterfacevtable.h>
@@ -35,36 +33,36 @@ public:
const char *object_path, const char *interface_name,
const Glib::RefPtr<Gio::DBus::InterfaceInfo> & gnote_interface);
- virtual bool AddTagToNote(const std::string& uri, const std::string& tag_name) = 0;
- virtual std::string CreateNamedNote(const std::string& linked_title) = 0;
- virtual std::string CreateNote() = 0;
- virtual bool DeleteNote(const std::string& uri) = 0;
- virtual bool DisplayNote(const std::string& uri) = 0;
- virtual bool DisplayNoteWithSearch(const std::string& uri, const std::string& search) = 0;
+ virtual bool AddTagToNote(const Glib::ustring& uri, const Glib::ustring& tag_name) = 0;
+ virtual Glib::ustring CreateNamedNote(const Glib::ustring& linked_title) = 0;
+ virtual Glib::ustring CreateNote() = 0;
+ virtual bool DeleteNote(const Glib::ustring& uri) = 0;
+ virtual bool DisplayNote(const Glib::ustring& uri) = 0;
+ virtual bool DisplayNoteWithSearch(const Glib::ustring& uri, const Glib::ustring& search) = 0;
virtual void DisplaySearch() = 0;
- virtual void DisplaySearchWithText(const std::string& search_text) = 0;
- virtual std::string FindNote(const std::string& linked_title) = 0;
- virtual std::string FindStartHereNote() = 0;
- virtual std::vector<std::string> GetAllNotesWithTag(const std::string& tag_name) = 0;
- virtual int32_t GetNoteChangeDate(const std::string& uri) = 0;
- virtual std::string GetNoteCompleteXml(const std::string& uri) = 0;
- virtual std::string GetNoteContents(const std::string& uri) = 0;
- virtual std::string GetNoteContentsXml(const std::string& uri) = 0;
- virtual int32_t GetNoteCreateDate(const std::string& uri) = 0;
- virtual std::string GetNoteTitle(const std::string& uri) = 0;
- virtual std::vector<std::string> GetTagsForNote(const std::string& uri) = 0;
- virtual bool HideNote(const std::string& uri) = 0;
- virtual std::vector<std::string> ListAllNotes() = 0;
- virtual bool NoteExists(const std::string& uri) = 0;
- virtual bool RemoveTagFromNote(const std::string& uri, const std::string& tag_name) = 0;
- virtual std::vector<std::string> SearchNotes(const std::string& query, const bool& case_sensitive) = 0;
- virtual bool SetNoteCompleteXml(const std::string& uri, const std::string& xml_contents) = 0;
- virtual bool SetNoteContents(const std::string& uri, const std::string& text_contents) = 0;
- virtual bool SetNoteContentsXml(const std::string& uri, const std::string& xml_contents) = 0;
- virtual std::string Version() = 0;
- void NoteAdded(const std::string & );
- void NoteDeleted(const std::string &, const std::string &);
- void NoteSaved(const std::string &);
+ virtual void DisplaySearchWithText(const Glib::ustring& search_text) = 0;
+ virtual Glib::ustring FindNote(const Glib::ustring& linked_title) = 0;
+ virtual Glib::ustring FindStartHereNote() = 0;
+ virtual std::vector<Glib::ustring> GetAllNotesWithTag(const Glib::ustring& tag_name) = 0;
+ virtual int32_t GetNoteChangeDate(const Glib::ustring& uri) = 0;
+ virtual Glib::ustring GetNoteCompleteXml(const Glib::ustring& uri) = 0;
+ virtual Glib::ustring GetNoteContents(const Glib::ustring& uri) = 0;
+ virtual Glib::ustring GetNoteContentsXml(const Glib::ustring& uri) = 0;
+ virtual int32_t GetNoteCreateDate(const Glib::ustring& uri) = 0;
+ virtual Glib::ustring GetNoteTitle(const Glib::ustring& uri) = 0;
+ virtual std::vector<Glib::ustring> GetTagsForNote(const Glib::ustring& uri) = 0;
+ virtual bool HideNote(const Glib::ustring& uri) = 0;
+ virtual std::vector<Glib::ustring> ListAllNotes() = 0;
+ virtual bool NoteExists(const Glib::ustring& uri) = 0;
+ virtual bool RemoveTagFromNote(const Glib::ustring& uri, const Glib::ustring& tag_name) = 0;
+ virtual std::vector<Glib::ustring> SearchNotes(const Glib::ustring& query, const bool& case_sensitive) = 0;
+ virtual bool SetNoteCompleteXml(const Glib::ustring& uri, const Glib::ustring& xml_contents) = 0;
+ virtual bool SetNoteContents(const Glib::ustring& uri, const Glib::ustring& text_contents) = 0;
+ virtual bool SetNoteContentsXml(const Glib::ustring& uri, const Glib::ustring& xml_contents) = 0;
+ virtual Glib::ustring Version() = 0;
+ void NoteAdded(const Glib::ustring & );
+ void NoteDeleted(const Glib::ustring &, const Glib::ustring &);
+ void NoteSaved(const Glib::ustring &);
private:
void on_method_call(const Glib::RefPtr<Gio::DBus::Connection> & connection,
const Glib::ustring & sender,
@@ -103,21 +101,21 @@ private:
Glib::VariantContainerBase SetNoteContentsXml_stub(const Glib::VariantContainerBase &);
Glib::VariantContainerBase Version_stub(const Glib::VariantContainerBase &);
- typedef void (RemoteControl_adaptor::*void_string_func)(const std::string &);
+ typedef void (RemoteControl_adaptor::*void_string_func)(const Glib::ustring &);
Glib::VariantContainerBase stub_void_string(const Glib::VariantContainerBase &, void_string_func);
- typedef bool (RemoteControl_adaptor::*bool_string_func)(const std::string &);
+ typedef bool (RemoteControl_adaptor::*bool_string_func)(const Glib::ustring &);
Glib::VariantContainerBase stub_bool_string(const Glib::VariantContainerBase &, bool_string_func);
- typedef bool (RemoteControl_adaptor::*bool_string_string_func)(const std::string &, const std::string &);
+ typedef bool (RemoteControl_adaptor::*bool_string_string_func)(const Glib::ustring &, const Glib::ustring
&);
Glib::VariantContainerBase stub_bool_string_string(const Glib::VariantContainerBase &,
bool_string_string_func);
- typedef int32_t (RemoteControl_adaptor::*int_string_func)(const std::string &);
+ typedef int32_t (RemoteControl_adaptor::*int_string_func)(const Glib::ustring &);
Glib::VariantContainerBase stub_int_string(const Glib::VariantContainerBase &, int_string_func);
- typedef std::string (RemoteControl_adaptor::*string_string_func)(const std::string &);
+ typedef Glib::ustring (RemoteControl_adaptor::*string_string_func)(const Glib::ustring &);
Glib::VariantContainerBase stub_string_string(const Glib::VariantContainerBase &, string_string_func);
- typedef std::vector<std::string> (RemoteControl_adaptor::*vectorstring_void_func)();
+ typedef std::vector<Glib::ustring> (RemoteControl_adaptor::*vectorstring_void_func)();
Glib::VariantContainerBase stub_vectorstring_void(const Glib::VariantContainerBase &,
vectorstring_void_func);
- typedef std::vector<std::string> (RemoteControl_adaptor::*vectorstring_string_func)(const std::string &);
+ typedef std::vector<Glib::ustring> (RemoteControl_adaptor::*vectorstring_string_func)(const Glib::ustring
&);
Glib::VariantContainerBase stub_vectorstring_string(const Glib::VariantContainerBase &,
vectorstring_string_func);
- typedef std::vector<std::string> (RemoteControl_adaptor::*vectorstring_string_bool_func)(const std::string
&, const bool &);
+ typedef std::vector<Glib::ustring> (RemoteControl_adaptor::*vectorstring_string_bool_func)(const
Glib::ustring &, const bool &);
Glib::VariantContainerBase stub_vectorstring_string_bool(const Glib::VariantContainerBase &,
vectorstring_string_bool_func);
typedef Glib::VariantContainerBase (RemoteControl_adaptor::*stub_func)(const Glib::VariantContainerBase &);
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index 0464381..45d7531 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011-2014,2016 Aurimas Cernius
+ * Copyright (C) 2011-2014,2016-2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -56,7 +56,7 @@ namespace gnote {
{
}
- bool RemoteControl::AddTagToNote(const std::string& uri, const std::string& tag_name)
+ bool RemoteControl::AddTagToNote(const Glib::ustring& uri, const Glib::ustring& tag_name)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note) {
@@ -68,7 +68,7 @@ namespace gnote {
}
- std::string RemoteControl::CreateNamedNote(const std::string& linked_title)
+ Glib::ustring RemoteControl::CreateNamedNote(const Glib::ustring& linked_title)
{
NoteBase::Ptr note = m_manager.find(linked_title);
if (note)
@@ -84,7 +84,7 @@ namespace gnote {
return "";
}
- std::string RemoteControl::CreateNote()
+ Glib::ustring RemoteControl::CreateNote()
{
try {
NoteBase::Ptr note = m_manager.create ();
@@ -96,7 +96,7 @@ namespace gnote {
return "";
}
- bool RemoteControl::DeleteNote(const std::string& uri)
+ bool RemoteControl::DeleteNote(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note) {
@@ -108,7 +108,7 @@ namespace gnote {
}
- bool RemoteControl::DisplayNote(const std::string& uri)
+ bool RemoteControl::DisplayNote(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note) {
@@ -120,7 +120,7 @@ namespace gnote {
}
- bool RemoteControl::DisplayNoteWithSearch(const std::string& uri, const std::string& search)
+ bool RemoteControl::DisplayNoteWithSearch(const Glib::ustring& uri, const Glib::ustring& search)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note) {
@@ -141,7 +141,7 @@ namespace gnote {
}
- void RemoteControl::DisplaySearchWithText(const std::string& search_text)
+ void RemoteControl::DisplaySearchWithText(const Glib::ustring& search_text)
{
MainWindow & recent_changes = IGnote::obj().get_main_window();
recent_changes.set_search_text(search_text);
@@ -150,27 +150,27 @@ namespace gnote {
}
- std::string RemoteControl::FindNote(const std::string& linked_title)
+ Glib::ustring RemoteControl::FindNote(const Glib::ustring& linked_title)
{
NoteBase::Ptr note = m_manager.find(linked_title);
return (!note) ? "" : note->uri();
}
- std::string RemoteControl::FindStartHereNote()
+ Glib::ustring RemoteControl::FindStartHereNote()
{
NoteBase::Ptr note = m_manager.find_by_uri(m_manager.start_note_uri());
return (!note) ? "" : note->uri();
}
- std::vector< std::string > RemoteControl::GetAllNotesWithTag(const std::string& tag_name)
+ std::vector<Glib::ustring> RemoteControl::GetAllNotesWithTag(const Glib::ustring& tag_name)
{
Tag::Ptr tag = ITagManager::obj().get_tag(tag_name);
if (!tag)
- return std::vector< std::string >();
+ return std::vector<Glib::ustring>();
- std::vector< std::string > tagged_note_uris;
+ std::vector<Glib::ustring> tagged_note_uris;
std::list<NoteBase*> notes;
tag->get_notes(notes);
FOREACH(NoteBase *iter, notes) {
@@ -180,7 +180,7 @@ namespace gnote {
}
- int32_t RemoteControl::GetNoteChangeDate(const std::string& uri)
+ int32_t RemoteControl::GetNoteChangeDate(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -189,7 +189,7 @@ namespace gnote {
}
- std::string RemoteControl::GetNoteCompleteXml(const std::string& uri)
+ Glib::ustring RemoteControl::GetNoteCompleteXml(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -199,7 +199,7 @@ namespace gnote {
}
- std::string RemoteControl::GetNoteContents(const std::string& uri)
+ Glib::ustring RemoteControl::GetNoteContents(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -208,7 +208,7 @@ namespace gnote {
}
- std::string RemoteControl::GetNoteContentsXml(const std::string& uri)
+ Glib::ustring RemoteControl::GetNoteContentsXml(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -217,7 +217,7 @@ namespace gnote {
}
- int32_t RemoteControl::GetNoteCreateDate(const std::string& uri)
+ int32_t RemoteControl::GetNoteCreateDate(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -226,7 +226,7 @@ namespace gnote {
}
- std::string RemoteControl::GetNoteTitle(const std::string& uri)
+ Glib::ustring RemoteControl::GetNoteTitle(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -235,13 +235,13 @@ namespace gnote {
}
- std::vector< std::string > RemoteControl::GetTagsForNote(const std::string& uri)
+ std::vector<Glib::ustring> RemoteControl::GetTagsForNote(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
- return std::vector< std::string >();
+ return std::vector<Glib::ustring>();
- std::vector< std::string > tags;
+ std::vector<Glib::ustring> tags;
std::list<Tag::Ptr> l;
note->get_tags(l);
for (std::list<Tag::Ptr>::const_iterator iter = l.begin();
@@ -252,7 +252,7 @@ namespace gnote {
}
-bool RemoteControl::HideNote(const std::string& uri)
+bool RemoteControl::HideNote(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -270,25 +270,25 @@ bool RemoteControl::HideNote(const std::string& uri)
}
-std::vector< std::string > RemoteControl::ListAllNotes()
+std::vector<Glib::ustring> RemoteControl::ListAllNotes()
{
- std::vector< std::string > uris;
- FOREACH(const NoteBase::Ptr & iter, m_manager.get_notes()) {
+ std::vector<Glib::ustring> uris;
+ for(const NoteBase::Ptr & iter : m_manager.get_notes()) {
uris.push_back(iter->uri());
}
return uris;
}
-bool RemoteControl::NoteExists(const std::string& uri)
+bool RemoteControl::NoteExists(const Glib::ustring& uri)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
return note != NULL;
}
-bool RemoteControl::RemoveTagFromNote(const std::string& uri,
- const std::string& tag_name)
+bool RemoteControl::RemoveTagFromNote(const Glib::ustring& uri,
+ const Glib::ustring& tag_name)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if (!note)
@@ -301,14 +301,14 @@ bool RemoteControl::RemoveTagFromNote(const std::string& uri,
}
-std::vector< std::string > RemoteControl::SearchNotes(const std::string& query,
+std::vector<Glib::ustring> RemoteControl::SearchNotes(const Glib::ustring& query,
const bool& case_sensitive)
{
if (query.empty())
- return std::vector< std::string >();
+ return std::vector<Glib::ustring>();
Search search(m_manager);
- std::vector< std::string > list;
+ std::vector<Glib::ustring> list;
Search::ResultsPtr results =
search.search_notes(query, case_sensitive, notebooks::Notebook::Ptr());
@@ -322,8 +322,8 @@ std::vector< std::string > RemoteControl::SearchNotes(const std::string& query,
}
-bool RemoteControl::SetNoteCompleteXml(const std::string& uri,
- const std::string& xml_contents)
+bool RemoteControl::SetNoteCompleteXml(const Glib::ustring& uri,
+ const Glib::ustring& xml_contents)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if(!note) {
@@ -335,8 +335,8 @@ bool RemoteControl::SetNoteCompleteXml(const std::string& uri,
}
-bool RemoteControl::SetNoteContents(const std::string& uri,
- const std::string& text_contents)
+bool RemoteControl::SetNoteContents(const Glib::ustring& uri,
+ const Glib::ustring& text_contents)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if(!note) {
@@ -348,8 +348,8 @@ bool RemoteControl::SetNoteContents(const std::string& uri,
}
-bool RemoteControl::SetNoteContentsXml(const std::string& uri,
- const std::string& xml_contents)
+bool RemoteControl::SetNoteContentsXml(const Glib::ustring& uri,
+ const Glib::ustring& xml_contents)
{
NoteBase::Ptr note = m_manager.find_by_uri(uri);
if(!note) {
@@ -360,7 +360,7 @@ bool RemoteControl::SetNoteContentsXml(const std::string& uri,
}
-std::string RemoteControl::Version()
+Glib::ustring RemoteControl::Version()
{
return VERSION;
}
diff --git a/src/dbus/remotecontrol.hpp b/src/dbus/remotecontrol.hpp
index acccb5b..59ea079 100644
--- a/src/dbus/remotecontrol.hpp
+++ b/src/dbus/remotecontrol.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011-2014 Aurimas Cernius
+ * Copyright (C) 2011-2014,2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@
#ifndef __GNOTE_REMOTECONTROL_HPP_
#define __GNOTE_REMOTECONTROL_HPP_
-#include <string>
#include <vector>
#include <giomm/dbusconnection.h>
@@ -44,33 +43,33 @@ public:
const Glib::RefPtr<Gio::DBus::InterfaceInfo> &);
virtual ~RemoteControl();
- virtual bool AddTagToNote(const std::string& uri, const std::string& tag_name) override;
- virtual std::string CreateNamedNote(const std::string& linked_title) override;
- virtual std::string CreateNote() override;
- virtual bool DeleteNote(const std::string& uri) override;
- virtual bool DisplayNote(const std::string& uri) override;
- virtual bool DisplayNoteWithSearch(const std::string& uri, const std::string& search) override;
+ virtual bool AddTagToNote(const Glib::ustring& uri, const Glib::ustring& tag_name) override;
+ virtual Glib::ustring CreateNamedNote(const Glib::ustring& linked_title) override;
+ virtual Glib::ustring CreateNote() override;
+ virtual bool DeleteNote(const Glib::ustring& uri) override;
+ virtual bool DisplayNote(const Glib::ustring& uri) override;
+ virtual bool DisplayNoteWithSearch(const Glib::ustring& uri, const Glib::ustring& search) override;
virtual void DisplaySearch() override;
- virtual void DisplaySearchWithText(const std::string& search_text) override;
- virtual std::string FindNote(const std::string& linked_title) override;
- virtual std::string FindStartHereNote() override;
- virtual std::vector< std::string > GetAllNotesWithTag(const std::string& tag_name) override;
- virtual int32_t GetNoteChangeDate(const std::string& uri) override;
- virtual std::string GetNoteCompleteXml(const std::string& uri) override;
- virtual std::string GetNoteContents(const std::string& uri) override;
- virtual std::string GetNoteContentsXml(const std::string& uri) override;
- virtual int32_t GetNoteCreateDate(const std::string& uri) override;
- virtual std::string GetNoteTitle(const std::string& uri) override;
- virtual std::vector< std::string > GetTagsForNote(const std::string& uri) override;
- virtual bool HideNote(const std::string& uri) override;
- virtual std::vector< std::string > ListAllNotes() override;
- virtual bool NoteExists(const std::string& uri) override;
- virtual bool RemoveTagFromNote(const std::string& uri, const std::string& tag_name) override;
- virtual std::vector< std::string > SearchNotes(const std::string& query, const bool& case_sensitive)
override;
- virtual bool SetNoteCompleteXml(const std::string& uri, const std::string& xml_contents) override;
- virtual bool SetNoteContents(const std::string& uri, const std::string& text_contents) override;
- virtual bool SetNoteContentsXml(const std::string& uri, const std::string& xml_contents) override;
- virtual std::string Version() override;
+ virtual void DisplaySearchWithText(const Glib::ustring& search_text) override;
+ virtual Glib::ustring FindNote(const Glib::ustring& linked_title) override;
+ virtual Glib::ustring FindStartHereNote() override;
+ virtual std::vector<Glib::ustring> GetAllNotesWithTag(const Glib::ustring& tag_name) override;
+ virtual int32_t GetNoteChangeDate(const Glib::ustring& uri) override;
+ virtual Glib::ustring GetNoteCompleteXml(const Glib::ustring& uri) override;
+ virtual Glib::ustring GetNoteContents(const Glib::ustring& uri) override;
+ virtual Glib::ustring GetNoteContentsXml(const Glib::ustring& uri) override;
+ virtual int32_t GetNoteCreateDate(const Glib::ustring& uri) override;
+ virtual Glib::ustring GetNoteTitle(const Glib::ustring& uri) override;
+ virtual std::vector<Glib::ustring> GetTagsForNote(const Glib::ustring& uri) override;
+ virtual bool HideNote(const Glib::ustring& uri) override;
+ virtual std::vector<Glib::ustring> ListAllNotes() override;
+ virtual bool NoteExists(const Glib::ustring& uri) override;
+ virtual bool RemoveTagFromNote(const Glib::ustring& uri, const Glib::ustring& tag_name) override;
+ virtual std::vector<Glib::ustring> SearchNotes(const Glib::ustring& query, const bool& case_sensitive)
override;
+ virtual bool SetNoteCompleteXml(const Glib::ustring& uri, const Glib::ustring& xml_contents) override;
+ virtual bool SetNoteContents(const Glib::ustring& uri, const Glib::ustring& text_contents) override;
+ virtual bool SetNoteContentsXml(const Glib::ustring& uri, const Glib::ustring& xml_contents) override;
+ virtual Glib::ustring Version() override;
private:
void on_note_added(const NoteBase::Ptr &);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]