NeoMutt  2020-06-26-250-g349c94
Teaching an old dog new tricks
DOXYGEN
browser.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_BROWSER_H
24 #define MUTT_BROWSER_H
25 
26 #include "config.h"
27 #include <stdbool.h>
28 #include <stdint.h>
29 #include <sys/types.h>
30 #include <time.h>
31 
32 struct Buffer;
33 
34 /* These Config Variables are only used in browser.c */
36 extern char *C_FolderFormat;
37 extern short C_SortBrowser;
38 
39 typedef uint8_t SelectFileFlags;
40 #define MUTT_SEL_NO_FLAGS 0
41 #define MUTT_SEL_MAILBOX (1 << 0)
42 #define MUTT_SEL_MULTI (1 << 1)
43 #define MUTT_SEL_FOLDER (1 << 2)
44 
45 
48 struct Folder
49 {
50  struct FolderFile *ff;
51  int num;
52 };
53 
57 struct FolderFile
58 {
59  mode_t mode;
60  off_t size;
61  time_t mtime;
62  uid_t uid;
63  gid_t gid;
64  nlink_t nlink;
65 
66  char *name;
67  char *desc;
68 
69  bool has_new_mail;
70  int msg_count;
71  int msg_unread;
72 
73 #ifdef USE_IMAP
74  char delim;
75 
76  bool imap : 1;
77  bool selectable : 1;
78  bool inferiors : 1;
79 #endif
80  bool has_mailbox : 1;
81  bool local : 1;
82  bool tagged : 1;
83 #ifdef USE_NNTP
84  struct NntpMboxData *nd;
85 #endif
86 };
87 
92 {
93  struct FolderFile *entry;
94  size_t entrylen;
95  unsigned int entrymax;
96 #ifdef USE_IMAP
98  char *folder;
99 #endif
100 };
101 
102 void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, char ***files, int *numfiles);
103 void mutt_buffer_select_file(struct Buffer *f, SelectFileFlags flags, char ***files, int *numfiles);
104 void mutt_browser_select_dir(const char *f);
105 void mutt_browser_cleanup(void);
106 
107 #endif /* MUTT_BROWSER_H */
int msg_unread
number of unread messages
Definition: browser.h:71
mode_t mode
Definition: browser.h:59
time_t mtime
Definition: browser.h:61
bool has_mailbox
Definition: browser.h:80
char * desc
Definition: browser.h:67
void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:2218
gid_t gid
Definition: browser.h:63
State of the file/mailbox browser.
Definition: browser.h:91
String manipulation buffer.
Definition: buffer.h:33
struct FolderFile * ff
Definition: browser.h:50
off_t size
Definition: browser.h:60
char * folder
Definition: browser.h:98
bool selectable
Definition: browser.h:77
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
Definition: browser.c:1139
uid_t uid
Definition: browser.h:62
nlink_t nlink
Definition: browser.h:64
void mutt_buffer_select_file(struct Buffer *f, SelectFileFlags flags, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:1158
char * name
Definition: browser.h:66
int num
Definition: browser.h:51
unsigned int entrymax
max entry
Definition: browser.h:95
bool imap
Definition: browser.h:76
void mutt_browser_cleanup(void)
Clean up working Buffers.
Definition: browser.c:123
A folder/dir in the browser.
Definition: browser.h:48
Browser entry representing a folder/dir.
Definition: browser.h:57
int msg_count
total number of messages
Definition: browser.h:70
short C_SortBrowser
Config: Sort method for the browser.
Definition: browser.c:71
NNTP-specific Mailbox data -.
Definition: lib.h:138
size_t entrylen
number of real entries
Definition: browser.h:94
char * C_FolderFormat
Config: printf-like format string for the browser&#39;s display of folders.
Definition: browser.c:70
bool tagged
Definition: browser.h:82
struct NntpMboxData * nd
Definition: browser.h:84
int const char * file
Definition: acutest.h:617
bool local
folder is on local filesystem
Definition: browser.h:81
bool inferiors
Definition: browser.h:78
bool imap_browse
Definition: browser.h:97
char delim
Definition: browser.h:74
struct FolderFile * entry
Definition: browser.h:93
bool has_new_mail
true if mailbox has "new mail"
Definition: browser.h:69
bool C_BrowserAbbreviateMailboxes
Config: Abbreviate mailboxes using &#39;~&#39; and &#39;=&#39; in the browser.
Definition: browser.c:69
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition: browser.h:39