NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
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...
 

Functions

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.

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 adata.h.

Function Documentation

◆ nntp_adata_new()

struct NntpAccountData * nntp_adata_new ( struct Connection conn)

Allocate and initialise a new NntpAccountData structure.

Parameters
connNetwork connection
Return values
ptrNew NntpAccountData

Definition at line 65 of file adata.c.

66{
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, struct NntpMboxData *);
73 return adata;
74}
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
#define MUTT_HASH_NO_FLAGS
No flags are set.
Definition: hash.h:109
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
#define MUTT_MEM_MALLOC(n, type)
Definition: memory.h:41
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: