response.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. This file is part of libmicrohttpd
  3. Copyright (C) 2007 Daniel Pittman and Christian Grothoff
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  15. */
  16. /**
  17. * @file response.h
  18. * @brief Methods for managing response objects
  19. * @author Daniel Pittman
  20. * @author Christian Grothoff
  21. */
  22. #ifndef RESPONSE_H
  23. #define RESPONSE_H
  24. /**
  25. * Increments the reference counter for the @a response.
  26. *
  27. * @param response object to modify
  28. */
  29. void
  30. MHD_increment_response_rc (struct MHD_Response *response);
  31. /**
  32. * We are done sending the header of a given response
  33. * to the client. Now it is time to perform the upgrade
  34. * and hand over the connection to the application.
  35. *
  36. * @param response the response that was created for an upgrade
  37. * @param connection the specific connection we are upgrading
  38. * @return #MHD_YES on success, #MHD_NO on failure (will cause
  39. * connection to be closed)
  40. */
  41. // FIXME: This function will need to be called at the right place(s)
  42. // in the connection processing (just after we are done sending the header)
  43. // (for responses that have the 'upgrade_header' callback set).
  44. int
  45. MHD_response_execute_upgrade_ (struct MHD_Response *response,
  46. struct MHD_Connection *connection);
  47. #endif