]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/status.cpp
Prepare for assimilation into mspnet
[libs/net.git] / source / http / status.cpp
diff --git a/source/http/status.cpp b/source/http/status.cpp
new file mode 100644 (file)
index 0000000..6b95822
--- /dev/null
@@ -0,0 +1,26 @@
+#include "status.h"
+
+using namespace std;
+
+namespace Msp {
+namespace Http {
+
+ostream &operator<<(ostream &out, Status status)
+{
+       switch(status)
+       {
+       case NONE: out<<"None"; break;
+       case OK: out<<"OK"; break;
+       case BAD_REQUEST: out<<"Bad Request"; break;
+       case FORBIDDEN: out<<"Forbidden"; break;
+       case NOT_FOUND: out<<"Not Found"; break;
+       case INTERNAL_ERROR: out<<"Internal Error"; break;
+       case NOT_IMPLEMENTED: out<<"Not Implemented"; break;
+       default: out<<"Unknown Status"; break;
+       }
+
+       return out;
+}
+
+} // namespace Http
+} // namespace Msp