1extern crate libc;
2
3use libc::{c_char, c_uchar, c_int, c_uint, c_ushort, size_t, ssize_t};
4
5pub enum Shout {}
6pub enum ShoutMetadata {}
7
8extern "C" {
9 pub fn shout_init();
10 pub fn shout_shutdown();
11 pub fn shout_version(major: *mut c_int, minor: *mut c_int, patch: *mut c_int) -> *const c_char;
12 pub fn shout_new() -> *mut Shout;
13 pub fn shout_free(shout: *mut Shout);
14
15 pub fn shout_get_error(shout: *mut Shout) -> *const c_char;
16 pub fn shout_get_errno(shout: *mut Shout) -> c_int;
17
18 pub fn shout_get_connected(shout: *mut Shout) -> c_int;
19
20 pub fn shout_set_host(shout: *mut Shout, host: *const c_char) -> c_int;
21 pub fn shout_get_host(shout: *mut Shout) -> *const c_char;
22
23 pub fn shout_set_port(shout: *mut Shout, port: c_ushort) -> c_int;
24 pub fn shout_get_port(shout: *mut Shout) -> c_ushort;
25
26 pub fn shout_set_agent(shout: *mut Shout, agent: *const c_char) -> c_int;
27 pub fn shout_get_agent(shout: *mut Shout) -> *const c_char;
28
29 pub fn shout_set_tls(shout: *mut Shout, mode: c_int) -> c_int;
30 pub fn shout_get_tls(shout: *mut Shout) -> c_int;
31
32 pub fn shout_set_ca_directory(shout: *mut Shout, directory: *const c_char) -> c_int;
33 pub fn shout_get_ca_directory(shout: *mut Shout) -> *const c_char;
34
35 pub fn shout_set_ca_file(shout: *mut Shout, file: *const c_char) -> c_int;
36 pub fn shout_get_ca_file(shout: *mut Shout) -> *const c_char;
37
38 pub fn shout_set_allowed_ciphers(shout: *mut Shout, ciphers: *const c_char) -> c_int;
39 pub fn shout_get_allowed_ciphers(shout: *mut Shout) -> *const c_char;
40
41 pub fn shout_set_user(shout: *mut Shout, user: *const c_char) -> c_int;
42 pub fn shout_get_user(shout: *mut Shout) -> *const c_char;
43
44 pub fn shout_set_password(shout: *mut Shout, password: *const c_char) -> c_int;
45 pub fn shout_get_password(shout: *mut Shout) -> *const c_char;
46
47 pub fn shout_set_client_certificate(shout: *mut Shout, certificate: *const c_char) -> c_int;
48 pub fn shout_get_client_certificate(shout: *mut Shout) -> *const c_char;
49
50 pub fn shout_set_mount(shout: *mut Shout, mount: *const c_char) -> c_int;
51 pub fn shout_get_mount(shout: *mut Shout) -> *const c_char;
52
53 pub fn shout_set_dumpfile(shout: *mut Shout, dumpfile: *const c_char) -> c_int;
54 pub fn shout_get_dumpfile(shout: *mut Shout) -> *const c_char;
55
56 pub fn shout_set_audio_info(shout: *mut Shout, name: *const c_char, value: *const c_char) -> c_int;
57 pub fn shout_get_audio_info(shout: *mut Shout, name: *const c_char) -> *const c_char;
58
59 pub fn shout_set_meta(shout: *mut Shout, name: *const c_char, value: *const c_char) -> c_int;
60 pub fn shout_get_meta(shout: *mut Shout, name: *const c_char) -> *const c_char;
61
62 pub fn shout_set_public(shout: *mut Shout, make_public: c_uint) -> c_int;
63 pub fn shout_get_public(shout: *mut Shout) -> c_uint;
64
65 pub fn shout_set_format(shout: *mut Shout, format: c_uint) -> c_int;
66 pub fn shout_get_format(shout: *mut Shout) -> c_uint;
67
68 pub fn shout_set_protocol(shout: *mut Shout, protocol: c_uint) -> c_int;
69 pub fn shout_get_protocol(shout: *mut Shout) -> c_uint;
70
71 pub fn shout_set_nonblocking(shout: *mut Shout, protocol: c_uint) -> c_int;
72 pub fn shout_get_nonblocking(shout: *mut Shout) -> c_uint;
73
74 pub fn shout_open(shout: *mut Shout) -> c_int;
75 pub fn shout_close(shout: *mut Shout) -> c_int;
76
77 pub fn shout_send(shout: *mut Shout, data: *const c_uchar, len: size_t) -> c_int;
78 pub fn shout_send_raw(shout: *mut Shout, data: *const c_uchar, len: size_t) -> ssize_t;
79
80 pub fn shout_queuelen(shout: *mut Shout) -> ssize_t;
81
82 pub fn shout_sync(shout: *mut Shout);
83
84 pub fn shout_delay(shout: *mut Shout) -> c_int;
85
86 pub fn shout_set_metadata(shout: *mut Shout, metadata: *mut ShoutMetadata) -> c_int;
87 pub fn shout_metadata_new() -> *mut ShoutMetadata;
88 pub fn shout_metadata_free(metadata: *mut ShoutMetadata);
89 pub fn shout_metadata_add(metadata: *mut ShoutMetadata, name: *const c_char, value: *const c_char) -> c_int;
90}