Check for new groups/articles in subscribed groups.
2112{
2114 time_t now = 0;
2115 char buf[1024] = { 0 };
2116 char *msg =
_(
"Checking for new newsgroups...");
2117 unsigned int i;
2118 int rc;
2119 int update_active = false;
2120
2122 return -1;
2123
2124
2126 if (c_show_new_news)
2127 {
2130 {
2132
2134 {
2136 if (rc < 0)
2137 return -1;
2138 if (rc > 0)
2139 update_active = true;
2140 }
2141 }
2142 }
2144 {
2145 return 0;
2146 }
2147
2148
2151 return -1;
2155 else
2156 tmp_mdata.
group = NULL;
2159 snprintf(buf, sizeof(buf), "NEWGROUPS %02d%02d%02d %02d%02d%02d GMT\r\n",
2160 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
2162 if (rc)
2163 {
2164 if (rc > 0)
2165 {
2167 }
2168 return -1;
2169 }
2170
2171
2172 rc = 0;
2174 {
2175 int groups_num = i;
2176
2179 {
2182 }
2183
2184
2186 if (c_nntp_load_description)
2187 {
2188 unsigned int count = 0;
2191
2192 for (i = groups_num; i < adata->
groups_num; i++)
2193 {
2195
2197 {
2199 return -1;
2200 }
2202 }
2204 }
2205 update_active = true;
2206 rc = 1;
2207 }
2208 if (update_active)
2211 return rc;
2212}
#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.
bool has_new_mail
Has new articles.