Commit Graph

22 Commits

Author SHA1 Message Date
tenrys 620e9a6b26 Added Windows connection support 2018-04-02 21:42:57 +00:00
Patrick Auernig 1e3e9485df Import restructuring
Use new grouping syntax from Rust 1.25
Group `use` in following order:
std, external, internal
2018-03-29 23:40:56 +02:00
Patrick Auernig 94fd95d516 Add test for opcode conversion 2018-03-29 23:11:24 +02:00
Patrick Auernig fd1dc15a29 Use Result value for OpCode conversion
Conversion could fail if integer is not in range 0...4.
2018-03-29 23:00:58 +02:00
Patrick Auernig 40be78dbd1 Add error type 2018-03-29 22:57:00 +02:00
Patrick Auernig 332dbab413 Move nonce generator to utils module 2018-03-28 23:50:25 +02:00
Patrick Auernig 3c79bb15fa Move Rich Presence code into own submodule 2018-03-28 22:55:26 +02:00
Patrick Auernig cbe540dcff Update tests for SetActivity
Only test full and empty object serialization.
2018-03-28 16:37:41 +02:00
Patrick Auernig afe1503ad9 Move getpid to utils module 2018-03-25 20:55:38 +02:00
Patrick Auernig 54ace3a5e9 Implement From<u32> trait for OpCode
And store Message.opcode as OpCode instead of u32.
2018-03-24 21:42:39 +01:00
Patrick Auernig 2635086e97 Use byteorder crate instead of byte 2018-03-24 15:15:48 +01:00
Patrick Auernig c5ae80007e Remove useless shrink_to_fit in message encoder 2018-03-23 22:55:31 +01:00
Patrick Auernig e853fa94a1 Set fixed read buffer size 2018-03-23 22:54:30 +01:00
Patrick Auernig 00c61cfa72 Represent opcodes as enum instead of u32 2018-03-23 22:54:23 +01:00
Patrick Auernig 0e38bf634d Use libc::getpid instead of std::process::id
Until the std::process::id interface becomes stable.
2018-03-23 11:04:19 +01:00
Patrick Auernig 53bab6857e Add Connection trait and implement UnixConnection 2018-03-22 22:54:49 +01:00
Patrick Auernig 43c8a6af5f Privatize struct fields 2018-03-22 20:54:18 +01:00
Patrick Auernig 86fa860499 Add log crate 2018-03-22 20:21:08 +01:00
Patrick Auernig a078b9c322 Fix alias modifier and add serialization tests 2018-03-22 18:39:09 +01:00
Patrick Auernig ca1a84eeee Make models and client modules public 2018-03-22 18:12:41 +01:00
Patrick Auernig 9a9fc504fe Add macro to build message structs and impls 2018-03-22 18:11:41 +01:00
Patrick Auernig f24793d7f2 Add Discord rich presence support
Allow sending rich presence status to your Discord client.
Currently only supports setting the status once.
Only Unix systems supported for now.
2018-03-22 15:35:48 +01:00