aboutsummaryrefslogtreecommitdiff
path: root/src/protocolhttp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocolhttp.h')
-rw-r--r--src/protocolhttp.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/protocolhttp.h b/src/protocolhttp.h
index 80a0db6..153a00d 100644
--- a/src/protocolhttp.h
+++ b/src/protocolhttp.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -13,7 +13,7 @@
13 13
14#include "bu/protocol.h" 14#include "bu/protocol.h"
15#include "bu/client.h" 15#include "bu/client.h"
16#include "bu/fstring.h" 16#include "bu/string.h"
17#include "bu/hash.h" 17#include "bu/hash.h"
18 18
19namespace Bu 19namespace Bu
@@ -32,7 +32,7 @@ namespace Bu
32 class ProtocolHttp : public Protocol 32 class ProtocolHttp : public Protocol
33 { 33 {
34 public: /* Types */ 34 public: /* Types */
35 typedef Bu::List<Bu::FString> TokenList; 35 typedef Bu::List<Bu::String> TokenList;
36 36
37 public: /* Interface */ 37 public: /* Interface */
38 ProtocolHttp(); 38 ProtocolHttp();
@@ -42,25 +42,25 @@ namespace Bu
42 virtual void onNewData( Bu::Client *pClient ); 42 virtual void onNewData( Bu::Client *pClient );
43 43
44 virtual void onRequest( 44 virtual void onRequest(
45 const Bu::FString &sMethod, const Bu::FString &sPath )=0; 45 const Bu::String &sMethod, const Bu::String &sPath )=0;
46 46
47 class Response 47 class Response
48 { 48 {
49 friend class Bu::ProtocolHttp; 49 friend class Bu::ProtocolHttp;
50 public: 50 public:
51 Response( int iCode ); 51 Response( int iCode );
52 Response( int iCode, const Bu::FString &sReason ); 52 Response( int iCode, const Bu::String &sReason );
53 virtual ~Response(); 53 virtual ~Response();
54 54
55 void setHeader( const Bu::FString &sKey, const Bu::FString &sVal ); 55 void setHeader( const Bu::String &sKey, const Bu::String &sVal );
56 void setContent( const Bu::FString &sCont ); 56 void setContent( const Bu::String &sCont );
57 57
58 private: 58 private:
59 int iCode; 59 int iCode;
60 Bu::FString sReason; 60 Bu::String sReason;
61 typedef Bu::Hash<Bu::FString,Bu::FString> StringHash; 61 typedef Bu::Hash<Bu::String,Bu::String> StringHash;
62 StringHash hHeaders; 62 StringHash hHeaders;
63 Bu::FString sContent; 63 Bu::String sContent;
64 }; 64 };
65 65
66 void sendResponse( const Response &rRes ); 66 void sendResponse( const Response &rRes );
@@ -83,7 +83,7 @@ namespace Bu
83 * processed, false if the end-of-line has not been reached, and more 83 * processed, false if the end-of-line has not been reached, and more
84 * data needs to be read before this operation can continue. 84 * data needs to be read before this operation can continue.
85 */ 85 */
86 TokenType getToken( Bu::FString &line ); 86 TokenType getToken( Bu::String &line );
87 bool isWS( char buf ); 87 bool isWS( char buf );
88 bool isSeperator( char buf ); 88 bool isSeperator( char buf );
89 89
@@ -96,8 +96,8 @@ namespace Bu
96 96
97 int iState; 97 int iState;
98 98
99 Bu::FString sMethod; 99 Bu::String sMethod;
100 Bu::FString sPath; 100 Bu::String sPath;
101 int iMajor; 101 int iMajor;
102 int iMinor; 102 int iMinor;
103 }; 103 };