github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_4_58/include/ap_provider.h (about)

     1  /* Licensed to the Apache Software Foundation (ASF) under one or more
     2   * contributor license agreements.  See the NOTICE file distributed with
     3   * this work for additional information regarding copyright ownership.
     4   * The ASF licenses this file to You under the Apache License, Version 2.0
     5   * (the "License"); you may not use this file except in compliance with
     6   * the License.  You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  /**
    18   * @file  ap_provider.h
    19   * @brief Apache Provider API
    20   *
    21   * @defgroup APACHE_CORE_PROVIDER Provider API
    22   * @ingroup  APACHE_CORE
    23   * @{
    24   */
    25  
    26  #ifndef AP_PROVIDER_H
    27  #define AP_PROVIDER_H
    28  
    29  #include "ap_config.h"
    30  
    31  #ifdef __cplusplus
    32  extern "C" {
    33  #endif
    34  
    35  typedef struct {
    36      const char *provider_name;
    37  } ap_list_provider_names_t;
    38  
    39  typedef struct {
    40      const char *provider_group;
    41      const char *provider_version;
    42  } ap_list_provider_groups_t;
    43  
    44  /**
    45   * This function is used to register a provider with the global
    46   * provider pool.
    47   * @param pool The pool to create any storage from
    48   * @param provider_group The group to store the provider in
    49   * @param provider_name The name for this provider
    50   * @param provider_version The version for this provider
    51   * @param provider Opaque structure for this provider
    52   * @return APR_SUCCESS if all went well
    53   */
    54  AP_DECLARE(apr_status_t) ap_register_provider(apr_pool_t *pool,
    55                                                const char *provider_group,
    56                                                const char *provider_name,
    57                                                const char *provider_version,
    58                                                const void *provider);
    59  
    60  /**
    61   * This function is used to retrieve a provider from the global
    62   * provider pool.
    63   * @param provider_group The group to look for this provider in
    64   * @param provider_name The name for the provider
    65   * @param provider_version The version for the provider
    66   * @return provider pointer to provider if found, NULL otherwise
    67   */
    68  AP_DECLARE(void *) ap_lookup_provider(const char *provider_group,
    69                                        const char *provider_name,
    70                                        const char *provider_version);
    71  
    72  /**
    73   * This function is used to retrieve a list (array) of provider
    74   * names from the specified group with the specified version.
    75   * @param pool The pool to create any storage from
    76   * @param provider_group The group to look for this provider in
    77   * @param provider_version The version for the provider
    78   * @return pointer to array of ap_list_provider_names_t of provider names (could be empty)
    79   */
    80  
    81  AP_DECLARE(apr_array_header_t *) ap_list_provider_names(apr_pool_t *pool,
    82                                                const char *provider_group,
    83                                                const char *provider_version);
    84  
    85  /**
    86   * This function is used to retrieve a list (array) of provider groups and versions
    87   * @param pool The pool to create any storage from
    88   * @return pointer to array of ap_list_provider_groups_t of provider groups
    89   *         and versions (could be empty)
    90   */
    91  
    92  AP_DECLARE(apr_array_header_t *) ap_list_provider_groups(apr_pool_t *pool);
    93  
    94  
    95  #ifdef __cplusplus
    96  }
    97  #endif
    98  
    99  #endif
   100  /** @} */