(no commit message)
[prss.git] / src / ttrss.c
index 6d4ebd6..9b76295 100644 (file)
@@ -27,7 +27,7 @@
 #include "http.h"
 #include "io.h"
 #include "log.h"
-#include "ttrss_ws.h"
+#include "ttrss_wsasync.h"
 #include "url.h"
 
 static struct feed **data;
@@ -104,7 +104,7 @@ void ttrss_set_article_unread(int id, int unread)
 {
        log_debug("ttrss_set_article_unread(%d,%d)", id, unread);
 
-       ws_set_article_unread(id, unread);
+       ws_async_set_article_unread(id, unread);
 
        log_debug("ttrss_set_article_unread(%d,%d)", id, unread);
 }
@@ -113,7 +113,7 @@ void ttrss_set_config(const char *url, const char *user, const char *pwd)
 {
        feeds_free(data);
        data = NULL;
-       ws_init(url, user, pwd);
+       ws_set_config(url, user, pwd);
 }
 
 struct feed *ttrss_get_feed(int id)
@@ -125,3 +125,18 @@ struct headline *ttrss_get_headline(int id)
 {
        return feeds_get_headline(data, id);
 }
+
+void ttrs_download_headline_content(struct feed **feeds)
+{
+       struct feed **fcur;
+       struct headline **hcur;
+
+       for (fcur = feeds; *fcur; fcur++) {
+               hcur = ttrss_feed_get_headlines(*fcur);
+
+               while (hcur && *hcur) {
+                       free(ttrss_get_headline_content(*hcur));
+                       hcur++;
+               }
+       }
+}