[gnote] Use NoteManagerBase instead of Note in SyncClient
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Use NoteManagerBase instead of Note in SyncClient
- Date: Tue, 5 Aug 2014 20:29:05 +0000 (UTC)
commit 65eecdec38640f78bcf9fde3bd4b9250ddc06bab
Author: Aurimas Černius <aurisc4 gmail com>
Date: Tue Aug 5 23:15:51 2014 +0300
Use NoteManagerBase instead of Note in SyncClient
src/synchronization/gnotesyncclient.cpp | 5 ++---
src/synchronization/gnotesyncclient.hpp | 4 ++--
src/synchronization/isyncmanager.hpp | 6 +++---
3 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/synchronization/gnotesyncclient.cpp b/src/synchronization/gnotesyncclient.cpp
index eb1495e..66b82cb 100644
--- a/src/synchronization/gnotesyncclient.cpp
+++ b/src/synchronization/gnotesyncclient.cpp
@@ -53,7 +53,6 @@ namespace sync {
void GnoteSyncClient::init(NoteManagerBase & manager)
{
m_local_manifest_file_path = Glib::build_filename(IGnote::conf_dir(), LOCAL_MANIFEST_FILE_NAME);
- // TODO: Why doesn't OnChanged ever get fired?!
Glib::RefPtr<Gio::File> manifest = Gio::File::create_for_path(m_local_manifest_file_path);
if(manifest != 0) {
m_file_watcher = manifest->monitor_file();
@@ -260,7 +259,7 @@ namespace sync {
}
- int GnoteSyncClient::get_revision(const Note::Ptr & note)
+ 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);
@@ -273,7 +272,7 @@ namespace sync {
}
- void GnoteSyncClient::set_revision(const Note::Ptr & note, int revision)
+ 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?
diff --git a/src/synchronization/gnotesyncclient.hpp b/src/synchronization/gnotesyncclient.hpp
index 59ffda1..1621278 100644
--- a/src/synchronization/gnotesyncclient.hpp
+++ b/src/synchronization/gnotesyncclient.hpp
@@ -44,8 +44,8 @@ namespace sync {
return m_last_sync_rev;
}
virtual void last_synchronized_revision(int) override;
- virtual int get_revision(const Note::Ptr & note) override;
- virtual void set_revision(const Note::Ptr & note, int revision) override;
+ virtual int get_revision(const NoteBase::Ptr & note) override;
+ virtual void set_revision(const NoteBase::Ptr & note, int revision) override;
virtual std::map<std::string, std::string> deleted_note_titles() override
{
return m_deleted_notes;
diff --git a/src/synchronization/isyncmanager.hpp b/src/synchronization/isyncmanager.hpp
index 2691e24..72f290d 100644
--- a/src/synchronization/isyncmanager.hpp
+++ b/src/synchronization/isyncmanager.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2013 Aurimas Cernius
+ * Copyright (C) 2012-2014 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
@@ -56,8 +56,8 @@ public:
virtual void last_synchronized_revision(int) = 0;
virtual sharp::DateTime last_sync_date() = 0;
virtual void last_sync_date(const sharp::DateTime &) = 0;
- virtual int get_revision(const Note::Ptr & note) = 0;
- virtual void set_revision(const Note::Ptr & note, int revision) = 0;
+ virtual int get_revision(const NoteBase::Ptr & note) = 0;
+ virtual void set_revision(const NoteBase::Ptr & note, int revision) = 0;
virtual std::map<std::string, std::string> deleted_note_titles() = 0;
virtual void reset() = 0;
virtual std::string associated_server_id() = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]