NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c File Reference

Definition of the Nntp Module. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "config/lib.h"
#include "core/lib.h"
+ Include dependency graph for module.c:

Go to the source code of this file.

Functions

static bool nntp_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 

Variables

struct ConfigDef NntpVars []
 Config definitions for the NNTP library.
 
const struct Module ModuleNntp
 Module for the Nntp library.
 

Detailed Description

Definition of the Nntp Module.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file module.c.

Function Documentation

◆ nntp_config_define_variables()

static bool nntp_config_define_variables ( struct NeoMutt * n,
struct ConfigSet * cs )
static

Define the Config Variables - Implements Module::config_define_variables()

Definition at line 40 of file module.c.

41{
43}
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
struct ConfigDef NntpVars[]
Config definitions for the NNTP library.
Definition config.c:59
+ Here is the call graph for this function:

Variable Documentation

◆ NntpVars

struct ConfigDef NntpVars[]
extern

Config definitions for the NNTP library.

Definition at line 59 of file config.c.

59 {
60 // clang-format off
61 { "catchup_newsgroup", DT_QUAD, MUTT_ASKYES, 0, NULL,
62 "(nntp) Mark all articles as read when leaving a newsgroup"
63 },
64 { "followup_to_poster", DT_QUAD, MUTT_ASKYES, 0, NULL,
65 "(nntp) Reply to the poster if 'poster' is in the 'Followup-To' header"
66 },
67 { "newsgroups_charset", DT_STRING, IP "utf-8", 0, charset_validator,
68 "(nntp) Character set of newsgroups' descriptions"
69 },
70 { "newsrc", DT_EXPANDO|D_PATH_FILE, IP "~/.newsrc", IP &NntpFormatDef, NULL,
71 "(nntp) File containing list of subscribed newsgroups"
72 },
73 { "news_cache_dir", DT_PATH|D_PATH_DIR, IP "~/.neomutt", 0, NULL,
74 "(nntp) Directory for cached news articles"
75 },
76 { "news_server", DT_STRING, 0, 0, NULL,
77 "(nntp) Url of the news server"
78 },
79 { "nntp_authenticators", DT_STRING, 0, 0, NULL,
80 "(nntp) Allowed authentication methods"
81 },
82 { "nntp_context", DT_LONG|D_INTEGER_NOT_NEGATIVE, 1000, 0, NULL,
83 "(nntp) Maximum number of articles to list (0 for all articles)"
84 },
85 { "nntp_listgroup", DT_BOOL, true, 0, NULL,
86 "(nntp) Check all articles when opening a newsgroup"
87 },
88 { "nntp_load_description", DT_BOOL, true, 0, NULL,
89 "(nntp) Load descriptions for newsgroups when adding to the list"
90 },
91 { "nntp_pass", DT_STRING|D_SENSITIVE, 0, 0, NULL,
92 "(nntp) Password for the news server"
93 },
94 { "nntp_poll", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 60, 0, NULL,
95 "(nntp) Interval between checks for new posts"
96 },
97 { "nntp_user", DT_STRING|D_SENSITIVE, 0, 0, NULL,
98 "(nntp) Username for the news server"
99 },
100 { "post_moderated", DT_QUAD, MUTT_ASKYES, 0, NULL,
101 "(nntp) Allow posting to moderated newsgroups"
102 },
103 { "save_unsubscribed", DT_BOOL, false, 0, NULL,
104 "(nntp) Save a list of unsubscribed newsgroups to the 'newsrc'"
105 },
106 { "show_new_news", DT_BOOL, true, 0, NULL,
107 "(nntp) Check for new newsgroups when entering the browser"
108 },
109 { "x_comment_to", DT_BOOL, false, 0, NULL,
110 "(nntp) Add 'X-Comment-To' header that contains article author"
111 },
112 { NULL },
113 // clang-format on
114};
#define IP
Definition set.h:54
int charset_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "charset" config variables - Implements ConfigDef::validator() -.
Definition charset.c:45
const struct ExpandoDefinition NntpFormatDef[]
Expando definitions.
Definition config.c:44
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition quad.h:41
#define D_PATH_DIR
Path is a directory.
Definition types.h:103
#define D_PATH_FILE
Path is a file.
Definition types.h:104
@ DT_NUMBER
a number
Definition types.h:38
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition types.h:40
@ DT_STRING
a string
Definition types.h:44
@ DT_LONG
a number (long)
Definition types.h:35
@ DT_EXPANDO
an expando
Definition types.h:34
@ DT_PATH
a path to a file/directory
Definition types.h:39
#define D_SENSITIVE
Contains sensitive value, e.g. password.
Definition types.h:81
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

◆ ModuleNntp

const struct Module ModuleNntp
Initial value:
= {
"nntp",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
@ MODULE_ID_NNTP
ModuleNntp, Nntp
Definition module_api.h:81
static bool nntp_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:40

Module for the Nntp library.

Definition at line 48 of file module.c.

48 {
50 "nntp",
51 NULL, // init
52 NULL, // config_define_types
54 NULL, // commands_register
55 NULL, // gui_init
56 NULL, // gui_cleanup
57 NULL, // cleanup
58};