NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
adata.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include "
core/lib.h
"
31
#include "
conn/lib.h
"
32
#include "
adata.h
"
33
41
void
pop_adata_free
(
void
**ptr)
42
{
43
if
(!ptr || !*ptr)
44
return
;
45
46
struct
PopAccountData
*
adata
= *ptr;
47
FREE
(&
adata
->auth_list.data);
48
49
if
(
adata
->conn)
50
{
51
if
(
adata
->conn->close)
52
adata
->conn->close(
adata
->conn);
53
FREE
(&
adata
->conn);
54
}
55
56
FREE
(ptr);
57
}
58
63
struct
PopAccountData
*
pop_adata_new
(
void
)
64
{
65
return
MUTT_MEM_CALLOC
(1,
struct
PopAccountData
);
66
}
67
73
struct
PopAccountData
*
pop_adata_get
(
struct
Mailbox
*m)
74
{
75
if
(!m || (m->
type
!=
MUTT_POP
))
76
return
NULL;
77
struct
Account
*a = m->
account
;
78
if
(!a)
79
return
NULL;
80
return
a->
adata
;
81
}
lib.h
Connection Library.
lib.h
Convenience wrapper for the core headers.
MUTT_POP
@ MUTT_POP
'POP3' Mailbox type
Definition
mailbox.h:51
pop_adata_free
void pop_adata_free(void **ptr)
Free the private Account data - Implements Account::adata_free() -.
Definition
adata.c:41
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:68
MUTT_MEM_CALLOC
#define MUTT_MEM_CALLOC(n, type)
Definition
memory.h:52
pop_adata_get
struct PopAccountData * pop_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
Definition
adata.c:73
pop_adata_new
struct PopAccountData * pop_adata_new(void)
Create a new PopAccountData object.
Definition
adata.c:63
adata.h
Pop-specific Account data.
Account
A group of associated Mailboxes.
Definition
account.h:36
Account::adata
void * adata
Private data (for Mailbox backends).
Definition
account.h:42
Mailbox
A mailbox.
Definition
mailbox.h:81
Mailbox::type
enum MailboxType type
Mailbox type.
Definition
mailbox.h:104
Mailbox::account
struct Account * account
Account that owns this Mailbox.
Definition
mailbox.h:129
PopAccountData
POP-specific Account data -.
Definition
adata.h:37