Merge branch 'main' of https://github.com/geode-sdk/geode into main
Some checks are pending
Build Binaries / Build Windows (push) Waiting to run
Build Binaries / Build macOS (push) Waiting to run
Build Binaries / Build Android (64-bit) (push) Waiting to run
Build Binaries / Build Android (32-bit) (push) Waiting to run
Build Binaries / Publish (push) Blocked by required conditions

This commit is contained in:
HJfod 2024-11-16 18:37:32 +02:00
commit 6e11d0a6b0

View file

@ -28,6 +28,8 @@
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
enum class GJHttpType;
NS_CC_EXT_BEGIN
class CC_DLL CCHttpClient;
@ -216,6 +218,50 @@ public:
return _headers;
}
inline int getType() {
return _type;
}
inline void setType(int type) {
_type = type;
}
// @note Geode addition
inline void setType(GJHttpType type) {
_type = static_cast<int>(type);
}
inline bool getShouldCancel() {
return _shouldCancel;
}
inline void setShouldCancel(bool shouldCancel) {
_shouldCancel = shouldCancel;
}
inline int getDownloadProgress() {
return _downloadProgress;
}
inline void setDownloadProgress(int downloadProgress) {
_downloadProgress = downloadProgress;
}
inline int getReadTimeout() {
return _readTimeout;
}
inline void setReadTimeout(int readTimeout) {
_readTimeout = readTimeout;
}
inline int getConnectTimeout() {
return _connectTimeout;
}
inline void setConnectTimeout(int connectTimeout) {
_connectTimeout = connectTimeout;
}
protected:
// properties
@ -229,13 +275,15 @@ protected:
gd::vector<gd::string> _headers; /// custom http headers
// @note RobTop Addition
int _requestTypeGJ;
int _type;
// @note RobTop Addition
bool _shouldCancel;
// @note RobTop Addition
int _downloadProgress;
// @note RobTop Addition
int _readTimeout;
// @note RobTop Addition
int _connectTimeout;
};
NS_CC_EXT_END