Skip to content

Commit 22eab48

Browse files
committed
build: abolish dlsymming midb_agent
1 parent 7983e0d commit 22eab48

File tree

13 files changed

+157
-258
lines changed

13 files changed

+157
-258
lines changed

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ libgxs_event_stub_la_SOURCES = mra/event_stub.cpp
124124
libgxs_event_stub_la_LDFLAGS = ${default_SYFLAGS}
125125
libgxs_event_stub_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la
126126
EXTRA_libgxs_event_stub_la_DEPENDENCIES = default.sym
127-
libgxs_midb_agent_la_SOURCES = mra/midb_agent.cpp
127+
libgxs_midb_agent_la_SOURCES = mra/midb_agent.cpp mra/midb_agent.hpp
128128
libgxs_midb_agent_la_LDFLAGS = ${default_SYFLAGS}
129129
libgxs_midb_agent_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la
130130
EXTRA_libgxs_midb_agent_la_DEPENDENCIES = default.sym
@@ -351,7 +351,7 @@ tzd_files += data/Greenwich.tzd data/Haiti.tzd data/Hawaiian.tzd data/India.tzd
351351
tzd_files += data/Saratov.tzd data/Singapore.tzd data/South_Africa.tzd data/South_Sudan.tzd data/Sri_Lanka.tzd data/Sudan.tzd data/Syria.tzd data/Taipei.tzd data/Tasmania.tzd data/Tocantins.tzd data/Tokyo.tzd data/Tomsk.tzd data/Tonga.tzd data/Transbaikal.tzd data/Turkey.tzd data/Turks_And_Caicos.tzd data/US_Eastern.tzd data/US_Mountain.tzd data/UTC+12.tzd data/UTC+13.tzd data/UTC-02.tzd data/UTC-08.tzd data/UTC-09.tzd data/UTC-11.tzd data/UTC.tzd data/Ulaanbaatar.tzd data/Venezuela.tzd data/Vladivostok.tzd data/Volgograd.tzd data/W__Australia.tzd data/W__Central_Africa.tzd data/W__Europe.tzd data/W__Mongolia.tzd data/West_Asia.tzd data/West_Bank.tzd data/West_Pacific.tzd data/Yakutsk.tzd data/Yukon.tzd
352352
tzd_files += data/windowsZones.xml
353353
header_files = include/gromox/ab_tree.hpp include/gromox/arcfour.hpp include/gromox/archive.hpp include/gromox/atomic.hpp include/gromox/authmgr.hpp include/gromox/bounce_gen.hpp include/gromox/clock.hpp include/gromox/common_types.hpp include/gromox/config_file.hpp include/gromox/contexts_pool.hpp include/gromox/cookie_parser.hpp include/gromox/cryptoutil.hpp include/gromox/database.h include/gromox/database_mysql.hpp include/gromox/dbop.h include/gromox/dcerpc.hpp include/gromox/defs.h include/gromox/double_list.hpp include/gromox/dsn.hpp include/gromox/eid_array.hpp include/gromox/element_data.hpp include/gromox/endian.hpp include/gromox/exmdb_client.hpp include/gromox/exmdb_common_util.hpp include/gromox/exmdb_ext.hpp include/gromox/exmdb_idef.hpp include/gromox/exmdb_provider_client.hpp include/gromox/exmdb_rpc.hpp include/gromox/exmdb_server.hpp include/gromox/ext_buffer.hpp
354-
header_files += include/gromox/fileio.h include/gromox/flusher_common.h include/gromox/freebusy.hpp include/gromox/gab.hpp include/gromox/generic_connection.hpp include/gromox/hook_common.h include/gromox/hpm_common.h include/gromox/http.hpp include/gromox/ical.hpp include/gromox/icase.hpp include/gromox/json.hpp include/gromox/list_file.hpp include/gromox/lzxpress.hpp include/gromox/mail.hpp include/gromox/mail_func.hpp include/gromox/mapi_types.hpp include/gromox/mapidefs.h include/gromox/mapierr.hpp include/gromox/mapitags.hpp include/gromox/midb.hpp include/gromox/mime.hpp include/gromox/mjson.hpp include/gromox/msg_unit.hpp include/gromox/msgchg_grouping.hpp include/gromox/mysql_adaptor.hpp include/gromox/ndr.hpp include/gromox/ntlmssp.hpp include/gromox/oxcmail.hpp include/gromox/oxoabkt.hpp
354+
header_files += include/gromox/fileio.h include/gromox/flusher_common.h include/gromox/freebusy.hpp include/gromox/gab.hpp include/gromox/generic_connection.hpp include/gromox/hook_common.h include/gromox/hpm_common.h include/gromox/http.hpp include/gromox/ical.hpp include/gromox/icase.hpp include/gromox/json.hpp include/gromox/list_file.hpp include/gromox/lzxpress.hpp include/gromox/mail.hpp include/gromox/mail_func.hpp include/gromox/mapi_types.hpp include/gromox/mapidefs.h include/gromox/mapierr.hpp include/gromox/mapitags.hpp include/gromox/midb.hpp include/gromox/mime.hpp include/gromox/mjson.hpp include/gromox/msgchg_grouping.hpp include/gromox/mysql_adaptor.hpp include/gromox/ndr.hpp include/gromox/ntlmssp.hpp include/gromox/oxcmail.hpp include/gromox/oxoabkt.hpp
355355
header_files += include/gromox/paths.h.in include/gromox/pcl.hpp include/gromox/plugin.hpp include/gromox/proc_common.h include/gromox/process.hpp include/gromox/proptag_array.hpp include/gromox/propval.hpp include/gromox/range_set.hpp include/gromox/resource_pool.hpp include/gromox/restriction.hpp include/gromox/rop_util.hpp include/gromox/rpc_types.hpp include/gromox/rule_actions.hpp include/gromox/safeint.hpp include/gromox/scope.hpp include/gromox/simple_tree.hpp include/gromox/sortorder_set.hpp include/gromox/stream.hpp include/gromox/svc_common.h include/gromox/svc_loader.hpp include/gromox/textmaps.hpp include/gromox/threads_pool.hpp include/gromox/tie.hpp include/gromox/tnef.hpp include/gromox/usercvt.hpp include/gromox/util.hpp include/gromox/vcard.hpp include/gromox/xarray2.hpp include/gromox/zcore_client.hpp include/gromox/zcore_rpc.hpp include/gromox/zz_ndr_stack.hpp
356356
header_files += lib/mapi/oxcmail_int.hpp
357357
list_files = data/cpid.txt data/exmdb_list.txt data/folder_names.txt data/lang_charset.txt data/lcid.txt data/mime_extension.txt data/propnames.txt

default.sym

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ global:
1313
};
1414
_ZGV*;
1515
_ZT*;
16+
17+
extern "C++" {
18+
midb_agent::*;
19+
};
1620
local:
1721
*;
1822
};

include/gromox/midb_agent.hpp

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#pragma once
2+
#include <string>
3+
#include <gromox/range_set.hpp>
4+
#include <gromox/xarray2.hpp>
5+
6+
enum {
7+
MIDB_RESULT_OK = 0,
8+
MIDB_NO_SERVER,
9+
MIDB_RDWR_ERROR,
10+
MIDB_RESULT_ERROR,
11+
/* server_enomem is conveyed via RESULT_ERROR + errnum=ENOMEM */
12+
MIDB_LOCAL_ENOMEM,
13+
MIDB_TOO_MANY_RESULTS,
14+
};
15+
16+
enum {
17+
FLAG_RECENT = 0x1,
18+
FLAG_ANSWERED = 0x2,
19+
FLAG_FLAGGED = 0x4,
20+
FLAG_DELETED = 0x8,
21+
FLAG_SEEN = 0x10,
22+
FLAG_DRAFT = 0x20,
23+
FLAG_LOADED = 0x80,
24+
};
25+
26+
struct MSG_UNIT {
27+
std::string file_name;
28+
size_t size = 0;
29+
bool b_deleted = false;
30+
};
31+
32+
using enum_folder_t = std::pair<uint64_t, std::string>;
33+
34+
namespace midb_agent {
35+
36+
extern GX_EXPORT int list_mail(const char *path, const std::string &folder, std::vector<MSG_UNIT> &, int *num, uint64_t *size);
37+
extern GX_EXPORT int delete_mail(const char *path, const std::string &folder, const std::vector<MSG_UNIT *> &);
38+
extern GX_EXPORT int get_uid(const char *path, const std::string &folder, const std::string &mid, unsigned int *uid);
39+
extern GX_EXPORT int summary_folder(const char *path, const std::string &folder, size_t *exists, size_t *recent, size_t *unseen, uint32_t *uidvalid, uint32_t *uidnext, int *perrno);
40+
extern GX_EXPORT int make_folder(const char *path, const std::string &folder, int *perrno);
41+
extern GX_EXPORT int remove_folder(const char *path, const std::string &folder, int *perrno);
42+
extern GX_EXPORT int ping_mailbox(const char *path, int *perrno);
43+
extern GX_EXPORT int rename_folder(const char *path, const std::string &src_name, const std::string &dst_name, int *perrno);
44+
extern GX_EXPORT int subscribe_folder(const char *path, const std::string &folder, int *perrno);
45+
extern GX_EXPORT int unsubscribe_folder(const char *path, const std::string &folder, int *perrno);
46+
extern GX_EXPORT int enum_folders(const char *path, std::vector<enum_folder_t> &, int *perrno);
47+
extern GX_EXPORT int enum_subscriptions(const char *path, std::vector<enum_folder_t> &, int *perrno);
48+
extern GX_EXPORT int insert_mail(const char *path, const std::string &folder, const char *file_name, const char *flags_string, long time_stamp, int *perrno);
49+
extern GX_EXPORT int remove_mail(const char *path, const std::string &folder, const std::vector<MITEM *> &, int *perrno);
50+
extern GX_EXPORT int list_deleted(const char *path, const std::string &folder, XARRAY *, int *perrno);
51+
extern GX_EXPORT int fetch_simple_uid(const char *path, const std::string &folder, const gromox::imap_seq_list &, XARRAY *, int *perrno);
52+
extern GX_EXPORT int fetch_detail_uid(const char *path, const std::string &folder, const gromox::imap_seq_list &, XARRAY *, int *perrno);
53+
extern GX_EXPORT int set_flags(const char *path, const std::string &folder, const std::string &mid, int flag_bits, int *perrno);
54+
extern GX_EXPORT int unset_flags(const char *path, const std::string &folder, const std::string &mid, int flag_bits, int *perrno);
55+
extern GX_EXPORT int get_flags(const char *path, const std::string &folder, const std::string &mid, int *pflag_bits, int *perrno);
56+
extern GX_EXPORT int copy_mail(const char *path, const std::string &src_folder, const std::string &src_mid, const std::string &dst_folder, std::string &dst_mid, int *perrno);
57+
extern GX_EXPORT int search(const char *path, const std::string &folder, const char *charset, int argc, char **argv, std::string &ret_buff, int *perrno);
58+
extern GX_EXPORT int search_uid(const char *path, const std::string &folder, const char *charset, int argc, char **argv, std::string &ret_buff, int *perrno);
59+
60+
}

include/gromox/msg_unit.hpp

Lines changed: 0 additions & 13 deletions
This file was deleted.

mra/imap/imap.hpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ struct imap_context final : public schedule_context {
132132
bool synchronizing_literal = true;
133133
};
134134

135-
using enum_folder_t = std::pair<uint64_t, std::string>;
136-
137135
extern void imap_parser_init(int context_num, int average_num, size_t cache_size, gromox::time_duration timeout, gromox::time_duration autologout_time, int max_auth_times, int block_auth_fail, bool support_tls, bool force_tls, const char *certificate_path, const char *cb_passwd, const char *key_path);
138136
extern int imap_parser_run();
139137
extern tproc_status imap_parser_process(schedule_context *);
@@ -209,27 +207,6 @@ extern bool (*system_services_judge_user)(const char *);
209207
extern void (*system_services_ban_user)(const char *, int);
210208
extern authmgr_login_t system_services_auth_login;
211209
extern gromox::errno_t (*system_services_auth_meta)(const char *username, unsigned int wantpriv, sql_meta_result &out);
212-
extern int (*system_services_get_uid)(const char *, const std::string &fld, const std::string &mid_string, unsigned int *uid);
213-
extern int (*system_services_summary_folder)(const char *, const std::string &, size_t *, size_t *, size_t *, uint32_t *, uint32_t *, int *);
214-
extern int (*system_services_make_folder)(const char *, const std::string &, int *);
215-
extern int (*system_services_remove_folder)(const char *, const std::string &, int *);
216-
extern int (*system_services_rename_folder)(const char *, const std::string &, const std::string &, int *);
217-
extern int (*system_services_ping_mailbox)(const char *, int *);
218-
extern int (*system_services_subscribe_folder)(const char *, const std::string &, int *);
219-
extern int (*system_services_unsubscribe_folder)(const char *, const std::string &, int *);
220-
extern int (*system_services_enum_folders)(const char *, std::vector<enum_folder_t> &, int *);
221-
extern int (*system_services_enum_subscriptions)(const char *, std::vector<enum_folder_t> &, int *);
222-
extern int (*system_services_insert_mail)(const char *, const std::string &fld, const char *, const char *, long, int *);
223-
extern int (*system_services_remove_mail)(const char *, const std::string &fld, const std::vector<MITEM *> &, int *);
224-
extern int (*system_services_list_deleted)(const char *, const std::string &fld, XARRAY *, int *err);
225-
extern int (*system_services_fetch_simple_uid)(const char *, const std::string &fld, const gromox::imap_seq_list &, XARRAY *, int *);
226-
extern int (*system_services_fetch_detail_uid)(const char *, const std::string &fld, const gromox::imap_seq_list &, XARRAY *, int *);
227-
extern int (*system_services_set_flags)(const char *, const std::string &fld, const std::string &mid, int, int *);
228-
extern int (*system_services_unset_flags)(const char *, const std::string &fld, const std::string &mid, int, int *);
229-
extern int (*system_services_get_flags)(const char *, const std::string &fld, const std::string &mid, int *, int *);
230-
extern int (*system_services_copy_mail)(const char *, const std::string &fld, const std::string &mid, const std::string &dst_fld, std::string &dst_mid, int *);
231-
extern int (*system_services_search)(const char *, const std::string &fld, const char *, int, char **, std::string &, int *);
232-
extern int (*system_services_search_uid)(const char *, const std::string &fld, const char *, int, char **, std::string &, int *);
233210
extern void (*system_services_install_event_stub)(void (*)(char *));
234211
extern void (*system_services_broadcast_event)(const char *);
235212
extern void (*system_services_broadcast_select)(const char *, const std::string &fld);

0 commit comments

Comments
 (0)