Check for new groups/articles in subscribed groups.
2078{
2080 time_t now = 0;
2081 char buf[1024] = { 0 };
2082 char *msg =
_(
"Checking for new newsgroups...");
2083 unsigned int i;
2084 int rc, update_active = false;
2085
2087 return -1;
2088
2089
2091 if (c_show_new_news)
2092 {
2095 {
2097
2099 {
2101 if (rc < 0)
2102 return -1;
2103 if (rc > 0)
2104 update_active = true;
2105 }
2106 }
2107 }
2109 {
2110 return 0;
2111 }
2112
2113
2116 return -1;
2120 else
2121 tmp_mdata.
group = NULL;
2124 snprintf(buf, sizeof(buf), "NEWGROUPS %02d%02d%02d %02d%02d%02d GMT\r\n",
2125 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
2127 if (rc)
2128 {
2129 if (rc > 0)
2130 {
2132 }
2133 return -1;
2134 }
2135
2136
2137 rc = 0;
2139 {
2140 int groups_num = i;
2141
2144 {
2146 mdata->has_new_mail =
true;
2147 }
2148
2149
2151 if (c_nntp_load_description)
2152 {
2153 unsigned int count = 0;
2156
2157 for (i = groups_num; i < adata->
groups_num; i++)
2158 {
2160
2162 {
2164 return -1;
2165 }
2167 }
2169 }
2170 update_active = true;
2171 rc = 1;
2172 }
2173 if (update_active)
2176 return rc;
2177}
#define mutt_message(...)
struct tm mutt_date_gmtime(time_t t)
Converts calendar time to a broken-down time structure expressed in UTC timezone.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
int nntp_add_group(char *line, void *data)
Parse newsgroup.
int nntp_active_save_cache(struct NntpAccountData *adata)
Save list of all newsgroups to cache.
static int nntp_date(struct NntpAccountData *adata, time_t *now)
Get date and time from server.
static int nntp_group_poll(struct NntpMboxData *mdata, bool update_stat)
Check newsgroup for new articles.
static int nntp_fetch_lines(struct NntpMboxData *mdata, char *query, size_t qlen, const char *msg, int(*func)(char *, void *), void *data)
Read lines, calling a callback function for each.
static int get_description(struct NntpMboxData *mdata, const char *wildmat, const char *msg)
Fetch newsgroups descriptions.
@ MUTT_PROGRESS_READ
Progress tracks elements, according to $read_inc
struct Progress * progress_new(enum ProgressType type, size_t size)
Create a new Progress Bar.
void progress_free(struct Progress **ptr)
Free a Progress Bar.
void progress_set_message(struct Progress *progress, const char *fmt,...) __attribute__((__format__(__printf__
bool progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.