NeoMutt  2021-02-05-666-ge300cd
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 #include "mutt/lib.h"
32 
33 struct Mailbox;
34 
35 typedef uint8_t SelectFileFlags;
36 #define MUTT_SEL_NO_FLAGS 0
37 #define MUTT_SEL_MAILBOX (1 << 0)
38 #define MUTT_SEL_MULTI (1 << 1)
39 #define MUTT_SEL_FOLDER (1 << 2)
40 
41 
44 struct Folder
45 {
46  struct FolderFile *ff;
47  int num;
48 };
49 
53 struct FolderFile
54 {
55  mode_t mode;
56  off_t size;
57  time_t mtime;
58  uid_t uid;
59  gid_t gid;
60  nlink_t nlink;
61 
62  char *name;
63  char *desc;
64 
65  bool has_new_mail;
66  int msg_count;
67  int msg_unread;
68 
69 #ifdef USE_IMAP
70  char delim;
71 
72  bool imap : 1;
73  bool selectable : 1;
74  bool inferiors : 1;
75 #endif
76  bool has_mailbox : 1;
77  bool local : 1;
78  bool tagged : 1;
79 #ifdef USE_NNTP
80  struct NntpMboxData *nd;
81 #endif
82 
83  int gen;
84 };
85 
86 ARRAY_HEAD(BrowserStateEntry, struct FolderFile);
87 
92 {
93  struct BrowserStateEntry entry;
94 #ifdef USE_IMAP
96  char *folder;
97 #endif
99 };
100 
101 void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles);
102 void mutt_buffer_select_file(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles);
103 void mutt_browser_select_dir(const char *f);
104 void mutt_browser_cleanup(void);
105 
106 #endif /* MUTT_BROWSER_H */
int msg_unread
number of unread messages
Definition: browser.h:67
mode_t mode
Definition: browser.h:55
time_t mtime
Definition: browser.h:57
bool has_mailbox
Definition: browser.h:76
char * desc
Definition: browser.h:63
ARRAY_HEAD(BrowserStateEntry, struct FolderFile)
gid_t gid
Definition: browser.h:59
State of the file/mailbox browser.
Definition: browser.h:91
String manipulation buffer.
Definition: buffer.h:33
void mutt_buffer_select_file(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:1254
int gen
Definition: browser.h:83
void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:2343
struct FolderFile * ff
Definition: browser.h:46
off_t size
Definition: browser.h:56
char * folder
Definition: browser.h:96
bool selectable
Definition: browser.h:73
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
Definition: browser.c:1234
uid_t uid
Definition: browser.h:58
nlink_t nlink
Definition: browser.h:60
char * name
Definition: browser.h:62
int num
Definition: browser.h:47
bool imap
Definition: browser.h:72
void mutt_browser_cleanup(void)
Clean up working Buffers.
Definition: browser.c:160
A folder/dir in the browser.
Definition: browser.h:44
Browser entry representing a folder/dir.
Definition: browser.h:53
A mailbox.
Definition: mailbox.h:81
int msg_count
total number of messages
Definition: browser.h:66
NNTP-specific Mailbox data -.
Definition: mdata.h:32
bool tagged
Definition: browser.h:78
struct NntpMboxData * nd
Definition: browser.h:80
bool local
folder is on local filesystem
Definition: browser.h:77
Convenience wrapper for the library headers.
bool inferiors
Definition: browser.h:74
bool imap_browse
Definition: browser.h:95
bool is_mailbox_list
Definition: browser.h:98
char delim
Definition: browser.h:70
bool has_new_mail
true if mailbox has "new mail"
Definition: browser.h:65
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition: browser.h:33