Revision 2164
| libsylph/mh.c (revision 2164) | ||
|---|---|---|
| 38 | 38 |
|
| 39 | 39 |
#undef MEASURE_TIME |
| 40 | 40 |
|
| 41 |
#include "sylmain.h" |
|
| 41 | 42 |
#include "folder.h" |
| 42 | 43 |
#include "mh.h" |
| 43 | 44 |
#include "procmsg.h" |
| ... | ... | |
| 468 | 469 |
} |
| 469 | 470 |
} |
| 470 | 471 |
|
| 472 |
g_signal_emit_by_name(syl_app_get(), "add-msg", dest, destfile, dest->last_num + 1); |
|
| 473 |
|
|
| 471 | 474 |
g_free(destfile); |
| 472 | 475 |
dest->last_num++; |
| 473 | 476 |
dest->total++; |
| ... | ... | |
| 551 | 554 |
if (!destfile) break; |
| 552 | 555 |
srcfile = procmsg_get_message_file(msginfo); |
| 553 | 556 |
|
| 557 |
g_signal_emit_by_name(syl_app_get(), "remove-msg", src, srcfile, msginfo->msgnum); |
|
| 558 |
|
|
| 554 | 559 |
if (move_file(srcfile, destfile, FALSE) < 0) {
|
| 555 | 560 |
g_free(srcfile); |
| 556 | 561 |
g_free(destfile); |
| 557 | 562 |
break; |
| 558 | 563 |
} |
| 559 | 564 |
|
| 565 |
g_signal_emit_by_name(syl_app_get(), "add-msg", dest, destfile, dest->last_num + 1); |
|
| 566 |
|
|
| 560 | 567 |
g_free(srcfile); |
| 561 | 568 |
g_free(destfile); |
| 562 | 569 |
src->total--; |
| ... | ... | |
| 679 | 686 |
break; |
| 680 | 687 |
} |
| 681 | 688 |
|
| 689 |
g_signal_emit_by_name(syl_app_get(), "add-msg", dest, destfile, dest->last_num + 1); |
|
| 690 |
|
|
| 682 | 691 |
g_free(srcfile); |
| 683 | 692 |
g_free(destfile); |
| 684 | 693 |
dest->last_num++; |
| ... | ... | |
| 711 | 720 |
file = mh_fetch_msg(folder, item, msginfo->msgnum); |
| 712 | 721 |
g_return_val_if_fail(file != NULL, -1); |
| 713 | 722 |
|
| 723 |
g_signal_emit_by_name(syl_app_get(), "remove-msg", item, file, msginfo->msgnum); |
|
| 724 |
|
|
| 714 | 725 |
if (g_unlink(file) < 0) {
|
| 715 | 726 |
FILE_OP_ERROR(file, "unlink"); |
| 716 | 727 |
g_free(file); |
| ... | ... | |
| 742 | 753 |
|
| 743 | 754 |
path = folder_item_get_path(item); |
| 744 | 755 |
g_return_val_if_fail(path != NULL, -1); |
| 756 |
g_signal_emit_by_name(syl_app_get(), "remove-all-msg", item); |
|
| 745 | 757 |
val = remove_all_numbered_files(path); |
| 746 | 758 |
g_free(path); |
| 747 | 759 |
if (val == 0) {
|
| ... | ... | |
| 1088 | 1100 |
gchar *name_; |
| 1089 | 1101 |
gchar *utf8_name; |
| 1090 | 1102 |
gchar *paths[2]; |
| 1103 |
gchar *old_id, *new_id; |
|
| 1091 | 1104 |
|
| 1092 | 1105 |
g_return_val_if_fail(folder != NULL, -1); |
| 1093 | 1106 |
g_return_val_if_fail(item != NULL, -1); |
| ... | ... | |
| 1163 | 1176 |
g_free(oldpath); |
| 1164 | 1177 |
g_free(newpath); |
| 1165 | 1178 |
|
| 1179 |
old_id = folder_item_get_identifier(item); |
|
| 1180 |
|
|
| 1166 | 1181 |
if (new_parent) {
|
| 1167 | 1182 |
g_node_unlink(item->node); |
| 1168 | 1183 |
g_node_append(new_parent->node, item->node); |
| ... | ... | |
| 1196 | 1211 |
g_free(paths[0]); |
| 1197 | 1212 |
g_free(paths[1]); |
| 1198 | 1213 |
|
| 1214 |
new_id = folder_item_get_identifier(item); |
|
| 1215 |
g_signal_emit_by_name(syl_app_get(), "move-folder", item, old_id, |
|
| 1216 |
new_id); |
|
| 1217 |
g_free(new_id); |
|
| 1218 |
g_free(old_id); |
|
| 1219 |
|
|
| 1199 | 1220 |
return 0; |
| 1200 | 1221 |
} |
| 1201 | 1222 |
|
| ... | ... | |
| 1227 | 1248 |
} |
| 1228 | 1249 |
|
| 1229 | 1250 |
g_free(path); |
| 1251 |
g_signal_emit_by_name(syl_app_get(), "remove-folder", item); |
|
| 1230 | 1252 |
folder_item_remove(item); |
| 1231 | 1253 |
return 0; |
| 1232 | 1254 |
} |
| libsylph/procmsg.c (revision 2164) | ||
|---|---|---|
| 790 | 790 |
{
|
| 791 | 791 |
FILE *fp; |
| 792 | 792 |
|
| 793 |
if ((fp = procmsg_open_mark_file(item, DATA_WRITE)) == NULL) |
|
| 793 |
if ((fp = procmsg_open_mark_file(item, DATA_WRITE)) == NULL) {
|
|
| 794 |
g_warning("procmsg_write_mark_file: cannot open mark file.");
|
|
| 794 | 795 |
return; |
| 796 |
} |
|
| 795 | 797 |
g_hash_table_foreach(mark_table, write_mark_func, fp); |
| 796 | 798 |
fclose(fp); |
| 797 | 799 |
} |
| ... | ... | |
| 809 | 811 |
if (errno == EACCES) {
|
| 810 | 812 |
change_file_mode_rw(NULL, file); |
| 811 | 813 |
if ((fp = g_fopen(file, "wb")) == NULL) {
|
| 812 |
FILE_OP_ERROR(file, "fopen"); |
|
| 814 |
FILE_OP_ERROR(file, "procmsg_open_data_file: fopen");
|
|
| 813 | 815 |
return NULL; |
| 814 | 816 |
} |
| 815 | 817 |
} else {
|
| 816 |
FILE_OP_ERROR(file, "fopen"); |
|
| 818 |
FILE_OP_ERROR(file, "procmsg_open_data_file: fopen");
|
|
| 817 | 819 |
return NULL; |
| 818 | 820 |
} |
| 819 | 821 |
} |
| ... | ... | |
| 829 | 831 |
if (errno == EACCES) {
|
| 830 | 832 |
change_file_mode_rw(NULL, file); |
| 831 | 833 |
if ((fp = g_fopen(file, "rb")) == NULL) {
|
| 832 |
FILE_OP_ERROR(file, "fopen"); |
|
| 834 |
FILE_OP_ERROR(file, "procmsg_open_data_file: fopen");
|
|
| 833 | 835 |
} |
| 834 | 836 |
} else {
|
| 835 | 837 |
debug_print("Mark/Cache file '%s' not found\n", file);
|
| ... | ... | |
| 839 | 841 |
if (fp) {
|
| 840 | 842 |
if (buf && buf_size > 0) |
| 841 | 843 |
setvbuf(fp, buf, _IOFBF, buf_size); |
| 842 |
if (fread(&data_ver, sizeof(data_ver), 1, fp) != 1 || |
|
| 843 |
version != data_ver) {
|
|
| 844 |
if (fread(&data_ver, sizeof(data_ver), 1, fp) != 1) {
|
|
| 845 |
g_warning("%s: cannot read mark/cache file (truncated?)\n", file);
|
|
| 846 |
fclose(fp); |
|
| 847 |
fp = NULL; |
|
| 848 |
} else if (version != data_ver) {
|
|
| 844 | 849 |
g_message("%s: Mark/Cache version is different (%u != %u). Discarding it.\n",
|
| 845 | 850 |
file, data_ver, version); |
| 846 | 851 |
fclose(fp); |
| ... | ... | |
| 858 | 863 |
if (errno == EACCES) {
|
| 859 | 864 |
change_file_mode_rw(NULL, file); |
| 860 | 865 |
if ((fp = g_fopen(file, "ab")) == NULL) {
|
| 861 |
FILE_OP_ERROR(file, "fopen"); |
|
| 866 |
FILE_OP_ERROR(file, "procmsg_open_data_file: fopen");
|
|
| 862 | 867 |
} |
| 863 | 868 |
} else {
|
| 864 |
FILE_OP_ERROR(file, "fopen"); |
|
| 869 |
FILE_OP_ERROR(file, "procmsg_open_data_file: fopen");
|
|
| 865 | 870 |
} |
| 866 | 871 |
} |
| 867 | 872 |
} else {
|
| ... | ... | |
| 1196 | 1201 |
} |
| 1197 | 1202 |
|
| 1198 | 1203 |
if ((fp = g_fopen(file, "rb")) == NULL) {
|
| 1199 |
FILE_OP_ERROR(file, "fopen"); |
|
| 1204 |
FILE_OP_ERROR(file, "procmsg_open_message: fopen");
|
|
| 1200 | 1205 |
g_free(file); |
| 1201 | 1206 |
return NULL; |
| 1202 | 1207 |
} |
| ... | ... | |
| 1413 | 1418 |
print_id++); |
| 1414 | 1419 |
|
| 1415 | 1420 |
if ((prfp = g_fopen(prtmp, "wb")) == NULL) {
|
| 1416 |
FILE_OP_ERROR(prtmp, "fopen"); |
|
| 1421 |
FILE_OP_ERROR(prtmp, "procmsg_print_message: fopen");
|
|
| 1417 | 1422 |
g_free(prtmp); |
| 1418 | 1423 |
fclose(tmpfp); |
| 1419 | 1424 |
return; |
| ... | ... | |
| 1506 | 1511 |
get_mime_tmp_dir(), G_DIR_SEPARATOR, |
| 1507 | 1512 |
print_id++); |
| 1508 | 1513 |
if ((prfp = g_fopen(prtmp, "wb")) == NULL) {
|
| 1509 |
FILE_OP_ERROR(prtmp, "fopen"); |
|
| 1514 |
FILE_OP_ERROR(prtmp, "procmsg_print_message_part: fopen");
|
|
| 1510 | 1515 |
g_free(prtmp); |
| 1511 | 1516 |
fclose(tmpfp); |
| 1512 | 1517 |
return; |
| libsylph/procheader.c (revision 2164) | ||
|---|---|---|
| 214 | 214 |
GSList *hlist; |
| 215 | 215 |
|
| 216 | 216 |
if ((fp = g_fopen(file, "rb")) == NULL) {
|
| 217 |
FILE_OP_ERROR(file, "fopen"); |
|
| 217 |
FILE_OP_ERROR(file, "procheader_get_header_list_from_file: fopen");
|
|
| 218 | 218 |
return NULL; |
| 219 | 219 |
} |
| 220 | 220 |
|
| ... | ... | |
| 531 | 531 |
return NULL; |
| 532 | 532 |
|
| 533 | 533 |
if ((fp = g_fopen(file, "rb")) == NULL) {
|
| 534 |
FILE_OP_ERROR(file, "fopen"); |
|
| 534 |
FILE_OP_ERROR(file, "procheader_parse_file: fopen");
|
|
| 535 | 535 |
return NULL; |
| 536 | 536 |
} |
| 537 | 537 |
|
| libsylph/folder.c (revision 2164) | ||
|---|---|---|
| 41 | 41 |
#include "prefs.h" |
| 42 | 42 |
#include "account.h" |
| 43 | 43 |
#include "prefs_account.h" |
| 44 |
#include "sylmain.h" |
|
| 44 | 45 |
|
| 45 | 46 |
static GList *folder_list = NULL; |
| 46 | 47 |
|
| ... | ... | |
| 472 | 473 |
|
| 473 | 474 |
if (prefs_file_close(pfile) < 0) |
| 474 | 475 |
g_warning("failed to write folder list.\n");
|
| 476 |
|
|
| 477 |
g_signal_emit_by_name(syl_app_get(), "folderlist-updated"); |
|
| 475 | 478 |
} |
| 476 | 479 |
|
| 477 | 480 |
struct TotalMsgStatus |
| libsylph/sylmain.c (revision 2164) | ||
|---|---|---|
| 1 |
/* |
|
| 2 |
* LibSylph -- E-Mail client library |
|
| 3 |
* Copyright (C) 1999-2009 Hiroyuki Yamamoto |
|
| 4 |
* |
|
| 5 |
* This library is free software; you can redistribute it and/or |
|
| 6 |
* modify it under the terms of the GNU Lesser General Public |
|
| 7 |
* License as published by the Free Software Foundation; either |
|
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
|
| 9 |
* |
|
| 10 |
* This library is distributed in the hope that it will be useful, |
|
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 13 |
* Lesser General Public License for more details. |
|
| 14 |
* |
|
| 15 |
* You should have received a copy of the GNU Lesser General Public |
|
| 16 |
* License along with this library; if not, write to the Free Software |
|
| 17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 18 |
*/ |
|
| 19 |
|
|
| 20 |
#ifdef HAVE_CONFIG_H |
|
| 21 |
# include "config.h" |
|
| 22 |
#endif |
|
| 23 |
|
|
| 24 |
#include "defs.h" |
|
| 25 |
|
|
| 26 |
#include <glib.h> |
|
| 27 |
#include <glib/gi18n.h> |
|
| 28 |
|
|
| 29 |
#ifdef G_OS_UNIX |
|
| 30 |
# include <signal.h> |
|
| 31 |
#endif |
|
| 32 |
|
|
| 33 |
#if HAVE_LOCALE_H |
|
| 34 |
# include <locale.h> |
|
| 35 |
#endif |
|
| 36 |
|
|
| 37 |
#include "sylmain.h" |
|
| 38 |
#include "syl-marshal.h" |
|
| 39 |
#include "prefs_common.h" |
|
| 40 |
#include "account.h" |
|
| 41 |
#include "filter.h" |
|
| 42 |
#include "folder.h" |
|
| 43 |
#include "socket.h" |
|
| 44 |
#include "codeconv.h" |
|
| 45 |
#include "utils.h" |
|
| 46 |
|
|
| 47 |
#if USE_SSL |
|
| 48 |
# include "ssl.h" |
|
| 49 |
#endif |
|
| 50 |
|
|
| 51 |
#ifndef PACKAGE |
|
| 52 |
# define PACKAGE GETTEXT_PACKAGE |
|
| 53 |
#endif |
|
| 54 |
|
|
| 55 |
G_DEFINE_TYPE(SylApp, syl_app, G_TYPE_OBJECT); |
|
| 56 |
|
|
| 57 |
enum {
|
|
| 58 |
INIT_DONE, |
|
| 59 |
APP_EXIT, |
|
| 60 |
ADD_MSG, |
|
| 61 |
REMOVE_MSG, |
|
| 62 |
REMOVE_ALL_MSG, |
|
| 63 |
REMOVE_FOLDER, |
|
| 64 |
MOVE_FOLDER, |
|
| 65 |
FOLDERLIST_UPDATED, |
|
| 66 |
LAST_SIGNAL |
|
| 67 |
}; |
|
| 68 |
|
|
| 69 |
static guint app_signals[LAST_SIGNAL] = { 0 };
|
|
| 70 |
|
|
| 71 |
static GObject *app = NULL; |
|
| 72 |
|
|
| 73 |
|
|
| 74 |
static void syl_app_init(SylApp *self) |
|
| 75 |
{
|
|
| 76 |
} |
|
| 77 |
|
|
| 78 |
static void syl_app_class_init(SylAppClass *klass) |
|
| 79 |
{
|
|
| 80 |
GObjectClass *gobject_class = G_OBJECT_CLASS(klass); |
|
| 81 |
|
|
| 82 |
app_signals[INIT_DONE] = |
|
| 83 |
g_signal_new("init-done",
|
|
| 84 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 85 |
G_SIGNAL_RUN_FIRST, |
|
| 86 |
0, |
|
| 87 |
NULL, NULL, |
|
| 88 |
syl_marshal_VOID__VOID, |
|
| 89 |
G_TYPE_NONE, |
|
| 90 |
0); |
|
| 91 |
app_signals[APP_EXIT] = |
|
| 92 |
g_signal_new("app-exit",
|
|
| 93 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 94 |
G_SIGNAL_RUN_FIRST, |
|
| 95 |
0, |
|
| 96 |
NULL, NULL, |
|
| 97 |
syl_marshal_VOID__VOID, |
|
| 98 |
G_TYPE_NONE, |
|
| 99 |
0); |
|
| 100 |
app_signals[ADD_MSG] = |
|
| 101 |
g_signal_new("add-msg",
|
|
| 102 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 103 |
G_SIGNAL_RUN_FIRST, |
|
| 104 |
0, |
|
| 105 |
NULL, NULL, |
|
| 106 |
syl_marshal_VOID__POINTER_STRING_UINT, |
|
| 107 |
G_TYPE_NONE, |
|
| 108 |
3, |
|
| 109 |
G_TYPE_POINTER, |
|
| 110 |
G_TYPE_STRING, |
|
| 111 |
G_TYPE_UINT); |
|
| 112 |
app_signals[REMOVE_MSG] = |
|
| 113 |
g_signal_new("remove-msg",
|
|
| 114 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 115 |
G_SIGNAL_RUN_FIRST, |
|
| 116 |
0, |
|
| 117 |
NULL, NULL, |
|
| 118 |
syl_marshal_VOID__POINTER_STRING_UINT, |
|
| 119 |
G_TYPE_NONE, |
|
| 120 |
3, |
|
| 121 |
G_TYPE_POINTER, |
|
| 122 |
G_TYPE_STRING, |
|
| 123 |
G_TYPE_UINT); |
|
| 124 |
app_signals[REMOVE_ALL_MSG] = |
|
| 125 |
g_signal_new("remove-all-msg",
|
|
| 126 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 127 |
G_SIGNAL_RUN_FIRST, |
|
| 128 |
0, |
|
| 129 |
NULL, NULL, |
|
| 130 |
syl_marshal_VOID__POINTER, |
|
| 131 |
G_TYPE_NONE, |
|
| 132 |
1, |
|
| 133 |
G_TYPE_POINTER); |
|
| 134 |
app_signals[REMOVE_FOLDER] = |
|
| 135 |
g_signal_new("remove-folder",
|
|
| 136 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 137 |
G_SIGNAL_RUN_FIRST, |
|
| 138 |
0, |
|
| 139 |
NULL, NULL, |
|
| 140 |
syl_marshal_VOID__POINTER, |
|
| 141 |
G_TYPE_NONE, |
|
| 142 |
1, |
|
| 143 |
G_TYPE_POINTER); |
|
| 144 |
app_signals[MOVE_FOLDER] = |
|
| 145 |
g_signal_new("move-folder",
|
|
| 146 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 147 |
G_SIGNAL_RUN_FIRST, |
|
| 148 |
0, |
|
| 149 |
NULL, NULL, |
|
| 150 |
syl_marshal_VOID__POINTER_STRING_STRING, |
|
| 151 |
G_TYPE_NONE, |
|
| 152 |
3, |
|
| 153 |
G_TYPE_POINTER, |
|
| 154 |
G_TYPE_STRING, |
|
| 155 |
G_TYPE_STRING); |
|
| 156 |
app_signals[FOLDERLIST_UPDATED] = |
|
| 157 |
g_signal_new("folderlist-updated",
|
|
| 158 |
G_TYPE_FROM_CLASS(gobject_class), |
|
| 159 |
G_SIGNAL_RUN_FIRST, |
|
| 160 |
0, |
|
| 161 |
NULL, NULL, |
|
| 162 |
syl_marshal_VOID__VOID, |
|
| 163 |
G_TYPE_NONE, |
|
| 164 |
0); |
|
| 165 |
} |
|
| 166 |
|
|
| 167 |
GObject *syl_app_create(void) |
|
| 168 |
{
|
|
| 169 |
if (!app) |
|
| 170 |
app = g_object_new(SYL_TYPE_APP, NULL); |
|
| 171 |
return app; |
|
| 172 |
} |
|
| 173 |
|
|
| 174 |
GObject *syl_app_get(void) |
|
| 175 |
{
|
|
| 176 |
return app; |
|
| 177 |
} |
|
| 178 |
|
|
| 179 |
void syl_init(void) |
|
| 180 |
{
|
|
| 181 |
#ifdef G_OS_WIN32 |
|
| 182 |
gchar *newpath; |
|
| 183 |
const gchar *lang_env; |
|
| 184 |
|
|
| 185 |
/* disable locale variable such as "LANG=1041" */ |
|
| 186 |
|
|
| 187 |
#define DISABLE_DIGIT_LOCALE(envstr) \ |
|
| 188 |
{ \
|
|
| 189 |
lang_env = g_getenv(envstr); \ |
|
| 190 |
if (lang_env && g_ascii_isdigit(lang_env[0])) \ |
|
| 191 |
g_unsetenv(envstr); \ |
|
| 192 |
} |
|
| 193 |
|
|
| 194 |
DISABLE_DIGIT_LOCALE("LC_ALL");
|
|
| 195 |
DISABLE_DIGIT_LOCALE("LANG");
|
|
| 196 |
DISABLE_DIGIT_LOCALE("LC_CTYPE");
|
|
| 197 |
DISABLE_DIGIT_LOCALE("LC_MESSAGES");
|
|
| 198 |
|
|
| 199 |
#undef DISABLE_DIGIT_LOCALE |
|
| 200 |
|
|
| 201 |
g_unsetenv("LANGUAGE");
|
|
| 202 |
#endif /* G_OS_WIN32 */ |
|
| 203 |
|
|
| 204 |
#ifdef HAVE_LOCALE_H |
|
| 205 |
setlocale(LC_ALL, ""); |
|
| 206 |
#endif |
|
| 207 |
|
|
| 208 |
set_startup_dir(); |
|
| 209 |
|
|
| 210 |
#ifdef G_OS_WIN32 |
|
| 211 |
/* include startup directory into %PATH% for GSpawn */ |
|
| 212 |
newpath = g_strconcat(get_startup_dir(), ";", g_getenv("PATH"), NULL);
|
|
| 213 |
g_setenv("PATH", newpath, TRUE);
|
|
| 214 |
g_free(newpath); |
|
| 215 |
#endif |
|
| 216 |
|
|
| 217 |
#ifdef ENABLE_NLS |
|
| 218 |
syl_init_gettext(PACKAGE, LOCALEDIR); |
|
| 219 |
textdomain(PACKAGE); |
|
| 220 |
#endif |
|
| 221 |
|
|
| 222 |
sock_init(); |
|
| 223 |
#if USE_SSL |
|
| 224 |
ssl_init(); |
|
| 225 |
#endif |
|
| 226 |
|
|
| 227 |
#ifdef G_OS_UNIX |
|
| 228 |
/* ignore SIGPIPE signal for preventing sudden death of program */ |
|
| 229 |
signal(SIGPIPE, SIG_IGN); |
|
| 230 |
#endif |
|
| 231 |
} |
|
| 232 |
|
|
| 233 |
#define MAKE_DIR_IF_NOT_EXIST(dir) \ |
|
| 234 |
{ \
|
|
| 235 |
if (!is_dir_exist(dir)) { \
|
|
| 236 |
if (is_file_exist(dir)) { \
|
|
| 237 |
g_warning("File '%s' already exists. " \
|
|
| 238 |
"Can't create folder.", dir); \ |
|
| 239 |
return -1; \ |
|
| 240 |
} \ |
|
| 241 |
if (make_dir(dir) < 0) \ |
|
| 242 |
return -1; \ |
|
| 243 |
} \ |
|
| 244 |
} |
|
| 245 |
|
|
| 246 |
void syl_init_gettext(const gchar *package, const gchar *dirname) |
|
| 247 |
{
|
|
| 248 |
#ifdef ENABLE_NLS |
|
| 249 |
if (g_path_is_absolute(dirname)) |
|
| 250 |
bindtextdomain(package, dirname); |
|
| 251 |
else {
|
|
| 252 |
gchar *locale_dir; |
|
| 253 |
|
|
| 254 |
locale_dir = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, |
|
| 255 |
dirname, NULL); |
|
| 256 |
#ifdef G_OS_WIN32 |
|
| 257 |
{
|
|
| 258 |
gchar *locale_dir_; |
|
| 259 |
|
|
| 260 |
locale_dir_ = g_locale_from_utf8(locale_dir, -1, |
|
| 261 |
NULL, NULL, NULL); |
|
| 262 |
if (locale_dir_) {
|
|
| 263 |
g_free(locale_dir); |
|
| 264 |
locale_dir = locale_dir_; |
|
| 265 |
} |
|
| 266 |
} |
|
| 267 |
#endif /* G_OS_WIN32 */ |
|
| 268 |
bindtextdomain(package, locale_dir); |
|
| 269 |
g_free(locale_dir); |
|
| 270 |
} |
|
| 271 |
|
|
| 272 |
bind_textdomain_codeset(package, CS_UTF_8); |
|
| 273 |
#endif /* ENABLE_NLS */ |
|
| 274 |
} |
|
| 275 |
|
|
| 276 |
gint syl_setup_rc_dir(void) |
|
| 277 |
{
|
|
| 278 |
if (!is_dir_exist(get_rc_dir())) {
|
|
| 279 |
if (make_dir_hier(get_rc_dir()) < 0) |
|
| 280 |
return -1; |
|
| 281 |
} |
|
| 282 |
|
|
| 283 |
MAKE_DIR_IF_NOT_EXIST(get_mail_base_dir()); |
|
| 284 |
|
|
| 285 |
CHDIR_RETURN_VAL_IF_FAIL(get_rc_dir(), -1); |
|
| 286 |
|
|
| 287 |
MAKE_DIR_IF_NOT_EXIST(get_imap_cache_dir()); |
|
| 288 |
MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir()); |
|
| 289 |
MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir()); |
|
| 290 |
MAKE_DIR_IF_NOT_EXIST(get_tmp_dir()); |
|
| 291 |
MAKE_DIR_IF_NOT_EXIST(UIDL_DIR); |
|
| 292 |
|
|
| 293 |
/* remove temporary files */ |
|
| 294 |
remove_all_files(get_tmp_dir()); |
|
| 295 |
remove_all_files(get_mime_tmp_dir()); |
|
| 296 |
|
|
| 297 |
return 0; |
|
| 298 |
} |
|
| 299 |
|
|
| 300 |
void syl_save_all_state(void) |
|
| 301 |
{
|
|
| 302 |
folder_write_list(); |
|
| 303 |
prefs_common_write_config(); |
|
| 304 |
filter_write_config(); |
|
| 305 |
account_write_config_all(); |
|
| 306 |
} |
|
| 307 |
|
|
| 308 |
void syl_cleanup(void) |
|
| 309 |
{
|
|
| 310 |
/* remove temporary files */ |
|
| 311 |
remove_all_files(get_tmp_dir()); |
|
| 312 |
remove_all_files(get_mime_tmp_dir()); |
|
| 313 |
#if GLIB_CHECK_VERSION(2, 6, 0) |
|
| 314 |
g_log_set_default_handler(g_log_default_handler, NULL); |
|
| 315 |
#endif |
|
| 316 |
close_log_file(); |
|
| 317 |
|
|
| 318 |
#if USE_SSL |
|
| 319 |
ssl_done(); |
|
| 320 |
#endif |
|
| 321 |
sock_cleanup(); |
|
| 322 |
|
|
| 323 |
if (app) {
|
|
| 324 |
g_object_unref(app); |
|
| 325 |
app = NULL; |
|
| 326 |
} |
|
| 327 |
} |
|
| libsylph/sylmain.h (revision 2164) | ||
|---|---|---|
| 1 |
/* |
|
| 2 |
* LibSylph -- E-Mail client library |
|
| 3 |
* Copyright (C) 1999-2009 Hiroyuki Yamamoto |
|
| 4 |
* |
|
| 5 |
* This library is free software; you can redistribute it and/or |
|
| 6 |
* modify it under the terms of the GNU Lesser General Public |
|
| 7 |
* License as published by the Free Software Foundation; either |
|
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
|
| 9 |
* |
|
| 10 |
* This library is distributed in the hope that it will be useful, |
|
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 13 |
* Lesser General Public License for more details. |
|
| 14 |
* |
|
| 15 |
* You should have received a copy of the GNU Lesser General Public |
|
| 16 |
* License along with this library; if not, write to the Free Software |
|
| 17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 18 |
*/ |
|
| 19 |
|
|
| 20 |
#ifndef __SYLMAIN_H__ |
|
| 21 |
#define __SYLMAIN_H__ |
|
| 22 |
|
|
| 23 |
#include <glib.h> |
|
| 24 |
#include <glib-object.h> |
|
| 25 |
|
|
| 26 |
/* SylApp object */ |
|
| 27 |
|
|
| 28 |
#define SYL_TYPE_APP (syl_app_get_type()) |
|
| 29 |
#define SYL_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SYL_TYPE_APP, SylApp)) |
|
| 30 |
#define SYL_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SYL_TYPE_APP)) |
|
| 31 |
#define SYL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SYL_TYPE_APP, SylAppClass)) |
|
| 32 |
#define SYL_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SYL_TYPE_APP)) |
|
| 33 |
#define SYL_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SYL_TYPE_APP, SylAppClass)) |
|
| 34 |
|
|
| 35 |
typedef struct _SylApp SylApp; |
|
| 36 |
typedef struct _SylAppClass SylAppClass; |
|
| 37 |
|
|
| 38 |
struct _SylApp |
|
| 39 |
{
|
|
| 40 |
GObject parent_instance; |
|
| 41 |
}; |
|
| 42 |
|
|
| 43 |
struct _SylAppClass |
|
| 44 |
{
|
|
| 45 |
GObjectClass parent_class; |
|
| 46 |
}; |
|
| 47 |
|
|
| 48 |
GObject *syl_app_create (void); |
|
| 49 |
GObject *syl_app_get (void); |
|
| 50 |
|
|
| 51 |
void syl_init (void); |
|
| 52 |
void syl_init_gettext (const gchar *package, const gchar *dirname); |
|
| 53 |
gint syl_setup_rc_dir (void); |
|
| 54 |
void syl_save_all_state (void); |
|
| 55 |
void syl_cleanup (void); |
|
| 56 |
|
|
| 57 |
#endif /* __SYLMAIN_H__ */ |
|
| libsylph/prefs_common.c (revision 2164) | ||
|---|---|---|
| 1 | 1 |
/* |
| 2 | 2 |
* LibSylph -- E-Mail client library |
| 3 |
* Copyright (C) 1999-2008 Hiroyuki Yamamoto
|
|
| 3 |
* Copyright (C) 1999-2009 Hiroyuki Yamamoto
|
|
| 4 | 4 |
* |
| 5 | 5 |
* This library is free software; you can redistribute it and/or |
| 6 | 6 |
* modify it under the terms of the GNU Lesser General Public |
| ... | ... | |
| 462 | 462 |
{"ext_sendmail_cmd", DEFAULT_SENDMAIL_CMD, &prefs_common.extsend_cmd,
|
| 463 | 463 |
P_STRING}, |
| 464 | 464 |
|
| 465 |
/* Update check */ |
|
| 466 |
{"auto_update_check", "TRUE", &prefs_common.auto_update_check, P_BOOL},
|
|
| 467 |
{"use_http_proxy", "FALSE", &prefs_common.use_http_proxy, P_BOOL},
|
|
| 468 |
{"http_proxy_host", NULL, &prefs_common.http_proxy_host, P_STRING},
|
|
| 469 |
|
|
| 465 | 470 |
/* Advanced */ |
| 466 | 471 |
{"strict_cache_check", "FALSE", &prefs_common.strict_cache_check,
|
| 467 | 472 |
P_BOOL}, |
| libsylph/prefs_common.h (revision 2164) | ||
|---|---|---|
| 1 | 1 |
/* |
| 2 | 2 |
* LibSylph -- E-Mail client library |
| 3 |
* Copyright (C) 1999-2008 Hiroyuki Yamamoto
|
|
| 3 |
* Copyright (C) 1999-2009 Hiroyuki Yamamoto
|
|
| 4 | 4 |
* |
| 5 | 5 |
* This library is free software; you can redistribute it and/or |
| 6 | 6 |
* modify it under the terms of the GNU Lesser General Public |
| ... | ... | |
| 289 | 289 |
gboolean use_extsend; |
| 290 | 290 |
gchar *extsend_cmd; |
| 291 | 291 |
|
| 292 |
/* Update check */ |
|
| 293 |
gboolean auto_update_check; |
|
| 294 |
gboolean use_http_proxy; |
|
| 295 |
gchar *http_proxy_host; |
|
| 296 |
|
|
| 292 | 297 |
/* Advanced */ |
| 293 | 298 |
gboolean strict_cache_check; |
| 294 | 299 |
gint io_timeout_secs; |
| libsylph/libsylph-0.def (revision 2164) | ||
|---|---|---|
| 1 |
; c:\MinGW\bin\dlltool.exe -z libsylph-0.def --export-all-symbols --exclude-symbols _s_tempnam .libs/account.o .libs/base64.o .libs/codeconv.o .libs/customheader.o .libs/displayheader.o .libs/filter.o .libs/folder.o .libs/html.o .libs/imap.o .libs/mbox.o .libs/md5.o .libs/md5_hmac.o .libs/mh.o .libs/news.o .libs/nntp.o .libs/pop.o .libs/prefs.o .libs/prefs_account.o .libs/prefs_common.o .libs/procheader.o .libs/procmime.o .libs/procmsg.o .libs/quoted-printable.o .libs/recv.o .libs/session.o .libs/smtp.o .libs/socket.o .libs/ssl.o .libs/stringtable.o .libs/syl-marshal.o .libs/sylmain.o .libs/unmime.o .libs/utils.o .libs/uuencode.o .libs/virtual.o .libs/xml.o |
|
| 2 |
EXPORTS |
|
| 3 |
account_address_exist @ 1 |
|
| 4 |
account_append @ 2 |
|
| 5 |
account_destroy @ 3 |
|
| 6 |
account_find_from_address @ 4 |
|
| 7 |
account_find_from_id @ 5 |
|
| 8 |
account_find_from_item @ 6 |
|
| 9 |
account_find_from_item_property @ 7 |
|
| 10 |
account_find_from_message_file @ 8 |
|
| 11 |
account_find_from_msginfo @ 9 |
|
| 12 |
account_find_from_smtp_server @ 10 |
|
| 13 |
account_foreach @ 11 |
|
| 14 |
account_get_current_account @ 12 |
|
| 15 |
account_get_default @ 13 |
|
| 16 |
account_get_list @ 14 |
|
| 17 |
account_get_special_folder @ 15 |
|
| 18 |
account_list_free @ 16 |
|
| 19 |
account_read_config_all @ 17 |
|
| 20 |
account_set_as_default @ 18 |
|
| 21 |
account_updated @ 19 |
|
| 22 |
account_write_config_all @ 20 |
|
| 23 |
add_history @ 21 |
|
| 24 |
address_equal @ 22 |
|
| 25 |
address_list_append @ 23 |
|
| 26 |
address_list_append_orig @ 24 |
|
| 27 |
address_table @ 25 DATA |
|
| 28 |
base64_decode @ 26 |
|
| 29 |
base64_decoder_decode @ 27 |
|
| 30 |
base64_decoder_free @ 28 |
|
| 31 |
base64_decoder_new @ 29 |
|
| 32 |
base64_encode @ 30 |
|
| 33 |
canonicalize_file @ 31 |
|
| 34 |
canonicalize_file_replace @ 32 |
|
| 35 |
canonicalize_file_stream @ 33 |
|
| 36 |
canonicalize_str @ 34 |
|
| 37 |
change_dir @ 35 |
|
| 38 |
change_file_mode_rw @ 36 |
|
| 39 |
check_line_length @ 37 |
|
| 40 |
close_log_file @ 38 |
|
| 41 |
conv_check_file_encoding @ 39 |
|
| 42 |
conv_code_converter_destroy @ 40 |
|
| 43 |
conv_code_converter_new @ 41 |
|
| 44 |
conv_codeset_strdup_full @ 42 |
|
| 45 |
conv_convert @ 43 |
|
| 46 |
conv_copy_dir @ 44 |
|
| 47 |
conv_copy_file @ 45 |
|
| 48 |
conv_encode_filename @ 46 |
|
| 49 |
conv_encode_header @ 47 |
|
| 50 |
conv_filename_from_utf8 @ 48 |
|
| 51 |
conv_filename_to_utf8 @ 49 |
|
| 52 |
conv_get_autodetect_type @ 50 |
|
| 53 |
conv_get_charset_from_str @ 51 |
|
| 54 |
conv_get_charset_str @ 52 |
|
| 55 |
conv_get_code_conv_func @ 53 |
|
| 56 |
conv_get_current_locale @ 54 |
|
| 57 |
conv_get_internal_charset @ 55 |
|
| 58 |
conv_get_internal_charset_str @ 56 |
|
| 59 |
conv_get_locale_charset @ 57 |
|
| 60 |
conv_get_locale_charset_str @ 58 |
|
| 61 |
conv_get_outgoing_charset @ 59 |
|
| 62 |
conv_get_outgoing_charset_str @ 60 |
|
| 63 |
conv_guess_ja_encoding @ 61 |
|
| 64 |
conv_iconv_strdup @ 62 |
|
| 65 |
conv_iconv_strdup_with_cd @ 63 |
|
| 66 |
conv_is_ja_locale @ 64 |
|
| 67 |
conv_is_multibyte_encoding @ 65 |
|
| 68 |
conv_localetodisp @ 66 |
|
| 69 |
conv_mb_alnum @ 67 |
|
| 70 |
conv_set_autodetect_type @ 68 |
|
| 71 |
conv_unmime_header @ 69 |
|
| 72 |
conv_utf8todisp @ 70 |
|
| 73 |
copy_dir @ 71 |
|
| 74 |
copy_file @ 72 |
|
| 75 |
copy_file_part @ 73 |
|
| 76 |
copy_mbox @ 74 |
|
| 77 |
cur_account @ 75 DATA |
|
| 78 |
custom_header_find @ 76 |
|
| 79 |
custom_header_free @ 77 |
|
| 80 |
custom_header_get_str @ 78 |
|
| 81 |
custom_header_read_config @ 79 |
|
| 82 |
custom_header_read_str @ 80 |
|
| 83 |
custom_header_write_config @ 81 |
|
| 84 |
debug_print @ 82 |
|
| 85 |
decode_uri @ 83 |
|
| 86 |
decode_xdigit_encoded_str @ 84 |
|
| 87 |
dirent_is_directory @ 85 |
|
| 88 |
dirent_is_regular_file @ 86 |
|
| 89 |
display_header_prop_free @ 87 |
|
| 90 |
display_header_prop_get_str @ 88 |
|
| 91 |
display_header_prop_read_str @ 89 |
|
| 92 |
eliminate_address_comment @ 90 |
|
| 93 |
eliminate_parenthesis @ 91 |
|
| 94 |
eliminate_quote @ 92 |
|
| 95 |
empty_mbox @ 93 |
|
| 96 |
encode_uri @ 94 |
|
| 97 |
execute_async @ 95 |
|
| 98 |
execute_command_line @ 96 |
|
| 99 |
execute_open_file @ 97 |
|
| 100 |
execute_print_file @ 98 |
|
| 101 |
execute_sync @ 99 |
|
| 102 |
export_to_mbox @ 100 |
|
| 103 |
extract_address @ 101 |
|
| 104 |
extract_list_id_str @ 102 |
|
| 105 |
extract_parenthesis @ 103 |
|
| 106 |
extract_parenthesis_with_escape @ 104 |
|
| 107 |
extract_parenthesis_with_skip_quote @ 105 |
|
| 108 |
extract_quote @ 106 |
|
| 109 |
extract_quote_with_escape @ 107 |
|
| 110 |
fd_accept @ 108 |
|
| 111 |
fd_close @ 109 |
|
| 112 |
fd_connect_inet @ 110 |
|
| 113 |
fd_connect_unix @ 111 |
|
| 114 |
fd_getline @ 112 |
|
| 115 |
fd_gets @ 113 |
|
| 116 |
fd_open_inet @ 114 |
|
| 117 |
fd_open_unix @ 115 |
|
| 118 |
fd_read @ 116 |
|
| 119 |
fd_recv @ 117 |
|
| 120 |
fd_write @ 118 |
|
| 121 |
fd_write_all @ 119 |
|
| 122 |
file_exist @ 120 |
|
| 123 |
file_read_stream_to_str @ 121 |
|
| 124 |
file_read_to_str @ 122 |
|
| 125 |
filter_action_exec @ 123 |
|
| 126 |
filter_action_list_free @ 124 |
|
| 127 |
filter_action_new @ 125 |
|
| 128 |
filter_apply @ 126 |
|
| 129 |
filter_apply_msginfo @ 127 |
|
| 130 |
filter_cond_list_free @ 128 |
|
| 131 |
filter_cond_new @ 129 |
|
| 132 |
filter_get_keyword_from_msg @ 130 |
|
| 133 |
filter_get_str @ 131 |
|
| 134 |
filter_info_free @ 132 |
|
| 135 |
filter_info_new @ 133 |
|
| 136 |
filter_list_delete_path @ 134 |
|
| 137 |
filter_list_rename_path @ 135 |
|
| 138 |
filter_match_rule @ 136 |
|
| 139 |
filter_read_config @ 137 |
|
| 140 |
filter_read_file @ 138 |
|
| 141 |
filter_read_str @ 139 |
|
| 142 |
filter_rule_delete_action_by_dest_path @ 140 |
|
| 143 |
filter_rule_free @ 141 |
|
| 144 |
filter_rule_list_free @ 142 |
|
| 145 |
filter_rule_match_type_str_to_enum @ 143 |
|
| 146 |
filter_rule_new @ 144 |
|
| 147 |
filter_rule_rename_dest_path @ 145 |
|
| 148 |
filter_rule_requires_full_headers @ 146 |
|
| 149 |
filter_write_config @ 147 |
|
| 150 |
filter_write_file @ 148 |
|
| 151 |
filter_xml_node_to_filter_list @ 149 |
|
| 152 |
folder_add @ 150 |
|
| 153 |
folder_create_tree @ 151 |
|
| 154 |
folder_destroy @ 152 |
|
| 155 |
folder_find_child_item_by_name @ 153 |
|
| 156 |
folder_find_from_name @ 154 |
|
| 157 |
folder_find_from_path @ 155 |
|
| 158 |
folder_find_item_and_num_from_id @ 156 |
|
| 159 |
folder_find_item_from_identifier @ 157 |
|
| 160 |
folder_find_item_from_path @ 158 |
|
| 161 |
folder_get_default_draft @ 159 |
|
| 162 |
folder_get_default_folder @ 160 |
|
| 163 |
folder_get_default_inbox @ 161 |
|
| 164 |
folder_get_default_outbox @ 162 |
|
| 165 |
folder_get_default_queue @ 163 |
|
| 166 |
folder_get_default_trash @ 164 |
|
| 167 |
folder_get_identifier @ 165 |
|
| 168 |
folder_get_list @ 166 |
|
| 169 |
folder_get_path @ 167 |
|
| 170 |
folder_get_status @ 168 |
|
| 171 |
folder_item_add_msg @ 169 |
|
| 172 |
folder_item_add_msgs @ 170 |
|
| 173 |
folder_item_append @ 171 |
|
| 174 |
folder_item_close @ 172 |
|
| 175 |
folder_item_compare @ 173 |
|
| 176 |
folder_item_copy @ 174 |
|
| 177 |
folder_item_copy_msg @ 175 |
|
| 178 |
folder_item_copy_msgs @ 176 |
|
| 179 |
folder_item_destroy @ 177 |
|
| 180 |
folder_item_fetch_all_msg @ 178 |
|
| 181 |
folder_item_fetch_msg @ 179 |
|
| 182 |
folder_item_get_cache_file @ 180 |
|
| 183 |
folder_item_get_identifier @ 181 |
|
| 184 |
folder_item_get_mark_file @ 182 |
|
| 185 |
folder_item_get_msg_list @ 183 |
|
| 186 |
folder_item_get_msginfo @ 184 |
|
| 187 |
folder_item_get_path @ 185 |
|
| 188 |
folder_item_get_uncached_msg_list @ 186 |
|
| 189 |
folder_item_is_msg_changed @ 187 |
|
| 190 |
folder_item_move_msg @ 188 |
|
| 191 |
folder_item_move_msgs @ 189 |
|
| 192 |
folder_item_new @ 190 |
|
| 193 |
folder_item_remove @ 191 |
|
| 194 |
folder_item_remove_all_msg @ 192 |
|
| 195 |
folder_item_remove_children @ 193 |
|
| 196 |
folder_item_remove_msg @ 194 |
|
| 197 |
folder_item_remove_msgs @ 195 |
|
| 198 |
folder_item_scan @ 196 |
|
| 199 |
folder_item_scan_foreach @ 197 |
|
| 200 |
folder_local_folder_destroy @ 198 |
|
| 201 |
folder_local_folder_init @ 199 |
|
| 202 |
folder_new @ 200 |
|
| 203 |
folder_read_list @ 201 |
|
| 204 |
folder_remote_folder_destroy @ 202 |
|
| 205 |
folder_remote_folder_init @ 203 |
|
| 206 |
folder_scan_tree @ 204 |
|
| 207 |
folder_set_missing_folders @ 205 |
|
| 208 |
folder_set_name @ 206 |
|
| 209 |
folder_set_ui_func @ 207 |
|
| 210 |
folder_tree_destroy @ 208 |
|
| 211 |
folder_unref_account_all @ 209 |
|
| 212 |
folder_write_list @ 210 |
|
| 213 |
fromuutobits @ 211 |
|
| 214 |
generate_mime_boundary @ 212 |
|
| 215 |
get_abbrev_newsgroup_name @ 213 |
|
| 216 |
get_alt_filename @ 214 |
|
| 217 |
get_command_output @ 215 |
|
| 218 |
get_debug_mode @ 216 |
|
| 219 |
get_document_dir @ 217 |
|
| 220 |
get_domain_name @ 218 |
|
| 221 |
get_file_size @ 219 |
|
| 222 |
get_file_size_as_crlf @ 220 |
|
| 223 |
get_home_dir @ 221 |
|
| 224 |
get_imap_cache_dir @ 222 |
|
| 225 |
get_left_file_size @ 223 |
|
| 226 |
get_mail_base_dir @ 224 |
|
| 227 |
get_mime_tmp_dir @ 225 |
|
| 228 |
get_news_cache_dir @ 226 |
|
| 229 |
get_next_word_len @ 227 |
|
| 230 |
get_old_rc_dir @ 228 |
|
| 231 |
get_outgoing_rfc2822_file @ 229 |
|
| 232 |
get_outgoing_rfc2822_str @ 230 |
|
| 233 |
get_quote_level @ 231 |
|
| 234 |
get_rc_dir @ 232 |
|
| 235 |
get_rfc822_date @ 233 |
|
| 236 |
get_startup_dir @ 234 |
|
| 237 |
get_template_dir @ 235 |
|
| 238 |
get_tmp_dir @ 236 |
|
| 239 |
get_tmp_file @ 237 |
|
| 240 |
get_uri_len @ 238 |
|
| 241 |
get_uri_path @ 239 |
|
| 242 |
hash_free_strings @ 240 |
|
| 243 |
hash_free_value_mem @ 241 |
|
| 244 |
html_parse @ 242 |
|
| 245 |
html_parser_destroy @ 243 |
|
| 246 |
html_parser_new @ 244 |
|
| 247 |
imap_get_class @ 245 |
|
| 248 |
imap_msg_list_set_perm_flags @ 246 |
|
| 249 |
imap_msg_list_unset_perm_flags @ 247 |
|
| 250 |
imap_msg_set_perm_flags @ 248 |
|
| 251 |
imap_msg_unset_perm_flags @ 249 |
|
| 252 |
input_query_password @ 250 |
|
| 253 |
is_ascii_str @ 251 |
|
| 254 |
is_dir_exist @ 252 |
|
| 255 |
is_file_entry_exist @ 253 |
|
| 256 |
is_header_line @ 254 |
|
| 257 |
is_next_nonascii @ 255 |
|
| 258 |
is_uri_string @ 256 |
|
| 259 |
itos @ 257 |
|
| 260 |
itos_buf @ 258 |
|
| 261 |
list_free_strings @ 259 |
|
| 262 |
lock_mbox @ 260 |
|
| 263 |
log_error @ 261 |
|
| 264 |
log_message @ 262 |
|
| 265 |
log_print @ 263 |
|
| 266 |
log_warning @ 264 |
|
| 267 |
log_write @ 265 |
|
| 268 |
make_dir @ 266 |
|
| 269 |
make_dir_hier @ 267 |
|
| 270 |
md5_hex_hmac @ 268 |
|
| 271 |
md5_hmac @ 269 |
|
| 272 |
mh_get_class @ 270 |
|
| 273 |
move_file @ 271 |
|
| 274 |
my_gethostbyname @ 272 |
|
| 275 |
my_memmem @ 273 |
|
| 276 |
my_strftime @ 274 |
|
| 277 |
my_tmpfile @ 275 |
|
| 278 |
news_get_class @ 276 |
|
| 279 |
news_get_group_list @ 277 |
|
| 280 |
news_group_list_free @ 278 |
|
| 281 |
news_post @ 279 |
|
| 282 |
news_post_stream @ 280 |
|
| 283 |
news_remove_group_list_cache @ 281 |
|
| 284 |
newsgroup_list_append @ 282 |
|
| 285 |
nntp_article @ 283 |
|
| 286 |
nntp_body @ 284 |
|
| 287 |
nntp_get_article @ 285 |
|
| 288 |
nntp_group @ 286 |
|
| 289 |
nntp_head @ 287 |
|
| 290 |
nntp_list @ 288 |
|
| 291 |
nntp_mode @ 289 |
|
| 292 |
nntp_newgroups @ 290 |
|
| 293 |
nntp_newnews @ 291 |
|
| 294 |
nntp_next @ 292 |
|
| 295 |
nntp_post @ 293 |
|
| 296 |
nntp_session_new @ 294 |
|
| 297 |
nntp_stat @ 295 |
|
| 298 |
nntp_xhdr @ 296 |
|
| 299 |
nntp_xover @ 297 |
|
| 300 |
normalize_address_field @ 298 |
|
| 301 |
normalize_newlines @ 299 |
|
| 302 |
open_uri @ 300 |
|
| 303 |
path_cmp @ 301 |
|
| 304 |
pop3_delete_recv @ 302 |
|
| 305 |
pop3_delete_send @ 303 |
|
| 306 |
pop3_gen_send @ 304 |
|
| 307 |
pop3_get_uidl_table @ 305 |
|
| 308 |
pop3_getauth_apop_send @ 306 |
|
| 309 |
pop3_getauth_pass_send @ 307 |
|
| 310 |
pop3_getauth_user_send @ 308 |
|
| 311 |
pop3_getrange_last_recv @ 309 |
|
| 312 |
pop3_getrange_last_send @ 310 |
|
| 313 |
pop3_getrange_stat_recv @ 311 |
|
| 314 |
pop3_getrange_stat_send @ 312 |
|
| 315 |
pop3_getrange_uidl_recv @ 313 |
|
| 316 |
pop3_getrange_uidl_send @ 314 |
|
| 317 |
pop3_getsize_list_recv @ 315 |
|
| 318 |
pop3_getsize_list_send @ 316 |
|
| 319 |
pop3_greeting_recv @ 317 |
|
| 320 |
pop3_logout_send @ 318 |
|
| 321 |
pop3_ok @ 319 |
|
| 322 |
pop3_retr_recv @ 320 |
|
| 323 |
pop3_retr_send @ 321 |
|
| 324 |
pop3_session_new @ 322 |
|
| 325 |
pop3_stls_recv @ 323 |
|
| 326 |
pop3_stls_send @ 324 |
|
| 327 |
pop3_write_msg_to_file @ 325 |
|
| 328 |
pop3_write_uidl_list @ 326 |
|
| 329 |
prefs_account_apply_tmp_prefs @ 327 |
|
| 330 |
prefs_account_free @ 328 |
|
| 331 |
prefs_account_get_params @ 329 |
|
| 332 |
prefs_account_get_tmp_prefs @ 330 |
|
| 333 |
prefs_account_new @ 331 |
|
| 334 |
prefs_account_read_config @ 332 |
|
| 335 |
prefs_account_set_tmp_prefs @ 333 |
|
| 336 |
prefs_account_write_config_all @ 334 |
|
| 337 |
prefs_common @ 335 DATA |
|
| 338 |
prefs_common_get @ 336 |
|
| 339 |
prefs_common_get_params @ 337 |
|
| 340 |
prefs_common_junk_filter_list_set @ 338 |
|
| 341 |
prefs_common_junk_folder_rename_path @ 339 |
|
| 342 |
prefs_common_read_config @ 340 |
|
| 343 |
prefs_common_write_config @ 341 |
|
| 344 |
prefs_file_close @ 342 |
|
| 345 |
prefs_file_close_revert @ 343 |
|
| 346 |
prefs_file_get_backup_generation @ 344 |
|
| 347 |
prefs_file_open @ 345 |
|
| 348 |
prefs_file_set_backup_generation @ 346 |
|
| 349 |
prefs_file_write_param @ 347 |
|
| 350 |
prefs_free @ 348 |
|
| 351 |
prefs_param_table_destroy @ 349 |
|
| 352 |
prefs_param_table_get @ 350 |
|
| 353 |
prefs_read_config @ 351 |
|
| 354 |
prefs_set_default @ 352 |
|
| 355 |
prefs_write_config @ 353 |
|
| 356 |
proc_mbox @ 354 |
|
| 357 |
proc_mbox_full @ 355 |
|
| 358 |
procheader_add_header_list @ 356 |
|
| 359 |
procheader_copy_header_list @ 357 |
|
| 360 |
procheader_date_get_localtime @ 358 |
|
| 361 |
procheader_date_parse @ 359 |
|
| 362 |
procheader_find_header_list @ 360 |
|
| 363 |
procheader_get_fromname @ 361 |
|
| 364 |
procheader_get_header_array @ 362 |
|
| 365 |
procheader_get_header_array_asis @ 363 |
|
| 366 |
procheader_get_header_array_for_display @ 364 |
|
| 367 |
procheader_get_header_fields @ 365 |
|
| 368 |
procheader_get_header_list @ 366 |
|
| 369 |
procheader_get_header_list_from_file @ 367 |
|
| 370 |
procheader_get_header_list_from_msginfo @ 368 |
|
| 371 |
procheader_get_one_field @ 369 |
|
| 372 |
procheader_get_toname @ 370 |
|
| 373 |
procheader_get_unfolded_line @ 371 |
|
| 374 |
procheader_header_array_destroy @ 372 |
|
| 375 |
procheader_header_free @ 373 |
|
| 376 |
procheader_header_list_destroy @ 374 |
|
| 377 |
procheader_merge_header_list @ 375 |
|
| 378 |
procheader_merge_header_list_dup @ 376 |
|
| 379 |
procheader_parse_file @ 377 |
|
| 380 |
procheader_parse_str @ 378 |
|
| 381 |
procheader_parse_stream @ 379 |
|
| 382 |
procmime_decode_content @ 380 |
|
| 383 |
procmime_execute_open_file @ 381 |
|
| 384 |
procmime_find_string @ 382 |
|
| 385 |
procmime_find_string_part @ 383 |
|
| 386 |
procmime_get_all_parts @ 384 |
|
| 387 |
procmime_get_encoding_for_charset @ 385 |
|
| 388 |
procmime_get_encoding_for_str @ 386 |
|
| 389 |
procmime_get_encoding_for_text_file @ 387 |
|
| 390 |
procmime_get_encoding_str @ 388 |
|
| 391 |
procmime_get_first_text_content @ 389 |
|
| 392 |
procmime_get_mime_type @ 390 |
|
| 393 |
procmime_get_part @ 391 |
|
| 394 |
procmime_get_part_file_name @ 392 |
|
| 395 |
procmime_get_part_fp @ 393 |
|
| 396 |
procmime_get_text_content @ 394 |
|
| 397 |
procmime_get_tmp_file_name @ 395 |
|
| 398 |
procmime_mimeinfo_free_all @ 396 |
|
| 399 |
procmime_mimeinfo_insert @ 397 |
|
| 400 |
procmime_mimeinfo_new @ 398 |
|
| 401 |
procmime_mimeinfo_next @ 399 |
|
| 402 |
procmime_scan_content_disposition @ 400 |
|
| 403 |
procmime_scan_content_type @ 401 |
|
| 404 |
procmime_scan_content_type_str @ 402 |
|
| 405 |
procmime_scan_encoding @ 403 |
|
| 406 |
procmime_scan_message @ 404 |
|
| 407 |
procmime_scan_mime_header @ 405 |
|
| 408 |
procmime_scan_mime_type @ 406 |
|
| 409 |
procmime_scan_multipart_message @ 407 |
|
| 410 |
procmsg_add_flags @ 408 |
|
| 411 |
procmsg_add_mark_queue @ 409 |
|
| 412 |
procmsg_clear_cache @ 410 |
|
| 413 |
procmsg_clear_mark @ 411 |
|
| 414 |
procmsg_cmp_msgnum_for_sort @ 412 |
|
| 415 |
procmsg_copy_messages @ 413 |
|
| 416 |
procmsg_empty_all_trash @ 414 |
|
| 417 |
procmsg_empty_trash @ 415 |
|
| 418 |
procmsg_flush_mark_queue @ 416 |
|
| 419 |
procmsg_get_last_num_in_msg_list @ 417 |
|
| 420 |
procmsg_get_mark_sum @ 418 |
|
| 421 |
procmsg_get_message_file @ 419 |
|
| 422 |
procmsg_get_message_file_list @ 420 |
|
| 423 |
procmsg_get_message_file_path @ 421 |
|
| 424 |
procmsg_get_msginfo @ 422 |
|
| 425 |
procmsg_get_thread_date @ 423 |
|
| 426 |
procmsg_get_thread_tree @ 424 |
|
| 427 |
procmsg_mark_all_read @ 425 |
|
| 428 |
procmsg_message_file_list_free @ 426 |
|
| 429 |
procmsg_move_messages @ 427 |
|
| 430 |
procmsg_msg_exist @ 428 |
|
| 431 |
procmsg_msg_hash_table_append @ 429 |
|
| 432 |
procmsg_msg_hash_table_create @ 430 |
|
| 433 |
procmsg_msg_list_free @ 431 |
|
| 434 |
procmsg_msginfo_copy @ 432 |
|
| 435 |
procmsg_msginfo_equal @ 433 |
|
| 436 |
procmsg_msginfo_free @ 434 |
|
| 437 |
procmsg_msginfo_get_full_info @ 435 |
|
| 438 |
procmsg_open_cache_file @ 436 |
|
| 439 |
procmsg_open_data_file @ 437 |
|
| 440 |
procmsg_open_mark_file @ 438 |
|
| 441 |
procmsg_open_message @ 439 |
|
| 442 |
procmsg_open_message_decrypted @ 440 |
|
| 443 |
procmsg_print_message @ 441 |
|
| 444 |
procmsg_print_message_part @ 442 |
|
| 445 |
procmsg_read_cache @ 443 |
|
| 446 |
procmsg_read_cache_data_str @ 444 |
|
| 447 |
procmsg_remove_all_cached_messages @ 445 |
|
| 448 |
procmsg_save_to_outbox @ 446 |
|
| 449 |
procmsg_set_auto_decrypt_message @ 447 |
|
| 450 |
procmsg_set_decrypt_message_func @ 448 |
|
| 451 |
procmsg_set_flags @ 449 |
|
| 452 |
procmsg_sort_msg_list @ 450 |
|
| 453 |
procmsg_to_folder_hash_table_create @ 451 |
|
| 454 |
procmsg_trash_messages_exist @ 452 |
|
| 455 |
procmsg_write_cache @ 453 |
|
| 456 |
procmsg_write_cache_list @ 454 |
|
| 457 |
procmsg_write_flags @ 455 |
|
| 458 |
procmsg_write_flags_for_multiple_folders @ 456 |
|
| 459 |
procmsg_write_flags_list @ 457 |
|
| 460 |
progress_show @ 458 |
|
| 461 |
ptr_array_free_strings @ 459 |
|
| 462 |
qp_decode_line @ 460 |
|
| 463 |
qp_decode_q_encoding @ 461 |
|
| 464 |
qp_encode_line @ 462 |
|
| 465 |
qp_get_q_encoding_len @ 463 |
|
| 466 |
qp_q_encode @ 464 |
|
| 467 |
recv_bytes @ 465 |
|
| 468 |
recv_bytes_write @ 466 |
|
| 469 |
recv_bytes_write_to_file @ 467 |
|
| 470 |
recv_set_ui_func @ 468 |
|
| 471 |
recv_write @ 469 |
|
| 472 |
recv_write_to_file @ 470 |
|
| 473 |
references_list_append @ 471 |
|
| 474 |
references_list_prepend @ 472 |
|
| 475 |
remote_tzoffset_sec @ 473 |
|
| 476 |
remove_all_files @ 474 |
|
| 477 |
remove_all_numbered_files @ 475 |
|
| 478 |
remove_dir_recursive @ 476 |
|
| 479 |
remove_expired_files @ 477 |
|
| 480 |
remove_numbered_files @ 478 |
|
| 481 |
remove_return @ 479 |
|
| 482 |
remove_space @ 480 |
|
| 483 |
rename_force @ 481 |
|
| 484 |
s_gnet_md5_clone @ 482 |
|
| 485 |
s_gnet_md5_copy_string @ 483 |
|
| 486 |
s_gnet_md5_delete @ 484 |
|
| 487 |
s_gnet_md5_equal @ 485 |
|
| 488 |
s_gnet_md5_final @ 486 |
|
| 489 |
s_gnet_md5_get_digest @ 487 |
|
| 490 |
s_gnet_md5_get_string @ 488 |
|
| 491 |
s_gnet_md5_hash @ 489 |
|
| 492 |
s_gnet_md5_new @ 490 |
|
| 493 |
s_gnet_md5_new_incremental @ 491 |
|
| 494 |
s_gnet_md5_new_string @ 492 |
|
| 495 |
s_gnet_md5_update @ 493 |
|
| 496 |
scan_mailto_url @ 494 |
|
| 497 |
session_connect @ 495 |
|
| 498 |
session_destroy @ 496 |
|
| 499 |
session_disconnect @ 497 |
|
| 500 |
session_init @ 498 |
|
| 501 |
session_is_connected @ 499 |
|
| 502 |
session_recv_data @ 500 |
|
| 503 |
session_recv_data_as_file @ 501 |
|
| 504 |
session_recv_msg @ 502 |
|
| 505 |
session_send_data @ 503 |
|
| 506 |
session_send_msg @ 504 |
|
| 507 |
session_set_access_time @ 505 |
|
| 508 |
session_set_recv_data_notify @ 506 |
|
| 509 |
session_set_recv_data_progressive_notify @ 507 |
|
| 510 |
session_set_recv_message_notify @ 508 |
|
| 511 |
session_set_send_data_notify @ 509 |
|
| 512 |
session_set_send_data_progressive_notify @ 510 |
|
| 513 |
session_set_timeout @ 511 |
|
| 514 |
session_start_tls @ 512 |
|
| 515 |
set_debug_mode @ 513 |
|
| 516 |
set_input_query_password_func @ 514 |
|
| 517 |
set_log_file @ 515 |
|
| 518 |
set_log_show_status_func @ 516 |
|
| 519 |
set_log_ui_func @ 517 |
|
| 520 |
set_log_verbosity @ 518 |
|
| 521 |
set_progress_func @ 519 |
|
| 522 |
set_rc_dir @ 520 |
|
| 523 |
set_startup_dir @ 521 |
|
| 524 |
set_ui_update_func @ 522 |
|
| 525 |
sinfo_equal @ 523 |
|
| 526 |
sinfo_hash @ 524 |
|
| 527 |
slist_free_strings @ 525 |
|
| 528 |
smtp_session_new @ 526 |
|
| 529 |
sock_add_watch @ 527 |
|
| 530 |
sock_add_watch_poll @ 528 |
|
| 531 |
sock_cleanup @ 529 |
|
| 532 |
sock_close @ 530 |
|
| 533 |
sock_connect @ 531 |
|
| 534 |
sock_getline @ 532 |
|
| 535 |
sock_gets @ 533 |
|
| 536 |
sock_has_read_data @ 534 |
|
| 537 |
sock_init @ 535 |
|
| 538 |
sock_is_nonblocking_mode @ 536 |
|
| 539 |
sock_peek @ 537 |
|
| 540 |
sock_printf @ 538 |
|
| 541 |
sock_puts @ 539 |
|
| 542 |
sock_read @ 540 |
|
| 543 |
sock_set_io_timeout @ 541 |
|
| 544 |
sock_set_nonblocking_mode @ 542 |
|
| 545 |
sock_watch_funcs @ 543 DATA |
|
| 546 |
sock_write @ 544 |
|
| 547 |
sock_write_all @ 545 |
|
| 548 |
ssl_done @ 546 |
|
| 549 |
ssl_done_socket @ 547 |
|
| 550 |
ssl_getline @ 548 |
|
| 551 |
ssl_gets @ 549 |
|
| 552 |
ssl_init @ 550 |
|
| 553 |
ssl_init_socket @ 551 |
|
| 554 |
ssl_init_socket_with_method @ 552 |
|
| 555 |
ssl_peek @ 553 |
|
| 556 |
ssl_read @ 554 |
|
| 557 |
ssl_set_verify_func @ 555 |
|
| 558 |
ssl_write @ 556 |
|
| 559 |
ssl_write_all @ 557 |
|
| 560 |
status_print @ 558 |
|
| 561 |
str_case_equal @ 559 |
|
| 562 |
str_case_find @ 560 |
|
| 563 |
str_case_find_equal @ 561 |
|
| 564 |
str_case_hash @ 562 |
|
| 565 |
str_find @ 563 |
|
| 566 |
str_find_equal @ 564 |
|
| 567 |
str_find_format_times @ 565 |
|
| 568 |
str_has_suffix_case @ 566 |
|
| 569 |
str_open_as_stream @ 567 |
|
| 570 |
str_write_to_file @ 568 |
|
| 571 |
strcasestr @ 569 |
|
| 572 |
strchomp_all @ 570 |
|
| 573 |
strchr_parenthesis_close @ 571 |
|
| 574 |
strchr_with_skip_quote @ 572 |
|
| 575 |
strcmp2 @ 573 |
|
| 576 |
strcrchomp @ 574 |
|
| 577 |
string_table_free @ 575 |
|
| 578 |
string_table_free_string @ 576 |
|
| 579 |
string_table_get_stats @ 577 |
|
| 580 |
string_table_insert_string @ 578 |
|
| 581 |
string_table_lookup_string @ 579 |
|
| 582 |
string_table_new @ 580 |
|
| 583 |
strncpy2 @ 581 |
|
| 584 |
strrchr_with_skip_quote @ 582 |
|
| 585 |
strretchomp @ 583 |
|
| 586 |
strsplit_csv @ 584 |
|
| 587 |
strsplit_parenthesis @ 585 |
|
| 588 |
strsplit_with_quote @ 586 |
|
| 589 |
strstr_with_skip_quote @ 587 |
|
| 590 |
strtailchomp @ 588 |
|
| 591 |
subject_compare @ 589 |
|
| 592 |
subject_compare_for_sort @ 590 |
|
| 593 |
subst_char @ 591 |
|
| 594 |
subst_chars @ 592 |
|
| 595 |
subst_control @ 593 |
|
| 596 |
subst_for_filename @ 594 |
|
| 597 |
subst_null @ 595 |
|
| 598 |
syl_app_create @ 596 |
|
| 599 |
syl_app_get @ 597 |
|
| 600 |
syl_app_get_type @ 598 |
|
| 601 |
syl_cleanup @ 599 |
|
| 602 |
syl_init @ 600 |
|
| 603 |
syl_init_gettext @ 601 |
|
| 604 |
syl_link @ 602 |
|
| 605 |
syl_marshal_VOID__POINTER_STRING_UINT @ 603 |
|
| 606 |
syl_save_all_state @ 604 |
|
| 607 |
syl_setup_rc_dir @ 605 |
|
| 608 |
to_human_readable @ 606 |
|
| 609 |
to_number @ 607 |
|
| 610 |
touufrombits @ 608 |
|
| 611 |
trim_string @ 609 |
|
| 612 |
trim_string_before @ 610 |
|
| 613 |
trim_subject @ 611 |
|
| 614 |
trim_subject_for_compare @ 612 |
|
| 615 |
trim_subject_for_sort @ 613 |
|
| 616 |
tzoffset @ 614 |
|
| 617 |
tzoffset_sec @ 615 |
|
| 618 |
ui_update @ 616 |
|
| 619 |
uncanonicalize_file @ 617 |
|
| 620 |
uncanonicalize_file_replace @ 618 |
|
| 621 |
unfold_line @ 619 |
|
| 622 |
unlock_mbox @ 620 |
|
| 623 |
unmime_header @ 621 |
|
| 624 |
uri_list_extract_filenames @ 622 |
|
| 625 |
uriencode_for_filename @ 623 |
|
| 626 |
uriencode_for_mailto @ 624 |
|
| 627 |
uudigit @ 625 DATA |
|
| 628 |
virtual_get_class @ 626 |
|
| 629 |
xml_attr_new @ 627 |
|
| 630 |
xml_close_file @ 628 |
|
| 631 |
xml_compare_tag @ 629 |
|
| 632 |
xml_copy_attr @ 630 |
|
| 633 |
xml_copy_tag @ 631 |
|
| 634 |
xml_file_put_escape_str @ 632 |
|
| 635 |
xml_file_put_node @ 633 |
|
| 636 |
xml_file_put_xml_decl @ 634 |
|
| 637 |
xml_free_node @ 635 |
|
| 638 |
xml_free_tree @ 636 |
|
| 639 |
xml_get_current_tag @ 637 |
|
| 640 |
xml_get_current_tag_attr @ 638 |
|
| 641 |
xml_get_dtd @ 639 |
|
| 642 |
xml_get_element @ 640 |
|
| 643 |
xml_node_new @ 641 |
|
| 644 |
xml_open_file @ 642 |
|
| 645 |
xml_parse_file @ 643 |
|
| 646 |
xml_parse_next_tag @ 644 |
|
| 647 |
xml_pop_tag @ 645 |
|
| 648 |
xml_push_tag @ 646 |
|
| 649 |
xml_read_line @ 647 |
|
| 650 |
xml_tag_add_attr @ 648 |
|
| 651 |
xml_tag_new @ 649 |
|
| 652 |
xml_truncate_buf @ 650 |
|
| 653 |
xml_unescape_str @ 651 |
|
| libsylph/syl-marshal.c (revision 2164) | ||
|---|---|---|
| 1 |
|
|
| 2 |
#include <glib-object.h> |
|
| 3 |
|
|
| 4 |
|
|
| 5 |
#ifdef G_ENABLE_DEBUG |
|
| 6 |
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) |
|
| 7 |
#define g_marshal_value_peek_char(v) g_value_get_char (v) |
|
| 8 |
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) |
|
| 9 |
#define g_marshal_value_peek_int(v) g_value_get_int (v) |
|
| 10 |
#define g_marshal_value_peek_uint(v) g_value_get_uint (v) |
|
| 11 |
#define g_marshal_value_peek_long(v) g_value_get_long (v) |
|
| 12 |
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) |
|
| 13 |
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) |
|
| 14 |
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) |
|
| 15 |
#define g_marshal_value_peek_enum(v) g_value_get_enum (v) |
|
| 16 |
#define g_marshal_value_peek_flags(v) g_value_get_flags (v) |
|
| 17 |
#define g_marshal_value_peek_float(v) g_value_get_float (v) |
|
| 18 |
#define g_marshal_value_peek_double(v) g_value_get_double (v) |
|
| 19 |
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) |
|
| 20 |
#define g_marshal_value_peek_param(v) g_value_get_param (v) |
|
| 21 |
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) |
|
| 22 |
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) |
|
| 23 |
#define g_marshal_value_peek_object(v) g_value_get_object (v) |
|
| 24 |
#else /* !G_ENABLE_DEBUG */ |
|
| 25 |
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. |
|
| 26 |
* Do not access GValues directly in your code. Instead, use the |
|
| 27 |
* g_value_get_*() functions |
|
| 28 |
*/ |
|
| 29 |
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
|
| 30 |
#define g_marshal_value_peek_char(v) (v)->data[0].v_int |
|
| 31 |
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
|
| 32 |
#define g_marshal_value_peek_int(v) (v)->data[0].v_int |
|
| 33 |
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
|
| 34 |
#define g_marshal_value_peek_long(v) (v)->data[0].v_long |
|
| 35 |
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
|
| 36 |
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
|
| 37 |
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
|
| 38 |
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
|
| 39 |
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
|
| 40 |
#define g_marshal_value_peek_float(v) (v)->data[0].v_float |
|
| 41 |
#define g_marshal_value_peek_double(v) (v)->data[0].v_double |
|
| 42 |
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
|
| 43 |
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
|
| 44 |
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
|
| 45 |
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
|
| 46 |
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
|
| 47 |
#endif /* !G_ENABLE_DEBUG */ |
|
| 48 |
|
|
| 49 |
|
|
| 50 |
/* VOID:VOID (syl-marshal.list:1) */ |
|
| 51 |
|
|
| 52 |
/* VOID:POINTER,STRING,UINT (syl-marshal.list:2) */ |
|
| 53 |
void |
|
| 54 |
syl_marshal_VOID__POINTER_STRING_UINT (GClosure *closure, |
|
| 55 |
GValue *return_value G_GNUC_UNUSED, |
|
| 56 |
guint n_param_values, |
|
| 57 |
const GValue *param_values, |
|
| 58 |
gpointer invocation_hint G_GNUC_UNUSED, |
|
| 59 |
gpointer marshal_data) |
|
| 60 |
{
|
|
| 61 |
typedef void (*GMarshalFunc_VOID__POINTER_STRING_UINT) (gpointer data1, |
|
| 62 |
gpointer arg_1, |
|
| 63 |
gpointer arg_2, |
|
| 64 |
guint arg_3, |
|
| 65 |
gpointer data2); |
|
| 66 |
register GMarshalFunc_VOID__POINTER_STRING_UINT callback; |
|
| 67 |
register GCClosure *cc = (GCClosure*) closure; |
|
| 68 |
register gpointer data1, data2; |
|
| 69 |
|
|
| 70 |
g_return_if_fail (n_param_values == 4); |
|
| 71 |
|
|
| 72 |
if (G_CCLOSURE_SWAP_DATA (closure)) |
|
| 73 |
{
|
|
| 74 |
data1 = closure->data; |
|
| 75 |
data2 = g_value_peek_pointer (param_values + 0); |
|
| 76 |
} |
|
| 77 |
else |
|
| 78 |
{
|
|
| 79 |
data1 = g_value_peek_pointer (param_values + 0); |
|
| 80 |
data2 = closure->data; |
|
| 81 |
} |
|
| 82 |
callback = (GMarshalFunc_VOID__POINTER_STRING_UINT) (marshal_data ? marshal_data : cc->callback); |
|
| 83 |
|
|
| 84 |
callback (data1, |
|
| 85 |
g_marshal_value_peek_pointer (param_values + 1), |
|
| 86 |
g_marshal_value_peek_string (param_values + 2), |
|
| 87 |
g_marshal_value_peek_uint (param_values + 3), |
|
| 88 |
data2); |
|
| 89 |
} |
|
| 90 |
|
|
| 91 |
/* VOID:POINTER (syl-marshal.list:3) */ |
|
| 92 |
|
|
| 93 |
/* VOID:POINTER,STRING,STRING (syl-marshal.list:4) */ |
|
| 94 |
void |
|
| 95 |
syl_marshal_VOID__POINTER_STRING_STRING (GClosure *closure, |
|
| 96 |
GValue *return_value G_GNUC_UNUSED, |
|
| 97 |
guint n_param_values, |
|
| 98 |
const GValue *param_values, |
|
| 99 |
gpointer invocation_hint G_GNUC_UNUSED, |
|
| 100 |
gpointer marshal_data) |
|
| 101 |
{
|
|
| 102 |
typedef void (*GMarshalFunc_VOID__POINTER_STRING_STRING) (gpointer data1, |
|
| 103 |
gpointer arg_1, |
|
| 104 |
gpointer arg_2, |
|
| 105 |
gpointer arg_3, |
|
| 106 |
gpointer data2); |
|
| 107 |
register GMarshalFunc_VOID__POINTER_STRING_STRING callback; |
|
| 108 |
register GCClosure *cc = (GCClosure*) closure; |
|
| 109 |
register gpointer data1, data2; |
|
| 110 |
|
|
| 111 |
g_return_if_fail (n_param_values == 4); |
|
| 112 |
|
|
| 113 |
if (G_CCLOSURE_SWAP_DATA (closure)) |
|
| 114 |
{
|
|
| 115 |
data1 = closure->data; |
|
| 116 |
data2 = g_value_peek_pointer (param_values + 0); |
|
| 117 |
} |
|
| 118 |
else |
|
| 119 |
{
|
|
| 120 |
data1 = g_value_peek_pointer (param_values + 0); |
|
| 121 |
data2 = closure->data; |
|
| 122 |
} |
|
| 123 |
callback = (GMarshalFunc_VOID__POINTER_STRING_STRING) (marshal_data ? marshal_data : cc->callback); |
|
| 124 |
|
|
| 125 |
callback (data1, |
|
| 126 |
g_marshal_value_peek_pointer (param_values + 1), |
|
| 127 |
g_marshal_value_peek_string (param_values + 2), |
|
| 128 |
g_marshal_value_peek_string (param_values + 3), |
|
| 129 |
data2); |
|
| 130 |
} |
|
| 131 |
|
|
| libsylph/syl-marshal.h (revision 2164) | ||
|---|---|---|
| 1 |
|
|
| 2 |
#ifndef __syl_marshal_MARSHAL_H__ |
|
| 3 |
#define __syl_marshal_MARSHAL_H__ |
|
| 4 |
|
|
| 5 |
#include <glib-object.h> |
|
| 6 |
|
|
| 7 |
G_BEGIN_DECLS |
|
| 8 |
|
|
| 9 |
/* VOID:VOID (syl-marshal.list:1) */ |
|
| 10 |
#define syl_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID |
|
| 11 |
|
|
| 12 |
/* VOID:POINTER,STRING,UINT (syl-marshal.list:2) */ |
|
| 13 |
extern void syl_marshal_VOID__POINTER_STRING_UINT (GClosure *closure, |
|
| 14 |
GValue *return_value, |
|
| 15 |
guint n_param_values, |
|
| 16 |
const GValue *param_values, |
|
| 17 |
gpointer invocation_hint, |
|
| 18 |
gpointer marshal_data); |
|
| 19 |
|
|
| 20 |
/* VOID:POINTER (syl-marshal.list:3) */ |
|
| 21 |
#define syl_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER |
|
| 22 |
|
|
Also available in: Unified diff