diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2016-12-17 15:50:27 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-12-17 16:00:19 +0100 |
commit | 8ceac0236c555979a9172c69c1a9e895d7487d6f (patch) | |
tree | 390740422d514ac62bc572d61c64e7375f2d7a27 /rust/src/sendxmpp.rs | |
parent | f355162fde31a4c79b7e665b43cef2de3ba05cb5 (diff) | |
download | auth-xmppmessage-8ceac0236c555979a9172c69c1a9e895d7487d6f.tar.gz auth-xmppmessage-8ceac0236c555979a9172c69c1a9e895d7487d6f.zip |
replace all with subdirectory rust/
Diffstat (limited to 'rust/src/sendxmpp.rs')
-rw-r--r-- | rust/src/sendxmpp.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/rust/src/sendxmpp.rs b/rust/src/sendxmpp.rs deleted file mode 100644 index 2db471e..0000000 --- a/rust/src/sendxmpp.rs +++ /dev/null @@ -1,21 +0,0 @@ -///! Interface for the C implementation oof sending xmpp message - -use std::ffi::{CString, NulError}; -use std::os::raw::c_char; - -pub fn send_message(jid: &str, password: &str, message: &str, to: &str) -> Result<(), NulError> { - extern { - pub fn send_message(jid: *const c_char, - password: *const c_char, - message: *const c_char, - to: *const c_char); - } - let cjid = try!(CString::new(jid)); - let cpassword = try!(CString::new(password)); - let cmessage = try!(CString::new(message)); - let cto = try!(CString::new(to)); - unsafe { - send_message(cjid.as_ptr(), cpassword.as_ptr(), cmessage.as_ptr(), cto.as_ptr()); - } - Ok(()) -}
\ No newline at end of file |