NeoMutt  2024-04-25-100-gcb3684
Teaching an old dog new tricks
No Matches
adata.h File Reference

Nntp-specific Account data. More...

#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
+ Include dependency graph for adata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NntpAccountData
 NNTP-specific Account data -. More...


void nntp_adata_free (void **ptr)
 Free the private Account data - Implements Account::adata_free() -.
struct NntpAccountDatanntp_adata_new (struct Connection *conn)
 Allocate and initialise a new NntpAccountData structure.

Detailed Description

Nntp-specific Account data.

  • 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

Definition in file adata.h.

Function Documentation

◆ nntp_adata_new()

struct NntpAccountData * nntp_adata_new ( struct Connection conn)

Allocate and initialise a new NntpAccountData structure.

connNetwork connection
Return values
ptrNew NntpAccountData

Definition at line 65 of file adata.c.

67 struct NntpAccountData *adata = mutt_mem_calloc(1, sizeof(struct NntpAccountData));
68 adata->conn = conn;
69 adata->groups_hash = mutt_hash_new(1009, MUTT_HASH_NO_FLAGS);
71 adata->groups_max = 16;
72 adata->groups_list = mutt_mem_malloc(adata->groups_max * sizeof(struct NntpMboxData *));
73 return adata;
void nntp_hashelem_free(int type, void *obj, intptr_t data)
Free our hash table data - Implements hash_hdata_free_t -.
Definition: nntp.c:117
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
Definition: hash.c:259
void mutt_hash_set_destructor(struct HashTable *table, hash_hdata_free_t fn, intptr_t fn_data)
Set the destructor for a Hash Table.
Definition: hash.c:301
No flags are set.
Definition: hash.h:109
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:51
void * mutt_mem_malloc(size_t size)
Allocate memory on the heap.
Definition: memory.c:91
void * adata
Private data (for Mailbox backends)
Definition: account.h:42
NNTP-specific Account data -.
Definition: adata.h:36
struct Connection * conn
Connection to NNTP Server.
Definition: adata.h:62
NNTP-specific Mailbox data -.
Definition: mdata.h:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function: