mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
add json response for yweb 3 calls
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@534 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -126,7 +126,7 @@ public:
|
||||
CStringList ParamList; // local copy of ParamList (Request)
|
||||
CStringList UrlData; // local copy of UrlData (Request)
|
||||
CStringList HeaderList; // local copy of HeaderList (Request)
|
||||
CStringList WebserverConfigList; // Reference (writable) to ConfigList
|
||||
CStringList WebserverConfigList;// Reference (writable) to ConfigList
|
||||
CStringList HookVarList; // Variables in Hook-Handling passing to other Hooks
|
||||
THttp_Method Method; // HTTP Method (requested)
|
||||
// constructor & deconstructor
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
// Cyhttpd based hooks
|
||||
static THandleStatus Hooks_ReadConfig(CConfigFile *Config, CStringList &ConfigList);
|
||||
// CWebserverConnection based hooks
|
||||
THandleStatus Hooks_PrepareResponse(); // Hook for Response.SendResonse Dispatching
|
||||
THandleStatus Hooks_PrepareResponse();// Hook for Response.SendResonse Dispatching
|
||||
THandleStatus Hooks_SendResponse(); // Hook for Response.SendResonse Dispatching
|
||||
THandleStatus Hooks_EndConnection();
|
||||
THandleStatus Hooks_UploadSetFilename(std::string &Filename);
|
||||
@@ -170,17 +170,17 @@ public:
|
||||
void addResult(const std::string& result, THandleStatus _status)
|
||||
{yresult += result; status = _status;}
|
||||
void printf(const char *fmt, ...);
|
||||
void Write(const std::string& text) { addResult(text); }
|
||||
void WriteLn(const std::string& text) { addResult(text+"\r\n"); }
|
||||
void Write(const std::string& text) {addResult(text);}
|
||||
void WriteLn(const std::string& text) {addResult(text+"\r\n");}
|
||||
void Write(char const *text) {Write(std::string(text));}
|
||||
void WriteLn(char const *text) {WriteLn(std::string(text));}
|
||||
void SendHTMLHeader(const std::string& Titel);
|
||||
void SendHTMLFooter(void);
|
||||
void SendOk(void) {Write("ok");}
|
||||
void SendError(void) {Write("error");}
|
||||
void SendOk(void) {(ParamList["response"]=="json") ? Write("{\"success\": true}") : Write("ok");}
|
||||
void SendError(void) {(ParamList["response"]=="json") ? Write("{\"success\": false}") : Write("error");}
|
||||
void SendFile(const std::string& url) {NewURL = url; status = HANDLED_SENDFILE;}
|
||||
void SendRedirect(const std::string& url) {httpStatus=HTTP_MOVED_TEMPORARILY; NewURL = url; status = HANDLED_REDIRECTION;}
|
||||
void SendRewrite(const std::string& url){NewURL = url; status = HANDLED_REWRITE;}
|
||||
void SendRewrite(const std::string& url) {NewURL = url; status = HANDLED_REWRITE;}
|
||||
friend class CyParser;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user