merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

taler-merchant-httpd_dispatcher.h (1874B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2021-2025 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  * @file taler-merchant-httpd_dispatcher.h
     18  * @brief request dispatch logic
     19  * @author Christian Grothoff
     20  */
     21 #ifndef TALER_MERCHANT_HTTPD_DISPATCHER_H
     22 #define TALER_MERCHANT_HTTPD_DISPATCHER_H
     23 
     24 #include "taler-merchant-httpd.h"
     25 
     26 
     27 /**
     28  * Find the request handler for the given request based on
     29  * the @a url and @a method. Only considers applicable
     30  * request handlers, thus we need @a use_admin to see if admin
     31  * handlers are in scope.
     32  *
     33  * @param[in,out] hc handler context to update with request handler
     34  * @param url URL to match against the handlers
     35  * @param method HTTP access method to consider
     36  * @param use_admin true if we are using the admin instance
     37  * @param[out] is_public set to true if the handler is a public endpoint
     38  * @return #GNUNET_OK on success,
     39  *         #GNUNET_NO if an error was queued (return #MHD_YES)
     40  *         #GNUNET_SYSERR to close the connection (return #MHD_NO)
     41  */
     42 enum GNUNET_GenericReturnValue
     43 TMH_dispatch_request (struct TMH_HandlerContext *hc,
     44                       const char *url,
     45                       const char *method,
     46                       bool use_admin,
     47                       bool *is_public);
     48 
     49 #endif