NeoMutt  2024-02-01-23-g345d7b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
41#ifndef MUTT_DEBUG_LIB_H
42#define MUTT_DEBUG_LIB_H
43
44#include <stddef.h>
45#include <stdbool.h>
46#include <time.h>
47#include "mutt/lib.h"
48#include "email/lib.h"
49#include "core/lib.h"
50#include "menu/lib.h"
51
52struct AddressList;
53struct AttachCtx;
54struct AttachPtr;
55struct MailboxView;
56struct MuttWindow;
57struct PagerPrivateData;
58
59// Common
60void add_flag (struct Buffer *buf, bool is_set, const char *name);
61
62// Backtrace
63void show_backtrace(void);
64
65// Email
66char body_name (const struct Body *b);
67void dump_addr_list (char *buf, size_t buflen, const struct AddressList *al, const char *name);
68void dump_attach (const struct AttachPtr *att);
69void dump_body (const struct Body *body);
70void dump_body_next (struct Buffer *buf, const struct Body *b);
71void dump_body_one_line (const struct Body *b);
72void dump_email (const struct Email *e);
73void dump_envelope (const struct Envelope *env);
74void dump_list_head (const struct ListHead *list, const char *name);
75void dump_param_list (const struct ParameterList *pl);
76
77// Graphviz
78void dump_graphviz (const char *title, struct MailboxView *mv);
79void dump_graphviz_attach_ctx(struct AttachCtx *actx);
80void dump_graphviz_body (struct Body *b);
81void dump_graphviz_email (struct Email *e, const char *title);
82
83// Keymap
84void dump_keybindings (void);
85
86// Logging
87extern bool DebugLogColor;
88extern bool DebugLogLevel;
89extern bool DebugLogTimestamp;
90
91extern int log_disp_debug (time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format, ...);
92
93// Names
94const char *name_content_disposition(enum ContentDisposition disp);
95const char *name_content_encoding (enum ContentEncoding enc);
96const char *name_content_type (enum ContentType type);
97const char *name_mailbox_type (enum MailboxType type);
98const char *name_menu_type (enum MenuType mt);
99const char *name_notify_config (int id);
100const char *name_notify_global (int id);
101const char *name_notify_mailbox (int id);
102const char *name_notify_mview (int id);
103const char *name_notify_type (enum NotifyType type);
104const char *name_window_size (const struct MuttWindow *win);
105const char *name_window_type (const struct MuttWindow *win);
106
107// Notify
108int debug_all_observer(struct NotifyCallback *nc);
109
110// Pager
111void dump_pager(struct PagerPrivateData *priv);
112
113// Window
114void debug_win_dump(void);
115
116#endif /* MUTT_DEBUG_LIB_H */
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
void dump_list_head(const struct ListHead *list, const char *name)
Definition: email.c:56
void dump_graphviz_body(struct Body *b)
Definition: graphviz.c:1397
void dump_email(const struct Email *e)
Definition: email.c:148
const char * name_content_encoding(enum ContentEncoding enc)
Definition: names.c:65
const char * name_window_size(const struct MuttWindow *win)
Definition: names.c:261
void debug_win_dump(void)
Definition: window.c:96
const char * name_notify_global(int id)
Definition: names.c:174
const char * name_mailbox_type(enum MailboxType type)
Definition: names.c:123
const char * name_menu_type(enum MenuType mt)
Definition: names.c:143
void dump_graphviz(const char *title, struct MailboxView *mv)
Definition: graphviz.c:895
const char * name_notify_type(enum NotifyType type)
Definition: names.c:92
bool DebugLogLevel
Prefix log level, e.g. [E].
Definition: logging.c:40
void dump_body_next(struct Buffer *buf, const struct Body *b)
Definition: email.c:398
void dump_pager(struct PagerPrivateData *priv)
Definition: pager.c:101
void dump_attach(const struct AttachPtr *att)
Definition: email.c:347
const char * name_window_type(const struct MuttWindow *win)
Definition: names.c:223
bool DebugLogColor
Output ANSI colours.
Definition: logging.c:39
const char * name_notify_mview(int id)
Definition: names.c:212
void dump_param_list(const struct ParameterList *pl)
Definition: email.c:241
const char * name_notify_config(int id)
Definition: names.c:185
bool DebugLogTimestamp
Show the timestamp.
Definition: logging.c:41
const char * name_content_type(enum ContentType type)
Definition: names.c:47
void dump_envelope(const struct Envelope *env)
Definition: email.c:77
const char * name_content_disposition(enum ContentDisposition disp)
Definition: names.c:80
int debug_all_observer(struct NotifyCallback *nc)
Definition: notify.c:205
void add_flag(struct Buffer *buf, bool is_set, const char *name)
Definition: common.c:34
void dump_keybindings(void)
Dump all the keybindings to the log.
Definition: keymap.c:145
void dump_body_one_line(const struct Body *b)
Definition: email.c:414
const char * name_notify_mailbox(int id)
Definition: names.c:196
void show_backtrace(void)
Log the program's call stack.
Definition: backtrace.c:39
void dump_graphviz_attach_ctx(struct AttachCtx *actx)
Definition: graphviz.c:1587
char body_name(const struct Body *b)
Definition: email.c:375
void dump_graphviz_email(struct Email *e, const char *title)
Definition: graphviz.c:1419
void dump_body(const struct Body *body)
Definition: email.c:264
void dump_addr_list(char *buf, size_t buflen, const struct AddressList *al, const char *name)
Definition: email.c:40
Structs that make up an email.
int log_disp_debug(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Display a log line on screen - Implements log_dispatcher_t -.
Definition: logging.c:74
LogLevel
Names for the Logging Levels.
Definition: logging2.h:38
GUI present the user with a selectable list.
ContentEncoding
Content-Transfer-Encoding.
Definition: mime.h:47
ContentType
Content-Type.
Definition: mime.h:30
ContentDisposition
Content-Disposition values.
Definition: mime.h:61
Convenience wrapper for the library headers.
NotifyType
Notification Types.
Definition: notify_type.h:34
A set of attachments.
Definition: attach.h:51
An email to which things will be attached.
Definition: attach.h:35
The body of an email.
Definition: body.h:36
String manipulation buffer.
Definition: buffer.h:36
The envelope/body of an email.
Definition: email.h:39
The header of an Email.
Definition: envelope.h:57
View of a Mailbox.
Definition: mview.h:40
Data passed to a notification function.
Definition: observer.h:34
Private state data for the Pager.
Definition: private_data.h:41
MenuType
Types of GUI selections.
Definition: type.h:36