Clear repository

This commit is contained in:
GuilhermeWerner
2021-08-04 12:11:32 -03:00
parent 7ea5da797a
commit 17388bbd9d
30 changed files with 8 additions and 802 deletions

View File

@ -1,35 +0,0 @@
// 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);
}
}

View File

@ -1,21 +0,0 @@
// 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);
}
}

View File

@ -1,21 +0,0 @@
// 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);
}
}

View File

@ -1,21 +0,0 @@
// 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);
}
}

View File

@ -1,14 +0,0 @@
// 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);
}
}

View File

@ -1,6 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
pub mod Auth;
pub mod Device;
pub mod Role;
pub mod User;

View File

@ -1,28 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn AddFriend(id1: *const c_char, id2: *const c_char) {}
pub fn AcceptFriend(id1: *const c_char, id2: *const c_char) {}
pub fn GetFriends(id: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn AddFriend(id1: *const c_char, id2: *const c_char) {
super::AddFriend(id1, id2);
}
#[no_mangle]
pub extern "C" fn AcceptFriend(id1: *const c_char, id2: *const c_char) {
super::AcceptFriend(id1, id2);
}
#[no_mangle]
pub extern "C" fn GetFriends(id: *const c_char) {
super::GetFriends(id);
}
}

View File

@ -1,17 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
pub fn InviteToTeam() {}
pub fn EnterTeam() {}
mod External {
#[no_mangle]
pub extern "C" fn InviteToTeam() {
super::InviteToTeam();
}
#[no_mangle]
pub extern "C" fn EnterTeam() {
super::EnterTeam();
}
}

View File

@ -1,14 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
use libc::c_char;
pub fn GetMessage(id: *const c_char) {}
mod External {
use libc::c_char;
#[no_mangle]
pub extern "C" fn GetMessage(id: *const c_char) {
super::GetMessage(id);
}
}

View File

@ -1,61 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
#pragma once
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#define TRIBUFU_SDK 1
#ifdef __cplusplus
namespace TribuFu
{
#endif
#ifdef __cplusplus
extern "C"
{
#endif
void AcceptFriend(const char *id1, const char *id2);
void AddFriend(const char *id1, const char *id2);
void EnterTeam(void);
void GetDevice(const char *id);
void GetFriends(const char *id);
void GetMessage(const char *id);
void GetRole(const char *id);
void GetUser(const char *id);
void GetUserDevices(const char *id);
void GetUserRoles(const char *id);
int32_t Hello(void);
void InviteToTeam(void);
void Login(const char *name, const char *password);
void Logout(void);
void Refresh(void);
void Register(const char *name, const char *email, const char *password);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif

View File

@ -1,15 +1,11 @@
// Copyright (c) TribuFu. All Rights Reserved
#![allow(dead_code)]
#![allow(unused_variables)]
//! TribuFu SDK.
#![allow(non_snake_case)]
pub mod Account;
pub mod Friends;
pub mod Matchmaking;
pub mod Messages;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[no_mangle]
pub extern "C" fn Hello() -> i32 {
return 1;
pub fn Hello(input: String) -> String {
return format!("Hello {}", input);
}