donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

donau-httpd_mhd.h (1787B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2024 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 
     17 /**
     18  * @file donau-httpd_mhd.h
     19  * @brief helpers for MHD interaction, used to generate simple responses
     20  * @author Florian Dold
     21  * @author Benedikt Mueller
     22  * @author Christian Grothoff
     23  */
     24 #ifndef DONAU_HTTPD_MHD_H
     25 #define DONAU_HTTPD_MHD_H
     26 #include <gnunet/gnunet_util_lib.h>
     27 #include <microhttpd.h>
     28 #include "donau-httpd.h"
     29 
     30 
     31 /**
     32  * Function to call to handle the request by sending
     33  * back static data from the request handler.
     34  *
     35  * @param rc request context
     36  * @param args array of additional options (must be empty for this function)
     37  * @return MHD result code
     38  */
     39 enum MHD_Result
     40 DH_handler_static_response (struct DH_RequestContext *rc,
     41                             const char *const args[]);
     42 
     43 
     44 /**
     45  * Function to call to handle the request by sending
     46  * back a redirect to the AGPL source code.
     47  *
     48  * @param rc request context
     49  * @param args array of additional options (must be empty for this function)
     50  * @return MHD result code
     51  */
     52 enum MHD_Result
     53 DH_handler_agpl_redirect (struct DH_RequestContext *rc,
     54                           const char *const args[]);
     55 
     56 
     57 #endif