1 #ifndef __HTTPCLIENT_H__\r
2 #define __HTTPCLIENT_H__\r
3 /**\r
4 * Phoebe DOM Implementation.\r
5 *\r
6 * This is a C++ approximation of the W3C DOM model, which follows\r
7 * fairly closely the specifications in the various .idl files, copies of\r
8 * which are provided for reference. Most important is this one:\r
9 *\r
10 * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html\r
11 *\r
12 * Authors:\r
13 * Bob Jamison\r
14 *\r
15 * Copyright (C) 2006 Bob Jamison\r
16 *\r
17 * This library is free software; you can redistribute it and/or\r
18 * modify it under the terms of the GNU Lesser General Public\r
19 * License as published by the Free Software Foundation; either\r
20 * version 2.1 of the License, or (at your option) any later version.\r
21 *\r
22 * This library is distributed in the hope that it will be useful,\r
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
25 * Lesser General Public License for more details.\r
26 *\r
27 * You should have received a copy of the GNU Lesser General Public\r
28 * License along with this library; if not, write to the Free Software\r
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r
30 */\r
31 \r
32 \r
33 \r
34 #include "dom.h"\r
35 #include "uri.h"\r
36 #include "socket.h"\r
37 \r
38 namespace org\r
39 {\r
40 namespace w3c\r
41 {\r
42 namespace dom\r
43 {\r
44 namespace io\r
45 {\r
46 \r
47 \r
48 \r
49 \r
50 \r
51 \r
52 class HttpClient\r
53 {\r
54 \r
55 public:\r
56 \r
57 /**\r
58 *\r
59 */\r
60 HttpClient();\r
61 \r
62 /**\r
63 *\r
64 */\r
65 virtual ~HttpClient();\r
66 \r
67 /**\r
68 *\r
69 */\r
70 bool openGet(const URI &uri);\r
71 \r
72 /**\r
73 *\r
74 */\r
75 int read();\r
76 \r
77 /**\r
78 *\r
79 */\r
80 bool write(int ch);\r
81 \r
82 /**\r
83 *\r
84 */\r
85 bool write(const DOMString &msg);\r
86 \r
87 /**\r
88 *\r
89 */\r
90 bool close();\r
91 \r
92 \r
93 private:\r
94 \r
95 \r
96 TcpSocket socket;\r
97 \r
98 };\r
99 \r
100 \r
101 \r
102 \r
103 } //namespace io\r
104 } //namespace dom\r
105 } //namespace w3c\r
106 } //namespace org\r
107 \r
108 \r
109 #endif /* __HTTPCLIENT_H__ */\r
110 \r
111 \r
112 //#########################################################################\r
113 //# E N D O F F I L E\r
114 //#########################################################################\r
115 \r