mirror of
https://github.com/tribufu/sdk-rust
synced 2025-06-16 11:14:17 +00:00
Create Rust Project
This commit is contained in:
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);
|
||||
}
|
||||
}
|
21
Source/Account/Device.rs
Normal file
21
Source/Account/Device.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
use libc::c_char;
|
||||
|
||||
pub fn GetDevice(id: *const c_char) {}
|
||||
|
||||
pub fn GetUserDevices(id: *const c_char) {}
|
||||
|
||||
mod External {
|
||||
use libc::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetDevice(id: *const c_char) {
|
||||
super::GetDevice(id);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetUserDevices(id: *const c_char) {
|
||||
super::GetUserDevices(id);
|
||||
}
|
||||
}
|
21
Source/Account/Email.rs
Normal file
21
Source/Account/Email.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
use libc::c_char;
|
||||
|
||||
pub fn GetEmail(address: *const c_char) {}
|
||||
|
||||
pub fn GetUserEmails(id: *const c_char) {}
|
||||
|
||||
mod External {
|
||||
use libc::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetEmail(address: *const c_char) {
|
||||
super::GetEmail(address);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetUserEmails(id: *const c_char) {
|
||||
super::GetUserEmails(id);
|
||||
}
|
||||
}
|
21
Source/Account/Role.rs
Normal file
21
Source/Account/Role.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
use libc::c_char;
|
||||
|
||||
pub fn GetRole(id: *const c_char) {}
|
||||
|
||||
pub fn GetUserRoles(id: *const c_char) {}
|
||||
|
||||
mod External {
|
||||
use libc::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetRole(id: *const c_char) {
|
||||
super::GetRole(id);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetUserRoles(id: *const c_char) {
|
||||
super::GetUserRoles(id);
|
||||
}
|
||||
}
|
14
Source/Account/User.rs
Normal file
14
Source/Account/User.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
use libc::c_char;
|
||||
|
||||
pub fn GetUser(id: *const c_char) {}
|
||||
|
||||
mod External {
|
||||
use libc::c_char;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GetUser(id: *const c_char) {
|
||||
super::GetUser(id);
|
||||
}
|
||||
}
|
6
Source/Account/mod.rs
Normal file
6
Source/Account/mod.rs
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
pub mod Auth;
|
||||
pub mod Device;
|
||||
pub mod Role;
|
||||
pub mod User;
|
Reference in New Issue
Block a user