NeoMutt  2021-02-05-89-gabe350
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 struct Mailbox;
34 
35 /* These Config Variables are only used in browser.c */
37 extern char *C_FolderFormat;
38 extern short C_SortBrowser;
39 
40 typedef uint8_t SelectFileFlags;
41 #define MUTT_SEL_NO_FLAGS 0
42 #define MUTT_SEL_MAILBOX (1 << 0)
43 #define MUTT_SEL_MULTI (1 << 1)
44 #define MUTT_SEL_FOLDER (1 << 2)
45 
46 
49 struct Folder
50 {
51  struct FolderFile *ff;
52  int num;
53 };
54 
58 struct FolderFile
59 {
60  mode_t mode;
61  off_t size;
62  time_t mtime;
63  uid_t uid;
64  gid_t gid;
65  nlink_t nlink;
66 
67  char *name;
68  char *desc;
69 
70  bool has_new_mail;
71  int msg_count;
72  int msg_unread;
73 
74 #ifdef USE_IMAP
75  char delim;
76 
77  bool imap : 1;
78  bool selectable : 1;
79  bool inferiors : 1;
80 #endif
81  bool has_mailbox : 1;
82  bool local : 1;
83  bool tagged : 1;
84 #ifdef USE_NNTP
85  struct NntpMboxData *nd;
86 #endif
87 
88  int gen;
89 };
90 
91 ARRAY_HEAD(BrowserStateEntry, struct FolderFile);
92 
97 {
98  struct BrowserStateEntry entry;
99 #ifdef USE_IMAP
101  char *folder;
102 #endif
103 };
104 
105 void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles);
106 void mutt_buffer_select_file(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles);
107 void mutt_browser_select_dir(const char *f);
108 void mutt_browser_cleanup(void);
109 
110 #endif /* MUTT_BROWSER_H */
FolderFile::mode
mode_t mode
Definition: browser.h:60
mutt_buffer_select_file
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:1142
BrowserState::entry
struct BrowserStateEntry entry
Definition: browser.h:98
Mailbox
A mailbox.
Definition: mailbox.h:81
FolderFile::delim
char delim
Definition: browser.h:75
BrowserState
State of the file/mailbox browser.
Definition: browser.h:96
Buffer
String manipulation buffer.
Definition: buffer.h:33
FolderFile::has_new_mail
bool has_new_mail
true if mailbox has "new mail"
Definition: browser.h:70
FolderFile::gid
gid_t gid
Definition: browser.h:64
FolderFile::mtime
time_t mtime
Definition: browser.h:62
Folder::ff
struct FolderFile * ff
Definition: browser.h:51
FolderFile::uid
uid_t uid
Definition: browser.h:63
FolderFile::nlink
nlink_t nlink
Definition: browser.h:65
ARRAY_HEAD
ARRAY_HEAD(BrowserStateEntry, struct FolderFile)
FolderFile::size
off_t size
Definition: browser.h:61
FolderFile::selectable
bool selectable
Definition: browser.h:78
Folder::num
int num
Definition: browser.h:52
mutt_browser_cleanup
void mutt_browser_cleanup(void)
Clean up working Buffers.
Definition: browser.c:126
FolderFile::gen
int gen
Definition: browser.h:88
mutt_select_file
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:2208
Folder
A folder/dir in the browser.
Definition: browser.h:49
FolderFile::imap
bool imap
Definition: browser.h:77
mutt_browser_select_dir
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
Definition: browser.c:1122
C_SortBrowser
short C_SortBrowser
Config: Sort method for the browser.
Definition: browser.c:74
BrowserState::imap_browse
bool imap_browse
Definition: browser.h:100
FolderFile::name
char * name
Definition: browser.h:67
BrowserState::folder
char * folder
Definition: browser.h:101
FolderFile::msg_count
int msg_count
total number of messages
Definition: browser.h:71
FolderFile::inferiors
bool inferiors
Definition: browser.h:79
FolderFile::nd
struct NntpMboxData * nd
Definition: browser.h:85
C_FolderFormat
char * C_FolderFormat
Config: printf-like format string for the browser's display of folders.
Definition: browser.c:73
FolderFile
Browser entry representing a folder/dir.
Definition: browser.h:58
SelectFileFlags
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition: browser.h:40
FolderFile::desc
char * desc
Definition: browser.h:68
C_BrowserAbbreviateMailboxes
bool C_BrowserAbbreviateMailboxes
Config: Abbreviate mailboxes using '~' and '=' in the browser.
Definition: browser.c:72
NntpMboxData
NNTP-specific Mailbox data -.
Definition: mdata.h:31
FolderFile::msg_unread
int msg_unread
number of unread messages
Definition: browser.h:72
FolderFile::tagged
bool tagged
Definition: browser.h:83
FolderFile::has_mailbox
bool has_mailbox
Definition: browser.h:81