Representation of an email. More...
#include "config.h"#include <stdbool.h>#include <time.h>#include "mutt/lib.h"#include "ncrypt/lib.h"#include "tags.h"
Include dependency graph for email.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | |
| The envelope/body of an email. More... | |
| struct | EmailNode |
| List of Emails. More... | |
| struct | EventEmail |
| An Event that happened to an Email. More... | |
| struct | EventHeader |
| An event that happened to a header. More... | |
Enumerations | |
| enum | ExpandoDataEmail { ED_EMA_ATTACHMENT_COUNT = 1 , ED_EMA_BODY_CHARACTERS , ED_EMA_COMBINED_FLAGS , ED_EMA_CRYPTO_FLAGS , ED_EMA_DATE_FORMAT , ED_EMA_DATE_FORMAT_LOCAL , ED_EMA_DATE_STRF , ED_EMA_DATE_STRF_LOCAL , ED_EMA_FLAG_CHARS , ED_EMA_FROM_LIST , ED_EMA_INDEX_HOOK , ED_EMA_LINES , ED_EMA_LIST_OR_SAVE_FOLDER , ED_EMA_MESSAGE_FLAGS , ED_EMA_NUMBER , ED_EMA_SCORE , ED_EMA_SIZE , ED_EMA_STATUS_FLAGS , ED_EMA_STRF_RECV_LOCAL , ED_EMA_TAGS , ED_EMA_TAGS_TRANSFORMED , ED_EMA_THREAD_COUNT , ED_EMA_THREAD_HIDDEN_COUNT , ED_EMA_THREAD_NUMBER , ED_EMA_THREAD_TAGS , ED_EMA_TO_CHARS } |
| Expando UIDs for Emails. More... | |
| enum | NotifyEmail { NT_EMAIL_ADD = 1 , NT_EMAIL_DELETE , NT_EMAIL_DELETE_ALL , NT_EMAIL_CHANGE , NT_EMAIL_CHANGE_ENVELOPE , NT_EMAIL_CHANGE_ATTACH , NT_EMAIL_CHANGE_SECURITY } |
| Types of Email Event. More... | |
| enum | NotifyHeader { NT_HEADER_ADD = 1 , NT_HEADER_DELETE , NT_HEADER_CHANGE } |
| Types of Header Event. More... | |
Functions | |
| ARRAY_HEAD (EmailArray, struct Email *) | |
| bool | email_cmp_strict (const struct Email *e1, const struct Email *e2) |
| Strictly compare message emails. | |
| void | email_free (struct Email **ptr) |
| Free an Email. | |
| struct Email * | email_new (void) |
| Create a new Email. | |
| size_t | email_get_size (const struct Email *e) |
| Compute the size of an email. | |
| struct ListNode * | header_add (struct ListHead *hdrlist, const char *header) |
| Add a header to a list. | |
| struct ListNode * | header_find (const struct ListHead *hdrlist, const char *header) |
| Find a header, matching on its field, in a list of headers. | |
| void | header_free (struct ListHead *hdrlist, struct ListNode *target) |
| Free and remove a header from a header list. | |
| struct ListNode * | header_set (struct ListHead *hdrlist, const char *header) |
| Set a header value in a list. | |
| struct ListNode * | header_update (struct ListNode *hdrnode, const char *header) |
| Update an existing header. | |
Representation of an email.
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 email.h.
| enum ExpandoDataEmail |
Expando UIDs for Emails.
| Enumerator | |
|---|---|
| ED_EMA_ATTACHMENT_COUNT | |
| ED_EMA_BODY_CHARACTERS | |
| ED_EMA_COMBINED_FLAGS | Email.read, Email.old, thread_is_new(), ... |
| ED_EMA_CRYPTO_FLAGS | |
| ED_EMA_DATE_FORMAT | |
| ED_EMA_DATE_FORMAT_LOCAL | |
| ED_EMA_DATE_STRF | Email.date_sent, Email.zhours, Email.zminutes, Email.zoccident. |
| ED_EMA_DATE_STRF_LOCAL | |
| ED_EMA_FLAG_CHARS | |
| ED_EMA_FROM_LIST | |
| ED_EMA_INDEX_HOOK | |
| ED_EMA_LINES | |
| ED_EMA_LIST_OR_SAVE_FOLDER | |
| ED_EMA_MESSAGE_FLAGS | |
| ED_EMA_NUMBER | |
| ED_EMA_SCORE | |
| ED_EMA_SIZE | |
| ED_EMA_STATUS_FLAGS | |
| ED_EMA_STRF_RECV_LOCAL | |
| ED_EMA_TAGS | |
| ED_EMA_TAGS_TRANSFORMED | |
| ED_EMA_THREAD_COUNT | |
| ED_EMA_THREAD_HIDDEN_COUNT | |
| ED_EMA_THREAD_NUMBER | |
| ED_EMA_THREAD_TAGS | |
| ED_EMA_TO_CHARS | Email, User_is_recipient() |
Definition at line 134 of file email.h.
| enum NotifyEmail |
Types of Email Event.
Observers of NT_EMAIL will be passed an EventEmail.
| Enumerator | |
|---|---|
| NT_EMAIL_ADD | Email has been added. |
| NT_EMAIL_DELETE | Email is about to be deleted. |
| NT_EMAIL_DELETE_ALL | All the Emails are about to be deleted. |
| NT_EMAIL_CHANGE | Email has changed. |
| NT_EMAIL_CHANGE_ENVELOPE | |
| NT_EMAIL_CHANGE_ATTACH | Email's Attachments have changed. |
| NT_EMAIL_CHANGE_SECURITY | Email's security settings have changed. |
Definition at line 181 of file email.h.
| enum NotifyHeader |
Types of Header Event.
Observers of NT_HEADER will be passed an EventHeader.
| Enumerator | |
|---|---|
| NT_HEADER_ADD | Header has been added. |
| NT_HEADER_DELETE | Header has been removed. |
| NT_HEADER_CHANGE | An existing header has been changed. |
| ARRAY_HEAD | ( | EmailArray | , |
| struct Email * | ) |
Strictly compare message emails.
| true | Emails are strictly identical |
Definition at line 96 of file email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void email_free | ( | struct Email ** | ptr | ) |
Free an Email.
| [out] | ptr | Email to free |
Definition at line 46 of file email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct Email * email_new | ( | void | ) |
| size_t email_get_size | ( | const struct Email * | e | ) |
| struct ListNode * header_add | ( | struct ListHead * | hdrlist, |
| const char * | header ) |
Add a header to a list.
| hdrlist | List of headers to search |
| header | String to set as the header |
| ptr | The created header |
Definition at line 160 of file email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct ListNode * header_find | ( | const struct ListHead * | hdrlist, |
| const char * | header ) |
Find a header, matching on its field, in a list of headers.
| hdrlist | List of headers to search |
| header | The header to search for |
| ptr | The node in the list matching the header |
| NULL | No matching header is found |
The header should either of the form "X-Header:" or "X-Header: value"
Definition at line 137 of file email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void header_free | ( | struct ListHead * | hdrlist, |
| struct ListNode * | target ) |
| struct ListNode * header_set | ( | struct ListHead * | hdrlist, |
| const char * | header ) |
Set a header value in a list.
| hdrlist | List of headers to search |
| header | String to set the value of the header to |
| ptr | The updated or created header |
If a header exists with the same field, update it, otherwise add a new header.
Definition at line 190 of file email.c.
Here is the call graph for this function:
Here is the caller graph for this function: