Fixed some bugs found in GEN_FILE
genfile commands would still not terminate properly or would end up de-synced with the host in one way or another. the GEN_FILE sub-protocol has been updated to address these issues by having the direction of the genfile data defined in NEW_CMD so this client will now know if the command uploads to the host or downloads from the host when it is defined instead of trying to determine that at runtime. updated all documentation related to the GEN_FILE sub-protocol to reflect these changes.
This commit is contained in:
parent
ac364c1e8f
commit
34753488ff
|
@ -106,7 +106,7 @@ makeself
|
||||||
Linux_build.sh is a custom script designed to build this project from the source code using qmake, make and makeself. You can pass 2 optional arguments:
|
Linux_build.sh is a custom script designed to build this project from the source code using qmake, make and makeself. You can pass 2 optional arguments:
|
||||||
|
|
||||||
1. The path to the QT bin folder in case you want to compile with a QT install not defined in PATH.
|
1. The path to the QT bin folder in case you want to compile with a QT install not defined in PATH.
|
||||||
2. Path of the output makeself file (usually has a .run extension). If not given, the outfile will be named cmdr-1.0.0.run in the source code folder.
|
2. Path of the output makeself file (usually has a .run extension). If not given, the outfile will be named cmdr-x.x.x.run in the source code folder.
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
```
|
```
|
||||||
|
@ -115,6 +115,6 @@ sh ./linux_build.sh
|
||||||
```
|
```
|
||||||
Install:
|
Install:
|
||||||
```
|
```
|
||||||
chmod +x ./cmdr-1.0.0.run
|
chmod +x ./cmdr-x.x.x.run
|
||||||
./cmdr-1.0.0.run
|
./cmdr-x.x.x.run
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
### 3.1 Type IDs ###
|
### 3.1 Type IDs ###
|
||||||
|
|
||||||
All mrci frames transferred to or from this application have an 8bit numeric value to indicate the type of data being passed with the binary data. The type id enum values are as follows:
|
All mrci frames transferred throughout this application have an 8bit numeric value to indicate the type of data being passed with the binary data. The type id enum values are as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
enum TypeID : quint8
|
enum TypeID : quint8
|
||||||
|
@ -47,7 +47,9 @@ format: ```[UTF-16LE_string] (no BOM)```
|
||||||
```GEN_FILE```
|
```GEN_FILE```
|
||||||
This is a file transfer type id that can be used to transfer any file type (music, photos, documents, etc...). It operates in its own protocol of sorts. The 1st GEN_FILE frame received by the host or client is TEXT parameters similar to what you see in terminal command lines with at least one of the arguments listed below. The next set of GEN_FILE frames received by the host or client is then the binary data that needs to be written to an open file or streamed until the limit defined in -len is meet.
|
This is a file transfer type id that can be used to transfer any file type (music, photos, documents, etc...). It operates in its own protocol of sorts. The 1st GEN_FILE frame received by the host or client is TEXT parameters similar to what you see in terminal command lines with at least one of the arguments listed below. The next set of GEN_FILE frames received by the host or client is then the binary data that needs to be written to an open file or streamed until the limit defined in -len is meet.
|
||||||
|
|
||||||
The host or the client can be set as the sender or receiver of the GEN_FILE binary data. Which ever is designated as the receiver by the TEXT parameters need to send an empty GEN_FILE frame to start the process. An example of this can be found in section 3.3.
|
The host or the client can be set as the sender or receiver of the GEN_FILE binary data. This designation is determined by what the command defined in genfile type when the NEW_CMD frame was sent. A genfile type of 2 sets the client as the sender and the host as the receiver. Genfile type 3 sets the client as the receiver and the host as the sender.
|
||||||
|
|
||||||
|
see section 3.3 for an example of how GEN_FILE works.
|
||||||
|
|
||||||
arguments:
|
arguments:
|
||||||
|
|
||||||
|
@ -61,10 +63,6 @@ arguments:
|
||||||
|
|
||||||
* **-single_step** | the presents of this argument tells both the client and host to operate in single step mode. single step mode causes the receiver of the binary data whether host or client to send an empty GEN_FILE frame after successfully receiving the data. this then tells the sender to send the next GEN_FILE frame containing binary data for the file and the cycle continues until len is meet. if this argument is not found, the sender can simply send all GEN_FILE data without waiting for an empty GEN_FILE from the receiver.
|
* **-single_step** | the presents of this argument tells both the client and host to operate in single step mode. single step mode causes the receiver of the binary data whether host or client to send an empty GEN_FILE frame after successfully receiving the data. this then tells the sender to send the next GEN_FILE frame containing binary data for the file and the cycle continues until len is meet. if this argument is not found, the sender can simply send all GEN_FILE data without waiting for an empty GEN_FILE from the receiver.
|
||||||
|
|
||||||
* **-to_host** | this argument should only come from the host and it will define the client as the sender and the host as the receiver.
|
|
||||||
|
|
||||||
* **-from_host** | opposite affect to *-to_host*. it defines the host as the sender and the client as the receiver.
|
|
||||||
|
|
||||||
* **-truncate** | this indicates to whoever is the receiver to truncate the file being written to.
|
* **-truncate** | this indicates to whoever is the receiver to truncate the file being written to.
|
||||||
|
|
||||||
* **-force** | in some cases, the receiver might need to overwrite the target file. the presents of this argument tells it to overwrite without asking the user. the host should never send this argument and the client should ignore it if it is received from the host.
|
* **-force** | in some cases, the receiver might need to overwrite the target file. the presents of this argument tells it to overwrite without asking the user. the host should never send this argument and the client should ignore it if it is received from the host.
|
||||||
|
@ -133,6 +131,7 @@ This is a data structure that carries information about a file system object (fi
|
||||||
notes:
|
notes:
|
||||||
1. 16bit terminated UTF-16LE strings are basically
|
1. 16bit terminated UTF-16LE strings are basically
|
||||||
terminated by 2 bytes of 0x00.
|
terminated by 2 bytes of 0x00.
|
||||||
|
|
||||||
2. the symmlink target is empty if not a symmlink but
|
2. the symmlink target is empty if not a symmlink but
|
||||||
the terminator should still be present.
|
the terminator should still be present.
|
||||||
|
|
||||||
|
@ -161,9 +160,11 @@ This carry some user account and session information about a peer client connect
|
||||||
notes:
|
notes:
|
||||||
1. the session id is unique to the peer's session connection only. it
|
1. the session id is unique to the peer's session connection only. it
|
||||||
can change upon reconnection.
|
can change upon reconnection.
|
||||||
|
|
||||||
2. the user id is unique to the peer's user account. is stays constant
|
2. the user id is unique to the peer's user account. is stays constant
|
||||||
even when the user name changes and across all clients logged into
|
even when the user name changes and across all clients logged into
|
||||||
the same account.
|
the same account.
|
||||||
|
|
||||||
3. the display name is the preffered display name of the peer. clients
|
3. the display name is the preffered display name of the peer. clients
|
||||||
are encouraged to use this rather than the user name when displaying
|
are encouraged to use this rather than the user name when displaying
|
||||||
peer info to the user. if empty, it's ok to just fall back to the user
|
peer info to the user. if empty, it's ok to just fall back to the user
|
||||||
|
@ -189,7 +190,7 @@ This contains information about a new command that was added to the current sess
|
||||||
```
|
```
|
||||||
format:
|
format:
|
||||||
1. bytes[0-1] 2bytes - 16bit LE unsigned int (command id)
|
1. bytes[0-1] 2bytes - 16bit LE unsigned int (command id)
|
||||||
2. bytes[2] 1byte - bool (0x01 or 0x00) (handles gen file)
|
2. bytes[2] 1byte - 8bit LE unsigned int (genfile type)
|
||||||
3. bytes[3-130] 128bytes - command name (TEXT - padded with 0x00)
|
3. bytes[3-130] 128bytes - command name (TEXT - padded with 0x00)
|
||||||
4. bytes[131-258] 128bytes - library name (TEXT - padded with 0x00)
|
4. bytes[131-258] 128bytes - library name (TEXT - padded with 0x00)
|
||||||
5. bytes[259-n] variable - short text (16bit null terminated)
|
5. bytes[259-n] variable - short text (16bit null terminated)
|
||||||
|
@ -197,10 +198,13 @@ This contains information about a new command that was added to the current sess
|
||||||
7. bytes[n-n] variable - long text (16bit null terminated)
|
7. bytes[n-n] variable - long text (16bit null terminated)
|
||||||
|
|
||||||
notes:
|
notes:
|
||||||
1. the handles gen file flag is a single byte 0x01 to indicate true and
|
1. the genfile type is numerical value of 2, 3 or 0. a value of 2
|
||||||
0x00 to indicate false. clients need to be aware of which command
|
indicates that the command handles/understands the GEN_FILE mini
|
||||||
handles the GEN_FILE mini protocol because it requires user input at
|
protocol and it can be used to upload a file or other data to the
|
||||||
both ends (host and client).
|
host. a value of 3 indicates the commmand downloads a file or other
|
||||||
|
data from the host. 0 simply indicates that the command doesn't use
|
||||||
|
or understand GEN_FILE.
|
||||||
|
|
||||||
2. the library name can contain the module name and/or extra informaion
|
2. the library name can contain the module name and/or extra informaion
|
||||||
the client can use to identify the library the command is a part of.
|
the client can use to identify the library the command is a part of.
|
||||||
```
|
```
|
||||||
|
@ -233,6 +237,7 @@ This contain status information of a peer client when the peer changes sub-chann
|
||||||
1. if (is disconnected) is set true (0x01) the session id will no longer
|
1. if (is disconnected) is set true (0x01) the session id will no longer
|
||||||
be valid for that peer client so you should not make anymore attempts
|
be valid for that peer client so you should not make anymore attempts
|
||||||
to send data to it.
|
to send data to it.
|
||||||
|
|
||||||
2. channel-sub ids is a string of 9byte channel-sub id combinations at
|
2. channel-sub ids is a string of 9byte channel-sub id combinations at
|
||||||
a fixed length of 54bytes (padded with 0x00). this indicates what
|
a fixed length of 54bytes (padded with 0x00). this indicates what
|
||||||
channels-subs the peer currently have open if the peer's channel ids
|
channels-subs the peer currently have open if the peer's channel ids
|
||||||
|
@ -272,9 +277,8 @@ This contains public information about a channel member.
|
||||||
notes:
|
notes:
|
||||||
1. a 16bit null terminated TEXT formatted string ended with 2 bytes of
|
1. a 16bit null terminated TEXT formatted string ended with 2 bytes of
|
||||||
(0x00) to indicate the end of the string data.
|
(0x00) to indicate the end of the string data.
|
||||||
2. the member's privilege level can be any of the values discribed in
|
|
||||||
section [4.3](host_features.md).
|
2. is invite? indicates if this user has received an invite to join
|
||||||
3. is invite? indicates if this user has received an invite to join
|
|
||||||
that channel by has not accepted yet. if, accepted the user will
|
that channel by has not accepted yet. if, accepted the user will
|
||||||
become a full member of the channel at the level indicated by this
|
become a full member of the channel at the level indicated by this
|
||||||
data type.
|
data type.
|
||||||
|
@ -284,17 +288,19 @@ This contains public information about a channel member.
|
||||||
|
|
||||||
Setup:
|
Setup:
|
||||||
|
|
||||||
* The host has a command called *upload_file* with a command id of *768* and handles the ```GEN_FILE``` data type.
|
* The host has a command called *upload_file* with a command id of *768* and handles the ```GEN_FILE``` data type with a genfile type of 2.
|
||||||
* The client has a file called */home/foo/bar.mp3* and wants to upload it to the host file */home/host/music/bar.mp3* and the client knows the file size is 512bytes.
|
* The client has a file called */home/foo/bar.mp3* and wants to upload it to the host file */home/host/music/bar.mp3* and the client knows the file size is 512bytes.
|
||||||
|
|
||||||
|
Process:
|
||||||
|
|
||||||
To upload the file, the client calls command id *768* with the following text arguments (must still be sent as a GEN_FILE):
|
To upload the file, the client calls command id *768* with the following text arguments (must still be sent as a GEN_FILE):
|
||||||
```-client_file "/home/foo/bar.mp3" -remote_file "/home/host/music/bar.mp3" -len 512```
|
```-client_file "/home/foo/bar.mp3" -remote_file "/home/host/music/bar.mp3" -len 512```
|
||||||
|
|
||||||
The host will then return the following the text arguments to the client (also sent as a GEN_FILE):
|
The host can then return text arguments to the client like (also sent as a GEN_FILE):
|
||||||
```-to_host```
|
```-truncate and/or -single_step```
|
||||||
|
|
||||||
This argument from the host designates it as the receiver so it will be up to the host to send an empty ```GEN_FILE``` to indicate to the client that it was ready to start receiving binary data from the client to write to */home/host/music/bar.mp3*. If that file already exists, the host will need to ask the user to overwrite or not.
|
This only needs to be done if the command call needs to be modified by host and if the client supports such a thing. In this example, host will just return an empty GEN_FILE because there is no need for modification.
|
||||||
|
|
||||||
If the host indicates that it's ready for the upload, the client can then simply read 512 bytes from */home/foo/bar.mp3* and send the read bytes to the host command id *768* as a ```GEN_FILE```.
|
At this point, the host will then need to check of the destination file: /home/host/music/bar.mp3 already exists. If it does, the host will need to ask the user if it's ok to overwrite.
|
||||||
|
|
||||||
The host will then write the bytes received from the client to */home/host/music/bar.mp3* and then auto terminate the command since 512 bytes has been meet.
|
Once the host confirms it is ok to write to the destination file, it will then need to send another empty GEN_FILE to the client to confirm that it is ready to start receiving GEN_FILE frames from the client through command id *768* that will contain binary data to be written to the destination file until -len (512 bytes) is meet.
|
|
@ -5,7 +5,7 @@ installer_file="$2"
|
||||||
|
|
||||||
src_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
src_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
bin_name="cmdr"
|
bin_name="cmdr"
|
||||||
app_version="1.0.0"
|
app_version="2.2.0"
|
||||||
app_name="Cmdr"
|
app_name="Cmdr"
|
||||||
install_dir="/opt/$bin_name"
|
install_dir="/opt/$bin_name"
|
||||||
bin_dir="/usr/bin"
|
bin_dir="/usr/bin"
|
||||||
|
@ -55,6 +55,9 @@ if [ $? -eq 0 -a -d "$qt_dir" ]; then
|
||||||
ldd ./$bin_name | grep "libicu" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
ldd ./$bin_name | grep "libicu" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
||||||
ldd ./$bin_name | grep "libssl" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
ldd ./$bin_name | grep "libssl" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
||||||
ldd ./$bin_name | grep "libcrypto" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
ldd ./$bin_name | grep "libcrypto" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
||||||
|
ldd ./$bin_name | grep "libGL.so" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
||||||
|
ldd ./$bin_name | grep "libpcre16.so" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
||||||
|
ldd ./$bin_name | grep "libpcre.so" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./build/lib
|
||||||
mv -v ./$bin_name ./build/$bin_name
|
mv -v ./$bin_name ./build/$bin_name
|
||||||
cp -v $qt_dir/../plugins/platforms/libqxcb.so ./build/platforms/libqxcb.so
|
cp -v $qt_dir/../plugins/platforms/libqxcb.so ./build/platforms/libqxcb.so
|
||||||
cp -rfv ./icons ./build
|
cp -rfv ./icons ./build
|
||||||
|
@ -64,15 +67,11 @@ if [ $? -eq 0 -a -d "$qt_dir" ]; then
|
||||||
|
|
||||||
cp -fv $qt_dir/../../libQt5DBus.so.5 ./build/lib/libQt5DBus.so.5
|
cp -fv $qt_dir/../../libQt5DBus.so.5 ./build/lib/libQt5DBus.so.5
|
||||||
cp -fv $qt_dir/../../libQt5XcbQpa.so.5 ./build/lib/libQt5XcbQpa.so.5
|
cp -fv $qt_dir/../../libQt5XcbQpa.so.5 ./build/lib/libQt5XcbQpa.so.5
|
||||||
cp -fv $qt_dir/../../libGL.so ./build/lib/libGL.so
|
|
||||||
cp -fv $qt_dir/../../libpcre16.so.3 ./build/lib/libpcre16.so.3
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
cp -fv $qt_dir/../lib/libQt5DBus.so.5 ./build/lib/libQt5DBus.so.5
|
cp -fv $qt_dir/../lib/libQt5DBus.so.5 ./build/lib/libQt5DBus.so.5
|
||||||
cp -fv $qt_dir/../lib/libQt5XcbQpa.so.5 ./build/lib/libQt5XcbQpa.so.5
|
cp -fv $qt_dir/../lib/libQt5XcbQpa.so.5 ./build/lib/libQt5XcbQpa.so.5
|
||||||
cp -fv $qt_dir/../lib/libGL.so ./build/lib/libGL.so
|
|
||||||
cp -fv $qt_dir/../lib/libpcre16.so.3 ./build/lib/libpcre16.so.3
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -208,6 +207,10 @@ if [ $? -eq 0 -a -d "$qt_dir" ]; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "err: A valid Qt dir could not be found."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$tmp_dir" ]; then
|
if [ -d "$tmp_dir" ]; then
|
||||||
|
|
|
@ -176,7 +176,9 @@ void CmdLine::toHost(const QString &cmdName, const QString &args)
|
||||||
}
|
}
|
||||||
else if (Shared::genfileCmds->contains(cmdId))
|
else if (Shared::genfileCmds->contains(cmdId))
|
||||||
{
|
{
|
||||||
emit dataToGenFile(cmdId, toTEXT(args));
|
emit setHostCmdId(cmdId);
|
||||||
|
emit setGenfileType(Shared::genfileTypes->value(cmdId));
|
||||||
|
emit dataToGenFile(toTEXT(args));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -223,7 +225,7 @@ void CmdLine::procCmdLine(const QString &line)
|
||||||
|
|
||||||
if (flags & GEN_HOOK)
|
if (flags & GEN_HOOK)
|
||||||
{
|
{
|
||||||
emit dataToHookedGenFile(toTEXT(argsLine));
|
emit dataToGenFile(toTEXT(argsLine));
|
||||||
}
|
}
|
||||||
else if (Shared::clientCmds->contains(cmdName))
|
else if (Shared::clientCmds->contains(cmdName))
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,8 +63,9 @@ signals:
|
||||||
void dataToHookedCmdObj(const QString &argsLine);
|
void dataToHookedCmdObj(const QString &argsLine);
|
||||||
void dataToHost(quint16 cmdId, const QByteArray &data, uchar dType);
|
void dataToHost(quint16 cmdId, const QByteArray &data, uchar dType);
|
||||||
void dataToHookedHost(const QByteArray &data, uchar dType);
|
void dataToHookedHost(const QByteArray &data, uchar dType);
|
||||||
void dataToGenFile(quint16 cmdId, const QByteArray &data);
|
void dataToGenFile(const QByteArray &data);
|
||||||
void dataToHookedGenFile(const QByteArray &data);
|
void setHostCmdId(quint16 cmdId);
|
||||||
|
void setGenfileType(quint8 typeId);
|
||||||
void txtInCache();
|
void txtInCache();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,10 @@ HostDoc::HostDoc(const QByteArray &import, QObject *parent) : Command(parent)
|
||||||
|
|
||||||
setObjectName(cmdName + num);
|
setObjectName(cmdName + num);
|
||||||
|
|
||||||
if (import[2] == 0x01)
|
if ((import[2] == GEN_UPLOAD) || (import[2] == GEN_DOWNLOAD))
|
||||||
{
|
{
|
||||||
Shared::genfileCmds->insert(cmdId, objectName());
|
Shared::genfileCmds->insert(cmdId, objectName());
|
||||||
|
Shared::genfileTypes->insert(cmdId, static_cast<quint8>(import[2]));
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 offs = 259;
|
quint32 offs = 259;
|
||||||
|
@ -112,6 +113,7 @@ void HostDoc::cmdRemoved(quint16 id)
|
||||||
Shared::hostCmds->remove(cmdId);
|
Shared::hostCmds->remove(cmdId);
|
||||||
Shared::hostDocs->remove(objectName());
|
Shared::hostDocs->remove(objectName());
|
||||||
Shared::genfileCmds->remove(cmdId);
|
Shared::genfileCmds->remove(cmdId);
|
||||||
|
Shared::genfileTypes->remove(cmdId);
|
||||||
|
|
||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|
|
@ -388,6 +388,7 @@ QJsonObject *Shared::localData = nullptr;
|
||||||
QHash<QString, Command*> *Shared::clientCmds = nullptr;
|
QHash<QString, Command*> *Shared::clientCmds = nullptr;
|
||||||
QHash<quint16, QString> *Shared::hostCmds = nullptr;
|
QHash<quint16, QString> *Shared::hostCmds = nullptr;
|
||||||
QHash<quint16, QString> *Shared::genfileCmds = nullptr;
|
QHash<quint16, QString> *Shared::genfileCmds = nullptr;
|
||||||
|
QHash<quint16, quint8> *Shared::genfileTypes = nullptr;
|
||||||
QHash<QString, Command*> *Shared::hostDocs = nullptr;
|
QHash<QString, Command*> *Shared::hostDocs = nullptr;
|
||||||
QStringList *Shared::hookBypass = nullptr;
|
QStringList *Shared::hookBypass = nullptr;
|
||||||
QByteArray *Shared::sessionId = nullptr;
|
QByteArray *Shared::sessionId = nullptr;
|
||||||
|
|
11
src/common.h
11
src/common.h
|
@ -68,13 +68,13 @@
|
||||||
|
|
||||||
#define DEFAULT_HIST_LIMIT 100
|
#define DEFAULT_HIST_LIMIT 100
|
||||||
#define DEFAULT_MAX_LINES 1000
|
#define DEFAULT_MAX_LINES 1000
|
||||||
#define RDBUFF 128000
|
#define RDBUFF 16777215
|
||||||
#define TXT_CODEC "UTF-16LE"
|
#define TXT_CODEC "UTF-16LE"
|
||||||
#define BOOKMARK_FOLDER "bookmarks"
|
#define BOOKMARK_FOLDER "bookmarks"
|
||||||
#define CONFIG_FILENAME "config.json"
|
#define CONFIG_FILENAME "config.json"
|
||||||
#define APP_NAME "Cmdr"
|
#define APP_NAME "Cmdr"
|
||||||
#define APP_TARGET "cmdr"
|
#define APP_TARGET "cmdr"
|
||||||
#define APP_VERSION "2.1.0"
|
#define APP_VERSION "2.2.0"
|
||||||
|
|
||||||
enum TypeID : quint8
|
enum TypeID : quint8
|
||||||
{
|
{
|
||||||
|
@ -109,6 +109,12 @@ enum TypeID : quint8
|
||||||
RESUME_CMD = 29
|
RESUME_CMD = 29
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum GenFileType : quint8
|
||||||
|
{
|
||||||
|
GEN_UPLOAD = 2,
|
||||||
|
GEN_DOWNLOAD = 3
|
||||||
|
};
|
||||||
|
|
||||||
enum AsyncCommands : quint16
|
enum AsyncCommands : quint16
|
||||||
{
|
{
|
||||||
ASYNC_RDY = 1, // client | none
|
ASYNC_RDY = 1, // client | none
|
||||||
|
@ -203,6 +209,7 @@ public:
|
||||||
static QHash<QString, Command*> *clientCmds;
|
static QHash<QString, Command*> *clientCmds;
|
||||||
static QHash<quint16, QString> *hostCmds;
|
static QHash<quint16, QString> *hostCmds;
|
||||||
static QHash<quint16, QString> *genfileCmds;
|
static QHash<quint16, QString> *genfileCmds;
|
||||||
|
static QHash<quint16, quint8> *genfileTypes;
|
||||||
static QHash<QString, Command*> *hostDocs;
|
static QHash<QString, Command*> *hostDocs;
|
||||||
static QList<quint8> *idCache;
|
static QList<quint8> *idCache;
|
||||||
static QList<QString> *txtCache;
|
static QList<QString> *txtCache;
|
||||||
|
|
102
src/gen_file.cpp
102
src/gen_file.cpp
|
@ -19,12 +19,11 @@
|
||||||
Genfile::Genfile(QObject *parent) : QObject(nullptr)
|
Genfile::Genfile(QObject *parent) : QObject(nullptr)
|
||||||
{
|
{
|
||||||
file = new QFile(this);
|
file = new QFile(this);
|
||||||
hook = 0;
|
|
||||||
|
|
||||||
finished();
|
finished();
|
||||||
|
|
||||||
connect(parent, &QObject::destroyed, this, &QObject::deleteLater);
|
connect(parent, &QObject::destroyed, this, &QObject::deleteLater);
|
||||||
connect(this, &Genfile::rdFileLoop, this, &Genfile::hookedDataIn);
|
connect(this, &Genfile::rdFileLoop, this, &Genfile::dataIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Genfile::cacheTxt(quint8 typeId, QString txt)
|
void Genfile::cacheTxt(quint8 typeId, QString txt)
|
||||||
|
@ -38,10 +37,11 @@ void Genfile::cacheTxt(quint8 typeId, QString txt)
|
||||||
}
|
}
|
||||||
|
|
||||||
void Genfile::finished()
|
void Genfile::finished()
|
||||||
|
{
|
||||||
|
if (flags & ACTIVE)
|
||||||
{
|
{
|
||||||
flags = 0;
|
flags = 0;
|
||||||
bytesRW = 0;
|
bytesRW = 0;
|
||||||
hook = 0;
|
|
||||||
|
|
||||||
localFile.clear();
|
localFile.clear();
|
||||||
remoteFile.clear();
|
remoteFile.clear();
|
||||||
|
@ -55,6 +55,8 @@ void Genfile::finished()
|
||||||
|
|
||||||
emit unsetUserIO(GEN_HOOK);
|
emit unsetUserIO(GEN_HOOK);
|
||||||
emit enableGenFile(false);
|
emit enableGenFile(false);
|
||||||
|
emit termHostCmd();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Genfile::askOverwrite()
|
void Genfile::askOverwrite()
|
||||||
|
@ -80,7 +82,7 @@ bool Genfile::seekToOffset()
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
cacheTxt(ERR, "err: Invalid offset was provided: " + offs + "\n");
|
cacheTxt(ERR, "err: An invalid offset was provided: " + offs + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = file->seek(pos);
|
ret = file->seek(pos);
|
||||||
|
@ -140,7 +142,7 @@ void Genfile::setupForWriting()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
emit hookedDataOut(QByteArray());
|
emit dataOut(QByteArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +190,7 @@ bool Genfile::wrToFile(const QByteArray &data)
|
||||||
}
|
}
|
||||||
else if (flags & SINGLE_STEP_MODE)
|
else if (flags & SINGLE_STEP_MODE)
|
||||||
{
|
{
|
||||||
emit hookedDataOut(QByteArray());
|
emit dataOut(QByteArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -224,7 +226,7 @@ bool Genfile::rdFromFile()
|
||||||
ret = true;
|
ret = true;
|
||||||
bytesRW += data.size();
|
bytesRW += data.size();
|
||||||
|
|
||||||
emit hookedDataOut(data);
|
emit dataOut(data);
|
||||||
|
|
||||||
if (atEnd())
|
if (atEnd())
|
||||||
{
|
{
|
||||||
|
@ -243,41 +245,44 @@ bool Genfile::rdFromFile()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Genfile::setGenfileType(quint8 typeId)
|
||||||
|
{
|
||||||
|
if (typeId == GEN_UPLOAD)
|
||||||
|
{
|
||||||
|
flags |= READ_MODE;
|
||||||
|
}
|
||||||
|
else if (typeId == GEN_DOWNLOAD)
|
||||||
|
{
|
||||||
|
flags |= WRITE_MODE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QByteArray Genfile::autoFill(const QByteArray &data)
|
QByteArray Genfile::autoFill(const QByteArray &data)
|
||||||
{
|
{
|
||||||
len = QString::number(QFileInfo(localFile).size());
|
|
||||||
|
|
||||||
QStringList args = parseArgs(data, -1);
|
QStringList args = parseArgs(data, -1);
|
||||||
int ind = args.indexOf(QRegExp("-len", Qt::CaseInsensitive));
|
int ind = args.indexOf(QRegExp("-len", Qt::CaseInsensitive));
|
||||||
|
|
||||||
if (ind != -1)
|
if (ind == -1)
|
||||||
{
|
{
|
||||||
args.removeAt(ind);
|
len = QString::number(QFileInfo(localFile).size());
|
||||||
|
|
||||||
if ((ind + 1) < args.size())
|
|
||||||
{
|
|
||||||
args.removeAt(ind + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
args.append("-len");
|
args.append("-len");
|
||||||
args.append(len);
|
args.append(len);
|
||||||
|
|
||||||
return toTEXT(args.join(' '));
|
return toTEXT(args.join(' '));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
void Genfile::hookedDataIn(const QByteArray &data)
|
|
||||||
{
|
{
|
||||||
dataIn(hook, data);
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Genfile::dataIn(quint16 cmdId, const QByteArray &data)
|
void Genfile::dataIn(const QByteArray &data)
|
||||||
{
|
{
|
||||||
if (!(flags & CLIENT_PARAMS_RDY))
|
if (!(flags & CLIENT_PARAMS_RDY))
|
||||||
{
|
{
|
||||||
QStringList args = parseArgs(data, -1);
|
QStringList args = parseArgs(data, -1);
|
||||||
|
|
||||||
hook = cmdId;
|
|
||||||
localFile = getParam("-client_file", args);
|
localFile = getParam("-client_file", args);
|
||||||
remoteFile = getParam("-remote_file", args);
|
remoteFile = getParam("-remote_file", args);
|
||||||
len = getParam("-len", args);
|
len = getParam("-len", args);
|
||||||
|
@ -289,9 +294,37 @@ void Genfile::dataIn(quint16 cmdId, const QByteArray &data)
|
||||||
}
|
}
|
||||||
|
|
||||||
flags |= CLIENT_PARAMS_RDY;
|
flags |= CLIENT_PARAMS_RDY;
|
||||||
|
flags |= ACTIVE;
|
||||||
|
|
||||||
emit enableGenFile(true);
|
emit enableGenFile(true);
|
||||||
emit dataOut(cmdId, autoFill(data));
|
|
||||||
|
if (flags & READ_MODE)
|
||||||
|
{
|
||||||
|
if (!argExists("-client_file", args))
|
||||||
|
{
|
||||||
|
cacheTxt(ERR, "err: The client file (-client_file) argument was not found.\n");
|
||||||
|
finished();
|
||||||
|
|
||||||
|
emit preCallTerm();
|
||||||
|
}
|
||||||
|
else if (!QFile::exists(localFile))
|
||||||
|
{
|
||||||
|
cacheTxt(ERR, "err: The client file: '" + localFile + "' does not exists.\n");
|
||||||
|
finished();
|
||||||
|
|
||||||
|
emit preCallTerm();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emit setUserIO(HOST_HOOK);
|
||||||
|
emit dataOut(autoFill(data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emit setUserIO(HOST_HOOK);
|
||||||
|
emit dataOut(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!(flags & HOST_PARAMS_RDY))
|
else if (!(flags & HOST_PARAMS_RDY))
|
||||||
{
|
{
|
||||||
|
@ -302,19 +335,24 @@ void Genfile::dataIn(quint16 cmdId, const QByteArray &data)
|
||||||
flags |= SINGLE_STEP_MODE;
|
flags |= SINGLE_STEP_MODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.contains("-truncate", Qt::CaseInsensitive))
|
if (flags & READ_MODE)
|
||||||
{
|
|
||||||
flags |= TRUNCATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.contains("-to_host", Qt::CaseInsensitive))
|
|
||||||
{
|
{
|
||||||
setupForReading();
|
setupForReading();
|
||||||
|
|
||||||
flags |= HOST_PARAMS_RDY;
|
flags |= HOST_PARAMS_RDY;
|
||||||
}
|
}
|
||||||
else if (args.contains("-from_host", Qt::CaseInsensitive))
|
else if (flags & WRITE_MODE)
|
||||||
{
|
{
|
||||||
|
if (args.contains("-truncate", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
flags |= TRUNCATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.contains("-len", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
len = getParam("-len", args);
|
||||||
|
}
|
||||||
|
|
||||||
if (QFile::exists(localFile) && !(flags & DO_NOT_ASK))
|
if (QFile::exists(localFile) && !(flags & DO_NOT_ASK))
|
||||||
{
|
{
|
||||||
askOverwrite();
|
askOverwrite();
|
||||||
|
@ -328,7 +366,7 @@ void Genfile::dataIn(quint16 cmdId, const QByteArray &data)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cacheTxt(ERR, "err: The host did not return -to_host or -from_host, making this command call ambiguous.\n");
|
cacheTxt(ERR, "err: The client doesn't know if this command call is an upload or download. this is a bug, please report it.\n");
|
||||||
finished();
|
finished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -340,7 +378,7 @@ void Genfile::dataIn(quint16 cmdId, const QByteArray &data)
|
||||||
{
|
{
|
||||||
emit unsetUserIO(GEN_HOOK);
|
emit unsetUserIO(GEN_HOOK);
|
||||||
|
|
||||||
flags ^= CONFIRM_NEEDED;
|
flags &= ~CONFIRM_NEEDED;
|
||||||
|
|
||||||
setupForWriting();
|
setupForWriting();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Genfile : public QObject
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum GenfileFlags
|
enum GenfileFlags : uint
|
||||||
{
|
{
|
||||||
CLIENT_PARAMS_RDY = 1,
|
CLIENT_PARAMS_RDY = 1,
|
||||||
HOST_PARAMS_RDY = 1 << 1,
|
HOST_PARAMS_RDY = 1 << 1,
|
||||||
|
@ -34,7 +34,8 @@ private:
|
||||||
DO_NOT_ASK = 1 << 4,
|
DO_NOT_ASK = 1 << 4,
|
||||||
CONFIRM_NEEDED = 1 << 5,
|
CONFIRM_NEEDED = 1 << 5,
|
||||||
WRITE_MODE = 1 << 6,
|
WRITE_MODE = 1 << 6,
|
||||||
READ_MODE = 1 << 7
|
READ_MODE = 1 << 7,
|
||||||
|
ACTIVE = 1 << 8
|
||||||
};
|
};
|
||||||
|
|
||||||
uint flags;
|
uint flags;
|
||||||
|
@ -61,8 +62,8 @@ private:
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void finished();
|
void finished();
|
||||||
void hookedDataIn(const QByteArray &data);
|
void setGenfileType(quint8 typeId);
|
||||||
void dataIn(quint16 cmdId, const QByteArray &data);
|
void dataIn(const QByteArray &data);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -71,11 +72,12 @@ public:
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void txtInCache();
|
void txtInCache();
|
||||||
|
void termHostCmd();
|
||||||
|
void preCallTerm();
|
||||||
void enableGenFile(bool state);
|
void enableGenFile(bool state);
|
||||||
void setUserIO(int flgs);
|
void setUserIO(int flgs);
|
||||||
void unsetUserIO(int flgs);
|
void unsetUserIO(int flgs);
|
||||||
void dataOut(quint16 cmdId, const QByteArray &data, uchar typeID = GEN_FILE);
|
void dataOut(const QByteArray &data, quint8 typeID = GEN_FILE);
|
||||||
void hookedDataOut(const QByteArray &data, uchar typeID = GEN_FILE);
|
|
||||||
void rdFileLoop(QByteArray data = QByteArray());
|
void rdFileLoop(QByteArray data = QByteArray());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
14
src/main.cpp
14
src/main.cpp
|
@ -58,6 +58,7 @@ int main(int argc, char *argv[])
|
||||||
QString hostAddress;
|
QString hostAddress;
|
||||||
QStringList hookBypass;
|
QStringList hookBypass;
|
||||||
QHash<quint16, QString> genfileCmds;
|
QHash<quint16, QString> genfileCmds;
|
||||||
|
QHash<quint16, quint8> genfileTypes;
|
||||||
QHash<QString, Command*> clientCmds;
|
QHash<QString, Command*> clientCmds;
|
||||||
QHash<QString, Command*> hostDocs;
|
QHash<QString, Command*> hostDocs;
|
||||||
QHash<quint16, QString> hostCmds;
|
QHash<quint16, QString> hostCmds;
|
||||||
|
@ -70,6 +71,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
Shared::connectedToHost = &connected;
|
Shared::connectedToHost = &connected;
|
||||||
Shared::genfileCmds = &genfileCmds;
|
Shared::genfileCmds = &genfileCmds;
|
||||||
|
Shared::genfileTypes = &genfileTypes;
|
||||||
Shared::clientCmds = &clientCmds;
|
Shared::clientCmds = &clientCmds;
|
||||||
Shared::hostCmds = &hostCmds;
|
Shared::hostCmds = &hostCmds;
|
||||||
Shared::hostDocs = &hostDocs;
|
Shared::hostDocs = &hostDocs;
|
||||||
|
@ -124,6 +126,8 @@ int main(int argc, char *argv[])
|
||||||
Shared::mainWin->setCmdLine(Shared::cmdLine);
|
Shared::mainWin->setCmdLine(Shared::cmdLine);
|
||||||
Shared::mainWin->showUi();
|
Shared::mainWin->showUi();
|
||||||
|
|
||||||
|
QDir::setCurrent(QDir::homePath());
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,9 +206,10 @@ void setupCmdLine()
|
||||||
|
|
||||||
QObject::connect(cmdLine, &CmdLine::dataToHost, session, &Session::binToServer);
|
QObject::connect(cmdLine, &CmdLine::dataToHost, session, &Session::binToServer);
|
||||||
QObject::connect(cmdLine, &CmdLine::dataToHookedHost, session, &Session::hookedBinToServer);
|
QObject::connect(cmdLine, &CmdLine::dataToHookedHost, session, &Session::hookedBinToServer);
|
||||||
|
QObject::connect(cmdLine, &CmdLine::setHostCmdId, session, &Session::setCmdHook);
|
||||||
|
|
||||||
QObject::connect(cmdLine, &CmdLine::dataToGenFile, genFile, &Genfile::dataIn);
|
QObject::connect(cmdLine, &CmdLine::dataToGenFile, genFile, &Genfile::dataIn);
|
||||||
QObject::connect(cmdLine, &CmdLine::dataToHookedGenFile, genFile, &Genfile::hookedDataIn);
|
QObject::connect(cmdLine, &CmdLine::setGenfileType, genFile, &Genfile::setGenfileType);
|
||||||
|
|
||||||
QObject::connect(cmdLine, &CmdLine::txtInCache, textWorker, &TextWorker::dumpTxtCache);
|
QObject::connect(cmdLine, &CmdLine::txtInCache, textWorker, &TextWorker::dumpTxtCache);
|
||||||
}
|
}
|
||||||
|
@ -218,9 +223,10 @@ void setupGenFile()
|
||||||
ThreadKiller *killer = Shared::theadKiller;
|
ThreadKiller *killer = Shared::theadKiller;
|
||||||
QThread *genThr = new QThread(QCoreApplication::instance());
|
QThread *genThr = new QThread(QCoreApplication::instance());
|
||||||
|
|
||||||
QObject::connect(genFile, &Genfile::dataOut, session, &Session::binToServer);
|
QObject::connect(genFile, &Genfile::termHostCmd, session, &Session::termHostCmd);
|
||||||
QObject::connect(genFile, &Genfile::hookedDataOut, session, &Session::hookedBinToServer);
|
QObject::connect(genFile, &Genfile::dataOut, session, &Session::hookedBinToServer);
|
||||||
QObject::connect(genFile, &Genfile::enableGenFile, session, &Session::enableGenFile);
|
QObject::connect(genFile, &Genfile::enableGenFile, session, &Session::enableGenFile);
|
||||||
|
QObject::connect(genFile, &Genfile::preCallTerm, session, &Session::idle);
|
||||||
|
|
||||||
QObject::connect(genFile, &Genfile::setUserIO, cmdLine, &CmdLine::setFlags);
|
QObject::connect(genFile, &Genfile::setUserIO, cmdLine, &CmdLine::setFlags);
|
||||||
QObject::connect(genFile, &Genfile::unsetUserIO, cmdLine, &CmdLine::unsetFlags);
|
QObject::connect(genFile, &Genfile::unsetUserIO, cmdLine, &CmdLine::unsetFlags);
|
||||||
|
@ -244,7 +250,7 @@ void setupSession()
|
||||||
QThread *sesThr = new QThread(QCoreApplication::instance());
|
QThread *sesThr = new QThread(QCoreApplication::instance());
|
||||||
|
|
||||||
QObject::connect(session, &Session::hostFinished, genFile, &Genfile::finished);
|
QObject::connect(session, &Session::hostFinished, genFile, &Genfile::finished);
|
||||||
QObject::connect(session, &Session::toGenFile, genFile, &Genfile::hookedDataIn);
|
QObject::connect(session, &Session::toGenFile, genFile, &Genfile::dataIn);
|
||||||
|
|
||||||
QObject::connect(session, &Session::setUserIO, cmdLine, &CmdLine::setFlags);
|
QObject::connect(session, &Session::setUserIO, cmdLine, &CmdLine::setFlags);
|
||||||
QObject::connect(session, &Session::unsetUserIO, cmdLine, &CmdLine::unsetFlags);
|
QObject::connect(session, &Session::unsetUserIO, cmdLine, &CmdLine::unsetFlags);
|
||||||
|
|
|
@ -63,6 +63,11 @@ void Session::binToServer(quint16 cmdId, const QByteArray &data, quint8 typeId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Session::setCmdHook(quint16 cmdId)
|
||||||
|
{
|
||||||
|
hook = cmdId;
|
||||||
|
}
|
||||||
|
|
||||||
void Session::sockerr(QAbstractSocket::SocketError err)
|
void Session::sockerr(QAbstractSocket::SocketError err)
|
||||||
{
|
{
|
||||||
if (err == QAbstractSocket::RemoteHostClosedError)
|
if (err == QAbstractSocket::RemoteHostClosedError)
|
||||||
|
@ -141,6 +146,7 @@ void Session::isDisconnected()
|
||||||
Shared::sessionId->clear();
|
Shared::sessionId->clear();
|
||||||
Shared::hostCmds->clear();
|
Shared::hostCmds->clear();
|
||||||
Shared::genfileCmds->clear();
|
Shared::genfileCmds->clear();
|
||||||
|
Shared::genfileTypes->clear();
|
||||||
|
|
||||||
cacheTxt(TEXT, "\nHost session ended. (disconnected)\n\n");
|
cacheTxt(TEXT, "\nHost session ended. (disconnected)\n\n");
|
||||||
|
|
||||||
|
@ -291,6 +297,23 @@ void Session::cacheTxt(quint8 typeId, QString txt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Session::idle()
|
||||||
|
{
|
||||||
|
emit hostFinished();
|
||||||
|
emit unsetUserIO(HOST_HOOK);
|
||||||
|
|
||||||
|
if (Shared::hostCmds->contains(hook))
|
||||||
|
{
|
||||||
|
cacheTxt(TEXT, "\nFinished: " + Shared::hostCmds->value(hook) + "\n\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cacheTxt(TEXT, "\nFinished: Unknown\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
hook = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void Session::dataFromHost(const QByteArray &data)
|
void Session::dataFromHost(const QByteArray &data)
|
||||||
{
|
{
|
||||||
if (isAsync(cmdId))
|
if (isAsync(cmdId))
|
||||||
|
@ -305,19 +328,7 @@ void Session::dataFromHost(const QByteArray &data)
|
||||||
}
|
}
|
||||||
else if (dType == IDLE)
|
else if (dType == IDLE)
|
||||||
{
|
{
|
||||||
hook = 0;
|
idle();
|
||||||
|
|
||||||
emit hostFinished();
|
|
||||||
emit unsetUserIO(HOST_HOOK);
|
|
||||||
|
|
||||||
if (Shared::hostCmds->contains(cmdId))
|
|
||||||
{
|
|
||||||
cacheTxt(TEXT, "\nFinished: " + Shared::hostCmds->value(cmdId) + "\n\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cacheTxt(TEXT, "\nFinished: Unknown\n\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ((dType == GEN_FILE) && (flags & GEN_FILE_ON))
|
else if ((dType == GEN_FILE) && (flags & GEN_FILE_ON))
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,6 +87,8 @@ public slots:
|
||||||
void hookedBinToServer(const QByteArray &data, quint8 typeId);
|
void hookedBinToServer(const QByteArray &data, quint8 typeId);
|
||||||
void binToServer(quint16 cmdId, const QByteArray &data, quint8 typeId);
|
void binToServer(quint16 cmdId, const QByteArray &data, quint8 typeId);
|
||||||
void enableGenFile(bool state);
|
void enableGenFile(bool state);
|
||||||
|
void setCmdHook(quint16 cmdId);
|
||||||
|
void idle();
|
||||||
void termHostCmd();
|
void termHostCmd();
|
||||||
void haltHostCmd();
|
void haltHostCmd();
|
||||||
void resumeHostCmd();
|
void resumeHostCmd();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user