Remove B_PROT_* and related code

Use standard error codes instead.
This allows using error code returned by the underlying functions
directly, and makes it possible to use strerror for debugging. So, we
can also remove StatusString() from the various *Request classes.
This commit is contained in:
Adrien Destugues
2014-01-13 08:05:32 +01:00
parent 5e9a96156d
commit 3d864cd870
7 changed files with 87 additions and 147 deletions
-8
View File
@@ -49,7 +49,6 @@ public:
status_t Stop();
const BUrlResult& Result() const;
const char* StatusString(status_t threadStatus) const;
static bool IsInformationalStatusCode(int16 code);
static bool IsSuccessStatusCode(int16 code);
@@ -123,13 +122,6 @@ private:
bool fOptAutoReferer : 1;
};
// ProtocolLoop return status
enum {
B_PROT_HTTP_NOT_FOUND = B_PROT_THREAD_STATUS__END,
B_PROT_HTTP_THREAD_STATUS__END
};
// Request method
const char* const B_HTTP_GET = "GET";
const char* const B_HTTP_POST = "POST";