Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jangernert/FeedReader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Long <self@brendanlong.com>2019-02-10 02:29:25 +0300
committerBrendan Long <self@brendanlong.com>2019-02-10 20:21:41 +0300
commit42a73398f67fe3a1fc469aaa24d9fdd3473862b9 (patch)
tree6cecd3197278298945eaf4fcd447438ca21cf17f
parent193ea1291c6135f5357e6a9a340f323b49defbad (diff)
Make FeedServerInterface an abstract class
This will let us deduplicate code in cases where a function can be implemented in terms of another.
-rw-r--r--plugins/backend/bazqux/bazquxInterface.vala114
-rw-r--r--plugins/backend/decsync/decsyncInterface.vala120
-rw-r--r--plugins/backend/feedbin/feedbinInterface.vala114
-rw-r--r--plugins/backend/feedhq/feedhqInterface.vala114
-rw-r--r--plugins/backend/feedly/feedlyInterface.vala114
-rw-r--r--plugins/backend/fresh/freshInterface.vala114
-rw-r--r--plugins/backend/inoreader/InoReaderInterface.vala114
-rw-r--r--plugins/backend/local/localInterface.vala114
-rw-r--r--plugins/backend/oldreader/oldreaderInterface.vala114
-rw-r--r--plugins/backend/owncloud/OwncloudNewsInterface.vala114
-rw-r--r--plugins/backend/ttrss/ttrssInterface.vala114
-rw-r--r--src/Backend/FeedServerInterface.vala2
12 files changed, 631 insertions, 631 deletions
diff --git a/plugins/backend/bazqux/bazquxInterface.vala b/plugins/backend/bazqux/bazquxInterface.vala
index 479c12c5..a1c0603b 100644
--- a/plugins/backend/bazqux/bazquxInterface.vala
+++ b/plugins/backend/bazqux/bazquxInterface.vala
@@ -13,50 +13,50 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.bazquxInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.bazquxInterface : FeedServerInterface {
private bazquxAPI m_api;
private bazquxUtils m_utils;
private Gtk.Entry m_userEntry;
private Gtk.Entry m_passwordEntry;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new bazquxUtils(settings_backend, secrets);
m_api = new bazquxAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://bazqux.com/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.HOSTED | BackendFlags.PROPRIETARY | BackendFlags.PAID);
}
-public string getID()
+public override string getID()
{
return "bazqux";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-bazqux";
}
-public string serviceName()
+public override string serviceName()
{
return "BazQux";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var user_label = new Gtk.Label(_("Username:"));
var password_label = new Gtk.Label(_("Password:"));
@@ -114,117 +114,117 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
}
-public void writeData()
+public override void writeData()
{
m_utils.setUser(m_userEntry.get_text());
m_utils.setPassword(m_passwordEntry.get_text());
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public bool supportTags()
+public override bool supportTags()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-bazqux-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return "https://bazqux.com/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "";
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool hideCategoryWhenEmpty(string cadID)
+public override bool hideCategoryWhenEmpty(string cadID)
{
return false;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return true;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
if(read == ArticleStatus.READ)
m_api.edidTag(articleIDs, "user/-/state/com.google/read");
@@ -232,7 +232,7 @@ public void setArticleIsRead(string articleIDs, ArticleStatus read)
m_api.edidTag(articleIDs, "user/-/state/com.google/read", false);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
if(marked == ArticleStatus.MARKED)
m_api.edidTag(articleID, "user/-/state/com.google/starred");
@@ -240,22 +240,22 @@ public void setArticleIsMarked(string articleID, ArticleStatus marked)
m_api.edidTag(articleID, "user/-/state/com.google/starred", false);
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.markAsRead(feedID);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.markAsRead(catID);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
var db = DataBase.readOnly();
var categories = db.read_categories();
@@ -272,37 +272,37 @@ public void markAllItemsRead()
m_api.markAsRead();
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
m_api.edidTag(articleID, tagID, true);
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
m_api.edidTag(articleID, tagID, false);
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return m_api.composeTagID(caption);
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
m_api.deleteTag(tagID);
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
m_api.renameTag(tagID, title);
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return m_api.ping();
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
feedID = "feed/" + feedURL;
bool success = false;
@@ -324,58 +324,58 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
//FIXME
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.editSubscription(bazquxAPI.bazquxSubscriptionAction.UNSUBSCRIBE, feedID);
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.editSubscription(bazquxAPI.bazquxSubscriptionAction.EDIT, feedID, title);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.editSubscription(bazquxAPI.bazquxSubscriptionAction.EDIT, feedID, null, newCatID, currentCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.composeTagID(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameTag(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.deleteTag(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getFeeds(feeds))
{
@@ -388,12 +388,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getTotalUnread();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
if(whatToGet == ArticleStatus.READ)
{
diff --git a/plugins/backend/decsync/decsyncInterface.vala b/plugins/backend/decsync/decsyncInterface.vala
index 23303f1e..2447f6cb 100644
--- a/plugins/backend/decsync/decsyncInterface.vala
+++ b/plugins/backend/decsync/decsyncInterface.vala
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.decsyncInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.decsyncInterface : FeedServerInterface {
internal DecsyncUtils m_utils;
private Soup.Session m_session;
@@ -23,7 +23,7 @@ private Gtk.Button loginButton;
private Gtk.Spinner waitingSpinner;
private Gtk.Stack loginStack;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new DecsyncUtils(settings_backend);
m_session = new Soup.Session();
@@ -59,37 +59,37 @@ private bool initDecsync()
return true;
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://github.com/39aldo39/DecSync";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.LOCAL | BackendFlags.FREE_SOFTWARE | BackendFlags.FREE);
}
-public string getID()
+public override string getID()
{
return "decsync";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-decsync";
}
-public string serviceName()
+public override string serviceName()
{
return "DecSync";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var doneLabel = new Gtk.Label(_("Done"));
var waitingLabel = new Gtk.Label(_("Adding Feeds"));
@@ -164,17 +164,17 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
return;
}
-public void writeData()
+public override void writeData()
{
m_utils.setDecsyncDir(m_loginDir);
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
loginButton.set_sensitive(false);
waitingSpinner.start();
@@ -190,92 +190,92 @@ public async void postLoginAction()
yield;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public bool supportTags()
+public override bool supportTags()
{
return false;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return false;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-decsync-symbolic";
}
-public string accountName()
+public override string accountName()
{
return "DecSync";
}
-public string getServerURL()
+public override string getServerURL()
{
return "http://localhost/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "0";
}
-public bool hideCategoryWhenEmpty(string catID)
+public override bool hideCategoryWhenEmpty(string catID)
{
return false;
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return true;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return false;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return false;
}
-public void resetAccount()
+public override void resetAccount()
{
return;
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
if (initDecsync())
{
@@ -287,17 +287,17 @@ public LoginResponse login()
}
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return Utils.ping("https://duckduckgo.com/");
}
-public void setArticleIsRead(string articleIDs, ArticleStatus readStatus)
+public override void setArticleIsRead(string articleIDs, ArticleStatus readStatus)
{
var read = readStatus == ArticleStatus.READ;
Logger.debug("Mark " + articleIDs + " as " + (read ? "read" : "unread"));
@@ -316,7 +316,7 @@ public void setArticleIsRead(string articleIDs, ArticleStatus readStatus)
m_sync.setEntries(entries);
}
-public void setArticleIsMarked(string articleID, ArticleStatus markedStatus)
+public override void setArticleIsMarked(string articleID, ArticleStatus markedStatus)
{
var marked = markedStatus == ArticleStatus.MARKED;
Logger.debug("Mark " + articleID + " as " + (marked ? "marked" : "unmarked"));
@@ -329,52 +329,52 @@ public void setArticleIsMarked(string articleID, ArticleStatus markedStatus)
}
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return true;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
return;
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
return;
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
return;
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
return;
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
return;
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return "";
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
return;
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
return;
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
return addFeedWithDecsync(feedURL, catID, newCatName, out feedID, out errmsg);
}
@@ -429,7 +429,7 @@ public bool addFeedWithDecsync(string feedURL, string? catID, string? newCatName
return false;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
string feedID, errmsg;
foreach(Feed feed in feeds)
@@ -439,23 +439,23 @@ public void addFeeds(Gee.List<Feed> feeds)
}
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_sync.setEntry({"feeds", "subscriptions"}, stringToNode(feedID), boolToNode(false));
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_sync.setEntry({"feeds", "names"}, stringToNode(feedID), stringToNode(title));
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
string? value = newCatID == uncategorizedID() ? null : newCatID;
m_sync.setEntry({"feeds", "categories"}, stringToNode(feedID), stringToNode(value));
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
var db = DataBase.readOnly();
string? catID = db.getCategoryID(title);
@@ -469,18 +469,18 @@ public string createCategory(string title, string? parentID)
return catID;
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_sync.setEntry({"categories", "names"}, stringToNode(catID), stringToNode(title));
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
string? value = newParentID == CategoryID.MASTER.to_string() ? null : newParentID;
m_sync.setEntry({"categories", "parents"}, stringToNode(catID), stringToNode(value));
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
Logger.info("Delete category " + catID);
var feedIDs = DataBase.readOnly().getFeedIDofCategorie(catID);
@@ -490,28 +490,28 @@ public void deleteCategory(string catID)
}
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
moveFeed(feedID, uncategorizedID(), catID);
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
return true;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return 0;
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
var feeds = DataBase.readOnly().read_feeds();
var articles = new Gee.ArrayList<Article>();
@@ -696,12 +696,12 @@ public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, str
m_sync.executeAllNewEntries(new Unit());
}
-public string[] articleToPath(Article article, string type)
+private string[] articleToPath(Article article, string type)
{
return basePathToPath(articleToBasePath(article), type);
}
-public string[] basePathToPath(Gee.List<string> basePath, string type)
+private string[] basePathToPath(Gee.List<string> basePath, string type)
{
var path = new Gee.ArrayList<string>();
path.add("articles");
@@ -710,7 +710,7 @@ public string[] basePathToPath(Gee.List<string> basePath, string type)
return path.to_array();
}
-public Gee.List<string> articleToBasePath(Article article)
+private Gee.List<string> articleToBasePath(Article article)
{
var datetime = article.getDate().to_utc();
var year = datetime.format("%Y");
diff --git a/plugins/backend/feedbin/feedbinInterface.vala b/plugins/backend/feedbin/feedbinInterface.vala
index cc6fc685..149e794d 100644
--- a/plugins/backend/feedbin/feedbinInterface.vala
+++ b/plugins/backend/feedbin/feedbinInterface.vala
@@ -13,50 +13,50 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.FeedbinInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.FeedbinInterface : FeedServerInterface {
private FeedbinAPI m_api;
private FeedbinUtils m_utils;
private Gtk.Entry m_userEntry;
private Gtk.Entry m_passwordEntry;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new FeedbinUtils(settings_backend, secrets);
m_api = new FeedbinAPI(m_utils.getUser(), m_utils.getPassword(), Constants.USER_AGENT);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://feedbin.com/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.HOSTED | BackendFlags.FREE_SOFTWARE | BackendFlags.PAID);
}
-public string getID()
+public override string getID()
{
return "feedbin";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-feedbin";
}
-public string serviceName()
+public override string serviceName()
{
return "Feedbin";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
ensures (result != null)
{
var user_label = new Gtk.Label(_("Username:"));
@@ -121,11 +121,11 @@ ensures (result != null)
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
}
-public void writeData()
+public override void writeData()
{
m_api.username = m_userEntry.get_text().strip();
m_utils.setUser(m_api.username);
@@ -134,96 +134,96 @@ public void writeData()
m_utils.setPassword(m_api.password);
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool supportTags()
+public override bool supportTags()
{
return false;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-feedbin-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return "https://feedbin.com/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "0";
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool hideCategoryWhenEmpty(string catID)
+public override bool hideCategoryWhenEmpty(string catID)
{
return false;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return true;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
try
{
@@ -243,17 +243,17 @@ public LoginResponse login()
}
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return login() != LoginResponse.NO_CONNECTION;
}
-public void setArticleIsRead(string article_id, ArticleStatus status)
+public override void setArticleIsRead(string article_id, ArticleStatus status)
{
var entry_id = int64.parse(article_id);
var entry_ids = ListUtils.single<int64?>(entry_id);
@@ -267,7 +267,7 @@ public void setArticleIsRead(string article_id, ArticleStatus status)
}
}
-public void setArticleIsMarked(string article_id, ArticleStatus status)
+public override void setArticleIsMarked(string article_id, ArticleStatus status)
{
var entry_id = int64.parse(article_id);
var entry_ids = ListUtils.single<int64?>(entry_id);
@@ -306,52 +306,52 @@ private void setRead(string id, FeedListType type)
}
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feed_id)
+public override void setFeedRead(string feed_id)
{
setRead(feed_id, FeedListType.FEED);
}
-public void setCategoryRead(string category_id)
+public override void setCategoryRead(string category_id)
{
setRead(category_id, FeedListType.CATEGORY);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
setRead(FeedID.ALL.to_string(), FeedListType.FEED);
}
-public void tagArticle(string article_id, string tag_id)
+public override void tagArticle(string article_id, string tag_id)
{
return;
}
-public void removeArticleTag(string article_id, string tag_id)
+public override void removeArticleTag(string article_id, string tag_id)
{
return;
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return "";
}
-public void deleteTag(string tag_id)
+public override void deleteTag(string tag_id)
{
return;
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
return;
}
-public bool addFeed(string feed_url, string? cat_id, string? category_name, out string feed_id, out string errmsg)
+public override bool addFeed(string feed_url, string? cat_id, string? category_name, out string feed_id, out string errmsg)
{
feed_id = "";
try
@@ -378,7 +378,7 @@ public bool addFeed(string feed_url, string? cat_id, string? category_name, out
}
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
return;
}
@@ -395,7 +395,7 @@ private FeedbinAPI.Subscription subscription_for_feed(string feed_id_str) throws
throw new FeedbinError.NOT_FOUND("No subscription found for feed $feed_id");
}
-public void removeFeed(string feed_id_str)
+public override void removeFeed(string feed_id_str)
{
try
{
@@ -408,7 +408,7 @@ public void removeFeed(string feed_id_str)
}
}
-public void renameFeed(string feed_id_str, string title)
+public override void renameFeed(string feed_id_str, string title)
{
try
{
@@ -421,7 +421,7 @@ public void renameFeed(string feed_id_str, string title)
}
}
-public void moveFeed(string feed_id_str, string new_category, string? old_category)
+public override void moveFeed(string feed_id_str, string new_category, string? old_category)
{
Logger.debug(@"moveFeed: $feed_id_str from $old_category to $new_category");
try
@@ -449,7 +449,7 @@ public void moveFeed(string feed_id_str, string new_category, string? old_catego
}
}
-public void renameCategory(string old_category, string new_category)
+public override void renameCategory(string old_category, string new_category)
{
Logger.debug(@"renameCategory: From $old_category to $new_category");
try
@@ -471,12 +471,12 @@ public void renameCategory(string old_category, string new_category)
}
}
-public void moveCategory(string category_id, string new_parent_id)
+public override void moveCategory(string category_id, string new_parent_id)
{
// Feedbin doesn't have multi-level categories
}
-public string createCategory(string title, string? parent_id)
+public override string createCategory(string title, string? parent_id)
ensures (result == title)
{
// Categories are created and destroyed based on feeds having them.
@@ -484,7 +484,7 @@ ensures (result == title)
return title;
}
-public void deleteCategory(string category)
+public override void deleteCategory(string category)
{
Logger.debug(@"deleteCategory: $category");
try
@@ -505,7 +505,7 @@ public void deleteCategory(string category)
}
}
-public void removeCatFromFeed(string feed_id_str, string category)
+public override void removeCatFromFeed(string feed_id_str, string category)
{
Logger.debug(@"removeCatFromFeed: Feed $feed_id_str, category $category");
try
@@ -528,11 +528,11 @@ public void removeCatFromFeed(string feed_id_str, string category)
}
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
try
{
@@ -625,7 +625,7 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return true;
}
-public int getUnreadCount()
+public override int getUnreadCount()
ensures (result >= 0)
{
try
@@ -639,7 +639,7 @@ ensures (result >= 0)
}
}
-public void getArticles(int count, ArticleStatus what_to_get, DateTime? since, string? feed_id_str, bool is_tag_id, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus what_to_get, DateTime? since, string? feed_id_str, bool is_tag_id, GLib.Cancellable? cancellable = null)
requires (count >= 0)
{
try
diff --git a/plugins/backend/feedhq/feedhqInterface.vala b/plugins/backend/feedhq/feedhqInterface.vala
index cf8363a3..4222f701 100644
--- a/plugins/backend/feedhq/feedhqInterface.vala
+++ b/plugins/backend/feedhq/feedhqInterface.vala
@@ -13,50 +13,50 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.FeedHQInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.FeedHQInterface : FeedServerInterface {
private FeedHQAPI m_api;
private FeedHQUtils m_utils;
private Gtk.Entry m_userEntry;
private Gtk.Entry m_passwordEntry;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new FeedHQUtils(settings_backend, secrets);
m_api = new FeedHQAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://feedhq.org/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.HOSTED | BackendFlags.PROPRIETARY | BackendFlags.PAID);
}
-public string getID()
+public override string getID()
{
return "feedhq";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-feedhq";
}
-public string serviceName()
+public override string serviceName()
{
return "FeedHQ";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var user_label = new Gtk.Label(_("Username:"));
var password_label = new Gtk.Label(_("Password:"));
@@ -114,119 +114,119 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
}
-public void writeData()
+public override void writeData()
{
m_utils.setUser(m_userEntry.get_text());
m_utils.setPassword(m_passwordEntry.get_text());
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool supportTags()
+public override bool supportTags()
{
return false;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-feedhq-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return "FeedHQ.org";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "";
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool hideCategoryWhenEmpty(string cadID)
+public override bool hideCategoryWhenEmpty(string cadID)
{
return false;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return true;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
if(read == ArticleStatus.READ)
m_api.edidTag(articleIDs, "user/-/state/com.google/read");
@@ -234,7 +234,7 @@ public void setArticleIsRead(string articleIDs, ArticleStatus read)
m_api.edidTag(articleIDs, "user/-/state/com.google/read", false);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
if(marked == ArticleStatus.MARKED)
m_api.edidTag(articleID, "user/-/state/com.google/starred");
@@ -242,22 +242,22 @@ public void setArticleIsMarked(string articleID, ArticleStatus marked)
m_api.edidTag(articleID, "user/-/state/com.google/starred", false);
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.markAsRead(feedID);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.markAsRead(catID);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
var db = DataBase.readOnly();
var categories = db.read_categories();
@@ -273,37 +273,37 @@ public void markAllItemsRead()
}
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
return;
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
return;
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return ":(";
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
return;
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
return;
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return m_api.ping();
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
feedID = "feed/" + feedURL;
bool success = false;
@@ -327,57 +327,57 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
return;
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.editSubscription(FeedHQAPI.FeedHQSubscriptionAction.UNSUBSCRIBE, {feedID});
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.editSubscription(FeedHQAPI.FeedHQSubscriptionAction.EDIT, {feedID}, title);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.editSubscription(FeedHQAPI.FeedHQSubscriptionAction.EDIT, {feedID}, null, newCatID, currentCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.composeTagID(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameTag(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.deleteTag(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
m_api.import(opml);
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getFeeds(feeds))
{
@@ -391,12 +391,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getTotalUnread();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
if(whatToGet == ArticleStatus.READ)
{
diff --git a/plugins/backend/feedly/feedlyInterface.vala b/plugins/backend/feedly/feedlyInterface.vala
index ec96fd7a..c7371057 100644
--- a/plugins/backend/feedly/feedlyInterface.vala
+++ b/plugins/backend/feedly/feedlyInterface.vala
@@ -13,68 +13,68 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.feedlyInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.feedlyInterface : FeedServerInterface {
private FeedlyAPI m_api;
private FeedlyUtils m_utils;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new FeedlyUtils(settings_backend);
m_api = new FeedlyAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "http://feedly.com/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.HOSTED | BackendFlags.PROPRIETARY | BackendFlags.PAID_PREMIUM);
}
-public string getID()
+public override string getID()
{
return "feedly";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-feedly";
}
-public string serviceName()
+public override string serviceName()
{
return "feedly";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return true;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
return null;
}
-public void showHtAccess()
+public override void showHtAccess()
{
return;
}
-public void writeData()
+public override void writeData()
{
return;
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
if(redirectURL.has_prefix(FeedlySecret.apiRedirectUri))
{
@@ -90,103 +90,103 @@ public bool extractCode(string redirectURL)
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return FeedlySecret.base_uri + "/v3/auth/auth" + "?client_secret=" + FeedlySecret.apiClientSecret + "&client_id=" + FeedlySecret.apiClientId
+ "&redirect_uri=" + FeedlySecret.apiRedirectUri + "&scope=" + FeedlySecret.apiAuthScope + "&response_type=code&state=getting_code";
}
-public bool supportTags()
+public override bool supportTags()
{
return true;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-feedly-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getEmail();
}
-public string getServerURL()
+public override string getServerURL()
{
return "http://feedly.com/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "";
}
-public bool hideCategoryWhenEmpty(string catID)
+public override bool hideCategoryWhenEmpty(string catID)
{
return catID.has_suffix("global.must");
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return true;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return false;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
m_api.mark_as_read(articleIDs, "entries", read);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
if(marked == ArticleStatus.MARKED)
{
@@ -198,22 +198,22 @@ public void setArticleIsMarked(string articleID, ArticleStatus marked)
}
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.mark_as_read(feedID, "feeds", ArticleStatus.READ);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.mark_as_read(catID, "categories", ArticleStatus.READ);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
string catArray = "";
string feedArray = "";
@@ -236,37 +236,37 @@ public void markAllItemsRead()
m_api.mark_as_read(feedArray.substring(0, feedArray.length-1), "feeds", ArticleStatus.READ);
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
m_api.addArticleTag(articleID, tagID);
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
m_api.deleteArticleTag(articleID, tagID);
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return m_api.createTag(caption);
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
m_api.deleteTag(tagID);
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
m_api.renameTag(tagID, title);
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return Utils.ping("http://feedly.com/");
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
feedID = "feed/" + feedURL;
bool success = false;
@@ -288,7 +288,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
foreach(Feed f in feeds)
{
@@ -296,54 +296,54 @@ public void addFeeds(Gee.List<Feed> feeds)
}
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.removeSubscription(feedID);
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
var feed = DataBase.readOnly().read_feed(feedID);
m_api.addSubscription(feed.getFeedID(), title, feed.getCatString());
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID )
+public override void moveFeed(string feedID, string newCatID, string? currentCatID )
{
m_api.moveSubscription(feedID, newCatID, currentCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.createCatID(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameCategory(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.removeCategory(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
var feed = DataBase.readOnly().read_feed(feedID);
m_api.addSubscription(feed.getFeedID(), feed.getTitle(), feed.getCatString().replace(catID + ",", ""));
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
m_api.importOPML(opml);
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
m_api.getUnreadCounts();
@@ -365,12 +365,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getTotalUnread();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
string continuation = null;
string feedly_tagID = "";
diff --git a/plugins/backend/fresh/freshInterface.vala b/plugins/backend/fresh/freshInterface.vala
index 573f0875..2d039bd4 100644
--- a/plugins/backend/fresh/freshInterface.vala
+++ b/plugins/backend/fresh/freshInterface.vala
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.freshInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.freshInterface : FeedServerInterface {
private freshAPI m_api;
private freshUtils m_utils;
@@ -25,43 +25,43 @@ private Gtk.Entry m_authUserEntry;
private Gtk.Revealer m_revealer;
private bool m_need_htaccess = false;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new freshUtils(settings_backend, secrets);
m_api = new freshAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://freshrss.org/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.SELF_HOSTED | BackendFlags.FREE_SOFTWARE | BackendFlags.FREE);
}
-public string getID()
+public override string getID()
{
return "fresh";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-fresh";
}
-public string serviceName()
+public override string serviceName()
{
return "freshRSS";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var url_label = new Gtk.Label(_("freshRSS URL:"));
var user_label = new Gtk.Label(_("Username:"));
@@ -166,12 +166,12 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
m_revealer.set_reveal_child(true);
}
-public void writeData()
+public override void writeData()
{
m_utils.setURL(m_urlEntry.get_text());
m_utils.setUser(m_userEntry.get_text().strip());
@@ -183,112 +183,112 @@ public void writeData()
}
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool supportTags()
+public override bool supportTags()
{
return false;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-fresh-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return m_utils.getUnmodifiedURL();
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "1";
}
-public bool hideCategoryWhenEmpty(string catID)
+public override bool hideCategoryWhenEmpty(string catID)
{
return false;
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return true;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return Utils.ping(m_utils.getUnmodifiedURL());
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
if(read == ArticleStatus.READ)
m_api.editTags(articleIDs, "user/-/state/com.google/read", null);
@@ -296,7 +296,7 @@ public void setArticleIsRead(string articleIDs, ArticleStatus read)
m_api.editTags(articleIDs, null, "user/-/state/com.google/read");
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
if(marked == ArticleStatus.MARKED)
m_api.editTags(articleID, "user/-/state/com.google/starred", null);
@@ -304,52 +304,52 @@ public void setArticleIsMarked(string articleID, ArticleStatus marked)
m_api.editTags(articleID, null, "user/-/state/com.google/starred");
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.markAllAsRead(feedID);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.markAllAsRead(catID);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
m_api.markAllAsRead("user/-/state/com.google/reading-list");
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
return;
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
return;
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return "";
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
string? cat = null;
if(catID != null)
@@ -372,7 +372,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return true;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
string cat = "";
string[] urls = {};
@@ -392,53 +392,53 @@ public void addFeeds(Gee.List<Feed> feeds)
m_api.editStream("subscribe", urls, null, cat, null);
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.editStream("unsubscribe", {feedID}, null, null, null);
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.editStream("edit", {feedID}, title, null, null);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.editStream("edit", {feedID}, null, newCatID, currentCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.composeTagID(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameTag(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.deleteTag(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getSubscriptionList(feeds))
{
@@ -452,12 +452,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getUnreadCounts();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
if(whatToGet == ArticleStatus.READ)
{
diff --git a/plugins/backend/inoreader/InoReaderInterface.vala b/plugins/backend/inoreader/InoReaderInterface.vala
index ca176530..1bd52374 100644
--- a/plugins/backend/inoreader/InoReaderInterface.vala
+++ b/plugins/backend/inoreader/InoReaderInterface.vala
@@ -13,53 +13,53 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.InoReaderInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.InoReaderInterface : FeedServerInterface {
private InoReaderAPI m_api;
private InoReaderUtils m_utils;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new InoReaderUtils(settings_backend);
m_api = new InoReaderAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "http://www.inoreader.com/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.HOSTED | BackendFlags.PROPRIETARY | BackendFlags.PAID_PREMIUM);
}
-public string getID()
+public override string getID()
{
return "inoreader";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-inoreader";
}
-public string serviceName()
+public override string serviceName()
{
return "InoReader";
}
-public void writeData()
+public override void writeData()
{
return;
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
if(redirectURL.has_prefix(InoReaderSecret.apiRedirectUri))
{
@@ -89,7 +89,7 @@ public bool extractCode(string redirectURL)
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "https://www.inoreader.com/oauth2/auth"
+ "?client_id=" + InoReaderSecret.apiClientId
@@ -99,107 +99,107 @@ public string buildLoginURL()
+ "&state=" + InoReaderSecret.csrf_protection;
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return true;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
return null;
}
-public void showHtAccess()
+public override void showHtAccess()
{
return;
}
-public bool supportTags()
+public override bool supportTags()
{
return true;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-inoreader-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return "http://www.inoreader.com/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "";
}
-public bool hideCategoryWhenEmpty(string cadID)
+public override bool hideCategoryWhenEmpty(string cadID)
{
return false;
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return true;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return true;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
if(read == ArticleStatus.READ)
m_api.edidTag(articleIDs, "user/-/state/com.google/read");
@@ -207,7 +207,7 @@ public void setArticleIsRead(string articleIDs, ArticleStatus read)
m_api.edidTag(articleIDs, "user/-/state/com.google/read", false);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
if(marked == ArticleStatus.MARKED)
m_api.edidTag(articleID, "user/-/state/com.google/starred");
@@ -215,22 +215,22 @@ public void setArticleIsMarked(string articleID, ArticleStatus marked)
m_api.edidTag(articleID, "user/-/state/com.google/starred", false);
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.markAsRead(feedID);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.markAsRead(catID);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
var db = DataBase.readOnly();
var categories = db.read_categories();
@@ -247,37 +247,37 @@ public void markAllItemsRead()
m_api.markAsRead();
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
m_api.edidTag(articleID, tagID, true);
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
m_api.edidTag(articleID, tagID, false);
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return m_api.composeTagID(caption);
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
m_api.deleteTag(tagID);
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
m_api.renameTag(tagID, title);
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return m_api.ping();
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
bool success = false;
feedID = "feed/" + feedURL;
@@ -299,7 +299,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
string cat = "";
string[] urls = {};
@@ -319,53 +319,53 @@ public void addFeeds(Gee.List<Feed> feeds)
m_api.editSubscription(InoReaderAPI.InoSubscriptionAction.SUBSCRIBE, urls, null, cat, null);
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.editSubscription(InoReaderAPI.InoSubscriptionAction.UNSUBSCRIBE, {feedID}, null, null, null);
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.editSubscription(InoReaderAPI.InoSubscriptionAction.EDIT, {feedID}, title, null, null);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.editSubscription(InoReaderAPI.InoSubscriptionAction.EDIT, {feedID}, null, newCatID, currentCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.composeTagID(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameTag(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.deleteTag(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getFeeds(feeds))
{
@@ -379,12 +379,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getTotalUnread();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
if(whatToGet == ArticleStatus.READ)
{
diff --git a/plugins/backend/local/localInterface.vala b/plugins/backend/local/localInterface.vala
index 7eb801ed..41dfdb64 100644
--- a/plugins/backend/local/localInterface.vala
+++ b/plugins/backend/local/localInterface.vala
@@ -13,13 +13,13 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.localInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.localInterface : FeedServerInterface {
private localUtils m_utils;
private Soup.Session m_session;
private Gtk.ListBox m_feedlist;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new localUtils();
m_session = new Soup.Session();
@@ -27,37 +27,37 @@ public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secre
m_session.timeout = 5;
}
-public string getWebsite()
+public override string getWebsite()
{
return "http://jangernert.github.io/FeedReader/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.LOCAL | BackendFlags.FREE_SOFTWARE | BackendFlags.FREE);
}
-public string getID()
+public override string getID()
{
return "local";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-local";
}
-public string serviceName()
+public override string serviceName()
{
return "Local RSS";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var doneLabel = new Gtk.Label(_("Done"));
var waitingLabel = new Gtk.Label(_("Adding Feeds"));
@@ -146,17 +146,17 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
return;
}
-public void writeData()
+public override void writeData()
{
return;
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
SourceFunc callback = postLoginAction.callback;
new GLib.Thread<void*>(null, () => {
@@ -175,12 +175,12 @@ public async void postLoginAction()
yield;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
@@ -231,137 +231,137 @@ private void headerFunc(Gtk.ListBoxRow row, Gtk.ListBoxRow? before)
}
-public bool supportTags()
+public override bool supportTags()
{
return true;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return false;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-local-symbolic";
}
-public string accountName()
+public override string accountName()
{
return "Local RSS";
}
-public string getServerURL()
+public override string getServerURL()
{
return "http://localhost/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "0";
}
-public bool hideCategoryWhenEmpty(string catID)
+public override bool hideCategoryWhenEmpty(string catID)
{
return false;
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return true;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return false;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return false;
}
-public void resetAccount()
+public override void resetAccount()
{
return;
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return LoginResponse.SUCCESS;
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return Utils.ping("https://duckduckgo.com/");
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
return;
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
return;
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
return;
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
return;
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
return;
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
return;
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
return;
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
string tagID = "1";
@@ -373,17 +373,17 @@ public string createTag(string caption)
return tagID;
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
return;
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
return;
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
var catIDs = new Gee.ArrayList<string>();
var db = DataBase.writeAccess();
@@ -419,7 +419,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return false;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
var finishedFeeds = new Gee.ArrayList<Feed>();
@@ -451,22 +451,22 @@ public void addFeeds(Gee.List<Feed> feeds)
DataBase.writeAccess().write_feeds(finishedFeeds);
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
return;
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
return;
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
return;
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
string catID;
@@ -484,43 +484,43 @@ public string createCategory(string title, string? parentID)
return catID;
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
return;
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
return;
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
return true;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return 0;
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
var db = DataBase.writeAccess();
var feeds = db.read_feeds();
diff --git a/plugins/backend/oldreader/oldreaderInterface.vala b/plugins/backend/oldreader/oldreaderInterface.vala
index 5993f55b..9a02bb6f 100644
--- a/plugins/backend/oldreader/oldreaderInterface.vala
+++ b/plugins/backend/oldreader/oldreaderInterface.vala
@@ -13,50 +13,50 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.OldReaderInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.OldReaderInterface : FeedServerInterface {
private OldReaderAPI m_api;
private OldReaderUtils m_utils;
private Gtk.Entry m_userEntry;
private Gtk.Entry m_passwordEntry;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new OldReaderUtils(settings_backend, secrets);
m_api = new OldReaderAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://theoldreader.com/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.HOSTED | BackendFlags.PROPRIETARY | BackendFlags.PAID_PREMIUM);
}
-public string getID()
+public override string getID()
{
return "oldreader";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-oldreader";
}
-public string serviceName()
+public override string serviceName()
{
return "The Old Reader";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var user_label = new Gtk.Label(_("Username:"));
var password_label = new Gtk.Label(_("Password:"));
@@ -114,118 +114,118 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
return;
}
-public void writeData()
+public override void writeData()
{
m_utils.setUser(m_userEntry.get_text().strip());
m_utils.setPassword(m_passwordEntry.get_text().strip());
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public bool supportTags()
+public override bool supportTags()
{
return false;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-oldreader-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return "https://theoldreader.com/";
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "";
}
-public bool hideCategoryWhenEmpty(string cadID)
+public override bool hideCategoryWhenEmpty(string cadID)
{
return false;
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return true;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
if(read == ArticleStatus.READ)
m_api.edidTag(articleIDs, "user/-/state/com.google/read");
@@ -233,7 +233,7 @@ public void setArticleIsRead(string articleIDs, ArticleStatus read)
m_api.edidTag(articleIDs, "user/-/state/com.google/read", false);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
if(marked == ArticleStatus.MARKED)
m_api.edidTag(articleID, "user/-/state/com.google/starred");
@@ -241,22 +241,22 @@ public void setArticleIsMarked(string articleID, ArticleStatus marked)
m_api.edidTag(articleID, "user/-/state/com.google/starred", false);
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.markAsRead(feedID);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.markAsRead(catID);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
var db = DataBase.readOnly();
var categories = db.read_categories();
@@ -273,37 +273,37 @@ public void markAllItemsRead()
m_api.markAsRead();
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
m_api.edidTag(articleID, tagID, true);
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
m_api.edidTag(articleID, tagID, false);
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return m_api.composeTagID(caption);
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
m_api.deleteTag(tagID);
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
m_api.renameTag(tagID, title);
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return m_api.ping();
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
feedID = "feed/" + feedURL;
errmsg = "";
@@ -325,7 +325,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
string cat = "";
string[] urls = {};
@@ -346,53 +346,53 @@ public void addFeeds(Gee.List<Feed> feeds)
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.editSubscription(OldReaderAPI.OldreaderSubscriptionAction.UNSUBSCRIBE, {feedID});
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.editSubscription(OldReaderAPI.OldreaderSubscriptionAction.EDIT, {feedID}, title);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.editSubscription(OldReaderAPI.OldreaderSubscriptionAction.EDIT, {feedID}, null, newCatID, currentCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.composeTagID(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameTag(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.deleteTag(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getFeeds(feeds))
{
@@ -406,12 +406,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getTotalUnread();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
if(whatToGet == ArticleStatus.READ)
{
diff --git a/plugins/backend/owncloud/OwncloudNewsInterface.vala b/plugins/backend/owncloud/OwncloudNewsInterface.vala
index 8d89b8c9..780c7fbd 100644
--- a/plugins/backend/owncloud/OwncloudNewsInterface.vala
+++ b/plugins/backend/owncloud/OwncloudNewsInterface.vala
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.OwncloudNewsInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.OwncloudNewsInterface : FeedServerInterface {
private OwncloudNewsAPI m_api;
private OwncloudNewsUtils m_utils;
@@ -25,38 +25,38 @@ private Gtk.Entry m_AuthPasswordEntry;
private Gtk.Revealer m_revealer;
private bool m_need_htaccess = false;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new OwncloudNewsUtils(settings_backend, secrets);
m_api = new OwncloudNewsAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://github.com/nextcloud/news";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.SELF_HOSTED | BackendFlags.FREE_SOFTWARE | BackendFlags.FREE);
}
-public string getID()
+public override string getID()
{
return "owncloud";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-nextcloud";
}
-public string serviceName()
+public override string serviceName()
{
return "Nextcloud News";
}
-public void writeData()
+public override void writeData()
{
m_utils.setURL(m_urlEntry.get_text());
m_utils.setUser(m_userEntry.get_text().strip());
@@ -68,22 +68,22 @@ public void writeData()
}
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public void showHtAccess()
+public override void showHtAccess()
{
m_revealer.set_reveal_child(true);
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var urlLabel = new Gtk.Label(_("Nextcloud URL:"));
var userLabel = new Gtk.Label(_("Username:"));
@@ -188,162 +188,162 @@ public Gtk.Box? getWidget()
return box;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool supportTags()
+public override bool supportTags()
{
return false;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-nextcloud-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return m_utils.getURL();
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "0";
}
-public bool hideCategoryWhenEmpty(string cadID)
+public override bool hideCategoryWhenEmpty(string cadID)
{
return false;
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return false;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return false;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return false;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return true;
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
m_api.updateArticleUnread(articleIDs, read);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
m_api.updateArticleMarked(articleID, marked);
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.markFeedRead(feedID, false);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.markFeedRead(catID, true);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
m_api.markAllItemsRead();
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
return;
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
return;
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return ":(";
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
return;
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
return;
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return m_api.ping();
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
bool success = false;
int64 id = 0;
@@ -362,7 +362,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
int64 id = 0;
string errmsg = "";
@@ -372,53 +372,53 @@ public void addFeeds(Gee.List<Feed> feeds)
}
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.removeFeed(feedID);
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.renameFeed(feedID, title);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.moveFeed(feedID, newCatID);
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
return m_api.addFolder(title).to_string();
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameCategory(catID, title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
return;
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.removeFolder(catID);
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getFeeds(feeds))
{
@@ -432,12 +432,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return (int)DataBase.readOnly().get_unread_total();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
var type = OwncloudNewsAPI.OwnCloudType.ALL;
bool read = true;
diff --git a/plugins/backend/ttrss/ttrssInterface.vala b/plugins/backend/ttrss/ttrssInterface.vala
index 0845c6ed..81a4b574 100644
--- a/plugins/backend/ttrss/ttrssInterface.vala
+++ b/plugins/backend/ttrss/ttrssInterface.vala
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public class FeedReader.ttrssInterface : Peas.ExtensionBase, FeedServerInterface {
+public class FeedReader.ttrssInterface : FeedServerInterface {
private ttrssAPI m_api;
private ttrssUtils m_utils;
@@ -24,43 +24,43 @@ private Gtk.Entry m_authPasswordEntry;
private Gtk.Entry m_authUserEntry;
private Gtk.Revealer m_revealer;
-public void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
+public override void init(GLib.SettingsBackend? settings_backend, Secret.Collection secrets)
{
m_utils = new ttrssUtils(settings_backend, secrets);
m_api = new ttrssAPI(m_utils);
}
-public string getWebsite()
+public override string getWebsite()
{
return "https://tt-rss.org/";
}
-public BackendFlags getFlags()
+public override BackendFlags getFlags()
{
return (BackendFlags.SELF_HOSTED | BackendFlags.FREE_SOFTWARE | BackendFlags.FREE);
}
-public string getID()
+public override string getID()
{
return "ttrss";
}
-public string iconName()
+public override string iconName()
{
return "feed-service-ttrss";
}
-public string serviceName()
+public override string serviceName()
{
return "Tiny Tiny RSS";
}
-public bool needWebLogin()
+public override bool needWebLogin()
{
return false;
}
-public Gtk.Box? getWidget()
+public override Gtk.Box? getWidget()
{
var url_label = new Gtk.Label(_("Tiny Tiny RSS URL:"));
var user_label = new Gtk.Label(_("Username:"));
@@ -165,12 +165,12 @@ public Gtk.Box? getWidget()
return box;
}
-public void showHtAccess()
+public override void showHtAccess()
{
m_revealer.set_reveal_child(true);
}
-public void writeData()
+public override void writeData()
{
string url = m_urlEntry.get_text();
if (GLib.Uri.parse_scheme(url) == null)
@@ -183,112 +183,112 @@ public void writeData()
m_utils.setPassword(m_passwordEntry.get_text().strip());
}
-public async void postLoginAction()
+public override async void postLoginAction()
{
return;
}
-public bool extractCode(string redirectURL)
+public override bool extractCode(string redirectURL)
{
return false;
}
-public string buildLoginURL()
+public override string buildLoginURL()
{
return "";
}
-public bool supportTags()
+public override bool supportTags()
{
return true;
}
-public bool doInitSync()
+public override bool doInitSync()
{
return true;
}
-public string symbolicIcon()
+public override string symbolicIcon()
{
return "feed-service-ttrss-symbolic";
}
-public string accountName()
+public override string accountName()
{
return m_utils.getUser();
}
-public string getServerURL()
+public override string getServerURL()
{
return m_utils.getURL();
}
-public string uncategorizedID()
+public override string uncategorizedID()
{
return "0";
}
-public bool hideCategoryWhenEmpty(string catID)
+public override bool hideCategoryWhenEmpty(string catID)
{
return catID == "0";
}
-public bool supportCategories()
+public override bool supportCategories()
{
return true;
}
-public bool supportFeedManipulation()
+public override bool supportFeedManipulation()
{
return true;
}
-public bool supportMultiLevelCategories()
+public override bool supportMultiLevelCategories()
{
return true;
}
-public bool supportMultiCategoriesPerFeed()
+public override bool supportMultiCategoriesPerFeed()
{
return false;
}
-public bool syncFeedsAndCategories()
+public override bool syncFeedsAndCategories()
{
return true;
}
-public bool tagIDaffectedByNameChange()
+public override bool tagIDaffectedByNameChange()
{
return false;
}
-public void resetAccount()
+public override void resetAccount()
{
m_utils.resetAccount();
}
-public bool useMaxArticles()
+public override bool useMaxArticles()
{
return true;
}
-public LoginResponse login()
+public override LoginResponse login()
{
return m_api.login();
}
-public bool logout()
+public override bool logout()
{
return m_api.logout();
}
-public bool serverAvailable()
+public override bool serverAvailable()
{
return m_api.ping();
}
-public void setArticleIsRead(string articleIDs, ArticleStatus read)
+public override void setArticleIsRead(string articleIDs, ArticleStatus read)
{
var ids = new Gee.ArrayList<int>();
foreach(var id in StringUtils.split(articleIDs, ","))
@@ -298,27 +298,27 @@ public void setArticleIsRead(string articleIDs, ArticleStatus read)
m_api.updateArticleUnread(ids, read);
}
-public void setArticleIsMarked(string articleID, ArticleStatus marked)
+public override void setArticleIsMarked(string articleID, ArticleStatus marked)
{
m_api.updateArticleMarked(int.parse(articleID), marked);
}
-public bool alwaysSetReadByID()
+public override bool alwaysSetReadByID()
{
return false;
}
-public void setFeedRead(string feedID)
+public override void setFeedRead(string feedID)
{
m_api.catchupFeed(int.parse(feedID), false);
}
-public void setCategoryRead(string catID)
+public override void setCategoryRead(string catID)
{
m_api.catchupFeed(int.parse(catID), true);
}
-public void markAllItemsRead()
+public override void markAllItemsRead()
{
var categories = DataBase.readOnly().read_categories();
foreach(Category cat in categories)
@@ -327,32 +327,32 @@ public void markAllItemsRead()
}
}
-public void tagArticle(string articleID, string tagID)
+public override void tagArticle(string articleID, string tagID)
{
m_api.setArticleLabel(int.parse(articleID), int.parse(tagID), true);
}
-public void removeArticleTag(string articleID, string tagID)
+public override void removeArticleTag(string articleID, string tagID)
{
m_api.setArticleLabel(int.parse(articleID), int.parse(tagID), false);
}
-public string createTag(string caption)
+public override string createTag(string caption)
{
return m_api.addLabel(caption).to_string();
}
-public void deleteTag(string tagID)
+public override void deleteTag(string tagID)
{
m_api.removeLabel(int.parse(tagID));
}
-public void renameTag(string tagID, string title)
+public override void renameTag(string tagID, string title)
{
m_api.renameLabel(int.parse(tagID), title);
}
-public bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
+public override bool addFeed(string feedURL, string? catID, string? newCatName, out string feedID, out string errmsg)
{
bool success = false;
if(catID == null && newCatName != null)
@@ -374,7 +374,7 @@ public bool addFeed(string feedURL, string? catID, string? newCatName, out strin
return success;
}
-public void addFeeds(Gee.List<Feed> feeds)
+public override void addFeeds(Gee.List<Feed> feeds)
{
string? errmsg = null;
foreach(Feed f in feeds)
@@ -383,22 +383,22 @@ public void addFeeds(Gee.List<Feed> feeds)
}
}
-public void removeFeed(string feedID)
+public override void removeFeed(string feedID)
{
m_api.unsubscribeFeed(int.parse(feedID));
}
-public void renameFeed(string feedID, string title)
+public override void renameFeed(string feedID, string title)
{
m_api.renameFeed(int.parse(feedID), title);
}
-public void moveFeed(string feedID, string newCatID, string? currentCatID)
+public override void moveFeed(string feedID, string newCatID, string? currentCatID)
{
m_api.moveFeed(int.parse(feedID), int.parse(newCatID));
}
-public string createCategory(string title, string? parentID)
+public override string createCategory(string title, string? parentID)
{
if(parentID != null)
return m_api.createCategory(title, int.parse(parentID));
@@ -406,33 +406,33 @@ public string createCategory(string title, string? parentID)
return m_api.createCategory(title);
}
-public void renameCategory(string catID, string title)
+public override void renameCategory(string catID, string title)
{
m_api.renameCategory(int.parse(catID), title);
}
-public void moveCategory(string catID, string newParentID)
+public override void moveCategory(string catID, string newParentID)
{
m_api.moveCategory(int.parse(catID), int.parse(newParentID));
}
-public void deleteCategory(string catID)
+public override void deleteCategory(string catID)
{
m_api.removeCategory(int.parse(catID));
}
-public void removeCatFromFeed(string feedID, string catID)
+public override void removeCatFromFeed(string feedID, string catID)
{
return;
}
-public void importOPML(string opml)
+public override void importOPML(string opml)
{
var parser = new OPMLparser(opml);
parser.parse();
}
-public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
+public override bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories, Gee.List<Tag> tags, GLib.Cancellable? cancellable = null)
{
if(m_api.getCategories(categories))
{
@@ -458,12 +458,12 @@ public bool getFeedsAndCats(Gee.List<Feed> feeds, Gee.List<Category> categories,
return false;
}
-public int getUnreadCount()
+public override int getUnreadCount()
{
return m_api.getUnreadCount();
}
-public void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
+public override void getArticles(int count, ArticleStatus whatToGet, DateTime? since, string? feedID, bool isTagID, GLib.Cancellable? cancellable = null)
{
var settings_general = new GLib.Settings("org.gnome.feedreader");
diff --git a/src/Backend/FeedServerInterface.vala b/src/Backend/FeedServerInterface.vala
index 373da9c2..34334d0b 100644
--- a/src/Backend/FeedServerInterface.vala
+++ b/src/Backend/FeedServerInterface.vala
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General public License
// along with FeedReader. If not, see <http://www.gnu.org/licenses/>.
-public interface FeedReader.FeedServerInterface : GLib.Object {
+public abstract class FeedReader.FeedServerInterface : Peas.ExtensionBase {
public signal void newFeedList();
public signal void refreshFeedListCounter();