Representation of a mailbox. More...
#include "config.h"#include <stdbool.h>#include <stdint.h>#include <sys/types.h>#include <time.h>#include "mutt/lib.h"
Include dependency graph for mailbox.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | Mailbox |
| A mailbox. More... | |
| struct | MailboxNode |
| List of Mailboxes. More... | |
| struct | EventMailbox |
| An Event that happened to a Mailbox. More... | |
Macros | |
| #define | MUTT_ACL_NO_FLAGS 0 |
| No flags are set. | |
| #define | MUTT_ACL_ADMIN (1 << 0) |
| Administer the account (get/set permissions) | |
| #define | MUTT_ACL_CREATE (1 << 1) |
| Create a mailbox. | |
| #define | MUTT_ACL_DELETE (1 << 2) |
| Delete a message. | |
| #define | MUTT_ACL_DELMX (1 << 3) |
| Delete a mailbox. | |
| #define | MUTT_ACL_EXPUNGE (1 << 4) |
| Expunge messages. | |
| #define | MUTT_ACL_INSERT (1 << 5) |
| Add/copy into the mailbox (used when editing a message) | |
| #define | MUTT_ACL_LOOKUP (1 << 6) |
| Lookup mailbox (visible to 'list') | |
| #define | MUTT_ACL_POST (1 << 7) |
| Post (submit messages to the server) | |
| #define | MUTT_ACL_READ (1 << 8) |
| Read the mailbox. | |
| #define | MUTT_ACL_SEEN (1 << 9) |
| Change the 'seen' status of a message. | |
| #define | MUTT_ACL_WRITE (1 << 10) |
| Write to a message (for flagging or linking threads) | |
| #define | MUTT_ACL_ALL ((1 << 11) - 1) |
Typedefs | |
| typedef uint16_t | AclFlags |
| ACL Rights - These show permission to... | |
Enumerations | |
| enum | MailboxType { MUTT_MAILBOX_ANY = -2 , MUTT_MAILBOX_ERROR , MUTT_UNKNOWN , MUTT_MBOX , MUTT_MMDF , MUTT_MH , MUTT_MAILDIR , MUTT_NNTP , MUTT_IMAP , MUTT_NOTMUCH , MUTT_POP , MUTT_COMPRESSED } |
| Supported mailbox formats. More... | |
| enum | ExpandoDataMailbox { ED_MBX_MAILBOX_NAME = 1 , ED_MBX_MESSAGE_COUNT , ED_MBX_PERCENTAGE } |
| Expando UIDs for Mailboxes. More... | |
| enum | NotifyMailbox { NT_MAILBOX_ADD = 1 , NT_MAILBOX_DELETE , NT_MAILBOX_DELETE_ALL , NT_MAILBOX_CHANGE , NT_MAILBOX_INVALID , NT_MAILBOX_RESORT , NT_MAILBOX_UPDATE , NT_MAILBOX_UNTAG } |
| Types of Mailbox Event. More... | |
Functions | |
| STAILQ_HEAD (MailboxList, MailboxNode) | |
| void | mailbox_changed (struct Mailbox *m, enum NotifyMailbox action) |
| Notify observers of a change to a Mailbox. | |
| struct Mailbox * | mailbox_find (const char *path) |
| Find the mailbox with a given path. | |
| struct Mailbox * | mailbox_find_name (const char *name) |
| Find the mailbox with a given name. | |
| void | mailbox_free (struct Mailbox **ptr) |
| Free a Mailbox. | |
| int | mailbox_gen (void) |
| Get the next generation number. | |
| struct Mailbox * | mailbox_new (void) |
| Create a new Mailbox. | |
| bool | mailbox_set_subset (struct Mailbox *m, struct ConfigSubset *sub) |
| Set a Mailbox's Config Subset. | |
| void | mailbox_size_add (struct Mailbox *m, const struct Email *e) |
| Add an email's size to the total size of a Mailbox. | |
| void | mailbox_size_sub (struct Mailbox *m, const struct Email *e) |
| Subtract an email's size from the total size of a Mailbox. | |
| void | mailbox_update (struct Mailbox *m) |
| Get the mailbox's current size. | |
| void | mailbox_gc_add (struct Email *e) |
| Add an Email to the garbage-collection set. | |
| void | mailbox_gc_run (void) |
| Run the garbage-collection. | |
| const char * | mailbox_get_type_name (enum MailboxType type) |
| Get the type of a Mailbox. | |
| static const char * | mailbox_path (const struct Mailbox *m) |
| Get the Mailbox's path string. | |
Representation of a mailbox.
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 mailbox.h.
| #define MUTT_ACL_ADMIN (1 << 0) |
| #define MUTT_ACL_INSERT (1 << 5) |
| #define MUTT_ACL_LOOKUP (1 << 6) |
| #define MUTT_ACL_POST (1 << 7) |
| #define MUTT_ACL_SEEN (1 << 9) |
| #define MUTT_ACL_WRITE (1 << 10) |
| typedef uint16_t AclFlags |
ACL Rights - These show permission to...
Flags, e.g. MUTT_ACL_ADMIN
| enum MailboxType |
Supported mailbox formats.
| Enumerator | |
|---|---|
| MUTT_MAILBOX_ANY | Match any Mailbox type. |
| MUTT_MAILBOX_ERROR | Error occurred examining Mailbox. |
| MUTT_UNKNOWN | Mailbox wasn't recognised. |
| MUTT_MBOX | 'mbox' Mailbox type |
| MUTT_MMDF | 'mmdf' Mailbox type |
| MUTT_MH | 'MH' Mailbox type |
| MUTT_MAILDIR | 'Maildir' Mailbox type |
| MUTT_NNTP | 'NNTP' (Usenet) Mailbox type |
| MUTT_IMAP | 'IMAP' Mailbox type |
| MUTT_NOTMUCH | 'Notmuch' (virtual) Mailbox type |
| MUTT_POP | 'POP3' Mailbox type |
| MUTT_COMPRESSED | Compressed file Mailbox type. |
Definition at line 40 of file mailbox.h.
| enum ExpandoDataMailbox |
Expando UIDs for Mailboxes.
| Enumerator | |
|---|---|
| ED_MBX_MAILBOX_NAME | |
| ED_MBX_MESSAGE_COUNT | |
| ED_MBX_PERCENTAGE | |
| enum NotifyMailbox |
Types of Mailbox Event.
Observers of NT_MAILBOX will be passed an EventMailbox.
| Enumerator | |
|---|---|
| NT_MAILBOX_ADD | Mailbox has been added. |
| NT_MAILBOX_DELETE | Mailbox is about to be deleted. |
| NT_MAILBOX_DELETE_ALL | All Mailboxes are about to be deleted. |
| NT_MAILBOX_CHANGE | Mailbox has been changed. |
| NT_MAILBOX_INVALID | Email list was changed. |
| NT_MAILBOX_RESORT | Email list needs resorting. |
| NT_MAILBOX_UPDATE | Update internal tables. |
| NT_MAILBOX_UNTAG | Clear the 'last-tagged' pointer. |
Definition at line 180 of file mailbox.h.
| STAILQ_HEAD | ( | MailboxList | , |
| MailboxNode | ) |
| void mailbox_changed | ( | struct Mailbox * | m, |
| enum NotifyMailbox | action ) |
Notify observers of a change to a Mailbox.
Definition at line 233 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct Mailbox * mailbox_find | ( | const char * | path | ) |
Find the mailbox with a given path.
| path | Path to match |
| ptr | Matching Mailbox |
Definition at line 150 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct Mailbox * mailbox_find_name | ( | const char * | name | ) |
Find the mailbox with a given name.
| name | Name to match |
| ptr | Matching Mailbox |
| NULL | No matching mailbox found |
Definition at line 187 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mailbox_free | ( | struct Mailbox ** | ptr | ) |
Free a Mailbox.
| [out] | ptr | Mailbox to free |
Definition at line 89 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mailbox_gen | ( | void | ) |
| struct Mailbox * mailbox_new | ( | void | ) |
| bool mailbox_set_subset | ( | struct Mailbox * | m, |
| struct ConfigSubset * | sub ) |
Set a Mailbox's Config Subset.
| m | Mailbox |
| sub | Parent Config Subset |
| true | Success |
Definition at line 270 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:Add an email's size to the total size of a Mailbox.
Definition at line 249 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mailbox_update | ( | struct Mailbox * | m | ) |
Get the mailbox's current size.
| m | Mailbox to check |
Definition at line 215 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mailbox_gc_add | ( | struct Email * | e | ) |
| void mailbox_gc_run | ( | void | ) |
| const char * mailbox_get_type_name | ( | enum MailboxType | type | ) |
Get the type of a Mailbox.
| ptr | String describing Mailbox type |
Definition at line 326 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |