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

Definition of the Pop Module. More...

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

Go to the source code of this file.

Functions

static bool pop_init (struct NeoMutt *n)
 Initialise a Module - Implements Module::init()
 
static bool pop_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 
static bool pop_cleanup (struct NeoMutt *n)
 Clean up a Module - Implements Module::cleanup()
 

Variables

struct ConfigDef PopVars []
 Config definitions for the POP library.
 
const struct Module ModulePop
 Module for the Pop library.
 

Detailed Description

Definition of the Pop 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

◆ pop_init()

static bool pop_init ( struct NeoMutt * n)
static

Initialise a Module - Implements Module::init()

Definition at line 42 of file module.c.

43{
44 // struct PopModuleData *md = MUTT_MEM_CALLOC(1, struct PopModuleData);
45 // neomutt_set_module_data(n, MODULE_ID_POP, md);
46
47 return true;
48}

◆ pop_config_define_variables()

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

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

Definition at line 53 of file module.c.

54{
56}
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
struct ConfigDef PopVars[]
Config definitions for the POP library.
Definition config.c:70
+ Here is the call graph for this function:

◆ pop_cleanup()

static bool pop_cleanup ( struct NeoMutt * n)
static

Clean up a Module - Implements Module::cleanup()

Definition at line 61 of file module.c.

62{
63 // struct PopModuleData *md = neomutt_get_module_data(n, MODULE_ID_POP);
64 // ASSERT(md);
65
66 // FREE(&md);
67 return true;
68}

Variable Documentation

◆ PopVars

struct ConfigDef PopVars[]
extern

Config definitions for the POP library.

Definition at line 70 of file config.c.

70 {
71 // clang-format off
72 { "pop_auth_try_all", DT_BOOL, true, 0, NULL,
73 "(pop) Try all available authentication methods"
74 },
75 { "pop_authenticators", DT_SLIST|D_SLIST_SEP_COLON, 0, 0, pop_auth_validator,
76 "(pop) List of allowed authentication methods (colon-separated)"
77 },
78 { "pop_check_interval", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 60, 0, NULL,
79 "(pop) Interval between checks for new mail"
80 },
81 { "pop_delete", DT_QUAD, MUTT_ASKNO, 0, NULL,
82 "(pop) After downloading POP messages, delete them on the server"
83 },
84 { "pop_host", DT_STRING, 0, 0, NULL,
85 "(pop) Url of the POP server"
86 },
87 { "pop_last", DT_BOOL, false, 0, NULL,
88 "(pop) Use the 'LAST' command to fetch new mail"
89 },
90 { "pop_oauth_refresh_command", DT_STRING|D_STRING_COMMAND|D_SENSITIVE, 0, 0, NULL,
91 "(pop) External command to generate OAUTH refresh token"
92 },
93 { "pop_pass", DT_STRING|D_SENSITIVE, 0, 0, NULL,
94 "(pop) Password of the POP server"
95 },
96 { "pop_reconnect", DT_QUAD, MUTT_ASKYES, 0, NULL,
97 "(pop) Reconnect to the server is the connection is lost"
98 },
99 { "pop_user", DT_STRING|D_SENSITIVE, 0, 0, NULL,
100 "(pop) Username of the POP server"
101 },
102
103 { "pop_checkinterval", DT_SYNONYM, IP "pop_check_interval", IP "2021-02-11" },
104 { NULL },
105 // clang-format on
106};
#define IP
Definition set.h:55
static int pop_auth_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "pop_authenticators" config variable - Implements ConfigDef::validator() -.
Definition config.c:45
@ MUTT_ASKNO
Ask the user, defaulting to 'No'.
Definition quad.h:40
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition quad.h:41
#define D_SLIST_SEP_COLON
Slist items are colon-separated.
Definition types.h:112
#define D_STRING_COMMAND
A command.
Definition types.h:99
@ DT_NUMBER
a number
Definition types.h:38
@ DT_SLIST
a list of strings
Definition types.h:42
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition types.h:40
@ DT_SYNONYM
synonym for another variable
Definition types.h:45
@ DT_STRING
a string
Definition types.h:44
#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

◆ ModulePop

const struct Module ModulePop
Initial value:
= {
"pop",
NULL,
NULL,
NULL,
NULL,
}
@ MODULE_ID_POP
ModulePop, Pop
Definition module_api.h:86
static bool pop_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition module.c:42
static bool pop_cleanup(struct NeoMutt *n)
Clean up a Module - Implements Module::cleanup()
Definition module.c:61
static bool pop_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:53

Module for the Pop library.

Definition at line 73 of file module.c.

73 {
75 "pop",
77 NULL, // config_define_types
79 NULL, // commands_register
80 NULL, // gui_init
81 NULL, // gui_cleanup
83};