httpAccess.h

00001 #ifndef HTTP_ACCESS_H
00002 #define HTTP_ACCESS_H
00003 
00004 /*
00005   HTTP アクセス
00006   Satofumi KAMIMURA
00007   $Id$
00008 */
00009 
00010 #include "tcpipDevice.h"
00011 #include <string>
00012 
00013 
00014 class HttpAccess {
00015   enum { Timeout = 5000 };
00016   std::string server;
00017   unsigned short port;
00018   std::string items;
00019 
00020   std::string sendRequest(const char *request, int size, int timeout);
00021   HttpAccess(void);
00022 
00023 public:
00024   HttpAccess(const char* web_server, int web_port);
00025   ~HttpAccess(void);
00026   std::string getHtmlText(const char *path, int timeout = Timeout);
00027   HttpAccess& clearItems(void);
00028   HttpAccess& addItem(const char *title, const char *value);
00029   HttpAccess& addItem(const char *title, int value);
00030   std::string sendPostRequest(const char *path, int timeout = Timeout);
00031 };
00032 
00033 #endif /* !HTTP_ACCESS_H */
00034 

Generated on Mon Apr 13 22:52:01 2009 by  doxygen 1.5.7.1