diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 02:14:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 02:14:08 +0000 |
commit | f5aca1a1b402bd7ebc944dc6e6fe65828d863365 (patch) | |
tree | 4a0fdd8e166d5c4b03543279d332b9a858ef62df /src/protocolhttp.h | |
parent | 10c557562e1d67c55314c212371ea9cb7f802863 (diff) | |
download | libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.gz libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.bz2 libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.xz libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.zip |
Bu::FString is now String, and there's a shell script to fix any other programs
that were using fstring, I hope.
Diffstat (limited to 'src/protocolhttp.h')
-rw-r--r-- | src/protocolhttp.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/protocolhttp.h b/src/protocolhttp.h index 80a0db6..6f4af9b 100644 --- a/src/protocolhttp.h +++ b/src/protocolhttp.h | |||
@@ -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 | ||
19 | namespace Bu | 19 | namespace 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 | }; |