Deluge Firmware 1.3.0
Build date: 2025.06.05
Loading...
Searching...
No Matches
smsysex.h
1#include "definitions_cxx.hpp"
2#include "io/midi/midi_device_manager.h"
3#include "storage/storage_manager.h"
4
5struct FILdata;
6
7namespace smSysex {
8
9const uint32_t MAX_PATH_NAME_LEN = 255;
10
11// Helper structure for file operation parameters
13 String fromName;
14 String toName;
15 uint32_t date = 0;
16 uint32_t time = 0;
17
18 const char* getFromPath() const { return fromName.get(); }
19 const char* getToPath() const { return toName.get(); }
20 const TCHAR* getFromTC() const { return (const TCHAR*)fromName.get(); }
21 const TCHAR* getToTC() const { return (const TCHAR*)toName.get(); }
22 bool hasTimestamp() const { return date != 0 || time != 0; }
23};
24
25FILdata* openFIL(const char* fPath, int forWrite, uint32_t* fsize, FRESULT* eCode);
26FRESULT closeFIL(FILdata* fd);
27FILdata* findEmptyFIL();
28
29void noteSessionIdUse(uint8_t msgId);
30void noteFileIdUse(FILdata* fp);
31FILdata* entryForFID(uint32_t fileId);
32void startDirect(JsonSerializer& writer);
33void startReply(JsonSerializer& writer, JsonDeserializer& reader);
34void sendMsg(MIDICable& device, JsonSerializer& writer);
35
36void sysexReceived(MIDICable& cable, uint8_t* data, int32_t len);
37void handleNextSysEx();
38void openFile(MIDICable& cable, JsonDeserializer& reader);
39void closeFile(MIDICable& cable, JsonDeserializer& reader);
40void readBlock(MIDICable& cable, JsonDeserializer& reader);
41void writeBlock(MIDICable& cable, JsonDeserializer& reader);
42void getDirEntries(MIDICable& cable, JsonDeserializer& reader);
43void deleteFile(MIDICable& cable, JsonDeserializer& reader);
44void createDirectory(MIDICable& cable, JsonDeserializer& reader);
45FRESULT createPathDirectories(String& path, uint32_t date, uint32_t time);
46void rename(MIDICable& cable, JsonDeserializer& reader);
47void updateTime(MIDICable& cable, JsonDeserializer& reader);
48void copyFile(MIDICable& cable, JsonDeserializer& reader);
49void moveFile(MIDICable& cable, JsonDeserializer& reader);
50void assignSession(MIDICable& cable, JsonDeserializer& reader);
51void doPing(MIDICable& cable, JsonDeserializer& reader);
52uint32_t decodeDataFromReader(JsonDeserializer& reader, uint8_t* dest, uint32_t destMax);
53
54// Helper functions for file operations
55bool parseFileOpParams(JsonDeserializer& reader, FileOpParams& params);
56FRESULT performFileCopy(const FileOpParams& params);
57void setFileTimestamp(const TCHAR* path, uint32_t date, uint32_t time);
58
59} // namespace smSysex
Definition storage_manager.h:296
Definition storage_manager.h:264
A MIDI cable connection. Stores all state specific to a given cable and its contained ports and chann...
Definition midi_device.h:94
Definition d_string.h:41
Definition param.cpp:27
Definition smsysex.cpp:37
Definition smsysex.h:12