1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! An MSNP11 client SDK.
//! # Login
//! ```
//! use msnp11_sdk::client::Client;
//! use msnp11_sdk::enums::event::Event;
//! use msnp11_sdk::models::personal_message::PersonalMessage;
//! use msnp11_sdk::enums::msnp_status::MsnpStatus;
//!
//! let mut client = Client::new("127.0.0.1", 1863)
//! .await
//! .unwrap();
//!
//! client.add_event_handler_closure(|event| async { /* Handle events... */ });
//!
//! // Handle a redirection by creating a new connection
//! if let Ok(Event::RedirectedTo { server, port }) = client
//! .login(
//! "testing@example.com".to_string(),
//! "123456",
//! "http://localhost:3000/rdr/pprdr.asp",
//! "msnp11-sdk",
//! "0.11.1"
//! )
//! .await
//! {
//! client = Client::new(&*server, port).await.unwrap();
//! client
//! .login(
//! "testing@example.com".to_string(),
//! "123456",
//! "http://localhost:3000/rdr/pprdr.asp",
//! "msnp11-sdk",
//! "0.11.1"
//! )
//! .await
//! .unwrap();
//! }
//!
//! client.set_presence(MsnpStatus::Online).await.unwrap();
//! client
//! .set_personal_message(&PersonalMessage {
//! psm: "test".to_string(),
//! current_media: "".to_string(),
//! })
//! .await
//! .unwrap();
//! ```
//! # Bindings
//! Bindings for Kotlin and Swift can be generated with
//! [UniFFI](https://mozilla.github.io/uniffi-rs/latest/tutorial/foreign_language_bindings.html#multi-crate-workspaces).
//!
setup_scaffolding!;
pub use Client;
pub use Event;
pub use MsnpList;
pub use MsnpStatus;
pub use ContactError;
pub use MessagingError;
pub use P2pError;
pub use SdkError;
pub use MsnObject;
pub use PersonalMessage;
pub use PlainText;
pub use Presence;
pub use Switchboard;
pub use Config;
pub use Tab;