2014-12-24 18:32:32 -05:00
|
|
|
#include <libotr/proto.h>
|
|
|
|
#include <libotr/message.h>
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <cmocka.h>
|
|
|
|
|
|
|
|
#include "config/account.h"
|
|
|
|
|
|
|
|
#include "otr/otr.h"
|
|
|
|
|
|
|
|
OtrlUserState otr_userstate(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
OtrlMessageAppOps* otr_messageops(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
GHashTable* otr_smpinitators(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void otr_init(void) {}
|
|
|
|
void otr_shutdown(void) {}
|
|
|
|
|
|
|
|
char* otr_libotr_version(void)
|
|
|
|
{
|
2019-05-08 15:51:29 -04:00
|
|
|
return mock_ptr_type(char*);
|
2014-12-24 18:32:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
char* otr_start_query(void)
|
|
|
|
{
|
2019-05-08 15:51:29 -04:00
|
|
|
return mock_ptr_type(char*);
|
2014-12-24 18:32:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void otr_poll(void) {}
|
|
|
|
void otr_on_connect(ProfAccount *account) {}
|
2015-06-21 13:00:57 -04:00
|
|
|
char* otr_on_message_recv(const char * const barejid, const char * const resource, const char * const message, gboolean *was_decrypted)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2016-08-18 17:51:06 -04:00
|
|
|
gboolean otr_on_message_send(ProfChatWin *chatwin, const char * const message, gboolean request_receipt)
|
2015-06-20 20:48:25 -04:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2014-12-24 18:32:32 -05:00
|
|
|
|
|
|
|
void otr_keygen(ProfAccount *account)
|
|
|
|
{
|
|
|
|
check_expected(account);
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean otr_key_loaded(void)
|
|
|
|
{
|
|
|
|
return (gboolean)mock();
|
|
|
|
}
|
|
|
|
|
2015-03-16 17:41:35 -04:00
|
|
|
char* otr_tag_message(const char * const msg)
|
2015-04-27 18:17:38 -04:00
|
|
|
{
|
2015-03-16 17:41:35 -04:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2014-12-24 18:32:32 -05:00
|
|
|
gboolean otr_is_secure(const char * const recipient)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean otr_is_trusted(const char * const recipient)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void otr_trust(const char * const recipient) {}
|
|
|
|
void otr_untrust(const char * const recipient) {}
|
|
|
|
|
|
|
|
void otr_smp_secret(const char * const recipient, const char *secret) {}
|
|
|
|
void otr_smp_question(const char * const recipient, const char *question, const char *answer) {}
|
|
|
|
void otr_smp_answer(const char * const recipient, const char *answer) {}
|
|
|
|
|
|
|
|
void otr_end_session(const char * const recipient) {}
|
|
|
|
|
|
|
|
char * otr_get_my_fingerprint(void)
|
|
|
|
{
|
2019-05-08 15:51:29 -04:00
|
|
|
return mock_ptr_type(char *);
|
2014-12-24 18:32:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
char * otr_get_their_fingerprint(const char * const recipient)
|
|
|
|
{
|
|
|
|
check_expected(recipient);
|
2019-05-08 15:51:29 -04:00
|
|
|
return mock_ptr_type(char *);
|
2014-12-24 18:32:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
char * otr_encrypt_message(const char * const to, const char * const message)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
char * otr_decrypt_message(const char * const from, const char * const message,
|
|
|
|
gboolean *was_decrypted)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void otr_free_message(char *message) {}
|
|
|
|
|
|
|
|
prof_otrpolicy_t otr_get_policy(const char * const recipient)
|
|
|
|
{
|
|
|
|
return PROF_OTRPOLICY_MANUAL;
|
2015-03-16 17:41:35 -04:00
|
|
|
}
|