mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-06-01 09:42:37 +00:00
Create Rust Project
This commit is contained in:
parent
b456f20a4f
commit
36df99c7e0
13 changed files with 230 additions and 0 deletions
35
Source/Account/Auth.rs
Normal file
35
Source/Account/Auth.rs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
use libc::c_char;
|
||||
|
||||
pub fn Login(name: *const c_char, password: *const c_char) {}
|
||||
|
||||
pub fn Logout() {}
|
||||
|
||||
pub fn Refresh() {}
|
||||
|
||||
pub fn Register(name: *const c_char, email: *const c_char, password: *const c_char) {}
|
||||
|
||||
mod External {
|
||||
use libc::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Login(name: *const c_char, password: *const c_char) {
|
||||
super::Login(name, password);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Logout() {
|
||||
super::Logout();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Refresh() {
|
||||
super::Refresh();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Register(name: *const c_char, email: *const c_char, password: *const c_char) {
|
||||
super::Register(name, email, password);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue