mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Add FTP.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* Copyright (C) 2019 VoltZ, Epicpkmn11, Flame, RocketRobz, TotallyNotGuy
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
|
||||
* * Requiring preservation of specified reasonable legal notices or
|
||||
* author attributions in that material or in the Appropriate Legal
|
||||
* Notices displayed by works containing it.
|
||||
* * Prohibiting misrepresentation of the origin of that material,
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
|
||||
#include "screens/screen.hpp"
|
||||
|
||||
class FTPScreen : public Screen
|
||||
{
|
||||
public:
|
||||
void Draw(void) const override;
|
||||
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
|
||||
|
||||
private:
|
||||
int ftpEnabled = 1;
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _3DS
|
||||
#include <3ds.h>
|
||||
#define ESC(x) "\x1b[" #x
|
||||
#define RESET ESC(0m)
|
||||
#define BLACK ESC(30m)
|
||||
#define RED ESC(31;1m)
|
||||
#define GREEN ESC(32;1m)
|
||||
#define YELLOW ESC(33;1m)
|
||||
#define BLUE ESC(34;1m)
|
||||
#define MAGENTA ESC(35;1m)
|
||||
#define CYAN ESC(36;1m)
|
||||
#define WHITE ESC(37;1m)
|
||||
#else
|
||||
#define ESC(x)
|
||||
#define RESET
|
||||
#define BLACK
|
||||
#define RED
|
||||
#define GREEN
|
||||
#define YELLOW
|
||||
#define BLUE
|
||||
#define MAGENTA
|
||||
#define CYAN
|
||||
#define WHITE
|
||||
#endif
|
||||
|
||||
void console_init(void);
|
||||
|
||||
__attribute__((format(printf,1,2)))
|
||||
void console_set_status(const char *fmt, ...);
|
||||
|
||||
__attribute__((format(printf,1,2)))
|
||||
void console_print(const char *fmt, ...);
|
||||
|
||||
__attribute__((format(printf,1,2)))
|
||||
void debug_print(const char *fmt, ...);
|
||||
|
||||
void console_render(void);
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
/*! Loop status */
|
||||
typedef enum
|
||||
{
|
||||
LOOP_CONTINUE, /*!< Continue looping */
|
||||
LOOP_RESTART, /*!< Reinitialize */
|
||||
LOOP_EXIT, /*!< Terminate looping */
|
||||
} loop_status_t;
|
||||
|
||||
bool isTransfering;
|
||||
char ftp_accepted_connection[50], ftp_file_transfer[100];
|
||||
|
||||
int ftp_init(void);
|
||||
loop_status_t ftp_loop(void);
|
||||
void ftp_exit(void);
|
||||
Reference in New Issue
Block a user