diff options
Diffstat (limited to 'tests/unittests/xmpp')
-rw-r--r-- | tests/unittests/xmpp/stub_xmpp.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c index 7b49fdc6..87fbeb70 100644 --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -6,9 +6,9 @@ #include "xmpp/xmpp.h" // connection functions -void jabber_init(void) {} +void session_init(void) {} -jabber_conn_status_t jabber_connect_with_details(const char * const jid, +jabber_conn_status_t session_connect_with_details(const char * const jid, const char * const passwd, const char * const altdomain, const int port, const char *const tls_policy) { check_expected(jid); @@ -18,31 +18,43 @@ jabber_conn_status_t jabber_connect_with_details(const char * const jid, return (jabber_conn_status_t)mock(); } -jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account) +jabber_conn_status_t session_connect_with_account(const ProfAccount * const account) { check_expected(account); return (jabber_conn_status_t)mock(); } -void jabber_disconnect(void) {} -void jabber_shutdown(void) {} -void jabber_process_events(int millis) {} -const char * jabber_get_fulljid(void) +void session_disconnect(void) {} +void session_shutdown(void) {} +void session_process_events(int millis) {} +const char * session_get_fulljid(void) { return (char *)mock(); } -const char * jabber_get_domain(void) +const char * session_get_domain(void) { return NULL; } -char* jabber_create_uuid(void) +gboolean session_conn_is_secured(void) +{ + return 1; +} + +TLSCertificate* +session_get_tls_peer_cert(void) +{ + return NULL; +} + + +char* session_create_uuid(void) { return NULL; } -void jabber_free_uuid(char * uuid) {} +void session_free_uuid(char * uuid) {} jabber_conn_status_t connection_get_status(void) { @@ -54,24 +66,24 @@ char* connection_get_presence_msg(void) return (char*)mock(); } -char* jabber_get_account_name(void) +char* session_get_account_name(void) { return (char*)mock(); } -GList * jabber_get_available_resources(void) +GList * session_get_available_resources(void) { return NULL; } gboolean -jabber_send_stanza(const char *const stanza) +session_send_stanza(const char *const stanza) { return TRUE; } gboolean -jabber_service_supports(const char *const feature) +session_service_supports(const char *const feature) { return FALSE; } |