aboutsummaryrefslogtreecommitdiff
path: root/src/rss_html_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rss_html_common.h')
-rw-r--r--src/rss_html_common.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rss_html_common.h b/src/rss_html_common.h
index 085ddc1..cc22b24 100644
--- a/src/rss_html_common.h
+++ b/src/rss_html_common.h
@@ -1,6 +1,8 @@
#ifndef RSS_HTML_COMMON_H
#define RSS_HTML_COMMON_H
+#include <stddef.h>
+
#define MAX_UPDATE_ITEMS 10
typedef struct cJSON cJSON;
@@ -11,20 +13,18 @@ typedef struct {
} DownloadItemsData;
typedef struct {
- char *title;
- char *link;
+ const char *title;
+ const char *link;
cJSON *json_data;
} TrackedItem;
-int write_plugin_json_to_file(const char *dir, const char *filename, const char *url, const char *updated, const char *start_after, const char *start_after_url, const char *plugin_name);
+int write_plugin_json_to_file(const char *dir, const char *filename, const char *url, const char *updated, DownloadItemsData *prev_download_items, size_t num_prev_download_items, const char *plugin_name);
/*
- @num_download_items can't be more than MAX_UPDATE_ITEMS.
- @filenames can be NULL, in which case filenames are not stored for items. This is the case for html items.
-*/
-/*
Note: tracked_item.json_data becomes invalid after this call.
+ @filenames can be NULL, in which case filenames are not stored for items. This is the case for html items.
@tracked_dir is also modified and then restored at the end.
+ @download_items and @timestamps both need to be @num_download_items long. If @filenames is not NULL, then it also has to be @num_download_items long.
*/
int tracked_item_update_latest(TrackedItem *tracked_item, char *tracked_dir, DownloadItemsData **download_items, char **filenames, long *timestamps, int num_download_items);