Akifumi Takahashi / HTTP_SERVER

Dependents:   httpserversample SIMPLE_WSS

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FileHandler.h Source File

FileHandler.h

00001 /*FileHandler.h*/
00002 #ifndef FILE_HANDLER_H
00003 #define FILE_HANDLER_H
00004 #include "mbed.h"
00005 #include "string.h"
00006 #include <stdlib.h>
00007 
00008 using namespace std;
00009 class FileHandler
00010 {
00011 public:
00012     FileHandler();
00013     ~FileHandler();
00014     FILE* open(const char*, const char*);
00015     int  close();
00016     virtual int getc();
00017     bool arrival();
00018     bool atEOF();
00019     bool hasError();
00020     char *getFullpath();
00021     char *getFilename();
00022     char *getSuffix();
00023     int  getFileSize();
00024 private:
00025     FILE *fp;
00026     char *fullpath;
00027     char *filename;
00028     char *suffix;
00029     char content_buffer[1024];
00030     int  file_size;
00031 };
00032 #endif