Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/geode-sdk/geode into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Nov 16, 2024
2 parents c94a533 + 3fa9124 commit 6e11d0a
Showing 1 changed file with 49 additions and 1 deletion.
50 changes: 49 additions & 1 deletion loader/include/Geode/cocos/extensions/network/HttpRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"

enum class GJHttpType;

NS_CC_EXT_BEGIN

class CC_DLL CCHttpClient;
Expand Down Expand Up @@ -216,6 +218,50 @@ class CC_DLL CCHttpRequest : public CCObject
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
Expand All @@ -229,13 +275,15 @@ class CC_DLL CCHttpRequest : public CCObject
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
Expand Down

0 comments on commit 6e11d0a

Please sign in to comment.