Execute user-defined Hooks. More...
#include "config.h"#include <limits.h>#include <stdbool.h>#include <string.h>#include <unistd.h>#include "mutt/lib.h"#include "address/lib.h"#include "config/lib.h"#include "email/lib.h"#include "core/lib.h"#include "alias/lib.h"#include "attach/lib.h"#include "commands/lib.h"#include "expando/lib.h"#include "index/lib.h"#include "parse/lib.h"#include "pattern/lib.h"#include "hook.h"#include "muttlib.h"#include "mx.h"#include "parse.h"
Include dependency graph for exec.c:Go to the source code of this file.
Functions | |
| void | exec_folder_hook (const char *path, const char *desc) |
| Perform a folder hook. | |
| char * | mutt_find_hook (enum CommandId id, const char *pat) |
| Find a matching hook. | |
| void | exec_message_hook (struct Mailbox *m, struct Email *e, enum CommandId id) |
| Perform a message hook. | |
| static int | addr_hook (struct Buffer *path, enum CommandId id, struct Mailbox *m, struct Email *e) |
| Perform an address hook (get a path) | |
| void | mutt_default_save (struct Buffer *path, struct Email *e) |
| Find the default save path for an email. | |
| void | mutt_select_fcc (struct Buffer *path, struct Email *e) |
| Select the FCC path for an email. | |
| static void | list_hook (struct ListHead *matches, const char *match, enum CommandId id) |
| Find hook strings matching. | |
| void | mutt_crypt_hook (struct ListHead *list, struct Address *addr) |
| Find crypto hooks for an Address. | |
| void | exec_account_hook (const char *url) |
| Perform an account hook. | |
| void | exec_timeout_hook (void) |
| Execute any timeout hooks. | |
| void | exec_startup_shutdown_hook (enum CommandId id) |
| Execute any startup/shutdown hooks. | |
| const struct Expando * | mutt_idxfmt_hook (const char *name, struct Mailbox *m, struct Email *e) |
| Get index-format-hook format string. | |
Execute user-defined Hooks.
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 exec.c.
| void exec_folder_hook | ( | const char * | path, |
| const char * | desc ) |
Perform a folder hook.
| path | Path to potentially match |
| desc | Description to potentially match |
Definition at line 64 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:| char * mutt_find_hook | ( | enum CommandId | id, |
| const char * | pat ) |
Find a matching hook.
| id | Hook CommandId, e.g CMD_FOLDER_HOOK |
| pat | Pattern to match |
| ptr | Command string |
Definition at line 114 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:Perform a message hook.
| m | Mailbox |
| e | |
| id | Hook CommandId, e.g CMD_FOLDER_HOOK |
Definition at line 135 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Perform an address hook (get a path)
| 0 | Success |
| -1 | Failure |
Definition at line 181 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:Find the default save path for an email.
Definition at line 214 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:Select the FCC path for an email.
Definition at line 252 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Find hook strings matching.
| [out] | matches | List of hook strings |
| [in] | match | String to match |
| [in] | id | Hook CommandId, e.g. CMD_FOLDER_HOOK |
Definition at line 294 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_crypt_hook | ( | struct ListHead * | list, |
| struct Address * | addr ) |
Find crypto hooks for an Address.
| [out] | list | List of keys |
| [in] | addr | Address to match |
The crypt-hook associates keys with addresses.
Definition at line 314 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void exec_account_hook | ( | const char * | url | ) |
Perform an account hook.
| url | Account URL to match |
Definition at line 323 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void exec_timeout_hook | ( | void | ) |
Execute any timeout hooks.
The user can configure hooks to be run on timeout. This function finds all the matching hooks and executes them.
Definition at line 372 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void exec_startup_shutdown_hook | ( | enum CommandId | id | ) |
Execute any startup/shutdown hooks.
| id | Hook CommandId: CMD_STARTUP_HOOK or CMD_SHUTDOWN_HOOK |
The user can configure hooks to be run on startup/shutdown. This function finds all the matching hooks and executes them.
Definition at line 410 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function:Get index-format-hook format string.
| ptr | Expando |
| NULL | No matching hook |
Definition at line 443 of file exec.c.
Here is the call graph for this function:
Here is the caller graph for this function: