diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-10-21 09:06:20 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-10-21 09:06:20 +0000 |
commit | cf23d90b5dea8f6c4372e0a7f79e0dea5893c160 (patch) | |
tree | 8697db6ca5a947b7ee0ba62456251a305e398f4b /src | |
parent | e89d21dd41fd5bab43cd3d70b735428d3050405e (diff) |
added new plug-in functions for sending messages.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2690 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/plugin.c | 35 | ||||
-rw-r--r-- | src/plugin.h | 11 |
3 files changed, 51 insertions, 0 deletions
@@ -1232,6 +1232,11 @@ static void plugin_init(void) ADD_SYM(alertpanel_message); ADD_SYM(alertpanel_message_with_disable); + ADD_SYM(send_message); + ADD_SYM(send_message_queue_all); + ADD_SYM(send_message_set_reply_flag); + ADD_SYM(send_message_set_forward_flags); + syl_plugin_signal_connect("plugin-load", G_CALLBACK(load_cb), NULL); /* loading plug-ins from user plug-in directory */ diff --git a/src/plugin.c b/src/plugin.c index 2c6b1a2d..baead872 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -1142,3 +1142,38 @@ gint syl_plugin_alertpanel_message_with_disable(const gchar *title, GETFUNC("alertpanel_message_with_disable"); return SAFE_CALL_ARG3_RET_VAL(func, title, message, type, 0); } + +gint syl_plugin_send_message(const gchar *file, PrefsAccount *ac, + GSList *to_list) +{ + gint (*func)(const gchar *, PrefsAccount *, GSList *); + + GETFUNC("send_message"); + return SAFE_CALL_ARG3_RET_VAL(func, file, ac, to_list, -1); +} + +gint syl_plugin_send_message_queue_all(FolderItem *queue, gboolean save_msgs, + gboolean filter_msgs) +{ + gint (*func)(FolderItem *, gboolean, gboolean); + + GETFUNC("send_message_queue_all"); + return SAFE_CALL_ARG3_RET_VAL(func, queue, save_msgs, filter_msgs, -1); +} + +gint syl_plugin_send_message_set_reply_flag(const gchar *reply_target, + const gchar *msgid) +{ + gint (*func)(const gchar *, const gchar *); + + GETFUNC("send_message_set_reply_flag"); + return SAFE_CALL_ARG2_RET_VAL(func, reply_target, msgid, -1); +} + +gint syl_plugin_send_message_set_forward_flags(const gchar *forward_targets) +{ + gint (*func)(const gchar *); + + GETFUNC("send_message_set_forward_flags"); + return SAFE_CALL_ARG1_RET_VAL(func, forward_targets, -1); +} diff --git a/src/plugin.h b/src/plugin.h index 23bbb485..4d0ea5df 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -271,4 +271,15 @@ gint syl_plugin_alertpanel_message_with_disable (const gchar *title, const gchar *message, gint type); +/* Send message */ +gint syl_plugin_send_message (const gchar *file, + PrefsAccount *ac, + GSList *to_list); +gint syl_plugin_send_message_queue_all (FolderItem *queue, + gboolean save_msgs, + gboolean filter_msgs); +gint syl_plugin_send_message_set_reply_flag (const gchar *reply_target, + const gchar *msgid); +gint syl_plugin__send_message_set_forward_flags (const gchar *forward_targets); + #endif /* __PLUGIN_H__ */ |