qvopenapi_bindings/bindings/
mod.rs

1use std::ffi::{c_char, c_int};
2
3include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
4
5#[repr(C)]
6pub struct OutDataBlock<T> {
7    pub tr_index: c_int,
8    pub p_data: *const ReceivedData<T>,
9}
10
11#[repr(C)]
12pub struct ReceivedData<T> {
13    pub block_name: *const c_char,
14    pub sz_data: *const T,
15    pub len: c_int,
16}
17
18#[repr(C)]
19pub struct MessageHeader {
20    pub message_code: [c_char; 5],
21    pub message: [c_char; 80],
22}
23
24#[repr(C)]
25pub struct LoginBlock {
26    pub tr_index: c_int,
27    pub login_info: *const LoginInfo,
28}
29
30#[repr(C)]
31pub struct LoginInfo {
32    pub login_datetime: [c_char; 14],
33    pub server_name: [c_char; 15],
34    pub user_id: [c_char; 8],
35    pub account_count: [c_char; 3],
36    pub account_infoes: [AccountInfo; 999],
37}
38
39#[repr(C)]
40pub struct AccountInfo {
41    pub account_no: [c_char; 11],
42    pub account_name: [c_char; 40],
43    // 상품 코드
44    pub act_pdt_cdz3: [c_char; 3],
45    // 관리점 코드
46    pub amn_tab_cdz4: [c_char; 4],
47    // 위임 만기일
48    pub expr_datez8: [c_char; 8],
49    // 일괄주문 허용계좌(G:허용)
50    pub granted: c_char,
51    // filler
52    pub filler: [c_char; 189],
53}