homebrew_launcher/src/menu/TcpReceiver.h
dimok789 a63171682d - added support to load and launch RPX files directly through SD or wiiload/sendelf
- added error prints in progress window on failures

NOTE:
For this to work you will need to update the code550.bin (or the mp4 file). The old mp4 will still work but not be able to load RPX files, only ELFs.
2016-11-12 14:04:23 +01:00

43 lines
812 B
C++

#ifndef TCP_RECEIVER_H_
#define TCP_RECEIVER_H_
#include <vector>
#include <string>
#include <gctypes.h>
#include "ProgressWindow.h"
#include "system/CThread.h"
#include "gui/sigslot.h"
class TcpReceiver : public GuiFrame, public CThread
{
public:
enum eLoadResults
{
SUCCESS = 0,
INVALID_INPUT = -1,
FILE_OPEN_FAILURE = -2,
FILE_READ_ERROR = -3,
NOT_ENOUGH_MEMORY = -4,
};
TcpReceiver(int port);
~TcpReceiver();
sigslot::signal2<GuiElement *, u32> serverReceiveStart;
sigslot::signal3<GuiElement *, u32, int> serverReceiveFinished;
private:
void executeThread();
int loadToMemory(s32 clientSocket, u32 ipAddress);
bool exitRequested;
s32 serverPort;
s32 serverSocket;
ProgressWindow progressWindow;
};
#endif