Response.h 767 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright 2016 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef Reponse_DEFINED
  8. #define Reponse_DEFINED
  9. struct MHD_Connection;
  10. struct Request;
  11. class SkData;
  12. namespace Response {
  13. // SendOK just sends an empty response with a 200 OK status code.
  14. int SendOK(MHD_Connection* connection);
  15. int SendError(MHD_Connection* connection, const char* msg);
  16. int SendData(MHD_Connection* connection, const SkData* data, const char* type,
  17. bool setContentDisposition = false, const char* dispositionString = nullptr);
  18. int SendTemplate(MHD_Connection* connection, bool redirect = false,
  19. const char* redirectUrl = nullptr);
  20. }
  21. #endif