summaryrefslogtreecommitdiffstats
path: root/ircxmpp.h
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-05-02 00:45:48 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2022-05-02 00:45:48 +0200
commit877b7b64021410c1bb686cad562e7446eb65c318 (patch)
tree2ec40e995636cfbb86655d9f4feb67730c85fb43 /ircxmpp.h
parent0.0.5 (diff)
downloadircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.tar
ircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.tar.gz
ircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.tar.bz2
ircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.tar.lz
ircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.tar.xz
ircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.tar.zst
ircxmpp-877b7b64021410c1bb686cad562e7446eb65c318.zip
Diffstat (limited to 'ircxmpp.h')
-rw-r--r--ircxmpp.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/ircxmpp.h b/ircxmpp.h
index 29b4419..38b6f16 100644
--- a/ircxmpp.h
+++ b/ircxmpp.h
@@ -4,8 +4,9 @@ enum ircxmpp_loglevel {
IRCXMPP_WARN,
IRCXMPP_ERROR
};
-typedef void (*ircxmpp_logger)
+typedef void (* ircxmpp_logger)
(void * const, const enum ircxmpp_loglevel, const char * const, const char * const);
+typedef void (* ircxmpp_domain_setter) (void *, const char *);
#ifdef IX_LIB /* do not use functions until #endif in programs that use libircxmpp. */
#include <libircclient.h> /* do not use members of struct ircxmpp, use opaque ircxmpp type! */
#include <strophe.h>
@@ -175,6 +176,9 @@ struct ircxmpp {
void * log_userdata;
ircxmpp_logger log_handler;
xmpp_log_t xmpp_logger;
+ ircxmpp_domain_setter domain_setter;
+ void * domain_setter_userdata;
+ char * domain;
};
static void send_xmpp_logs_to_me (
void * const, const xmpp_log_level_t, const char * const, const char * const);
@@ -218,10 +222,11 @@ static void event_numeric_control (
static int irc_run_once (struct bridge *);
static void init_irc (struct bridge *);
static void init_irc_control (struct ircxmpp *);
+// /IRC
static void obdelaj_bridge (const void *, VISIT, int);
static void default_log_handler (
void * const, const enum ircxmpp_loglevel, const char * const, const char * const);
-// /IRC
+static void default_domain_setter (void *, const char *);
#endif // IX_LIB
// ZUNANJE
typedef struct ircxmpp ircxmpp; /* opaque handle */
@@ -235,7 +240,9 @@ void ircxmpp_set_port (ircxmpp *, unsigned short int);
void ircxmpp_set_channel (ircxmpp *, const char *);
void ircxmpp_set_muc (ircxmpp *, const char *);
void ircxmpp_set_channel_password (ircxmpp *, const char *);
-void ircxmpp_run_once (struct ircxmpp *);
-void ircxmpp_free (struct ircxmpp *);
-int ircxmpp_version = 0;
+void ircxmpp_set_domain_setter (ircxmpp *, ircxmpp_domain_setter);
+void ircxmpp_set_domain_setter_userdata (ircxmpp *, void *);
+void ircxmpp_set_domain (ircxmpp *, const char *);
+void ircxmpp_run_once (ircxmpp *);
+void ircxmpp_free (ircxmpp *);
// /ZUNANJE