Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Webserver.h « RADDS « src - github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c8accb08562aa19da1fa90fbbfa4716800c81f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef WEBSERVER_H
#define WEBSERVER_H

#include <inttypes.h>
#include "OutputMemory.h"

// List of protocols that can execute G-Codes
enum class WebSource
{
	HTTP,
	Telnet
};

class Webserver
{   
public:
	Webserver(Platform* p, Network *n) { };
	void Init() const { };
	void Spin() const { };
	void Exit() const { };
	void Diagnostics(MessageType mtype) const { };

	bool GCodeAvailable(const WebSource source) const { return false; }
	char ReadGCode(const WebSource source) const { return '\0'; }
	uint32_t GetReplySeq() const { return (uint32_t)0; }
	uint16_t GetGCodeBufferSpace(const WebSource source) const { return 0; }

	void HandleGCodeReply(const WebSource source, OutputBuffer *reply) const;
	void HandleGCodeReply(const WebSource source, const char *reply) const { };
};

inline void Webserver::HandleGCodeReply(const WebSource source, OutputBuffer *reply) const
{
	if (reply != (OutputBuffer *)0)
		OutputBuffer::ReleaseAll(reply);
}

#endif