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