aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2016-06-17 08:56:07 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2016-06-17 08:56:07 +0000
commit746b9ad1a5dec77269d6e66ecccef0d144f78ebe (patch)
tree67cc361ac88b0bd0f8e7d7e0d9eb678fb7d23205
parent6bce1bd247197a3546c47f84d5f87faa47a68924 (diff)
added new plug-in function and added plugin-types.h.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3515 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog11
-rw-r--r--src/Makefile.am3
-rw-r--r--src/main.c1
-rw-r--r--src/plugin-types.h38
-rw-r--r--src/plugin.c8
-rw-r--r--src/plugin.h3
6 files changed, 63 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 29ff1cf0..d26ce5fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2016-06-17
+ * src/main.c
+ src/plugin.[ch]
+ src/plugin-types.h: syl_plugin_get_attach_list(): added new plug-in
+ function. Extra struct types are separeted into plugin-types.h.
+
+2016-06-17
+
+ * src/compose.[ch]: compose_get_attach_list(): added.
+
+2016-06-17
+
* src/compose.c
src/mainwindow.c: emit toolbar changed signals.
diff --git a/src/Makefile.am b/src/Makefile.am
index 03d381b3..ef9d9697 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,7 +113,8 @@ libsylpheed_plugin_0_la_SOURCES = \
libsylpheed_plugin_0includedir=$(includedir)/sylpheed
libsylpheed_plugin_0include_HEADERS = \
- plugin.h
+ plugin.h \
+ plugin-types.h
if NATIVE_WIN32
no_undefined = -no-undefined
diff --git a/src/main.c b/src/main.c
index 63a90b81..77d8192a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1422,6 +1422,7 @@ static void plugin_init(void)
ADD_SYM(compose_get_textview);
ADD_SYM(compose_attach_append);
ADD_SYM(compose_attach_remove_all);
+ ADD_SYM(compose_get_attach_list);
ADD_SYM(compose_send);
ADD_SYM(foldersel_folder_sel);
diff --git a/src/plugin-types.h b/src/plugin-types.h
new file mode 100644
index 00000000..2db52ab5
--- /dev/null
+++ b/src/plugin-types.h
@@ -0,0 +1,38 @@
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2016 Hiroyuki Yamamoto
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PLUGIN_TYPES_H__
+#define __PLUGIN_TYPES_H__
+
+#include <glib.h>
+
+typedef struct _SylPluginAttachInfo SylPluginAttachInfo;
+
+#include "procmime.h"
+
+struct _SylPluginAttachInfo
+{
+ gchar *file;
+ gchar *content_type;
+ EncodingType encoding;
+ gchar *name;
+ gsize size;
+};
+
+#endif /* __PLUGIN_TYPES_H__ */
diff --git a/src/plugin.c b/src/plugin.c
index 76134752..725495b7 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -1222,6 +1222,14 @@ void syl_plugin_compose_attach_remove_all(gpointer compose)
SAFE_CALL_ARG1(func, compose);
}
+GSList *syl_plugin_get_attach_list(gpointer compose)
+{
+ GSList * (*func)(gpointer);
+
+ GETFUNC("compose_get_attach_list");
+ return SAFE_CALL_ARG1_RET(func, compose);
+}
+
FolderItem *syl_plugin_folder_sel(Folder *cur_folder, gint sel_type,
const gchar *default_folder)
diff --git a/src/plugin.h b/src/plugin.h
index 6c6857f3..b7cb230b 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -28,6 +28,7 @@
#include "procmsg.h"
#include "folder.h"
#include "filter.h"
+#include "plugin-types.h"
/* SylPlugin object */
@@ -287,6 +288,8 @@ void syl_plugin_compose_attach_append (gpointer compose,
const gchar *filename,
const gchar *content_type);
void syl_plugin_compose_attach_remove_all (gpointer compose);
+/* returns list of SylPluginAttachInfo (GSList must be freed by caller) */
+GSList *syl_plugin_get_attach_list (gpointer compose);
/* Others */
FolderItem *syl_plugin_folder_sel (Folder *cur_folder,