diff --git a/TODO b/TODO index f8cfd1e..da71424 100644 --- a/TODO +++ b/TODO @@ -1,50 +1,3 @@ -Modular design -============== -[ ] Authentication and authorization - [ ] SQLite3 - [ ] MySQL - [ ] PostgreSQL - [ ] LDAP -[ ] Roster storage - [ ] SQLite3 - [ ] MySQL - [ ] PostgreSQL - [ ] LDAP? -[ ] Group chat -[ ] File sending -[ ] Server-side chat logging - -[ ] GnuTLS -[X] gLib -[ ] gNet - -Hooks -===== - -[ ] c2s-message -[ ] s2c-message -[ ] s2s-message -[ ] client-authentication -[ ] client-authorization -[ ] client-presence-change - -Configuration file -================== - -[X] Global logging -[X] Modules - [X] Module directory - [X] Modules to load on startup -[X] Interface - [X] IP - [X] Port - [X] Domain - [-] Certificate file - [-] Key file - [X] Logging - [X] Log destination: syslog, file - [X] Log options: connection events, etc. - Code flow ========= @@ -109,18 +62,3 @@ module must always check the jid via an user storage module, and if necessary, it should get the password (or any other credentials like a X509 certificate's Common Name field, or a Kerberos principal name) from this storage module, either. - -Additional modules to provide -============================= -[ ] user-mysql -[ ] roster-mysql -[ ] user-postgresql -[ ] roster-postgresql -[ ] user-ldap -[ ] roster-ldap? -[ ] auth-cyrus-sasl -[ ] log-c2c -[ ] conn-blackwhite-list - -Create a well defined module programming API! - diff --git a/autogen.sh b/autogen.sh old mode 100755 new mode 100644 diff --git a/modules/Makefile.am b/modules/Makefile.am index d68626b..4c174c8 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -1,4 +1,4 @@ -lib_LTLIBRARIES = libmod-layer-gnutls.la libmod-auth-gsasl.la libmod-users-sqlite3.la libmod-roster-sqlite3.la +lib_LTLIBRARIES = libmod-layer-gnutls.la libmod-auth-gsasl.la libmod-users-sqlite3.la libmod-roster-sqlite3.la libmod-socket-tcpip.la libmod_layer_gnutls_la_SOURCES = layer-gnutls.c libmod_layer_gnutls_la_CPPFLAGS = -I ../src libmod_auth_gsasl_la_SOURCES = auth-gsasl.c @@ -7,3 +7,5 @@ libmod_users_sqlite3_la_SOURCES = users-sqlite3.c libmod_users_sqlite3_la_CPPFLAGS = -I ../src libmod_roster_sqlite3_la_SOURCES = roster-sqlite3.c libmod_roster_sqlite3_la_CPPFLAGS = -I ../src +libmod_socket_tcpip_la_SOURCES = socket-tcpip.c +libmod_socket_tcpip_la_CPPFLAGS = -I ../src diff --git a/modules/auth-gsasl.c b/modules/auth-gsasl.c index 7e6bb4d..9c99235 100644 --- a/modules/auth-gsasl.c +++ b/modules/auth-gsasl.c @@ -2,9 +2,18 @@ int wxmppd_mod_auth_gsasl_load(funcptr *); +char *wxmppd_mod_auth_gsasl_runtime_conflicts = { + "auth-cyrus-sasl", + NULL, +}; + const wxmppd_module_data_t module_data = { "auth-gsasl", "GNU SASL authentication extension", + NULL, + NULL, + NULL, + &wxmppd_mod_auth_gsasl_runtime_conflicts, (funcptr)wxmppd_mod_auth_gsasl_load, }; diff --git a/modules/layer-gnutls.c b/modules/layer-gnutls.c index ae091b0..b96bd71 100644 --- a/modules/layer-gnutls.c +++ b/modules/layer-gnutls.c @@ -2,9 +2,17 @@ int wxmppd_mod_layer_gnutls_load(funcptr *); +char *wxmppd_mod_layer_gnutls_runtime_conflicts[] = { + "layer-openssl", +}; + const wxmppd_module_data_t module_data = { "layer-gnutls", "GnuTLS interface extension", + NULL, + NULL, + NULL, + &wxmppd_mod_layer_gnutls_runtime_conflicts, (funcptr)wxmppd_mod_layer_gnutls_load, }; diff --git a/modules/roster-sqlite3.c b/modules/roster-sqlite3.c index 19ae46d..e06bec4 100644 --- a/modules/roster-sqlite3.c +++ b/modules/roster-sqlite3.c @@ -5,6 +5,10 @@ int wxmppd_mod_roster_sqlite3_load(funcptr *); const wxmppd_module_data_t module_data = { "roster-sqlite3", "SQLite3 storage module for roster data storage", + NULL, + NULL, + NULL, + NULL, (funcptr)wxmppd_mod_roster_sqlite3_load, }; diff --git a/modules/users-sqlite3.c b/modules/users-sqlite3.c index cb59ac7..29c43e9 100644 --- a/modules/users-sqlite3.c +++ b/modules/users-sqlite3.c @@ -5,6 +5,10 @@ int wxmppd_mod_users_sqlite3_load(funcptr *); const wxmppd_module_data_t module_data = { "users-sqlite3", "SQLite3 storage module for user data storage", + NULL, + NULL, + NULL, + NULL, (funcptr)wxmppd_mod_users_sqlite3_load, }; diff --git a/src/module.h b/src/module.h index aaa51fa..bc5f21b 100644 --- a/src/module.h +++ b/src/module.h @@ -6,6 +6,10 @@ typedef int * (*funcptr) (); typedef struct _wxmppd_module_data_t { char *name; char *description; + char **load_deps; + char **runtime_deps; + char **load_conflicts; + char **runtime_conflicts; funcptr *load_func; } wxmppd_module_data_t;