Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Unified Diff: tools/skiaserve/Response.h

Issue 1739763002: Create Response namespace for skiaserve response functions (Closed) Base URL: https://skia.googlesource.com/skia@skiaserve-3
Patch Set: tweaks Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/skiaserve/Response.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/Response.h
diff --git a/tools/skiaserve/Response.h b/tools/skiaserve/Response.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef115e9d23a4c89ab5bfb79e6eaf9f0430f5a44b
--- /dev/null
+++ b/tools/skiaserve/Response.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef Reponse_DEFINED
+#define Reponse_DEFINED
+
+struct MHD_Connection;
+struct Request;
+class SkData;
+
+namespace Response {
+ // SendOK just sends an empty response with a 200 OK status code.
+ int SendOK(MHD_Connection* connection);
+
+ int SendError(MHD_Connection* connection, const char* msg);
+
+ int SendData(MHD_Connection* connection, const SkData* data, const char* type,
+ bool setContentDisposition = false, const char* dispositionString = nullptr);
+
+ int SendJSON(MHD_Connection* connection, Request* request, int n);
+
+ int SendTemplate(MHD_Connection* connection, bool redirect = false,
+ const char* redirectUrl = nullptr);
+}
+
+#endif
« no previous file with comments | « no previous file | tools/skiaserve/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698