Measure system

Dependencies:   EthernetNetIf mbed RF12B

Committer:
benecsj
Date:
Tue May 17 16:49:23 2011 +0000
Revision:
3:799d8c61fb03
Parent:
2:afe5826411e3

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benecsj 0:8d62137f7ff4 1
benecsj 0:8d62137f7ff4 2 /*
benecsj 0:8d62137f7ff4 3 Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
benecsj 0:8d62137f7ff4 4
benecsj 0:8d62137f7ff4 5 Permission is hereby granted, free of charge, to any person obtaining a copy
benecsj 0:8d62137f7ff4 6 of this software and associated documentation files (the "Software"), to deal
benecsj 0:8d62137f7ff4 7 in the Software without restriction, including without limitation the rights
benecsj 0:8d62137f7ff4 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
benecsj 0:8d62137f7ff4 9 copies of the Software, and to permit persons to whom the Software is
benecsj 0:8d62137f7ff4 10 furnished to do so, subject to the following conditions:
benecsj 0:8d62137f7ff4 11
benecsj 0:8d62137f7ff4 12 The above copyright notice and this permission notice shall be included in
benecsj 0:8d62137f7ff4 13 all copies or substantial portions of the Software.
benecsj 0:8d62137f7ff4 14
benecsj 0:8d62137f7ff4 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
benecsj 0:8d62137f7ff4 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
benecsj 0:8d62137f7ff4 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
benecsj 0:8d62137f7ff4 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
benecsj 0:8d62137f7ff4 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
benecsj 0:8d62137f7ff4 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
benecsj 0:8d62137f7ff4 21 THE SOFTWARE.
benecsj 0:8d62137f7ff4 22 */
benecsj 0:8d62137f7ff4 23
benecsj 0:8d62137f7ff4 24 #ifndef SIMPLE_HANDLER_H
benecsj 0:8d62137f7ff4 25 #define SIMPLE_HANDLER_H
benecsj 0:8d62137f7ff4 26
benecsj 0:8d62137f7ff4 27 #include "../HTTPRequestHandler.h"
benecsj 0:8d62137f7ff4 28 extern bool HandlerActive;
benecsj 0:8d62137f7ff4 29
benecsj 0:8d62137f7ff4 30 class SimpleHandler : public HTTPRequestHandler
benecsj 0:8d62137f7ff4 31 {
benecsj 0:8d62137f7ff4 32 public:
benecsj 0:8d62137f7ff4 33 SimpleHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
benecsj 0:8d62137f7ff4 34 virtual ~SimpleHandler();
benecsj 0:8d62137f7ff4 35 //protected:
benecsj 0:8d62137f7ff4 36 static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new SimpleHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
benecsj 0:8d62137f7ff4 37
benecsj 0:8d62137f7ff4 38 virtual void doGet();
benecsj 0:8d62137f7ff4 39 virtual void doPost();
benecsj 0:8d62137f7ff4 40 virtual void doHead();
benecsj 0:8d62137f7ff4 41
benecsj 0:8d62137f7ff4 42 virtual void onReadable(); //Data has been read
benecsj 0:8d62137f7ff4 43 virtual void onWriteable(); //Data has been written & buf is free
benecsj 0:8d62137f7ff4 44 virtual void onClose(); //Connection is closing
benecsj 2:afe5826411e3 45
benecsj 2:afe5826411e3 46 //--------Aditional handlers
benecsj 2:afe5826411e3 47 virtual void CurrentData();
benecsj 2:afe5826411e3 48 virtual void CurrentHtml();
benecsj 2:afe5826411e3 49 virtual void InvalidCommand();
benecsj 2:afe5826411e3 50 virtual void SetInterval();
benecsj 2:afe5826411e3 51 virtual void Response(char *input);
benecsj 2:afe5826411e3 52 virtual void DeleteLogs();
benecsj 2:afe5826411e3 53 virtual void DeleteLog();
benecsj 2:afe5826411e3 54 virtual void DeleteSysLog();
benecsj 2:afe5826411e3 55 virtual void ReceiveConfig(char* buf);
benecsj 2:afe5826411e3 56 virtual void Login(char* buf);
benecsj 2:afe5826411e3 57 virtual void ResetMe();
benecsj 3:799d8c61fb03 58 virtual void SetDate();
benecsj 0:8d62137f7ff4 59 };
benecsj 0:8d62137f7ff4 60
benecsj 0:8d62137f7ff4 61 #endif